/* =========================================================
   SCRATCHYOU — Emerald theme
   Single accent: emerald (like the cat's eyes).
   Background: deep near-black. No rainbow.
   ========================================================= */
:root {
    --bg-0: #05090a;
    --bg-1: #07100e;
    --bg-2: #0c1614;

    --text:      #e6f6ee;
    --text-dim:  #7e9b8d;
    --muted:     #4f6660;

    /* Single accent family */
    --emerald-50:  #ecfdf5;
    --emerald-200: #a7f3d0;
    --emerald-300: #6ee7b7;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --emerald-700: #047857;

    --accent:        var(--emerald-400);
    --accent-strong: var(--emerald-500);
    --accent-soft:   rgba(52, 211, 153, 0.12);
    --accent-ring:   rgba(52, 211, 153, 0.35);

    /* Reserved only for true "danger / offline" signals */
    --danger:        #f43f5e;
    --danger-soft:   rgba(244, 63, 94, 0.10);

    --grad-bg:
        radial-gradient(1200px 800px at 80% -10%, rgba(16, 185, 129, 0.10), transparent 60%),
        radial-gradient(900px 600px at -10% 110%, rgba(16, 185, 129, 0.07), transparent 55%),
        linear-gradient(180deg, #04080a 0%, #06100d 100%);

    --radius:    14px;
    --radius-sm: 10px;
    --shadow-glow: 0 0 24px rgba(16, 185, 129, 0.18), 0 0 60px rgba(16, 185, 129, 0.10);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.55);

    --ease: cubic-bezier(0.22, 1, 0.36, 1);

    --font-sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    background: var(--bg-0);
    color: var(--text);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    min-height: 100vh;
    background: var(--grad-bg);
    background-attachment: fixed;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

code, .mono { font-family: var(--font-mono); }

/* ---- Animated subtle grid ---- */
.bg-grid {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background:
      linear-gradient(rgba(16, 185, 129, 0.045) 1px, transparent 1px) 0 0 / 56px 56px,
      linear-gradient(90deg, rgba(16, 185, 129, 0.045) 1px, transparent 1px) 0 0 / 56px 56px;
    mask-image: radial-gradient(ellipse at center, black 35%, transparent 80%);
    animation: gridShift 40s linear infinite;
}
@keyframes gridShift {
    from { background-position: 0 0, 0 0; }
    to   { background-position: 560px 560px, 560px 560px; }
}

#particles {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
}

.container {
    position: relative; z-index: 1;
    max-width: 1180px; margin: 0 auto; padding: 0 24px;
}
main { position: relative; z-index: 1; }

/* ---- Top navbar ---- */
.nav {
    position: sticky; top: 0; z-index: 20;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: linear-gradient(180deg, rgba(5, 9, 10, 0.9), rgba(5, 9, 10, 0.6));
    border-bottom: 1px solid rgba(16, 185, 129, 0.10);
}
.nav__inner {
    display: flex; align-items: center; justify-content: space-between; height: 70px;
}
.nav__brand {
    display: flex; align-items: center; gap: 12px;
    font-weight: 800;
    letter-spacing: 0.22em;
    font-size: 16px;
    text-transform: uppercase;
    color: var(--text);
}
.nav__brand .logo {
    height: 38px; width: 38px;
    object-fit: cover;
    border-radius: 9px;
    box-shadow: 0 0 14px rgba(52, 211, 153, 0.45),
                inset 0 0 0 1px rgba(52, 211, 153, 0.25);
}
.nav__brand span { color: var(--text); }
.nav__brand .you { color: var(--accent); }

.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__link {
    padding: 10px 16px;
    color: var(--text-dim);
    font-weight: 500;
    border-radius: 10px;
    transition: color .25s var(--ease), background .25s var(--ease);
}
.nav__link:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.nav__link.is-active {
    color: var(--accent);
    background: var(--accent-soft);
    box-shadow: inset 0 0 0 1px var(--accent-ring);
}

/* ---- Buttons ---- */
.btn {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    gap: 10px;
    padding: 13px 22px;
    font-weight: 600;
    font-size: 14.5px;
    letter-spacing: 0.05em;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    color: var(--text);
    background: rgba(255, 255, 255, 0.02);
    transition: transform .2s var(--ease), box-shadow .3s var(--ease),
                background .25s var(--ease), color .25s var(--ease),
                border-color .25s var(--ease);
}
.btn:hover {
    transform: translateY(-1px);
    border-color: var(--accent-ring);
    background: var(--accent-soft);
    color: var(--text);
}
.btn:active { transform: translateY(0); }

