/* ============================================================================
 * css/mdrrmo/command-center.css
 * MDRRMO Command Center — Municipality of Kulambogan, Lanao del Norte · Region IX
 *
 * Layered ON TOP of the shared shell (css/components/dashboard.css + sidebar.css),
 * which provide .topbar / .shell / .sidebar / .main / .wrap and the --mgs-* navy/gold
 * brand tokens. This file styles only the Command Center content surface (.cc-*) in a
 * dark "mission control" palette: navy base, cyan live indicators, amber pending/warn,
 * red critical, green confirmed/online — per the emergency-operations design brief.
 *
 * Readability: body text ≥ 15px (operations staff work under stress; no tiny type).
 * Contrast: light text only on dark surfaces; dark text on light/colored chips.
 * ==========================================================================*/

.mdrrmo-cc-body {
    /* CC-local tokens (semantic, derived from the shell brand palette) */
    --cc-panel:      #0f203f;
    --cc-panel-2:    #13284e;
    --cc-panel-3:    #0b1830;
    --cc-ink:        #eaf1fb;
    --cc-ink-soft:   #c3d0e6;
    --cc-muted:      #93a4c4;
    --cc-border:     rgba(148,170,210,.16);
    --cc-border-2:   rgba(148,170,210,.28);
    --cc-cyan:       #38bdf8;
    --cc-cyan-bright:#67e8f9;
    --cc-gold:       #e6b85c;
    --cc-shadow:     0 10px 30px rgba(2,8,23,.45);
    --cc-radius:     14px;
    --cc-radius-sm:  10px;

    /* Severity scale */
    --sev-critical:#ef4444; --sev-high:#fb923c; --sev-moderate:#fbbf24; --sev-low:#38bdf8;
    /* Incident status */
    --st-reported:#94a3b8; --st-verified:#38bdf8; --st-activated:#e6b85c; --st-responding:#3e73d6;
    --st-deescalating:#2dd4bf; --st-closed:#34d399; --st-cancelled:#64748b;
    /* Camera-event status */
    --ev-pending:#fbbf24; --ev-verified:#38bdf8; --ev-dismissed:#64748b; --ev-converted:#34d399;
}

/* ── Shell layout fix ─────────────────────────────────────────────────────
 * The shared launchpad shell (.shell flex row) mis-distributes free space on wide
 * viewports for this page — the sidebar gets shoved to the right and .main
 * collapses to its content width, leaving a large empty band on the left. Pin the
 * two-column layout deterministically with CSS Grid so the sidebar sits flush-left
 * and the main column fills the remaining width. Desktop only — at ≤1024px the
 * shared shell already turns the sidebar into a fixed off-canvas drawer. */
@media (min-width: 769px) {
    body.mdrrmo-cc-body .shell {
        display: grid;
        grid-template-columns: var(--sb-w, 240px) minmax(0, 1fr);
        grid-template-rows: auto;
        align-items: start;
    }
    /* Explicit placement — ignore the hidden backdrop/script children so auto-flow
       can't push the sidebar into column 2. var(--sb-w) is 240px ≥1025px and 72px at
       769–1024px (icon rail), so the grid tracks the shared shell's own breakpoints. */
    body.mdrrmo-cc-body .shell > .sidebar { grid-column: 1; grid-row: 1; }
    body.mdrrmo-cc-body .shell > .main { grid-column: 2; grid-row: 1; width: auto; max-width: none; min-width: 0; }
}
/* ≤768px: the shared shell turns the sidebar into a fixed off-canvas drawer; use a
   plain block flow so .main is full-width and free of the flex mis-distribution. */
@media (max-width: 768px) {
    body.mdrrmo-cc-body .shell { display: block; }
    body.mdrrmo-cc-body .main { width: 100%; max-width: none; min-width: 0; }
}

/* The shell main column already paints the navy gradient; give the CC wrap breathing room. */
.mdrrmo-wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding: 18px clamp(14px, 2.4vw, 30px) 60px; }

/* ── Command masthead ─────────────────────────────────────────────────────*/
.cc-masthead {
    display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
    padding: 16px 20px; margin-bottom: 16px;
    background: linear-gradient(135deg, var(--cc-panel-2), var(--cc-panel-3));
    border: 1px solid var(--cc-border); border-left: 4px solid var(--cc-cyan);
    border-radius: var(--cc-radius); box-shadow: var(--cc-shadow);
}
.cc-mast-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.cc-seal { border-radius: 8px; flex-shrink: 0; }
.cc-eyebrow { font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--cc-cyan); font-weight: 700; margin: 0; }
.cc-title { font-family: var(--mgs-font-head, "Plus Jakarta Sans", sans-serif); font-size: clamp(20px, 2.4vw, 27px); font-weight: 800; color: var(--cc-ink); letter-spacing: -.01em; line-height: 1.15; margin: 2px 0 0; }
.cc-title span { color: var(--cc-muted); font-weight: 700; }
.cc-mast-status { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Status pills */
.cc-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700;
    padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--cc-border-2); color: var(--cc-ink-soft); white-space: nowrap; }
