/* ────────────────────────────────────────────────────────────────────
   Principia — design system
   Public site: dark, cinematic ("keynote") system scoped under
   body.dark-site. Admin shell keeps the legacy light theme below.
   ──────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: "Inter";
  src: url("/static/fonts/Inter-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2190-21FF;
}
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/Inter-var-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-024F, U+1E00-1EFF;
}

:root {
  --color-primary: #2c445a;
  --color-primary-dark: #16232f;
  --color-accent: #5f8096;
  --color-accent-light: #96c8e1;
  --color-bg: #ffffff;
  --color-bg-soft: #f4f7f9;
  --color-text: #1a2530;
  --color-text-soft: #4a5a68;
  --color-border: #e1e7ea;
  --radius: 10px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.55;
}

a { color: var(--color-primary); text-decoration: none; transition: color 0.15s ease, opacity 0.15s ease; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ══════════════════════════════════════════════════════════════════
   PUBLIC DARK SITE  (body.dark-site)
   ══════════════════════════════════════════════════════════════════ */

body.dark-site {
  --ink: #f5f5f7;
  --muted: #9ba1a8;
  --dim: #6e737a;
  --line: rgba(255, 255, 255, 0.13);
  --line-soft: rgba(255, 255, 255, 0.08);
  --card: #0c0c0f;
  --card-2: #121216;
  --acc: #96c8e1;             /* principia silver-blue */
  --acc-mwenenzo: #1593e6;
  --acc-mwenenzo-2: #22b8a7;
  --acc-finreg: #2fb3a3;
  --acc-finreg-2: #c99a2e;
  --acc-cellen: #4f7cff;
  --acc-cellen-2: #e8720c;
  background: #000;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.dark-site a { color: var(--ink); }

/* ── Header ─────────────────────────────────────────────────────── */

.dark-site .site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 5, 7, 0.72);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 1px 0 var(--line-soft);
}

.dark-site .site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}

.dark-site .brand img { height: 46px; }

.dark-site .main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}

.dark-site .main-nav a {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.dark-site .main-nav a:hover,
.dark-site .main-nav a.active {
  color: var(--ink);
  text-decoration: none;
}

.dark-site .lang-switch {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.78rem;
  color: var(--muted);
}
.dark-site .lang-switch:hover { border-color: var(--ink); color: var(--ink); text-decoration: none; }

/* ── Shared dark primitives ─────────────────────────────────────── */

.dark-site .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.17em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--acc);
  margin-bottom: 18px;
}

.dark-site .btn,
.dark-site .btn-hero {
  display: inline-block;
  background: var(--ink);
  color: #0a0a0c;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}
.dark-site .btn:hover,
.dark-site .btn-hero:hover {
  background: #fff;
  text-decoration: none;
  color: #000;
  transform: translateY(-1px);
}

.dark-site .btn-outline,
.dark-site .btn-hero-outline {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dark-site .btn-outline:hover,
.dark-site .btn-hero-outline:hover {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
  color: var(--ink);
}

.dark-site .btn-accent {
  background: var(--acc, var(--ink));
  color: #04121c;
}
.dark-site .btn-accent:hover { background: #fff; color: #000; }

.dark-site .text-link {
  color: var(--acc, var(--acc));
  font-weight: 500;
  font-size: 0.95rem;
}
.dark-site .text-link:hover { color: #fff; text-decoration: none; }
.dark-site .text-link::after { content: " →"; }

/* ── Home hero ──────────────────────────────────────────────────── */

.hero-space {
  position: relative;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(ellipse 60% 45% at 78% 8%, rgba(150, 200, 225, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse 55% 40% at 12% 88%, rgba(21, 147, 230, 0.08) 0%, transparent 60%),
    #000;
  color: #fff;
  overflow: hidden;
  padding: 96px 0 72px;
}

.hero-space::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.10) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.35;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 30%, transparent 75%);
}

.hero-space .container { position: relative; z-index: 1; }

.hero-space .eyebrow { margin-bottom: 22px; }

.hero-space h1 {
  font-size: clamp(2.7rem, 6.4vw, 5.2rem);
  line-height: 1.04;
  font-weight: 800;
  margin: 0 0 24px;
  max-width: 900px;
  letter-spacing: -0.025em;
  color: #fff;
}

.hero-space h1 .grad {
  background: linear-gradient(100deg, #ffffff 0%, #96c8e1 55%, #1593e6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-space p.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.6;
  color: var(--muted);
  max-width: 640px;
  margin: 0 0 40px;
  font-weight: 400;
}

.dark-site .hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* ── Manifesto strip ────────────────────────────────────────────── */

.manifesto {
  padding: 130px 0 110px;
  background: #000;
}

.manifesto .statement {
  font-size: clamp(1.7rem, 3.4vw, 2.7rem);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.015em;
  max-width: 900px;
  margin: 0;
  color: var(--ink);
}

.manifesto .statement .accent { color: var(--acc); }

.manifesto .chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 44px;
}

.dark-site .chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ── Product chapters ───────────────────────────────────────────── */

.chapter {
  position: relative;
  padding: 110px 0;
  overflow: hidden;
  background: #000;
}

.chapter::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 45% at 82% 30%, var(--glow, transparent) 0%, transparent 65%);
  pointer-events: none;
}

