@font-face {
  font-family: 'Special Elite';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/special-elite-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-var.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-500.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-600.woff2') format('woff2');
}

:root {
  --paper: #fefdf8;
  --paper-dim: #f6f1e2;
  --paper-card: #fffffb;
  --ink: #232617;
  --ink-soft: #5b6047;
  --ink-faint: #8b8b6f;
  --green: #4b5320;
  --green-deep: #313614;
  --green-tint: #e6e9d7;
  --gold: #d4a017;
  --gold-deep: #9c7812;
  --gold-tint: #f6e7b8;
  --line: #c9c3ac;
  --line-strong: #a39c7c;
  --shadow: rgba(35, 38, 23, 0.14);

  --font-display: 'Special Elite', 'Courier New', monospace;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1b1a13;
    --paper-dim: #232014;
    --paper-card: #221f16;
    --ink: #f1eede;
    --ink-soft: #bcb89e;
    --ink-faint: #837f65;
    --green: #97a862;
    --green-deep: #4b5320;
    --green-tint: #2a2c19;
    --gold: #ecc04c;
    --gold-deep: #d4a017;
    --gold-tint: #362c14;
    --line: #464327;
    --line-strong: #5c5834;
    --shadow: rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1b1a13;
  --paper-dim: #232014;
  --paper-card: #221f16;
  --ink: #f1eede;
  --ink-soft: #bcb89e;
  --ink-faint: #837f65;
  --green: #97a862;
  --green-deep: #4b5320;
  --green-tint: #2a2c19;
  --gold: #ecc04c;
  --gold-deep: #d4a017;
  --gold-tint: #362c14;
  --line: #464327;
  --line-strong: #5c5834;
  --shadow: rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --paper: #fefdf8;
  --paper-dim: #f6f1e2;
  --paper-card: #fffffb;
  --ink: #232617;
  --ink-soft: #5b6047;
  --ink-faint: #8b8b6f;
  --green: #4b5320;
  --green-deep: #313614;
  --green-tint: #e6e9d7;
  --gold: #d4a017;
  --gold-deep: #9c7812;
  --gold-tint: #f6e7b8;
  --line: #c9c3ac;
  --line-strong: #a39c7c;
  --shadow: rgba(35, 38, 23, 0.14);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { text-wrap: balance; margin: 0; font-weight: 700; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 3px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-deep);
}
@media (prefers-color-scheme: dark) { .eyebrow { color: var(--gold); } }
:root[data-theme="dark"] .eyebrow { color: var(--gold); }

.perf {
  height: 1px;
  background-image: repeating-linear-gradient(to right, var(--line-strong) 0 8px, transparent 8px 16px);
  position: relative;
}
.perf::before, .perf::after {
  content: "";
  position: absolute;
  top: -6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line-strong);
}
.perf::before { left: -6px; }
.perf::after { right: -6px; }

header.site {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; row-gap: 10px;
  padding-top: 16px; padding-bottom: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 50%;
  display: block;
  transform: rotate(-8deg);
}
.brand-word {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  color: var(--ink);
}
/* Admin accounts now render 11+ nav links — flex-wrap keeps them from
   compressing the logo/log-out button into an overlap once the row runs
   out of horizontal room, wrapping onto a second line instead. */
nav.links { display: flex; flex-wrap: wrap; gap: 10px 28px; row-gap: 8px; }
nav.links a {
  text-decoration: none; font-size: 0.92rem; font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
}
nav.links a:hover { color: var(--green); }
.cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold); color: var(--green-deep);
  font-weight: 700; font-size: 0.92rem;
  padding: 11px 20px; border-radius: 3px;
  border: 1px solid var(--gold-deep);
  text-decoration: none; cursor: pointer;
  box-shadow: 2px 2px 0 var(--gold-deep);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cta-btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--gold-deep); }
.cta-btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--gold-deep); }
.cta-ghost {
  background: transparent; border: 1px solid var(--line-strong); color: var(--ink);
  box-shadow: none;
}
.cta-ghost:hover { border-color: var(--green); color: var(--green); transform: none; box-shadow: none; }

