*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

:root {
    /* Light Mode Defaults */
    --bg: #f8fafc;
    --surface: #ffffff;
    --card: #f1f5f9;
    --border: #e2e8f0;
    --primary: #00b894;
    --primary-glow: #00b89433;
    --primary-dark: #008f73;
    --accent: #6c5ce7;
    --danger: #ff6b6b;
    --danger-glow: #ff6b6b33;
    --warning: #f0a500;
    --warning-glow: #f0a50033;
    --text: #1e293b;
    --notif-text: #1e293b;
    --text-dim: #64748b;
    --text-muted: #94a3b8;
    --radius: 16px;
    --radius-sm: 10px;
    --map-bg: #e2e8f0;
    --gradient-results: linear-gradient(135deg, #ffffff, #f8fafc);
    --gradient-dest: linear-gradient(135deg, #ffffff, #f1f5f9);
    --item-bg: rgba(128, 128, 128, 0.1);
}

[data-theme="dark"] {
    --bg: #0a0e1a;
    --surface: #131829;
    --card: #1a2035;
    --border: #2a3050;
    --primary: #00d4aa;
    --primary-glow: #00d4aa33;
    --primary-dark: #00a885;
    --accent: #6c5ce7;
    --danger: #ff6b6b;
    --danger-glow: #ff6b6b33;
    --warning: #f0a500;
    --warning-glow: #f0a50033;
    --text: #e8ecf4;
    --notif-text: #e8ecf4;
    --text-dim: #8892a8;
    --text-muted: #5a6478;
    --map-bg: #0d1117;
    --gradient-results: linear-gradient(135deg, #1a2035, #1e2845);
    --gradient-dest: linear-gradient(135deg, #1a2535, #1e2845);
    --item-bg: rgba(0, 0, 0, 0.25);
}

html,
body {
    height: 100%;
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow: hidden
}

#app {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    position: relative
}

/* MAP WRAPPER */
.map-wrapper {
    flex: 1;
    min-height: 45vh;
    position: relative;
    z-index: 1;
}

#map {
    width: 100%;
    height: 100%;
    background: var(--map-bg);
}

.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
    padding-top: 60px;
}

.leaflet-control-zoom {
    border: none !important;
}

.leaflet-control-zoom a {
    background: var(--card) !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    width: 34px !important;
    height: 34px !important;
    line-height: 34px !important;
    font-size: 16px !important;

}

.leaflet-control-zoom a:first-child {
    border-radius: 8px 8px 0 0 !important
}

.leaflet-control-zoom a:last-child {
    border-radius: 0 0 8px 8px !important
}

/* BOTTOM PANEL */
#panel {
    position: relative;
    z-index: 10;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-radius: 24px 24px 0 0;
    margin-top: -20px;
    padding: 12px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 55vh;
    overflow-y: auto;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, .5);
    transition: max-height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), padding-bottom 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#panel.collapsed {
    max-height: 125px;
    padding-bottom: 16px;
    overflow: hidden;
}

#panel>*:not(.drag-handle):not(.app-header):not(.status-bar) {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#panel.collapsed>*:not(.drag-handle):not(.app-header):not(.status-bar) {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#panel::-webkit-scrollbar {
    width: 4px
}

#panel::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px
}

.drag-handle {
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 4px;
    margin: 0 auto 4px;
    cursor: pointer;
}

/* HEADER */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.app-title {
    font-size: 1.15rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent
}

.app-badge {
    font-size: .65rem;
    background: var(--accent);
    color: #fff;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600
}

/* LIVE STATS */
.live-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    text-align: center;
    transition: all .3s
}

.stat-card.active {
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow)
}

.stat-label {
    font-size: .7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 600
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    margin-top: 2px;
    font-variant-numeric: tabular-nums
}

.stat-value.fare {
    color: var(--primary)
}

.stat-unit {
    font-size: .75rem;
    color: var(--text-dim);
    font-weight: 500
}

