:root {
    /* Core Palette – Green / Blue */
    --teal:        #00897b;
    --teal-light:  #26a69a;
    --teal-dark:   #00695c;
    --blue:        #0284c7;
    --blue-light:  #38bdf8;
    --cyan:        #06b6d4;
    --emerald:     #10b981;
    --emerald-d:   #059669;

    /* Backgrounds */
    --bg:          #e8f5f0;
    --card-bg:     rgba(255,255,255,0.72);
    --card-border: rgba(255,255,255,0.85);
    --sidebar-bg:  rgba(255,255,255,0.78);

    /* Text */
    --text-1:  #0f172a;
    --text-2:  #334155;
    --text-3:  #64748b;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0,137,123,0.10);
    --shadow-md: 0 8px 32px rgba(0,137,123,0.14);
    --shadow-lg: 0 20px 60px rgba(0,137,123,0.18);

    --ease:    cubic-bezier(0.4, 0, 0.2, 1);
    --trans:   all 0.3s var(--ease);

    --font-h: 'Outfit',  sans-serif;
    --font-b: 'Inter',   sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-b);
    color: var(--text-1);
    background: var(--bg);
    min-height: 100vh;
    overflow-x: hidden;
    background-image:
        radial-gradient(ellipse at 10% 60%, rgba(2,132,199,0.09) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 20%, rgba(0,137,123,0.13) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(16,185,129,0.06) 0%, transparent 50%);
    background-attachment: fixed;
}

/* ── Glass Utility ───────────────────────────────────────────────────────── */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

/* ══════════════════════════════════════════════════════════════════════════ */
/*  LOGIN PAGE                                                                */
/* ══════════════════════════════════════════════════════════════════════════ */
body.login-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    overflow: hidden;
    background: var(--bg);
}

/* Left animated panel */
.login-visual {
    position: relative;
    background: linear-gradient(145deg, #071a29 0%, #0a2e42 45%, #073828 100%);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 0 40px 60px;
}

/* Animated hex-grid overlay */
.login-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(60deg, rgba(0,200,160,0.04) 0, rgba(0,200,160,0.04) 1px, transparent 1px, transparent 40px),
        repeating-linear-gradient(120deg, rgba(2,132,199,0.04) 0, rgba(2,132,199,0.04) 1px, transparent 1px, transparent 40px),
        repeating-linear-gradient(0deg, rgba(16,185,129,0.03) 0, rgba(16,185,129,0.03) 1px, transparent 1px, transparent 40px);
    animation: gridShift 20s linear infinite;
    pointer-events: none;
}

@keyframes gridShift {
    0%   { background-position: 0 0, 0 0, 0 0; }
    100% { background-position: 80px 0, 0 80px, 40px 40px; }
}

/* Glowing orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    animation: orbFloat linear infinite;
    pointer-events: none;
}
.orb-1 { width: 260px; height: 260px; background: #00897b; top: 5%;  left: 10%; animation-duration: 14s; }
.orb-2 { width: 200px; height: 200px; background: #0284c7; top: 50%; right: 5%; animation-duration: 18s; animation-delay: -6s; }
.orb-3 { width: 160px; height: 160px; background: #10b981; bottom: 15%; left: 40%; animation-duration: 22s; animation-delay: -10s; }

@keyframes orbFloat {
    0%   { transform: translate(0,0) scale(1); }
    33%  { transform: translate(30px,-20px) scale(1.1); }
    66%  { transform: translate(-20px,15px) scale(0.95); }
    100% { transform: translate(0,0) scale(1); }
}

/* City SVG skyline */
.city-svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 55%;
    pointer-events: none;
}

/* Brand overlay */
.visual-brand {
    position: relative;
    z-index: 10;
    text-align: center;
    color: white;
    margin-bottom: 16px;
}

.visual-brand .brand-icon {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, var(--teal), var(--blue));
    border-radius: 14px;
    margin: 0 auto 16px;
    box-shadow: 0 0 30px rgba(0,137,123,0.6);
    animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(0,137,123,0.5); }
    50%       { box-shadow: 0 0 40px rgba(0,137,123,0.9), 0 0 60px rgba(2,132,199,0.4); }
}

.visual-brand h1 {
    font-family: var(--font-h);
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #e0fdf4, #a7f3d0, #6ee7b7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.visual-brand p {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 32px;
}

.brand-stats {
    display: flex;
    gap: 28px;
    justify-content: center;
}

.brand-stat {
    text-align: center;
    animation: statFloat 4s ease-in-out infinite;
}