.hero {
  padding-top: 64px; padding-bottom: 56px;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 4.6vw, 3.6rem);
  line-height: 1.08;
  color: var(--ink);
  margin: 14px 0 18px;
}
.hero .sub {
  font-size: 1.08rem; color: var(--ink-soft); max-width: 46ch; margin-bottom: 26px;
}
.hero .ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 16px; }
.hero .microtrust {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-faint);
}

.hero-visual { position: relative; }
.carousel-frame {
  position: relative;
  aspect-ratio: 1200 / 768;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  background: var(--paper-dim);
  overflow: hidden;
  box-shadow: 6px 6px 0 var(--shadow);
}
.slide {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 8px;
  opacity: 0; transition: opacity 0.6s ease;
  background:
    repeating-linear-gradient(135deg, transparent 0 18px, color-mix(in srgb, var(--green) 7%, transparent) 18px 19px),
    var(--paper-dim);
  text-align: center; padding: 20px;
}
.slide.active { opacity: 1; }
.slide img, .slide video { width: 100%; height: 100%; object-fit: cover; }
.slide .ph-label {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-faint);
  border: 1px dashed var(--line-strong); padding: 6px 12px; border-radius: 3px;
}
.slide .ph-cap { font-size: 0.95rem; color: var(--ink-soft); max-width: 32ch; }
.dots { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
.dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong);
  border: none; cursor: pointer; padding: 0;
}
.dot[aria-current="true"] { background: var(--green); width: 22px; border-radius: 5px; transition: width 0.25s ease; }

.stamp {
  position: absolute; left: -18px; bottom: -22px;
  width: 168px; height: 168px; border-radius: 50%;
  border: 3px double var(--green);
  background: color-mix(in srgb, var(--paper-card) 88%, transparent);
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 14px;
  transform: rotate(-11deg) scale(1);
  font-family: var(--font-display); color: var(--green);
  box-shadow: 3px 3px 0 var(--shadow);
}
.stamp-inner { display: flex; flex-direction: column; gap: 4px; }
.stamp-cat { font-size: 0.78rem; line-height: 1.25; text-transform: uppercase; }
.stamp-due { font-family: var(--font-mono); font-size: 0.68rem; color: var(--gold-deep); font-weight: 600; letter-spacing: 0.03em; }
.stamp.thump { animation: thump 0.5s ease; }
@keyframes thump {
  0% { transform: rotate(-11deg) scale(1.35); opacity: 0; }
  55% { transform: rotate(-11deg) scale(0.94); opacity: 1; }
  100% { transform: rotate(-11deg) scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .stamp.thump { animation: none; }
  .slide { transition: opacity 0.2s linear; }
}

.marquee-strip {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--green-tint);
  padding: 14px 0;
  overflow: hidden;
}
.marquee-track {
  display: flex; gap: 12px; width: max-content;
  animation: scroll-left 32s linear infinite;
}
.marquee-strip:hover .marquee-track { animation-play-state: paused; }
@keyframes scroll-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }
.tag-pill {
  font-family: var(--font-mono); font-size: 0.8rem; white-space: nowrap;
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 6px 14px; background: var(--paper-card); color: var(--ink-soft);
}

