/* --- CSS Variables & Design System --- */
:root {
    /* Theme-Independent State Variables */
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --glass-blur: blur(16px);
    
    --color-brand: #3b82f6;
    --color-brand-glow: rgba(59, 130, 246, 0.4);
    
    --color-empty: #10b981;
    --color-empty-glow: rgba(16, 185, 129, 0.4);
    
    --color-busy: #f97316;
    --color-busy-glow: rgba(249, 115, 22, 0.4);
    
    --color-offline: #6b7280;
    --color-offline-glow: rgba(107, 114, 128, 0.4);

    /* --- DEFAULT DARK THEME VARIABLES --- */
    --bg-dark: #0a0b10;
    --bg-card: rgba(18, 20, 30, 0.65);
    --border-card: rgba(255, 255, 255, 0.08);
    --border-card-focus: rgba(255, 255, 255, 0.18);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --popup-bg: rgba(18, 20, 32, 0.95);
    --map-hint-bg: rgba(18, 20, 30, 0.8);
    
    /* Dynamic Car Colors (White in Dark mode, Black in Light mode) */
    --car-color: #ffffff;
    --car-stroke: #0f172a;
    --car-pulse: rgba(255, 255, 255, 0.15);
}

/* --- PREMIUM LIGHT THEME OVERRIDES --- */
[data-theme="light"] {
    --bg-dark: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.85);
    --border-card: rgba(15, 23, 42, 0.08);
    --border-card-focus: rgba(15, 23, 42, 0.18);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --popup-bg: rgba(255, 255, 255, 0.96);
    --map-hint-bg: rgba(255, 255, 255, 0.9);
    
    /* Dynamic Car Colors (Black in Light mode) */
    --car-color: #1e293b;
    --car-stroke: #ffffff;
    --car-pulse: rgba(15, 23, 42, 0.15);
}

/* --- Base Resets & Page Layout --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    width: 100%;
    height: 100%;
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow: hidden;
}

/* --- Leaflet Map Customization --- */
#map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-color: var(--bg-dark);
}

/* Leaflet dark custom zoom buttons */
.leaflet-control-zoom {
    border: 1px solid var(--border-card) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
    border-radius: 8px !important;
    overflow: hidden;
}

.leaflet-control-zoom a {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-card) !important;
    transition: all 0.2s ease;
}

.leaflet-control-zoom a:hover {
    background-color: var(--color-brand) !important;
    color: #fff !important;
}

.leaflet-bar {
    border: none !important;
}

/* --- Map Popup Styles --- */
.leaflet-popup-content-wrapper {
    background: var(--popup-bg) !important;
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-card) !important;
    border-radius: 12px !important;
    color: var(--text-primary) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    font-family: var(--font-sans) !important;
}

.leaflet-popup-tip {
    background: var(--popup-bg) !important;
    border: 1px solid var(--border-card) !important;
}

.popup-driver-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.popup-driver-card p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 2px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.popup-status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 8px;
}

.popup-status-badge.empty {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--color-empty);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.popup-status-badge.busy {
    background-color: rgba(249, 115, 22, 0.15);
    color: var(--color-busy);
    border: 1px solid rgba(249, 115, 22, 0.3);
}

/* Custom POI Popup style */
.popup-poi-card h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.popup-poi-card p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.4;
}

.popup-poi-card .btn-delete-poi {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
}

.popup-poi-card .btn-delete-poi:hover {
    background: #ef4444;
    color: #fff;
}

/* --- Dashboard Overlays Layout --- */
.dashboard-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Let clicks pass through to map */
    z-index: 10;
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 20px;
}

.dashboard-overlay > * {
    pointer-events: auto; /* Enable pointer events on active widgets */
}

/* --- Stats Header Styles --- */
.stats-header {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    animation: slideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    gap: 20px;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Premium Theme Toggle Switch Button */
.theme-toggle-btn {
    background: var(--border-card);
    border: 1px solid var(--border-card-focus);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.theme-toggle-btn:hover {
    background: var(--border-card-focus);
    transform: scale(1.08) rotate(15deg);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.theme-toggle-btn .sun-icon {
    display: block;
    width: 18px;
    height: 18px;
    color: #eab308; /* vibrant sun yellow */
}

.theme-toggle-btn .moon-icon {
    display: none;
    width: 18px;
    height: 18px;
    color: #a855f7; /* vibrant moon purple */
}

[data-theme="light"] .theme-toggle-btn .sun-icon {
    display: none;
}

[data-theme="light"] .theme-toggle-btn .moon-icon {
    display: block;
}

/* Light Theme Input Overrides */
[data-theme="light"] .search-box input {
    background-color: rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .coords-display {
    background: rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .input-group input, 
[data-theme="light"] .input-group textarea {
    background: rgba(15, 23, 42, 0.04);
}

.logo-circle {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-brand) 0%, #1e40af 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px var(--color-brand-glow);
}

.logo-icon {
    width: 22px;
    height: 22px;
    color: white;
    transform: rotate(45deg);
}

.brand-title h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1.5px;
    background: linear-gradient(to right, var(--text-primary), var(--color-brand));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-empty);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--color-empty);
}

.status-dot.pulsing {
    animation: pulse 1.5s infinite;
}

.status-text {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--color-empty);
}

