/* =========================================================
   Empower Life Group — Agent Resource Center
   Design system + layout
   ========================================================= */

:root {
  /* Palette — Empower brand: deep teal + near-black, gold + green accents */
  --ink-900: #061417;   /* deepest teal-black */
  --ink-800: #0c1e21;   /* brand text-primary tone */
  --ink-700: #103e3a;   /* brand primary background (teal) */
  --ink-600: #0c3633;   /* brand hover teal */
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);

  --paper: #0c1e21;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);

  --text: #EAF3F1;
  --text-soft: #A7C0BC;
  --text-mute: #6E8A86;

  --gold: #eabd23;       /* brand gold */
  --gold-deep: #c79f17;
  --emerald: #1fac71;    /* brand green */
  --emerald-deep: #178a5b;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.7);
  --shadow-soft: 0 12px 30px -18px rgba(0, 0, 0, 0.6);

  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; }

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(31, 172, 113, 0.12), transparent 60%),
    radial-gradient(1000px 700px at 0% 0%, rgba(234, 189, 35, 0.10), transparent 55%),
    var(--ink-900);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
em { font-style: italic; }

.muted { color: var(--text-soft); }

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.7rem;
}

/* ===== Buttons ===== */
.btn {
  --pad: 0.72rem 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: var(--pad);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.93rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
  white-space: nowrap;
}
.btn--lg { --pad: 0.95rem 1.7rem; font-size: 1rem; }
.btn--primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #0c1e21;
  box-shadow: 0 10px 24px -10px rgba(234, 189, 35, 0.6);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -12px rgba(234, 189, 35, 0.7); }
.btn--ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { transform: translateY(-2px); background: var(--surface-2); }

/* ===== Navigation ===== */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(6, 20, 23, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand__logo { height: 46px; width: auto; display: block; }
.footer__brand .brand__logo { height: 56px; margin-bottom: 0.4rem; }

.nav__links { display: flex; gap: 1.6rem; margin-left: 1rem; }
.nav__links a { font-size: 0.92rem; font-weight: 500; color: var(--text-soft); transition: color 0.2s; position: relative; }
.nav__links a:hover { color: var(--text); }
.nav__links a::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px; background: var(--gold); transition: width 0.25s var(--ease); }
.nav__links a:hover::after { width: 100%; }

.nav__actions { display: flex; align-items: center; gap: 0.9rem; margin-left: auto; }
.search {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.5rem 0.85rem; color: var(--text-mute);
  transition: border-color 0.2s, background 0.2s;
}
.search:focus-within { border-color: var(--gold); background: var(--surface-2); color: var(--text-soft); }
.search input { background: none; border: none; outline: none; color: var(--text); font: inherit; font-size: 0.9rem; width: 160px; }
.search input::placeholder { color: var(--text-mute); }
.search kbd { font-size: 0.7rem; border: 1px solid var(--line-strong); border-radius: 6px; padding: 0.05rem 0.4rem; color: var(--text-mute); }

.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav__burger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s; }

/* ===== Hero ===== */
.hero { position: relative; padding: 9.5rem 1.5rem 5rem; overflow: hidden; }
.hero__glow {
  position: absolute; top: -30%; left: 50%; transform: translateX(-50%);
  width: 900px; height: 900px; pointer-events: none;
  background: radial-gradient(circle, rgba(31, 172, 113, 0.16), transparent 60%);
  filter: blur(20px);
}
.hero__inner { max-width: 880px; margin: 0 auto; text-align: center; position: relative; }
.hero .eyebrow { font-size: 1.05rem; letter-spacing: 0.22em; margin-bottom: 1rem; }
.hero__title {
  font-family: "Zodiak", Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}
.hero__title em { color: var(--gold); font-style: italic; }
.hero__lead { font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: var(--text-soft); max-width: 600px; margin: 0 auto 2rem; }
.hero__cta { display: flex; gap: 0.85rem; justify-content: center; flex-wrap: wrap; }
.hero__stats { display: flex; gap: 2.5rem; justify-content: center; margin-top: 3.5rem; flex-wrap: wrap; }
.stat { text-align: center; }
.stat__num { display: block; font-family: "Zodiak", serif; font-size: 2.1rem; font-weight: 600; color: var(--text); }
.stat__label { font-size: 0.82rem; color: var(--text-mute); letter-spacing: 0.04em; }

