@import url("app.css");
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&display=swap");

/* ════════════════════════════════════════════════════════════════════════
   MicSer — screen-specific styles
   ════════════════════════════════════════════════════════════════════════ */

/* ── Product wordmark — engineered grotesk, distinct from Poppins body ─── */
.brand-word, .auth-brand .w {
  font-family: "Space Grotesk", var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-word .v, .auth-brand .v {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0;
}

/* ── Auth (split-screen) ───────────────────────────────────────────────── */
.auth { display: grid; grid-template-columns: 1fr 460px; min-height: 100vh; }
.auth-left { position: relative; padding: 56px 60px; display: flex; flex-direction: column; justify-content: space-between; background: var(--earth-1); overflow: hidden; border-right: 1px solid var(--border-faint); }
.auth-left::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 80% at 18% 12%, rgba(39,66,42,0.5), transparent 60%); pointer-events: none; }
.auth-trace { position: absolute; left: 0; right: 0; bottom: 0; height: 240px; opacity: 0.5; pointer-events: none; }
.auth-brand { display: flex; align-items: center; gap: 11px; position: relative; z-index: 2; }
.auth-brand .brand-mark { width: 30px; height: 30px; }
.auth-brand .w { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: #fff; letter-spacing: -0.02em; }
.auth-brand .v { font-weight: 300; color: var(--fg-4); font-size: 12px; margin-left: 5px; }
.auth-hero { position: relative; z-index: 2; max-width: 460px; }
.auth-hero h1 { font-family: var(--font-display); font-weight: 200; font-size: 40px; line-height: 1.1; letter-spacing: -0.02em; color: #fff; margin: 0 0 16px; }
.auth-hero h1 em { font-style: normal; font-weight: 600; color: var(--brand-green-3); }
.auth-hero p { font-family: var(--font-body); font-size: 14.5px; line-height: 1.6; color: var(--fg-3); margin: 0; }
.auth-benefits { display: flex; flex-direction: column; gap: 2px; position: relative; z-index: 2; margin-top: 8px; }
.benefit { display: flex; gap: 15px; align-items: flex-start; padding: 17px 0; border-top: 1px solid var(--border-faint); }
.benefit:last-child { border-bottom: 1px solid var(--border-faint); }
.benefit-ic { width: 38px; height: 38px; border-radius: 9px; background: var(--earth-3); border: 1px solid var(--border-faint); display: flex; align-items: center; justify-content: center; color: var(--brand-green-3); flex-shrink: 0; }
.benefit-t { font-family: var(--font-display); font-weight: 500; font-size: 14px; color: #fff; }
.benefit-d { font-family: var(--font-body); font-size: 12.5px; color: var(--fg-3); margin-top: 3px; line-height: 1.5; }
.auth-foot { position: relative; z-index: 2; font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-5); white-space: nowrap; }

.auth-right { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--earth-2); }
.auth-card { width: 100%; max-width: 380px; }
.auth-card-head { margin-bottom: 24px; }
.auth-card-head h2 { font-family: var(--font-display); font-weight: 500; font-size: 22px; color: #fff; margin: 0 0 7px; letter-spacing: -0.01em; }
.auth-card-head p { font-family: var(--font-body); font-size: 13px; color: var(--fg-3); margin: 0; }
.auth-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 11px; border-radius: 6px; background: #fff; color: #1f2328; border: 0; font-family: var(--font-display); font-weight: 500; font-size: 13px; transition: opacity var(--dur-base); }
.auth-google:hover { opacity: 0.9; }
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 20px 0; color: var(--fg-5); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; background: var(--border-faint); flex: 1; }
.auth-fields { display: flex; flex-direction: column; gap: 15px; }
.auth-legal { font-family: var(--font-body); font-size: 11px; color: var(--fg-4); line-height: 1.55; margin-top: 16px; text-align: center; }
.auth-legal a { color: var(--brand-green-3); }
.auth-switch { margin-top: 20px; text-align: center; font-family: var(--font-body); font-size: 13px; color: var(--fg-3); }
.auth-switch a { color: var(--data-cyan); font-weight: 500; cursor: pointer; }
.input-wrap { position: relative; }
.input-eye { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--fg-4); cursor: pointer; background: none; border: 0; display: flex; }