.brand-stat:nth-child(2) { animation-delay: -1.3s; }
.brand-stat:nth-child(3) { animation-delay: -2.6s; }

@keyframes statFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-6px); }
}

.stat-num {
    display: block;
    font-family: var(--font-h);
    font-size: 24px;
    font-weight: 800;
    color: #6ee7b7;
}
.stat-lbl {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Floating data nodes */
.data-node {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(0,200,160,0.5);
    background: rgba(0,200,160,0.08);
    animation: nodeFloat linear infinite;
    pointer-events: none;
}
.dn1 { width: 10px; height: 10px; top: 20%; left: 20%; animation-duration: 8s; }
.dn2 { width: 6px;  height: 6px;  top: 35%; left: 70%; animation-duration: 11s; animation-delay: -3s; }
.dn3 { width: 14px; height: 14px; top: 60%; left: 15%; animation-duration: 15s; animation-delay: -7s; }
.dn4 { width: 8px;  height: 8px;  top: 75%; left: 80%; animation-duration: 9s;  animation-delay: -2s; }
.dn5 { width: 12px; height: 12px; top: 12%; left: 55%; animation-duration: 13s; animation-delay: -5s; }

@keyframes nodeFloat {
    0%   { transform: translate(0,0); opacity: 0.3; }
    25%  { transform: translate(20px,-15px); opacity: 0.9; }
    50%  { transform: translate(-10px,-30px); opacity: 0.5; }
    75%  { transform: translate(-25px,-10px); opacity: 0.8; }
    100% { transform: translate(0,0); opacity: 0.3; }
}

/* Right login panel */
.login-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 48px 40px;
    text-align: center;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.login-logo-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--teal), var(--blue));
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,137,123,0.35);
}

.login-logo h1 {
    font-family: var(--font-h);
    font-size: 30px;
    font-weight: 800;
    color: var(--teal-dark);
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-3);
    margin-bottom: 36px;
    letter-spacing: 0.5px;
}

.login-note {
    margin-top: 20px;
    font-size: 12px;
    color: var(--text-3);
}

.login-note span {
    color: var(--teal);
    font-weight: 600;
}

/* ── Input Group ─────────────────────────────────────────────────────────── */
.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    margin-bottom: 8px;
}

.val-badge {
    font-family: var(--font-h);
    font-size: 12px;
    font-weight: 700;
    color: var(--teal);
    background: rgba(0,137,123,0.08);
    padding: 2px 8px;
    border-radius: 20px;
}

.text-input {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid rgba(0,137,123,0.2);
    border-radius: 12px;
    background: rgba(255,255,255,0.6);
    font-family: var(--font-b);
    font-size: 14px;
    color: var(--text-1);
    outline: none;
    transition: var(--trans);
}

.text-input:focus {
    border-color: var(--teal);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0,137,123,0.10);
}

/* Range sliders */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(0,0,0,0.08);
    outline: none;
    cursor: pointer;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal), var(--blue));
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0,137,123,0.45);
    transition: var(--trans);
}

input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.25); }

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 15px 24px;
    margin-top: 8px;
    background: linear-gradient(135deg, var(--blue), var(--teal));
    border: none;
    border-radius: 12px;
    color: white;
    font-family: var(--font-h);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    transition: var(--trans);
    box-shadow: 0 4px 18px rgba(0,137,123,0.35);
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: var(--trans);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,137,123,0.45); }
.btn-primary:hover::after { opacity: 1; }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(0,0,0,0.1);
    padding: 11px 18px;
    border-radius: 10px;
    color: var(--text-3);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--trans);
    width: 100%;
    margin-top: auto;
}
.btn-secondary:hover { background: rgba(0,0,0,0.04); color: var(--text-1); }

/* ══════════════════════════════════════════════════════════════════════════ */
/*  DASHBOARD LAYOUT                                                          */
/* ══════════════════════════════════════════════════════════════════════════ */
body.dashboard-page {
    background: var(--bg);
    background-image:
        radial-gradient(ellipse at 10% 60%, rgba(2,132,199,0.09) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 20%, rgba(0,137,123,0.13) 0%, transparent 50%);
    background-attachment: fixed;
}

.app-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 0;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    background: var(--sidebar-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-right: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 28px 22px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,137,123,0.2) transparent;
    box-shadow: 2px 0 20px rgba(0,137,123,0.08);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.logo-icon {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--teal), var(--blue));
    border-radius: 9px;
    box-shadow: 0 4px 12px rgba(0,137,123,0.35);
    flex-shrink: 0;
}

.sidebar-logo h2 {
    font-family: var(--font-h);
    font-size: 22px;
    font-weight: 800;
    color: var(--teal-dark);
    letter-spacing: -0.5px;
}