/* ===== Sections ===== */
.section { max-width: var(--maxw); margin: 0 auto; padding: 4.5rem 1.5rem; }
.section--alt { max-width: none; background: linear-gradient(180deg, transparent, rgba(255,255,255,0.02), transparent); }
.section--alt > * { max-width: var(--maxw); margin-inline: auto; }
.section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; margin-bottom: 2.2rem; flex-wrap: wrap; }
.section__title { font-family: "Zodiak", serif; font-weight: 500; font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: -0.015em; }

/* ===== Quick Access grid ===== */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.quick {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 1.1rem 1.2rem; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line);
  transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
}
.quick:hover { transform: translateY(-3px); border-color: var(--line-strong); background: var(--surface-2); }
.quick__icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 1.25rem; background: linear-gradient(135deg, rgba(234, 189, 35,0.18), rgba(31, 172, 113,0.14)); border: 1px solid var(--line); flex-shrink: 0; }
.quick__label { font-weight: 600; font-size: 0.95rem; }
.quick__sub { font-size: 0.78rem; color: var(--text-mute); }

/* ===== Filters ===== */
.filters { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.filter {
  padding: 0.45rem 0.95rem; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-soft);
  cursor: pointer; transition: all 0.2s var(--ease);
}
.filter:hover { color: var(--text); border-color: var(--line-strong); }
.filter.is-active { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: #0c1e21; border-color: transparent; }

/* ===== Resource grid ===== */
.resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; }
.card {
  position: relative; display: flex; flex-direction: column;
  padding: 1.5rem; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--gold), var(--emerald)); opacity: 0; transition: opacity 0.3s; }
.card:hover { transform: translateY(-5px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }
.card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.card__icon { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; font-size: 1.4rem; background: linear-gradient(135deg, rgba(234, 189, 35,0.2), rgba(31, 172, 113,0.16)); border: 1px solid var(--line); }
.card__tag { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--emerald); padding: 0.25rem 0.6rem; border: 1px solid rgba(31, 172, 113,0.3); border-radius: 999px; }
.card__title { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.4rem; }
.card__desc { font-size: 0.9rem; color: var(--text-soft); flex: 1; margin-bottom: 1.1rem; }
.card__link { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; font-size: 0.9rem; color: var(--gold); }
.card__link svg { transition: transform 0.25s var(--ease); }
.card:hover .card__link svg { transform: translateX(4px); }

.empty { text-align: center; color: var(--text-mute); padding: 3rem 0; font-size: 1rem; }

