/* ==================== CSS Variables ==================== */

:root {
    /* Dark theme (default) */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-overlay: rgba(15, 23, 42, 0.9);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --border-color: #334155;
    --border-light: #475569;

    --accent-primary: #3b82f6;
    --accent-primary-hover: #2563eb;
    --accent-success: #22c55e;
    --accent-warning: #f97316;
    --accent-danger: #ef4444;
    --accent-info: #06b6d4;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4);

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;

    --header-height: 56px;
    --sidebar-width: 300px;
    --tab-height: 48px;
}

[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e2e8f0;
    --bg-overlay: rgba(248, 250, 252, 0.95);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --border-color: #e2e8f0;
    --border-light: #cbd5e1;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* ==================== Reset & Base ==================== */

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

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ==================== Modal ==================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}

.modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.modal-sm {
    max-width: 320px;
}

.modal-header {
    padding: 24px 24px 16px;
    text-align: center;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.modal-body {
    padding: 0 24px 24px;
}

.modal-hint {
    margin-top: 16px;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

.modal-hint code {
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 16px;
}

/* Loading Modal */
.loading-modal {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.loading-modal p {
    color: var(--text-secondary);
    margin-top: 16px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ==================== Forms ==================== */

.form-group {
    margin-bottom: 16px;
}

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

input[type="text"],
input[type="number"],
input[type="password"],
select {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

input::placeholder {
    color: var(--text-muted);
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    appearance: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--accent-danger);
    color: var(--accent-danger);
    padding: 12px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    margin-bottom: 16px;
}

/* ==================== Buttons ==================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    min-height: 48px;
    white-space: nowrap;
}

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

.btn-primary {
    background: var(--accent-primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-primary-hover);
}

.btn-danger {
    background: var(--accent-danger);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-tertiary);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
    min-height: 36px;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.btn-icon:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-icon svg {
    width: 24px;
    height: 24px;
}

/* ==================== App Layout ==================== */

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* ==================== Header ==================== */

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    padding: 0 12px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-center {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-title {
    font-size: 1.125rem;
    font-weight: 600;
    display: none;
}

@media (min-width: 640px) {
    .header-title {
        display: block;
    }
}

/* Status Badge */
.status-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-idle {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.status-scanning {
    background: rgba(34, 197, 94, 0.15);
    color: var(--accent-success);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Booking Badge */
.booking-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-info);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
}

/* ==================== Sidebar ==================== */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    pointer-events: none;
}

.sidebar-open {
    pointer-events: auto;
}

.sidebar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.sidebar-open .sidebar-overlay {
    opacity: 1;
}

.sidebar-content {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    max-width: 85vw;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-open .sidebar-content {
    transform: translateX(0);
}

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

.sidebar-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.sidebar-section {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

/* Radio & Checkbox Groups */
.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
    min-height: 44px;
}

.radio-label:hover,
.checkbox-label:hover {
    background: var(--border-light);
}

.radio-label input,
.checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
}

/* Position Controls */
.position-manual {
    margin-top: 12px;
}

.input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.input-row input {
    flex: 1;
    padding: 10px;
    font-size: 0.875rem;
}

.saved-locations {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.saved-locations select {
    flex: 1;
    padding: 10px;
    font-size: 0.875rem;
}

.position-display {
    margin-top: 12px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Scan Controls */
.hint {
    font-size: 0.75rem;
    color: var(--accent-success);
    margin: 8px 0 0 0;
    padding: 8px 12px;
    background: rgba(34, 197, 94, 0.1);
    border-radius: var(--radius-sm);
}

.scan-controls {
    margin-top: 16px;
}

.scan-controls .btn {
    width: 100%;
}

/* Filter Section */
.filter-group {
    margin-bottom: 16px;
}

.filter-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: block;
}

.model-list {
    max-height: 150px;
    overflow-y: auto;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent-primary);
}

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

/* ==================== Main Content ==================== */

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Tab Navigation - Mobile only */
.tab-nav {
    display: flex;
    height: var(--tab-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tab-btn:hover {
    color: var(--text-secondary);
    background: var(--bg-tertiary);
}

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

/* Tab Content - Mobile */
.tab-content {
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* Mobile tabs wrapper */
.mobile-tabs {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

/* Desktop Layout - Hidden on mobile */
.desktop-layout {
    display: none;
}

/* ==================== Tablet 2-Column Layout (768-1024px) ==================== */

@media (min-width: 768px) {
    /* Hide mobile tabs on tablet+ */
    .tab-nav {
        display: none;
    }

    .mobile-tabs {
        display: none;
    }

    /* Show desktop layout */
    .desktop-layout {
        display: grid;
        grid-template-columns: 55% 45%;
        grid-template-rows: 1fr;
        flex: 1;
        overflow: hidden;
    }

    /* Left column: Map + Vehicles */
    .column-left {
        display: grid;
        grid-template-rows: 55% 45%;
        overflow: hidden;
    }

    /* Right column: Booking + Logs */
    .column-right {
        display: grid;
        grid-template-rows: auto 1fr;
        overflow: hidden;
        border-left: 1px solid var(--border-color);
    }

    /* Section: Map */
    .section-map {
        position: relative;
        overflow: hidden;
    }

    .section-map #map,
    .section-map #map-desktop {
        width: 100%;
        height: 100%;
    }

    /* Section: Vehicles list */
    .section-vehicles {
        overflow-y: auto;
        padding: 12px;
        border-top: 1px solid var(--border-color);
        background: var(--bg-primary);
    }

    /* Section: Booking info */
    .section-booking {
        padding: 12px;
        border-bottom: 1px solid var(--border-color);
        background: var(--bg-secondary);
    }

    /* Section: Logs */
    .section-logs {
        display: flex;
        flex-direction: column;
        overflow: hidden;
        background: var(--bg-primary);
    }

    .section-logs .log-list {
        flex: 1;
        overflow-y: auto;
    }

    /* Smaller booking details on tablet */
    .booking-details .time-remaining {
        font-size: 28px;
    }

    /* Smaller vehicle grid on tablet */
    .vehicle-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== Desktop 2-Column Layout (1024px+) ==================== */

@media (min-width: 1024px) {
    /* Wider left column on desktop */
    .desktop-layout {
        grid-template-columns: 60% 40%;
    }

    /* More space for map on desktop */
    .column-left {
        grid-template-rows: 60% 40%;
    }

    /* More padding on desktop */
    .section-vehicles {
        padding: 16px;
    }

    .section-booking {
        padding: 16px;
    }

    /* Larger time display on desktop */
    .booking-details .time-remaining {
        font-size: 32px;
    }

    /* Multi-column vehicle grid on larger screens */
    .vehicle-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

/* ==================== Section Titles ==================== */

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title .vehicle-count {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

/* ==================== Booking Details Card (Desktop) ==================== */

.booking-details {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 16px;
}

.booking-details .booking-model {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.booking-details .booking-carno {
    font-size: 14px;
    color: var(--text-secondary);
}

.booking-details .badge-electric {
    font-size: 16px;
}

.booking-details .booking-time {
    margin-top: 12px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.booking-details .time-remaining {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent-info);
    font-variant-numeric: tabular-nums;
}

.booking-details .time-label {
    font-size: 14px;
    color: var(--text-muted);
}

.booking-details .booking-location {
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.booking-details .booking-distance {
    color: var(--accent-success);
    font-weight: 500;
}

.booking-actions {
    margin-top: 16px;
    display: flex;
    gap: 8px;
}

.booking-actions .btn-secondary {
    flex: 1;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 10px 16px;
    font-size: 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.booking-actions .btn-secondary:hover {
    background: var(--border-color);
}

.booking-actions .btn-danger {
    flex: 1;
    padding: 10px 16px;
    font-size: 14px;
    min-height: auto;
}

.booking-empty {
    color: var(--text-tertiary);
    text-align: center;
    padding: 24px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

/* ==================== Vehicle Grid (Desktop) ==================== */

.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.vehicle-grid .vehicle-card {
    margin: 0;
}

/* ==================== Logs Header (Desktop) ==================== */

.logs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.logs-header .btn-icon {
    width: 32px;
    height: 32px;
}

.logs-header .btn-icon svg {
    width: 18px;
    height: 18px;
}

/* ==================== Map ==================== */

.map-container {
    width: 100%;
    height: 100%;
}

.map-overlay {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 8px 16px;
    box-shadow: var(--shadow-md);
    z-index: 10;
}

.closest-vehicle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
}

.closest-label {
    color: var(--text-muted);
}

.closest-model {
    font-weight: 500;
}

.closest-distance {
    color: var(--accent-success);
    font-weight: 600;
}

/* Booking Info Panel */
.booking-panel {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    z-index: 500;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    min-width: 180px;
}

.booking-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.booking-panel:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.booking-panel-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.booking-model {
    font-weight: 600;
    color: var(--text-primary);
}

.booking-carno {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.booking-electric {
    color: #22c55e;
    font-size: 1.1em;
}

.booking-time {
    color: var(--accent-info);
    font-size: 1.1em;
    font-weight: 500;
    margin-top: 4px;
}

.booking-distance {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-top: 2px;
}

.booking-label {
    font-size: 0.8em;
    opacity: 0.7;
}

/* Leaflet Popup Customization */
.leaflet-popup-content-wrapper {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.leaflet-popup-tip {
    background: var(--bg-secondary);
}

.leaflet-popup-content {
    margin: 0;
}

.popup-content {
    padding: 12px;
    min-width: 180px;
}

.popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.popup-header strong {
    font-size: 1rem;
}

.popup-details {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.popup-details .label {
    color: var(--text-muted);
}

.popup-btn {
    width: 100%;
    padding: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.popup-btn:hover {
    background: var(--accent-primary-hover);
}

.popup-btn-cancel {
    background: var(--accent-danger);
}

.popup-btn-cancel:hover {
    background: #dc2626;
}

/* Marker Icons */
.marker-icon svg {
    width: 100%;
    height: 100%;
}

/* Pulse animation for reserved vehicle */
.pulse-marker {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.8));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(6, 182, 212, 1));
    }
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: var(--radius-full);
}

.badge-reserved {
    background: rgba(6, 182, 212, 0.2);
    color: var(--accent-info);
}

.badge-blacklisted {
    background: rgba(249, 115, 22, 0.2);
    color: var(--accent-warning);
}

/* ==================== Vehicle List ==================== */

.vehicle-list {
    height: 100%;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vehicle-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: border-color var(--transition-fast);
}

.vehicle-card:hover {
    border-color: var(--border-light);
}

.vehicle-reserved {
    border-color: var(--accent-info);
    background: rgba(6, 182, 212, 0.05);
}

.vehicle-blacklisted {
    opacity: 0.6;
    border-color: var(--accent-warning);
}

.vehicle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.vehicle-model {
    font-weight: 600;
    font-size: 1rem;
}

.vehicle-distance {
    color: var(--accent-success);
    font-weight: 500;
    font-size: 0.875rem;
}

.vehicle-details {
    display: flex;
    gap: 16px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.vehicle-actions {
    display: flex;
    gap: 8px;
}

.blacklist-info {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.blacklist-timer {
    font-family: monospace;
    color: var(--accent-warning);
    font-weight: 500;
}

/* ==================== Activity Log ==================== */

.log-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.log-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
}

.log-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.log-entry {
    display: flex;
    gap: 12px;
    padding: 8px 12px;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-color);
}

.log-time {
    color: var(--text-muted);
    font-family: monospace;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.log-message {
    flex: 1;
}

.log-success .log-message {
    color: var(--accent-success);
}

.log-error .log-message {
    color: var(--accent-danger);
}

.log-warning .log-message {
    color: var(--accent-warning);
}

.log-info .log-message {
    color: var(--text-secondary);
}

/* ==================== Empty State ==================== */

.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-muted);
    text-align: center;
}

/* ==================== Position Preview ==================== */

.position-preview {
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

/* ==================== Responsive ==================== */

@media (min-width: 768px) {
    .sidebar {
        position: relative;
        pointer-events: auto;
    }

    .sidebar-overlay {
        display: none;
    }

    .sidebar-content {
        position: relative;
        transform: translateX(0);
        width: var(--sidebar-width);
        max-width: none;
        flex-shrink: 0;
    }

    .btn-close {
        display: none;
    }

    .app-container {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .header {
        width: 100%;
    }

    .sidebar {
        width: var(--sidebar-width);
        height: calc(100vh - var(--header-height));
    }

    .main-content {
        width: calc(100% - var(--sidebar-width));
        height: calc(100vh - var(--header-height));
    }

    .header-left .btn-icon:first-child {
        display: none;
    }
}

@media (min-width: 1024px) {
    :root {
        --sidebar-width: 320px;
    }
}

/* ==================== Scrollbar ==================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ==================== Animations ==================== */

[x-cloak] {
    display: none !important;
}

[x-transition] {
    transition: opacity var(--transition-normal), transform var(--transition-normal);
}
