/* ============================================================
   CJP School Audit v2, shared design system.
   Mobile first. Light and dark. Ink and surface tokens follow the
   validated data viz reference palette. Page specific layout lives
   in css/user.css and css/admin.css.
   ============================================================ */
:root {
  color-scheme: light dark;
  --bg: #f4f6f8;
  --bg-grad: radial-gradient(1100px 500px at 85% -80px, rgba(42, 120, 214, 0.10), transparent 60%),
             radial-gradient(900px 420px at -10% 30%, rgba(27, 175, 122, 0.07), transparent 55%);
  --surface: #ffffff;
  --surface-2: #eef1f4;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --line: #e2e4e7;
  --border: rgba(11, 11, 11, 0.08);
  --accent: #256abf;
  --accent-strong: #1c5cab;
  --accent-soft: #eaf2fc;
  --grad-accent: linear-gradient(135deg, #2a78d6, #1baf7a);
  --bar: #2a78d6;
  --good-text: #006300;
  --danger: #d03b3b;
  --danger-soft: #fdecec;
  --like: #d03b6b;
  --glass: rgba(255, 255, 255, 0.72);
  --shadow: 0 1px 2px rgba(11, 30, 60, 0.05), 0 8px 28px rgba(11, 30, 60, 0.08);
  --shadow-lg: 0 12px 48px rgba(11, 30, 60, 0.18);
  --glow: 0 4px 22px rgba(42, 120, 214, 0.35);
  --radius: 18px;
  --radius-sm: 12px;
  --nav-h: 58px;
  --bn-h: 62px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0d12;
    --bg-grad: radial-gradient(1100px 500px at 85% -80px, rgba(57, 135, 229, 0.16), transparent 60%),
               radial-gradient(900px 420px at -10% 30%, rgba(25, 158, 112, 0.10), transparent 55%);
    --surface: #141a22;
    --surface-2: #1c242e;
    --ink: #f4f6f8;
    --ink-2: #c3c9d2;
    --muted: #8b929c;
    --line: #262f3a;
    --border: rgba(255, 255, 255, 0.09);
    --accent: #3987e5;
    --accent-strong: #5598e7;
    --accent-soft: #142a45;
    --grad-accent: linear-gradient(135deg, #3987e5, #199e70);
    --bar: #3987e5;
    --good-text: #0ca30c;
    --danger: #e66767;
    --danger-soft: #3a1717;
    --like: #e66795;
    --glass: rgba(20, 26, 34, 0.72);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 28px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.65);
    --glow: 0 4px 26px rgba(57, 135, 229, 0.45);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg-grad), var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4 { line-height: 1.22; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; } h4 { font-size: 0.95rem; }
p { margin: 0 0 0.8em; }
a { color: var(--accent); }
img, video { max-width: 100%; }
.muted { color: var(--ink-2); }
.small { font-size: 0.85rem; }
.hint { font-size: 0.82rem; color: var(--muted); margin: 0.3em 0 0.9em; }
code { background: var(--accent-soft); padding: 2px 7px; border-radius: 6px; font-size: 0.95em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (min-width: 768px) { h1 { font-size: 2rem; } }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-size: 0.95rem; font-weight: 600; text-decoration: none; font-family: inherit;
  transition: transform 0.06s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--grad-accent); border-color: transparent; color: #fff; box-shadow: var(--glow); }
.btn-primary:hover { filter: brightness(1.08); border-color: transparent; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-lg { padding: 13px 24px; font-size: 1.05rem; border-radius: 14px; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; border-radius: 10px; }
.btn-google { width: 100%; max-width: 340px; }
.g-mark {
  display: inline-grid; place-items: center; width: 24px; height: 24px;
  border-radius: 50%; background: #fff; border: 1px solid var(--line);
}
.g-mark svg { display: block; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 40px; height: 40px; padding: 0 10px; border-radius: 12px;
  border: none; background: transparent; color: var(--ink-2); cursor: pointer;
  font-size: 0.9rem; font-weight: 600; font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease, transform 0.06s ease;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn:active { transform: scale(0.94); }
.link-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--accent); font-size: 0.85rem; text-decoration: underline; font-family: inherit;
}
.input {
  width: 100%; padding: 11px 13px; margin-bottom: 4px;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink); font-size: 0.98rem; font-family: inherit;
  transition: border-color 0.15s ease;
}
.input:focus { border-color: var(--accent); outline: none; }
.input-sm { width: auto; padding: 8px 11px; font-size: 0.88rem; margin-bottom: 0; border-radius: 10px; }
textarea.input { resize: vertical; }
.field-label { display: block; font-weight: 600; font-size: 0.9rem; margin: 12px 0 5px; }
.req { color: var(--danger); }
.field-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .field-2col { grid-template-columns: 1fr; } }
.char-count { text-align: right; font-size: 0.75rem; color: var(--muted); }