.sidebar-tagline {
    font-size: 12px;
    color: var(--text-3);
    margin-bottom: 24px;
    padding-left: 44px;
}

/* Nav links */
.nav-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 24px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-2);
    transition: var(--trans);
}

.nav-link:hover { background: rgba(0,137,123,0.08); color: var(--teal); }
.nav-link.active { background: rgba(0,137,123,0.12); color: var(--teal-dark); font-weight: 600; }

.nav-icon { font-size: 16px; }

/* Input section */
.section-title {
    font-family: var(--font-h);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0,0,0,0.06);
}

/* City autocomplete */
.city-wrap { position: relative; }

.city-input { list-style: none; }

/* Main content */
.main-content {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-height: 100vh;
}

/* Top banner */
.top-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

.welcome-text {
    font-family: var(--font-h);
    font-size: 16px;
    font-weight: 600;
    color: var(--teal-dark);
}

.welcome-text span { color: var(--blue); }

.live-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--emerald);
    background: rgba(16,185,129,0.08);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(16,185,129,0.2);
}

.pulse-dot {
    width: 8px; height: 8px;
    background: var(--emerald);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Metric cards row */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.metric-card {
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: var(--trans);
}
.metric-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* Score card */
.score-card { justify-content: space-between; }
.score-info h3 { font-family: var(--font-h); font-size: 16px; color: var(--text-1); margin-bottom: 4px; }
.score-info p  { font-size: 12px; color: var(--text-3); }

.score-ring { width: 80px; height: 80px; flex-shrink: 0; }
.circular-svg { display: block; width: 100%; height: 100%; }
.ring-bg { fill: none; stroke: rgba(0,0,0,0.06); stroke-width: 4; }
.ring-fill { fill: none; stroke-width: 3; stroke-linecap: round; transition: stroke-dasharray 1.2s var(--ease); stroke: var(--emerald); }
.ring-text { fill: var(--text-1); font-family: var(--font-h); font-size: 10px; font-weight: 800; text-anchor: middle; }

/* Icon metric cards */
.metric-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 22px;
    flex-shrink: 0;
}
.icon-air   { background: rgba(2,132,199,0.1); border: 1px solid rgba(2,132,199,0.2); }
.icon-co2   { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.2); }

.metric-info h3 { font-size: 13px; color: var(--text-3); margin-bottom: 4px; }
.metric-val {
    font-family: var(--font-h);
    font-size: 28px; font-weight: 800;
    color: var(--teal);
    transition: color 0.3s;
}
.metric-sub { font-size: 11px; font-weight: 600; color: var(--emerald); margin-top: 2px; }
.metric-sub.negative { color: #e11d48; }

/* AI Summary bar */
.summary-bar {
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(0,137,123,0.07), rgba(2,132,199,0.05));
    border-left: 4px solid var(--teal);
    border-radius: 12px;
    font-size: 13px;
    color: var(--text-2);
    display: none;
    animation: slideIn 0.4s ease;
}
.summary-bar.visible { display: block; }

/* Analytics grid */
.analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.panel { padding: 24px; }

.panel-title {
    font-family: var(--font-h);
    font-size: 16px; font-weight: 600;
    color: var(--text-1);
    margin-bottom: 18px;
}

/* Recommendations */
.rec-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }

.rec-item {
    padding: 14px 16px;
    background: rgba(255,255,255,0.6);
    border-radius: 12px;
    border-left: 4px solid var(--teal);
    transition: var(--trans);
    opacity: 0;
    animation: slideIn 0.4s ease forwards;
}

.rec-item:nth-child(1) { animation-delay: 0.08s; }
.rec-item:nth-child(2) { animation-delay: 0.18s; }
.rec-item:nth-child(3) { animation-delay: 0.28s; }
.rec-item:nth-child(4) { animation-delay: 0.38s; }
.rec-item:nth-child(5) { animation-delay: 0.48s; }