/* ── Welcome / Onboarding ───────────────────────────────────────────────── */
.welcome { min-height: 100vh; display: flex; flex-direction: column; }
.welcome-top { display: flex; align-items: center; justify-content: space-between; padding: 22px 36px; border-bottom: 1px solid var(--border-faint); }
.welcome-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 44px 24px; }

.ob { width: 100%; max-width: 940px; }
.ob-head { margin-bottom: 26px; }
.ob-head .eyebrow { margin-bottom: 12px; }
.ob-head h1 { font-family: var(--font-display); font-weight: 200; font-size: 34px; color: #fff; letter-spacing: -0.02em; margin: 0 0 10px; }
.ob-head h1 em { font-style: normal; font-weight: 600; color: var(--brand-green-3); }
.ob-head p { font-family: var(--font-body); font-size: 14.5px; color: var(--fg-3); margin: 0; max-width: 560px; line-height: 1.55; }

.ob-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 880px) { .ob-grid { grid-template-columns: 1fr; } }

.ob-card { background: var(--earth-2); border: 1px solid var(--border-faint); border-radius: 12px; padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; }
.ob-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ob-card-title { font-family: var(--font-display); font-weight: 500; font-size: 17px; color: #fff; }
.ob-card-sub { font-family: var(--font-body); font-size: 12.5px; color: var(--fg-3); margin-top: 4px; }

.ob-steps { display: flex; flex-direction: column; }
.ob-step { display: flex; align-items: center; gap: 14px; padding: 15px 0; border-top: 1px solid var(--border-faint); }
.ob-step:first-child { border-top: 0; padding-top: 0; }
.ob-check { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--earth-3); border: 1px solid var(--border-faint); color: var(--fg-3); transition: background var(--dur-base), color var(--dur-base); }
.ob-check.cyan   { background: rgba(0,212,245,0.10);  border-color: rgba(0,212,245,0.35);   color: var(--data-cyan);     }
.ob-check.green  { background: rgba(39,66,42,0.60);   border-color: rgba(74,122,77,0.50);   color: var(--brand-green-3); }
.ob-check.violet { background: rgba(139,122,255,0.12);border-color: rgba(139,122,255,0.40); color: #A99BFF;              }
.ob-check.amber  { background: rgba(240,168,48,0.10); border-color: rgba(240,168,48,0.38);  color: var(--data-amber);    }
.ob-step-main { flex: 1; min-width: 0; }
.ob-step-title { font-family: var(--font-display); font-weight: 500; font-size: 14px; color: #fff; }
.ob-step-desc { font-family: var(--font-body); font-size: 12.5px; color: var(--fg-4); margin-top: 3px; line-height: 1.45; }

.ob-aside { display: flex; flex-direction: column; gap: 16px; }
.ob-cta-card { background: linear-gradient(160deg, rgba(0,212,245,0.08), var(--earth-2) 70%); border: 1px solid rgba(0,212,245,0.28); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.ob-cta-ic { width: 42px; height: 42px; border-radius: 11px; background: rgba(0,212,245,0.12); border: 1px solid rgba(0,212,245,0.35); color: var(--data-cyan); display: flex; align-items: center; justify-content: center; margin-bottom: 2px; }
.ob-cta-title { font-family: var(--font-display); font-weight: 500; font-size: 15px; color: #fff; }
.ob-cta-desc { font-family: var(--font-body); font-size: 12.5px; color: var(--fg-3); line-height: 1.5; margin-bottom: 6px; }

.ob-res { background: var(--earth-2); border: 1px solid var(--border-faint); border-radius: 12px; padding: 8px 10px 10px; }
.ob-res-head { font-family: var(--font-display); font-size: 9.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-5); padding: 11px 8px 8px; }
.ob-res-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 8px; border-radius: 8px; background: none; border: 0; text-align: left; cursor: pointer; transition: background var(--dur-base); }
.ob-res-row:hover { background: var(--earth-3); }
.ob-res-ic { width: 30px; height: 30px; border-radius: 8px; background: var(--earth-3); border: 1px solid var(--border-faint); color: var(--fg-3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ob-res-main { flex: 1; min-width: 0; }
.ob-res-t { display: block; font-family: var(--font-display); font-size: 13px; font-weight: 500; color: #fff; }
.ob-res-s { display: block; font-family: var(--font-body); font-size: 11.5px; color: var(--fg-4); margin-top: 2px; }

/* ── Quick Check ───────────────────────────────────────────────────────── */
.qc-wrap { max-width: 720px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 20px; }
.qc-counter { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-3); }
.qc-counter .bar { width: 120px; height: 5px; border-radius: 3px; background: var(--earth-4); overflow: hidden; }
.qc-counter .bar i { display: block; height: 100%; background: var(--data-cyan); border-radius: 3px; }

/* ── Scientific: scores + HVSR + criteria ──────────────────────────────── */
.result-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .result-grid { grid-template-columns: 1fr; } }

.hvsr-panel { padding: 18px 20px 14px; }
.hvsr-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.hvsr-legend { display: flex; gap: 16px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-3); }
.hvsr-legend span { display: inline-flex; align-items: center; gap: 7px; }
.hvsr-legend .ln { width: 16px; height: 0; border-top-width: 2px; border-top-style: solid; }
.hvsr-legend .bd { width: 14px; height: 9px; border-radius: 2px; }
.hvsr-svg { width: 100%; display: block; }
.hvsr-foot { display: flex; gap: 26px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-4); padding-top: 12px; margin-top: 10px; border-top: 1px solid var(--border-faint); }
.hvsr-foot b { color: #fff; font-family: var(--font-display); font-weight: 500; }
.hvsr-foot .k { color: var(--data-cyan); }

/* score readout cards */
.scorecards { display: flex; flex-direction: column; gap: 14px; }
.score-card { background: var(--earth-2); border: 1px solid var(--border-faint); border-radius: 8px; padding: 16px 18px; }
.score-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.score-name { font-family: var(--font-display); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3); }
.score-big { display: flex; align-items: baseline; gap: 4px; }
.score-big .n { font-family: var(--font-display); font-weight: 200; font-size: 42px; line-height: 1; color: #fff; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.score-big .d { font-family: var(--font-display); font-weight: 200; font-size: 20px; color: var(--fg-4); }
.score-meter { height: 7px; border-radius: 4px; background: var(--earth-4); overflow: hidden; margin-top: 12px; }
.score-meter i { display: block; height: 100%; border-radius: 4px; transition: width 700ms var(--ease-out); }
.score-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-4); }
.score-grade-card { display: flex; align-items: center; gap: 16px; }
.score-grade-info { flex: 1; }
.score-grade-label { font-family: var(--font-body); font-size: 12px; color: var(--fg-3); line-height: 1.5; }

