@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* === M3 Light Theme · ZET Blue #1264AB === */
    --md-primary: #1264AB;
    --md-on-primary: #ffffff;
    --md-primary-container: #D4E4F7;
    --md-on-primary-container: #0A3D6B;

    --md-secondary: #1976D2;
    --md-secondary-container: #E3F2FD;

    --md-surface: #FAFAFA;
    --md-surface-dim: #F0F0F0;
    --md-surface-container: #F3EFF4;
    --md-surface-container-low: #F7F2FA;
    --md-surface-container-high: #ECE6F0;
    --md-surface-bright: #FFFFFF;

    --md-on-surface: #1C1B1F;
    --md-on-surface-variant: #49454F;

    --md-outline: #CAC4D0;
    --md-outline-variant: #E0DBE5;

    --md-error: #BA1A1A;
    --md-green: #1B873B;
    --md-orange: #B95000;
    --md-red: #C62828;

    --nav-width: 80px;
    /* M3 spec: 80dp */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* M3 elevation / shadow */
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.08);
    --shadow-2: 0 2px 4px rgba(0, 0, 0, 0.12);
    --shadow-3: 0 4px 8px rgba(0, 0, 0, 0.16);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--md-surface);
    color: var(--md-on-surface);
    height: 100vh;
    display: flex;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== NAVIGATION RAIL (M3 Compliant) ===== */
.nav-rail {
    width: 80px;
    /* M3 spec: 80dp */
    height: 100%;
    background: var(--md-surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 44px;
    /* M3 spec: top margin 44dp */
    border-right: 1px solid var(--md-outline-variant);
    z-index: 2000;
    position: relative;
}

.fab-info {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--md-primary-container);
    color: var(--md-on-primary-container);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 24px;
    /* M3 spec: 24dp icons */
    text-decoration: none;
}

.fab-info:hover {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
}

.fab-info:active {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

.nav-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
    gap: 4px;
    /* M3 spec: 4dp spacing */
    padding: 0;
}

.nav-item-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    /* M3 spec: 4dp spacing */
    width: 100%;
}

.nav-item {
    width: 100%;
    height: 64px;
    /* M3 spec: 64dp item height */
    border: none;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--md-on-surface-variant);
    cursor: pointer;
    gap: 4px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0;
    position: relative;
    padding: 0;
}

.nav-item:hover {
    color: var(--md-on-surface);
}

.nav-icon-box {
    width: 64px;
    height: 32px;
    border-radius: 16px;
    /* M3 active indicator: pill shape */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 24px;
    /* M3 spec: 24dp icons */
}

.nav-item.active .nav-icon-box {
    background: var(--md-secondary-container);
    color: var(--md-on-secondary-container);
}

.nav-item.active {
    color: var(--md-on-surface);
    font-weight: 700;
}

.nav-label {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    font-family: 'Roboto', sans-serif;
    /* M3 uses Roboto */
    line-height: 16px;
}

.nav-item.active .nav-label {
    font-weight: 700;
}



/* ===== MAIN AREA ===== */
.content-area {
    flex: 1;
    position: relative;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
    z-index: 1;
    background: #e8e8e8;
}

/* Remove Leaflet default styles */
.leaflet-control-attribution {
    display: none !important;
}

/* ===== VEHICLE / STOP MARKERS ===== */
.custom-vehicle-icon,
.custom-stop-icon {
    background: none !important;
    border: none !important;
}

/* ===== STOP DOTS ===== */
.stop-dot {
    width: 8px;
    height: 8px;
    background: rgba(73, 69, 79, 0.35);
    border: 1.5px solid rgba(73, 69, 79, 0.25);
    border-radius: 50%;
    transition: all 0.2s;
}

.stop-dot:hover {
    background: var(--md-primary);
    border-color: var(--md-primary);
    transform: scale(1.5);
    opacity: 0.7;
}

.stop-dot.selected {
    width: 12px;
    height: 12px;
    background: var(--md-primary);
    border: 2.5px solid white;
    box-shadow: 0 0 0 3px rgba(18, 100, 171, 0.25);
}