/* ---------- navbar ---------- */
.navbar {
  position: sticky; top: 0; z-index: 600;
  display: flex; align-items: center; gap: 10px;
  height: var(--nav-h); padding: 0 14px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-mark {
  display: grid; place-items: center; flex: none;
  width: 36px; height: 36px; font-size: 20px;
  background: var(--accent-soft); border-radius: 50%;
  overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.12; min-width: 0; }
.brand-name { font-weight: 800; font-size: 0.98rem; white-space: nowrap; }
.brand-tag { font-size: 0.68rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-links { display: none; gap: 2px; margin-left: 8px; }
@media (min-width: 768px) { .nav-links { display: flex; } .brand-tag { max-width: 220px; } }
.nav-link {
  padding: 8px 13px; border-radius: 10px;
  text-decoration: none; color: var(--ink-2); font-size: 0.92rem; font-weight: 600;
}
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.nav-link.active { background: var(--accent-soft); color: var(--accent-strong); }
.nav-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.lang-toggle {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 6px 12px; border-radius: 999px; cursor: pointer; font-size: 0.82rem; font-weight: 600; font-family: inherit;
}
.lang-toggle:hover { border-color: var(--accent); color: var(--accent-strong); }

/* avatar + dropdown menu */
.avatar {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 0.8rem; flex: none;
}
.avatar-lg { width: 44px; height: 44px; font-size: 1.1rem; }
.avatar-btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); background: var(--surface);
  padding: 4px 10px 4px 4px; border-radius: 999px; cursor: pointer; font-family: inherit;
  font-size: 0.85rem; font-weight: 600; color: var(--ink);
}
.avatar-btn:hover { border-color: var(--accent); }
.menu {
  position: absolute; right: 12px; top: calc(var(--nav-h) + 6px); z-index: 700;
  min-width: 220px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-lg);
  animation: pop 0.14s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(0.98); } to { opacity: 1; transform: none; } }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; border: none; background: none; border-radius: 10px;
  color: var(--ink); font-size: 0.92rem; font-weight: 600; text-align: left;
  cursor: pointer; text-decoration: none; font-family: inherit;
}
.menu-item:hover { background: var(--surface-2); }
.menu-item.danger { color: var(--danger); }
.menu-sep { height: 1px; background: var(--line); margin: 5px 8px; }
.menu-head { padding: 10px 12px 6px; }
.menu-head .name { font-weight: 700; font-size: 0.92rem; }
.menu-head .email { font-size: 0.78rem; color: var(--muted); }

/* ---------- bottom nav (phones) ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 600;
  display: flex; align-items: stretch; justify-content: space-around;
  height: var(--bn-h); padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
@media (min-width: 768px) { .bottom-nav { display: none; } }
.bn-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: none; background: none; color: var(--muted); text-decoration: none;
  font-size: 0.66rem; font-weight: 700; cursor: pointer; font-family: inherit;
}
.bn-item .bn-ico { font-size: 1.25rem; line-height: 1; }
.bn-item.active { color: var(--accent-strong); }
.bn-fab {
  flex: none; align-self: center; margin: 0 6px;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--grad-accent); color: #fff; border: none; cursor: pointer;
  font-size: 1.5rem; line-height: 1; box-shadow: var(--glow);
  transform: translateY(-10px);
}
.bn-fab:active { transform: translateY(-10px) scale(0.94); }
.has-bottom-nav { padding-bottom: calc(var(--bn-h) + 26px); }
@media (min-width: 768px) { .has-bottom-nav { padding-bottom: 40px; } }

/* ---------- cards, chips, pills ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* v3 futuristic utilities */
.glass {
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid var(--border);
}
.text-grad {
  background: var(--grad-accent);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.glow { box-shadow: var(--glow); }
.fade-in { animation: fadein 0.35s ease both; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.card-pad { padding: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2);
  font-size: 0.83rem; font-weight: 600; font-family: inherit; white-space: nowrap;
}
.chip:hover { border-color: var(--accent); }
.chip.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.72rem; font-weight: 700; padding: 3px 10px;
  border-radius: 999px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap;
}
.pill-danger { background: var(--danger-soft); color: var(--danger); }
.pill-accent { background: var(--accent-soft); color: var(--accent-strong); }
.status-chip {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 0.76rem; font-weight: 700; color: var(--ink-2);
  background: var(--surface-2); border-radius: 999px; padding: 4px 11px 4px 7px; white-space: nowrap;
}
.status-chip-lg { font-size: 0.88rem; padding: 6px 14px 6px 9px; }
.status-glyph { vertical-align: -2px; }
.mini-badge {
  font-size: 0.7rem; padding: 2px 8px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2); white-space: nowrap;
}
.badge-sample { background: var(--accent-soft); color: var(--accent-strong); }

