/* ============================================================
   AIS Route Viewer - Tema Náutico Dark Mode
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ============================================================
   DESIGN TOKENS
   ============================================================ */

:root {
    /* Colores base */
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.85);
    --bg-card-hover: rgba(30, 41, 59, 0.9);
    --bg-glass: rgba(15, 23, 42, 0.75);

    /* Bordes */
    --border-color: rgba(56, 189, 248, 0.15);
    --border-color-active: rgba(56, 189, 248, 0.4);

    /* Texto */
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #b2c3da;
    --text-bright: #f8fafc;

    /* Acentos */
    --accent-cyan: #22d3ee;
    --accent-blue: #38bdf8;
    --accent-indigo: #818cf8;
    --accent-green: #34d399;
    --accent-orange: #fb923c;
    --accent-red: #f87171;
    --accent-yellow: #fbbf24;

    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #0ea5e9, #06b6d4);
    --gradient-accent: linear-gradient(135deg, #22d3ee, #818cf8);
    --gradient-warm: linear-gradient(135deg, #fb923c, #f87171);

    /* Sombras */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px rgba(34, 211, 238, 0.15);

    /* Espaciado */
    --sidebar-width: 320px;
    --timeline-height: 100px;
    --border-radius: 12px;
    --border-radius-sm: 8px;

    /* Transiciones */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   RESET & BASE
   ============================================================ */

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

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

/* ============================================================
   LAYOUT PRINCIPAL
   ============================================================ */

.app-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    grid-template-rows: 1fr var(--timeline-height);
    grid-template-areas:
        "sidebar map"
        "timeline timeline";
    height: 100vh;
    width: 100vw;
}

/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar {
    grid-area: sidebar;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(14, 165, 233, 0.08) 0%, transparent 100%);
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.sidebar-header .logo-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-sm);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--shadow-glow);
}

.sidebar-header h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-bright);
    letter-spacing: -0.02em;
}

.sidebar-header .subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

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

.sidebar-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

/* ============================================================
   SECCIONES DEL SIDEBAR
   ============================================================ */

.section {
    margin-bottom: 20px;
}

.section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-cyan);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-title i {
    font-size: 12px;
}

/* Cards de estadísticas */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

/* ============================================================
   FOLDER LOADER / DROP ZONE
   ============================================================ */

.folder-input-group {
    margin-bottom: 12px;
}

.input-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
    display: block;
}

.folder-path-input {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 8px 10px;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    outline: none;
    transition: border-color var(--transition-fast);
    width: 100%;
    min-width: 0;
}

.folder-path-input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.15);
}

.folder-path-input::placeholder {
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 11px;
}

.btn-icon {
    width: 36px;
    min-width: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.current-folder {
    font-size: 11px;
    color: var(--accent-green);
    margin-top: 4px;
    word-break: break-all;
    min-height: 16px;
}

/* Drop zone */
.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.drop-zone:hover {
    border-color: var(--accent-cyan);
    background: rgba(34, 211, 238, 0.04);
}

.drop-zone.drag-over {
    border-color: var(--accent-cyan);
    background: rgba(34, 211, 238, 0.1);
    box-shadow: inset 0 0 20px rgba(34, 211, 238, 0.1);
    transform: scale(1.02);
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.drop-zone-icon {
    font-size: 24px;
    color: var(--accent-blue);
    margin-bottom: 4px;
    transition: transform var(--transition-normal);
}

.drop-zone:hover .drop-zone-icon {
    transform: translateY(-2px);
}

.drop-zone.drag-over .drop-zone-icon {
    color: var(--accent-cyan);
    transform: translateY(-4px) scale(1.1);
}

.drop-zone-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.drop-zone-sub {
    font-size: 11px;
    color: var(--text-muted);
}

/* Progress bar */
.drop-zone-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(56, 189, 248, 0.15);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Btn badge */
.btn-badge {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(34, 211, 238, 0.15);
    color: var(--accent-cyan);
    margin-left: auto;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 12px;
    transition: all var(--transition-normal);
}

.stat-card:hover {
    border-color: var(--border-color-active);
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

.stat-card .stat-label {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stat-card .stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-bright);
    font-family: 'JetBrains Mono', monospace;
}

.stat-card .stat-unit {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-left: 2px;
}

.stat-card.accent-cyan .stat-value {
    color: var(--accent-cyan);
}

.stat-card.accent-green .stat-value {
    color: var(--accent-green);
}

.stat-card.accent-orange .stat-value {
    color: var(--accent-orange);
}

.stat-card.accent-indigo .stat-value {
    color: var(--accent-indigo);
}

.stat-card.accent-yellow .stat-value {
    color: var(--accent-yellow);
}

/* Lista de archivos */
/* Lista de sesiones de navegación */
.sessions-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.session-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.session-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent-cyan);
    opacity: 0.5;
    transition: opacity var(--transition-fast);
}

