:root {
    --sidebar-width: 240px;
    --sidebar-bg: #1f2a37;
    --sidebar-active: #2f80ed;
}

body {
    background: #f4f6f8;
}

.login-body {
    background: linear-gradient(160deg, #eef3f8 0%, #d9e4f0 100%);
}

.login-card {
    border-radius: 1rem;
}

#admin-wrapper {
    min-height: 100vh;
}

.admin-sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg);
}

.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    border-radius: 0.5rem;
    padding: 0.65rem 0.85rem;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: var(--sidebar-active);
    color: #fff;
}

.admin-content {
    min-width: 0;
}

.live-map {
    height: 640px;
    width: 100%;
    border-radius: 0.5rem;
}

.station-geofence-map {
    height: 380px;
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    z-index: 0;
}

.map-status-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1.25rem;
    padding: 0.6rem 0.9rem;
    font-size: 0.8rem;
    color: #64748b;
    border-top: 1px solid #e2e8f0;
}

.map-status-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #334155;
    font-weight: 600;
}

.status-dot {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.status-dot.status-offline {
    background: #94a3b8;
}

.status-dot.status-available {
    background: #22c55e;
}

.status-dot.status-busy {
    background: #ef4444;
}

.status-dot.status-break {
    background: #f59e0b;
}

.taxi-list-item {
    cursor: pointer;
}

.taxi-list-item:hover {
    background: #f8fafc;
}

.taxi-list-item-selected {
    background: #eff6ff;
    border-left: 3px solid #2563eb;
}

.taxi-marker-wrap,
.leaflet-div-icon.taxi-marker-wrap {
    background: transparent !important;
    border: none !important;
}

.taxi-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.taxi-marker-pin {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.35);
    background: #94a3b8;
}

.taxi-marker-icon {
    width: 40px;
    height: 40px;
    display: block;
    filter: drop-shadow(0 1px 3px rgba(15, 23, 42, 0.4));
}

.taxi-marker.is-offline {
    opacity: 0.75;
}

.taxi-marker.is-online .taxi-marker-icon {
    filter: drop-shadow(0 0 0 2px rgba(34, 197, 94, 0.25)) drop-shadow(0 1px 3px rgba(15, 23, 42, 0.4));
}

.taxi-marker.status-available .taxi-marker-pin {
    background: #16a34a !important;
}

.taxi-marker.status-busy .taxi-marker-pin {
    background: #ef4444 !important;
}

.taxi-marker.status-break .taxi-marker-pin {
    background: #f59e0b !important;
}

.taxi-marker.status-offline .taxi-marker-pin {
    background: #94a3b8 !important;
}

.taxi-marker.is-online .taxi-marker-pin {
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.35), 0 1px 4px rgba(15, 23, 42, 0.35);
}

.route-endpoint-wrap,
.leaflet-div-icon.route-endpoint-wrap {
    background: transparent !important;
    border: none !important;
}

.route-endpoint {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

.route-endpoint.is-start {
    background: #16a34a;
}

.route-endpoint.is-end {
    background: #ef4444;
}

.taxi-marker-plate {
    max-width: 110px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.88);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
}

.live-tracking-toolbar .form-label {
    margin-bottom: 0.35rem;
    font-size: 0.875rem;
    color: #64748b;
}

.live-tracking-toolbar .form-select,
.live-tracking-toolbar .form-control {
    min-height: 38px;
}

.live-tracking-toolbar .badge {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 600;
}

@media (max-width: 992px) {
    #admin-wrapper {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        min-height: auto;
    }

    .live-map {
        height: 420px;
    }
}
