/* =====================================================
   Fairfield Public Schools — Footage Requests
   Design system (from _DEV/App design breakdown scope)
   ===================================================== */

:root {
    /* Brand */
    --fps-navy: #0A2F5C;
    --fps-navy-deep: #061E3E;
    --fps-link: #113F76;
    --fps-blue: #2A6AAE;
    --fps-gold: #C8A047;
    --fps-gold-light: #E3BF6D;
    --fps-gold-bg: #F6EBCD;
    --fps-gold-ink: #7A5F1E;

    /* Ink */
    --ink: #11172A;
    --ink-strong: #061E3E;
    --ink-body: #2E364D;
    --ink-soft: #4A5269;
    --ink-muted: #6B748C;

    /* Surfaces */
    --ground: #FAFBFD;
    --surface: #fff;
    --surface-tint: #F3F5F9;
    --surface-hover: #EEF3F9;
    --surface-navy-tint: #DCE7F2;
    --line: #D6DAE4;
    --line-soft: #E7EAF1;

    /* Semantic */
    --ok-ink: #2F7A4F; --ok-bg: #E7F0EA; --ok-bd: #B9D6C4;
    --bad-ink: #8C2714; --bad-bg: #FBEDEA; --bad-bd: #E9BDB3; --bad: #B3321A;

    --shadow-card: 0 1px 2px rgba(11, 31, 60, 0.08);
    --shadow-pop: 0 24px 48px rgba(11, 31, 60, 0.16);
    --radius: 8px;
    --radius-sm: 4px;
    --max-width: 1440px;

    --serif: 'Merriweather', Georgia, serif;
    --sans: 'Source Sans 3', system-ui, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--sans);
    color: var(--ink);
    background: var(--ground);
    line-height: 1.45;
}

a { color: var(--fps-link); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--fps-navy-deep); text-decoration-thickness: 2px; }

input, select, textarea, button { font-family: inherit; font-size: inherit; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(42, 106, 174, 0.35);
}

h1, h2, h3, .serif { font-family: var(--serif); color: var(--ink-strong); letter-spacing: -0.01em; }
h1 { font-weight: 700; font-size: 30px; margin: 0; }
h2 { font-weight: 700; font-size: 19px; margin: 0; }

/* ---------- Layout ---------- */
.fps-main { max-width: var(--max-width); margin: 0 auto; padding: 28px 28px 64px; }

.page-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 20px; flex-wrap: wrap; margin-bottom: 22px;
}
.page-head p { font-size: 14px; color: var(--ink-soft); margin: 6px 0 0; }

.kicker {
    font-weight: 700; font-size: 12px; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--fps-link);
}
.eyebrow {
    font-weight: 700; font-size: 11px; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--ink-muted); margin-bottom: 4px;
}

.breadcrumbs { display: flex; gap: 8px; font-size: 13px; color: var(--ink-soft); margin-bottom: 18px; }
.breadcrumbs .current { color: var(--ink-muted); }