.live-clock {
    grid-column: span 3;
    text-align: left;
    font-size: 12px;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
}

/* BUTTONS */
.btn-row {
    display: flex;
    gap: 10px
}

.btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, .08), transparent);
    pointer-events: none
}

.btn-start {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #000;
    box-shadow: 0 4px 20px var(--primary-glow)
}

.btn-start:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 30px var(--primary-glow)
}

.btn-start:active {
    transform: translateY(1px)
}

.btn-stop {
    background: linear-gradient(135deg, var(--danger), #e55);
    color: #fff;
    box-shadow: 0 4px 20px var(--danger-glow)
}

.btn-stop:hover {
    transform: translateY(-1px)
}

.btn-reset {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text-dim)
}

.btn-reset:hover {
    border-color: var(--text-muted);
    color: var(--text)
}

.btn:disabled {
    opacity: .4;
    cursor: not-allowed;
    transform: none !important
}

.btn .icon {
    font-size: 1.1rem
}

/* STATUS */
.status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .78rem;
    color: var(--text-muted)
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0
}

.status-dot.tracking {
    background: var(--primary);
    animation: pulse 1.5s infinite
}

.status-dot.error {
    background: var(--danger)
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 var(--primary-glow)
    }

    50% {
        opacity: .7;
        box-shadow: 0 0 0 6px transparent
    }
}

/* RESULTS CARD */
.results-card {
    background: var(--gradient-results);
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    padding: 16px;
    display: none;
    animation: slideUp .4s ease;
}

.results-card.show {
    display: block
}

.results-title {
    font-size: .85rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px
}

.result-item {
    background: var(--item-bg);
    border-radius: 8px;
    padding: 10px;
    text-align: center
}

.result-label {
    font-size: .65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .5px
}

.result-value {
    font-size: 1.3rem;
    font-weight: 800;
    margin-top: 2px
}

.disclaimer {
    font-size: .68rem;
    color: var(--text-muted);
    line-height: 1.5;
    padding: 8px;
    background: var(--item-bg);
    border-radius: 8px;
    border-left: 3px solid var(--accent)
}

/* MANUAL FALLBACK */
.manual-section {
    display: none
}

.manual-section.show {
    display: block
}

.manual-title {
    font-size: .85rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px
}

.select-wrap {
    position: relative
}

.select-wrap select {
    width: 100%;
    padding: 12px 14px;
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: .85rem;
    appearance: none;
    cursor: pointer;
}

.select-wrap::after {
    content: '▾';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none
}

.manual-result {
    margin-top: 10px;
    padding: 12px;
    background: var(--card);
    border-radius: var(--radius-sm);
    display: none;
    text-align: center
}

.manual-result.show {
    display: block
}

/* RIDE HISTORY */
.history-toggle {
    font-size: .78rem;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-decoration: underline;
    text-underline-offset: 2px
}

.history-toggle:hover {
    color: var(--text)
}

.history-list {
    display: none;
    margin-top: 6px
}

.history-list.show {
    display: block
}

.history-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.8rem;
    text-align: left;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.history-date {
    font-weight: 700;
    color: var(--text);
    font-size: 0.85rem;
}

.history-status {
    background: rgba(0, 212, 170, 0.15);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
}

.history-route {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 2px;
}