.btn--primary {
    background: linear-gradient(180deg, var(--emerald-400), var(--emerald-600));
    color: #03150e;
    font-weight: 700;
    border-color: transparent;
    box-shadow: 0 8px 24px -8px rgba(16, 185, 129, 0.55);
}
.btn--primary:hover {
    background: linear-gradient(180deg, var(--emerald-300), var(--emerald-500));
    color: #03150e;
    box-shadow: 0 10px 30px -8px rgba(16, 185, 129, 0.75);
}

.btn--ghost { background: transparent; }
.btn--danger {
    background: rgba(244, 63, 94, 0.06);
    border-color: rgba(244, 63, 94, 0.30);
    color: #ffd0d8;
}
.btn--danger:hover {
    background: rgba(244, 63, 94, 0.14);
    border-color: rgba(244, 63, 94, 0.55);
}
.btn--block { width: 100%; }

/* ---- Hero ---- */
.hero {
    position: relative;
    text-align: center;
    padding: 110px 0 80px;
}
.hero__logo {
    width: 180px; height: 180px;
    margin: 0 auto 26px;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: 0 0 40px rgba(52, 211, 153, 0.55),
                0 0 90px rgba(16, 185, 129, 0.30),
                inset 0 0 0 1px rgba(52, 211, 153, 0.30);
    animation: float 6s ease-in-out infinite;
    user-select: none;
}
@keyframes float {
    0%,100% { transform: translateY(0) rotate(0); }
    50%     { transform: translateY(-8px) rotate(-1deg); }
}
.hero__title {
    font-family: var(--font-mono);
    font-size: clamp(44px, 7vw, 84px);
    margin: 0 0 14px;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1;
    color: var(--text);
}
.hero__title .accent { color: var(--accent); }
.hero__tagline {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    margin: 0 0 14px;
    opacity: 0.85;
}
.hero__subtitle {
    color: var(--text-dim);
    font-size: 17px;
    max-width: 600px;
    margin: 0 auto 36px;
    line-height: 1.55;
}
.hero__cta { display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ---- Page header ---- */
.page-header { text-align: center; padding: 80px 0 30px; }
.page-header h1 {
    font-family: var(--font-mono);
    font-size: clamp(30px, 4.5vw, 50px);
    margin: 0 0 10px;
    color: var(--text);
    letter-spacing: 0.04em;
}
.page-header h1 .accent { color: var(--accent); }
.page-header p { color: var(--text-dim); margin: 0; }

/* ---- Cards ---- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
    padding: 40px 0 100px;
}
.card {
    position: relative;
    padding: 30px 26px;
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: var(--shadow-card);
    transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-ring);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 24px rgba(16,185,129,0.12);
}
.card h3 { margin: 0 0 8px; font-size: 22px; }
.card p { color: var(--text-dim); margin: 0 0 14px; line-height: 1.55; }

.card--featured {
    border-color: var(--accent-ring);
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.10);
}

.price {
    font-family: var(--font-mono);
    font-size: 44px;
    font-weight: 800;
    color: var(--accent);
    margin: 6px 0 18px;
    letter-spacing: 0.02em;
}
.price small {
    font-size: 14px;
    color: var(--text-dim);
    font-weight: 400;
}

.card ul { list-style: none; padding: 0; margin: 0 0 22px; }
.card ul li {
    padding: 9px 0;
    color: var(--text-dim);
    border-bottom: 1px dashed rgba(255,255,255,0.05);
    display: flex; align-items: center; gap: 10px;
}
.card ul li:last-child { border-bottom: 0; }
.card ul li::before {
    content: '';
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

/* ---- Pricing single plan ---- */
.pricing-single {
    max-width: 460px;
    margin: 40px auto 100px;
}
.pricing-note {
    margin: 18px auto 0;
    text-align: center;
    color: var(--text-dim);
    font-size: 14px;
    max-width: 460px;
    line-height: 1.6;
}
.pricing-note .mono { color: var(--accent); }

/* ---- Auth ---- */
.auth {
    min-height: calc(100vh - 70px);
    display: grid;
    place-items: center;
    padding: 60px 24px;
}
.auth__card {
    width: 100%;
    max-width: 460px;
    padding: 34px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    border: 1px solid rgba(16, 185, 129, 0.18);
    box-shadow: var(--shadow-card), var(--shadow-glow);
    backdrop-filter: blur(10px);
    position: relative;
}
.auth__logo { display: flex; justify-content: center; margin-bottom: 14px; }
.auth__logo img {
    width: 78px; height: 78px;
    object-fit: cover;
    border-radius: 18px;
    box-shadow: 0 0 22px rgba(52, 211, 153, 0.50),
                inset 0 0 0 1px rgba(52, 211, 153, 0.30);
}
.auth__title {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 24px;
    margin: 0 0 6px;
    color: var(--text);
    letter-spacing: 0.04em;
}
.auth__subtitle { text-align: center; color: var(--text-dim); margin: 0 0 24px; font-size: 14px; }

.steps {
    display: flex; align-items: center; justify-content: center;
    gap: 6px;
    margin-bottom: 28px;
}
.step {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 13px;
    transition: all .3s var(--ease);
}
.step.active {
    background: var(--accent);
    color: #03150e;
    border-color: transparent;
    box-shadow: 0 0 14px rgba(52, 211, 153, 0.55);
}
.step.done {
    background: rgba(16,185,129,0.12);
    border-color: var(--accent-ring);
    color: var(--accent);
}
.steps__bar {
    width: 40px; height: 2px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
}

.field { margin-bottom: 18px; }
.field label {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-dim);
    margin-bottom: 8px;
}
.input {
    width: 100%;
    padding: 13px 15px;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text);
    font-size: 15px;
    font-family: var(--font-mono);
    outline: none;
    transition: border-color .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