/* criteria matrix */
.crit-panel { padding: 0; overflow: hidden; }
.crit-section-h { display: flex; justify-content: space-between; align-items: center; padding: 13px 18px; background: var(--earth-3); border-top: 1px solid var(--border-faint); border-bottom: 1px solid var(--border-faint); }
.crit-section-h .l { font-family: var(--font-display); font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-2); }
.crit-section-h .r { font-family: var(--font-mono); font-size: 11px; color: var(--fg-4); }
.crit-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--border-faint); }
.crit-row:last-child { border-bottom: 0; }
.crit-key { font-family: var(--font-mono); font-weight: 600; font-size: 13px; color: #fff; }
.crit-label { font-family: var(--font-display); font-size: 13px; color: var(--fg-1); font-weight: 400; }
.crit-formula { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-4); margin-top: 3px; }
.crit-result { display: flex; align-items: center; gap: 12px; }
.crit-weight { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-5); min-width: 56px; text-align: right; }
.crit-mark { width: 24px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.crit-mark.pass { background: rgba(34,197,94,0.14); color: #22C55E; }
.crit-mark.fail { background: rgba(225,29,72,0.14); color: #FB7185; }

.status-strip { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border-faint); }
.status-strip .lbl { font-family: var(--font-display); font-size: 13px; font-weight: 500; color: #fff; display: flex; align-items: center; gap: 9px; }
.status-strip .sub { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-4); margin-top: 3px; }

/* ── Dashboard ─────────────────────────────────────────────────────────── */
.dash-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .dash-grid { grid-template-columns: 1fr; } }
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.qa { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--earth-2); border: 1px solid var(--border-faint); border-radius: 8px; text-align: left; transition: border-color var(--dur-base), background var(--dur-base); }
.qa:hover:not(:disabled) { border-color: rgba(0,212,245,0.4); background: var(--earth-3); }
.qa:disabled { opacity: 0.5; cursor: not-allowed; }
.qa-ic { width: 36px; height: 36px; border-radius: 9px; background: var(--earth-3); border: 1px solid var(--border-faint); display: flex; align-items: center; justify-content: center; color: var(--brand-green-3); }
.qa-t { font-family: var(--font-display); font-size: 13px; font-weight: 500; color: #fff; }
.qa-d { font-family: var(--font-body); font-size: 11px; color: var(--fg-4); margin-top: 3px; }

.list-row { display: flex; align-items: center; gap: 13px; padding: 13px 4px; border-bottom: 1px solid var(--border-faint); cursor: pointer; transition: background var(--dur-base); border-radius: 5px; }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--earth-3); padding-left: 10px; padding-right: 10px; }
.list-ic { width: 34px; height: 34px; border-radius: 8px; background: var(--earth-3); border: 1px solid var(--border-faint); display: flex; align-items: center; justify-content: center; color: var(--fg-3); flex-shrink: 0; }
.list-main { flex: 1; min-width: 0; }
.list-t { font-family: var(--font-display); font-size: 13px; font-weight: 500; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-s { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-4); margin-top: 3px; }
.list-meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-4); text-align: right; white-space: nowrap; }

