:root {
    --font-inter: 'Inter', system-ui, -apple-system, sans-serif;
    --bg-slate-50: #f8fafc;
    --bg-slate-100: #f1f5f9;
    --text-slate-900: #0f172a;
    --text-slate-600: #475569;
    --text-slate-400: #94a3b8;
    --metro-red: #ef4444;
    --metro-green: #22c55e;
    --metro-purple: #a855f7;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.01);
    --premium-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.8);
}

/* Premium Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; border: 2px solid #f1f5f9; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Sticky Summary Grid */
.summary-grid.sticky {
    position: sticky;
    top: 96px;
    z-index: 90;
    padding-bottom: 12px;
    margin-top: -12px;
    background: linear-gradient(to bottom, var(--bg-slate-50) 80%, transparent 100%);
}

.summary-grid.sticky .summary-card {
    padding: 16px 24px;
    border-radius: 20px;
    transform: scale(0.95);
}

.summary-grid.sticky .summary-card h3 { font-size: 24px; }
.summary-grid.sticky .summary-label { margin-bottom: 4px; font-size: 9px; }

/* Button Loading State */
button.loading {
    pointer-events: none;
    opacity: 0.8;
    position: relative;
    color: transparent !important;
}

button.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: calc(50% - 10px);
    left: calc(50% - 10px);
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* Table Row Hover */
.forecast-table tr:hover td {
    background: #f1f5f9;
}

/* Risk-based Body Glow (Passenger) */
body.risk-glow-high { box-shadow: inset 0 0 150px rgba(239, 68, 68, 0.1); }
body.risk-glow-medium { box-shadow: inset 0 0 150px rgba(245, 158, 11, 0.08); }
body.risk-glow-low { box-shadow: inset 0 0 150px rgba(16, 185, 129, 0.05); }