section { padding-top: 76px; padding-bottom: 76px; }
.section-head { max-width: 62ch; margin-bottom: 44px; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  margin-top: 10px;
}
.section-head p { color: var(--ink-soft); margin-top: 12px; font-size: 1.02rem; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step-card {
  background: var(--paper-card); border: 1px solid var(--line);
  border-radius: 4px; padding: 22px 20px;
  position: relative;
}
.step-num {
  font-family: var(--font-mono); font-weight: 600; color: var(--gold-deep);
  font-size: 0.85rem; letter-spacing: 0.05em;
}
.step-card h3 { font-size: 1.02rem; margin: 10px 0 8px; }
.step-card p { color: var(--ink-soft); font-size: 0.92rem; }

.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cat-card {
  background: var(--paper-card); border: 1px solid var(--line);
  border-radius: 4px; padding: 18px; display: flex; gap: 12px; align-items: flex-start;
}
.cat-icon { flex: none; width: 34px; height: 34px; color: var(--green); }
.cat-card h3 { font-size: 0.95rem; margin-bottom: 4px; }
.cat-card p { font-size: 0.82rem; color: var(--ink-faint); }

.period-toggle {
  display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 4px; margin-bottom: 36px; gap: 4px;
}
.period-toggle button {
  border: none; background: transparent; padding: 8px 18px; border-radius: 999px;
  font-size: 0.86rem; font-weight: 600; cursor: pointer; color: var(--ink-soft);
}
.period-toggle button[aria-pressed="true"] { background: var(--green); color: var(--paper); }
.save-badge { font-family: var(--font-mono); font-size: 0.68rem; margin-left: 4px; opacity: 0.85; }

.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.price-card {
  background: var(--paper-card);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 26px 24px 24px;
  position: relative;
  display: flex; flex-direction: column; gap: 16px;
}
.price-card.featured { border-color: var(--gold-deep); box-shadow: 5px 5px 0 var(--gold-tint); }
.ribbon {
  position: absolute; top: -12px; right: 18px;
  background: var(--gold); color: var(--green-deep);
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700;
  padding: 5px 10px; border-radius: 3px; letter-spacing: 0.04em;
  border: 1px solid var(--gold-deep);
}
.tier-name { font-family: var(--font-display); font-size: 1.2rem; }
.tier-sms { font-size: 0.84rem; color: var(--ink-soft); }
.price-num {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 2.1rem; font-weight: 600; color: var(--ink);
}
.price-period { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-faint); }
.price-card ul { display: flex; flex-direction: column; gap: 9px; margin: 4px 0; }
.price-card li { font-size: 0.88rem; color: var(--ink-soft); display: flex; gap: 8px; }
.price-card li::before { content: "\2713"; color: var(--green); font-weight: 700; }
.price-card .cta-btn, .price-card .cta-ghost { justify-content: center; margin-top: auto; }

.topup-note { margin-top: 30px; text-align: center; font-size: 0.88rem; color: var(--ink-soft); font-family: var(--font-mono); }

.faq-list { display: flex; flex-direction: column; gap: 10px; max-width: 74ch; }
details {
  border: 1px solid var(--line); border-radius: 4px; background: var(--paper-card);
  padding: 4px 20px;
}
summary {
  cursor: pointer; padding: 16px 0; font-weight: 600; font-size: 0.98rem;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; font-family: var(--font-mono); font-size: 1.2rem; color: var(--gold-deep);
  flex: none;
}
details[open] summary::after { content: "\2013"; }
details p { padding-bottom: 18px; color: var(--ink-soft); font-size: 0.92rem; max-width: 68ch; }