.chapter--rev::before {
  background: radial-gradient(ellipse 50% 45% at 12% 30%, var(--glow, transparent) 0%, transparent 65%);
}

.chapter--mwenenzo { --acc: var(--acc-mwenenzo); --glow: rgba(21, 147, 230, 0.10); }
.chapter--finreg   { --acc: var(--acc-finreg);   --glow: rgba(47, 179, 163, 0.10); }
.chapter--cellen   { --acc: var(--acc-cellen);   --glow: rgba(79, 124, 255, 0.10); }

.chapter-grid {
  position: relative;
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 72px;
  align-items: center;
  z-index: 1;
}

.chapter-grid--rev { grid-template-columns: 6fr 5fr; }
.chapter-grid--rev .chapter-copy { order: 2; }
.chapter-grid--rev .chapter-media { order: 1; }

.chapter .eyebrow { margin-bottom: 16px; }

.chapter h2 {
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 18px;
  color: #fff;
}

.chapter h2 .dot { color: var(--acc); }

.chapter .tagline {
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 34px;
  max-width: 460px;
}

.kp { list-style: none; margin: 0 0 38px; padding: 0; display: flex; flex-direction: column; gap: 16px; }

.kp li {
  position: relative;
  padding-left: 22px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink);
}

.kp li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--acc);
}

.kp li small { display: block; color: var(--dim); font-size: 0.82rem; margin-top: 2px; }

.chapter .actions { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }

/* screenshot cards */
.shot-card {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.shot-card img { width: 100%; display: block; }

.shot-card--float {
  position: absolute;
  right: -2%;
  bottom: -10%;
  width: 42%;
  transform: rotate(2deg);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.75);
}

.chapter-media { position: relative; }

.chapter-media--tall { display: flex; justify-content: center; }

/* phone frame for mobile captures */
.phone {
  width: min(320px, 72%);
  border-radius: 44px;
  border: 1px solid var(--line);
  background: #0a0a0d;
  padding: 12px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6), 0 0 60px var(--glow, transparent);
}

.phone .screen {
  border-radius: 34px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.phone img { width: 100%; display: block; }

/* wide cover band inside a chapter */
.cover-band {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.cover-band img { width: 100%; height: 340px; object-fit: cover; object-position: 50% 38%; display: block; }

/* ── Stats strip ────────────────────────────────────────────────── */

.stats {
  padding: 100px 0;
  background: #000;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-big .num {
  font-size: clamp(2.6rem, 5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1;
}

.stat-big .num .unit { font-size: 0.45em; font-weight: 600; color: var(--muted); }

.stat-big .label { margin-top: 10px; font-size: 0.85rem; color: var(--dim); }

.stats .fine {
  margin: 56px auto 0;
  max-width: 640px;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--dim);
}

.stats .rule { border: none; border-top: 1px solid var(--line-soft); margin: 0 0 56px; }

/* ── CTA band ───────────────────────────────────────────────────── */

.cta-band {
  position: relative;
  padding: 130px 0;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 60% at 50% 110%, rgba(150, 200, 225, 0.12) 0%, transparent 65%),
    #000;
  overflow: hidden;
}

.cta-band h2 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0 0 20px;
  color: #fff;
}