/* ===== POPUPS ===== */
.popup .leaflet-popup-content-wrapper {
    background: var(--md-surface-bright);
    color: var(--md-on-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-3);
    border: 1px solid var(--md-outline-variant);
}

.popup .leaflet-popup-tip {
    background: var(--md-surface-bright);
    border: 1px solid var(--md-outline-variant);
    border-top: none;
    border-left: none;
}

.popup .leaflet-popup-content {
    margin: 12px 16px;
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
}

/* ===== LIST VIEWS ===== */
.list-view {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--md-surface);
    z-index: 10;
    display: flex;
    flex-direction: column;
    padding: 24px 20px;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hidden {
    display: none !important;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.view-header {
    margin-bottom: 16px;
}

.view-header h1 {
    margin: 0 0 14px 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--md-on-surface);
    letter-spacing: -0.3px;
}

/* M3 Search bar */
.search-bar {
    background: var(--md-surface-container-high);
    border-radius: var(--radius-full);
    height: 48px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    margin-bottom: 12px;
    border: none;
    transition: box-shadow 0.2s;
}

.search-bar:focus-within {
    box-shadow: 0 0 0 2px var(--md-primary);
    background: var(--md-surface-bright);
}

.search-bar .material-symbols-rounded {
    color: var(--md-on-surface-variant);
    font-size: 20px;
}

.search-bar input {
    border: none;
    background: transparent;
    flex: 1;
    margin-left: 12px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    color: var(--md-on-surface);
}

.search-bar input::placeholder {
    color: var(--md-on-surface-variant);
}

/* M3 Filter Chips */
.filter-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.chip {
    padding: 6px 16px;
    border: 1px solid var(--md-outline);
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--md-on-surface-variant);
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.chip:hover {
    background: rgba(28, 27, 31, 0.06);
    border-color: var(--md-on-surface-variant);
}

.chip.active {
    background: var(--md-primary-container);
    border-color: var(--md-primary-container);
    color: var(--md-on-primary-container);
}

/* List content */
.list-content {
    flex: 1;
    overflow-y: auto;
}

.list-item {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--md-outline-variant);
    cursor: pointer;
    transition: all 0.15s;
    border-radius: var(--radius-sm);
    margin-bottom: 2px;
}

.list-item:hover {
    background: rgba(28, 27, 31, 0.05);
}

.list-item:active {
    background: rgba(18, 100, 171, 0.08);
}

.list-item-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--md-on-surface);
}

.list-item-sub {
    font-size: 12px;
    color: var(--md-on-surface-variant);
    font-weight: 400;
}

/* Stop item specific styles */
.stop-item {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 12px !important;
    padding: 16px 14px !important;
}

.stop-lines-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
}

.stop-line-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(18, 100, 171, 0.05);
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid rgba(18, 100, 171, 0.12);
    max-width: 100%;
    transition: all 0.2s;
}

.stop-line-item:hover {
    background: rgba(18, 100, 171, 0.1);
    border-color: rgba(18, 100, 171, 0.2);
    transform: translateY(-1px);
}