/* ===== Onboarding checklist ===== */
.onb { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; }
.onb--done { border-color: rgba(31,172,113,0.35); }
.onb__toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; color: inherit; text-align: left; font: inherit; }
.onb__toggle .eyebrow { color: var(--emerald); }
.onb__toggle .section__title { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
.onb__toggle-right { display: flex; align-items: center; gap: 0.9rem; flex-shrink: 0; }
.onb__mini { font-size: 0.82rem; font-weight: 700; color: var(--text-mute); }
.onb__chev { display: grid; place-items: center; color: var(--text-soft); transition: transform 0.3s var(--ease); }
.onb--done:not(.is-collapsed) .onb__chev { transform: rotate(180deg); }
.onb--done .onb__list { margin-top: 1.4rem; }
.onb--done.is-collapsed .onb__list { display: none; }
.onb__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.onb__head .section__title { font-size: clamp(1.4rem, 2.5vw, 1.9rem); }
.onb__progress { text-align: right; min-width: 160px; }
.onb__progress > span { font-size: 0.82rem; color: var(--text-mute); font-weight: 600; }
.onb__bar { margin-top: 0.4rem; height: 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.onb__bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--emerald)); transition: width 0.4s var(--ease); }
.onb__list { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.onb__item { display: flex; align-items: center; gap: 1rem; padding: 0.95rem 1.1rem; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); transition: border-color 0.25s, opacity 0.25s; }
.onb__item.is-done { opacity: 0.62; }
.onb__item.is-done .onb__body strong { text-decoration: line-through; }
.onb__check { position: relative; flex-shrink: 0; cursor: pointer; }
.onb__check input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.onb__box { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line-strong); color: transparent; transition: all 0.2s var(--ease); }
.onb__check input:checked + .onb__box { background: linear-gradient(135deg, var(--gold), var(--emerald)); border-color: transparent; color: #0c1e21; }
.onb__check input:disabled + .onb__box { cursor: default; }
.onb__body { flex: 1; display: flex; flex-direction: column; }
.onb__body strong { font-size: 0.98rem; }
.onb__body span { font-size: 0.84rem; color: var(--text-mute); }
.onb__open { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.85rem; font-weight: 600; color: var(--gold); white-space: nowrap; }
.onb__open svg { transition: transform 0.2s var(--ease); }
.onb__open:hover svg { transform: translateX(3px); }
@media (max-width: 560px) { .onb__open span, .onb__open { font-size: 0.8rem; } .onb__item { flex-wrap: wrap; } }

/* ===== Onboarding (legacy hero steps) ===== */
.onboard { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 3rem; align-items: center; }
.onboard__copy .section__title { margin-bottom: 0.9rem; }
.onboard__copy .muted { margin-bottom: 1.6rem; max-width: 380px; }
.steps { list-style: none; display: flex; flex-direction: column; gap: 0.8rem; }
.step { display: flex; gap: 1rem; padding: 1.15rem 1.3rem; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); transition: transform 0.25s var(--ease), border-color 0.25s; }
.step:hover { transform: translateX(6px); border-color: var(--line-strong); }
.step__n { flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-family: "Zodiak", serif; font-weight: 600; background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: #0c1e21; }
.step h3 { font-size: 1rem; margin-bottom: 0.15rem; }
.step p { font-size: 0.86rem; color: var(--text-mute); }

/* ===== Support ===== */
.support { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: stretch; }
.support__card { padding: 2.5rem; border-radius: var(--radius); background: linear-gradient(140deg, var(--ink-700), var(--ink-600)); border: 1px solid var(--line); }
.support__card .section__title { margin-bottom: 0.7rem; }
.support__card .muted { margin-bottom: 1.6rem; max-width: 360px; }
.support__actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.support__contacts { display: flex; flex-direction: column; gap: 0.9rem; }
.contact { display: flex; align-items: center; gap: 1rem; padding: 1.2rem 1.4rem; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); transition: transform 0.25s var(--ease), border-color 0.25s; }
.contact:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.contact__icon { font-size: 1.4rem; }
.contact strong { display: block; font-size: 0.95rem; }
.contact span { font-size: 0.84rem; color: var(--text-mute); }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--line); margin-top: 3rem; padding: 3.5rem 1.5rem 1.5rem; }
.footer__inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.4fr 2fr; gap: 2rem; padding-bottom: 2.5rem; }
.footer__brand .muted { margin-top: 0.6rem; font-size: 0.9rem; max-width: 240px; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.footer__cols h4 { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-mute); margin-bottom: 0.9rem; }
.footer__cols a { display: block; font-size: 0.9rem; color: var(--text-soft); padding: 0.25rem 0; transition: color 0.2s; }
.footer__cols a:hover { color: var(--gold); }
.footer__bar { max-width: var(--maxw); margin: 0 auto; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; font-size: 0.82rem; color: var(--text-mute); flex-wrap: wrap; }

/* ===== Reveal animation ===== */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* ===== Native detail view ===== */
.detail { max-width: var(--maxw); margin: 0 auto; padding: 7rem 1.5rem 3rem; display: none; }
body.is-detail .detail { display: block; }
body.is-detail .app { display: none; }

/* ===== Multi-page views ===== */
.page { display: none; }
.page.is-active { display: block; }
.nav__links a.is-current { color: var(--text); }
.nav__links a.is-current::after { width: 100%; }
.detail__back { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text-soft); font-weight: 600; font-size: 0.9rem; margin-bottom: 1.8rem; background: var(--surface); border: 1px solid var(--line); padding: 0.55rem 1.05rem; border-radius: 999px; transition: color 0.2s, border-color 0.2s; }
.detail__back:hover { color: var(--text); border-color: var(--line-strong); }
.detail__head { display: flex; gap: 1.1rem; align-items: flex-start; margin-bottom: 1rem; }
.detail__icon { width: 64px; height: 64px; flex-shrink: 0; border-radius: 16px; display: grid; place-items: center; font-size: 1.9rem; background: linear-gradient(135deg, rgba(234,189,35,0.2), rgba(31,172,113,0.16)); border: 1px solid var(--line); }
.detail__tag { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--emerald); }
.detail__title { font-family: "Zodiak", serif; font-weight: 500; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.02em; line-height: 1.05; margin: 0.2rem 0; }
.detail__desc { color: var(--text-soft); font-size: 1.1rem; max-width: 720px; margin-bottom: 2.8rem; }