.session-item:hover {
    border-color: var(--border-color-active);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-glow);
}

.session-item:hover::before {
    opacity: 1;
}

.session-item.active {
    border-color: var(--accent-cyan);
    background: rgba(34, 211, 238, 0.08);
}

.session-item.active::before {
    opacity: 1;
}

.session-day {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-bright);
}

.session-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
}

.session-duration {
    font-weight: 600;
    color: var(--accent-cyan);
    font-family: 'JetBrains Mono', monospace;
}

.session-times {
    color: var(--text-muted);
}

.session-points {
    margin-left: auto;
    font-size: 10px;
    color: var(--text-muted);
}

/* Lista de archivos */
.files-list {
    list-style: none;
    max-height: 240px;
    overflow-y: auto;
}

.files-list::-webkit-scrollbar {
    width: 4px;
}

.files-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    transition: background var(--transition-fast);
    cursor: default;
    font-size: 13px;
}

.file-item:hover {
    background: rgba(56, 189, 248, 0.08);
}

.file-item .file-icon {
    color: var(--accent-blue);
    font-size: 14px;
    flex-shrink: 0;
}

.file-item .file-name {
    flex: 1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-secondary);
}

.file-item .file-size {
    font-size: 11px;
    color: var(--text-muted);
}

/* Info extra */
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.06);
}

.info-row:last-child {
    border-bottom: none;
}

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

.info-row .value {
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
}

/* Botones de acción */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-family: 'Inter', sans-serif;
    text-decoration: none;
}

.btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color-active);
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-weight: 600;
}

.btn-primary:hover {
    opacity: 0.9;
    box-shadow: 0 0 24px rgba(14, 165, 233, 0.3);
}

.btn i {
    font-size: 14px;
}

/* ============================================================
   MAPA
   ============================================================ */

.map-container {
    grid-area: map;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Controles del mapa customizados */
.map-controls {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.map-control-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-sm);
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 16px;
}

.map-control-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-cyan);
    box-shadow: var(--shadow-glow);
}

.map-control-btn.active {
    background: rgba(34, 211, 238, 0.2);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

/* Loading overlay */
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 14, 26, 0.92);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity var(--transition-slow);
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(56, 189, 248, 0.2);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

.loading-text {
    font-size: 14px;
    color: var(--text-secondary);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Point info popup sobre el mapa */
.point-info-card {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 16px;
    min-width: 240px;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
    display: none;
}

.point-info-card.visible {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

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

.point-info-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.point-info-card .card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-cyan);
}

.point-info-card .card-close {
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 14px;
}

.point-info-card .card-close:hover {
    background: rgba(248, 113, 113, 0.2);
    color: var(--accent-red);
}

.point-info-card .info-row {
    padding: 4px 0;
}

/* ============================================================
   TIMELINE
   ============================================================ */

.timeline-panel {
    grid-area: timeline;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    z-index: 1000;
}

/* Controles de reproducción */
.playback-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.playback-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 14px;
}

.playback-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: var(--shadow-glow);
}

.playback-btn.play-btn {
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-size: 16px;
}

.playback-btn.play-btn:hover {
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.4);
    transform: scale(1.05);
}

.playback-btn.play-btn:active {
    transform: scale(0.98);
}

/* Slider del timeline */
.timeline-slider-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.timeline-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(56, 189, 248, 0.15);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    transition: height var(--transition-fast);
}