.line-badge {
    background: var(--md-primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    min-width: 28px;
    text-align: center;
}

.line-directions {
    font-size: 11px;
    color: var(--md-on-surface-variant);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

/* Vehicle List Special Styling */
.vehicle-list-item {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--md-outline-variant);
    cursor: pointer;
    transition: background 0.2s;
}

.vehicle-list-item:hover {
    background: rgba(18, 100, 171, 0.04);
}

.vehicle-line-badge {
    width: 42px;
    height: 42px;
    background: rgba(18, 100, 171, 0.1);
    color: var(--md-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.vehicle-main-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.vehicle-dest {
    font-weight: 600;
    font-size: 15px;
    color: var(--md-on-surface);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vehicle-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--md-on-surface-variant);
}

.vehicle-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.vehicle-meta-item .material-symbols-rounded {
    font-size: 14px;
    opacity: 0.7;
}

.vehicle-delay {
    font-size: 13px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 8px;
}

.vehicle-delay.late {
    color: var(--md-red);
    background: rgba(198, 40, 40, 0.05);
}

.vehicle-delay.early {
    color: var(--md-orange);
    background: rgba(185, 80, 0, 0.05);
}

.vehicle-delay.ontime {
    color: var(--md-green);
    background: rgba(27, 135, 59, 0.05);
}

.placeholder-msg {
    text-align: center;
    padding: 40px 20px;
    color: var(--md-on-surface-variant);
    font-size: 14px;
}

/* ===== DETAIL CARD ===== */
.detail-card {
    position: fixed;
    top: 0;
    left: 80px;
    /* Match M3 nav-rail width */
    bottom: 0;
    width: 400px;
    max-width: 400px;
    height: 100vh;
    background: var(--md-surface-bright);
    border-radius: 0;
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.1);
    z-index: 1500;
    display: flex;
    flex-direction: column;
    padding: 0;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s ease;
    border-right: 1px solid #E5E7EB;
    overflow: hidden;
}

.detail-card.active {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--md-on-surface-variant);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 20px;
    z-index: 10;
}

.close-btn:hover {
    background: rgba(28, 27, 31, 0.08);
    color: var(--md-on-surface);
    transform: scale(1.05);
}

.close-btn:active {
    background: rgba(28, 27, 31, 0.12);
    transform: scale(0.95);
}

/* Card Header */
.card-header {
    padding: 20px 20px 16px 20px;
    border-bottom: 1px solid var(--md-outline-variant);
    background: var(--md-surface-container-low);
}

.card-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    scroll-behavior: smooth;
}

.card-content::-webkit-scrollbar {
    width: 6px;
}

.card-content::-webkit-scrollbar-track {
    background: transparent;
}

.card-content::-webkit-scrollbar-thumb {
    background: rgba(28, 27, 31, 0.2);
    border-radius: 3px;
}

.card-content::-webkit-scrollbar-thumb:hover {
    background: rgba(28, 27, 31, 0.3);
}

/* ===== TIMELINE ===== */
.timeline {
    margin-top: 12px;
    position: relative;
    padding-left: 8px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 23px;
    width: 3px;
    background: linear-gradient(180deg,
            var(--md-outline-variant) 0%,
            var(--md-outline-variant) 100%);
    border-radius: 2px;
}

.t-item {
    position: relative;
    padding: 10px 0 10px 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    margin: 0 -8px;
    padding-left: 44px;
}

.t-item:hover {
    background: rgba(18, 100, 171, 0.04);
}

.t-dot {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: var(--md-surface-bright);
    border: 3px solid var(--md-outline);
    border-radius: 50%;
    z-index: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.t-item.current .t-dot {
    background: var(--md-primary);
    border-color: var(--md-primary);
    box-shadow: 0 0 0 6px rgba(18, 100, 171, 0.15),
        0 2px 8px rgba(18, 100, 171, 0.3);
    width: 18px;
    height: 18px;
}

.t-name {
    font-size: 13px;
    color: var(--md-on-surface-variant);
    font-weight: 400;
}

.t-item.current .t-name {
    color: var(--md-on-surface);
    font-weight: 500;
}

.t-time {
    font-weight: 600;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: var(--md-on-surface-variant);
}

/* Status Colors */
.text-late {
    color: var(--md-red) !important;
}

.text-ontime {
    color: var(--md-green) !important;
}

.text-early {
    color: var(--md-orange) !important;
}

/* ===== VR BADGE ===== */
.vr-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(18, 100, 171, 0.1);
    color: var(--md-primary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    border: 1px solid rgba(18, 100, 171, 0.2);
}

.vr-badge:hover {
    background: rgba(18, 100, 171, 0.18);
    box-shadow: 0 2px 6px rgba(18, 100, 171, 0.2);
    transform: translateY(-1px);
    border-color: rgba(18, 100, 171, 0.3);
}

.vr-badge:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(18, 100, 171, 0.15);
}