/* ── Projects grid ─────────────────────────────────────────────────────── */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.proj-card { background: var(--earth-2); border: 1px solid var(--border-faint); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; gap: 14px; cursor: pointer; transition: border-color var(--dur-base), transform var(--dur-base); }
.proj-card:hover { border-color: rgba(0,212,245,0.4); transform: translateY(-2px); }
.proj-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.proj-name { font-family: var(--font-display); font-weight: 500; font-size: 16px; color: #fff; letter-spacing: -0.01em; }
.proj-loc { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-4); margin-top: 4px; display: flex; align-items: center; gap: 5px; }
.proj-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding-top: 14px; border-top: 1px solid var(--border-faint); }
.pstat { display: flex; flex-direction: column; gap: 3px; }
.pstat .n { font-family: var(--font-display); font-weight: 300; font-size: 19px; color: #fff; font-variant-numeric: tabular-nums; line-height: 1; }
.pstat .l { font-family: var(--font-display); font-size: 8.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-5); }

/* ── Project workspace tabs ────────────────────────────────────────────── */
.ws-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border-faint); overflow-x: auto; }
.ws-tab { padding: 11px 15px; font-family: var(--font-display); font-size: 12.5px; font-weight: 400; color: var(--fg-3); border-bottom: 2px solid transparent; white-space: nowrap; display: flex; align-items: center; gap: 8px; background: none; border-top: 0; border-left: 0; border-right: 0; transition: color var(--dur-base); }
.ws-tab:hover { color: #fff; }
.ws-tab.active { color: #fff; border-bottom-color: var(--data-cyan); }
.ws-tab:disabled { opacity: 0.4; cursor: not-allowed; }
.ws-tab .lk { opacity: 0.6; }

.ov-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ov-kpi { background: var(--earth-2); border: 1px solid var(--border-faint); border-radius: 8px; padding: 16px 18px; }
.ov-kpi .l { font-family: var(--font-display); font-size: 9.5px; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase; color: var(--fg-4); }
.ov-kpi .n { font-family: var(--font-display); font-weight: 200; font-size: 32px; color: #fff; letter-spacing: -0.02em; margin-top: 8px; line-height: 1; font-variant-numeric: tabular-nums; }
.ov-kpi .n em { font-style: normal; font-size: 16px; color: var(--fg-4); margin-left: 4px; }
.ov-kpi .s { font-family: var(--font-mono); font-size: 10px; color: var(--fg-4); margin-top: 7px; }

/* dataset list in station detail */
.ds-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border-faint); border-radius: 8px; background: var(--earth-2); cursor: pointer; transition: border-color var(--dur-base), background var(--dur-base); }
.ds-row:hover { border-color: var(--border-strong); background: var(--earth-3); }
.ds-row.final { border-color: rgba(34,197,94,0.35); background: rgba(34,197,94,0.04); }
.ds-id { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: #fff; }
.ds-meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-4); margin-top: 4px; }
.ds-scores { display: flex; align-items: center; gap: 18px; }
.ds-score-item { text-align: right; }
.ds-score-item .v { font-family: var(--font-mono); font-size: 14px; color: #fff; font-weight: 500; }
.ds-score-item .k { font-family: var(--font-display); font-size: 8.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-5); margin-top: 2px; }
.section-label { font-family: var(--font-display); font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-4); margin: 4px 0 2px; display: flex; align-items: center; gap: 9px; }
.section-label .ct { font-family: var(--font-mono); color: var(--fg-5); letter-spacing: 0; }