.input::placeholder { color: var(--muted); }
.input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(16,185,129,0.14);
    background: rgba(16,185,129,0.04);
}

.checkbox {
    display: flex; gap: 10px; align-items: flex-start;
    color: var(--text-dim); font-size: 14px; line-height: 1.5;
    cursor: pointer; user-select: none;
}
.checkbox input { accent-color: var(--accent); margin-top: 3px; }
.checkbox a { color: var(--accent); }

.auth__alt { text-align: center; margin-top: 18px; font-size: 14px; color: var(--text-dim); }
.auth__alt a { color: var(--accent); }

.alert {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    border: 1px solid;
}
.alert--error {
    color: #ffd0d8;
    background: var(--danger-soft);
    border-color: rgba(244, 63, 94, 0.35);
}
.alert--ok {
    color: var(--emerald-200);
    background: var(--accent-soft);
    border-color: var(--accent-ring);
}

.phase { animation: fadeUp .4s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ---- FAQ ---- */
.faq { display: grid; gap: 12px; padding: 30px 0 100px; }
.faq__item {
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    overflow: hidden;
}
.faq__q {
    padding: 16px 20px;
    cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
    font-weight: 600;
    color: var(--text);
    transition: background .25s var(--ease);
}
.faq__q:hover { background: rgba(16,185,129,0.04); }
.faq__q .chev { transition: transform .3s var(--ease); color: var(--accent); }
.faq__item.open .faq__q .chev { transform: rotate(180deg); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); color: var(--text-dim); }
.faq__a > div { padding: 0 20px 16px; line-height: 1.6; }
.faq__item.open .faq__a { max-height: 320px; }
.faq__a a { color: var(--accent); }

/* ---- Footer ---- */
.footer {
    padding: 28px 0;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    border-top: 1px solid rgba(255,255,255,0.04);
    position: relative; z-index: 1;
}

/* =========================================================
   DASHBOARD
   ========================================================= */
.dash {
    display: grid;
    grid-template-columns: 72px 1fr;
    min-height: 100vh;
    background: var(--grad-bg);
    transition: grid-template-columns .35s var(--ease);
}
.dash:has(.sidebar:hover) {
    grid-template-columns: 240px 1fr;
}

.sidebar {
    position: sticky; top: 0; height: 100vh;
    width: 100%;
    max-width: 100%;
    background: rgba(4, 8, 9, 0.92);
    backdrop-filter: blur(16px);
    border-right: 1px solid rgba(16, 185, 129, 0.10);
    transition: width .35s var(--ease);
    overflow: hidden;
    z-index: 100;
}
.sidebar:hover { width: 100%; }