footer.site {
  --footer-text: #fefdf8;
  --footer-text-soft: rgba(254, 253, 248, 0.82);
  --footer-text-tag: rgba(254, 253, 248, 0.70);
  --footer-text-faint: rgba(254, 253, 248, 0.55);
  --footer-line: rgba(254, 253, 248, 0.35);
  background: var(--green-deep); color: var(--footer-text); padding: 52px 0 28px;
}
@media (prefers-color-scheme: dark) { footer.site { background: var(--paper-dim); border-top: 1px solid var(--line); } }
:root[data-theme="dark"] footer.site { background: var(--paper-dim); border-top: 1px solid var(--line); }
footer.site .grid { display: grid; grid-template-columns: 1.2fr 0.9fr 0.9fr 0.9fr 0.9fr; gap: 32px; }
footer.site .brand-word { color: var(--footer-text); }
footer.site p.tag { color: var(--footer-text-tag); font-size: 0.9rem; margin-top: 10px; max-width: 34ch; }
footer.site p.wink {
  font-family: var(--font-mono); font-size: 0.78rem; font-style: italic;
  color: var(--gold); margin-top: 16px; max-width: 32ch;
  padding-left: 10px; border-left: 2px dashed color-mix(in srgb, var(--gold) 55%, transparent);
}
footer.site h4 {
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 14px;
}
footer.site ul { display: flex; flex-direction: column; gap: 10px; }
footer.site a { text-decoration: none; color: var(--footer-text-soft); font-size: 0.92rem; }
footer.site a:hover { color: var(--gold); }
.sig-line { border-top: 1px dashed var(--footer-line); margin-top: 40px; padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.sig-line small { font-family: var(--font-mono); font-size: 0.75rem; color: var(--footer-text-faint); }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; align-items: center; gap: 4px;
  width: 40px; height: 40px; flex: none; border: 1px solid var(--line-strong); border-radius: 4px;
  background: var(--paper-card); cursor: pointer; padding: 0;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 1px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .nav { position: relative; flex-wrap: wrap; }
  .nav-toggle { display: flex; }
  nav.links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; background: var(--paper-card);
    border-bottom: 1px solid var(--line-strong); padding: 6px 24px 14px;
    box-shadow: 0 10px 18px rgba(0,0,0,0.12); z-index: 50;
  }
  nav.links.nav-open { display: flex; }
  nav.links a { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 0.98rem; }
  nav.links a:last-child { border-bottom: none; }
  .steps, .price-grid { grid-template-columns: 1fr 1fr; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  footer.site .grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .steps, .cat-grid, .price-grid { grid-template-columns: 1fr; }
  .stamp { width: 128px; height: 128px; left: 8px; bottom: -18px; }
}

/* ---------- app screens (auth, dashboard, admin) ---------- */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.app-nav {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.app-main { flex: 1; padding: 48px 0 64px; }
.narrow { max-width: 480px; margin: 0 auto; }
.medium { max-width: 720px; margin: 0 auto; }

.card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 32px;
}
.card h1 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin-bottom: 8px;
}
.card .lede { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 28px; }

