:root {
  --forest: #0b7a43;
  --forest-deep: #05321c;
  --forest-mid: #0f5c34;
  --red: #c8102e;
  --paper: #f6f1e8;
  --cream: #fffdf8;
  --ink: #14160f;
  --muted: #5d6356;
  --line: #d8d0c2;
  --apc: #89CFF0;
  --adc: #0b7a43;
  --ndc: #0A3161;
  --display: "Fraunces", "Times New Roman", serif;
  --sans: "Outfit", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--display); font-weight: 500; text-wrap: balance; }
a { color: var(--forest); }
button, [type=submit] { cursor: pointer; font-family: inherit; }
.tricolor { display: flex; height: 4px; }
.tricolor span { flex: 1; }
.tricolor .g { background: var(--forest); }
.tricolor .w { background: var(--cream); }
.tricolor .r { background: var(--red); }

.login-body { background: var(--forest-deep); color: var(--cream); min-height: 100vh; }
.login-wrap {
  max-width: 1100px; margin: 0 auto; min-height: 100vh;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 48px; padding: 32px 16px;
}
.hero { width: 400px; max-width: 100%; }
.hero-frame { width: 400px; height: 600px; max-width: 100%; position: relative; overflow: hidden; border-radius: 16px; }
.hero-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s; }
.hero-frame img.on { opacity: 1; }
.hero-frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; background: var(--cream); }
.hero-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px; background: linear-gradient(transparent, #05321ccc); color: var(--cream); font-family: var(--display); }
.card {
  background: var(--paper); color: var(--ink); border-radius: 22px; padding: 32px; width: 100%; max-width: 420px;
  box-shadow: 0 16px 40px #0003;
}
.eyebrow { letter-spacing: .18em; text-transform: uppercase; font-size: 11px; color: var(--red); font-weight: 600; }
label { display: block; font-size: 14px; font-weight: 500; margin-top: 14px; }
input, select, textarea {
  width: 100%; height: 44px; margin-top: 6px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--cream); padding: 0 12px; font: inherit; color: var(--ink);
}
textarea { height: 88px; padding: 10px 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 16px;
  border: 0; border-radius: 8px; background: var(--forest); color: var(--cream); font-weight: 500;
}
.btn.outline { background: var(--cream); color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: var(--red); }
.btn.wide { width: 100%; margin-top: 16px; }
.err { color: var(--red); font-size: 14px; }
.muted { color: var(--muted); font-size: 13px; }
.demo-list { max-height: 160px; overflow: auto; }
.demo-list button {
  width: 100%; display: flex; justify-content: space-between; background: none; border: 0;
  padding: 8px; font-size: 12px; text-align: left;
}
.demo-list button:hover { background: var(--cream); }