.block { margin-bottom: 2.8rem; }
.block__h { font-family: "Zodiak", serif; font-size: 1.45rem; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 1.1rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--line); }
.note { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 12px; padding: 1rem 1.25rem; color: var(--text-soft); font-size: 0.95rem; }
.note strong { color: var(--text); }

.linkbtns { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1rem; }
.linkbtn { display: flex; flex-direction: column; gap: 0.3rem; padding: 1.2rem 1.35rem; border-radius: 14px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s; }
.linkbtn:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow-soft); }
.linkbtn__label { font-weight: 700; display: flex; align-items: center; gap: 0.5rem; }
.linkbtn__label svg { color: var(--gold); transition: transform 0.25s var(--ease); }
.linkbtn:hover .linkbtn__label svg { transform: translateX(4px); }
.linkbtn__note { font-size: 0.84rem; color: var(--text-mute); line-height: 1.45; }
.linkbtn__code { display: inline-block; margin-top: 0.5rem; font-weight: 700; color: var(--gold); font-size: 0.8rem; letter-spacing: 0.03em; border: 1px dashed rgba(234,189,35,0.45); border-radius: 7px; padding: 0.15rem 0.55rem; width: fit-content; }

.media { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #000; max-width: 860px; }
.media.doc { aspect-ratio: 3 / 4; max-width: 680px; }
.media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media__cap { font-size: 0.86rem; color: var(--text-mute); margin-top: 0.6rem; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.2rem; }
.tile { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); transition: border-color 0.25s; }
.tile:hover { border-color: var(--line-strong); }
.tile__media { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--ink-700), var(--ink-600)); cursor: pointer; display: grid; place-items: center; }
.tile__media.doc { aspect-ratio: 4 / 3; }
.tile__play { width: 54px; height: 54px; border-radius: 50%; background: rgba(234,189,35,0.95); display: grid; place-items: center; font-size: 1.3rem; color: #0c1e21; transition: transform 0.2s var(--ease); }
.tile__media:hover .tile__play { transform: scale(1.12); }
.tile__media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tile__label { padding: 0.8rem 1rem; font-size: 0.9rem; font-weight: 600; line-height: 1.35; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .onboard, .support { grid-template-columns: 1fr; }
  .nav__links { display: none; }
}
@media (max-width: 720px) {
  .search { display: none; }
  .nav__burger { display: flex; }
  .nav__links { position: fixed; inset: 64px 0 auto 0; flex-direction: column; gap: 0; background: rgba(6, 20, 23,0.97); backdrop-filter: blur(16px); padding: 1rem 1.5rem; border-bottom: 1px solid var(--line); transform: translateY(-120%); transition: transform 0.35s var(--ease); }
  .nav__links.is-open { display: flex; transform: none; }
  .nav__links a { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
  .hero { padding-top: 7.5rem; }
  .hero__stats { gap: 1.6rem; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: repeat(3, 1fr); }
}
/* ===== Auth gate (login wall) ===== */
body.locked { overflow: hidden; }
body.locked .app, body.locked .detail, body.locked .footer, body.locked .nav { filter: blur(7px); pointer-events: none; user-select: none; }
.authgate { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 1.5rem;
  background: radial-gradient(900px 500px at 70% -10%, rgba(31,172,113,0.16), transparent 60%), rgba(6,20,23,0.86); backdrop-filter: blur(10px); }
body.locked .authgate { display: flex; }
.authcard { width: 100%; max-width: 400px; background: linear-gradient(180deg, var(--ink-700), var(--ink-800)); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 2.4rem 2rem; box-shadow: var(--shadow); text-align: center; }
.authcard img { height: 52px; margin-bottom: 1.4rem; }
.authcard h1 { font-family: "Zodiak", serif; font-weight: 500; font-size: 1.6rem; margin-bottom: 0.3rem; }
.authcard p { color: var(--text-soft); font-size: 0.92rem; margin-bottom: 1.6rem; }
.authcard form { display: flex; flex-direction: column; gap: 0.8rem; text-align: left; }
.authcard label { font-size: 0.78rem; font-weight: 600; color: var(--text-mute); letter-spacing: 0.04em; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field input { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; padding: 0.75rem 0.9rem; color: var(--text); font: inherit; font-size: 0.95rem; outline: none; transition: border-color 0.2s; }
.field input:focus { border-color: var(--gold); }
.authcard .btn--primary { justify-content: center; margin-top: 0.4rem; }
.auth-msg { font-size: 0.86rem; margin-top: 0.2rem; min-height: 1.1em; }
.auth-msg.err { color: #ff8b8b; }
.auth-msg.ok { color: var(--emerald); }
.auth-foot { margin-top: 1.2rem; font-size: 0.8rem; color: var(--text-mute); }
.auth-foot a { color: var(--gold); cursor: pointer; }

/* hide the "Agent Login" header button once signed in (body unlocks only after login) */
body:not(.locked) #agentLoginBtn { display: none; }

/* session links live inside the nav menu; shown only once signed in */
#navAdmin, #navLogout { display: none; cursor: pointer; }
body:not(.locked) #navLogout { display: block; }
body.is-admin:not(.locked) #navAdmin { display: block; }
#navAdmin { color: var(--gold); }
#navAdmin:hover { color: var(--gold); }

/* ===== Admin modal ===== */
.modal { position: fixed; inset: 0; z-index: 250; display: none; align-items: flex-start; justify-content: center; padding: 4.5rem 1.5rem 2rem; background: rgba(6,20,23,0.72); backdrop-filter: blur(8px); overflow-y: auto; }
.modal.show { display: flex; }
.modal__panel { width: 100%; max-width: 920px; background: linear-gradient(180deg, var(--ink-700), var(--ink-800)); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow); }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 1.3rem 1.6rem; border-bottom: 1px solid var(--line); }
.modal__head h2 { font-family: "Zodiak", serif; font-weight: 500; font-size: 1.4rem; }
.modal__close { background: none; border: 0; color: var(--text-soft); font-size: 1.6rem; cursor: pointer; line-height: 1; }
.modal__close:hover { color: var(--text); }
.tabs { display: flex; gap: 0.4rem; padding: 1rem 1.6rem 0; }
.tab { background: var(--surface); border: 1px solid var(--line); color: var(--text-soft); border-radius: 999px 999px 0 0; border-bottom: 0; padding: 0.55rem 1.1rem; font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer; }
.tab.is-active { background: var(--surface-2); color: var(--text); }
.modal__body { padding: 1.4rem 1.6rem 1.8rem; }

.utable { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.utable th { text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-mute); padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--line); }
.utable td { padding: 0.7rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.utable tr:hover td { background: var(--surface); }
.pill { font-size: 0.72rem; font-weight: 700; padding: 0.18rem 0.55rem; border-radius: 999px; }
.pill--admin { color: var(--gold); border: 1px solid rgba(234,189,35,0.4); }
.pill--agent { color: var(--text-soft); border: 1px solid var(--line-strong); }
.pill--on { color: var(--emerald); border: 1px solid rgba(31,172,113,0.4); }
.pill--off { color: #ff8b8b; border: 1px solid rgba(255,139,139,0.4); }
.rowact { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.rowact button { background: var(--surface); border: 1px solid var(--line); color: var(--text-soft); border-radius: 8px; padding: 0.3rem 0.55rem; font-size: 0.78rem; font-weight: 600; cursor: pointer; }
.rowact button:hover { color: var(--text); border-color: var(--line-strong); }
.rowact button.danger:hover { color: #ff8b8b; border-color: rgba(255,139,139,0.5); }

.adminform { display: grid; grid-template-columns: 1.4fr 1.4fr 0.8fr auto; gap: 0.6rem; align-items: end; margin-bottom: 1.4rem; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.adminform .field input, .adminform .field select { background: var(--ink-800); border: 1px solid var(--line-strong); border-radius: 8px; padding: 0.55rem 0.7rem; color: var(--text); font: inherit; font-size: 0.88rem; }
.admin-msg { font-size: 0.85rem; margin: 0.4rem 0 1rem; min-height: 1.1em; }
.admin-msg.ok { color: var(--emerald); } .admin-msg.err { color: #ff8b8b; }
.content-editor textarea { width: 100%; min-height: 320px; background: var(--ink-900); border: 1px solid var(--line-strong); border-radius: 10px; padding: 1rem; color: var(--text); font-family: ui-monospace, Menlo, monospace; font-size: 0.82rem; line-height: 1.5; }
@media (max-width: 640px) { .adminform { grid-template-columns: 1fr 1fr; } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
}