.history-point {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.history-point-icon {
    font-size: 0.85rem;
    line-height: 1.2;
}

.history-point-details {
    display: flex;
    flex-direction: column;
}

.history-point-name {
    color: var(--text);
    font-weight: 600;
}

.history-point-time {
    color: var(--text-dim);
    font-size: 0.7rem;
}

.history-connector {
    width: 2px;
    height: 10px;
    background: var(--border);
    margin-left: 6px;
    border-radius: 2px;
}

.history-stats {
    display: flex;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 8px;
    margin-top: 4px;
}

.h-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.h-stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.h-stat-val {
    font-weight: 700;
    color: var(--text);
    font-size: 0.95rem;
    margin-top: 2px;
}

.h-stat-val.fare {
    color: var(--primary);
}

.history-payment {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-align: right;
    margin-top: 2px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

/* CUSTOM MARKER */
.user-marker {
    width: 20px;
    height: 20px;
    background: var(--primary);
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 12px var(--primary-glow), 0 2px 8px rgba(0, 0, 0, .3);
}

.user-marker.tracking {
    animation: markerPulse 2s infinite
}

@keyframes markerPulse {

    0%,
    100% {
        box-shadow: 0 0 12px var(--primary-glow), 0 2px 8px rgba(0, 0, 0, .3)
    }

    50% {
        box-shadow: 0 0 24px var(--primary), 0 2px 8px rgba(0, 0, 0, .3)
    }
}

/* GPS DENIED BANNER */
.gps-banner {
    background: linear-gradient(135deg, #2a1a35, #1a1535);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-size: .78rem;
    color: var(--text-dim);
    display: none;
    line-height: 1.5;
}

.gps-banner.show {
    display: block
}

.gps-banner strong {
    color: var(--accent)
}

.gps-retry-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 6px 12px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.gps-retry-btn:active {
    transform: scale(0.95);
}

.gps-retry-btn i {
    font-size: 0.7rem;
}

.gps-retry-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.status-retry-icon {
    margin-left: 6px;
    cursor: pointer;
    color: var(--danger);
    font-size: 0.85rem;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.area-fallback-title {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin: 8px 0 4px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* PREMIUM SUGGESTION CARD */
.premium-suggestion-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    animation: slideUp 0.4s ease-out;
}

.premium-suggestion-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
}

.suggestion-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--primary-glow);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    align-self: flex-start;
}

.suggestion-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.suggestion-fare {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.suggestion-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    color: var(--text-dim);
    font-size: 0.75rem;
    font-weight: 500;
}

.suggestion-meta .dot {
    display: none;
}

.suggestion-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.trust-score {
    font-size: 0.9rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trust-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* FALLBACK NO DATA */
.fallback-no-data {
    background: var(--item-bg);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.fallback-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    font-size: 0.8rem;
    line-height: 1.4;
}

.fallback-message i {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.btn-submit-new-fare {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-submit-new-fare:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.btn-submit-new-fare:active {
    transform: translateY(0);
}

/* WEAK GPS WARNING */
.weak-gps-warning {
    background: linear-gradient(135deg, #2a2010, #1a1810);
    border: 1px solid var(--warning);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: .75rem;
    color: var(--warning);
    display: none;
    line-height: 1.4;
    animation: slideUp .3s ease;
}

.weak-gps-warning.show {
    display: flex;
    align-items: center;
    gap: 8px
}

/* FARE BREAKDOWN */
.fare-breakdown {
    display: flex;
    justify-content: center;
    gap: 6px;
    font-size: .75rem;
    color: var(--text-dim);
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.fare-breakdown span {
    background: rgba(0, 0, 0, .2);
    padding: 3px 8px;
    border-radius: 6px;
}

.fare-breakdown .fare-op {
    background: none;
    padding: 3px 2px;
    color: var(--text-muted);
}

/* LIVE STATS — 4-column for timer */
.live-stats-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: -4px;
}

.stat-card .stat-value.timer {
    color: var(--accent);
    font-size: 1.4rem;
    letter-spacing: 1px;
}

/* NIGHT FARE OPTIONS ROW */
.options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 6px;
}

.option-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dim);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    transition: .3s;
    border-radius: 22px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text);
    transition: .3s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(18px);
    background-color: var(--bg);
}

input:disabled+.slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.surcharge-input {
    width: 50px;
    background: var(--item-bg);
    border: 1px solid var(--border);
    color: var(--primary);
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    border-radius: 8px;
    padding: 4px;
    outline: none;
    font-family: inherit;
}

.surcharge-input:disabled {
    opacity: 0.5;
    color: var(--text-muted);
    border-color: transparent;
}

.surcharge-input:focus {
    border-color: var(--primary);
}

/* PASSENGER SELECTOR */
.passenger-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .8rem;
}