.cta-band p { color: var(--muted); font-size: 1.05rem; margin: 0 0 40px; }

.cta-band .hero-cta { justify-content: center; }

/* ── Legacy public blocks, dark-ified ───────────────────────────── */

.dark-site .hero {
  position: relative;
  background:
    radial-gradient(ellipse 55% 60% at 80% 0%, rgba(150, 200, 225, 0.09) 0%, transparent 60%),
    #000;
  color: #fff;
  padding: 84px 0 60px;
  overflow: hidden;
}

.dark-site .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.3;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 90% 90% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 90% at 50% 0%, #000 20%, transparent 75%);
}

.dark-site .hero .container { position: relative; z-index: 1; }

.dark-site .hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
  color: #fff;
}

.dark-site .hero p.lede { color: var(--muted); max-width: 620px; font-size: 1.02rem; margin: 16px 0 0; }

.dark-site section.block { padding: 84px 0; background: #000; }
.dark-site section.block.soft { background: #050507; }

.dark-site h2.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #fff;
  margin: 0 0 32px;
}

.dark-site h2.section-title::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 3px;
  border-radius: 999px;
  background: var(--acc);
  flex-shrink: 0;
}

.dark-site .prose { max-width: 720px; white-space: pre-line; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.dark-site .prose p { margin: 0 0 16px; }

.dark-site .grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.dark-site .card {
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 28px;
  background: var(--card);
  box-shadow: none;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.dark-site .card:hover {
  border-color: var(--line);
  background: var(--card-2);
  transform: translateY(-3px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.dark-site .card h3 { margin: 0 0 8px; color: #fff; font-size: 1.12rem; letter-spacing: -0.01em; }
.dark-site .card p { margin: 0 0 12px; color: var(--muted); font-size: 0.93rem; }
.dark-site .card .logo-mark { height: 52px; width: 52px; object-fit: contain; border-radius: 12px; margin-bottom: 16px; }

.dark-site .avatar-fallback {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2c445a, #5f8096);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.dark-site .avatar-fallback.round { border-radius: 50%; }

/* numbered principle list (about page) */
.dark-site .principles { list-style: none; counter-reset: pr; margin: 8px 0 0; padding: 0; max-width: 760px; }
.dark-site .principles li {
  counter-increment: pr;
  position: relative;
  padding: 18px 0 18px 64px;
  border-top: 1px solid var(--line-soft);
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.6;
}
.dark-site .principles li::before {
  content: counter(pr, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--acc);
  letter-spacing: 0.05em;
}

/* ── Dark forms ─────────────────────────────────────────────────── */

.dark-site form.stack { display: flex; flex-direction: column; gap: 18px; max-width: 540px; }

.dark-site label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-bottom: 7px; letter-spacing: 0.02em; }

.dark-site input[type="text"], .dark-site input[type="email"], .dark-site input[type="password"], .dark-site input[type="number"],
.dark-site textarea, .dark-site select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--card);
}

.dark-site textarea { resize: vertical; min-height: 120px; }

.dark-site input:focus, .dark-site textarea:focus, .dark-site select:focus {
  outline: none;
  border-color: rgba(150, 200, 225, 0.7);
  box-shadow: 0 0 0 3px rgba(150, 200, 225, 0.12);
}

/* ── Dark footer ────────────────────────────────────────────────── */

.dark-site .site-footer {
  background: #000;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  padding: 56px 0 36px;
  margin-top: 0;
  font-size: 0.88rem;
}

.dark-site .site-footer .brand img { height: 38px; margin-bottom: 14px; }
.dark-site .site-footer a { color: var(--muted); }
.dark-site .site-footer a:hover { color: var(--ink); text-decoration: none; }

.dark-site .footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line-soft);
}

.dark-site .footer-grid .tagline { color: var(--dim); font-size: 0.85rem; max-width: 320px; margin: 0; }

.dark-site .footer-nav { display: flex; flex-direction: column; gap: 10px; }
.dark-site .footer-nav a { font-size: 0.85rem; }

.dark-site .footer-bottom { margin-top: 26px; }
.dark-site .site-footer .legal { margin-top: 10px; color: var(--dim); font-size: 0.78rem; line-height: 1.6; white-space: pre-line; }
.dark-site .site-footer .admin-link { margin-top: 14px; }
.dark-site .site-footer .admin-link a { color: #3a3f45; font-size: 0.72rem; }

/* ── Responsive ─────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .chapter-grid, .chapter-grid--rev { grid-template-columns: 1fr; gap: 48px; }
  .chapter-grid--rev .chapter-copy { order: 1; }
  .chapter-grid--rev .chapter-media { order: 2; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .shot-card--float { position: static; transform: none; width: 70%; margin: -60px auto 0; }
  .cover-band img { height: 220px; }
  .chapter { padding: 80px 0; }
  .manifesto { padding: 90px 0 70px; }
}

@media (max-width: 560px) {
  .container { padding: 0 20px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .dark-site .main-nav { gap: 16px; }
}

/* ══════════════════════════════════════════════════════════════════
   ADMIN SHELL (legacy light theme — untouched)
   ══════════════════════════════════════════════════════════════════ */

/* ── Forms (legacy, admin) ──────────────────────────────────────── */

form.stack { display: flex; flex-direction: column; gap: 16px; max-width: 520px; }

label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--color-text-soft); margin-bottom: 6px; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--color-text);
  background: #fff;
}