/* ===== DELAY TAGS ===== */
.t-delay {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.t-delay-late {
    background: rgba(198, 40, 40, 0.1);
    color: #C62828;
    border: 1px solid rgba(198, 40, 40, 0.2);
}

.t-delay-early {
    background: rgba(185, 80, 0, 0.1);
    color: #B95000;
    border: 1px solid rgba(185, 80, 0, 0.2);
}

.t-sched {
    font-size: 11px;
    color: var(--md-outline);
    text-decoration: line-through;
    font-variant-numeric: tabular-nums;
}

.t-actual {
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.t-time-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* ===== PAST STOPS ===== */
.t-item.past {
    opacity: 0.45;
}

.t-item.past .t-dot {
    width: 10px;
    height: 10px;
    left: 18px;
    top: 16px;
    border-color: var(--md-outline-variant);
    background: var(--md-outline-variant);
}

/* ===== SHOW ALL BUTTON ===== */
.show-all-btn {
    display: block;
    width: 100%;
    background: rgba(18, 100, 171, 0.04);
    border: 1px dashed rgba(18, 100, 171, 0.2);
    color: var(--md-primary);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
}

.show-all-btn:hover {
    background: rgba(18, 100, 171, 0.08);
    border-color: rgba(18, 100, 171, 0.35);
}

/* ===== DAY PICKER ===== */
.day-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--md-surface-container);
    border-radius: 12px;
    padding: 8px 4px;
}

.day-picker-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--md-on-surface-variant);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.15s;
}

.day-picker-btn:hover {
    background: rgba(18, 100, 171, 0.08);
    color: var(--md-primary);
}

/* ===== SCHEDULE TRIP ROW ===== */
.schedule-trip-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: background 0.15s;
}

.schedule-trip-row:hover {
    background: rgba(18, 100, 171, 0.04);
}

.schedule-trip-current {
    background: rgba(18, 100, 171, 0.06);
    border: 1px solid rgba(18, 100, 171, 0.15);
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    body {
        flex-direction: column-reverse;
        position: fixed;
        width: 100%;
        height: 100%;
    }

    .nav-rail {
        width: 100%;
        height: 64px;
        flex-direction: row;
        justify-content: space-evenly;
        padding: 0;
        padding-top: 0;
        border-right: none;
        border-top: 1px solid var(--md-outline-variant);
        z-index: 5000;
        background: var(--md-surface);
        position: relative;
    }

    .fab-info {
        display: flex;
        position: fixed;
        top: 16px;
        left: 16px;
        z-index: 6000;
        width: 40px;
        height: 40px;
        border-radius: 12px;
        background: var(--md-surface-bright);
        box-shadow: var(--shadow-2);
        margin-bottom: 0;
    }

    .nav-container {
        flex-direction: row;
        height: 100%;
        width: 100%;
        justify-content: space-evenly;
        gap: 0;
        padding: 0;
    }

    .nav-item-wrapper {
        flex-direction: row;
        gap: 4px;
        width: auto;
        height: 100%;
        align-items: center;
    }

    .nav-item {
        height: 100%;
        width: auto;
        min-width: 64px;
        flex: 1;
        gap: 4px;
        border-radius: 0;
        padding: 12px 8px;
    }

    .nav-item.active::before {
        display: none;
    }



    .nav-icon-box {
        width: 64px;
        height: 32px;
        border-radius: 16px;
        font-size: 24px;
    }

    .nav-label {
        font-size: 12px;
    }

    .detail-card {
        height: calc(100% - 56px);
    }

    .detail-card {
        position: fixed;
        top: auto;
        left: 0;
        right: 0;
        bottom: 64px;
        /* Move above navbar */
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: 40vh;
        border-radius: 24px 24px 0 0;
        transform: translateY(calc(100% + 64px));
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.1);
        z-index: 4000;
        padding: 0;
        border: none;
        background: var(--md-surface-bright);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .detail-card.active {
        transform: translateY(0);
    }

    /* Settings panel on mobile - bottom sheet style */
    #map-settings-panel {
        position: fixed !important;
        top: auto !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 64px !important;
        /* Move above navbar */
        width: 100% !important;
        height: auto !important;
        max-height: 50vh !important;
        border-radius: 24px 24px 0 0 !important;
        border: none !important;
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.1) !important;
        transform: translateY(calc(100% + 64px)) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        overflow-y: auto;
        z-index: 4500 !important;
        background: white !important;
    }

    #map-settings-panel.active {
        transform: translateY(0) !important;
    }

    .list-view {
        padding: 16px 14px;
        z-index: 3000;
        height: auto;
        max-height: 60vh;
        top: auto;
        bottom: 0;
        /* List views can cover the whole screen relative to content-area parent */
        border-top: 1px solid var(--md-outline-variant);
        border-radius: 24px 24px 0 0;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
    }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(28, 27, 31, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(28, 27, 31, 0.25);
}