.passenger-row label {
    color: var(--text-dim);
    font-weight: 600;
    white-space: nowrap;
}

.passenger-controls {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.passenger-controls button {
    width: 36px;
    height: 32px;
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s;
}

.passenger-controls button:hover {
    background: var(--primary-glow);
}

.passenger-controls button:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
}

.passenger-controls .p-count {
    width: 32px;
    text-align: center;
    font-weight: 800;
    font-size: .9rem;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    padding: 4px 0;
}

.split-fare-text {
    flex: 1;
    text-align: right;
    color: var(--primary);
    font-weight: 700;
    font-size: .85rem;
}

/* SHARE BUTTON */
.btn-share {
    background: linear-gradient(135deg, var(--accent), #5a4bd1);
    color: #fff;
    box-shadow: 0 4px 16px rgba(108, 92, 231, .25);
}

.btn-share:hover {
    transform: translateY(-1px);
}

/* STATS DASHBOARD */
.stats-dashboard {
    display: none;
    animation: slideUp .3s ease;
}

.stats-dashboard.show {
    display: block;
}

.stats-title {
    font-size: .85rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.stats-grid .mini-stat {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 8px;
    text-align: center;
}

.mini-stat .ms-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
}

.mini-stat .ms-label {
    font-size: .6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-top: 2px;
}

/* RESULTS CARD — extra rows */
.results-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.result-item-sm {
    background: var(--item-bg);
    border-radius: 8px;
    padding: 8px 6px;
    text-align: center;
}

.result-item-sm .result-label {
    font-size: .58rem;
}

.result-item-sm .result-value {
    font-size: .95rem;
}

/* ACCURACY CIRCLE OVERRIDE */
.accuracy-circle {
    fill: rgba(0, 212, 170, .08);
    stroke: rgba(0, 212, 170, .3);
    stroke-width: 1;
}

/* CLEAR HISTORY */
.clear-history-btn {
    font-size: .7rem;
    color: var(--danger);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    margin-left: 8px;
    opacity: .7;
}

.clear-history-btn:hover {
    opacity: 1;
    text-decoration: underline;
}

/* FARE GUIDE MODAL */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.modal-overlay.show {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.fare-modal {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 85vh;
    background: var(--bg);
    border-top: 1px solid var(--border);
    border-radius: 24px 24px 0 0;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1001;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}

.modal-overlay.show .fare-modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
}

.modal-subtext {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 4px;
}

.btn-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    overflow-y: auto;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
}

.modal-card.highlight {
    border-color: var(--primary-glow);
    box-shadow: 0 4px 20px var(--primary-glow);
}

.modal-card-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.fare-big-text {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.fare-big-text span {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
}

.fare-visual-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 12px;
}

.fare-visual-bar .base {
    background: var(--primary);
    flex: 4;
}

.fare-visual-bar .extra {
    background: var(--accent);
    flex: 6;
    opacity: 0.7;
}

.fare-visual-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.route-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.route-item:last-child {
    border-bottom: none;
}

.route-item .r-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}

.route-item .r-dist {
    font-size: 0.7rem;
    color: var(--text-dim);
}

.route-item .r-fare {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
}

.info-notes {
    font-size: 0.75rem;
    color: var(--text-dim);
    line-height: 1.5;
}

.info-notes li {
    margin-left: 16px;
    margin-bottom: 4px;
}

.tip-card {
    background: rgba(108, 92, 231, 0.1);
    border-left: 3px solid var(--accent);
    padding: 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text);
}

.btn-info {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* MAP SEARCH BAR */
.map-search-container {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 4px;

}

.map-search-box {
    display: flex;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    align-items: center;
    gap: 10px;

}

.map-search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
}