.risk-badge {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.risk-badge-low { background: #ecfdf5; color: #10b981; }
.risk-badge-medium { background: #fffbeb; color: #d97706; }
.risk-badge-high { background: #fef2f2; color: #ef4444; }

@keyframes pulse-red {
    0% { filter: drop-shadow(0 0 0 rgba(239, 68, 68, 0.7)); }
    70% { filter: drop-shadow(0 0 15px rgba(239, 68, 68, 0.4)); }
    100% { filter: drop-shadow(0 0 0 rgba(239, 68, 68, 0)); }
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* System Status Bar */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 24px;
    background: #0f172a;
    color: white;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 0 0 16px 16px;
    margin: -40px -24px 24px -24px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot-active {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse-green 2s infinite;
}

/* Trend Indicators */
.trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 999px;
    margin-left: 8px;
    vertical-align: middle;
}

.trend.up { background: #fef2f2; color: #ef4444; }
.trend.down { background: #ecfdf5; color: #10b981; }

/* Tooltips */
.map-tooltip {
    position: absolute;
    padding: 12px 16px;
    background: var(--text-slate-900);
    color: white;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 700;
    pointer-events: none;
    z-index: 1000;
    box-shadow: var(--premium-shadow);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.map-tooltip.visible { opacity: 1; }

.station-circle.high {
    animation: pulse-red 2s infinite;
}

* {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-inter);
    background-color: var(--bg-slate-50);
    color: var(--text-slate-900);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.radial-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, var(--bg-slate-100) 0%, var(--bg-slate-50) 100%);
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 24px;
    position: relative;
    z-index: 1;
}

/* Navbar */
.premium-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 24px;
    position: sticky;
    top: 24px;
    z-index: 100;
    margin-bottom: 64px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.nav-brand {
    font-weight: 900;
    font-size: 20px;
    letter-spacing: -0.04em;
    color: var(--text-slate-900);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 16px;
}

.nav-button {
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-button.secondary {
    color: var(--text-slate-600);
}

.nav-button.secondary:hover {
    color: var(--text-slate-900);
}

.nav-button.primary {
    background: white;
    color: var(--blue-600);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transform: scale(1.02);
}

.lang-switcher {
    display: flex;
    gap: 8px;
}

.lang-switcher a {
    text-decoration: none;
    font-size: 11px;
    font-weight: 900;
    color: var(--text-slate-400);
    padding: 8px 12px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.lang-switcher a.active {
    background: var(--text-slate-900);
    color: white;
}

/* Hero Section */
.hero {
    margin-bottom: 64px;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
    margin: 0 0 16px;
    font-size: 11px;
    font-weight: 900;
    color: var(--blue-600);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

h1 {
    margin: 0 0 16px;
    font-size: 56px;
    font-weight: 900;
    letter-spacing: -0.05em;
    color: var(--text-slate-900);
    line-height: 1;
}

.lead {
    font-size: 20px;
    color: var(--text-slate-600);
    font-weight: 500;
    max-width: 700px;
}

/* Cards */
.card {
    background: white;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 40px;
    padding: 40px;
    margin-bottom: 32px;
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--premium-shadow);
    transform: translateY(-4px);
}

.card-head {
    margin-bottom: 32px;
}

h2 {
    margin: 0 0 8px;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.muted {
    font-size: 15px;
    color: var(--text-slate-400);
    font-weight: 500;
}

/* Summary Grid */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.summary-card {
    background: white;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 32px;
    padding: 32px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.summary-card:hover {
    transform: scale(1.02);
    box-shadow: var(--premium-shadow);
}

.summary-label {
    margin: 0 0 16px;
    color: var(--text-slate-400);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.summary-card h3 {
    margin: 0;
    font-size: 36px;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--text-slate-900);
}

.summary-sub {
    margin: 12px 0 0;
    color: var(--blue-600);
    font-size: 13px;
    font-weight: 800;
}

/* Dashboard Grids */
.dashboard-grid, .info-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

/* Controls */
.controls {
    display: grid;
    grid-template-columns: 1fr 200px auto;
    gap: 20px;
    align-items: end;
}

.controls label {
    display: block;
    margin-bottom: 10px;
    font-size: 11px;
    font-weight: 900;
    color: var(--text-slate-400);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.controls select, .controls input {
    width: 100%;
    min-height: 56px;
    padding: 14px 20px;
    border-radius: 20px;
    border: 2px solid #f1f5f9;
    background: #f8fafc;
    color: var(--text-slate-900);
    font-family: inherit;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s ease;
}

.controls select:focus, .controls input:focus {
    outline: none;
    border-color: var(--blue-600);
    background: white;
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.08);
}

button {
    border: 0;
    border-radius: 20px;
    padding: 16px 36px;
    background: var(--blue-600);
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button:hover {
    background: var(--blue-700);
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.4);
}

/* Metro Map heatmap colors */
.map-wrap {
    border-radius: 32px;
    background: white;
    padding: 32px;
    border: 1px solid #f1f5f9;
}

.line-red { stroke: var(--metro-red); stroke-width: 14; opacity: 0.7; }
.line-green { stroke: var(--metro-green); stroke-width: 14; opacity: 0.7; }
.line-purple { stroke: var(--metro-purple); stroke-width: 14; opacity: 0.7; }

.station-circle {
    stroke: white;
    stroke-width: 5;
    r: 16;
}

.station-label {
    font-weight: 900;
    font-size: 13px;
    fill: var(--text-slate-900);
}

/* Side List items */
.side-item, .recommendation-item, .passenger-box, .challenge-box, .active-problem-box {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.side-item:hover, .recommendation-item:hover {
    background: white;
    border-color: var(--blue-600);
    box-shadow: var(--card-shadow);
}

.side-item h3, .recommendation-item h3 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 900;
}

/* Status Panels (Passenger) */
.status-panel {
    border-radius: 40px;
    padding: 64px 40px;
    text-align: center;
    color: white;
    margin-bottom: 32px;
}

.status-panel.risk-low { background: linear-gradient(135deg, #059669 0%, #10b981 100%); }
.status-panel.risk-medium { background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%); }
.status-panel.risk-high { background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%); }

.status-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 24px;
    display: inline-block;
}

.status-panel h2 { font-size: 48px; color: white; margin-bottom: 12px; }
.status-panel p { font-size: 20px; opacity: 0.9; font-weight: 600; }

/* Forecast Table */
.forecast-table-wrap {
    margin-top: 32px;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid #f1f5f9;
}

.forecast-table {
    width: 100%;
    border-collapse: collapse;
}

.forecast-table th {
    background: #f8fafc;
    padding: 20px;
    text-align: left;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--text-slate-400);
    letter-spacing: 0.1em;
}

.forecast-table td {
    padding: 20px;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 600;
    font-size: 14px;
}

/* Challenge Grid */
.challenge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.challenge-card {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    border: 1px solid var(--blue-600);
}

/* Responsive */
@media (max-width: 1100px) {
    .summary-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid, .info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    h1 { font-size: 32px; }
    .premium-nav { 
        flex-direction: column; 
        gap: 16px; 
        top: 12px; 
        padding: 16px; 
        margin-bottom: 32px;
        border-radius: 20px;
    }
    .nav-brand { font-size: 18px; }
    .nav-links { width: 100%; justify-content: center; }
    .nav-button { padding: 8px 16px; font-size: 12px; flex: 1; text-align: center; }
    .summary-grid, .controls, .challenge-grid, .info-grid { grid-template-columns: 1fr; }
    .card { padding: 20px; }
    .status-bar { 
        flex-direction: column; 
        gap: 8px; 
        text-align: center; 
        margin-top: -40px;
        border-radius: 0 0 12px 12px;
    }
}

// --------------------------------------------------

.metro-image-map {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border-radius: 28px;
    background: #ffffff;
}

.metro-map-img {
    display: block;
    width: 100%;
    height: auto;
}

.metro-map-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.station-node {
    cursor: pointer;
    pointer-events: auto;
}

.station-circle {
    stroke: #ffffff;
    stroke-width: 4;
}

.station-circle.low {
    fill: #22c55e;
}

.station-circle.medium {
    fill: #f59e0b;
}

.station-circle.high {
    fill: #ef4444;
}

.station-pulse {
    opacity: 0.25;
}

.station-pulse.low {
    fill: #22c55e;
}

.station-pulse.medium {
    fill: #f59e0b;
}

.station-pulse.high {
    fill: #ef4444;
    animation: metroPulse 1.4s infinite;
}

@keyframes metroPulse {
    0% {
        opacity: 0.35;
        transform: scale(1);
        transform-origin: center;
    }
    100% {
        opacity: 0;
        transform: scale(1.8);
        transform-origin: center;
    }
}
/* === MetroFlow Baku SVG map fix === */
.map-wrap.metro-svg-map {
    position: relative;
    width: 100%;
    min-height: 430px;
    padding: 8px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 28px;
    background:
        radial-gradient(circle at 18% 18%, rgba(37, 99, 235, 0.06), transparent 28%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    overflow: hidden;
}

.metro-map-baku {
    display: block;
    width: 100%;
    height: auto;
    min-height: 410px;
}

.metro-track {
    fill: none !important;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 15;
    filter: url(#metroLineShadow);
}

.metro-track.line-green {
    stroke: #00a859;
}

.metro-track.line-red {
    stroke: #ff1f2d;
}

.metro-track.line-purple {
    stroke: #a0148e;
    stroke-width: 11;
}

.metro-track.line-branch,
.metro-track.line-bakmil {
    stroke-width: 10;
}

.station-node {
    cursor: pointer;
}

.station-halo {
    opacity: 0.24;
    transform-box: fill-box;
    transform-origin: center;
    transition: opacity 0.2s ease, r 0.2s ease;
}

.station-halo.low {
    fill: #22c55e;
}

.station-halo.medium {
    fill: #f59e0b;
}

.station-halo.high {
    fill: #ef4444;
    animation: metroRiskPulse 1.35s ease-out infinite;
}

.station-circle {
    stroke: #ffffff;
    stroke-width: 4;
    transition: transform 0.18s ease, filter 0.18s ease;
    transform-box: fill-box;
    transform-origin: center;
}

.station-circle.low {
    fill: #22c55e;
}

.station-circle.medium {
    fill: #f59e0b;
}

.station-circle.high {
    fill: #ef4444;
}

.station-node:hover .station-circle {
    transform: scale(1.35);
    filter: drop-shadow(0 6px 10px rgba(15, 23, 42, 0.3));
}

.station-node:hover .station-halo {
    opacity: 0.5;
}

.station-label {
    font-size: 15px;
    font-weight: 800;
    fill: #111827;
    paint-order: stroke;
    stroke: #ffffff;
    stroke-width: 5px;
    stroke-linejoin: round;
    pointer-events: none;
}

.map-tooltip {
    position: absolute;
    z-index: 20;
    min-width: 170px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.94);
    color: #ffffff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.25);
    font-size: 13px;
    line-height: 1.35;
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.map-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

.map-tooltip strong,
.map-tooltip span {
    display: block;
}

.map-tooltip strong {
    margin-bottom: 6px;
    font-size: 14px;
}

@keyframes metroRiskPulse {
    0% {
        opacity: 0.34;
        transform: scale(0.9);
    }
    70% {
        opacity: 0;
        transform: scale(1.8);
    }
    100% {
        opacity: 0;
        transform: scale(1.8);
    }
}

@media (max-width: 900px) {
    .map-wrap.metro-svg-map {
        min-height: 320px;
        overflow-x: auto;
    }

    .metro-map-baku {
        min-width: 820px;
        min-height: 320px;
    }
}
// --------------
.nav-brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.nav-brand-logo img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    display: block;
}