.status-banner {
  background: var(--green-tint); border: 1px solid var(--green);
  color: var(--green-deep); border-radius: 4px; padding: 12px 16px;
  font-size: 0.9rem; margin-bottom: 20px;
}
.error-banner {
  background: color-mix(in srgb, #b3392c 12%, var(--paper-card));
  border: 1px solid #b3392c; color: #8a2a20;
  border-radius: 4px; padding: 12px 16px; font-size: 0.9rem; margin-bottom: 20px;
}
:root[data-theme="dark"] .error-banner, @media (prefers-color-scheme: dark) {
  .error-banner { background: color-mix(in srgb, #e8695c 14%, var(--paper-card)); border-color: #e8695c; color: #f3b6ae; }
}

.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: 0.84rem; font-weight: 600;
  color: var(--ink); margin-bottom: 6px;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"] {
  width: 100%; padding: 10px 12px; font-size: 0.95rem;
  font-family: var(--font-body); color: var(--ink);
  background: var(--paper); border: 1px solid var(--line-strong);
  border-radius: 3px;
}
.form-group input:focus { outline: 2px solid var(--gold-deep); outline-offset: 1px; }
.field-error { color: #b3392c; font-size: 0.8rem; margin-top: 5px; }

.plan-radio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.plan-radio { position: relative; }
.plan-radio input { position: absolute; opacity: 0; }
.plan-radio label {
  display: block; border: 1px solid var(--line-strong); border-radius: 4px;
  padding: 12px; cursor: pointer; text-align: center; font-weight: 600;
}
.plan-radio input:checked + label { border-color: var(--gold-deep); background: var(--gold-tint); }
.plan-radio .plan-sub { display: block; font-weight: 400; font-size: 0.78rem; color: var(--ink-soft); margin-top: 4px; }

.period-radio-row { display: flex; gap: 10px; margin-bottom: 22px; }
.period-radio { position: relative; flex: 1; }
.period-radio input { position: absolute; opacity: 0; }
.period-radio label {
  display: block; border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 9px; cursor: pointer; text-align: center; font-size: 0.86rem; font-weight: 600;
}
.period-radio input:checked + label { border-color: var(--green); background: var(--green-tint); color: var(--green-deep); }

.btn-block { width: 100%; justify-content: center; display: flex; }

.summary-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 0.92rem; }
.summary-row:last-child { border-bottom: none; }
.summary-row span:last-child { font-family: var(--font-mono); color: var(--ink-soft); }

.dash-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 32px; }
.dash-tile { background: var(--paper-card); border: 1px solid var(--line); border-radius: 4px; padding: 20px; }
.dash-tile .eyebrow { display: block; margin-bottom: 8px; }
.dash-tile .big { font-family: var(--font-mono); font-size: 1.6rem; font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  .plan-radio-grid { grid-template-columns: 1fr; }
  .dash-tiles { grid-template-columns: 1fr; }
}

/* ---------- admin dashboard ---------- */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat-tile { background: var(--paper-card); border: 1px solid var(--line); border-radius: 4px; padding: 18px; }
.stat-tile .eyebrow { display: block; margin-bottom: 8px; }
.stat-tile .big { font-family: var(--font-mono); font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.stat-tile.placeholder { opacity: 0.6; }
.stat-tile .small-note { font-size: 0.76rem; color: var(--ink-faint); margin-top: 6px; }

.chart-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; margin-bottom: 28px; }
.chart-card { background: var(--paper-card); border: 1px solid var(--line); border-radius: 4px; padding: 18px; }
.chart-card h3 { font-size: 0.92rem; margin-bottom: 14px; }
.chart-card canvas { max-height: 220px; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.admin-table th { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-faint); }
.admin-table tr:hover td { background: var(--green-tint); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 4px; margin-bottom: 20px; }
.table-wrap .admin-table { border: none; }
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 0.72rem; font-family: var(--font-mono); background: var(--green-tint); color: var(--green-deep); }
.badge.gold { background: var(--gold-tint); color: var(--gold-deep); }
.badge.muted { background: var(--paper-dim); color: var(--ink-faint); }

.search-row { display: flex; gap: 10px; margin-bottom: 18px; }
.search-row input { flex: 1; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 3px; background: var(--paper); color: var(--ink); font-family: var(--font-body); }