/* ===== DRAG HANDLE ===== */
.drag-handle {
    width: 32px;
    height: 4px;
    background: rgba(28, 27, 31, 0.2);
    border-radius: 2px;
    margin: 0 auto 12px;
}

@media (min-width: 769px) {
    .drag-handle {
        display: none;
    }
}

/* ===== MATERIAL DESIGN 3 UTILITIES ===== */

/* Icon Containers */
.icon-container {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--md-primary-container);
    color: var(--md-on-primary-container);
    font-size: 24px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-container.small {
    width: 36px;
    height: 36px;
    font-size: 20px;
    border-radius: 10px;
}

.icon-container:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(18, 100, 171, 0.15);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.status-badge.success {
    background: rgba(27, 135, 59, 0.1);
    color: #1B873B;
    border: 1px solid rgba(27, 135, 59, 0.2);
}

.status-badge.warning {
    background: rgba(234, 179, 8, 0.1);
    color: #CA8A04;
    border: 1px solid rgba(234, 179, 8, 0.2);
}

.status-badge.error {
    background: rgba(198, 40, 40, 0.1);
    color: #C62828;
    border: 1px solid rgba(198, 40, 40, 0.2);
}

.status-badge.info {
    background: rgba(18, 100, 171, 0.1);
    color: #1264AB;
    border: 1px solid rgba(18, 100, 171, 0.2);
}

.status-badge.ghost {
    background: rgba(107, 114, 128, 0.1);
    color: #6B7280;
    border: 1px solid rgba(107, 114, 128, 0.2);
}

/* Info Cards */
.info-card {
    background: var(--md-surface-container-low);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--md-outline-variant);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-card:hover {
    background: var(--md-surface-container);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Dividers */
.divider {
    height: 1px;
    background: var(--md-outline-variant);
    margin: 16px 0;
}

.divider.thick {
    height: 2px;
}

.divider.with-text {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--md-on-surface-variant);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.divider.with-text::before,
.divider.with-text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--md-outline-variant);
}

/* Animated Pulse */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(90deg,
            var(--md-surface-container) 0%,
            var(--md-surface-container-high) 50%,
            var(--md-surface-container) 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ===== SCHEDULE LIST (VRs) ===== */
.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.schedule-trip-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: var(--md-surface-container-low);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.schedule-trip-row:hover {
    background: var(--md-surface-container-high);
    border-color: var(--md-outline-variant);
    box-shadow: var(--shadow-1);
}

.schedule-trip-current {
    background: rgba(27, 135, 59, 0.08) !important;
    border-color: var(--md-green) !important;
}

.map-shortcut-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 36px;
    height: 36px;
}

.map-shortcut-btn:hover {
    background: rgba(18, 100, 171, 0.1) !important;
    transform: scale(1.1);
}

.map-shortcut-btn:active {
    transform: scale(0.9);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.schedule-list {
    animation: fadeIn 0.3s ease-out;
}