/* metadata row */
.meta-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--border-faint); font-size: 12.5px; }
.meta-row:last-child { border-bottom: 0; }
.meta-row .k { font-family: var(--font-display); color: var(--fg-3); }
.meta-row .v { font-family: var(--font-mono); color: #fff; }

/* ── Bulk upload job ───────────────────────────────────────────────────── */
.job-card { background: var(--earth-2); border: 1px solid var(--border-faint); border-radius: 10px; padding: 22px; }
.job-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.job-progress { height: 8px; border-radius: 5px; background: var(--earth-4); overflow: hidden; margin: 14px 0 8px; }
.job-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--data-cyan-deep), var(--data-cyan)); border-radius: 5px; transition: width 400ms var(--ease-out); }
.job-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 18px; }
.job-stat { background: var(--earth-1); border: 1px solid var(--border-faint); border-radius: 7px; padding: 13px 14px; }
.job-stat .n { font-family: var(--font-display); font-weight: 200; font-size: 26px; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; }
.job-stat .n.ok { color: #5FE08A; }
.job-stat .n.bad { color: #FB7185; }
.job-stat .l { font-family: var(--font-display); font-size: 8.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-5); margin-top: 8px; }
.job-steps { display: flex; gap: 6px; margin-top: 4px; }
.job-step { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.job-step .bar { height: 3px; border-radius: 2px; background: var(--earth-4); }
.job-step.done .bar { background: var(--data-green); }
.job-step.active .bar { background: var(--data-cyan); animation: pulse 1.4s ease-in-out infinite; }
.job-step .lbl { font-family: var(--font-mono); font-size: 9.5px; color: var(--fg-5); text-transform: uppercase; letter-spacing: 0.08em; }
.job-step.done .lbl, .job-step.active .lbl { color: var(--fg-3); }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: 0.4 } }

