/* ============================================================
   VoteNG Election — design system
   Blue + white brand.  Royal #0E2F76 · Powder #A9C0E0 · Ice #F4FEFF
   Light theme = public site + voter flow.  body.dark = admin.
   ============================================================ */
:root {
  --royal: #0E2F76;          /* primary brand */
  --royal-700: #0a2255;
  --blue: #2563EB;           /* bright accent / links */
  --blue-600: #1D4ED8;
  --blue-300: #93B4F0;
  --powder: #A9C0E0;
  --ice: #F4FEFF;
  --sky: #EAF2FF;

  --bg: #F6F9FF;
  --bg-tint: #EAF1FE;        /* hero wash */
  --surface: #FFFFFF;
  --surface-2: #F2F7FF;
  --border: #E3EBF7;
  --border-strong: #CBD9EF;

  --text: #0F1B33;
  --muted: #5B6B85;

  --red: #E5484D;            /* logo check + danger */
  --green: #16A34A;
  --amber: #F59E0B;
  --purple: #7C3AED;

  --shadow-sm: 0 1px 2px rgba(14,47,118,.06), 0 2px 8px rgba(14,47,118,.05);
  --shadow: 0 10px 30px rgba(14,47,118,.10);
  --shadow-lg: 0 24px 60px rgba(14,47,118,.16);
  --radius: 16px;
  --radius-sm: 10px;
}

/* ---- dark theme (admin dashboard, mockup 2) ---- */
body.dark {
  --bg: #0A0E1A;
  --bg-tint: #0A0E1A;
  --surface: #121A2E;
  --surface-2: #18223A;
  --border: rgba(255,255,255,.08);
  --border-strong: rgba(255,255,255,.16);
  --text: #E8EEFB;
  --muted: #8A98B5;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 12px 30px rgba(0,0,0,.45);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.55);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: radial-gradient(1100px 520px at 70% -8%, var(--bg-tint), transparent 60%), var(--bg);
  color: var(--text);
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  min-height: 100vh; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.serif { font-family: 'Cormorant Garamond', Georgia, serif; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.gold, .accent { color: var(--blue); }   /* legacy alias → now blue */

/* ============================================================
   LOGO
   ============================================================ */
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 800; }
.brand .mark-img { height: 44px; width: auto; flex: none; }
.brand .mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  display: grid; place-items: center; box-shadow: var(--shadow-sm); flex: none;
}
.brand .mark svg { width: 22px; height: 22px; }
.brand .word { line-height: 1; }
.brand .word b { font-size: 1.18rem; letter-spacing: -.01em; }
.brand .word b span { color: var(--blue); }
.brand .word small { display: block; font-size: .58rem; letter-spacing: .34em; color: var(--muted); font-weight: 700; text-transform: uppercase; margin-top: 2px; }
body.dark .brand .mark { background: rgba(255,255,255,.06); border-color: var(--border-strong); }

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar .inner { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 1rem; }
.navlinks { display: flex; gap: 1.6rem; align-items: center; }
.navlinks a:not(.btn) { color: var(--muted); font-size: .9rem; font-weight: 600; }
.navlinks a:not(.btn):hover, .navlinks a.active { color: var(--royal); }
.nav-cta { display: flex; gap: .6rem; align-items: center; }
@media (max-width: 860px){ .navlinks a:not(.btn){ display:none; } }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; justify-content: center;
  font-weight: 700; font-size: .92rem; cursor: pointer; white-space: nowrap;
  padding: .72rem 1.35rem; border-radius: 12px; border: 1.5px solid transparent;
  transition: transform .14s, box-shadow .2s, background .2s, border-color .2s, opacity .2s;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
