/* ============================================================
   SCREEN-SPECIFIC STYLES — phone form, login, map, console
   ============================================================ */

/* ---------- PHONE FRAME (digitador, mobile-first) ---------- */
.phone-stage {
  min-height: 100%;
  display: flex; justify-content: center; align-items: flex-start;
  padding: 26px 16px 60px;
  gap: 34px;
}
.phone {
  width: 392px; flex: 0 0 392px;
  border-radius: 46px;
  background: #02060F;
  padding: 11px;
  box-shadow: var(--shadow-pop), inset 0 0 0 1px rgba(255,255,255,.05);
  position: sticky; top: 26px;
}
.phone-screen {
  position: relative;
  width: 100%; height: 760px;
  border-radius: 36px; overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  display: flex; flex-direction: column;
}
.phone-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 130px; height: 26px; background: #02060F; border-radius: 0 0 16px 16px; z-index: 20; }

/* phone status bar */
.ph-status { height: 36px; flex: 0 0 36px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; font-family: var(--ff-mono); font-size: 12px; font-weight: 600; color: var(--ink); }
.ph-status .sig { display: flex; gap: 5px; align-items: center; }

/* digitador header (navy) */
.dg-head { background: var(--navy-900); color: #fff; padding: 12px 16px 14px; flex: 0 0 auto; }
.dg-head-top { display: flex; align-items: center; justify-content: space-between; }
.dg-user { display: flex; align-items: center; gap: 9px; }
.dg-user .role-ava { width: 30px; height: 30px; border-radius: 8px; }
.dg-user b { font-size: 13px; display:block; }
.dg-user small { font-size: 10.5px; color: var(--steel-300); font-family: var(--ff-mono); }
.dg-secure { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: #7CE3B4; font-weight: 600; }
.dg-secure svg { width: 12px; height: 12px; }

/* stepper */
.stepper { display: flex; gap: 6px; margin-top: 14px; }
.step-seg { flex: 1; }
.step-seg .s-bar { height: 4px; border-radius: 4px; background: rgba(255,255,255,.16); overflow: hidden; }
.step-seg .s-bar > i { display: block; height: 100%; background: var(--mag-500); width: 0; transition: width .35s; }
.step-seg.done .s-bar > i { width: 100%; }
.step-seg.active .s-bar > i { width: 100%; background: var(--mag-400); }
.step-seg .s-lbl { font-size: 9px; font-family: var(--ff-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--steel-400); margin-top: 6px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-seg.active .s-lbl, .step-seg.done .s-lbl { color: #fff; }

/* form body */
.dg-body { flex: 1; overflow-y: auto; padding: 18px 16px 16px; background: var(--paper); }
.dg-foot { flex: 0 0 auto; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--paper-line); display: flex; gap: 10px; }

.block-title { font-size: 11px; font-family: var(--ff-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mag-600); font-weight: 600; }
.block-sub { font-size: 18px; font-weight: 600; color: var(--ink); margin: 4px 0 16px; letter-spacing: -.01em; }

/* light field */
.field { margin-bottom: 15px; }
.field > label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.field .req { color: var(--mag-600); }
.input-wrap { position: relative; display: flex; align-items: center; }
.inp {
  width: 100%; height: 50px; border-radius: 11px; border: 1.5px solid var(--paper-line);
  background: #fff; color: var(--ink); font-size: 16px; padding: 0 14px;
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.inp::placeholder { color: var(--ink-faint); }
.inp:focus { border-color: var(--mag-500); box-shadow: 0 0 0 4px var(--mag-soft); }
.inp.ok { border-color: var(--ok); }
.inp.err { border-color: var(--danger); }
.inp.has-suffix { padding-right: 44px; }
textarea.inp { height: auto; min-height: 86px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.inp-icon { position: absolute; right: 13px; display: grid; place-items: center; }
.inp-icon svg { width: 19px; height: 19px; }
.field-msg { display: flex; align-items: center; gap: 6px; font-size: 12px; margin-top: 6px; font-weight: 500; }
.field-msg svg { width: 14px; height: 14px; flex: 0 0 auto; }
.field-msg.err { color: var(--danger); }
.field-msg.ok { color: var(--ok); }
.field-msg.hint { color: var(--ink-faint); font-weight: 400; }
.field-row { display: flex; gap: 11px; }
.field-row > .field { flex: 1; }

/* light segmented (perception/support) */
.choices { display: flex; gap: 8px; }
.choices.col { flex-direction: column; }
.choice {
  flex: 1; min-height: 48px; border-radius: 11px; border: 1.5px solid var(--paper-line);
  background: #fff; color: var(--ink-soft); font-size: 13.5px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 6px;
  transition: all .12s;
}
.choice:hover { border-color: var(--ink-faint); }
.choice.sel { border-color: var(--ink); background: var(--navy-900); color: #fff; }
.choice.sel.good { border-color: var(--ok); background: var(--ok); }
.choice.sel.bad { border-color: var(--danger); background: var(--danger); }
.choice.sel.mid { border-color: var(--warn); background: var(--warn); color: #2A2300; }
.choice.sel.mag { border-color: var(--mag-500); background: var(--mag-500); color: #fff; box-shadow: 0 6px 18px var(--mag-glow); }
.choice .ck { width: 17px; height: 17px; }

/* multi-select chips (problems) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 40px; padding: 0 14px; border-radius: 30px;
  border: 1.5px solid var(--paper-line); background: #fff; color: var(--ink-soft);
  font-size: 13px; font-weight: 600; transition: all .12s;
}
.chip:hover { border-color: var(--ink-faint); }
.chip.sel { border-color: var(--navy-700); background: var(--navy-900); color: #fff; }
.chip.sel .chip-x { opacity: 1; }
.chip-dot { width: 9px; height: 9px; border-radius: 50%; }

/* checkbox */
.checkrow { display: flex; align-items: center; gap: 11px; padding: 12px; border: 1.5px solid var(--paper-line); border-radius: 11px; background: #fff; cursor: pointer; }
.checkrow:hover { border-color: var(--ink-faint); }
.checkrow.on { border-color: var(--mag-500); background: var(--mag-soft); }
.cbox { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--paper-line); background: #fff; display: grid; place-items: center; flex: 0 0 auto; }
.checkrow.on .cbox { background: var(--mag-500); border-color: var(--mag-500); }
.cbox svg { width: 14px; height: 14px; color: #fff; opacity: 0; }
.cbox.on { background: var(--mag-500); border-color: var(--mag-500); }
.cbox.on svg { opacity: 1; }
.checkrow.on .cbox svg { opacity: 1; }
.checkrow .cr-txt b { font-size: 14px; color: var(--ink); display: block; }
.checkrow .cr-txt small { font-size: 11.5px; color: var(--ink-faint); }

/* ====== SECTOR RESULT BOX — the hero ====== */
.sector-box {
  border-radius: 16px; padding: 16px;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-800));
  border: 2px solid var(--mag-500);
  box-shadow: 0 10px 34px var(--mag-glow);
  position: relative; overflow: hidden;
}
.sector-box::before { content:""; position:absolute; right:-30px; top:-30px; width:120px; height:120px; border-radius:50%; background: var(--mag-soft); }
.sb-top { display: flex; align-items: center; gap: 8px; }
.sb-top .pin { font-size: 18px; }
.sb-label { font-size: 10.5px; font-family: var(--ff-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--mag-400); font-weight: 600; }
.sb-result { display: flex; align-items: baseline; gap: 12px; margin: 10px 0 4px; flex-wrap: wrap; }
.sb-sector { font-size: 30px; font-weight: 700; color: #fff; letter-spacing: -.02em; line-height: 1; }
.sb-quad { font-family: var(--ff-mono); font-size: 22px; font-weight: 600; color: var(--mag-400); }
.sb-addr { font-size: 12px; color: var(--steel-300); position: relative; z-index: 1; }
.sb-actions { display: flex; gap: 9px; margin-top: 14px; position: relative; z-index: 1; }
.sb-edit { flex: 1; height: 40px; border-radius: 9px; background: rgba(255,255,255,.07); border: 1px solid var(--mag-line); color: #fff; font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; }
.sb-conf { width: 44px; flex: 0 0 44px; border-radius: 9px; background: var(--mag-500); border: none; color: #fff; display: grid; place-items: center; }
.sector-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 12px; position: relative; z-index: 1; }
.sector-grid button { height: 46px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--navy-850); color: var(--steel-200); font-weight: 700; font-family: var(--ff-mono); font-size: 14px; display:flex; flex-direction: column; align-items:center; justify-content:center; gap:1px;}
.sector-grid button small { font-size: 8.5px; font-weight: 500; color: var(--steel-500); letter-spacing: .04em; }
.sector-grid button:hover { border-color: var(--mag-line); }
.sector-grid button.sel { background: var(--mag-500); border-color: var(--mag-400); color: #fff; }
.sector-grid button.sel small { color: rgba(255,255,255,.8); }
.quad-row { display:flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; position: relative; z-index:1; }
.quad-pill { height: 30px; padding: 0 10px; border-radius: 7px; background: var(--navy-850); border: 1px solid var(--line-strong); color: var(--steel-300); font-family: var(--ff-mono); font-size: 12px; font-weight: 600; }
.quad-pill.sel { background: var(--mag-soft); border-color: var(--mag-500); color: var(--mag-400); }

/* success overlay */
.save-ov { position: absolute; inset: 0; background: rgba(6,15,34,.72); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 30; padding: 24px; }
.save-card { background: var(--paper); border-radius: 20px; padding: 28px 24px; text-align: center; width: 100%; box-shadow: var(--shadow-pop); }
.save-ring { width: 78px; height: 78px; margin: 0 auto 16px; border-radius: 50%; background: var(--ok-soft); display: grid; place-items: center; }
.save-ring svg { width: 40px; height: 40px; color: var(--ok); }
.save-card h3 { margin: 0 0 6px; font-size: 20px; color: var(--ink); }
.save-card p { margin: 0 0 6px; font-size: 13px; color: var(--ink-soft); }
.save-id { font-family: var(--ff-mono); font-size: 13px; color: var(--mag-600); font-weight: 600; background: var(--mag-soft); display: inline-block; padding: 4px 10px; border-radius: 7px; margin: 8px 0 18px; }

/* day history side panel (desktop) */
.dg-aside { width: 300px; flex: 0 0 300px; }
@media (max-width: 880px) { .dg-aside { display: none; } }

/* ============================================================
   LOGIN
   ============================================================ */
.login-stage { min-height: 100%; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art {
  position: relative; overflow: hidden; padding: 48px;
  background:
    radial-gradient(800px 500px at 30% 20%, rgba(41,75,133,.5), transparent 60%),
    linear-gradient(160deg, var(--navy-900), var(--navy-950));
  display: flex; flex-direction: column; justify-content: space-between;
  border-right: 1px solid var(--line);
}
.login-art .la-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 46px 46px; mask-image: radial-gradient(600px 500px at 40% 40%, #000, transparent 75%); opacity: .6; }
.login-art .la-mag { position: absolute; bottom: -120px; left: -80px; width: 360px; height: 360px; border-radius: 50%; background: var(--mag-soft); filter: blur(20px); }
.login-art-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.login-art-mid { position: relative; z-index: 1; }
.login-art-mid h1 { font-size: 40px; line-height: 1.05; letter-spacing: -.02em; margin: 0 0 16px; max-width: 14ch; }
.login-art-mid h1 .mag { color: var(--mag-400); }
.login-art-mid p { font-size: 15px; color: var(--steel-300); max-width: 40ch; line-height: 1.6; }
.login-art-foot { position: relative; z-index: 1; display: flex; gap: 22px; }
.la-stat b { font-size: 22px; font-weight: 700; display: block; font-family: var(--ff-mono); }
.la-stat small { font-size: 11px; color: var(--steel-400); }

.login-form-wrap { display: grid; place-items: center; padding: 40px; }
.login-card { width: 100%; max-width: 392px; }
.login-card h2 { font-size: 24px; margin: 0 0 6px; letter-spacing: -.01em; }
.login-card .sub { font-size: 13.5px; color: var(--steel-400); margin: 0 0 26px; }

/* dark fields for login */
.dfield { margin-bottom: 16px; }
.dfield label { display: block; font-size: 12.5px; font-weight: 600; color: var(--steel-300); margin-bottom: 7px; }
.dinp { width: 100%; height: 50px; border-radius: 11px; border: 1.5px solid var(--line-strong); background: rgba(6,15,34,.5); color: #fff; font-size: 15px; padding: 0 14px; outline: none; transition: border-color .15s, box-shadow .15s; }
.dinp:focus { border-color: var(--mag-500); box-shadow: 0 0 0 4px var(--mag-soft); }
.dinp::placeholder { color: var(--steel-500); }

/* 2FA code */
.otp { display: flex; gap: 10px; justify-content: space-between; margin: 8px 0 6px; }
.otp input { width: 100%; height: 62px; text-align: center; font-family: var(--ff-mono); font-size: 26px; font-weight: 600; border-radius: 12px; border: 1.5px solid var(--line-strong); background: rgba(6,15,34,.5); color: #fff; outline: none; }
.otp input:focus { border-color: var(--mag-500); box-shadow: 0 0 0 4px var(--mag-soft); }
.otp input.filled { border-color: var(--navy-500); }

.alert-bar { display: flex; gap: 12px; padding: 14px; border-radius: 12px; background: var(--danger-soft); border: 1px solid rgba(229,72,77,.45); margin-bottom: 20px; }
.alert-bar .ab-ico { width: 38px; height: 38px; border-radius: 9px; background: rgba(229,72,77,.2); display: grid; place-items: center; flex: 0 0 auto; }
.alert-bar .ab-ico svg { width: 20px; height: 20px; color: #FF9A9D; }
.alert-bar b { font-size: 13px; color: #FFC9CB; display: block; margin-bottom: 3px; }
.alert-bar p { font-size: 12px; color: #FF9A9D; margin: 0; line-height: 1.5; }
.alert-bar .ab-meta { font-family: var(--ff-mono); font-size: 11px; color: #FF9A9D; margin-top: 7px; }

@media (max-width: 860px) { .login-stage { grid-template-columns: 1fr; } .login-art { display: none; } }

/* ============================================================
   DESKTOP WORKSPACE (supervisor / admin / dashboard)
   ============================================================ */
.work { display: grid; grid-template-columns: 220px 1fr; min-height: 100%; }
.side {
  background: linear-gradient(180deg, var(--navy-925), var(--navy-950));
  border-right: 1px solid var(--line); padding: 16px 12px; position: sticky; top: 0;
}
.side-sec { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--steel-500); font-family: var(--ff-mono); padding: 14px 10px 8px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 10px 11px; border-radius: 9px; color: var(--steel-300); font-size: 13.5px; font-weight: 500; cursor: pointer; }
.nav-item svg { width: 18px; height: 18px; opacity: .8; }
.nav-item:hover { background: var(--navy-850); color: var(--steel-100); }
.nav-item.active { background: var(--mag-soft); color: #fff; }
.nav-item.active svg { color: var(--mag-400); opacity: 1; }
.nav-item .count { margin-left: auto; font-family: var(--ff-mono); font-size: 11px; background: var(--navy-700); padding: 1px 7px; border-radius: 20px; color: var(--steel-200); }
.nav-item.active .count { background: var(--mag-500); color: #fff; }

.work-main { padding: 22px 26px 40px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; margin: 6px 0 0; letter-spacing: -.01em; }
.page-head p { margin: 4px 0 0; font-size: 13px; color: var(--steel-400); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* search */
.search { display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 13px; border-radius: 10px; background: var(--navy-850); border: 1px solid var(--line); color: var(--steel-300); min-width: 240px; }
.search svg { width: 16px; height: 16px; }
.search input { background: transparent; border: none; outline: none; color: #fff; font-size: 13px; width: 100%; }

.grid-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.cols-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .cols-2 { grid-template-columns: 1fr; } }

/* avatar dot */
.ava-sm { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 11px; font-weight: 700; font-family: var(--ff-mono); color: #fff; flex: 0 0 auto; }

/* ===== Permission matrix ===== */
.matrix-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.matrix { width: 100%; border-collapse: collapse; min-width: 720px; }
.matrix th { padding: 12px 10px; font-size: 10.5px; font-family: var(--ff-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--steel-400); border-bottom: 1px solid var(--line); font-weight: 500; text-align: center; vertical-align: bottom; }
.matrix th.usr { text-align: left; width: 230px; }
.matrix td { padding: 10px; border-bottom: 1px solid var(--line); text-align: center; }
.matrix td.usr { text-align: left; }
.matrix tr:hover td { background: rgba(146,170,214,.04); }
.matrix .uc { display: flex; align-items: center; gap: 10px; }
.matrix .uc b { font-size: 13px; color: var(--steel-100); display: block; }
.matrix .uc small { font-size: 11px; color: var(--steel-500); font-family: var(--ff-mono); display: block; margin-top: 1px; }
.sw-cell { display: inline-flex; }

/* ===== Audit timeline ===== */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content:""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 18px; }
.tl-dot { position: absolute; left: -23px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--navy-700); border: 2px solid var(--navy-925); }
.tl-dot.mag { background: var(--mag-500); }
.tl-dot.ok { background: var(--ok); }
.tl-dot.danger { background: var(--danger); }
.tl-dot.warn { background: var(--warn); }
.tl-time { font-family: var(--ff-mono); font-size: 11px; color: var(--steel-500); }
.tl-body { font-size: 13px; color: var(--steel-200); margin-top: 2px; line-height: 1.5; }
.tl-body b { color: #fff; font-weight: 600; }
.tl-body .who { color: var(--mag-400); font-weight: 600; }
.tl-meta { font-family: var(--ff-mono); font-size: 10.5px; color: var(--steel-500); margin-top: 4px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ============================================================
   WAR ROOM / MAP
   ============================================================ */
.warroom { background: radial-gradient(900px 600px at 70% 0%, rgba(41,75,133,.25), transparent 60%), var(--navy-950); min-height: 100%; }
.wr-grid { display: grid; grid-template-columns: 1fr 372px; gap: 18px; padding: 14px 24px 40px; }
@media (max-width: 1180px) { .wr-grid { grid-template-columns: 1fr; } }

/* ===== Drill-down command center ===== */
.drill-crumb { display: flex; align-items: center; gap: 8px; padding: 8px 24px 2px; flex-wrap: wrap; }
.crumb { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 8px; background: var(--navy-850); border: 1px solid var(--line); color: var(--steel-300); font-size: 12.5px; font-weight: 600; }
.crumb:hover { border-color: var(--mag-line); color: var(--steel-100); }
.crumb.active { background: var(--mag-soft); border-color: var(--mag-line); color: #fff; }
.crumb svg { opacity: .8; }
.wr-side { display: flex; flex-direction: column; align-self: start; }
.map-back { position: absolute; bottom: 14px; right: 14px; z-index: 6; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 9px; background: rgba(13,24,64,.86); border: 1px solid var(--line-strong); color: var(--steel-100); font-size: 12.5px; font-weight: 600; backdrop-filter: blur(8px); }
.map-back:hover { border-color: var(--mag-line); }
.rank-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px; border-radius: 10px; background: transparent; border: 1px solid transparent; text-align: left; }
.rank-row:hover { background: var(--navy-850); border-color: var(--line); }
.rank-n { width: 24px; height: 24px; flex: 0 0 auto; border-radius: 7px; display: grid; place-items: center; font-family: var(--ff-mono); font-size: 12px; font-weight: 700; background: var(--navy-800); color: var(--steel-300); }
.rank-n.top { background: var(--mag-500); color: #fff; }
.funnel-bar { height: 18px; border-radius: 5px; background: var(--navy-850); overflow: hidden; }
.funnel-bar > i { display: block; height: 100%; border-radius: 5px; transition: width .5s; }
.quad-list { display: flex; flex-direction: column; gap: 8px; }
.quad-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 11px; border-radius: 11px; background: var(--navy-850); border: 1px solid var(--line); text-align: left; }
.quad-item:hover { border-color: var(--mag-line); background: var(--navy-800); }
.quad-code { font-family: var(--ff-mono); font-weight: 700; font-size: 14px; color: #fff; background: var(--navy-700); padding: 5px 9px; border-radius: 7px; flex: 0 0 auto; }
.map-card { position: relative; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); background: linear-gradient(180deg, var(--navy-925), var(--navy-950)); min-height: 560px; }
.map-toolbar { position: absolute; top: 14px; left: 14px; right: 14px; z-index: 5; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; pointer-events: none; }
.map-toolbar > * { pointer-events: auto; }
.layer-stack { display: flex; flex-direction: column; gap: 7px; }
.layer-toggle { display: flex; align-items: center; gap: 9px; height: 36px; padding: 0 12px 0 10px; border-radius: 9px; background: rgba(10,23,48,.82); border: 1px solid var(--line-strong); color: var(--steel-200); font-size: 12.5px; font-weight: 600; backdrop-filter: blur(8px); }
.layer-toggle:hover { border-color: var(--mag-line); }
.layer-toggle.on { color: #fff; }
.layer-swatch { width: 12px; height: 12px; border-radius: 4px; }
.layer-toggle .switch { width: 32px; height: 19px; margin-left: 4px; }
.layer-toggle .switch::after { width: 13px; height: 13px; }
.layer-toggle .switch.on::after { transform: translateX(13px); }

.map-svg { width: 100%; height: 100%; display: block; }
.sector-poly { stroke: var(--navy-950); stroke-width: 2.5; cursor: pointer; transition: fill .3s, stroke .15s; }
.sector-poly:hover { stroke: var(--mag-400); stroke-width: 3.5; }
.sector-poly.sel { stroke: var(--mag-400); stroke-width: 4; }
.sector-num { font-family: var(--ff-mono); font-weight: 700; fill: #fff; text-anchor: middle; pointer-events: none; }
.sector-sub { font-family: var(--ff-mono); font-size: 10px; fill: rgba(255,255,255,.7); text-anchor: middle; pointer-events: none; }
.map-marker { pointer-events: none; }

.legend { position: absolute; bottom: 14px; left: 14px; z-index: 5; background: rgba(10,23,48,.82); border: 1px solid var(--line-strong); border-radius: 10px; padding: 11px 13px; backdrop-filter: blur(8px); }
.legend-h { font-size: 10px; font-family: var(--ff-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--steel-400); margin-bottom: 8px; }
.legend-row { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--steel-200); margin-top: 5px; }
.legend-row i { width: 22px; height: 9px; border-radius: 3px; }

/* sector detail panel */
.sd-card { padding: 16px; }
.sd-head { display: flex; align-items: center; justify-content: space-between; }
.sd-sector { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.sd-stat { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.sd-stat:last-child { border-bottom: none; }
.sd-stat .lbl { font-size: 12.5px; color: var(--steel-300); }
.sd-stat .val { font-family: var(--ff-mono); font-weight: 600; font-size: 14px; }
.mini-bar { height: 6px; border-radius: 6px; background: var(--navy-800); overflow: hidden; margin-top: 4px; width: 90px; }
.mini-bar > i { display: block; height: 100%; }

.read-only-pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 30px; background: var(--navy-800); border: 1px solid var(--line-strong); color: var(--steel-300); font-size: 11px; font-weight: 600; }
.read-only-pill svg { width: 13px; height: 13px; }

/* empty state */
.empty { text-align: center; padding: 50px 20px; color: var(--steel-400); }
.empty .e-ico { width: 56px; height: 56px; border-radius: 14px; background: var(--navy-800); display: grid; place-items: center; margin: 0 auto 14px; }
.empty .e-ico svg { width: 26px; height: 26px; color: var(--steel-500); }
.empty h4 { color: var(--steel-200); margin: 0 0 5px; font-size: 15px; }
.empty p { margin: 0; font-size: 12.5px; max-width: 30ch; margin: 0 auto; }

/* fade-in */
@keyframes fadeUp { from { transform: translateY(9px);} to { transform: none; } }
/* Animate transform only — never opacity. A background iframe can freeze the
   animation clock at frame 0; keeping opacity out of the keyframes guarantees
   content stays visible regardless. */
.fade-up { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .fade-up { animation: fadeUp .32s ease; }
}