/* ── Metadata mapping ──────────────────────────────────────────────────── */
.map-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.map-col-row { display: grid; grid-template-columns: 1fr 28px 1fr; gap: 10px; align-items: center; padding: 9px 0; }
.map-col-src { font-family: var(--font-mono); font-size: 12px; color: #fff; background: var(--earth-1); border: 1px solid var(--border-faint); border-radius: 5px; padding: 9px 11px; }
.map-arrow { color: var(--fg-5); display: flex; justify-content: center; }
.utm-chip { font-family: var(--font-mono); font-weight: 600; font-size: 17px; color: #fff; background: var(--earth-1); border: 1px solid var(--border-strong); border-radius: 6px; padding: 8px 13px; letter-spacing: 0.05em; }
.input.invalid, .select.invalid { border-color: rgba(225,29,72,0.6); box-shadow: 0 0 0 2px rgba(225,29,72,0.14); }

/* ── Map module ────────────────────────────────────────────────────────── */
.mapmod { display: grid; grid-template-columns: 1fr 270px; gap: 0; flex: 1; min-height: 0; border: 1px solid var(--border-faint); border-radius: 8px; overflow: hidden; }
.map-stage { position: relative; background: var(--earth-1); height: 560px; }
/* Only target the legacy SVG canvas — never Leaflet's internal SVG elements */
.map-stage > svg { width: 100%; height: 100%; display: block; }
/* Leaflet container fills the stage, internal SVGs must NOT be resized */
.map-stage .leaflet-container { width: 100% !important; height: 100% !important; background: #0a1628; }
.map-stage .leaflet-container svg { width: auto !important; height: auto !important; }
.map-side { background: var(--earth-2); border-left: 1px solid var(--border-faint); padding: 18px; display: flex; flex-direction: column; gap: 18px; overflow-y: auto; }
.layer-list { display: flex; flex-direction: column; gap: 2px; }
.layer-item { display: flex; align-items: center; gap: 11px; padding: 10px 11px; border-radius: 6px; font-family: var(--font-display); font-size: 13px; color: var(--fg-2); border: 1px solid transparent; transition: background var(--dur-base); background: none; width: 100%; text-align: left; }
.layer-item:hover { background: var(--earth-3); }
.layer-item.active { background: rgba(0,212,245,0.08); border-color: rgba(0,212,245,0.3); color: #fff; }
.layer-num { font-family: var(--font-mono); font-size: 10px; color: var(--fg-5); width: 14px; }
.layer-ramp { height: 9px; border-radius: 3px; border: 1px solid var(--border-faint); margin-top: 6px; }
.map-toggle { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-top: 1px solid var(--border-faint); border-bottom: 1px solid var(--border-faint); }
.switch { width: 38px; height: 21px; border-radius: 999px; background: var(--earth-4); position: relative; transition: background var(--dur-base); flex-shrink: 0; border: 0; }
.switch.on { background: var(--brand-green-3); }
.switch i { position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 999px; background: #fff; transition: transform var(--dur-base); }
.switch.on i { transform: translateX(17px); }
.map-popup { position: absolute; background: rgba(15,27,46,0.96); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; min-width: 210px; backdrop-filter: blur(10px); box-shadow: var(--elev-3); z-index: 5; }
.map-popup .h { font-family: var(--font-display); font-weight: 500; font-size: 13.5px; color: #fff; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.map-popup .rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.map-popup .pr { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11px; }
.map-popup .pr .k { color: var(--fg-4); }
.map-popup .pr .v { color: #fff; }

/* ── Activity timeline ─────────────────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; }
.tl-item { display: grid; grid-template-columns: 150px 1fr; gap: 18px; padding: 4px 0; }
.tl-time { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-4); text-align: right; padding-top: 14px; }
.tl-track { position: relative; padding: 14px 0 14px 26px; border-left: 1px solid var(--border-faint); }
.tl-dot { position: absolute; left: -5px; top: 18px; width: 9px; height: 9px; border-radius: 999px; background: var(--earth-5); border: 2px solid var(--earth-1); }
.tl-dot.green { background: var(--data-green); }
.tl-dot.cyan { background: var(--data-cyan); }
.tl-dot.amber { background: var(--data-amber); }
.tl-body { display: flex; align-items: center; gap: 12px; }
.tl-event { font-family: var(--font-display); font-size: 13px; color: #fff; font-weight: 500; }
.tl-detail { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); margin-top: 3px; }
.tl-actor { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-4); margin-left: auto; white-space: nowrap; }

/* ── Settings ──────────────────────────────────────────────────────────── */
.settings-grid { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: start; }
.settings-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 78px; }
.settings-nav button { text-align: left; padding: 9px 12px; border-radius: 6px; font-family: var(--font-display); font-size: 13px; color: var(--fg-3); background: none; border: 0; transition: background var(--dur-base), color var(--dur-base); }
.settings-nav button:hover { background: var(--earth-3); color: #fff; }
.settings-nav button.active { background: var(--earth-3); color: #fff; }
.kv-grid { display: grid; grid-template-columns: 180px 1fr; gap: 16px 20px; align-items: center; }
.member-row { display: flex; align-items: center; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--border-faint); }
.member-row:last-child { border-bottom: 0; }

/* role switcher (demo control) */
.role-switch { display: flex; align-items: center; gap: 8px; background: var(--earth-2); border: 1px solid var(--border-faint); border-radius: 6px; padding: 4px; }
.role-switch .rs-lbl { font-family: var(--font-display); font-size: 9.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-5); padding: 0 6px; }
.role-pick { font-family: var(--font-display); font-size: 11.5px; font-weight: 500; color: var(--fg-3); padding: 5px 10px; border-radius: 4px; background: none; border: 0; transition: background var(--dur-base), color var(--dur-base); }
.role-pick:hover { color: #fff; }
.role-pick.on { background: var(--brand-green); color: #fff; }

.demo-bar { display: flex; align-items: center; gap: 14px; padding: 8px 32px; background: rgba(0,212,245,0.05); border-bottom: 1px solid rgba(0,212,245,0.18); font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-4); }
.demo-bar .lbl { display: flex; align-items: center; gap: 7px; color: var(--data-cyan); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