.sidebar__brand {
    display: flex; align-items: center; gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.10);
    height: 70px;
}
.sidebar__brand img {
    width: 34px; height: 34px; flex: 0 0 34px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.45),
                inset 0 0 0 1px rgba(52, 211, 153, 0.25);
}
.sidebar__brand .label {
    font-family: var(--font-mono);
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-size: 13px;
    opacity: 0; transform: translateX(-6px);
    transition: opacity .25s var(--ease), transform .25s var(--ease);
    white-space: nowrap;
    color: var(--text);
}
.sidebar__brand .label .accent { color: var(--accent); }
.sidebar:hover .sidebar__brand .label { opacity: 1; transform: translateX(0); }

.sidebar__nav { list-style: none; padding: 14px 8px; margin: 0; display: grid; gap: 4px; }
.sidebar__nav li a {
    display: flex; align-items: center; gap: 14px;
    padding: 11px 14px;
    border-radius: 8px;
    color: var(--text-dim);
    position: relative;
    transition: color .25s var(--ease), background .25s var(--ease);
    white-space: nowrap;
}
.sidebar__nav li a:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.sidebar__nav li a.active {
    color: var(--accent);
    background: var(--accent-soft);
    box-shadow: inset 0 0 0 1px var(--accent-ring);
}
.sidebar__nav li a.active::before {
    content: '';
    position: absolute; left: -2px; top: 8px; bottom: 8px;
    width: 3px; border-radius: 3px;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
}
.sidebar__nav .icon {
    flex: 0 0 24px; width: 24px; height: 24px;
    display: grid; place-items: center;
}
.sidebar__nav .label {
    opacity: 0; transform: translateX(-6px);
    transition: opacity .2s var(--ease) .05s, transform .25s var(--ease) .05s;
    font-size: 14px;
}
.sidebar:hover .sidebar__nav .label { opacity: 1; transform: translateX(0); }

.sidebar__nav .badge {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--danger-soft);
    color: #ffd0d8;
    border: 1px solid rgba(244, 63, 94, 0.35);
    opacity: 0;
    transition: opacity .2s var(--ease);
}
.sidebar:hover .sidebar__nav .badge { opacity: 1; }

.sidebar__foot { position: absolute; bottom: 14px; left: 8px; right: 8px; }
.sidebar__foot form { margin: 0; }
.sidebar__foot .logout {
    display: flex; align-items: center; gap: 14px;
    width: 100%;
    padding: 11px 14px;
    border-radius: 8px;
    background: transparent; color: var(--text-dim);
    border: 1px solid rgba(255,255,255,0.06);
    cursor: pointer;
    transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.sidebar__foot .logout:hover {
    color: #ffd0d8;
    border-color: rgba(244, 63, 94, 0.40);
    background: var(--danger-soft);
}
.sidebar__foot .label { opacity: 0; transition: opacity .2s var(--ease); white-space: nowrap; font-size: 14px; }
.sidebar:hover .sidebar__foot .label { opacity: 1; }

.dash__main {
    padding: 26px 34px 60px;
    min-width: 0;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
}
.dash__head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 24px;
}
.dash__head h1 {
    font-family: var(--font-mono);
    margin: 0;
    font-size: 24px;
    letter-spacing: 0.04em;
    color: var(--text);
}
.dash__head h1 .accent { color: var(--accent); }
.dash__head .who { color: var(--text-dim); font-size: 13px; font-family: var(--font-mono); }
.dash__head .who strong { color: var(--accent); font-weight: 600; }

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}
.stat {
    padding: 20px 22px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.06);
    position: relative; overflow: hidden;
    transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.stat:hover { transform: translateY(-2px); border-color: var(--accent-ring); }
.stat .label {
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.20em;
    text-transform: uppercase;
}
.stat .value {
    font-family: var(--font-mono);
    font-size: 30px;
    font-weight: 700;
    margin-top: 6px;
    color: var(--accent);
}
.stat .delta { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.stat .delta.up   { color: var(--accent); }
.stat .delta.down { color: var(--danger); }

.panels {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}
@media (max-width: 980px) { .panels { grid-template-columns: 1fr; } }

.panel {
    padding: 20px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.06);
}
.panel h3 {
    margin: 0 0 14px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-dim);
    display: flex; align-items: center; gap: 10px;
}
.panel h3 .live-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%,100% { transform: scale(1);   opacity: 1;   }
    50%     { transform: scale(1.4); opacity: 0.5; }
}