.pagination-row { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.pagination-row a, .pagination-row span { padding: 6px 12px; border: 1px solid var(--line); border-radius: 3px; font-size: 0.84rem; text-decoration: none; color: var(--ink-soft); }
.pagination-row a:hover { border-color: var(--green); color: var(--green); }

.danger-btn { background: transparent; border: 1px solid #b3392c; color: #b3392c; padding: 10px 18px; border-radius: 3px; font-weight: 600; cursor: pointer; }
.danger-btn:hover { background: #b3392c; color: #fff; }

@media (max-width: 900px) {
  .stat-tiles { grid-template-columns: 1fr 1fr; }
  .chart-grid { grid-template-columns: 1fr; }
}

/* ---------- reminders & categories ---------- */
.equal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.reminder-card {
  background: var(--paper-card); border: 1px solid var(--line); border-radius: 4px;
  padding: 16px 18px; display: flex; align-items: center; gap: 14px; margin-bottom: 10px;
}
.reminder-card.overdue { border-color: #b3392c; }
.reminder-icon { flex: none; width: 36px; height: 36px; color: var(--green); }
.reminder-body { flex: 1; min-width: 0; }
.reminder-body h3 { font-size: 0.98rem; margin-bottom: 3px; }
.reminder-meta { font-size: 0.8rem; color: var(--ink-faint); font-family: var(--font-mono); }
.reminder-actions { display: flex; gap: 8px; flex: none; }
.reminder-actions button, .reminder-actions a {
  font-size: 0.78rem; padding: 7px 12px; border-radius: 3px; border: 1px solid var(--line-strong);
  background: var(--paper); color: var(--ink-soft); cursor: pointer; text-decoration: none;
}
.reminder-actions button:hover, .reminder-actions a:hover { border-color: var(--green); color: var(--green); }
.section-title { font-family: var(--font-display); font-size: 1.2rem; margin: 28px 0 14px; }
.empty-note { color: var(--ink-faint); font-size: 0.9rem; padding: 16px 0; }

@media (max-width: 700px) {
  .equal-grid { grid-template-columns: 1fr; }
  .reminder-card { flex-wrap: wrap; }
}

/* ---------- Phase E: bell notification, profile, reports ---------- */
.nav-right { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.small-note { font-size: 0.76rem; color: var(--ink-faint); margin-top: 6px; }

.bell-wrap { position: relative; }
.bell-btn {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: var(--paper-card); color: var(--ink); cursor: pointer;
}
.bell-btn:hover { border-color: var(--gold-deep); color: var(--gold-deep); }
.bell-badge {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px;
  border-radius: 999px; background: #b3392c; color: #fff; font-family: var(--font-mono);
  font-size: 0.68rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
  padding: 0 4px; border: 2px solid var(--paper);
}
.bell-dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 10px); width: 300px;
  background: var(--paper-card); border: 1px solid var(--line-strong); border-radius: 4px;
  box-shadow: 4px 4px 0 var(--gold-tint); z-index: 60; overflow: hidden;
}
.bell-dropdown.open { display: block; }
.bell-dropdown-head {
  font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--ink-faint); padding: 12px 14px; border-bottom: 1px solid var(--line);
}
.bell-item {
  display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px;
  text-decoration: none; border-bottom: 1px solid var(--line);
}
.bell-item:last-child { border-bottom: none; }
.bell-item:hover { background: var(--green-tint); }
.bell-item-title { font-size: 0.86rem; color: var(--ink); }
.bell-item-due { font-size: 0.74rem; font-family: var(--font-mono); color: var(--gold-deep); flex: none; white-space: nowrap; }
.bell-empty { padding: 16px 14px; font-size: 0.84rem; color: var(--ink-faint); }

@media (max-width: 700px) {
  .bell-dropdown { right: -60px; width: 260px; }
}

/* ---------- floating WhatsApp CTA ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 70;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.28);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.wa-float:hover { transform: scale(1.08); box-shadow: 0 6px 18px rgba(0,0,0,0.34); }
.wa-float svg { width: 30px; height: 30px; }
@media (max-width: 700px) {
  .wa-float { right: 14px; bottom: 14px; width: 50px; height: 50px; }
  .wa-float svg { width: 26px; height: 26px; }
}

/* ---------- legal pages ---------- */
.legal-content { max-width: 74ch; }
.legal-content p { color: var(--ink-soft); line-height: 1.7; margin-bottom: 16px; }
.legal-content ul { margin: 4px 0 18px 22px; list-style: disc; }
.legal-content li { color: var(--ink-soft); line-height: 1.6; margin-bottom: 8px; }
.legal-content .section-title { margin-top: 34px; margin-bottom: 12px; }
.legal-content h1 + p { margin-bottom: 28px; }

/* ---------- lapsed subscription banner ---------- */
.lapsed-banner {
  background: #f6e3c4;
  border-bottom: 1px solid #c9973f;
}
@media (prefers-color-scheme: dark) {
  .lapsed-banner { background: #4a3a1a; border-bottom-color: #8a6a2a; }
}
:root[data-theme="dark"] .lapsed-banner { background: #4a3a1a; border-bottom-color: #8a6a2a; }
.lapsed-banner-inner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding: 10px 0; font-size: 0.88rem; color: #5c3d0a;
}
@media (prefers-color-scheme: dark) {
  .lapsed-banner-inner { color: #f1d9a8; }
}
:root[data-theme="dark"] .lapsed-banner-inner { color: #f1d9a8; }
.lapsed-banner-inner a {
  font-weight: 700; text-decoration: underline; color: inherit; white-space: nowrap;
}