/* primary (legacy .btn-gold kept as alias) */
.btn-primary, .btn-gold {
  background: linear-gradient(135deg, var(--blue), var(--royal));
  color: #fff; box-shadow: 0 8px 20px rgba(37,99,235,.28);
}
.btn-primary:hover, .btn-gold:hover { box-shadow: 0 12px 28px rgba(37,99,235,.42); }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--royal); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--blue-300); }
body.dark .btn-ghost { color: var(--text); }
.btn-light { background: var(--surface); border-color: var(--border); color: var(--royal); box-shadow: var(--shadow-sm); }
.btn-light:hover { border-color: var(--blue-300); }
.btn-danger { background: transparent; border-color: rgba(229,72,77,.5); color: var(--red); }
.btn-danger:hover { background: rgba(229,72,77,.1); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-sm { padding: .48rem .85rem; font-size: .82rem; border-radius: 9px; }
.btn-block { width: 100%; }

/* ============================================================
   HERO  (landing)
   ============================================================ */
.hero { padding: 4.5rem 0 3rem; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1.15fr; gap: 2.5rem; align-items: center; }
@media (max-width: 940px){ .hero-grid { grid-template-columns: 1fr; } }
.pill {
  display: inline-flex; align-items: center; gap: .5rem; font-size: .78rem; font-weight: 700;
  color: var(--royal); background: var(--sky); border: 1px solid var(--border-strong);
  padding: .4rem .85rem; border-radius: 999px; margin-bottom: 1.2rem;
}
.pill svg { width: 15px; height: 15px; color: var(--blue); }
.hero h1 { font-size: clamp(2.4rem, 5.2vw, 3.9rem); line-height: 1.04; font-weight: 800; letter-spacing: -.02em; }
.hero h1 span { color: var(--blue); }
.hero .lead { color: var(--muted); font-size: 1.08rem; max-width: 540px; margin: 1.1rem 0 1.6rem; }
.hero-trust { display: flex; gap: 1.8rem; flex-wrap: wrap; margin: 1.6rem 0 1.9rem; }
.hero-trust .t { display: flex; gap: .6rem; align-items: flex-start; max-width: 220px; }
.hero-trust .t .ic { width: 34px; height: 34px; border-radius: 9px; background: var(--sky); display: grid; place-items: center; flex: none; }
.hero-trust .t .ic svg { width: 18px; height: 18px; color: var(--blue); }
.hero-trust .t b { font-size: .86rem; }
.hero-trust .t p { font-size: .76rem; color: var(--muted); line-height: 1.4; }
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-art { position: relative; }
.hero-art img, .hero-art .mock {
  border-radius: 18px; box-shadow: var(--shadow-lg); border: 1px solid var(--border);
  background: var(--surface); width: 100%;
}
.hero-glow { position: absolute; inset: -10% -5% auto auto; height: 70%; width: 70%;
  background: radial-gradient(closest-side, rgba(37,99,235,.18), transparent); filter: blur(10px); z-index: -1; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 3.5rem 0; }
.section-head { text-align: center; margin-bottom: 2.6rem; }
.section-label { font-size: .72rem; letter-spacing: .28em; color: var(--blue); text-transform: uppercase; font-weight: 800; }
.section-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 800; letter-spacing: -.01em; margin-top: .4rem; }
.section-head h2 span { color: var(--blue); }

/* stats bar */
.stats-bar {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.6rem 1rem; margin: 1rem 0;
}
.stats-bar .s { text-align: center; border-right: 1px solid var(--border); padding: .2rem .5rem; display: flex; align-items: center; justify-content: center; gap: .7rem; }
.stats-bar .s:last-child { border-right: none; }
.stats-bar .s .ic { width: 40px; height: 40px; border-radius: 50%; background: var(--sky); display: grid; place-items: center; flex: none; }
.stats-bar .s .ic svg { width: 20px; height: 20px; color: var(--blue); }
.stats-bar .s .n { font-size: 1.5rem; font-weight: 800; color: var(--royal); line-height: 1; }
.stats-bar .s .l { font-size: .74rem; color: var(--muted); }
@media (max-width: 760px){ .stats-bar { grid-template-columns: repeat(2,1fr); gap: 1rem; } .stats-bar .s:nth-child(2){border-right:none;} }