.cc-pill i { font-size: .95em; }
.cc-pill-live { color: #6ee7b7; border-color: rgba(52,211,153,.45); background: rgba(16,185,129,.12); }
.cc-pill-live .cc-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 8px #34d399; animation: ccPulse 1.8s ease-in-out infinite; }
.cc-pill-danger { color: #fca5a5; border-color: rgba(239,68,68,.4); background: rgba(239,68,68,.1); }
.cc-pill-warn { color: #fcd34d; border-color: rgba(245,158,11,.4); background: rgba(245,158,11,.1); }
.cc-pill-ok { color: #6ee7b7; border-color: rgba(52,211,153,.4); background: rgba(16,185,129,.1); }
.cc-pill-muted { color: var(--cc-muted); }
@keyframes ccPulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

/* ── Section navigation ───────────────────────────────────────────────────*/
.cc-nav { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; margin-bottom: 18px;
    background: var(--cc-panel-3); border: 1px solid var(--cc-border); border-radius: var(--cc-radius); }
.cc-nav-link { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: var(--cc-radius-sm);
    font-size: 14.5px; font-weight: 600; color: var(--cc-ink-soft); border: 1px solid transparent; transition: background .15s, color .15s, border-color .15s; position: relative; }
.cc-nav-link i { color: var(--cc-muted); transition: color .15s; }
.cc-nav-link:hover { background: rgba(255,255,255,.05); color: var(--cc-ink); }
.cc-nav-link:hover i { color: var(--cc-cyan); }
.cc-nav-link.active { background: linear-gradient(135deg, rgba(56,189,248,.18), rgba(56,189,248,.06)); color: var(--cc-cyan-bright); border-color: rgba(56,189,248,.45); }
.cc-nav-link.active i { color: var(--cc-cyan-bright); }
.cc-nav-link.locked { opacity: .55; cursor: not-allowed; }
.cc-nav-badge { background: var(--sev-moderate); color: #1a1205; font-size: 11.5px; font-weight: 800; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; }
.cc-nav-lock { font-size: 11px; color: var(--cc-muted); }

/* ── Generic surfaces ─────────────────────────────────────────────────────*/
.cc-view { font-size: 15px; line-height: 1.6; color: var(--cc-ink-soft); }
.cc-card { background: linear-gradient(180deg, var(--cc-panel), var(--cc-panel-3)); border: 1px solid var(--cc-border); border-radius: var(--cc-radius); padding: 16px 18px; box-shadow: var(--cc-shadow); }
.cc-card + .cc-card { margin-top: 16px; }
.cc-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--cc-border); }
.cc-card-head h3 { font-size: 16.5px; font-weight: 800; color: var(--cc-ink); display: flex; align-items: center; gap: 9px; margin: 0; }
.cc-card-head h3 i { color: var(--cc-cyan); }
.cc-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cc-grid-2 + .cc-grid-2 { margin-top: 16px; }
@media (max-width: 900px) { .cc-grid-2 { grid-template-columns: 1fr; } }

.cc-muted { color: var(--cc-muted); }
.cc-mono { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 12.5px; color: var(--cc-muted); }
.cc-link { color: var(--cc-cyan); font-weight: 600; }
.cc-link:hover { text-decoration: underline; }
.cc-desc { margin-top: 12px; color: var(--cc-ink-soft); white-space: pre-line; }

/* ── Notes / banners ──────────────────────────────────────────────────────*/
.cc-note { display: flex; align-items: flex-start; gap: 9px; padding: 11px 14px; border-radius: var(--cc-radius-sm); font-size: 14.5px; margin: 6px 0; border: 1px solid var(--cc-border-2); }
.cc-note i { margin-top: 2px; }
.cc-note-warn { background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.4); color: #fcd34d; }
.cc-note-ok { background: rgba(16,185,129,.1); border-color: rgba(52,211,153,.4); color: #6ee7b7; }
.cc-note-muted { background: rgba(255,255,255,.04); color: var(--cc-muted); }

/* ── Buttons ──────────────────────────────────────────────────────────────*/
.cc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: var(--cc-radius-sm);
    font-size: 14.5px; font-weight: 700; line-height: 1; cursor: pointer; border: 1px solid transparent; white-space: nowrap; transition: filter .15s, background .15s, border-color .15s; }
.cc-btn:hover { filter: brightness(1.1); }
.cc-btn:active { transform: translateY(1px); }
.cc-btn:disabled, .cc-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.cc-btn-primary { background: linear-gradient(135deg, #2369d8, #163f87); color: #eaf1fb; }
.cc-btn-warn { background: linear-gradient(135deg, #d99a2b, #b07414); color: #1a1205; }
.cc-btn-danger { background: linear-gradient(135deg, #e0562b, #b22a1c); color: #fff; }
.cc-btn-soft { background: rgba(56,189,248,.14); color: var(--cc-cyan-bright); border-color: rgba(56,189,248,.4); }
.cc-btn-ghost { background: transparent; color: var(--cc-ink-soft); border-color: var(--cc-border-2); }
.cc-btn-ghost:hover { background: rgba(255,255,255,.05); }
.cc-btn-xs { padding: 6px 11px; font-size: 13px; }

/* ── KPI strip ────────────────────────────────────────────────────────────*/
.cc-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.cc-kpi { display: flex; align-items: center; gap: 13px; padding: 15px 17px; border-radius: var(--cc-radius);
    background: linear-gradient(180deg, var(--cc-panel), var(--cc-panel-3)); border: 1px solid var(--cc-border); border-left: 4px solid var(--cc-cyan); box-shadow: var(--cc-shadow); transition: transform .15s, border-color .15s; }
.cc-kpi:hover { transform: translateY(-2px); }
.cc-kpi-ico { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; background: rgba(56,189,248,.14); color: var(--cc-cyan); flex-shrink: 0; }
.cc-kpi-body { display: flex; flex-direction: column; min-width: 0; }
.cc-kpi-num { font-size: 27px; font-weight: 800; color: var(--cc-ink); line-height: 1.05; font-variant-numeric: tabular-nums; }
.cc-kpi-label { font-size: 13.5px; color: var(--cc-muted); }
.cc-kpi-danger { border-left-color: var(--sev-critical); } .cc-kpi-danger .cc-kpi-ico { background: rgba(239,68,68,.15); color: #fca5a5; }
.cc-kpi-warn { border-left-color: var(--sev-moderate); } .cc-kpi-warn .cc-kpi-ico { background: rgba(245,158,11,.15); color: #fcd34d; }
.cc-kpi-ok { border-left-color: var(--st-closed); } .cc-kpi-ok .cc-kpi-ico { background: rgba(16,185,129,.15); color: #6ee7b7; }
.cc-kpi-info { border-left-color: var(--cc-cyan); }
.cc-kpi-muted { border-left-color: var(--cc-muted); } .cc-kpi-muted .cc-kpi-ico { background: rgba(148,163,184,.15); color: var(--cc-muted); }

/* ── Tags (severity / status / event) ─────────────────────────────────────*/
.cc-tag, .cc-tag-st, .cc-tag-ev { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; letter-spacing: .02em; white-space: nowrap; }
/* Severity — colored fill, dark ink for contrast */
.cc-tag.sev-critical { background: var(--sev-critical); color: #2a0606; }
.cc-tag.sev-high { background: var(--sev-high); color: #2a1402; }
.cc-tag.sev-moderate { background: var(--sev-moderate); color: #1a1205; }
.cc-tag.sev-low { background: var(--sev-low); color: #04243a; }
.cc-tag-cam { background: rgba(56,189,248,.16); color: var(--cc-cyan-bright); border: 1px solid rgba(56,189,248,.4); }
/* Incident status — outlined */
.cc-tag-st { border: 1px solid currentColor; background: rgba(255,255,255,.04); }
.cc-tag-st.st-reported { color: var(--st-reported); } .cc-tag-st.st-verified { color: var(--st-verified); }
.cc-tag-st.st-activated { color: var(--st-activated); } .cc-tag-st.st-responding { color: #7aa2e8; }
.cc-tag-st.st-deescalating { color: var(--st-deescalating); } .cc-tag-st.st-closed { color: var(--st-closed); }
.cc-tag-st.st-cancelled { color: var(--st-cancelled); }
/* Event status — outlined */
.cc-tag-ev { border: 1px solid currentColor; background: rgba(255,255,255,.04); }
.cc-tag-ev.ev-pending { color: var(--ev-pending); } .cc-tag-ev.ev-verified { color: var(--ev-verified); }
.cc-tag-ev.ev-dismissed { color: var(--ev-dismissed); } .cc-tag-ev.ev-converted { color: var(--ev-converted); }
.sev-dot::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.sev-dot.sev-critical::before { background: var(--sev-critical); } .sev-dot.sev-high::before { background: var(--sev-high); }
.sev-dot.sev-moderate::before { background: var(--sev-moderate); } .sev-dot.sev-low::before { background: var(--sev-low); }

/* ── Map ──────────────────────────────────────────────────────────────────*/
.cc-card-map { display: flex; flex-direction: column; }
.cc-map { width: 100%; height: 320px; border-radius: var(--cc-radius-sm); overflow: hidden; background: var(--cc-panel-3); border: 1px solid var(--cc-border); }
.cc-map[data-empty="1"] { min-height: 120px; height: 160px; }
.cc-map-empty { margin-top: 10px; color: var(--cc-muted); font-size: 14px; display: flex; align-items: center; gap: 7px; }
.leaflet-popup-content-wrapper { background: var(--cc-panel-2); color: var(--cc-ink); }
.leaflet-popup-tip { background: var(--cc-panel-2); }

/* ── Severity bars (dashboard) ────────────────────────────────────────────*/
.cc-sev-bars { display: flex; flex-direction: column; gap: 11px; }
.cc-sev-row { display: grid; grid-template-columns: 96px 1fr 32px; align-items: center; gap: 10px; }
.cc-sev-name { font-size: 14px; font-weight: 600; color: var(--cc-ink-soft); }
.cc-sev-track { height: 9px; background: rgba(255,255,255,.07); border-radius: 999px; overflow: hidden; }
.cc-sev-fill { height: 100%; border-radius: 999px; transition: width .5s ease; }
.cc-sev-fill.sev-critical { background: var(--sev-critical); } .cc-sev-fill.sev-high { background: var(--sev-high); }
.cc-sev-fill.sev-moderate { background: var(--sev-moderate); } .cc-sev-fill.sev-low { background: var(--sev-low); }
.cc-sev-val { font-size: 15px; font-weight: 800; color: var(--cc-ink); text-align: right; font-variant-numeric: tabular-nums; }
.cc-quick { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }

/* ── Feed lists (dashboard) ───────────────────────────────────────────────*/
.cc-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cc-feed-item a { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 9px 11px; border-radius: var(--cc-radius-sm); background: rgba(255,255,255,.025); border-left: 3px solid transparent; transition: background .15s; }
.cc-feed-item a:hover { background: rgba(255,255,255,.06); }
.cc-feed-title { font-weight: 700; color: var(--cc-ink); }
.cc-feed-meta { font-size: 13px; color: var(--cc-muted); width: 100%; }

/* ── Empty states ─────────────────────────────────────────────────────────*/
.cc-empty { text-align: center; padding: 38px 20px; color: var(--cc-muted); border: 1px dashed var(--cc-border-2); border-radius: var(--cc-radius); background: rgba(255,255,255,.02); }
.cc-empty i { font-size: 30px; display: block; margin-bottom: 10px; opacity: .8; }
.cc-empty p { font-size: 15px; margin: 0 0 12px; }
.cc-empty-sm { padding: 20px; border: none; }
.cc-empty-sm i { font-size: 20px; color: var(--st-closed); margin-bottom: 6px; }
.cc-empty-build .cc-empty-icon { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; margin: 0 auto 14px; background: rgba(56,189,248,.12); color: var(--cc-cyan); }
.cc-empty-build h2 { color: var(--cc-ink); font-size: 21px; margin-bottom: 8px; }
.cc-badge-soon { display: inline-flex; align-items: center; gap: 7px; margin-top: 14px; padding: 7px 14px; border-radius: 999px; background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.35); color: #fcd34d; font-weight: 700; font-size: 13.5px; }

/* ── Detail layout ────────────────────────────────────────────────────────*/
.cc-detail-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cc-detail-badges { display: flex; gap: 7px; flex-wrap: wrap; }
.cc-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.cc-detail-head h2 { font-size: 22px; font-weight: 800; color: var(--cc-ink); display: flex; align-items: center; gap: 10px; }
.cc-detail-head h2 i { color: var(--cc-cyan); }
.cc-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.cc-dl > div { display: flex; flex-direction: column; gap: 2px; }
.cc-dl dt { font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--cc-muted); }
.cc-dl dd { font-size: 15px; color: var(--cc-ink); }
.cc-impact { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--cc-border); }
.cc-impact span { font-size: 14px; color: var(--cc-muted); }
.cc-impact b { color: var(--cc-ink); font-size: 17px; font-weight: 800; }
.cc-from-cam, .cc-from-cam.cc-note { margin-top: 12px; font-size: 14px; color: var(--cc-cyan-bright); }

/* ── Status timeline ──────────────────────────────────────────────────────*/
.cc-actionbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.cc-timeline { list-style: none; margin: 0; padding: 0 0 0 6px; border-left: 2px solid var(--cc-border); display: flex; flex-direction: column; gap: 14px; }
.cc-timeline li { position: relative; padding-left: 18px; }
.cc-tl-dot { position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--cc-muted); border: 2px solid var(--cc-panel-3); }
.cc-tl-dot.st-verified { background: var(--st-verified); } .cc-tl-dot.st-activated { background: var(--st-activated); }
.cc-tl-dot.st-responding { background: var(--st-responding); } .cc-tl-dot.st-closed { background: var(--st-closed); }
.cc-tl-dot.st-cancelled { background: var(--st-cancelled); } .cc-tl-dot.st-deescalating { background: var(--st-deescalating); }
.cc-tl-when { display: block; font-size: 12.5px; color: var(--cc-muted); margin-top: 2px; }
.cc-tl-note { margin-top: 4px; font-size: 14px; color: var(--cc-ink-soft); }

/* ── Comments / situation updates ─────────────────────────────────────────*/
.cc-inline-form { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-bottom: 14px; }
.cc-inline-form textarea { flex: 1 1 280px; }
.cc-comments { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cc-comments li { background: rgba(255,255,255,.03); border-radius: var(--cc-radius-sm); padding: 11px 13px; }
.cc-comments p { color: var(--cc-ink); }
.cc-comments .cc-muted { font-size: 12.5px; display: block; margin-top: 5px; }

/* ── Forms ────────────────────────────────────────────────────────────────*/
.cc-formwrap { max-width: 860px; }
.cc-formwrap h2 { color: var(--cc-ink); font-size: 22px; margin-bottom: 6px; }
.cc-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0; }
@media (max-width: 720px) { .cc-form-grid { grid-template-columns: 1fr; } }
.cc-field { display: flex; flex-direction: column; gap: 6px; }
.cc-field.cc-col-2 { grid-column: 1 / -1; }
.cc-field > span { font-size: 13.5px; font-weight: 600; color: var(--cc-ink-soft); }
.cc-field > span i { color: var(--sev-critical); font-style: normal; }
.cc-field small { color: var(--cc-muted); font-weight: 400; }
.cc-form input[type=text], .cc-form input[type=number], .cc-form input[type=search], .cc-form input[type=date],
.cc-form input[type=datetime-local], .cc-form select, .cc-form textarea,
.cc-inline-form textarea, .cc-filters input, .cc-filters select {
    width: 100%; padding: 10px 12px; font-size: 15px; font-family: inherit; color: var(--cc-ink);
    background: var(--cc-panel-3); border: 1px solid var(--cc-border-2); border-radius: var(--cc-radius-sm); transition: border-color .15s, box-shadow .15s;
}
.cc-form select option { background: var(--cc-panel-3); color: var(--cc-ink); }
.cc-form input:focus, .cc-form select:focus, .cc-form textarea:focus, .cc-filters input:focus, .cc-filters select:focus {
    outline: none; border-color: var(--cc-cyan); box-shadow: 0 0 0 3px rgba(56,189,248,.18);
}
.cc-form textarea { resize: vertical; }
.cc-form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.cc-checkset { border: 1px solid var(--cc-border); border-radius: var(--cc-radius-sm); padding: 12px; }
.cc-checks { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.cc-check { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--cc-ink-soft); cursor: pointer; }
.cc-check input { accent-color: var(--cc-cyan); width: 16px; height: 16px; }

/* ── List head / filters / table ──────────────────────────────────────────*/
.cc-list-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cc-list-head h2 { font-size: 22px; font-weight: 800; color: var(--cc-ink); }
.cc-filters { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 16px; align-items: center; }
.cc-filters .cc-search { flex: 1 1 220px; max-width: 320px; }
.cc-filters select { width: auto; min-width: 140px; }
.cc-tablewrap { overflow-x: auto; border-radius: var(--cc-radius); border: 1px solid var(--cc-border); }
.cc-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.cc-table thead th { text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--cc-muted); padding: 11px 14px; background: var(--cc-panel-3); border-bottom: 1px solid var(--cc-border); }
.cc-table tbody td { padding: 12px 14px; border-bottom: 1px solid var(--cc-border); color: var(--cc-ink-soft); vertical-align: middle; }
.cc-table tbody tr { cursor: pointer; transition: background .12s; }
.cc-table tbody tr:hover { background: rgba(56,189,248,.06); }
.cc-table tbody tr:last-child td { border-bottom: none; }
.cc-table b { color: var(--cc-ink); }
.cc-row-go { text-align: right; color: var(--cc-muted); }
.cc-pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.cc-page { padding: 7px 12px; border-radius: 8px; background: var(--cc-panel-3); border: 1px solid var(--cc-border-2); color: var(--cc-ink-soft); font-weight: 700; font-size: 14px; }
.cc-page.active { background: var(--cc-cyan); color: #04243a; border-color: var(--cc-cyan); }

/* ── Camera alert queue ───────────────────────────────────────────────────*/
.cc-segtabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 16px; background: var(--cc-panel-3); padding: 5px; border-radius: var(--cc-radius-sm); border: 1px solid var(--cc-border); width: fit-content; }
.cc-seg { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 8px; font-size: 14px; font-weight: 700; color: var(--cc-muted); }
.cc-seg:hover { color: var(--cc-ink); }
.cc-seg.active { background: rgba(56,189,248,.16); color: var(--cc-cyan-bright); }
.cc-seg-n { font-size: 12px; background: rgba(255,255,255,.1); padding: 1px 7px; border-radius: 999px; }
.cc-alert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.cc-alert { display: flex; background: linear-gradient(180deg, var(--cc-panel), var(--cc-panel-3)); border: 1px solid var(--cc-border); border-radius: var(--cc-radius); overflow: hidden; box-shadow: var(--cc-shadow); }
.cc-alert-stripe { width: 5px; flex-shrink: 0; background: var(--sev-low); }
.cc-alert.sev-critical .cc-alert-stripe { background: var(--sev-critical); } .cc-alert.sev-high .cc-alert-stripe { background: var(--sev-high); }
.cc-alert.sev-moderate .cc-alert-stripe { background: var(--sev-moderate); } .cc-alert.sev-low .cc-alert-stripe { background: var(--sev-low); }
.cc-alert-body { flex: 1; padding: 13px 15px; min-width: 0; }
.cc-alert-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.cc-alert-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.06); color: var(--cc-cyan); flex-shrink: 0; }
.cc-alert-headings { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cc-alert-title { font-weight: 800; color: var(--cc-ink); font-size: 15.5px; }
.cc-alert-title:hover { color: var(--cc-cyan); }
.cc-alert-sub { font-size: 13px; color: var(--cc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-alert-note { font-size: 14px; color: var(--cc-ink-soft); margin-bottom: 8px; }
.cc-alert-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; color: var(--cc-muted); margin-bottom: 10px; }
.cc-alert-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.cc-alert-converted { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--ev-converted); }

/* ── Snapshot / confidence (alert detail) ─────────────────────────────────*/
.cc-snapshot { border-radius: var(--cc-radius-sm); overflow: hidden; background: var(--cc-panel-3); border: 1px solid var(--cc-border); }
.cc-snapshot img { width: 100%; display: block; }
.cc-snapshot-ph { aspect-ratio: 16/9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--cc-muted); }
.cc-snapshot-ph i { font-size: 34px; opacity: .6; }
.cc-snapshot-missing img { display: none; }
.cc-conf { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.cc-conf span { font-size: 13px; color: var(--cc-muted); }
.cc-conf-track { flex: 1; height: 10px; background: rgba(255,255,255,.08); border-radius: 999px; overflow: hidden; }
.cc-conf-fill { height: 100%; background: linear-gradient(90deg, var(--sev-low), var(--cc-cyan)); border-radius: 999px; }
.cc-conf b { font-size: 16px; color: var(--cc-ink); }

/* ── Camera registry cards ────────────────────────────────────────────────*/
.cc-cam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.cc-cam-card { background: linear-gradient(180deg, var(--cc-panel), var(--cc-panel-3)); border: 1px solid var(--cc-border); border-radius: var(--cc-radius); padding: 15px; box-shadow: var(--cc-shadow); }
.cc-cam-card-head { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; }
.cc-cam-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(56,189,248,.14); color: var(--cc-cyan); flex-shrink: 0; }
.cc-cam-card-head > div { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cc-cam-card-head b { color: var(--cc-ink); font-size: 15.5px; }
.cc-cam-card-head .cc-muted { font-size: 12.5px; }
.cc-cam-loc { font-size: 14px; color: var(--cc-ink-soft); margin-bottom: 10px; }
.cc-cam-loc i { color: var(--cc-cyan); }
.cc-cam-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.cc-chip { font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.06); color: var(--cc-ink-soft); border: 1px solid var(--cc-border); }
.cc-chip-num { color: var(--cc-cyan-bright); }
.cc-cam-seen { font-size: 13px; color: var(--cc-muted); margin-bottom: 10px; }
.cc-cam-seen i { color: var(--st-closed); }
.cc-cam-seen .cc-sim { color: var(--sev-moderate); }

/* ── Convert modal ────────────────────────────────────────────────────────*/
.cc-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.cc-modal[hidden] { display: none; }
.cc-modal-backdrop { position: absolute; inset: 0; background: rgba(2,8,23,.72); backdrop-filter: blur(3px); }
.cc-modal-card { position: relative; z-index: 1; width: 100%; max-width: 580px; background: linear-gradient(180deg, var(--cc-panel-2), var(--cc-panel-3)); border: 1px solid var(--cc-border-2); border-radius: var(--cc-radius); box-shadow: 0 24px 60px rgba(0,0,0,.55); max-height: 90vh; overflow-y: auto; }
.cc-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--cc-border); }
.cc-modal-head h3 { font-size: 17px; font-weight: 800; color: var(--cc-ink); display: flex; align-items: center; gap: 9px; }
.cc-modal-head h3 i { color: var(--sev-high); }
.cc-modal-x { background: none; border: none; color: var(--cc-muted); font-size: 24px; line-height: 1; cursor: pointer; padding: 0 4px; }
.cc-modal-x:hover { color: var(--cc-ink); }
.cc-modal-card .cc-form { padding: 16px 18px; }

/* ── Access gate ──────────────────────────────────────────────────────────*/
.cc-gate { max-width: 560px; margin: 30px auto; text-align: center; padding: 36px 28px; background: linear-gradient(180deg, var(--cc-panel), var(--cc-panel-3)); border: 1px solid var(--cc-border); border-radius: var(--cc-radius); box-shadow: var(--cc-shadow); }
.cc-gate-icon { width: 70px; height: 70px; border-radius: 18px; display: grid; place-items: center; font-size: 30px; margin: 0 auto 16px; background: rgba(56,189,248,.12); color: var(--cc-cyan); }
.cc-gate h2 { font-size: 22px; color: var(--cc-ink); margin-bottom: 10px; }
.cc-gate p { color: var(--cc-ink-soft); font-size: 15px; }
.cc-gate-actions { display: flex; gap: 10px; justify-content: center; margin: 18px 0; flex-wrap: wrap; }
.cc-gate-note { font-size: 13.5px; color: var(--cc-muted); margin-top: 14px; border-top: 1px solid var(--cc-border); padding-top: 14px; }

/* ── Toasts ───────────────────────────────────────────────────────────────*/
.cc-toast-host { position: fixed; right: 18px; bottom: 18px; z-index: 1200; display: flex; flex-direction: column; gap: 10px; max-width: min(92vw, 380px); }
.cc-toast { display: flex; align-items: flex-start; gap: 10px; padding: 13px 15px; border-radius: var(--cc-radius-sm); background: var(--cc-panel-2); border: 1px solid var(--cc-border-2); border-left: 4px solid var(--cc-cyan); color: var(--cc-ink); box-shadow: 0 12px 30px rgba(0,0,0,.5); font-size: 14.5px; animation: ccToastIn .25s ease-out; }
.cc-toast.ok { border-left-color: var(--st-closed); } .cc-toast.ok i { color: #6ee7b7; }
.cc-toast.err { border-left-color: var(--sev-critical); } .cc-toast.err i { color: #fca5a5; }
.cc-toast.info i { color: var(--cc-cyan); }
.cc-toast i { margin-top: 2px; }
@keyframes ccToastIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.cc-toast.leaving { animation: ccToastOut .25s ease-in forwards; }
@keyframes ccToastOut { to { transform: translateX(20px); opacity: 0; } }

/* ── Responsive ───────────────────────────────────────────────────────────*/
@media (max-width: 640px) {
    .cc-masthead { flex-direction: column; align-items: flex-start; }
    .cc-dl { grid-template-columns: 1fr; }
    .cc-alert-grid, .cc-cam-grid { grid-template-columns: 1fr; }
    .cc-filters .cc-search, .cc-filters select { flex: 1 1 100%; max-width: none; width: 100%; }
}

/* ── Settings: alert-rule cards ──────────────────────────────────────────*/
.cc-rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.cc-rule { padding: 16px 18px; }
.cc-rule-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--cc-border); }
.cc-rule-head h3 { font-size: 16px; font-weight: 800; color: var(--cc-ink); display: flex; align-items: center; gap: 8px; }
.cc-rule-head h3 i { color: var(--cc-cyan); }
.cc-rule .cc-form-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 10px; }
.cc-rule-desc { font-size: 13px; margin-bottom: 10px; }

/* ════════════════════════════════════════════════════════════════════════
 * Response / resource / reporting screens (evacuation, contacts, teams,
 * resources, dispatch, sitreps, damage, camera-plan). Built on the existing
 * tokens above — navy surfaces, cyan accents, dark-ink-on-colour chips.
 * ══════════════════════════════════════════════════════════════════════ */

/* Demo-mode banner */
.cc-demo-banner { display: flex; align-items: flex-start; gap: 11px; padding: 11px 16px; margin-bottom: 14px;
    background: linear-gradient(135deg, rgba(230,184,92,.16), rgba(245,158,11,.08)); border: 1px solid rgba(230,184,92,.45);
    border-left: 4px solid var(--cc-gold); border-radius: var(--cc-radius-sm); color: #f3dca0; font-size: 14px; }
.cc-demo-banner i { margin-top: 2px; color: var(--cc-gold); font-size: 1.05em; }
.cc-demo-banner b { color: #fbe8bf; letter-spacing: .04em; }
.cc-demo-note { display: block; margin-top: 3px; font-size: 12.5px; color: var(--cc-muted); }
.cc-demo-note code { font-family: ui-monospace, Menlo, monospace; color: var(--cc-cyan-bright); }

/* Status chips (cc-st-<tone>) — outlined, currentColor */
.cc-st { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 800; padding: 3px 9px;
    border-radius: 999px; border: 1px solid currentColor; background: rgba(255,255,255,.04); white-space: nowrap; letter-spacing: .02em; }
.cc-st-ok { color: #34d399; } .cc-st-warn { color: #fcd34d; } .cc-st-hot { color: #fb923c; }
.cc-st-info { color: #67e8f9; } .cc-st-muted { color: #94a3b8; } .cc-st-danger { color: #fca5a5; }

/* Chip variants */
.cc-chip-primary { background: rgba(56,189,248,.16); color: var(--cc-cyan-bright); border-color: rgba(56,189,248,.4); }

/* Resource/center card grid */
.cc-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.cc-rescard { display: block; transition: transform .15s, border-color .15s; }
.cc-rescard:hover { transform: translateY(-2px); border-color: var(--cc-border-2); }
.cc-rescard-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.cc-rescard-head b { color: var(--cc-ink); font-size: 15.5px; }
.cc-rescard-sub { font-size: 13.5px; color: var(--cc-ink-soft); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 8px; }
.cc-rescard-sub i, .cc-rescard-meta i { color: var(--cc-cyan); }
.cc-rescard-meta { font-size: 13px; color: var(--cc-muted); margin-top: 6px; }

/* Occupancy bar */
.cc-occ { margin: 4px 0; }
.cc-occ-track { height: 10px; background: rgba(255,255,255,.08); border-radius: 999px; overflow: hidden; }
.cc-occ-fill { height: 100%; border-radius: 999px; background: var(--st-closed); transition: width .5s ease; }
.cc-occ-fill.is-high { background: var(--sev-moderate); }
.cc-occ-fill.is-full { background: var(--sev-critical); }
.cc-occ-label { font-size: 13px; color: var(--cc-muted); margin-top: 5px; }
.cc-occ-label b { color: var(--cc-ink); font-variant-numeric: tabular-nums; }

/* Team roster */
.cc-roster { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.cc-roster li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 11px; background: rgba(255,255,255,.03); border-radius: var(--cc-radius-sm); }
.cc-roster b { color: var(--cc-ink); }
.cc-roster .cc-muted { font-size: 13px; }

/* Dashboard operational-readiness strip */
.cc-readiness { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 16px; }
.cc-ready { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: var(--cc-radius-sm);
    background: rgba(255,255,255,.03); border: 1px solid var(--cc-border); transition: background .15s, transform .15s; }
.cc-ready:hover { background: rgba(56,189,248,.07); transform: translateY(-2px); }
.cc-ready i { color: var(--cc-cyan); font-size: 15px; }
.cc-ready-num { font-size: 22px; font-weight: 800; color: var(--cc-ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.cc-ready-label { font-size: 12.5px; color: var(--cc-muted); }

/* Dispatch board */
.cc-dispatch-list { display: flex; flex-direction: column; gap: 10px; }
.cc-dispatch { padding: 12px 14px; background: rgba(255,255,255,.03); border: 1px solid var(--cc-border); border-left: 3px solid var(--cc-cyan); border-radius: var(--cc-radius-sm); }
.cc-dispatch-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cc-dispatch-sub { font-size: 14px; color: var(--cc-ink-soft); margin: 3px 0; }
.cc-dispatch-meta { font-size: 13px; color: var(--cc-muted); display: flex; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 8px; }
.cc-dispatch-meta i { color: var(--cc-cyan); }

/* Table row actions / archived rows */
.cc-row-actions { white-space: nowrap; display: flex; gap: 5px; }
.cc-row-actions form { margin: 0; }
.cc-row-archived { opacity: .58; }
.cc-table tbody tr.cc-row-archived:hover { opacity: .85; }

/* Report section headings (sitrep / camera-plan detail) */
.cc-rep-h { font-size: 14px; font-weight: 800; color: var(--cc-cyan-bright); text-transform: uppercase; letter-spacing: .05em; margin: 16px 0 4px; }

/* Reports record-export grid */
.cc-export-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 9px; }
.cc-export-link { display: flex; align-items: center; gap: 9px; padding: 11px 14px; border-radius: var(--cc-radius-sm);
    background: rgba(56,189,248,.08); border: 1px solid var(--cc-border-2); color: var(--cc-ink); font-weight: 600; font-size: 14px; transition: background .15s; }
.cc-export-link:hover { background: rgba(56,189,248,.16); }
.cc-export-link i { color: var(--cc-cyan); }

@media (max-width: 640px) {
    .cc-cards-grid, .cc-export-grid { grid-template-columns: 1fr; }
    .cc-row-actions { flex-direction: column; }
}

/* Print (situation report / plan detail) */
@media print {
    .topbar, .sidebar, #burger, .cc-nav, .cc-mast-status, .cc-toast-host, .cc-demo-banner, .cc-noprint,
    .cc-detail-top, .cc-actionbar { display: none !important; }
    body, .main, .shell, .wrap, .cc-card, .cc-detail { background: #fff !important; color: #000 !important; box-shadow: none !important; }
    .cc-card { border: 1px solid #bbb !important; break-inside: avoid; }
    .cc-detail-head h2, .cc-rep-h, .cc-dl dd, .cc-desc { color: #000 !important; }
    .cc-rep-h { color: #333 !important; }
}