textarea { resize: vertical; min-height: 100px; }

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(95, 128, 150, 0.15);
}

.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: auto; }

.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .field-pair { grid-template-columns: 1fr; } }

/* legacy buttons for non-dark contexts (admin) */

.btn {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn:hover { background: var(--color-primary-dark); text-decoration: none; color: #fff; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

.btn-outline:hover { background: var(--color-bg-soft); color: var(--color-primary); }

.admin-shell { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 230px;
  background: var(--color-primary-dark);
  color: #cfd9e0;
  padding: 24px 0;
  flex-shrink: 0;
}

.admin-sidebar .brand { padding: 0 20px 24px; }
.admin-sidebar .brand img { height: 40px; }

.admin-sidebar nav a {
  display: block;
  padding: 10px 20px;
  color: #cfd9e0;
  font-size: 0.92rem;
}

.admin-sidebar nav a:hover, .admin-sidebar nav a.active {
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
  color: #fff;
}

.admin-main { flex: 1; padding: 32px 40px; background: var(--color-bg-soft); }

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.admin-topbar h1 { margin: 0; font-size: 1.5rem; color: var(--color-primary); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; margin-bottom: 32px; }

.stat-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
}

.stat-card .num { font-size: 2rem; font-weight: 700; color: var(--color-primary); }
.stat-card .label { color: var(--color-text-soft); font-size: 0.85rem; }

table.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; }
table.admin-table th, table.admin-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.92rem;
}
table.admin-table th { background: var(--color-bg-soft); color: var(--color-text-soft); font-weight: 600; }
table.admin-table tr:last-child td { border-bottom: none; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.badge.yes { background: #e3f3e6; color: #256c34; }
.badge.no { background: #f3e6e6; color: #8a2f2f; }

/* An immediate, in-place toggle -- flips on click, no form/Save round trip
   needed just to hide or show something on the public site. */
.toggle-form { display: inline-block; }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; vertical-align: middle; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch .slider {
  position: absolute;
  inset: 0;
  background: #cbd5db;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.switch .slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.switch input:checked + .slider { background: var(--color-primary); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.admin-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 720px;
}

.actions-row { display: flex; gap: 10px; margin-top: 24px; }

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-soft);
}

.login-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 380px;
}

.login-card .brand { text-align: center; margin-bottom: 24px; }
.login-card .brand img { height: 56px; margin: 0 auto; }
.error-text { color: #b23a3a; font-size: 0.9rem; margin-bottom: 12px; }
.hint { color: var(--color-text-soft); font-size: 0.82rem; margin-top: 4px; }