/* ============================================================
   CARDS / GRID
   ============================================================ */
.grid { display: grid; gap: 1.2rem; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px){ .cols-3, .cols-4 { grid-template-columns: repeat(2,1fr);} }
@media (max-width: 560px){ .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s, border-color .2s;
}
.card h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.feature-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--blue-300); }
.feature-card .ico {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--sky), #fff); border: 1px solid var(--border);
}
.feature-card .ico svg { width: 26px; height: 26px; color: var(--blue); }
.card .step-no { width: 40px; height: 40px; border-radius: 11px; background: var(--royal); color:#fff; display: grid; place-items: center; font-weight: 800; margin-bottom: .8rem; }

/* how it works steps */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
@media (max-width: 820px){ .steps { grid-template-columns: repeat(2,1fr); } }
.step { text-align: center; }
.step .circle {
  width: 66px; height: 66px; border-radius: 50%; margin: 0 auto .8rem;
  background: var(--surface); border: 2px solid var(--border); display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.step .circle svg { width: 26px; height: 26px; color: var(--blue); }
.step b { display: block; }
.step p { font-size: .8rem; color: var(--muted); }

/* CTA banner */
.cta-banner {
  background: linear-gradient(120deg, var(--royal), var(--blue-600));
  border-radius: 22px; color: #fff; padding: 2.6rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  box-shadow: var(--shadow);
}
.cta-banner h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
.cta-banner p { opacity: .85; font-size: .92rem; margin-top: .4rem; }
.cta-banner .btn-light { color: var(--royal); }

/* ============================================================
   FORMS
   ============================================================ */
.field { margin-bottom: 1.05rem; }
.field label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: .35rem; }
.field .hint { font-size: .76rem; color: var(--muted); margin-top: .3rem; }
.input, .select, .textarea {
  width: 100%; background: var(--surface); color: var(--text);
  border: 1.5px solid var(--border-strong); border-radius: 11px;
  padding: .74rem .9rem; font-family: inherit; font-size: .92rem; transition: border .2s, box-shadow .2s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37,99,235,.15); }
.textarea { resize: vertical; min-height: 90px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px){ .row { grid-template-columns: 1fr; } }

/* panel */
.panel {
  max-width: 460px; margin: 3rem auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem; box-shadow: var(--shadow);
}
.panel-wide { max-width: 760px; }

/* ============================================================
   BADGES / TABLE / STATS / RESULTS / BALLOT
   ============================================================ */
.badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 700; padding: .25rem .65rem; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.badge.pending  { background: #FEF3C7; color: #B45309; }
.badge.approved { background: #DBEAFE; color: #1D4ED8; }
.badge.paid     { background: #EDE9FE; color: #6D28D9; }
.badge.in_setup { background: var(--sky); color: var(--royal); }
.badge.active   { background: #DCFCE7; color: #15803D; }
.badge.completed{ background: #E2E8F0; color: #475569; }
body.dark .badge.pending{background:rgba(245,158,11,.18);color:#fbbf24;}
body.dark .badge.approved{background:rgba(37,99,235,.2);color:#93b4f0;}
body.dark .badge.active{background:rgba(34,197,94,.18);color:#86efac;}
body.dark .badge.completed{background:rgba(148,163,184,.2);color:#cbd5e1;}
body.dark .badge.in_setup{background:rgba(37,99,235,.15);color:#bcd0f5;}
body.dark .badge.paid{background:rgba(124,58,237,.2);color:#d8b4fe;}

.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th, .table td { text-align: left; padding: .75rem .85rem; border-bottom: 1px solid var(--border); }
.table th { color: var(--muted); font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.table tr:hover td { background: var(--surface-2); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }

.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1.15rem 1.25rem; box-shadow: var(--shadow-sm); }
.stat .n { font-size: 1.9rem; font-weight: 800; color: var(--royal); line-height: 1; }
body.dark .stat .n { color: #bcd0f5; }
.stat .l { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: .3rem; }

.result-row { margin-bottom: .9rem; }
.result-row .top { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: .3rem; }
.bar { height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--royal)); transition: width .6s; }
.winner { color: var(--blue-600); font-weight: 800; }

.ballot-pos { margin-bottom: 1.8rem; }
.ballot-pos h3 { margin-bottom: .8rem; padding-bottom: .4rem; border-bottom: 1px solid var(--border); }
.option {
  display: flex; align-items: center; gap: .9rem; padding: .9rem 1rem;
  border: 1.5px solid var(--border-strong); border-radius: 14px; margin-bottom: .6rem; cursor: pointer;
  transition: border .15s, background .15s, box-shadow .15s; background: var(--surface);
}
.option:hover { border-color: var(--blue-300); box-shadow: var(--shadow-sm); }
.option.selected { border-color: var(--blue); background: var(--sky); }
.option .avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: var(--sky); display: grid; place-items: center; color: var(--royal); font-weight: 800; flex: none; }
.option .meta { flex: 1; }
.option .meta .nm { font-weight: 700; }
.option .meta .mf { font-size: .8rem; color: var(--muted); }
.option .radio { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border-strong); flex: none; display:grid; place-items:center; }
.option.selected .radio { border-color: var(--blue); }
.option.selected .radio::after { content:""; width: 12px; height: 12px; border-radius: 50%; background: var(--blue); }

/* stepper (voter flow) */
.stepper { display: flex; align-items: center; justify-content: center; gap: .4rem; margin-bottom: 1.6rem; }
.stepper .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .76rem; font-weight: 800; background: var(--surface-2); color: var(--muted); border: 1.5px solid var(--border); }
.stepper .dot.done { background: var(--blue); color: #fff; border-color: var(--blue); }
.stepper .dot.current { background: var(--royal); color: #fff; border-color: var(--royal); }
.stepper .dot.current { box-shadow: 0 0 0 4px color-mix(in srgb, var(--royal) 22%, transparent); }
.stepper .ln { width: 28px; height: 2px; background: var(--border-strong); }

/* ============================================================
   VOTER FLOW — UX polish (transitions, ballot, success)
   ============================================================ */
/* each rendered stage fades/slides in for a smoother feel */
#root > * { animation: stageIn .34s cubic-bezier(.2,.7,.2,1) both; }
@keyframes stageIn { from { opacity: 0; transform: translateY(12px); } }

/* live "x / y selected" pill on the ballot */
.sel-pill { font-size: .8rem; font-weight: 800; padding: .35rem .7rem; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.sel-pill.full { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); border-color: transparent; }

/* selected ballot option gets a check + lift */
.option { transition: border .15s, background .15s, box-shadow .15s, transform .1s; }
.option:active { transform: scale(.99); }
.option.selected { box-shadow: 0 0 0 2px var(--blue) inset, var(--shadow-sm); }
.option.selected .radio::after { content: "✓"; width: auto; height: auto; background: none; color: #fff; font-size: .8rem; font-weight: 900; }
.option.selected .radio { background: var(--blue); }

/* success / confirmation screen */
.vote-done { max-width: 460px; margin: 0 auto; }
.success-check { width: 84px; height: 84px; border-radius: 50%; margin: .5rem auto 1rem;
  display: grid; place-items: center; font-size: 2.4rem; color: #fff;
  background: linear-gradient(135deg, var(--green, #22c55e), #16a34a);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--green, #22c55e) 45%, transparent);
  animation: popCheck .5s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes popCheck { 0% { transform: scale(0); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
.ref-card { display: inline-block; background: var(--surface-2); border: 1px dashed var(--border-strong);
  border-radius: 14px; padding: .8rem 1.2rem; }
.ref-card .hint { display: block; margin-top: .3rem; }
.done-actions { max-width: 360px; margin-left: auto; margin-right: auto; }
.await-badge { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto .4rem; display: grid; place-items: center;
  font-size: 1.8rem; background: var(--surface-2); border: 1px solid var(--border); }

/* candidate showcase (the election link landing) */
.show-head { margin-bottom: 1.6rem; }
.show-pos { margin-bottom: 1.8rem; }
.show-pos-title { font-size: 1.05rem; font-weight: 800; margin: 0 0 .8rem; padding-bottom: .4rem;
  border-bottom: 2px solid var(--border); color: var(--royal); }
body.dark .show-pos-title { color: var(--text); }
.cand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.cand-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.cand-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cand-photo { width: 100%; height: 180px; object-fit: cover; display: block; background: var(--surface-2); }
.cand-photo.ph { display: grid; place-items: center; font-size: 2.4rem; font-weight: 800; color: var(--royal); }
.cand-body { padding: .8rem 1rem 1rem; }
.cand-name { font-weight: 800; font-size: 1.02rem; }
.cand-sub { font-size: .8rem; color: var(--muted); margin-top: .1rem; }
.cand-mf { font-size: .85rem; color: var(--muted); margin: .5rem 0 0; line-height: 1.5; }

/* floating "Vote Now" */
.vote-fab-wrap { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; padding: 1rem;
  z-index: 70; background: linear-gradient(to top, var(--bg) 55%, transparent); pointer-events: none; }
.vote-fab { pointer-events: auto; font-size: 1.05rem; padding: .95rem 2.4rem; border-radius: 999px;
  box-shadow: 0 12px 30px rgba(14,47,118,.4); animation: fabPop .4s cubic-bezier(.2,1.4,.4,1) both; }
.vote-fab.disabled { background: var(--surface-2); color: var(--muted); box-shadow: none; border: 1px solid var(--border); cursor: default; }
@keyframes fabPop { from { transform: translateY(20px); opacity: 0; } }

/* confetti burst */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 15px; border-radius: 2px; opacity: .9;
  animation: confettiFall 3s linear forwards; }
@keyframes confettiFall { to { transform: translateY(105vh) rotate(540deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } #root > *, .success-check { animation: none; } }

/* ============================================================
   TOASTS
   ============================================================ */
.toast-wrap { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: .5rem; width: min(92vw, 420px); }
.toast { background: var(--surface); border: 1px solid var(--border); border-left-width: 4px; border-radius: 12px; padding: .85rem 1rem; font-size: .88rem; box-shadow: var(--shadow); animation: slideup .25s; }
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }
.toast.info { border-left-color: var(--blue); }
@keyframes slideup { from { opacity: 0; transform: translateY(10px); } }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 3.5rem; padding: 3rem 0 1.5rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 2rem; }
@media (max-width: 820px){ .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px){ .foot-grid { grid-template-columns: 1fr; } }
.site-footer h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .9rem; }
.site-footer a { display: block; color: var(--text); font-size: .88rem; margin-bottom: .5rem; }
.site-footer a:hover { color: var(--blue); }
.site-footer .tagline { color: var(--muted); font-size: .88rem; margin-top: .8rem; max-width: 240px; }
.foot-bottom { border-top: 1px solid var(--border); margin-top: 2rem; padding-top: 1.2rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--muted); font-size: .82rem; }
.footer { border-top: 1px solid var(--border); margin-top: 3rem; padding: 2rem 0; color: var(--muted); font-size: .85rem; }
.footer .inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ============================================================
   ADMIN SHELL  (dark sidebar — mockup 2)
   ============================================================ */
.admin-shell { display: grid; grid-template-columns: 268px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--surface); border-right: 1px solid var(--border);
  padding: 1.2rem 1rem; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side-logo { padding: .2rem .4rem 1rem; }
.side-group { font-size: .66rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin: 1.1rem .6rem .4rem; font-weight: 800; }
.side-nav a { display: flex; align-items: center; gap: .7rem; padding: .62rem .8rem; border-radius: 11px; color: var(--muted); font-weight: 600; font-size: .9rem; margin-bottom: 2px; }
.side-nav a:hover { background: var(--surface-2); color: var(--text); }
.side-nav a.active { background: linear-gradient(135deg, var(--blue), var(--royal)); color: #fff; box-shadow: 0 8px 18px rgba(37,99,235,.35); }
.side-nav a svg { width: 18px; height: 18px; flex: none; }
.side-nav a .pillcount { margin-left: auto; background: var(--blue); color: #fff; font-size: .68rem; font-weight: 800; padding: .08rem .5rem; border-radius: 999px; }
.side-nav a.active .pillcount { background: rgba(255,255,255,.25); }
.side-tag { margin-left: auto; font-size: .6rem; font-weight: 800; letter-spacing: .08em; color: var(--green); }
.side-help { margin-top: auto; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 1rem; font-size: .82rem; }
.admin-main { display: flex; flex-direction: column; min-width: 0; }
.admin-top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.3rem 1.8rem; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); z-index: 20;
}
.admin-top h1 { font-size: 1.4rem; font-weight: 800; }
.admin-top .sub { font-size: .85rem; color: var(--muted); }
.admin-top-actions { display: flex; align-items: center; gap: .8rem; }
#app { padding: 1.8rem; }
.admin-nav { display: none; }   /* legacy top nav replaced by sidebar */
.quick-actions { display: grid; gap: .5rem; }
.qa-btn { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600; font-size: .86rem; cursor: pointer; font-family: inherit; }
.qa-btn:hover { border-color: var(--blue-300); background: var(--surface-2); }
.qa-btn svg { width: 18px; height: 18px; color: var(--blue); }
.activity-item { display: flex; gap: .7rem; align-items: flex-start; padding: .6rem 0; border-bottom: 1px solid var(--border); font-size: .85rem; }
.activity-item:last-child { border-bottom: none; }
.activity-item .adot { width: 30px; height: 30px; border-radius: 8px; background: var(--sky); display: grid; place-items: center; flex: none; }
body.dark .activity-item .adot { background: rgba(37,99,235,.15); }
.activity-item .adot svg { width: 15px; height: 15px; color: var(--blue); }
.activity-item .when { margin-left: auto; color: var(--muted); font-size: .74rem; white-space: nowrap; }
@media (max-width: 860px){
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .side-group, .side-help, .side-logo { display: none; }
  .side-nav { display: flex; flex-wrap: wrap; gap: .3rem; }
  .side-nav a { margin: 0; }
}

/* ============================================================
   HELPERS
   ============================================================ */
.list-check { list-style: none; }
.list-check li { padding-left: 1.7rem; position: relative; margin-bottom: .5rem; }
.list-check li::before { content: "✓"; position: absolute; left: 0; color: var(--blue); font-weight: 800; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border-strong); border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }
.tag-input-list { display:flex; flex-wrap:wrap; gap:.4rem; margin-top:.5rem; }
.tag { display:inline-flex; align-items:center; gap:.4rem; background:var(--sky); border:1px solid var(--border-strong); border-radius:999px; padding:.3rem .7rem; font-size:.82rem; color: var(--royal); font-weight:600; }
.tag button { background:none; border:none; color:var(--muted); cursor:pointer; font-size:1rem; line-height:1; }
.divider-line { height:1px; background:var(--border); margin:1.5rem 0; }
.flex { display:flex; } .between { justify-content:space-between; } .items-center{ align-items:center; }
.gap { gap:.6rem; } .wrap{ flex-wrap:wrap; } .mt{ margin-top:1rem;} .mb{ margin-bottom:1rem;}
.code-pill { font-family: ui-monospace, monospace; letter-spacing:.15em; background:var(--surface-2); border:1px solid var(--border-strong); border-radius:8px; padding:.2rem .5rem; color: var(--royal); }