.activity { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.activity li {
    display: flex; gap: 12px; align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    font-size: 13.5px;
}
.activity .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.activity .dot.warn { background: var(--danger); box-shadow: 0 0 8px var(--danger); }
.activity .dot.muted { background: var(--muted); box-shadow: none; }
.activity time {
    margin-left: auto;
    color: var(--muted);
    font-size: 11px;
    font-family: var(--font-mono);
}

/* ---- Map panel (dashboard) ---- */
.panel--map { padding: 0; overflow: hidden; }
.panel--map .panel__head {
    padding: 16px 20px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.panel--map h3 { margin: 0; }
.panel--map .agents-count {
    font-size: 12px;
    color: #34d399;
    background: rgba(16,185,129,0.10);
    border: 1px solid rgba(16,185,129,0.30);
    padding: 3px 10px;
    border-radius: 999px;
}
#map,
#map-dash {
    width: 100%;
    height: 380px;
    background: #04080a;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    z-index: 0;
}
/* ---- Live expand modal (must sit above dashboard) ---- */
.live-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(2, 4, 14, 0.96);
    backdrop-filter: blur(8px);
    flex-direction: column;
}
.live-modal.is-open { display: flex; }

.dash__main .leaflet-container { z-index: 0 !important; }
.dash__main .leaflet-top,
.dash__main .leaflet-bottom { z-index: 5 !important; }
.dash__main .leaflet-pane { z-index: 1 !important; }
.dash__main .leaflet-tile-pane { z-index: 2 !important; }
.dash__main .leaflet-overlay-pane { z-index: 3 !important; }
.dash__main .leaflet-marker-pane { z-index: 4 !important; }
.dash__main .leaflet-popup-pane { z-index: 6 !important; }
.map-empty {
    position: absolute;
    inset: 0;
    z-index: 500; /* above leaflet tiles */
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center;
    background: radial-gradient(circle at center, rgba(4,8,10,0.3), rgba(4,8,10,0.85) 70%);
    color: var(--text-dim);
    pointer-events: none;
    gap: 6px;
}
.map-empty svg { color: #34d399; opacity: 0.85; }
.map-empty__title { font-weight: 600; color: var(--text); margin-top: 4px; }
.map-empty__sub { font-size: 13px; }

.leaflet-container { background: #04080a !important; }
.leaflet-control-attribution {
    background: rgba(4,8,10,0.75) !important;
    color: var(--muted) !important;
    font-size: 10px !important;
}
.leaflet-control-attribution a { color: var(--text-dim) !important; }
.leaflet-control-zoom a {
    background: rgba(7,16,14,0.92) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16,185,129,0.30) !important;
}
.leaflet-control-zoom a:hover { background: rgba(16,185,129,0.18) !important; }

/* OOS placeholder */
.oos { text-align: center; padding: 90px 20px; }
.oos__icon {
    width: 72px; height: 72px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: var(--danger-soft);
    border: 1px solid rgba(244,63,94,0.35);
    color: var(--danger);
}
.oos h2 { margin: 0 0 6px; font-size: 22px; font-family: var(--font-mono); letter-spacing: 0.04em; }
.oos p  { margin: 0; color: var(--text-dim); }

/* Build tab */
.build {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 16px;
}
@media (max-width: 980px) { .build { grid-template-columns: 1fr; } }
.build__hero {
    padding: 28px;
    border-radius: 12px;
    border: 1px solid var(--accent-ring);
    background:
        radial-gradient(800px 300px at 80% -20%, rgba(16,185,129,0.18), transparent 60%),
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
}
.build__hero h2 {
    font-family: var(--font-mono);
    font-size: 22px;
    margin: 0 0 6px;
    letter-spacing: 0.04em;
}
.build__hero .sub { color: var(--text-dim); margin: 0 0 18px; font-size: 14px; }
.build__meta {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
    margin-bottom: 22px;
}
.build__meta .item {
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
}
.build__meta .k {
    font-family: var(--font-mono);
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-dim);
}
.build__meta .v { font-family: var(--font-mono); color: var(--accent); margin-top: 4px; font-size: 13px; word-break: break-all; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(16,185,129,0.30); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgba(16,185,129,0.50); }
::-webkit-scrollbar-track { background: transparent; }

::selection { background: rgba(16,185,129,0.45); color: #03150e; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

@media (max-width: 720px) {
    .nav__links .nav__link { padding: 8px 12px; font-size: 14px; }
    .hero { padding: 80px 0 50px; }
    .dash { grid-template-columns: 64px 1fr; }
    .dash:has(.sidebar:hover) { grid-template-columns: 220px 1fr; }
    .sidebar { width: 100%; }
    .dash__main { padding: 20px 16px 60px; }
}