.map-search-input::placeholder {
    color: var(--text-dim);
}

.btn-search-clear {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 2px 6px;
    line-height: 1;
    display: none;
}

.btn-search-clear.show {
    display: block;
}

.search-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: none;
    flex-shrink: 0;
}

.search-spinner.show {
    display: block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.map-search-results {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    display: none;
    flex-direction: column;
}

.map-search-results.show {
    display: flex;
}

.search-result-item {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--text);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.search-result-name {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 2px;
}

.search-result-address {
    font-size: 0.7rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* LONG PRESS PROGRESS */
.longpress-ring {
    position: absolute;
    pointer-events: none;
    z-index: 999;
    width: 56px;
    height: 56px;
    margin-left: -28px;
    margin-top: -28px;
    display: none;
}

.longpress-ring.active {
    display: block;
}

.longpress-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.longpress-ring circle {
    fill: none;
    stroke-width: 3;
}

.longpress-ring .ring-bg {
    stroke: rgba(255, 255, 255, 0.15);
}

.longpress-ring .ring-fg {
    stroke: var(--primary);
    stroke-dasharray: 150.8;
    stroke-dashoffset: 150.8;
    stroke-linecap: round;
    transition: stroke-dashoffset 3s linear;
}

.longpress-ring.filling .ring-fg {
    stroke-dashoffset: 0;
}

/* LOCATE ME BUTTON */
.locate-btn {
    position: absolute;
    bottom: 35px;
    right: 16px;
    z-index: 1000;
    width: 44px;
    height: 44px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    color: var(--primary);
    font-size: 1.2rem;
    transition: all 0.2s;
}

.locate-btn:hover {
    background: var(--card);
    transform: scale(1.05);
}

.locate-btn.active-mode {
    background: var(--primary);
    color: #1a1a2e;
    border-color: var(--primary);
}

.mark-mode-hint {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 212, 170, 0.9);
    color: #1a1a2e;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: none;
    pointer-events: none;
}

.mark-mode-hint.show {
    display: block;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: translateX(-50%) scale(1);
    }

    50% {
        transform: translateX(-50%) scale(1.05);
    }

    100% {
        transform: translateX(-50%) scale(1);
    }
}

/* DESTINATION FARE CARD ON PANEL */
.dest-fare-card {
    background: var(--gradient-dest);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    display: none;
    animation: slideUp .3s ease;
}

.dest-fare-card.show {
    display: block;
}

.dest-fare-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.dest-fare-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    max-width: 75%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dest-fare-dismiss {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0 4px;
}

.dest-fare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.dest-fare-item {
    background: var(--item-bg);
    border-radius: 8px;
    padding: 8px 6px;
    text-align: center;
}

.dest-fare-item .dfl {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.dest-fare-item .dfv {
    font-size: 1.1rem;
    font-weight: 800;
    margin-top: 2px;
    color: var(--text);
}

.dest-fare-item .dfv.fare-color {
    color: var(--primary);
}

.dest-fare-breakdown {
    font-size: 0.68rem;
    color: var(--text-dim);
    text-align: center;
    margin-top: 8px;
}

/* ICON SPACING */
.sidebar-item-icon i,
.stat-label i,
.result-label i,
.dfl i,
.results-title i,
.option-toggle i,
.dest-fare-dismiss i,
.manual-title i,
.tip-card i,
.history-point-icon i,
.btn i {
    margin-right: 6px;
}

/* SIDEBAR NAVIGATION */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background: var(--surface);
    z-index: 3000;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.sidebar.show {
    right: 0;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card);
}

.sidebar-title {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--primary);
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.sidebar-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    flex: 1;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--item-bg);
    border-radius: 12px;
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.sidebar-item:active {
    transform: scale(0.98);
}

.sidebar-item-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.hamburger-btn {
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s;
}

