/* ==========================================================================
   Smart College Transport Management System - Dashboard Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   Notice Banner
   -------------------------------------------------------------------------- */
.notice-banner {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(239, 68, 68, 0.08) 100%);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--radius-lg);
    padding: 1.15rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    position: relative;
    overflow: hidden;
}

.notice-banner::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(to bottom, #f59e0b, #ef4444);
}

.notice-icon-box {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background-color: #f59e0b;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

.notice-content {
    flex: 1;
}

.notice-header-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.3rem;
}

.notice-tag {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: rgba(245, 158, 11, 0.2);
    color: #d97706;
    padding: 0.15rem 0.6rem;
    border-radius: var(--radius-full);
}

[data-theme="dark"] .notice-tag {
    color: #fbbf24;
}

.notice-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.notice-text {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.notice-close-btn {
    color: var(--text-subtle);
    padding: 0.35rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.notice-close-btn:hover {
    color: var(--text-main);
    background-color: rgba(0, 0, 0, 0.05);
}

/* --------------------------------------------------------------------------
   Statistics Grid
   -------------------------------------------------------------------------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-border);
}

.stat-card::after {
    content: '';
    position: absolute;
    right: -20px;
    bottom: -20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--primary-subtle);
    opacity: 0.5;
    pointer-events: none;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}

.stat-value {
    font-size: 2.1rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--text-main);
    line-height: 1;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--success);
    margin-top: 0.5rem;
}

.stat-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-card.stat-buses .stat-icon-wrapper { background-color: rgba(37, 99, 235, 0.12); color: #2563eb; }
.stat-card.stat-routes .stat-icon-wrapper { background-color: rgba(13, 148, 136, 0.12); color: #0d9488; }
.stat-card.stat-trips .stat-icon-wrapper { background-color: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.stat-card.stat-students .stat-icon-wrapper { background-color: rgba(139, 92, 246, 0.12); color: #8b5cf6; }

/* --------------------------------------------------------------------------
   Dashboard Layout Grid (Main 2 Column Area)
   -------------------------------------------------------------------------- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* --------------------------------------------------------------------------
   Upcoming Bus Hero Card
   -------------------------------------------------------------------------- */
.upcoming-bus-card {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 60%, #0f766e 100%);
    border-radius: var(--radius-xl);
    padding: 2rem;
    color: #ffffff;
    box-shadow: 0 12px 28px -6px rgba(30, 58, 138, 0.4);
    position: relative;
    overflow: hidden;
}

.upcoming-bus-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
}

.upcoming-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.upcoming-badge-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.route-tag-pill {
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.route-status-pill {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background-color: rgba(16, 185, 129, 0.25);
    border: 1px solid rgba(16, 185, 129, 0.4);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    color: #6ee7b7;
}

.route-status-pill .live-dot {
    width: 6px;
    height: 6px;
    background-color: #34d399;
    border-radius: 50%;
    box-shadow: 0 0 6px #34d399;
}

.route-title-large {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
    color: #ffffff;
}

.bus-meta-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.75rem;
}

.bus-meta-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.bus-number-badge {
    background-color: #ffffff;
    color: #1e3a8a;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Next Stop & Countdown Box */
.next-stop-countdown-box {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 1.35rem 1.5rem;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.next-stop-info {
    display: flex;
    flex-direction: column;
}

.next-stop-label {
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.25rem;
}

.next-stop-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 0.4rem;
}

.next-stop-time-details {
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    gap: 0.85rem;
}

.countdown-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.countdown-label {
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.25rem;
}

.countdown-timer {
    font-family: var(--font-mono);
    font-size: 1.9rem;
    font-weight: 800;
    color: #fef08a;
    letter-spacing: 0.02em;
    text-shadow: 0 0 12px rgba(254, 240, 138, 0.4);
    line-height: 1;
}

.upcoming-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.live-indicator-badge {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.track-now-btn {
    background-color: #ffffff;
    color: #1e3a8a;
    font-weight: 700;
    padding: 0.65rem 1.35rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
}

.track-now-btn:hover {
    background-color: #f0fdfa;
    color: #0d9488;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* --------------------------------------------------------------------------
   Quick Actions Section
   -------------------------------------------------------------------------- */
.quick-actions-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.action-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.action-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
    background-color: var(--primary-subtle);
}

.action-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.action-card.action-timetable .action-icon { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.action-card.action-tracking .action-icon { background: linear-gradient(135deg, #0d9488, #14b8a6); }
.action-card.action-pass .action-icon { background: linear-gradient(135deg, #8b5cf6, #a855f7); }
.action-card.action-routes .action-icon { background: linear-gradient(135deg, #f59e0b, #fbbf24); }

.action-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-main);
}

.action-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.35;
}

/* --------------------------------------------------------------------------
   Mini Timetable / Stops Preview
   -------------------------------------------------------------------------- */
.stops-preview-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 0.35rem;
}

.stop-preview-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    background-color: var(--bg-muted);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.stop-preview-item:hover {
    background-color: var(--primary-subtle);
    border-color: var(--primary-border);
}

.stop-preview-item.current-target {
    border-color: var(--primary-light);
    background-color: var(--primary-subtle);
    box-shadow: 0 0 0 1px var(--primary-light);
}

.stop-preview-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.stop-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--text-subtle);
}

.stop-preview-item.passed .stop-dot {
    background-color: var(--success);
}

.stop-preview-item.current-target .stop-dot {
    background-color: var(--primary-light);
    box-shadow: 0 0 8px var(--primary-light);
    animation: livePulse 1.5s infinite;
}

.stop-name-text {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

.stop-time-badge {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary-light);
    background-color: var(--bg-surface);
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

/* --------------------------------------------------------------------------
   Driver Quick Profile Snapshot
   -------------------------------------------------------------------------- */
.driver-snapshot-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    background-color: var(--bg-muted);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.driver-avatar-box {
    width: 58px;
    height: 58px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #1e3a8a, #0d9488);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 800;
    flex-shrink: 0;
}

.driver-snapshot-info {
    flex: 1;
}

.driver-snapshot-name {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.driver-snapshot-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.driver-snapshot-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--success);
    background-color: var(--success-bg);
    padding: 0.15rem 0.55rem;
    border-radius: var(--radius-full);
    margin-top: 0.35rem;
}