/* Stats Cards Grid */
.stats-grid {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 150px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--border-card-focus);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.06);
}

.stat-icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon-wrapper i {
    width: 18px;
    height: 18px;
}

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

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-val {
    font-size: 18px;
    font-weight: 700;
}

/* Color thematic statistics cards */
.stat-card.total .stat-icon-wrapper {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--color-brand);
    border: 1px solid rgba(59, 130, 246, 0.2);
}
.stat-card.total {
    border-left: 3px solid var(--color-brand);
}

.stat-card.empty .stat-icon-wrapper {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--color-empty);
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.stat-card.empty {
    border-left: 3px solid var(--color-empty);
}

.stat-card.busy .stat-icon-wrapper {
    background-color: rgba(249, 115, 22, 0.1);
    color: var(--color-busy);
    border: 1px solid rgba(249, 115, 22, 0.2);
}
.stat-card.busy {
    border-left: 3px solid var(--color-busy);
}

.stat-card.offline .stat-icon-wrapper {
    background-color: rgba(107, 114, 128, 0.1);
    color: var(--color-offline);
    border: 1px solid rgba(107, 114, 128, 0.2);
}
.stat-card.offline {
    border-left: 3px solid var(--color-offline);
}

/* --- Left Sidebar Layout --- */
.sidebar {
    width: 360px;
    flex: 1;
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: slideRight 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: calc(100vh - 150px);
}

/* Search Box Container */
.search-box {
    padding: 16px;
    border-bottom: 1px solid var(--border-card);
    display: flex;
    align-items: center;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 28px;
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
}

.search-box input {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-card);
    border-radius: 10px;
    padding: 12px 16px 12px 42px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--color-brand);
    box-shadow: 0 0 0 3px var(--color-brand-glow);
}

.clear-btn {
    position: absolute;
    right: 28px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-btn:hover {
    color: var(--text-primary);
}

/* Tabs switcher */
.sidebar-tabs {
    display: flex;
    padding: 4px 16px;
    gap: 8px;
    border-bottom: 1px solid var(--border-card);
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 13px;
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--color-brand);
    border-bottom-color: var(--color-brand);
}

.tab-btn i {
    width: 16px;
    height: 16px;
}

/* Tab Panel Switch Content */
.tab-content {
    flex: 1;
    overflow-y: auto;
    display: none;
}

.tab-content.active {
    display: block;
}

/* Custom Webkit scrollbar for premium dark panel */
.tab-content::-webkit-scrollbar {
    width: 6px;
}

.tab-content::-webkit-scrollbar-track {
    background: transparent;
}

.tab-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

.tab-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Loading, empty state layout */
.loading-state, .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
    gap: 12px;
}

.loading-state p, .empty-state p {
    font-size: 13px;
}

.empty-state i {
    width: 36px;
    height: 36px;
    color: var(--text-muted);
}

.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-top: 3px solid var(--color-brand);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* --- Driver Item Styles --- */
.driver-list {
    display: flex;
    flex-direction: column;
    padding: 8px;
    gap: 4px;
}

.driver-item {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
}

.driver-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-card);
    transform: translateX(4px);
}

.driver-item.active-focus {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
}

.driver-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.driver-avatar {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid var(--border-card);
}

.driver-avatar i {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
}

/* Avatar indicator ring matching active status */
.driver-avatar::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #12141e;
}

.driver-item.status-empty .driver-avatar::after {
    background-color: var(--color-empty);
    box-shadow: 0 0 6px var(--color-empty-glow);
}

.driver-item.status-busy .driver-avatar::after {
    background-color: var(--color-busy);
    box-shadow: 0 0 6px var(--color-busy-glow);
}

.driver-item.status-offline .driver-avatar::after {
    background-color: var(--color-offline);
}

.driver-meta {
    display: flex;
    flex-direction: column;
}

.driver-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.driver-car-meta {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 1px;
}

.driver-item-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.status-label-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    text-transform: uppercase;
}

.status-empty .status-label-badge {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-empty);
}

.status-busy .status-label-badge {
    background: rgba(249, 115, 22, 0.1);
    color: var(--color-busy);
}