.hamburger-btn:hover {
    background: rgba(128, 128, 128, 0.1);
}

/* COMMUNITY FARE STYLES */
.community-fare-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--border);
}

.community-data-card {
    background: rgba(0, 212, 170, 0.05);
    border: 1px solid rgba(0, 212, 170, 0.2);
    border-radius: 12px;
    padding: 12px;
    margin-top: 8px;
}

.community-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contributor-badge {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
}

.community-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

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

.stat-label {
    font-size: 0.7rem;
    color: var(--text-dim);
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
}

.community-footer {
    margin-top: 8px;
    font-size: 0.65rem;
    color: var(--text-dim);
    display: flex;
    justify-content: space-between;
}

/* SUBMISSION MODAL STYLES */
.fare-form-group {
    margin-bottom: 16px;
}

.fare-form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.fare-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.fare-currency-symbol {
    position: absolute;
    left: 12px;
    color: var(--text-dim);
    font-weight: 600;
}

.fare-input-wrapper input {
    width: 100%;
    padding: 12px 12px 12px 30px;
    background: var(--item-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 1rem;
    font-weight: 700;
}

.transport-select {
    width: 100%;
    padding: 12px;
    background: var(--item-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.95rem;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

/* EXPLORER STYLES */
.submission-item {
    background: var(--item-bg);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.submission-info {
    flex: 1;
}

.submission-fare {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
}

.submission-meta {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.rating-controls {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-left: 15px;
}

.rate-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.2s, transform 0.1s;
    padding: 4px;
}

.rate-btn:active {
    transform: scale(1.2);
}

.rate-btn.up:hover,
.rate-btn.up.active {
    color: var(--primary);
}

.rate-btn.down:hover,
.rate-btn.down.active {
    color: var(--danger);
}

.rating-score {
    font-size: 0.85rem;
    font-weight: 700;
}

/* MODERN SUBMIT FARE BUTTON */
.btn-submit-fare {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 24px 24px;
    background: linear-gradient(135deg, var(--primary), #00b894);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 212, 170, 0.35);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    letter-spacing: 0.3px;
}

.btn-submit-fare::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s;
}

.btn-submit-fare:hover::before {
    left: 100%;
}

.btn-submit-fare:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(0, 212, 170, 0.45);
}

.btn-submit-fare:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 4px 16px rgba(0, 212, 170, 0.3);
}

.btn-submit-fare:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-submit-fare-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 0.9rem;
}

/* VIEW ROUTE BUTTON (History) */
.btn-view-route {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
    padding: 10px 16px;
    background: rgba(108, 92, 231, 0.1);
    color: var(--accent, #6c5ce7);
    border: 1px solid rgba(108, 92, 231, 0.25);
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-view-route:hover {
    background: rgba(108, 92, 231, 0.2);
    border-color: rgba(108, 92, 231, 0.4);
}

.btn-view-route:active {
    transform: scale(0.97);
}

/* TOP FARE BADGE & HIGHLIGHT */
.top-fare-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #f0a500, #ff6b35);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 8px;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
    box-shadow: 0 2px 8px rgba(240, 165, 0, 0.3);
}

.top-fare-item {
    border-color: rgba(240, 165, 0, 0.35) !important;
    background: rgba(240, 165, 0, 0.06) !important;
}

/* PULSE HIGHLIGHT for Submit Fare button after ride completion */
@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.5);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 20px 6px rgba(108, 92, 231, 0.4);
        transform: scale(1.04);
    }
}

.pulse-highlight {
    animation: pulseGlow 0.8s ease-in-out infinite;
    border: 2px solid rgba(108, 92, 231, 0.6) !important;
}

/* COMMUNITY FARE — HYBRID DISPLAY */
.community-estimate-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(0, 168, 133, 0.08);
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid rgba(0, 168, 133, 0.15);
}

.ce-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-weight: 600;
}

.ce-label i {
    margin-right: 5px;
    color: var(--primary);
}