.rec-item:hover { transform: translateX(4px); background: #fff; box-shadow: var(--shadow-sm); }

.rec-item.cat-traffic   { border-left-color: #f59e0b; }
.rec-item.cat-green     { border-left-color: var(--emerald); }
.rec-item.cat-transport { border-left-color: var(--blue); }

.rec-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.rec-icon   { font-size: 16px; }
.rec-title  { font-family: var(--font-h); font-size: 14px; font-weight: 700; color: var(--teal-dark); }
.rec-desc   { font-size: 12px; color: var(--text-3); line-height: 1.6; margin-bottom: 8px; }
.rec-impact { font-size: 11px; font-weight: 700; color: var(--teal); background: rgba(0,137,123,0.08); display: inline-block; padding: 3px 10px; border-radius: 20px; }

.rec-empty  { padding: 28px; text-align: center; color: var(--text-3); font-size: 13px; border: 1.5px dashed rgba(0,0,0,0.1); border-radius: 12px; }

/* Chart */
.chart-box { height: 280px; }

/* Map panel*/
.map-panel { grid-column: 1/-1; padding: 24px; }
.map-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.map-badge {
    font-size: 11px; font-weight: 700; padding: 4px 12px;
    border-radius: 20px; background: rgba(0,137,123,0.1);
    color: var(--teal); border: 1px solid rgba(0,137,123,0.2);
}

#map {
    height: 440px;
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(0,137,123,0.15);
    overflow: hidden;
}

/* Map legend */
.map-legend {
    display: flex;
    gap: 20px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-2);
}

.legend-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
}

/* Community impact bar */
.impact-panel { grid-column: 1/-1; padding: 24px; }

.impact-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-top: 0;
}

.impact-stat {
    text-align: center;
    padding: 20px 12px;
    background: rgba(255,255,255,0.5);
    border-radius: 14px;
    border: 1px solid rgba(0,137,123,0.1);
    transition: var(--trans);
}
.impact-stat:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); background: #fff; }

.impact-icon  { font-size: 24px; margin-bottom: 10px; }
.impact-val   { font-family: var(--font-h); font-size: 22px; font-weight: 800; color: var(--teal-dark); }
.impact-label { font-size: 11px; color: var(--text-3); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.8px; }

/* Loading overlay inside btn */
.btn-loader { display: none; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; margin: 0 auto; }
.btn-primary.loading .btn-text   { display: none; }
.btn-primary.loading .btn-loader { display: block; }

/* ══════════════════════════════════════════════════════════════════════════ */
/*  HISTORY PAGE                                                              */
/* ══════════════════════════════════════════════════════════════════════════ */
body.history-page { background: var(--bg); background-attachment: fixed; }

.history-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 36px 28px;
}

.history-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.back-btn {
    text-decoration: none;
    color: var(--teal);
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
    border: 1.5px solid rgba(0,137,123,0.25);
    border-radius: 10px;
    transition: var(--trans);
}
.back-btn:hover { background: rgba(0,137,123,0.06); }

.history-header h1 { font-family: var(--font-h); font-size: 26px; font-weight: 800; color: var(--text-1); }

.htable-wrap { padding: 0; overflow: hidden; }

.htable {
    width: 100%;
    border-collapse: collapse;
}

.htable th {
    padding: 14px 18px;
    text-align: left;
    font-family: var(--font-h);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--teal);
    background: rgba(0,137,123,0.04);
    border-bottom: 1px solid rgba(0,137,123,0.1);
}

.htable td {
    padding: 14px 18px;
    font-size: 13px;
    color: var(--text-2);
    border-bottom: 1px solid rgba(0,0,0,0.04);
    transition: var(--trans);
}

.htable tr:hover td { background: rgba(0,137,123,0.03); }

.score-chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-family: var(--font-h);
    font-size: 13px;
    font-weight: 700;
}
.score-chip.high   { background: rgba(16,185,129,0.12); color: #059669; }
.score-chip.medium { background: rgba(245,158,11,0.12); color: #b45309; }
.score-chip.low    { background: rgba(239,68,68,0.12);  color: #dc2626; }

/* ══════════════════════════════════════════════════════════════════════════ */
/*  ANIMATIONS                                                                */
/* ══════════════════════════════════════════════════════════════════════════ */
@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes countUp {
    from { opacity: 0; transform: scale(0.8); }
    to   { opacity: 1; transform: scale(1); }
}

/* Leaflet popup override */
.leaflet-popup-content-wrapper {
    border-radius: 10px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
    font-family: var(--font-b) !important;
}
.leaflet-popup-tip { display: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,137,123,0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,137,123,0.4); }

/* ══════════════════════════════════════════════════════════════════════════ */
/*  RESPONSIVE                                                                */
/* ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
    .app-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; }
    .metrics-row { grid-template-columns: 1fr; }
    .analytics-grid { grid-template-columns: 1fr; }
    .impact-grid { grid-template-columns: repeat(3,1fr); }
}

@media (max-width: 768px) {
    body.login-page { grid-template-columns: 1fr; }
    .login-visual { display: none; }
    .impact-grid { grid-template-columns: repeat(2,1fr); }
    .main-content { padding: 16px; }
}