.status-offline .status-label-badge {
    background: rgba(107, 114, 128, 0.1);
    color: var(--text-secondary);
}

.driver-balance {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
}

.driver-balance.positive {
    color: #10b981;
}

.driver-balance.negative {
    color: #ef4444;
}

/* --- Yangi Manzillar (POIs) tab styling --- */
.poi-header-actions {
    padding: 16px;
    border-bottom: 1px solid var(--border-card);
}

.poi-tip {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
}

.poi-list {
    display: flex;
    flex-direction: column;
    padding: 8px;
    gap: 4px;
}

.poi-item {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
}

.poi-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-card);
}

.poi-item-content {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
}

.poi-icon-pin {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    color: var(--color-brand);
}

.poi-details {
    display: flex;
    flex-direction: column;
}

.poi-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.poi-desc {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 1px;
}

.poi-coords {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

.btn-delete-poi-list {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-delete-poi-list:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.btn-delete-poi-list i {
    width: 14px;
    height: 14px;
}

/* --- Floating Instructions Hint --- */
.map-hint {
    position: absolute;
    bottom: 24px;
    right: 24px;
    background: var(--map-hint-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-card);
    padding: 10px 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 10;
    pointer-events: none;
    animation: fadeIn 0.8s ease;
}

.map-hint i {
    width: 14px;
    height: 14px;
    color: var(--color-brand);
}

/* --- Glassmorphic Modal Dialog --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: var(--popup-bg);
    border: 1px solid var(--border-card-focus);
    border-radius: 16px;
    width: 440px;
    max-width: 90%;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-header {
    background: rgba(255, 255, 255, 0.02);
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-card);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-header h3 i {
    width: 18px;
    height: 18px;
    color: var(--color-brand);
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.coords-display {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-card);
    padding: 8px 12px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 12px;
    color: var(--text-secondary);
}

.coord-label {
    color: var(--text-muted);
    font-weight: 600;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.input-group input, .input-group textarea {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13px;
    transition: all 0.2s ease;
}

.input-group input:focus, .input-group textarea:focus {
    outline: none;
    border-color: var(--color-brand);
}

.modal-footer {
    background: rgba(255, 255, 255, 0.02);
    padding: 16px 20px;
    border-top: 1px solid var(--border-card);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Button Classes */
.btn {
    padding: 10px 18px;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-card);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-primary {
    background: var(--color-brand);
    color: #fff;
    box-shadow: 0 4px 12px var(--color-brand-glow);
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

/* --- Custom Leaflet Neon Marker Animation --- */
/* --- Custom Leaflet Neon Marker Sizing --- */
.driver-marker-icon {
    transition: transform 0.2s linear !important; /* Smooth car moving/rotation transition */
}

/* POI Pin styles: Keeps the gorgeous blue teardrop pointer shape */
.poi-marker-icon .marker-pin-wrapper {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50% 50% 50% 0;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 2.5px solid #3b82f6;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.poi-marker-icon .marker-pin-wrapper::after {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    z-index: 1;
    pointer-events: none;
}

.poi-marker-icon .marker-pin-icon {
    width: 18px;
    height: 18px;
    color: #3b82f6 !important;
    transform: rotate(45deg); /* Counter-rotate back upright */
    z-index: 2;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Driver top-down vehicle style: Exactly like Uber or Yandex Taxi */
.driver-marker-icon .marker-pin-wrapper {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    box-shadow: none;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.driver-marker-icon .car-top-down-svg {
    width: 36px;
    height: 36px;
    transition: all 0.2s ease;
}

/* Soft pulsing circle behind the top-down car to represent active status dynamically */
.driver-marker-icon .marker-pin-wrapper.empty::before,
.driver-marker-icon .marker-pin-wrapper.busy::before {
    content: '';
    position: absolute;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0;
    animation: carPulse 2.4s infinite ease-out;
    pointer-events: none;
    z-index: -1;
}

.driver-marker-icon .marker-pin-wrapper.empty::before {
    color: rgba(251, 191, 36, 0.2); /* Soft Yellow empty pulsing ring */
}

.driver-marker-icon .marker-pin-wrapper.busy::before {
    color: rgba(239, 68, 68, 0.2); /* Soft Red busy pulsing ring */
}

@keyframes carPulse {
    0% {
        transform: scale(0.6);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* --- CSS Animations --- */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.5; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    50% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); opacity: 0.5; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes slideDown {
    from { transform: translateY(-40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideRight {
    from { transform: translateX(-40px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- Responsive Adjustments --- */
@media(max-width: 900px) {
    .stats-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .stats-grid {
        justify-content: space-between;
    }
    
    .stat-card {
        flex: 1;
        min-width: 120px;
    }
    
    .sidebar {
        width: 100%;
        max-height: 350px;
    }
}