.ce-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
}

.community-crowd-header {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.community-crowd-header i {
    color: var(--accent);
}

.community-range-badge {
    display: inline-block;
    background: rgba(108, 92, 231, 0.12);
    color: var(--accent);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 8px;
    border: 1px solid rgba(108, 92, 231, 0.2);
}

.community-nearby-tag {
    margin-top: 8px;
    font-size: 0.7rem;
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    background: rgba(0, 212, 170, 0.06);
    border-radius: 8px;
    border: 1px dashed rgba(0, 212, 170, 0.2);
}

.community-nearby-tag i {
    font-size: 0.8rem;
}


/* VOTE STATUS */
.vote-status {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 3px;
    font-weight: 600;
}

.rate-btn.voted {
    opacity: 0.9;
}

.rate-btn.voted.up {
    color: var(--primary) !important;
}

.rate-btn.voted.down {
    color: var(--danger) !important;
}

.rate-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* COMMUNITY FILTERS */
.community-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.community-title-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.community-title-wrapper>span:first-child {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text);
}

.contributor-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(108, 92, 231, 0.12);
    color: var(--accent);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    border: 1px solid rgba(108, 92, 231, 0.2);
}

.community-filters-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.transport-filter-mini,
.sort-filter-mini {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(128, 128, 128, 0.08);
    padding: 3px 8px;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.transport-filter-mini:hover,
.sort-filter-mini:hover {
    border-color: var(--primary-glow);
    background: rgba(128, 128, 128, 0.12);
}

[data-theme="dark"] .transport-filter-mini,
[data-theme="dark"] .sort-filter-mini {
    background: rgba(0, 0, 0, 0.2);
}

.community-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

#communityLastUpdated {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* Time Badges */
.time-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    margin-left: 6px;
    vertical-align: middle;
}

.day-badge {
    background: rgba(243, 156, 18, 0.15);
    color: #f39c12;
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.night-badge {
    background: rgba(142, 68, 173, 0.15);
    color: #8e44ad;
    border: 1px solid rgba(142, 68, 173, 0.3);
}

/* CAB ROUTES & ADMIN PANEL */
.route-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.route-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.route-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.route-item.active {
    border-color: var(--accent);
    background: rgba(108, 92, 231, 0.1);
}

.route-icon {
    width: 40px;
    height: 40px;
    background: var(--accent);
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.route-details {
    flex: 1;
}

.route-name {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--text);
}

.route-meta {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 2px;
}

.commute-suggestion-card {
    background: linear-gradient(135deg, #2a1a35, #1a1535);
    border: 1px solid var(--accent);
    border-radius: 14px;
    padding: 15px;
    margin-top: 15px;
    animation: slideUp 0.4s ease;
}

.suggestion-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.suggestion-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text);
}

.suggestion-text strong {
    color: var(--primary);
}

/* ADMIN PANEL */
.admin-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    z-index: 3000;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: zoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: translate(-50%, -40%) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.admin-header {
    background: #2d3436;
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-title {
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-body {
    padding: 20px;
}

.admin-group {
    margin-bottom: 15px;
}

.admin-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-dim);
    margin-bottom: 5px;
    text-transform: uppercase;
}

.admin-group input {
    width: 100%;
    padding: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    outline: none;
}

.admin-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
}

.admin-btn.primary {
    background: var(--primary);
    color: #000;
    border: none;
}

.admin-btn.danger {
    background: rgba(255, 107, 107, 0.1);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.admin-btn.success {
    background: var(--accent);
    color: #fff;
    border: none;
}

.admin-btn:active {
    transform: scale(0.96);
}

.admin-btn i {
    font-size: 0.9rem;
}

#btnAdminRecord.recording {
    background: var(--danger);
    color: #fff;
    animation: pulse-red-admin 1.5s infinite;
}

@keyframes pulse-red-admin {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(255, 107, 107, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0);
    }
}