.timeline-slider:hover {
    height: 8px;
}

.timeline-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-cyan);
    border: 2px solid var(--bg-primary);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.5);
    transition: all var(--transition-fast);
}

.timeline-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 16px rgba(34, 211, 238, 0.7);
}

.timeline-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-cyan);
    border: 2px solid var(--bg-primary);
    cursor: pointer;
}

.timeline-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timeline-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
}

.timeline-time.current {
    color: var(--accent-cyan);
    font-weight: 600;
    font-size: 12px;
}

/* Velocidad de reproducción */
/* Datos en vivo del punto actual */
.live-data {
    display: flex;
    justify-content: center;
    gap: 24px;
    align-items: center;
    margin-top: 2px;
}

.live-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-secondary);
    white-space: nowrap;
}

.live-item i {
    font-size: 11px;
    color: var(--accent-cyan);
    opacity: 0.7;
}

.speed-control {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.speed-label {
    font-size: 11px;
    color: var(--text-muted);
}

.speed-select {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 4px 8px;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    outline: none;
    transition: border-color var(--transition-fast);
}

.speed-select:hover,
.speed-select:focus {
    border-color: var(--accent-cyan);
}

.speed-select option {
    background: var(--bg-secondary);
}

/* Contador de punto actual */
.point-counter {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
    min-width: 80px;
    text-align: right;
}

/* ============================================================
   LEAFLET OVERRIDES
   ============================================================ */

.leaflet-container {
    background: var(--bg-primary) !important;
    font-family: 'Inter', sans-serif !important;
}

.leaflet-popup-content-wrapper {
    background: var(--bg-glass) !important;
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius-sm) !important;
    color: var(--text-primary) !important;
    box-shadow: var(--shadow-lg) !important;
}

.leaflet-popup-content {
    margin: 12px 16px !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
}

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

.leaflet-popup-close-button {
    color: var(--text-muted) !important;
}

.leaflet-popup-close-button:hover {
    color: var(--accent-red) !important;
}

.leaflet-control-zoom {
    border: none !important;
    box-shadow: var(--shadow-md) !important;
}

.leaflet-control-zoom a {
    background: var(--bg-glass) !important;
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 16px !important;
}

.leaflet-control-zoom a:hover {
    background: var(--bg-card-hover) !important;
    border-color: var(--accent-cyan) !important;
}

.leaflet-control-layers {
    background: var(--bg-glass) !important;
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius-sm) !important;
    box-shadow: var(--shadow-md) !important;
    color: var(--text-primary) !important;
}

.leaflet-control-layers-toggle {
    width: 36px !important;
    height: 36px !important;
}

/* Popup personalizado para puntos */
.popup-content {
    min-width: 180px;
}

.popup-content .popup-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-cyan);
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
}

.popup-content .popup-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    font-size: 12px;
}

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

.popup-content .popup-value {
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
}

/* ============================================================
   BARCO ANIMADO
   ============================================================ */

.boat-marker {
    transition: transform 0.3s linear;
}

.boat-icon {
    font-size: 28px;
    filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.6));
    transition: transform 0.3s linear;
}

/* ============================================================
   FILTRO DE RANGO
   ============================================================ */

.time-range-filter {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.time-range-filter div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.time-range-filter input[type="datetime-local"] {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 6px 8px;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color var(--transition-fast);
    width: 100%;
}

.time-range-filter input[type="datetime-local"]:focus {
    border-color: var(--accent-cyan);
}

.time-range-filter label {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ============================================================
   STATUS BAR
   ============================================================ */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.status-badge.loading {
    background: rgba(251, 191, 36, 0.15);
    color: var(--accent-yellow);
}

.status-badge.ready {
    background: rgba(52, 211, 153, 0.15);
    color: var(--accent-green);
}

.status-badge.error {
    background: rgba(248, 113, 113, 0.15);
    color: var(--accent-red);
}

.status-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
    .app-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr 80px;
        grid-template-areas:
            "sidebar"
            "map"
            "timeline";
    }

    .sidebar {
        max-height: 200px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    :root {
        --timeline-height: 80px;
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .files-list {
        max-height: 80px;
    }
}