.shell { display: flex; min-height: 100vh; }
aside {
  width: 240px; background: var(--forest-deep); color: var(--cream); position: relative; flex-shrink: 0;
}
aside .brand { display: flex; align-items: center; gap: 12px; padding: 20px; }
aside nav a {
  display: flex; align-items: center; height: 44px; padding: 0 16px; margin: 2px 12px; border-radius: 8px;
  color: #f6f1e8cc; text-decoration: none; font-size: 14px;
}
aside nav a.on, aside nav a:hover { background: var(--cream); color: var(--forest-deep); }
aside .who { position: absolute; bottom: 0; left: 0; right: 0; padding: 16px; border-top: 1px solid #fff2; }
main.page { flex: 1; min-width: 0; padding: 24px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.kpi { background: var(--cream); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.kpi b { display: block; font-family: var(--display); font-size: 22px; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.panel { background: var(--cream); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-top: 16px; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td { padding: 8px 10px; border-top: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.data thead { background: var(--paper); }
.slicers { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 12px 0; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; background: #0b7a4320; color: var(--forest-deep); }
.badge.red { background: #c8102e18; color: #8a0b1f; }
.foot {
  margin-top: auto; padding: 16px 24px; font-size: 12px; color: var(--muted);
  border-top: 1px solid var(--line);
}
.page-col { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sms { border: 1px solid #0b7a4333; background: #0b7a4314; border-radius: 8px; padding: 10px 12px; }
.otp { font-family: var(--display); font-size: 28px; letter-spacing: .4em; color: var(--forest-deep); }
@media (max-width: 800px) {
  .hero-frame { height: 220px; width: 100%; }
  aside { display: none; }
  aside.open { display: block; position: fixed; inset: 0 auto 0 0; z-index: 20; }
  .mobilebar { display: flex; height: 56px; align-items: center; gap: 12px; padding: 0 12px; border-bottom: 1px solid var(--line); }
}
@media (min-width: 801px) { .mobilebar { display: none; } }

.sharebar { display:flex; height:12px; border-radius:6px; overflow:hidden; background:var(--line); }
.sharebar.thin { height:10px; }
.legend { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:8px; margin-top:12px; font-size:14px; }
.legend i, .kpi.party i { display:inline-block; width:10px; height:10px; border-radius:99px; margin-right:6px; }
.kpi small { display:block; color:var(--muted); font-size:11px; margin-top:4px; }
.kwmap { width:100%; max-width:100%; height:auto; border:1px solid var(--line); border-radius:14px; margin-top:16px; background:var(--cream); }
.plogo { width: 18px; height: 18px; border-radius: 99px; vertical-align: middle; margin-right: 4px; }
.plogo.lg { width: 48px; height: 32px; border-radius: 6px; object-fit: contain; }
.pdp-mark { width: 36px; height: 36px; border-radius: 8px; }
.pdp-mark.sm { width: 24px; height: 24px; }
.pumap { width: 100%; height: 260px; border: 1px solid var(--line); border-radius: 14px; }
.sponsor-rail { position: fixed; right: 12px; top: 88px; z-index: 15; width: 92px; }
.sponsor-card {
  background: #fffdf8f2; border: 1px solid var(--line); border-radius: 12px; padding: 8px;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.sponsor-card img { width: 76px; height: 48px; object-fit: contain; background: var(--paper); border-radius: 6px; border: 1px solid var(--line); }
.sponsor-strip { display: none; }
.linkish { background: none; border: 0; color: var(--muted); font-size: 11px; text-decoration: underline; padding: 0; }
.scope-list { max-height: 200px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.scope-list button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px 12px; font-size: 13px; }
.scope-list button small { display: block; color: var(--muted); font-size: 11px; }
.scope-list button:hover { background: var(--cream); }
@media (max-width: 800px) {
  .sponsor-rail { display: none; }
  .sponsor-strip { display: flex; gap: 8px; align-items: center; overflow-x: auto; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--cream); margin-bottom: 12px; }
  .sponsor-strip img { height: 40px; width: 64px; object-fit: contain; }
}
main.page { padding-right: 120px; }
@media (max-width: 800px) { main.page { padding-right: 16px; } }

@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgb(200 16 46 / 0.55); }
  50% { opacity: 0.55; transform: scale(0.82); box-shadow: 0 0 0 7px rgb(200 16 46 / 0); }
}
.live-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 999px;
  background: var(--red); margin-right: 8px; vertical-align: middle;
  animation: live-pulse 1.15s ease-in-out infinite;
}
.level-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 8px; }
.pill {
  display: inline-flex; align-items: center; height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--cream);
  color: var(--ink); text-decoration: none; font-size: 14px;
}
.pill.on { background: var(--forest); color: var(--cream); border-color: var(--forest); }
.gchart { display: flex; align-items: flex-end; gap: 12px; overflow-x: auto; min-height: 280px; padding: 8px 4px 48px; }
.gcol { flex: 0 0 52px; display: flex; flex-direction: column; align-items: center; }
.gbars { display: flex; align-items: flex-end; gap: 3px; height: 220px; }
.gbar { width: 10px; min-height: 2px; border-radius: 2px 2px 0 0; }
.glabel { font-size: 10px; margin-top: 8px; transform: rotate(-40deg); white-space: nowrap; color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
}
.status-board { display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:8px; margin-top:8px; }
.status-cell { border:1px solid var(--line); background:var(--paper); border-radius:8px; padding:12px; }
.status-cell b { display:block; font-family:var(--display); font-size:22px; font-variant-numeric:tabular-nums; margin-top:4px; }
.status-bar { display:block; height:4px; background:var(--line); border-radius:2px; margin-top:8px; overflow:hidden; }
.status-bar i { display:block; height:4px; border-radius:2px; }
.nav-badge {
  margin-left:auto; min-width:18px; padding:0 6px; height:18px; border-radius:99px;
  background:var(--red); color:var(--cream); font-size:11px; display:inline-flex; align-items:center; justify-content:center;
}
aside { display:flex; flex-direction:column; }
aside nav { flex:1; overflow-y:auto; padding-bottom:8px; }
aside .who { position:static; margin-top:auto; }
fieldset.panel legend { padding:0 6px; font-size:14px; font-weight:500; }
input:disabled, button:disabled { opacity:.5; cursor:not-allowed; }

.ticker {
  display: flex; align-items: stretch; overflow: hidden;
  border: 1px solid #c8102e59; border-radius: 8px; background: var(--forest-deep);
  color: var(--cream); margin-bottom: 16px;
}
.ticker-label {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  background: var(--red); color: var(--cream); padding: 0 12px; height: 44px;
  font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
}
.ticker-mask { overflow: hidden; flex: 1; min-width: 0; }
.ticker-track { display: flex; width: max-content; animation: ticker-scroll 42s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item {
  display: inline-flex; align-items: center; height: 44px; padding: 0 24px;
  white-space: nowrap; font-size: 13px; color: var(--cream); text-decoration: none;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.open-grid { display: grid; gap: 12px; }
@media (min-width: 800px) { .open-grid { grid-template-columns: 1fr 1fr; } }
.incident-open { border-color: #c8102e59; position: relative; padding-left: 18px; }
.incident-open::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--red); }
.badge {
  display: inline-flex; align-items: center; border-radius: 99px; padding: 2px 8px;
  font-size: 11px; font-weight: 500; margin-left: 6px;
}
.badge-open { background: #c8102e1f; color: #8a0b1f; }
.badge-escalated { background: #14160f14; color: var(--ink); }
.badge-closed { background: var(--paper); color: var(--muted); }

.ss { position: relative; }
.ss-native {
  position: absolute; opacity: 0; pointer-events: none; height: 0; width: 0; overflow: hidden;
}
.ss-btn {
  display: flex; align-items: center; width: 100%; height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--cream);
  color: var(--ink); font: inherit; text-align: left;
}
.ss-panel {
  position: absolute; z-index: 40; left: 0; right: 0; top: 48px; min-width: 220px;
  background: var(--cream); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 24px #0002;
}
.ss-panel input { margin: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; }
.ss-list { max-height: 240px; overflow: auto; }
.ss-list button {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  min-height: 44px; padding: 8px 12px; font-size: 14px;
}
.ss-list button:hover, .ss-list button.on { background: #0b7a431f; color: var(--forest-deep); }

@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
  .ticker-track { animation: none !important; flex-wrap: wrap; width: auto; }
}