/* ---------- Top bar ---------- */
.topbar { background: var(--fps-navy); color: #fff; position: sticky; top: 0; z-index: 40; }
.topbar-inner {
    max-width: var(--max-width); margin: 0 auto; padding: 0 28px; height: 64px;
    display: flex; align-items: center; gap: 28px; overflow: hidden;
}
.topbar-brand { display: flex; align-items: center; gap: 12px; padding-right: 8px; flex: none; white-space: nowrap; text-decoration: none; color: #fff; }
.topbar-brand img { height: 32px; width: auto; }
.topbar-brand .brand-title { font-family: var(--serif); font-weight: 900; font-size: 15px; line-height: 1.15; letter-spacing: -0.01em; color: #fff; }
.topbar-brand .brand-sub {
    font-family: var(--sans); font-weight: 600; font-size: 11px;
    letter-spacing: 0.12em; text-transform: uppercase; color: #A8C2DE; display: block;
}
.topbar-nav {
    display: flex; align-items: stretch; gap: 4px; height: 64px; margin-left: 8px;
    flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow-x: auto;
}
.topbar-nav a {
    position: relative; display: flex; align-items: center; padding: 0 14px;
    color: #C7D8EA; font-weight: 600; font-size: 14px; text-decoration: none;
}
.topbar-nav a:hover { color: #fff; }
.topbar-nav a.active { color: #fff; font-weight: 700; }
.topbar-nav a.active::after {
    content: ''; position: absolute; left: 10px; right: 10px; bottom: 0;
    height: 3px; background: var(--fps-gold);
}
.notif-bell {
    position: relative; background: transparent; border: 1px solid rgba(255,255,255,0.28); color: #fff;
    width: 38px; height: 38px; border-radius: var(--radius-sm); cursor: pointer;
    display: flex; align-items: center; justify-content: center; flex: none;
}
.notif-bell:hover { background: rgba(255,255,255,0.10); }
.notif-badge {
    position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px;
    border-radius: 999px; background: var(--fps-gold); color: var(--ink);
    font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.notif-overlay { position: fixed; inset: 0; background: rgba(6,30,62,0.45); z-index: 60; display: none; }
.notif-overlay.open { display: block; }
.notif-panel {
    position: fixed; top: 72px; right: 28px; width: 400px; max-width: calc(100vw - 32px);
    max-height: calc(100vh - 100px); overflow: auto; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-pop);
    z-index: 61; display: none;
}
.notif-panel.open { display: block; }
.notif-panel-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; border-bottom: 1px solid var(--line-soft);
}
.notif-row { display: flex; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); cursor: pointer; text-decoration: none; }
.notif-row:hover { background: var(--surface-hover); }
.notif-row.unread { background: #F7FAFD; }
.notif-row .n-title { font-weight: 600; font-size: 14px; color: var(--ink); margin-bottom: 2px; }
.notif-row .n-body { font-size: 13px; color: var(--ink-soft); }
.notif-row .n-time { font-size: 12px; color: var(--ink-muted); margin-top: 6px; }

.topbar-user { display: flex; align-items: center; gap: 10px; padding-left: 12px; border-left: 1px solid rgba(255,255,255,0.18); flex: none; white-space: nowrap; }
.topbar-avatar {
    width: 34px; height: 34px; border-radius: 999px; background: var(--fps-gold);
    color: var(--ink); font-weight: 700; font-size: 13px;
    display: flex; align-items: center; justify-content: center;
}
.topbar-user .u-name { font-weight: 600; font-size: 13px; line-height: 1.2; }
.topbar-user .u-role { font-size: 11px; color: #A8C2DE; line-height: 1.2; }
.topbar-signout {
    background: transparent; border: none; color: #C7D8EA; font-weight: 600; font-size: 12px;
    cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 4px 2px 4px 8px;
}
.topbar-signout:hover { color: #fff; }

/* ---------- Buttons ---------- */
.btn { border-radius: var(--radius-sm); font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-primary { background: var(--fps-navy); color: #fff; border: none; padding: 13px 22px; }
.btn-primary:hover { background: var(--fps-navy-deep); color: #fff; }
.btn-outline { background: transparent; color: var(--fps-navy); border: 1.5px solid var(--fps-navy); padding: 11.5px 20px; }
.btn-outline:hover { background: var(--surface-hover); color: var(--fps-navy); }
.btn-gold { background: var(--fps-gold); color: var(--ink); border: none; padding: 13px 22px; }
.btn-gold:hover { background: var(--fps-gold-light); color: var(--ink); }
.btn-danger-outline { background: transparent; color: var(--bad); border: 1.5px solid var(--bad); padding: 11.5px 20px; }
.btn-danger-outline:hover { background: var(--bad-bg); color: var(--bad); }
.btn-link { background: transparent; color: var(--fps-link); border: none; padding: 12px 8px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.card-plain { box-shadow: none; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line-soft); }
.card-body { padding: 20px 24px; }
.card-navy { background: var(--fps-navy); color: #fff; border-radius: var(--radius); padding: 22px; }
.card-navy h2, .card-navy .serif { color: #fff; }
.card-navy .kicker { color: var(--fps-gold-light); }

/* ---------- Pills ---------- */
.pill {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px;
    border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap;
    border: 1px solid var(--line); color: var(--ink-soft); background: var(--surface-tint);
}
.pill-status-draft     { color: var(--ink-soft); background: var(--surface-tint); border-color: var(--line); }
.pill-status-submitted { color: var(--fps-link); background: var(--surface-hover); border-color: var(--surface-navy-tint); }
.pill-status-approved  { color: var(--fps-link); background: var(--surface-navy-tint); border-color: #B9CCE2; }
.pill-status-extracted { color: var(--fps-gold-ink); background: var(--fps-gold-bg); border-color: var(--fps-gold-light); }
.pill-status-completed { color: var(--ok-ink); background: var(--ok-bg); border-color: var(--ok-bd); }
.pill-status-denied    { color: var(--bad-ink); background: var(--bad-bg); border-color: var(--bad-bd); }
.pill-status-cancelled { color: var(--ink-soft); background: var(--surface-tint); border-color: var(--line); }

.pill-priority-low    { color: var(--ink-soft); background: var(--surface-tint); border-color: var(--line); }
.pill-priority-medium { color: var(--fps-link); background: var(--surface-hover); border-color: var(--surface-navy-tint); }
.pill-priority-high   { color: var(--fps-gold-ink); background: var(--fps-gold-bg); border-color: var(--fps-gold-light); }
.pill-priority-urgent { color: var(--bad-ink); background: var(--bad-bg); border-color: var(--bad-bd); }

.pill-legal { color: var(--fps-gold-ink); background: var(--fps-gold-bg); border-color: var(--fps-gold-light); }
.pill-ok    { color: var(--ok-ink); background: var(--ok-bg); border-color: var(--ok-bd); }
.pill-route { color: var(--fps-link); background: var(--surface-hover); border-color: var(--surface-navy-tint); font-weight: 600; }
.pill-on-dark { color: var(--ink-strong); background: var(--surface-navy-tint); border-color: var(--surface-navy-tint); }
.pill-gold-on-dark { color: var(--ink-strong); background: var(--fps-gold); border-color: var(--fps-gold); }

/* Priority rails */
.rail { width: 4px; align-self: stretch; min-height: 52px; border-radius: 2px; flex: none; }
.rail-low { background: #959CB0; }
.rail-medium { background: var(--fps-blue); }
.rail-high { background: #B87A12; }
.rail-urgent { background: var(--bad); }

/* ---------- Tables ---------- */
.fps-table-wrap { overflow-x: auto; }
.fps-table { width: 100%; border-collapse: collapse; }
.fps-table thead tr { background: var(--surface-tint); }
.fps-table th {
    text-align: left; font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--ink-soft); padding: 12px 16px;
    border-bottom: 1px solid var(--line); white-space: nowrap;
}
.fps-table th.num, .fps-table td.num { text-align: right; }
.fps-table td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: top; font-size: 14px; color: var(--ink-body); }
.fps-table tbody tr:last-child td { border-bottom: none; }
.fps-table tr.clickable { cursor: pointer; }
.fps-table tr.clickable:hover { background: var(--surface-hover); }
.fps-table tr.selected { background: var(--surface-hover); box-shadow: inset 3px 0 0 var(--fps-navy); }
.cell-title { font-weight: 700; font-size: 14px; color: var(--ink-strong); }
.cell-sub { font-size: 13px; color: var(--ink-muted); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 14px; color: var(--ink-body); }
.field .hint { font-size: 13px; color: var(--ink-muted); }
.req { color: var(--bad); }
.input, .select, .textarea {
    padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: #fff; font-size: 14px; color: var(--ink); width: 100%;
}
.textarea { resize: vertical; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check input[type=checkbox] { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--fps-navy); }
.check .check-title { font-weight: 700; font-size: 14px; color: var(--ink); }
.check .check-sub { display: block; font-size: 13px; color: var(--ink-soft); }

/* Filter bar */
.filter-bar {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 14px 16px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 18px;
}
.filter-bar .input, .filter-bar .select { width: auto; }
.chip {
    padding: 9px 14px; border-radius: var(--radius-sm); font-weight: 700; font-size: 13px;
    cursor: pointer; border: 1px solid var(--line); background: #fff; color: var(--ink-body);
}
.chip.active { border-color: var(--fps-navy); background: var(--fps-navy); color: #fff; }

/* Workflow status filter strip */
.status-strip { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.status-strip .flow-arrow { color: var(--ink-muted); font-size: 12px; user-select: none; }
.status-strip .flow-divider { width: 1px; height: 26px; background: var(--line); margin: 0 6px; }
.chip .chip-count {
    font-weight: 600; font-size: 11px; opacity: 0.75; margin-left: 5px;
    font-variant-numeric: tabular-nums;
}
.chip-dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; margin-right: 6px; vertical-align: 1px; }

/* Status-colored chips: tinted at rest, solid when active */
.chip-status-draft     { color: var(--ink-soft); }
.chip-status-draft .chip-dot { background: #959CB0; }
.chip-status-draft.active { background: var(--ink-soft); border-color: var(--ink-soft); color: #fff; }

.chip-status-submitted { color: var(--fps-link); border-color: var(--surface-navy-tint); background: var(--surface-hover); }
.chip-status-submitted .chip-dot { background: var(--fps-blue); }
.chip-status-submitted.active { background: var(--fps-blue); border-color: var(--fps-blue); color: #fff; }

.chip-status-approved { color: var(--fps-link); border-color: #B9CCE2; background: var(--surface-navy-tint); }
.chip-status-approved .chip-dot { background: var(--fps-navy); }
.chip-status-approved.active { background: var(--fps-navy); border-color: var(--fps-navy); color: #fff; }

.chip-status-extracted { color: var(--fps-gold-ink); border-color: var(--fps-gold-light); background: var(--fps-gold-bg); }
.chip-status-extracted .chip-dot { background: var(--fps-gold); }
.chip-status-extracted.active { background: var(--fps-gold-ink); border-color: var(--fps-gold-ink); color: #fff; }

.chip-status-completed { color: var(--ok-ink); border-color: var(--ok-bd); background: var(--ok-bg); }
.chip-status-completed .chip-dot { background: var(--ok-ink); }
.chip-status-completed.active { background: var(--ok-ink); border-color: var(--ok-ink); color: #fff; }

.chip-status-denied { color: var(--bad-ink); border-color: var(--bad-bd); background: var(--bad-bg); }
.chip-status-denied .chip-dot { background: var(--bad); }
.chip-status-denied.active { background: var(--bad); border-color: var(--bad); color: #fff; }

.chip-status-cancelled { color: var(--ink-muted); }
.chip-status-cancelled .chip-dot { background: var(--line); }
.chip-status-cancelled.active { background: var(--ink-muted); border-color: var(--ink-muted); color: #fff; }

.chip.chip-status-active-any.active { background: var(--fps-navy); border-color: var(--fps-navy); color: #fff; }

/* ---------- Alerts / banners ---------- */
.banner { border-radius: var(--radius-sm); padding: 14px 16px; font-size: 14px; font-weight: 600; margin: 12px 0; }
.banner-ok { background: var(--ok-bg); border: 1px solid var(--ok-bd); color: var(--ok-ink); }
.banner-bad { background: var(--bad-bg); border: 1px solid var(--bad-bd); color: var(--bad-ink); }
.banner-warn { background: var(--fps-gold-bg); border: 1px solid var(--fps-gold-light); color: var(--fps-gold-ink); }
.banner-info { background: var(--surface-hover); border: 1px solid var(--surface-navy-tint); color: var(--fps-link); }

/* ---------- Timeline (approval workflow) ---------- */
.timeline-step { display: flex; gap: 14px; position: relative; padding-left: 2px; }
.timeline-step:not(:last-child) {
    background: linear-gradient(var(--line-soft), var(--line-soft)) no-repeat 7px 22px / 2px calc(100% - 22px);
}
.timeline-dot { width: 16px; height: 16px; border-radius: 999px; flex: none; margin-top: 3px; box-shadow: 0 0 0 3px #fff; background: var(--line); }
.timeline-dot.approved { background: var(--ok-ink); }
.timeline-dot.pending { background: var(--fps-gold); }
.timeline-dot.denied { background: var(--bad); }
.timeline-body { padding-bottom: 22px; min-width: 0; }
.timeline-role { font-family: var(--serif); font-weight: 700; font-size: 16px; color: var(--ink-strong); }
.timeline-person { font-size: 14px; color: var(--ink-body); margin-top: 2px; }
.timeline-status { font-size: 13px; margin-top: 4px; font-weight: 600; color: var(--ink-muted); }
.timeline-status.approved { color: var(--ok-ink); }
.timeline-status.pending { color: var(--fps-gold-ink); }
.timeline-status.denied { color: var(--bad-ink); }
.timeline-comment {
    background: var(--surface-tint); border-left: 3px solid var(--fps-gold);
    padding: 10px 12px; margin-top: 10px; font-size: 13px; color: var(--ink-body);
}

/* ---------- Dots (activity/notification) ---------- */
.dot { width: 10px; height: 10px; border-radius: 999px; flex: none; margin-top: 6px; background: var(--line); }
.dot-ok { background: var(--ok-ink); }
.dot-gold { background: var(--fps-gold); }
.dot-blue { background: var(--fps-blue); }
.dot-amber { background: #B87A12; }
.dot-bad { background: var(--bad); }

/* ---------- Stat cards ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.stat-card {
    display: block; text-align: left; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 20px; cursor: pointer; box-shadow: var(--shadow-card);
    text-decoration: none;
}
.stat-card:hover { border-color: var(--fps-blue); }
.stat-value { font-family: var(--serif); font-weight: 900; font-size: 38px; line-height: 1; color: var(--ink-strong); margin: 12px 0 6px; }
.stat-note { font-size: 13px; color: var(--ink-soft); }

/* ---------- Modal ---------- */
.fps-modal-backdrop {
    position: fixed; inset: 0; background: rgba(6, 30, 62, 0.45); z-index: 60;
    display: none; align-items: flex-start; justify-content: center;
    padding: 48px 20px; overflow-y: auto;
}
.fps-modal-backdrop.open { display: flex; }
.fps-modal {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-pop); width: 100%; max-width: 640px;
}
.fps-modal.wide { max-width: 900px; }
.fps-modal-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 20px; border-bottom: 1px solid var(--line-soft);
    background: var(--fps-navy); color: #fff; border-radius: var(--radius) var(--radius) 0 0;
}
.fps-modal-head h3 { font-family: var(--serif); font-weight: 700; font-size: 17px; color: #fff; margin: 0; }
.fps-modal-close { background: transparent; border: none; color: #C7D8EA; font-size: 22px; line-height: 1; cursor: pointer; padding: 2px 6px; }
.fps-modal-close:hover { color: #fff; }
.fps-modal-body { padding: 20px; }
.fps-modal-foot { display: flex; justify-content: flex-end; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line-soft); }

/* ---------- Loading / empty ---------- */
.spinner {
    width: 34px; height: 34px; border-radius: 999px; margin: 0 auto;
    border: 3px solid var(--surface-navy-tint); border-top-color: var(--fps-navy);
    animation: fps-spin 0.9s linear infinite;
}
@keyframes fps-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.5s; } }
.loading-block { text-align: center; padding: 48px 0; color: var(--ink-muted); font-size: 14px; }
.empty-block { text-align: center; padding: 48px 24px; color: var(--ink-soft); }
.empty-block .serif { font-size: 18px; margin-bottom: 6px; display: block; }

/* ---------- Pagination ---------- */
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 24px; flex-wrap: wrap; }
.pager button {
    padding: 8px 13px; border: 1px solid var(--line); background: #fff; color: var(--ink-body);
    border-radius: var(--radius-sm); font-weight: 600; font-size: 13px; cursor: pointer;
}
.pager button:hover:not([disabled]) { background: var(--surface-hover); }
.pager button.active { background: var(--fps-navy); border-color: var(--fps-navy); color: #fff; }
.pager button[disabled] { opacity: 0.5; cursor: default; }
.pager-note { width: 100%; text-align: center; font-size: 13px; color: var(--ink-muted); margin-top: 8px; }

/* ---------- Tabs (admin) ---------- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 22px; flex-wrap: wrap; }
.tabs button {
    background: transparent; border: none; border-bottom: 3px solid transparent;
    color: var(--ink-soft); font-weight: 600; font-size: 14px; padding: 12px 16px;
    cursor: pointer; margin-bottom: -1px;
}
.tabs button.active { border-bottom-color: var(--fps-gold); color: var(--ink-strong); font-weight: 700; }

/* ---------- Detail two-column ---------- */
.detail-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; align-items: start; }
.split-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; }

.hero-band {
    background: var(--fps-navy); color: #fff; border-radius: var(--radius);
    padding: 24px 26px; margin-bottom: 24px; display: flex; justify-content: space-between;
    gap: 24px; flex-wrap: wrap; align-items: flex-start;
}
.hero-band h1 { color: #fff; }
.hero-band .sub { font-size: 14px; color: var(--surface-navy-tint); margin-top: 8px; }

.mono { font-family: var(--mono); font-size: 12px; color: var(--ink-muted); word-break: break-all; }

.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kv-grid .v { font-size: 14px; color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .detail-grid, .split-grid { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
    .fps-main { padding: 20px 16px 48px; }
    .stat-grid { grid-template-columns: 1fr; }
    .topbar-user .u-meta { display: none; }
    .kv-grid { grid-template-columns: 1fr; }
}

/* ---------- Camera catalog (admin, request form picker, request detail) ---------- */
.cam-thumb {
    width: 96px; height: 54px; border-radius: 6px; flex: none; display: block; object-fit: cover;
    background: var(--surface-tint); border: 1px solid var(--line-soft);
}
.cam-thumb-ph {
    display: flex; align-items: center; justify-content: center; color: var(--ink-muted);
    font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.cam-stack { display: flex; flex-direction: column; gap: 8px; }
.cam-stack-item {
    display: flex; gap: 12px; align-items: center; background: #fff;
    border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px;
}
.cam-stack-item.inactive { opacity: .65; }
.cam-stack-num {
    width: 22px; height: 22px; border-radius: 999px; background: var(--fps-navy); color: #fff;
    font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none;
}
.cam-stack-body { flex: 1; min-width: 0; }
.cam-stack-title { font-weight: 700; font-size: 14px; color: var(--ink-strong); }
.cam-stack-sub { font-size: 12px; color: var(--ink-soft); }
.cam-stack-actions { display: flex; gap: 4px; flex: none; }
.cam-stack-actions button {
    border: 1px solid var(--line); background: #fff; border-radius: 6px; width: 28px; height: 28px;
    cursor: pointer; color: var(--ink-soft); font-size: 13px; line-height: 1;
}
.cam-stack-actions button:hover { background: var(--surface-hover); }
.cam-stack-actions button:disabled { opacity: .35; cursor: default; }
.cam-pair-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--ink-soft); margin-top: 6px; }
.cam-pair-chip {
    border: 1px dashed var(--fps-blue); border-radius: 999px; padding: 3px 10px; background: var(--surface-tint);
    cursor: pointer; font-size: 12px; color: var(--fps-link); font-weight: 600; font-family: inherit;
}
.cam-pair-chip:hover { background: var(--surface-hover); }
.cam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.cam-area-head {
    grid-column: 1 / -1; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--ink-muted); margin: 10px 0 0;
}
.cam-card {
    border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #fff;
    cursor: pointer; display: flex; flex-direction: column; position: relative; text-align: left; font-family: inherit; padding: 0;
}
.cam-card:hover { border-color: var(--fps-blue); }
.cam-card.selected { border-color: var(--fps-navy); box-shadow: 0 0 0 2px rgba(10, 47, 92, .18); }
.cam-card .cam-thumb { width: 100%; height: 104px; border: 0; border-radius: 0; }
.cam-card-check {
    position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 999px;
    background: rgba(255,255,255,.92); border: 1px solid var(--line); display: flex; align-items: center;
    justify-content: center; font-size: 12px; font-weight: 800; color: var(--fps-navy);
}
.cam-card.selected .cam-card-check { background: var(--fps-navy); color: #fff; border-color: var(--fps-navy); }
.cam-card-body { padding: 8px 10px; }
.cam-card-title { font-weight: 700; font-size: 13px; color: var(--ink-strong); }
.cam-card-sub { font-size: 12px; color: var(--ink-soft); }
.cam-code-pill {
    display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 600; padding: 1px 6px;
    border-radius: 4px; background: var(--surface-tint); border: 1px solid var(--line-soft); color: var(--ink-soft);
}
.cam-detail-stack { display: flex; flex-wrap: wrap; gap: 10px; }
.cam-detail-item {
    display: flex; gap: 10px; align-items: center; border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
    padding: 6px 10px 6px 6px; background: var(--ground); max-width: 100%;
}
.cam-admin-thumb { width: 120px; height: 68px; }
.cam-lightbox { display: none; position: fixed; inset: 0; background: rgba(6,30,62,.8); z-index: 80; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.cam-lightbox.open { display: flex; }
.cam-lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--radius); box-shadow: var(--shadow-pop); }

/* ---------- Rendered Markdown (Admin → Roadmap / TODO) ---------- */
.md-body { font-size: 14px; color: var(--ink-body); line-height: 1.6; }
.md-body .md-h2 {
    font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--ink-strong);
    margin: 0 0 12px;
}
.md-body .md-h3 {
    font-family: var(--serif); font-size: 17px; font-weight: 700; color: var(--ink-strong);
    margin: 26px 0 10px; padding-top: 16px; border-top: 1px solid var(--line-soft);
}
.md-body .md-h4 {
    font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--ink-muted); margin: 20px 0 8px;
}
.md-body p { margin: 0 0 12px; }
.md-body hr { border: 0; border-top: 1px solid var(--line-soft); margin: 20px 0; }
.md-body code {
    font-family: var(--mono); font-size: 12px; background: var(--surface-tint);
    border: 1px solid var(--line-soft); border-radius: 4px; padding: 1px 5px; color: var(--ink);
}
.md-body a { color: var(--fps-link); }
.md-code {
    background: var(--fps-navy-deep); color: #E7EAF1; border-radius: var(--radius-sm);
    padding: 14px 16px; overflow-x: auto; margin: 0 0 14px;
}
.md-code code { background: none; border: 0; padding: 0; color: inherit; font-size: 12.5px; }
.md-quote {
    border-left: 3px solid var(--fps-gold); background: var(--fps-gold-bg);
    color: var(--fps-gold-ink); padding: 10px 14px; margin: 0 0 14px; border-radius: 0 4px 4px 0;
}
.md-list { list-style: none; margin: 0 0 14px; padding: 0; }
.md-list li { display: flex; gap: 10px; align-items: flex-start; padding: 5px 0; }
.md-list li::before { content: "•"; color: var(--ink-muted); flex: none; }
.md-list li.md-task::before { content: none; }
.md-check {
    width: 16px; height: 16px; flex: none; margin-top: 2px; border-radius: 4px;
    border: 1px solid var(--line); background: #fff; display: flex; align-items: center;
    justify-content: center; font-size: 11px; font-weight: 800; color: #fff;
}
.md-check.done { background: var(--ok-ink); border-color: var(--ok-ink); }