/* ---------- tabs & segmented ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 11px 15px; border: none; background: none; cursor: pointer;
  color: var(--ink-2); font-size: 0.92rem; font-weight: 700; font-family: inherit;
  border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tab.active { color: var(--accent-strong); border-bottom-color: var(--accent); }
.segmented {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--surface-2); border-radius: 12px;
}
.segmented button {
  padding: 7px 16px; border: none; border-radius: 10px; cursor: pointer;
  background: transparent; color: var(--ink-2); font-weight: 700; font-size: 0.86rem; font-family: inherit;
}
.segmented button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- like / action bar / comments ---------- */
.action-bar { display: flex; align-items: center; gap: 4px; }
.like-btn { color: var(--ink-2); }
.like-btn .heart { transition: transform 0.15s ease; }
.like-btn.liked { color: var(--like); }
.like-btn.liked .heart { transform: scale(1.15); }
.comment-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.comment-item:last-child { border-bottom: none; }
.comment-body { min-width: 0; flex: 1; }
.comment-meta { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.comment-name { font-weight: 700; font-size: 0.88rem; }
.comment-time { font-size: 0.74rem; color: var(--muted); }
.comment-text { font-size: 0.92rem; margin-top: 2px; white-space: pre-wrap; word-break: break-word; }
.comment-hidden { opacity: 0.55; }
.composer { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; }
.composer .input { margin-bottom: 0; }

/* ---------- sheets & modals ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(11, 11, 11, 0.55);
  display: grid; place-items: center; padding: 18px;
  animation: fade 0.15s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  position: relative;
  background: var(--surface); border-radius: 20px;
  padding: 24px; width: 100%; max-width: 560px;
  max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow-lg);
  animation: rise 0.18s ease;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.modal-sm { max-width: 380px; }
.modal-lg { max-width: 700px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.modal-x {
  position: absolute; right: 12px; top: 12px; z-index: 5;
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); cursor: pointer;
}
@media (max-width: 560px) {
  .overlay { padding: 0; align-items: end; }
  .modal.sheet, .overlay > .modal { border-radius: 22px 22px 0 0; max-height: 92vh; align-self: end; width: 100%; }
}

/* ---------- skeleton & empty states ---------- */
.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.empty-state { text-align: center; padding: 42px 20px; color: var(--muted); }
.empty-state .glyph { font-size: 2.6rem; display: block; margin-bottom: 8px; }

/* ---------- toasts ---------- */
#toast-host {
  position: fixed; bottom: calc(var(--bn-h) + 14px); left: 50%; transform: translateX(-50%);
  z-index: 1500; display: flex; flex-direction: column; gap: 8px; align-items: center;
  width: min(92vw, 480px); pointer-events: none;
}
@media (min-width: 768px) { #toast-host { bottom: 20px; } }
.toast {
  background: var(--ink); color: var(--bg);
  padding: 11px 18px; border-radius: 12px; font-size: 0.9rem;
  opacity: 0; transform: translateY(8px); transition: all 0.3s ease;
  box-shadow: var(--shadow-lg); text-align: center;
}
.toast.show { opacity: 1; transform: none; }
.toast-error { background: var(--danger); color: #fff; }
.toast-success { background: var(--good-text); color: #fff; }

/* ---------- verify panel ---------- */
.acct-card {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 10px 0;
}
.acct-name { font-weight: 700; }
.acct-email { font-size: 0.85rem; color: var(--ink-2); }
.acct-mail-ok { font-size: 0.78rem; color: var(--good-text); font-weight: 600; }
.acct-card .link-btn { margin-left: auto; }
.verified-banner {
  display: flex; align-items: center; gap: 8px;
  background: var(--accent-soft); border-radius: 12px; padding: 12px 14px;
  font-weight: 600; margin-top: 10px;
}
.panel-sub { margin: 18px 0 6px; font-size: 0.98rem; }
.phone-row { display: flex; gap: 8px; align-items: stretch; }
.phone-cc {
  display: grid; place-items: center; padding: 0 12px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface-2);
  font-weight: 600; color: var(--ink-2);
}
.phone-row .input { flex: 1; margin-bottom: 0; }
.otp-row { display: flex; gap: 8px; margin-top: 12px; }
.otp-input {
  max-width: 170px; letter-spacing: 8px; font-size: 1.2rem; text-align: center;
  font-variant-numeric: tabular-nums;
}
.sms-bubble {
  margin: 14px 0 4px; padding: 10px 14px; max-width: 340px;
  background: var(--accent-soft); border-radius: 14px 14px 14px 4px;
  border: 1px solid var(--border);
}
.sms-head { font-size: 0.72rem; color: var(--muted); margin-bottom: 2px; }
.sms-body strong { font-size: 1.15rem; letter-spacing: 2px; }
.demo-hint { font-size: 0.8rem; color: var(--muted); margin-top: 8px; }
.demo-banner {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: #fff7e0; color: #5c4300;
  padding: 7px 40px 7px 14px; font-size: 0.85rem; text-align: center; position: relative; z-index: 601;
}
@media (prefers-color-scheme: dark) { .demo-banner { background: #3a2f10; color: #fab219; } }
.demo-banner-x {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: inherit; font-size: 0.9rem;
}

/* ---------- wizard ---------- */
.steps { list-style: none; display: flex; justify-content: center; gap: 4px; padding: 0; margin: 18px 0; }
.steps li { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 64px; }
@media (min-width: 768px) { .steps li { width: 76px; } }
.step-dot {
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--line);
  font-weight: 700; font-size: 0.85rem; color: var(--muted);
  transition: all 0.2s ease;
}
.step-label { font-size: 0.7rem; color: var(--muted); text-align: center; }
.steps li.current .step-dot { border-color: var(--accent); color: var(--accent-strong); }
.steps li.current .step-label { color: var(--accent-strong); font-weight: 700; }
.steps li.done .step-dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.wizard-card { padding: 20px; max-width: 720px; margin: 0 auto; }
@media (min-width: 768px) { .wizard-card { padding: 26px; } }
.wiz-nav { display: flex; justify-content: space-between; margin-top: 22px; gap: 10px; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cat-chip {
  display: flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--line); border-radius: 12px; padding: 10px;
  background: var(--surface); color: var(--ink); cursor: pointer; font-size: 0.85rem;
  text-align: left; font-family: inherit; transition: all 0.12s ease;
}
.cat-chip:hover { border-color: var(--accent); }
.cat-chip.selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }
.cat-emoji { font-size: 1.15rem; }
.media-guard {
  display: flex; gap: 8px; align-items: flex-start;
  background: var(--accent-soft); border-radius: 12px; padding: 10px 12px;
  font-size: 0.82rem; margin-bottom: 10px;
}
.media-drop { border: 2px dashed var(--line); border-radius: 14px; padding: 16px; text-align: center; }
.media-drop.drag { border-color: var(--accent); background: var(--accent-soft); }
.media-grid, .detail-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 10px; }
.media-cell {
  position: relative; border-radius: 12px; overflow: hidden;
  aspect-ratio: 4 / 3; background: var(--surface-2); border: 1px solid var(--line);
}
.media-cell img, .media-cell video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-loading { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 0.75rem; padding: 6px; text-align: center; }
.media-badge { position: absolute; left: 6px; top: 6px; font-size: 0.9rem; }
.media-x {
  position: absolute; right: 4px; top: 4px;
  width: 28px; height: 28px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 0.8rem;
}
.media-hidden img, .media-hidden video { opacity: 0.35; filter: grayscale(1); }
.review-summary { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; }
.review-row { display: flex; gap: 10px; align-items: baseline; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.review-row:last-child { border-bottom: none; }
.review-label { flex: 0 0 84px; font-weight: 700; color: var(--ink-2); font-size: 0.8rem; }
.review-row > span:nth-child(2) { flex: 1; }
.consent-row { display: flex; gap: 10px; align-items: flex-start; font-size: 0.88rem; margin: 10px 0; cursor: pointer; }
.consent-row input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.success-box { text-align: center; padding: 18px 6px; }
.success-mark { font-size: 3rem; }
.loc-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.loc-status { font-size: 0.85rem; color: var(--good-text); font-weight: 600; }
.loc-label { font-size: 0.88rem; color: var(--ink-2); }

/* ---------- map ---------- */
.map-box { height: 300px; border-radius: var(--radius); border: 1px solid var(--line); z-index: 0; overflow: hidden; }
.map-box-lg { height: 420px; }
.map-missing { display: grid; place-items: center; color: var(--muted); padding: 16px; text-align: center; }
/* Center pin picker: the pin stays fixed, the map moves under it. */
.pick-pin {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -92%);
  font-size: 38px; line-height: 1; z-index: 700;
  pointer-events: none;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.35));
}
.pick-pin::after {
  content: ''; position: absolute; left: 50%; bottom: -3px;
  width: 10px; height: 4px; transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.3); border-radius: 50%;
}
.marker-glyph { background: none; border: none; }
.marker-glyph svg { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45)); }
.map-pop { font-family: inherit; min-width: 180px; }
.map-pop .btn { margin-top: 8px; }
.status-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 0.78rem; color: var(--ink-2); }
.legend-item { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }

/* ---------- charts (single hue; see dataviz rules) ---------- */
.kpi-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 768px) { .kpi-row { grid-template-columns: repeat(4, 1fr); gap: 12px; } }
.kpi-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi-value { font-size: 1.8rem; font-weight: 800; line-height: 1.1; }
.kpi-label { font-size: 0.8rem; color: var(--ink-2); margin-top: 2px; }
.kpi-sub { font-size: 0.74rem; color: var(--muted); margin-top: 2px; }
.status-strip { display: flex; gap: 2px; height: 20px; border-radius: 7px; overflow: hidden; }
.strip-seg { min-width: 14px; }
.bar-list { display: flex; flex-direction: column; gap: 7px; }
.bar-row { display: grid; grid-template-columns: 118px 1fr 34px; gap: 8px; align-items: center; }
@media (min-width: 768px) { .bar-row { grid-template-columns: 140px 1fr 36px; } }
.bar-label { font-size: 0.8rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { background: var(--surface-2); border-radius: 4px; height: 12px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--bar); border-radius: 0 4px 4px 0; }
.bar-value { font-size: 0.8rem; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- timeline / detail ---------- */
.timeline { border-left: 2px solid var(--line); margin: 6px 0 0 6px; padding-left: 14px; }
.tl-row { margin-bottom: 9px; font-size: 0.87rem; }
.tl-date { color: var(--muted); font-size: 0.76rem; display: block; }
.detail-desc { white-space: pre-wrap; word-break: break-word; }
.admin-panel { margin-top: 18px; border: 1.5px dashed var(--accent); border-radius: 14px; padding: 14px; }
.admin-row { display: flex; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.admin-contact { margin-top: 10px; }

/* ---------- tables / rows (admin lists) ---------- */
.table-row {
  display: flex; gap: 12px; align-items: center;
  padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer;
  transition: background 0.12s ease;
}
.table-row:hover { background: var(--surface-2); }
.table-row:last-child { border-bottom: none; }
.row-thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; background: var(--surface-2); }
.drawer-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ---------- misc ---------- */
.viz-tooltip {
  position: fixed; z-index: 1200; pointer-events: none;
  background: var(--ink); color: var(--bg);
  font-size: 0.78rem; padding: 5px 10px; border-radius: 7px; max-width: 260px;
}
.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px 16px 34px; text-align: center;
  font-size: 0.82rem; color: var(--muted);
}
.site-footer p { margin: 0 0 6px; }
.privacy-body { font-size: 0.88rem; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 14px; }
@media (min-width: 768px) { .container { padding: 0 20px; } }
