/* =========================================================
   Tanzania Loans — premium custom stylesheet
   Palette: #002F2A / #064A43 / #F5C451 / #FFD978 / #F6F8F7 / #10201E
   ========================================================= */

:root {
  --green-900: #002F2A;
  --green-800: #064A43;
  --green-700: #0A5E55;
  --green-100: #E3F0EE;
  --gold: #F5C451;
  --gold-soft: #FFD978;
  --cream: #F6F8F7;
  --ink: #10201E;
  --muted: #667572;
  --line: #E2E8E6;
  --danger: #C0392B;
  --success: #1E8E5A;
  --info: #2B6CB0;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(0, 47, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(0, 47, 42, 0.14);
  --font: "Raleway", sans-serif;
  --mono: "Raleway", sans-serif;
  /* Design-system aliases (single source of truth) */
  --primary: var(--green-800);
  --primary-dark: var(--green-900);
  --accent: var(--gold);
  --accent-soft: var(--gold-soft);
  --background: var(--cream);
  --surface: #FFFFFF;
  --surface-2: #FBFDFC;
  --text: var(--ink);
  --border: var(--line);
  --warning: #B7791F;
  --transition: 0.16s ease;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  max-width: 100%;
  overflow-x: clip;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--green-800); text-decoration: none; }
a:hover { color: var(--green-900); }

h1, h2, h3, h4 { line-height: 1.2; color: var(--green-900); margin: 0 0 0.6em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.container { width: min(1160px, calc(100% - 2rem)); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--gold); color: var(--ink);
  padding: 0.6rem 1rem; z-index: 1000; border-radius: 0 0 var(--radius-sm) 0; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  border: 1.5px solid transparent; border-radius: 999px; padding: 0.72rem 1.35rem;
  font-weight: 700; font-size: 0.95rem; cursor: pointer; text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap; line-height: 1.2;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--gold); color: var(--ink); box-shadow: 0 8px 20px rgba(245, 196, 81, 0.35); }
.btn-primary:hover { background: var(--gold-soft); color: var(--ink); }

.btn-dark { background: var(--green-900); color: #fff; }
.btn-dark:hover { background: var(--green-800); color: #fff; }

.btn-outline { background: transparent; border-color: var(--green-900); color: var(--green-900); }
.btn-outline:hover { background: var(--green-900); color: #fff; }

.btn-ghost { background: transparent; border-color: transparent; color: var(--green-900); }
.btn-ghost:hover { background: rgba(0, 47, 42, 0.06); color: var(--green-900); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #A93226; color: #fff; }

.btn-sm { padding: 0.5rem 0.95rem; font-size: 0.86rem; }
.btn-lg { padding: 0.95rem 1.7rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

.inline-form { display: inline; margin: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.site-header--compact .header-inner { min-height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--green-900); }
.brand:hover { color: var(--green-900); }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--green-900), var(--green-700));
  color: var(--gold); font-weight: 800; letter-spacing: 0.04em; font-size: 0.9rem;
  box-shadow: inset 0 0 0 1px rgba(245, 196, 81, 0.35);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.05rem; letter-spacing: -0.01em; }
.brand-text small { color: var(--muted); font-size: 0.72rem; }
.brand--sm .brand-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 0.78rem; }
.brand--sm .brand-text strong { font-size: 0.95rem; }

.nav { display: flex; align-items: center; gap: 0.25rem; }
.nav-link {
  padding: 0.5rem 0.8rem; border-radius: 999px; color: var(--ink); font-weight: 600; font-size: 0.94rem;
}
.nav-link:hover { background: rgba(0, 47, 42, 0.06); color: var(--green-900); }
.nav-link.is-active { background: var(--green-900); color: #fff; }

.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.language-link {
  min-width: 2rem;
  padding: 0.3rem 0.45rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
}
.language-link:hover,
.language-link.is-active { background: var(--green-900); color: #fff; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 0.5rem; cursor: pointer;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--green-900); border-radius: 2px; }

.maintenance-banner {
  background: var(--gold); color: var(--ink); text-align: center; padding: 0.6rem 1rem; font-weight: 600; font-size: 0.92rem;
}

/* ---------- Alerts ---------- */
.alert {
  border-radius: var(--radius); padding: 0.9rem 1.1rem; margin: 1rem 0; font-size: 0.95rem;
  border: 1px solid transparent; box-shadow: var(--shadow);
}
.alert-success { background: #E8F8F0; border-color: #B7E6CF; color: #0F5C3C; }
.alert-error { background: #FDECEA; border-color: #F5C6C0; color: #8A2418; }
.alert-info { background: #EAF2FB; border-color: #C5DAF3; color: #1A4F86; }
.error-list { margin: 0.4rem 0 0; padding-left: 1.2rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(245, 196, 81, 0.18), transparent 60%),
    linear-gradient(160deg, var(--green-900) 0%, var(--green-800) 55%, #043C36 100%);
  color: #F4FBF9;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
}
.hero::after {
  content: ""; position: absolute; inset: auto -10% -40% auto; width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(245, 196, 81, 0.16), transparent 65%); pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 2.5rem; align-items: center; position: relative; z-index: 1; }
.hero h1 { color: #fff; margin-bottom: 0.7rem; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero-lead { font-size: 1.08rem; color: rgba(244, 251, 249, 0.86); max-width: 36rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.hero-points { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.6rem; padding: 0; list-style: none; }
.hero-points li {
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px; padding: 0.4rem 0.9rem; font-size: 0.86rem; color: #EAF6F3;
}

.hero-card {
  background: #fff; color: var(--ink); border-radius: calc(var(--radius) + 6px);
  padding: 1.6rem; box-shadow: var(--shadow-lg);
}
.hero-card h3 { margin-bottom: 0.35rem; }
.hero-card .muted { color: var(--muted); font-size: 0.9rem; }
.partner-note {
  display: flex; align-items: center; gap: 0.65rem; max-width: 34rem; margin-top: 1rem;
  padding: 0.65rem 0.75rem; border: 1px solid rgba(245,196,81,0.28); border-radius: 12px;
  background: rgba(255,255,255,0.06);
}
.partner-note__mark {
  display: grid; place-items: center; flex: 0 0 auto; width: 28px; height: 28px; border-radius: 9px;
  background: var(--gold); color: var(--green-900); font-size: 0.8rem; font-weight: 800;
}
.partner-note p { margin: 0; color: rgba(234,246,243,0.78); font-size: 0.78rem; line-height: 1.45; }

/* ---------- Sections ---------- */
.section { padding: clamp(2.75rem, 6vw, 4.5rem) 0; }
.section-alt { background: #fff; }
.section-dark { background: var(--green-900); color: #EAF6F3; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { max-width: 42rem; margin-bottom: 2rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-kicker {
  display: inline-block; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem;
  font-weight: 800; color: var(--green-700); margin-bottom: 0.6rem;
}
.section-dark .section-kicker { color: var(--gold); }
.section-lead { color: var(--muted); font-size: 1.02rem; }
.section-dark .section-lead { color: rgba(234, 246, 243, 0.8); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.35rem; box-shadow: var(--shadow);
}
.card--flat { box-shadow: none; }
.card--dark { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.1); color: #EAF6F3; }
.card h3 { margin-top: 0; }
.card-icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--green-100); color: var(--green-900); font-weight: 800; margin-bottom: 0.9rem;
  font-size: 1.1rem;
}
.card-icon.gold { background: rgba(245, 196, 81, 0.25); color: #8A6A12; }

.feature-card:hover { transform: translateY(-3px); transition: transform 0.18s ease; }

.steps { counter-reset: step; display: grid; gap: 1rem; }
.step {
  display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem;
}
.step-num {
  width: 42px; height: 42px; border-radius: 50%; background: var(--green-900); color: var(--gold);
  display: grid; place-items: center; font-weight: 800;
}

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-grid .full { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }
.field label { font-weight: 700; font-size: 0.9rem; color: var(--green-900); }
.field .hint { color: var(--muted); font-size: 0.82rem; }
/* ---------- Field validation ---------- */
.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea,
input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}
.field-error { color: var(--danger); font-size: 0.84rem; }

/* ---------- Toast notifications ---------- */
.tz-toast-host {
  position: fixed;
  top: 1.1rem;
  right: 1.1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  width: min(400px, calc(100vw - 1.5rem));
  pointer-events: none;
}

.tz-toast {
  pointer-events: auto;
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.95rem 1rem;
  box-shadow: 0 22px 55px rgba(0, 47, 42, 0.2);
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
  overflow: hidden;
}
.tz-toast.is-in { transform: translateX(0); opacity: 1; }
.tz-toast.is-out { transform: translateX(40%); opacity: 0; }

.tz-toast::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--green-800);
}
.tz-toast--success::before { background: var(--success); }
.tz-toast--error::before { background: var(--danger); }
.tz-toast--info::before { background: var(--info); }
.tz-toast--warning::before { background: var(--gold); }

.tz-toast__icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  background: var(--green-800);
  flex-shrink: 0;
}
.tz-toast--success .tz-toast__icon { background: var(--success); }
.tz-toast--error .tz-toast__icon { background: var(--danger); }
.tz-toast--info .tz-toast__icon { background: var(--info); }
.tz-toast--warning .tz-toast__icon { background: var(--gold); color: var(--ink); }

.tz-toast__msg {
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.45;
  padding-top: 0.2rem;
  word-break: break-word;
}

.tz-toast__close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.1rem 0.25rem;
  border-radius: 6px;
}
.tz-toast__close:hover { background: var(--cream); color: var(--ink); }

.tz-toast__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green-800), var(--gold));
  transform-origin: left center;
  animation: tz-toast-bar 4.5s linear forwards;
}
.tz-toast--success .tz-toast__bar { background: linear-gradient(90deg, var(--success), #6ee7b7); }
.tz-toast--error .tz-toast__bar { background: linear-gradient(90deg, var(--danger), #f5a9a0); }
.tz-toast--info .tz-toast__bar { background: linear-gradient(90deg, var(--info), #93c5fd); }

@keyframes tz-toast-bar {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

.btn.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.8;
}
.btn.is-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: tz-spin 0.7s linear infinite;
  margin-left: 0.35rem;
}
@keyframes tz-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .tz-toast-host {
    top: auto;
    bottom: 1rem;
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
  }
  .tz-toast { transform: translateY(120%); }
  .tz-toast.is-in { transform: translateY(0); }
  .tz-toast.is-out { transform: translateY(30%); }
}

/* Customer workspace refinement */
.premium-section-card { padding: 1.35rem; border-color: color-mix(in srgb, var(--border) 86%, var(--green-800)); }
.section-title-row { display: flex; align-items: center; gap: .8rem; padding-bottom: 1rem; margin-bottom: 1.15rem; border-bottom: 1px solid var(--border); }
.section-title-row > div { flex: 1; min-width: 0; }
.section-title-row h3 { margin: 0; font-size: 1.02rem; }
.section-title-row p { margin: .18rem 0 0; color: var(--muted); font-size: .8rem; }
.section-icon { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; flex: 0 0 auto; border-radius: 9px; background: var(--green-100); color: var(--green-800); font-size: .72rem; font-weight: 800; }

.loan-page-header { position: relative; overflow: hidden; padding: 1.55rem; margin-bottom: 1rem; border: 1px solid rgba(255,255,255,.1); border-radius: 16px; background: linear-gradient(135deg, #022f2a 0%, #07554c 100%); box-shadow: 0 18px 40px rgba(0,47,42,.14); }
.loan-page-header::after { content: ""; position: absolute; width: 17rem; height: 17rem; right: -7rem; top: -10rem; border: 1px solid rgba(244,201,93,.23); border-radius: 50%; box-shadow: 0 0 0 2.8rem rgba(255,255,255,.025), 0 0 0 5.6rem rgba(255,255,255,.018); }
.loan-page-header > * { position: relative; z-index: 1; }
.loan-page-header h1, .loan-page-header .eyebrow { color: #fff; }
.loan-page-header .subtitle { color: rgba(255,255,255,.72); }
.loan-page-header .btn-outline { color: #fff; border-color: rgba(255,255,255,.38); background: rgba(255,255,255,.06); }
.loan-page-header .btn-outline:hover { color: var(--green-900); background: #fff; }
.loan-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .8rem; margin-bottom: .9rem; }
.loan-metric { position: relative; overflow: hidden; min-height: 8.3rem; padding: 1rem; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); box-shadow: 0 8px 24px rgba(0,47,42,.045); }
.loan-metric::after { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: var(--green-800); opacity: .18; }
.loan-metric--gold::after { background: var(--gold); opacity: 1; }
.loan-metric > span { display: block; margin-bottom: .55rem; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.loan-metric strong { display: block; color: var(--text); font-size: clamp(.98rem, 1.7vw, 1.22rem); line-height: 1.25; }
.loan-metric small { display: block; margin-top: .45rem; color: var(--muted); font-size: .76rem; }
.loan-progress-card { padding: 1rem 1.2rem; }
.loan-progress-card .row-between > div { display: grid; gap: .1rem; }
.loan-progress-card .row-between > div span { font-size: .78rem; }
.schedule-card { position: sticky; top: 5.5rem; }

.application-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .75rem; margin: -1.2rem 1.2rem 1.2rem; position: relative; z-index: 2; }
.application-stats > div { display: flex; align-items: center; justify-content: space-between; padding: .85rem 1rem; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); box-shadow: 0 10px 28px rgba(0,47,42,.08); }
.application-stats span { color: var(--muted); font-size: .76rem; font-weight: 700; }
.application-stats strong { color: var(--green-800); font-size: 1.25rem; }
.applications-panel { overflow: hidden; padding: 0; }
.applications-panel .cust-panel-head { padding: 1rem 1.15rem; margin: 0; border-bottom: 1px solid var(--border); }
.applications-panel .application-row { transition: background .16s ease, transform .16s ease; }
.applications-panel .application-row:hover { background: color-mix(in srgb, var(--green-100) 45%, var(--surface)); }

.profile-page-header { padding: 1.25rem 1.4rem; border: 1px solid var(--border); border-radius: 15px; background: linear-gradient(115deg, var(--surface), color-mix(in srgb, var(--green-100) 40%, var(--surface))); }
.profile-page-header .eyebrow { margin: 0 0 .2rem; }
.profile-header-meta { min-width: 13rem; display: grid; justify-items: end; gap: .38rem; }
.profile-header-meta > strong { color: var(--green-800); font-size: .82rem; }
.profile-completion-bar { width: 13rem; height: 6px; overflow: hidden; border-radius: 99px; background: var(--border); }
.profile-completion-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--green-800),var(--gold)); }
.profile-score { padding: .35rem .55rem; border-radius: 99px; background: var(--green-100); color: var(--green-800); font-size: .7rem; font-weight: 800; white-space: nowrap; }
.profile-main-card .form-actions { padding-top: .35rem; }

.apply-guidance-card { border-top: 3px solid var(--gold); }
.apply-privacy-note { display: flex; gap: .7rem; margin-top: .85rem; padding: .9rem; border: 1px solid var(--border); border-radius: 12px; background: color-mix(in srgb, var(--green-100) 45%, var(--surface)); }
.apply-privacy-icon { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; flex: 0 0 auto; border-radius: 50%; background: var(--green-800); color: #fff; font-weight: 800; }
.apply-privacy-note strong { display: block; color: var(--text); font-size: .82rem; }
.apply-privacy-note p { margin: .15rem 0 0; color: var(--muted); font-size: .76rem; line-height: 1.45; }
.cust-limit--premium { min-width: 18rem; padding: 1rem; border: 1px solid rgba(255,255,255,.14); border-radius: 13px; background: rgba(255,255,255,.075); backdrop-filter: blur(8px); }
.cust-limit-foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .7rem; padding-top: .65rem; border-top: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.55); font-size: .7rem; }
.cust-limit-foot a { color: var(--gold); font-weight: 700; }

[data-theme="dark"] .section-icon, [data-theme="dark"] .profile-score { background: rgba(244,201,93,.12); color: var(--gold-soft); }
[data-theme="dark"] .profile-page-header, [data-theme="dark"] .apply-privacy-note { background: var(--surface); }
[data-theme="dark"] .loan-metric, [data-theme="dark"] .application-stats > div { box-shadow: none; }

@media (max-width: 1100px) {
  .loan-metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .schedule-card { position: static; }
}
@media (max-width: 700px) {
  .loan-page-header, .profile-page-header { align-items: flex-start; padding: 1.1rem; }
  .loan-page-header .form-actions, .loan-page-header .btn { width: 100%; }
  .loan-metric-grid, .application-stats { grid-template-columns: 1fr; }
  .loan-metric { min-height: 0; }
  .loans-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .loans-table-heading { align-items: start; }
  .application-stats { margin: -1rem .7rem 1rem; }
  .profile-header-meta { width: 100%; min-width: 0; justify-items: start; }
  .profile-completion-bar { width: 100%; }
  .section-title-row { align-items: flex-start; flex-wrap: wrap; }
  .profile-score { margin-left: 2.9rem; }
  .cust-limit--premium { min-width: 0; width: 100%; }
}

input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="number"], input[type="date"], input[type="search"], input[type="url"],
select, textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.72rem 0.9rem; font: inherit; color: var(--ink); background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--green-700); box-shadow: 0 0 0 4px rgba(10, 94, 85, 0.12);
}
textarea { min-height: 120px; resize: vertical; }

.checkbox-row { display: flex; gap: 0.65rem; align-items: flex-start; font-size: 0.92rem; }
.checkbox-row input { margin-top: 0.25rem; width: 1.05rem; height: 1.05rem; accent-color: var(--green-800); }

.consent-box {
  background: linear-gradient(180deg, var(--surface, #fff), var(--surface-2, #FBFDFC));
  border: 1px solid var(--border, var(--line));
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 1.2rem 1.2rem 1.1rem;
  display: grid;
  gap: 0.65rem;
}
.consent-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border, var(--line));
}
.consent-head p { position: relative; padding-left: 0.8rem; }
.consent-head p::before {
  content: ""; position: absolute; left: 0; top: 0.1em; bottom: 0.15em; width: 3px; border-radius: 999px;
  background: linear-gradient(180deg, var(--gold), var(--green-700));
}
.consent-count {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--green-800);
  background: var(--green-100);
  border: 1px solid rgba(10, 94, 85, 0.16);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  white-space: nowrap;
}
.consent-item {
  position: relative;
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  border: 1.5px solid var(--border, var(--line));
  background: var(--surface-2, #FBFDFC);
  font-size: 0.92rem;
  line-height: 1.55;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.consent-item:hover {
  border-color: rgba(10, 94, 85, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 47, 42, 0.07);
}
.consent-item.is-checked {
  border-color: rgba(245, 196, 81, 0.65);
  background: linear-gradient(180deg, rgba(245, 196, 81, 0.1), rgba(245, 196, 81, 0.04));
  box-shadow: 0 8px 20px rgba(0, 47, 42, 0.06);
}
.consent-check {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.consent-mark {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  margin-top: 0.1rem;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1.5px solid #C4D2CF;
  color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.consent-item.is-checked .consent-mark {
  background: linear-gradient(145deg, var(--green-900), var(--green-800));
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 6px 14px rgba(0, 47, 42, 0.22);
  transform: scale(1.05);
}
.consent-check:focus-visible + .consent-mark {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.consent-text { color: var(--ink); }
.consent-text a { font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.consent-text strong { color: var(--green-900); }
[data-theme="dark"] .consent-mark { background: rgba(255, 255, 255, 0.06); border-color: var(--border); }
[data-theme="dark"] .consent-text strong { color: var(--gold-soft); }

.form-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; align-items: center; }
.form-actions.end { justify-content: flex-end; }
.form-actions.between { justify-content: space-between; }

/* ---------- Auth ---------- */
.auth-main { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 2.5rem 1rem; }
.auth-shell {
  width: min(1020px, 100%); display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
  background: #fff; border-radius: calc(var(--radius) + 6px); overflow: hidden; box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
}
.auth-aside {
  background: linear-gradient(160deg, var(--green-900), var(--green-800)); color: #EAF6F3;
  padding: 2.25rem; display: flex; flex-direction: column; justify-content: center;
}
.auth-aside h1 { color: #fff; font-size: 1.7rem; }
.auth-points { list-style: none; padding: 0; margin: 1.2rem 0; display: grid; gap: 0.55rem; }
.auth-points li { padding-left: 1.4rem; position: relative; color: rgba(234, 246, 243, 0.9); }
.auth-points li::before { content: "✓"; position: absolute; left: 0; color: var(--gold); font-weight: 800; }
.auth-aside-note { font-size: 0.8rem; color: rgba(234, 246, 243, 0.65); margin-top: auto; }
.auth-card { padding: 2.25rem; }
.auth-card h2 { margin-top: 0; }
.auth-alt { margin-top: 1.25rem; font-size: 0.92rem; color: var(--muted); }
.auth-alt a { font-weight: 700; }

/* ---------- App shell ---------- */
.app-shell { background: var(--cream); min-height: 100vh; }
.app-topbar {
  position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--line);
}
.app-topbar-inner {
  width: min(1400px, calc(100% - 1.5rem)); margin-inline: auto; min-height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.app-topbar-inner > .brand { min-width: 0; }
.app-topbar-actions { display: flex; align-items: center; gap: 0.6rem; flex: 0 0 auto; flex-wrap: nowrap; }
.topbar-action-icon, .topbar-signout-icon { display: none; }
.topbar-menu-toggle { display: none; position: static; }
.admin-topbar {
  background: rgba(255,255,255,.94);
  border-bottom-color: rgba(0,47,42,.1);
  box-shadow: 0 8px 24px rgba(0,47,42,.06);
}
.admin-topbar .app-topbar-inner { min-height: 68px; }
.admin-topbar .app-topbar-actions { gap: .45rem; }
.admin-user-chip {
  gap: .6rem;
  min-width: 0;
  padding: .28rem .7rem .28rem .35rem;
  border: 1px solid rgba(0,47,42,.1);
  border-radius: 999px;
  background: linear-gradient(145deg, #fff, #f3f8f6);
  box-shadow: 0 5px 16px rgba(0,47,42,.06);
}
.admin-user-chip .avatar { width: 34px; height: 34px; box-shadow: 0 4px 10px rgba(0,47,42,.16); }
.admin-user-chip .user-chip-text { display: grid; gap: .05rem; max-width: 190px; line-height: 1.15; }
.admin-user-chip .user-chip-text small { color: var(--muted); font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.admin-user-chip .user-chip-text strong { overflow: hidden; color: var(--green-900); font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.admin-topbar-link, .admin-topbar-signout { min-height: 36px; border: 1px solid transparent; border-radius: 10px; }
.admin-topbar-link { background: rgba(227,240,238,.7); }
.admin-topbar-link:hover { background: var(--green-100); }
.admin-topbar-signout { color: var(--muted); }
.admin-topbar-signout:hover { color: var(--danger); background: rgba(192,57,43,.08); }
.admin-topbar .topbar-action-icon, .admin-topbar .topbar-signout-icon { display: inline; line-height: 1; }
.icon-btn {
  position: relative; font-weight: 700; font-size: 0.9rem; color: var(--green-900);
  padding: 0.45rem 0.75rem; border-radius: 999px; background: var(--cream);
}
.icon-btn:hover { background: var(--green-100); }
.dot-count {
  position: absolute; top: -4px; right: -4px; background: var(--danger); color: #fff;
  font-size: 0.68rem; min-width: 18px; height: 18px; border-radius: 999px; display: grid; place-items: center; padding: 0 4px;
}
.user-chip { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 0.9rem; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--green-900); color: var(--gold);
  display: grid; place-items: center; font-weight: 800; font-size: 0.85rem;
}
.user-chip-text { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.app-body { display: grid; grid-template-columns: 268px 1fr; min-height: calc(100vh - 64px); }
.app-sidebar {
  background: #fff; border-right: 1px solid var(--line); padding: 1.25rem 0.85rem;
  display: flex; flex-direction: column; gap: 1.25rem; position: sticky; top: 64px;
  height: calc(100vh - 64px); overflow: auto;
}
.side-nav, .side-group { display: grid; gap: 0.25rem; }
.side-group-label {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted);
  margin: 0.7rem 0.6rem 0.3rem; font-weight: 800;
}
.side-link {
  display: block; padding: 0.62rem 0.85rem; border-radius: var(--radius-sm);
  color: var(--ink); font-weight: 600; font-size: 0.93rem;
}
.side-link:hover { background: var(--cream); color: var(--green-900); }
.side-link.is-active { background: var(--green-900); color: #fff; }
.side-footnote { margin-top: auto; padding: 0.75rem; font-size: 0.78rem; color: var(--muted); }

/* ---------- Premium admin sidebar ---------- */
.admin-sidebar {
  background:
    radial-gradient(circle at 0% 0%, rgba(245, 196, 81, 0.08), transparent 28%),
    linear-gradient(180deg, #00352F 0%, #002F2A 48%, #012823 100%);
  border-right: 0;
  padding: 1rem 0.75rem 1.1rem;
  gap: 0.85rem;
  color: #D7E8E4;
  box-shadow: inset -1px 0 0 rgba(245, 196, 81, 0.08);
  overflow: hidden;
  overscroll-behavior: contain;
}
.admin-sidebar::-webkit-scrollbar { width: 8px; }
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(245, 196, 81, 0.28); border-radius: 999px; }
.admin-sidebar::-webkit-scrollbar-track { background: transparent; }
.admin-sidebar > .side-brand { flex: 0 0 auto; }
.admin-sidebar > .premium-footnote { flex: 0 0 auto; }

.side-brand {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.7rem 0.75rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}
.side-brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--gold), var(--gold-soft));
  color: var(--green-900);
  box-shadow: 0 8px 18px rgba(245, 196, 81, 0.28);
}
.side-brand-text { display: grid; line-height: 1.15; min-width: 0; }
.side-brand-text strong { color: #fff; font-size: 0.95rem; letter-spacing: -0.01em; }
.side-brand-text small {
  color: rgba(234, 246, 243, 0.58);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.premium-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.2rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 196, 81, 0.35) transparent;
}
.premium-nav::-webkit-scrollbar { width: 6px; }
.premium-nav::-webkit-scrollbar-thumb {
  background: rgba(245, 196, 81, 0.32);
  border-radius: 999px;
}
.premium-nav::-webkit-scrollbar-track { background: transparent; }
.side-section {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transition: background 0.16s ease, border-color 0.16s ease;
}
.side-section:hover { background: rgba(255, 255, 255, 0.05); }
.side-section.is-active-section {
  background: rgba(245, 196, 81, 0.06);
  border-color: rgba(245, 196, 81, 0.18);
}

.side-section-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.72rem 0.8rem;
  border: 0;
  background: transparent;
  color: rgba(234, 246, 243, 0.9);
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
}
.side-section-btn:hover { color: #fff; }
.side-section-btn.is-active { color: var(--gold); }

.side-ico {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(245, 196, 81, 0.92);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.side-ico svg { width: 17px; height: 17px; display: block; }

.side-section-label {
  flex: 1;
  min-width: 0;
  letter-spacing: 0.01em;
}

.side-chevron {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: rgba(234, 246, 243, 0.55);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.side-section-btn[aria-expanded="true"] .side-chevron {
  transform: rotate(180deg);
  color: var(--gold);
  background: rgba(245, 196, 81, 0.12);
}

.side-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.22s ease;
}
.side-panel.is-open { grid-template-rows: 1fr; }
.side-panel-inner {
  overflow: hidden;
  min-height: 0;
  display: grid;
  gap: 0.18rem;
  padding: 0 0.45rem 0.05rem 0.55rem;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.14s ease, padding 0.22s ease, visibility 0s linear 0.22s;
}
.side-panel.is-open .side-panel-inner {
  padding-bottom: 0.55rem;
  visibility: visible;
  opacity: 1;
  transition: opacity 0.16s ease 0.06s, padding 0.22s ease, visibility 0s linear 0s;
}
.side-panel:not(.is-open) .side-link {
  visibility: hidden;
  pointer-events: none;
}

.side-panel .side-link,
.side-link--solo {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.58rem 0.7rem;
  border-radius: 11px;
  color: rgba(234, 246, 243, 0.78);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid transparent;
}
.admin-sidebar .side-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: rgba(234, 246, 243, 0.78);
}
.admin-sidebar .side-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.admin-sidebar .side-link.is-active {
  background: linear-gradient(90deg, rgba(245, 196, 81, 0.18), rgba(245, 196, 81, 0.05));
  color: #fff;
  border-color: rgba(245, 196, 81, 0.28);
  box-shadow: inset 3px 0 0 var(--gold);
}
.side-panel .side-link:hover,
.side-link--solo:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.side-panel .side-link.is-active,
.side-link--solo.is-active {
  background: linear-gradient(90deg, rgba(245, 196, 81, 0.18), rgba(245, 196, 81, 0.05));
  color: #fff;
  border-color: rgba(245, 196, 81, 0.28);
  box-shadow: inset 3px 0 0 var(--gold);
}

.side-link-ico {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(234, 246, 243, 0.7);
}
.side-link-ico svg { width: 14px; height: 14px; display: block; }
.admin-sidebar .side-link.is-active .side-link-ico {
  background: rgba(245, 196, 81, 0.18);
  color: var(--gold);
}
.side-link-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.side-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(245, 196, 81, 0.16);
  flex: 0 0 auto;
}

.side-panel .side-link.is-active,
.side-link--solo.is-active {
  font-weight: 700;
}

.premium-footnote {
  margin-top: 0.75rem;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.8rem 0.85rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(234, 246, 243, 0.72);
  font-size: 0.78rem;
  line-height: 1.35;
}
.premium-footnote strong {
  display: block;
  color: #fff;
  font-size: 0.82rem;
  margin-bottom: 0.1rem;
}
.premium-footnote span { color: rgba(234, 246, 243, 0.58); }
.side-footnote-badge {
  color: var(--success);
  font-size: 0.7rem;
  line-height: 1;
  margin-top: 0.25rem;
  text-shadow: 0 0 8px rgba(30, 142, 90, 0.7);
}

.sidebar-backdrop {
  position: fixed;
  inset: 64px 0 0 0;
  background: rgba(0, 24, 21, 0.48);
  backdrop-filter: blur(2px);
  z-index: 44;
  border: 0;
}
.sidebar-backdrop[hidden] { display: none !important; }

.app-main { min-width: 0; }
.app-main-inner { width: min(1200px, calc(100% - 2rem)); margin: 1.5rem auto 3rem; }
.page-header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 1.25rem; }
.page-header h1 { margin: 0; font-size: 1.55rem; }
.page-header .subtitle { color: var(--muted); margin: 0.25rem 0 0; font-size: 0.95rem; }

.sidebar-toggle {
  display: none; position: fixed; bottom: 1rem; left: 1rem; z-index: 60;
  background: var(--green-900); color: #fff; border: 0; border-radius: 999px;
  padding: 0.75rem 1.1rem; font-weight: 700; box-shadow: var(--shadow-lg); cursor: pointer;
}

/* ---------- Stats / tables ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.05rem 1.15rem;
  box-shadow: var(--shadow);
}
.stat-card .label { color: var(--muted); font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-card .value { font-size: 1.45rem; font-weight: 800; color: var(--green-900); margin-top: 0.2rem; }
.stat-card .meta { color: var(--muted); font-size: 0.82rem; margin-top: 0.2rem; }
.stat-card.accent { background: linear-gradient(145deg, var(--green-900), var(--green-800)); border-color: transparent; }
.stat-card.accent .label { color: rgba(255, 255, 255, 0.7); }
.stat-card.accent .value { color: var(--gold); }
.stat-card.accent .meta { color: rgba(255, 255, 255, 0.75); }

.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.data th, table.data td { padding: 0.8rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data th { background: var(--green-900); color: #fff; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; position: sticky; top: 0; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #FAFCFB; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data a { font-weight: 700; }

.badge {
  display: inline-block; padding: 0.22rem 0.6rem; border-radius: 999px; font-size: 0.75rem;
  font-weight: 800; letter-spacing: 0.02em; background: var(--green-100); color: var(--green-900);
  white-space: nowrap;
}
.badge-approved, .badge-active, .badge-paid, .badge-completed, .badge-disbursed, .badge-sent, .badge-verified {
  background: #D9F5E6; color: #0F5C3C;
}
.badge-rejected, .badge-failed, .badge-defaulted, .badge-written_off, .badge-suspended {
  background: #FDE2DE; color: #8A2418;
}
.badge-pending, .badge-submitted, .badge-verifying, .badge-under_review, .badge-awaiting_fee_payment,
.badge-terms_ready, .badge-payment_submitted, .badge-partial, .badge-late, .badge-draft,
.badge-info_requested, .badge-pending_disbursement, .badge-eligibility_checked, .badge-payment_verified {
  background: #FFF3D6; color: #7A5A0A;
}
.badge-cancelled, .badge-expired, .badge-refunded, .badge-waived { background: #ECEFF1; color: #4A5560; }

.toolbar {
  display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: end; margin-bottom: 1rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem;
}
.toolbar .field { margin: 0; min-width: 150px; flex: 1 1 160px; }
.toolbar .btn { margin-bottom: 0; }

/* ---------- Pager ---------- */
.pager { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-top: 1rem; justify-content: center; }
.pager-btn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px;
  padding: 0 0.65rem; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-weight: 700; font-size: 0.88rem;
}
.pager-btn:hover { border-color: var(--green-700); color: var(--green-900); }
.pager-btn.is-active { background: var(--green-900); border-color: var(--green-900); color: #fff; }
.pager-ellipsis { color: var(--muted); padding: 0 0.25rem; }
.pager-status, .pager-head { color: var(--muted); font-size: 0.9rem; padding: 0 0.5rem; }

/* ---------- Wizard ---------- */
.wizard-steps {
  display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; padding: 0; margin: 0 0 1.25rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.85rem;
}
.wizard-steps li {
  display: flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.75rem; border-radius: 999px;
  font-size: 0.84rem; font-weight: 700; color: var(--muted); background: var(--cream);
}
.wizard-steps li.is-current { background: var(--green-900); color: #fff; }
.wizard-steps li.is-done { background: var(--green-100); color: var(--green-900); }
.wizard-steps li .idx {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.08); font-size: 0.72rem;
}
.wizard-steps li.is-current .idx { background: rgba(255, 255, 255, 0.18); color: var(--gold); }

.wizard-layout { display: grid; grid-template-columns: 1.4fr 0.9fr; gap: 1.25rem; align-items: start; }
.wizard-aside { position: sticky; top: 88px; }
.estimate-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px dashed var(--line); font-size: 0.93rem; }
.estimate-row:last-child { border-bottom: 0; }
.estimate-row strong { color: var(--green-900); }
.estimate-total { font-size: 1.1rem; font-weight: 800; color: var(--green-900); }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li {
  position: relative; padding: 0 0 1.15rem 1.6rem; border-left: 2px solid var(--line);
}
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 2px solid var(--line);
}
.timeline li.done::before { background: var(--success); border-color: var(--success); }
.timeline li.current::before { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 4px rgba(245, 196, 81, 0.3); }
.timeline .t-label { font-weight: 700; color: var(--green-900); }
.timeline .t-meta { color: var(--muted); font-size: 0.84rem; }

.progress {
  height: 10px; background: var(--green-100); border-radius: 999px; overflow: hidden;
}
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--green-700), var(--gold)); border-radius: 999px; }

/* ---------- Misc ---------- */
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 0.88em; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--green-900);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: background var(--transition), border-color var(--transition), transform 0.15s ease;
}
.theme-toggle:hover { transform: translateY(-1px); border-color: var(--gold); }
.theme-toggle .theme-icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .theme-icon-sun { display: inline; }
[data-theme="dark"] .theme-toggle .theme-icon-moon { display: none; }
.app-topbar .theme-toggle { width: 34px; height: 34px; }

/* =========================================================
   Dark theme — full component coverage
   ========================================================= */
[data-theme="dark"] {
  --cream: #0E1B19;
  --ink: #EAF3F1;
  --muted: #9DB3AE;
  --line: #23403B;
  --green-100: #14332F;
  --background: #0E1B19;
  --surface: #132724;
  --surface-2: #102019;
  --text: #EAF3F1;
  --border: #23403B;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}
[data-theme="dark"] body { background: var(--background); color: var(--text); }
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3, [data-theme="dark"] h4 { color: #F2F8F6; }
[data-theme="dark"] a { color: var(--gold-soft); }
[data-theme="dark"] a:hover { color: var(--gold); }

/* Header / nav */
[data-theme="dark"] .site-header {
  background: rgba(14, 27, 25, 0.94);
  border-bottom-color: rgba(245, 196, 81, 0.14);
}
[data-theme="dark"] .site-header .brand,
[data-theme="dark"] .site-header .brand:hover { color: #fff; }
[data-theme="dark"] .site-header .brand-text small { color: var(--gold); }
[data-theme="dark"] .nav {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}
[data-theme="dark"] .nav-link { color: rgba(234, 246, 243, 0.82); }
[data-theme="dark"] .nav-link:hover { background: rgba(255, 255, 255, 0.08); color: #fff; box-shadow: none; }
[data-theme="dark"] .header-actions .btn-ghost { color: #EAF3F1; }
[data-theme="dark"] .header-actions .btn-ghost:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
[data-theme="dark"] .nav-toggle { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .nav-toggle span { background: var(--gold); }
[data-theme="dark"] .theme-toggle { background: var(--surface); color: var(--gold); border-color: var(--border); }

/* Surfaces */
[data-theme="dark"] .card,
[data-theme="dark"] .hero-card,
[data-theme="dark"] .card.feature-card,
[data-theme="dark"] .card.product-card,
[data-theme="dark"] .testimonial-card,
[data-theme="dark"] .contact-channel,
[data-theme="dark"] .contact-form-card,
[data-theme="dark"] .legal-body,
[data-theme="dark"] .faq-item,
[data-theme="dark"] .step,
[data-theme="dark"] .empty-state,
[data-theme="dark"] .chart-box,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .table-wrap,
[data-theme="dark"] .toolbar,
[data-theme="dark"] .wizard-steps,
[data-theme="dark"] .auth-card,
[data-theme="dark"] .calc-result,
[data-theme="dark"] .payment-instructions {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
[data-theme="dark"] .section-alt { background: #0B1614; }
[data-theme="dark"] .product-features { background: rgba(255, 255, 255, 0.03); border-color: var(--border); }
[data-theme="dark"] .product-card .price-range { color: var(--gold); }
[data-theme="dark"] table.data td strong, [data-theme="dark"] .card h3 { color: #F2F8F6; }
[data-theme="dark"] table.data tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.02); }
[data-theme="dark"] table.data tbody tr:hover td { background: rgba(255, 255, 255, 0.05); }
[data-theme="dark"] table.data td { border-bottom-color: var(--border); }
[data-theme="dark"] .faq-item summary { background: var(--surface); color: #F2F8F6; }
[data-theme="dark"] .step h3 { color: #F2F8F6; }
[data-theme="dark"] .kv dd { color: var(--text); }
[data-theme="dark"] .ref-pill { background: rgba(255, 255, 255, 0.05); border-color: var(--border); color: var(--gold-soft); }

/* Forms */
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="tel"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="date"],
[data-theme="dark"] input[type="search"],
[data-theme="dark"] input[type="url"],
[data-theme="dark"] input[type="file"],
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: #0C1A18;
  border-color: var(--border);
  color: var(--text);
}
[data-theme="dark"] .field label { color: #D8E7E3; }
[data-theme="dark"] .field .hint { color: var(--muted); }
[data-theme="dark"] .btn-outline { border-color: var(--gold); color: var(--gold); }
[data-theme="dark"] .btn-outline:hover { background: var(--gold); color: #12201E; }
[data-theme="dark"] .btn-ghost { color: #D8E7E3; }
[data-theme="dark"] .btn-ghost:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
[data-theme="dark"] .btn-dark { background: var(--gold); color: #12201E; }
[data-theme="dark"] .btn-dark:hover { background: var(--gold-soft); color: #12201E; }

/* Admin + customer shells */
[data-theme="dark"] .app-shell { background: var(--background); }
[data-theme="dark"] .app-topbar, [data-theme="dark"] .admin-topbar {
  background: #0C1A18;
  border-bottom-color: var(--border);
}
[data-theme="dark"] .user-chip, [data-theme="dark"] .icon-btn { color: var(--text); }
[data-theme="dark"] .icon-btn { background: rgba(255, 255, 255, 0.05); }
[data-theme="dark"] .admin-shell .page-header,
[data-theme="dark"] .admin-shell .card,
[data-theme="dark"] .admin-shell .stat-card,
[data-theme="dark"] .admin-shell .chart-box,
[data-theme="dark"] .admin-shell .toolbar,
[data-theme="dark"] .admin-shell .member-card,
[data-theme="dark"] .admin-shell .rule-card,
[data-theme="dark"] .admin-shell .mini-kpi,
[data-theme="dark"] .admin-shell .list-card > .pager-wrap {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
[data-theme="dark"] .admin-shell .table-wrap table.data { background: var(--surface); }
[data-theme="dark"] .admin-shell table.data tbody tr:nth-child(even) td { background: rgba(255,255,255,0.02); }
[data-theme="dark"] .admin-shell table.data tbody tr:hover td { background: rgba(255,255,255,0.05); }
[data-theme="dark"] .admin-shell .kv { background: rgba(255,255,255,0.03); border-color: var(--border); }
[data-theme="dark"] .admin-shell .kv dd { color: var(--text); }
[data-theme="dark"] .admin-shell .mini-kpi .value { color: var(--gold-soft); }
[data-theme="dark"] .admin-shell .stat-card .value { color: var(--gold-soft); }
[data-theme="dark"] .admin-shell .member-meta strong { color: #F2F8F6; }
[data-theme="dark"] .admin-shell .weight-row { background: rgba(255,255,255,0.03); border-color: var(--border); }
[data-theme="dark"] .admin-shell .weight-row label { color: #F2F8F6; }
[data-theme="dark"] .admin-shell form > .form-actions:not(.between) {
  background: rgba(255,255,255,0.03);
  border-color: var(--border);
}
[data-theme="dark"] .side-link { color: var(--text); }

/* Auth */
[data-theme="dark"] .auth-aside { color: #EAF3F1; }
[data-theme="dark"] .auth-card { background: var(--surface); border-color: var(--border); }

/* Alerts / toasts / modals */
[data-theme="dark"] .alert-success { background: rgba(30,142,90,0.14); border-color: rgba(30,142,90,0.4); color: #9FE3C0; }
[data-theme="dark"] .alert-error { background: rgba(192,57,43,0.14); border-color: rgba(192,57,43,0.45); color: #F5B7AC; }
[data-theme="dark"] .alert-info { background: rgba(43,108,176,0.14); border-color: rgba(43,108,176,0.45); color: #A9CDF3; }
[data-theme="dark"] .tz-toast { background: var(--surface); border-color: var(--border); color: var(--text); }
[data-theme="dark"] dialog.modal { background: var(--surface); color: var(--text); }
[data-theme="dark"] .badge { background: rgba(245,196,81,0.14); color: var(--gold-soft); }
[data-theme="dark"] .chip-medium { background: rgba(43,108,176,0.18); color: #A9CDF3; border-color: rgba(43,108,176,0.4); }
[data-theme="dark"] .timeline .t-label { color: #F2F8F6; }
[data-theme="dark"] .maintenance-banner { background: var(--gold); color: #12201E; }

/* Footer stays dark in both themes */
[data-theme="dark"] .site-footer { border-top-color: rgba(245,196,81,0.35); }

/* ---------- Homepage premium sections ---------- */
.trust-strip { background: var(--surface); border-block: 1px solid var(--border); }
.trust-strip-inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding: 1.4rem 0;
}
.trust-item { display: flex; gap: 0.8rem; align-items: flex-start; }
.trust-item .card-icon { margin: 0; width: 42px; height: 42px; border-radius: 13px; flex: 0 0 auto; font-size: 1rem; }
.trust-item strong { display: block; color: var(--green-900); font-size: 0.95rem; }
.trust-item span { color: var(--muted); font-size: 0.86rem; }
[data-theme="dark"] .trust-item strong { color: #F2F8F6; }

.limit-section { background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.limit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: stretch; }
.limit-card {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 8px);
  padding: 1.7rem 1.6rem;
  background:
    radial-gradient(480px 180px at 100% 0%, rgba(245,196,81,0.2), transparent 60%),
    linear-gradient(150deg, var(--green-900), var(--green-800));
  color: #EAF6F3;
  border: 1px solid rgba(245,196,81,0.25);
  box-shadow: var(--shadow-lg);
}
.limit-card::before {
  content: ""; position: absolute; left: 1.5rem; right: 1.5rem; top: 0; height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, var(--green-700), var(--gold));
}
.limit-card h3 { color: #fff; margin: 0.6rem 0 0.4rem; font-size: 1.3rem; }
.limit-card p { color: rgba(234,246,243,0.78); }
.limit-range {
  display: inline-flex; align-items: baseline; gap: 0.5rem; margin: 0.6rem 0 1rem;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-weight: 800; color: var(--gold);
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.limit-steps { list-style: none; margin: 0 0 1.2rem; padding: 0; display: grid; gap: 0.6rem; }
.limit-steps li {
  display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.94rem; color: rgba(234,246,243,0.88);
}
.limit-steps .n {
  width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto;
  background: rgba(245,196,81,0.16); color: var(--gold); font-weight: 800; font-size: 0.8rem;
}
.secure-line {
  display: inline-flex; align-items: center; gap: 0.45rem; margin-top: 1rem;
  font-size: 0.84rem; color: rgba(234,246,243,0.7); font-weight: 600;
}
.secure-line .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(30,142,90,0.25); }

.security-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.security-card {
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 1.4rem 1.3rem;
  box-shadow: var(--shadow);
}
.security-card h3 { font-size: 1.02rem; margin: 0.8rem 0 0.4rem; }
.security-card p { color: var(--muted); font-size: 0.93rem; margin: 0; }

@media (max-width: 1024px) {
  .trust-strip-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .limit-grid { grid-template-columns: 1fr; }
  .security-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .trust-strip-inner { grid-template-columns: 1fr; }
  .security-grid { grid-template-columns: 1fr; }
}
.text-right { text-align: right; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.stack { display: grid; gap: 1rem; }
.stack-sm { display: grid; gap: 0.5rem; }
.row-between { display: flex; justify-content: space-between; gap: 1rem; align-items: center; flex-wrap: wrap; }
.divider { height: 1px; background: var(--line); border: 0; margin: 1.25rem 0; }

.kv { display: grid; grid-template-columns: 180px 1fr; gap: 0.45rem 1rem; font-size: 0.94rem; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 600; color: var(--ink); word-break: break-word; }

.code-block, pre.snippet {
  background: #0B1F1C; color: #D7F5EC; padding: 1rem; border-radius: var(--radius-sm);
  overflow: auto; font-family: var(--mono); font-size: 0.86rem; white-space: pre-wrap; word-break: break-word;
}

.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.faq-item + .faq-item { margin-top: 0.75rem; }
.faq-item summary {
  cursor: pointer; padding: 1rem 1.15rem; font-weight: 700; color: var(--green-900); list-style: none;
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.faq-item summary::after { content: "+"; font-size: 1.2rem; color: var(--green-700); }
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-body { padding: 0 1.15rem 1.1rem; color: var(--muted); }

.testimonial-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.35rem; box-shadow: var(--shadow); }
.stars { color: var(--gold); letter-spacing: 0.1em; font-size: 1rem; }
.testimonial-meta { display: flex; gap: 0.75rem; align-items: center; margin-top: 1rem; }

.product-card { display: flex; flex-direction: column; gap: 0.6rem; height: 100%; }
.product-card .price-range { font-size: 1.15rem; font-weight: 800; color: var(--green-900); }
.product-features { list-style: none; padding: 0; margin: 0.4rem 0 1rem; display: grid; gap: 0.4rem; font-size: 0.92rem; color: var(--muted); }
.product-features li::before { content: "✓ "; color: var(--success); font-weight: 800; }
.product-card .btn { margin-top: auto; }

.calc-result { background: linear-gradient(145deg, var(--green-900), var(--green-800)); color: #fff; border-radius: calc(var(--radius) + 4px); padding: 1.5rem; }
.calc-result .amount { font-size: 2rem; font-weight: 800; color: var(--gold); }
.calc-result .muted { color: rgba(255, 255, 255, 0.75); }

.legal-body { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2.25rem); }
.legal-body h2 { margin-top: 1.75rem; font-size: 1.2rem; }
.legal-body h3 { margin-top: 1.25rem; font-size: 1.02rem; }
.legal-body ul, .legal-body ol { padding-left: 1.25rem; }
.legal-body li { margin-bottom: 0.35rem; }

.payment-instructions { background: var(--cream); border: 1px dashed var(--green-700); border-radius: var(--radius); padding: 1.15rem; }
.payment-instructions ol { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.payment-instructions li { margin-bottom: 0.4rem; }

.empty-state {
  text-align: center; padding: 2.5rem 1rem; background: #fff; border: 1px dashed var(--line);
  border-radius: var(--radius); color: var(--muted);
}
.empty-state h3 { color: var(--green-900); }

.ref-pill {
  display: inline-flex; align-items: center; gap: 0.4rem; background: var(--cream);
  border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.75rem;
  font-family: var(--mono); font-size: 0.84rem; font-weight: 700; color: var(--green-900);
}

.chart-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow); }
.chart-box h3 { margin-bottom: 0.75rem; font-size: 1rem; }
.chart-canvas { position: relative; height: 260px; }
.chart-canvas--donut { height: 240px; }
.chart-box-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.75rem; }
.chart-box-head h3 { margin: 0; }
.chart-box-sub { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.84rem; }

/* ---------- Admin dashboard ---------- */
.dash-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-700);
}
.dash-header h1 { margin-bottom: 0.15rem; }
.dash-actions { margin: 0; }

.dash-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.dash-kpis--secondary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1.35rem;
}

.stat-card.dash-kpi {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-decoration: none;
  color: inherit;
  border-radius: calc(var(--radius) + 2px);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  position: relative;
  overflow: hidden;
  min-height: 100%;
}
.stat-card.dash-kpi::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(10, 94, 85, 0.35));
  opacity: 0;
  transition: opacity 0.16s ease;
}
.stat-card.dash-kpi:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(10, 94, 85, 0.28);
  color: inherit;
}
.stat-card.dash-kpi:hover::after { opacity: 1; }
.stat-card.dash-kpi .label { margin-top: 0.15rem; }
.stat-card.dash-kpi .value {
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.stat-card.dash-kpi .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.55rem;
}
.dash-kpi-arrow {
  font-weight: 800;
  color: var(--green-700);
  opacity: 0.7;
}
.stat-card.dash-kpi.accent .dash-kpi-arrow,
.stat-card.dash-kpi.accent .meta { color: rgba(255, 255, 255, 0.8); }

.dash-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.dash-kpi-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--green-100);
  color: var(--green-900);
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}
.dash-kpi.gold .dash-kpi-icon {
  background: rgba(245, 196, 81, 0.28);
  color: #7A5A0A;
}
.dash-kpi.accent .dash-kpi-icon {
  background: rgba(255, 255, 255, 0.14);
  color: var(--gold);
}
.dash-kpi.accent {
  background:
    radial-gradient(circle at 100% 0%, rgba(245, 196, 81, 0.22), transparent 42%),
    linear-gradient(145deg, var(--green-900), var(--green-800));
  border-color: transparent;
}
.dash-kpi.accent .value { color: var(--gold); }
.dash-kpi.accent .label { color: rgba(255, 255, 255, 0.72); }
.dash-kpi.accent:hover { border-color: transparent; }
.dash-kpi.accent::after {
  background: linear-gradient(90deg, transparent, rgba(245, 196, 81, 0.7));
}

.dash-kpi-badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #FFF3D6;
  color: #7A5A0A;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  white-space: nowrap;
}
.stat-card.dash-kpi.has-flag { border-color: rgba(245, 196, 81, 0.85); }

.stat-card.dash-kpi--sm {
  padding: 0.95rem 1.05rem;
  background: linear-gradient(180deg, #ffffff 0%, #FBFDFC 100%);
}
.stat-card.dash-kpi--sm .value { font-size: 1.2rem; margin-top: 0.15rem; }
.stat-card.dash-kpi--sm .meta { margin-top: 0.15rem; padding-top: 0; }

.dash-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.35rem;
}
.dash-chart--wide { grid-column: 1 / -1; }
.dash-chart { min-width: 0; }

.dash-panel { padding: 1.2rem; }
.dash-panel h3 { font-size: 1.05rem; }
.dash-panel-sub { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.84rem; }
.dash-table { box-shadow: none; border: 0; background: transparent; }
.dash-table table.data {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.dash-empty { padding: 1.75rem 1rem; }
.dash-queues { margin-bottom: 0.5rem; }

@media (max-width: 1100px) {
  .dash-kpis,
  .dash-kpis--secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .dash-charts { grid-template-columns: 1fr; }
  .dash-chart--wide { grid-column: auto; }
}

@media (max-width: 640px) {
  .dash-kpis,
  .dash-kpis--secondary { grid-template-columns: 1fr; }
  .dash-header .dash-actions { width: 100%; }
  .dash-header .dash-actions .btn { flex: 1 1 auto; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--green-900); color: rgba(234, 246, 243, 0.85); padding-top: 3rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; padding-bottom: 2rem; }
.site-footer h4 { color: var(--gold); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.85rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
.site-footer a { color: rgba(234, 246, 243, 0.85); }
.site-footer a:hover { color: var(--gold); }
.footer-brand p { color: rgba(234, 246, 243, 0.75); font-size: 0.94rem; }
.footer-contact { list-style: none; padding: 0; margin: 0.75rem 0 0; display: grid; gap: 0.35rem; font-size: 0.9rem; }
.social-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.85rem; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1); padding: 1.15rem 0 1.5rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; font-size: 0.86rem;
}
.footer-bottom p { margin: 0; }
.footer-disclaimer { color: rgba(234, 246, 243, 0.6); max-width: 36rem; }

/* ---------- Error page ---------- */
.page-error .error-hero { text-align: center; padding: clamp(3rem, 8vw, 6rem) 1rem; }
.error-code { font-size: clamp(4rem, 12vw, 7rem); font-weight: 800; color: var(--green-900); line-height: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .wizard-layout { grid-template-columns: 1fr; }
  .wizard-aside { position: static; }
}

@media (max-width: 860px) {
  .nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0; background: #fff;
    flex-direction: column; align-items: stretch; padding: 0.75rem; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); gap: 0.2rem;
  }
  .nav.is-open { display: flex; }
  .nav-toggle { display: inline-flex; }
  .site-header--compact .nav-toggle { display: none; }
  .header-actions .btn-ghost { display: none; }

  .app-body { grid-template-columns: 1fr; }
  .app-sidebar {
    position: fixed; inset: 64px auto 0 0; width: min(300px, 88vw); z-index: 45;
    transform: translateX(-105%); transition: transform 0.22s ease; box-shadow: var(--shadow-lg);
    height: calc(100vh - 64px);
    height: calc(100dvh - 64px);
    max-height: calc(100vh - 64px);
    max-height: calc(100dvh - 64px);
  }
  .app-sidebar.is-open { transform: translateX(0); }
  .customer-topbar .topbar-menu-toggle { display: inline-flex; position: static; }

  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 2.75rem; }
  .site-header .header-inner { width: calc(100% - 1rem); min-width: 0; gap: .5rem; }
  .site-header .brand { min-width: 0; flex: 1 1 auto; overflow: hidden; }
  .site-header .brand-text { min-width: 0; overflow: hidden; }
  .site-header .brand-text strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .site-header .header-actions { min-width: 0; flex: 0 0 auto; gap: .28rem; }
  .site-header .header-actions .btn-primary { padding-inline: .7rem; font-size: .78rem; }
  .customer-topbar .app-topbar-inner { width: calc(100% - 1rem); gap: 0.45rem; min-height: 60px; }
  .customer-topbar .brand { flex: 1 1 auto; overflow: hidden; }
  .customer-topbar .brand-text { min-width: 0; overflow: hidden; }
  .customer-topbar .brand-text strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .customer-topbar .app-topbar-actions { gap: 0.3rem; }
  .customer-topbar .icon-btn { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; font-size: 1.1rem; }
  .customer-topbar .topbar-action-label, .customer-topbar .topbar-signout-label { display: none; }
  .customer-topbar .topbar-action-icon, .customer-topbar .topbar-signout-icon { display: inline; line-height: 1; }
  .customer-topbar .user-chip { gap: 0; }
  .customer-topbar .user-chip-text { display: none; }
  .customer-topbar .topbar-signout { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; font-size: 1.1rem; }
  .customer-topbar .topbar-menu-toggle { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; font-size: 1.15rem; }
  .customer-topbar .topbar-menu-toggle span { display: none; }
  .admin-topbar .app-topbar-inner { width: calc(100% - 1rem); gap: .45rem; min-height: 60px; }
  .admin-topbar .brand { flex: 1 1 auto; min-width: 0; }
  .admin-topbar .brand-text { min-width: 0; overflow: hidden; }
  .admin-topbar .brand-text strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .admin-topbar .app-topbar-actions { gap: .3rem; }
  .admin-topbar .admin-user-chip { padding: .2rem; border-color: transparent; background: transparent; box-shadow: none; }
  .admin-topbar .admin-user-chip .user-chip-text { display: none; }
  .admin-topbar .admin-topbar-link,
  .admin-topbar .admin-topbar-signout { width: 36px; height: 36px; min-height: 36px; padding: 0; display: grid; place-items: center; font-size: 1.05rem; }
  .admin-topbar .admin-topbar-link span:not(.topbar-action-icon),
  .admin-topbar .admin-topbar-signout span:not(.topbar-signout-icon) { display: none; }
  table.data th, table.data td { padding: 0.65rem 0.7rem; }
}

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

/* =========================================================
   Premium site settings
   ========================================================= */
.settings-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.7fr);
  gap: 1.25rem;
  align-items: stretch;
  margin-bottom: 1.35rem;
}
.settings-hero-copy {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1000px 280px at 0% 0%, rgba(245, 196, 81, 0.18), transparent 55%),
    linear-gradient(145deg, var(--green-900), var(--green-800));
  color: #EAF6F3;
  border-radius: calc(var(--radius) + 8px);
  padding: 1.6rem 1.7rem 1.45rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.settings-hero-copy::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -50px;
  width: 180px;
  height: 180px;
  border-radius: 40px;
  background: linear-gradient(145deg, rgba(245, 196, 81, 0.2), transparent 70%);
  transform: rotate(18deg);
  pointer-events: none;
}
.settings-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.55rem;
}
.settings-hero-copy h1 {
  margin: 0;
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  color: #fff;
  letter-spacing: -0.02em;
}
.settings-hero-copy .subtitle {
  margin: 0.45rem 0 1.1rem;
  color: rgba(234, 246, 243, 0.72);
  max-width: 52ch;
  font-size: 0.98rem;
}
.settings-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}
.settings-stat {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.7rem 0.8rem;
}
.settings-stat strong {
  display: block;
  font-size: 1.25rem;
  color: var(--gold);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.settings-stat span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: rgba(234, 246, 243, 0.65);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.settings-stat--locked strong { color: #9FB8B3; }
.settings-hero-aside { display: flex; }
.settings-hero-card {
  width: 100%;
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.2rem;
  box-shadow: var(--shadow);
}
.settings-hero-card-ico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: linear-gradient(145deg, rgba(245, 196, 81, 0.28), rgba(245, 196, 81, 0.1));
  color: #8A6A12;
}
.settings-hero-card strong {
  display: block;
  color: var(--green-900);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}
.settings-hero-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.settings-shell {
  display: grid;
  grid-template-columns: minmax(220px, 250px) minmax(0, 1fr);
  gap: 1.15rem;
  align-items: start;
}
.settings-tabs {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 0.75rem;
  box-shadow: var(--shadow);
  max-height: calc(100vh - 110px);
  overflow: auto;
}
.settings-tab {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.75rem;
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.settings-tab:hover {
  background: var(--cream);
  border-color: var(--line);
  transform: translateX(2px);
  text-decoration: none;
}
.settings-tab.is-active {
  background: linear-gradient(135deg, rgba(0, 47, 42, 0.04), rgba(245, 196, 81, 0.14));
  border-color: rgba(245, 196, 81, 0.55);
}
.settings-tab-ico {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--green-100);
  color: var(--green-900);
}
.settings-tab-ico svg { width: 18px; height: 18px; display: block; }
.settings-tab.is-active .settings-tab-ico {
  background: linear-gradient(145deg, var(--green-900), var(--green-800));
  color: var(--gold);
}
.settings-tab[aria-current="false"] { opacity: .78; }
.settings-tab[aria-current="false"]:hover { opacity: 1; }
.settings-tab--gold .settings-tab-ico { background: rgba(245, 196, 81, 0.22); color: #8A6A12; }
.settings-tab--sky .settings-tab-ico { background: #E8F1FB; color: #1A4F86; }
.settings-tab--violet .settings-tab-ico { background: #F1EBFC; color: #5B3FA8; }
.settings-tab--amber .settings-tab-ico { background: #FFF4DF; color: #9A6B00; }
.settings-tab--rose .settings-tab-ico { background: #FDECEA; color: #8A2418; }
.settings-tab--danger .settings-tab-ico { background: #FDECEA; color: #8A2418; }
.settings-tab-text { min-width: 0; }
.settings-tab-text strong {
  display: block;
  font-size: 0.92rem;
  color: var(--green-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.settings-tab-text small {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  margin-top: 0.1rem;
}
.settings-filter {
  margin-top: 0.35rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.settings-filter label {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.settings-filter .settings-input,
.settings-filter input {
  border-radius: 12px;
}
.settings-filter-count {
  font-size: 0.78rem;
  color: var(--muted);
}

.settings-main { min-width: 0; display: flex; flex-direction: column; gap: 1rem; }
.settings-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
  overflow: hidden;
  scroll-margin-top: 90px;
}
.settings-panel.is-hidden { display: none; }
.settings-panel-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.85rem;
  align-items: center;
  padding: 1.05rem 1.2rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(0, 47, 42, 0.03), transparent 45%),
    #fff;
}
.settings-panel-title {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  min-width: 0;
}
.settings-panel-ico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--green-900);
  color: var(--gold);
}
.settings-panel-ico svg { width: 20px; height: 20px; display: block; }
.settings-panel--gold .settings-panel-ico { background: linear-gradient(145deg, #F5C451, #E0A92F); color: var(--ink); }
.settings-panel--sky .settings-panel-ico { background: #1A4F86; color: #DCEBFF; }
.settings-panel--violet .settings-panel-ico { background: #5B3FA8; color: #EFE8FF; }
.settings-panel--amber .settings-panel-ico { background: #9A6B00; color: #FFF4DF; }
.settings-panel--rose .settings-panel-ico { background: #8A2418; color: #FFE8E5; }
.settings-panel--danger .settings-panel-ico { background: #7A1F16; color: #FFE0DC; }
.settings-panel-title h2 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--green-900);
}
.settings-panel-title p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}
.settings-panel-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.settings-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--green-900);
  font-size: 0.76rem;
  font-weight: 700;
  border: 1px solid rgba(0, 47, 42, 0.08);
}
.settings-chip--lock {
  background: #FFF4DF;
  color: #8A6A12;
  border-color: rgba(245, 196, 81, 0.45);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem;
  padding: 1.15rem 1.2rem 1.25rem;
}
.settings-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: #FBFCFC;
  border: 1px solid var(--line);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.settings-field:hover {
  border-color: rgba(10, 94, 85, 0.28);
  box-shadow: 0 10px 24px rgba(0, 47, 42, 0.06);
}
.settings-field:focus-within {
  border-color: rgba(245, 196, 81, 0.85);
  box-shadow: 0 0 0 4px rgba(245, 196, 81, 0.16);
  background: #fff;
}
.settings-field--wide { grid-column: 1 / -1; }
.settings-field--bool { background: linear-gradient(180deg, #fff, #FBFCFC); }
.settings-field.is-hidden { display: none; }
.settings-field-top {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: flex-start;
}
.settings-field-top label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  cursor: pointer;
}
.settings-field-label {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--green-900);
  line-height: 1.3;
}
.settings-field-key {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  background: rgba(0, 47, 42, 0.05);
  border-radius: 6px;
  padding: 0.1rem 0.4rem;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.settings-type {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--green-800);
  border: 1px solid rgba(0, 47, 42, 0.08);
}
.settings-type--number,
.settings-type--int,
.settings-type--float { background: #E8F1FB; color: #1A4F86; border-color: #C5DAF3; }
.settings-type--bool { background: #FFF4DF; color: #8A6A12; border-color: #F5D98A; }
.settings-type--json,
.settings-type--array { background: #F1EBFC; color: #5B3FA8; border-color: #DDD0F7; }
.settings-type--secret,
.settings-type--password { background: #FDECEA; color: #8A2418; border-color: #F5C6C0; }
.settings-type--email,
.settings-type--url { background: #E7F7EF; color: #0F5C3C; border-color: #B7E6CF; }

.settings-input,
.settings-input--mono {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0.72rem 0.9rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.settings-input:focus,
.settings-input--mono:focus {
  outline: none;
  border-color: var(--green-700);
  box-shadow: 0 0 0 4px rgba(10, 94, 85, 0.12);
}
.settings-input--mono {
  font-family: var(--mono);
  font-size: 0.86rem;
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
}
textarea.settings-input { min-height: 110px; }
.settings-input[disabled],
.settings-input--mono[disabled] {
  background: #F3F6F5;
  color: var(--muted);
  cursor: not-allowed;
}
.settings-input-wrap { position: relative; display: flex; }
.settings-input-wrap .settings-input { padding-right: 4.2rem; }
.settings-input-suffix {
  position: absolute;
  right: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--muted);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.15rem 0.4rem;
  pointer-events: none;
}
.settings-reveal {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--green-800);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.3rem 0.45rem;
  border-radius: 8px;
  cursor: pointer;
}
.settings-reveal:hover { background: var(--green-100); }
.settings-hint {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}
.settings-hint--lock {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #8A6A12;
  background: #FFF9EC;
  border: 1px dashed #F0D48A;
  border-radius: 10px;
  padding: 0.35rem 0.55rem;
  font-weight: 600;
}

.branding-upload {
  display: grid;
  grid-template-columns: minmax(150px, .7fr) minmax(0, 1.3fr);
  gap: .7rem;
  align-items: center;
}
.branding-preview {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 116px;
  overflow: hidden;
  padding: .8rem;
  border: 1px solid rgba(10, 94, 85, .14);
  border-radius: 14px;
  background: linear-gradient(145deg, #f8fbfa, #edf4f1);
}
.branding-preview img { width: 100%; max-height: 82px; object-fit: contain; }
.branding-preview-badge {
  position: absolute;
  left: .55rem;
  bottom: .5rem;
  padding: .2rem .45rem;
  border-radius: 999px;
  background: rgba(0, 47, 42, .86);
  color: #fff;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.branding-preview--empty { color: var(--muted); text-align: center; }
.branding-preview--empty > span { display: block; color: var(--gold); font-size: 1.5rem; line-height: 1; }
.branding-preview--empty strong { display: block; margin-top: .4rem; font-size: .72rem; }
.branding-upload-drop {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 116px;
  padding: .8rem;
  border: 1px dashed rgba(10, 94, 85, .35);
  border-radius: 14px;
  background: rgba(227, 240, 238, .42);
  color: var(--green-900);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.branding-upload-drop:hover { border-color: var(--gold); background: rgba(245, 196, 81, .1); transform: translateY(-1px); }
.branding-upload-drop > span:nth-child(2) { display: grid; gap: .18rem; min-width: 0; flex: 1; }
.branding-upload-drop strong { font-size: .8rem; }
.branding-upload-drop small { color: var(--muted); font-size: .7rem; }
.branding-upload-icon { display: grid; place-items: center; width: 2rem; height: 2rem; flex: 0 0 auto; border-radius: 10px; background: var(--green-900); color: var(--gold); font-size: 1.1rem; font-weight: 800; }
.branding-upload-action { flex: 0 0 auto; padding: .4rem .55rem; border: 1px solid rgba(0, 47, 42, .14); border-radius: 8px; color: var(--green-800); font-size: .7rem; font-weight: 800; }
input[data-branding-input] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.branding-upload-file { grid-column: 2; color: var(--muted); font-size: .72rem; }
.branding-upload-file.is-selected { color: var(--green-700); font-weight: 700; }
.branding-remove { grid-column: 2; margin: 0; }

.settings-toggle {
  display: flex !important;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  user-select: none;
  margin-top: 0.15rem;
}
.settings-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.settings-toggle-track {
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: #D7E0DE;
  position: relative;
  flex: 0 0 auto;
  transition: background 0.18s ease, box-shadow 0.18s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}
.settings-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 47, 42, 0.22);
  transition: transform 0.18s ease;
}
.settings-toggle input:checked + .settings-toggle-track {
  background: linear-gradient(135deg, var(--green-800), var(--green-700));
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08), 0 0 0 4px rgba(10, 94, 85, 0.12);
}
.settings-toggle input:checked + .settings-toggle-track .settings-toggle-thumb {
  transform: translateX(22px);
  background: var(--gold);
}
.settings-toggle input:focus-visible + .settings-toggle-track {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.settings-toggle input:disabled + .settings-toggle-track {
  opacity: 0.55;
  cursor: not-allowed;
}
.settings-toggle-text { display: flex; flex-direction: column; gap: 0.1rem; }
.settings-toggle-text strong {
  font-size: 0.92rem;
  color: var(--green-900);
}
.settings-toggle-text small {
  color: var(--muted);
  font-size: 0.78rem;
}

/* ---------- Brand logo images ---------- */
.brand-logo-image { height: 40px; width: auto; max-width: 190px; object-fit: contain; }
.brand-logo-image--sm { height: 30px; max-width: 150px; }
.footer-logo-image { height: 44px; width: auto; max-width: 210px; object-fit: contain; }

/* ---------- Settings color fields ---------- */
.settings-color { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.settings-color-swatch {
  --swatch: var(--green-800);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.7rem 0.35rem 0.35rem;
  border-radius: 999px;
  background: var(--surface-2, #FBFDFC);
  border: 1.5px solid var(--line);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--green-900);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.settings-color-swatch:hover { border-color: var(--gold); transform: translateY(-1px); }
.settings-color-swatch input[type="color"] {
  appearance: none;
  -webkit-appearance: none;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: var(--swatch);
  cursor: pointer;
}
.settings-color-swatch input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.settings-color-swatch input[type="color"]::-webkit-color-swatch { border: 2px solid rgba(255, 255, 255, 0.7); border-radius: 50%; }
.settings-color-swatch input[type="color"]::-moz-color-swatch { border: 2px solid rgba(255, 255, 255, 0.7); border-radius: 50%; }
.settings-color-swatch input[type="color"]:disabled { cursor: not-allowed; opacity: 0.6; }
.settings-color-hex {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--green-900);
  background: var(--green-100);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  text-transform: uppercase;
}

/* ---------- Palette studio ---------- */
.palette-studio {
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid rgba(245, 196, 81, 0.4);
  background:
    radial-gradient(560px 160px at 0% 0%, rgba(245, 196, 81, 0.14), transparent 65%),
    linear-gradient(180deg, #fff, #FBFDFC);
  box-shadow: 0 14px 36px rgba(0, 47, 42, 0.08);
  padding: 1.25rem 1.3rem 1.35rem;
  margin-bottom: 1.25rem;
}
.palette-studio-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 0.75rem; margin-bottom: 1rem; }
.palette-studio-head h3 { margin: 0 0 0.25rem; padding-left: 0.8rem; position: relative; font-size: 1.05rem; }
.palette-studio-head h3::before {
  content: ""; position: absolute; left: 0; top: 0.1em; bottom: 0.15em; width: 3px; border-radius: 999px;
  background: linear-gradient(180deg, var(--gold), var(--green-700));
}
.palette-studio-head p { margin: 0; color: var(--muted); font-size: 0.88rem; }
.palette-studio-actions { display: flex; gap: 0.5rem; }
.palette-mocks { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.palette-mock {
  --mock-bg: var(--background, #F6F8F7);
  --mock-surface: var(--surface, #FFFFFF);
  --mock-text: var(--text, #10201E);
  --mock-muted: var(--muted, #667572);
  --mock-border: var(--border, #E2E8E6);
  --mock-deep: var(--primary-dark, #002F2A);
  --mock-primary: var(--primary, #064A43);
  --mock-accent: var(--accent, #F5C451);
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--mock-border);
  background: var(--mock-bg);
  box-shadow: 0 10px 26px rgba(0, 47, 42, 0.08);
}
.palette-mock[data-theme="dark"] {
  --mock-bg: var(--background, #0E1B19);
  --mock-surface: var(--surface, #132724);
  --mock-text: var(--text, #EAF3F1);
  --mock-muted: var(--muted, #9DB3AE);
  --mock-border: var(--border, #23403B);
}
.palette-mock-tag {
  position: absolute; top: 0.6rem; right: 0.6rem; z-index: 2;
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--mock-deep); color: var(--mock-accent);
  border-radius: 999px; padding: 0.2rem 0.6rem;
}
.palette-mock-bar {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--mock-deep); padding: 0.6rem 0.8rem;
}
.palette-mock-dot { width: 22px; height: 22px; border-radius: 8px; background: var(--mock-accent); flex: 0 0 auto; }
.palette-mock-links { display: flex; gap: 0.3rem; flex: 1; }
.palette-mock-links i { width: 26px; height: 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.25); }
.palette-mock-links i:first-child { background: var(--mock-accent); }
.palette-mock-cta {
  font-size: 0.68rem; font-weight: 800; color: #12201E;
  background: var(--mock-accent); border-radius: 999px; padding: 0.28rem 0.65rem;
}
.palette-mock-body { padding: 0.9rem 0.95rem 1rem; }
.palette-mock-title { display: block; color: var(--mock-text); font-size: 0.98rem; margin-bottom: 0.25rem; }
.palette-mock-text { color: var(--mock-muted); font-size: 0.8rem; margin: 0 0 0.7rem; }
.palette-mock-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.palette-mock-btn {
  font-size: 0.75rem; font-weight: 800; color: #12201E;
  background: var(--mock-accent); border-radius: 999px; padding: 0.4rem 0.8rem;
}
.palette-mock-card {
  font-size: 0.75rem; font-weight: 700; color: var(--mock-text);
  background: var(--mock-surface); border: 1px solid var(--mock-border);
  border-radius: 999px; padding: 0.4rem 0.8rem;
}

.settings-savebar {
  position: sticky;
  bottom: 0.85rem;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.85rem;
  align-items: center;
  padding: 0.95rem 1.1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 47, 42, 0.1);
  box-shadow: 0 18px 45px rgba(0, 47, 42, 0.16);
}
.settings-savebar-copy strong {
  display: block;
  color: var(--green-900);
  font-size: 0.95rem;
}
.settings-savebar-copy span {
  color: var(--muted);
  font-size: 0.84rem;
}
.settings-savebar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}
.settings-empty {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: center;
  text-align: center;
  padding: 2rem 1rem;
  border-radius: var(--radius);
  background: #fff;
  border: 1px dashed var(--line);
  color: var(--muted);
}
.settings-empty strong { color: var(--green-900); }
.settings-empty[hidden] { display: none !important; }

@media (max-width: 980px) {
  .settings-hero { grid-template-columns: 1fr; }
  .settings-shell { grid-template-columns: 1fr; }
  .settings-tabs {
    position: static;
    max-height: none;
    flex-direction: row;
    flex-wrap: wrap;
    overflow: visible;
  }
  .settings-tab { flex: 1 1 180px; }
  .settings-filter { flex: 1 1 100%; border-top: 0; padding-top: 0; margin-top: 0; }
  .settings-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .settings-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; padding: .6rem; }
  .settings-tab { min-width: 0; padding: .62rem .55rem; }
  .settings-tab-ico { width: 32px; height: 32px; border-radius: 10px; }
  .settings-tab-text strong { font-size: .78rem; }
  .settings-tab-text small { font-size: .68rem; }
  .settings-filter { grid-column: 1 / -1; }
  .settings-grid { grid-template-columns: 1fr; padding: 1rem; }
  .settings-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-hero-copy { padding: 1.25rem; }
  .settings-savebar { position: static; flex-direction: column; align-items: stretch; }
  .settings-savebar-actions .btn { flex: 1 1 auto; }
  .branding-upload { grid-template-columns: 1fr; }
  .branding-upload-file, .branding-remove { grid-column: 1; }
}

/* =========================================================
   Premium admin design system
   Scoped to .admin-shell — list pages, forms, KPIs, tabs
   ========================================================= */
.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-700);
}
.eyebrow.mono { font-family: var(--mono); letter-spacing: 0.08em; }

.tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  width: 100%;
}
.tab-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--cream);
  color: var(--green-900);
  font-weight: 700;
  font-size: 0.86rem;
  line-height: 1.2;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.tab-link:hover {
  border-color: rgba(0, 47, 42, 0.28);
  background: #fff;
  color: var(--green-900);
}
.tab-link.is-active {
  background: linear-gradient(145deg, var(--green-900), var(--green-800));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 47, 42, 0.22);
}

.pager-wrap { margin-top: 1rem; }
.pager-wrap:empty { display: none; }

dialog.modal {
  border: 0;
  border-radius: calc(var(--radius) + 6px);
  padding: 0;
  width: min(440px, calc(100vw - 1.5rem));
  box-shadow: var(--shadow-lg);
  color: var(--ink);
  background: #fff;
}
dialog.modal::backdrop {
  background: rgba(0, 24, 21, 0.5);
  backdrop-filter: blur(3px);
}
dialog.modal form { padding: 1.35rem 1.4rem 1.25rem; }
dialog.modal h3 { margin-top: 0; }
dialog.modal.modal--wide { width: min(620px, calc(100vw - 1.5rem)); }
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}
.password-meter {
  height: 8px;
  border-radius: 999px;
  background: var(--green-100);
  overflow: hidden;
  margin-top: 0.5rem;
}
.password-meter > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--danger);
  transition: width 0.2s ease, background 0.2s ease;
}
.password-meter > span[data-level="2"] { background: #D98E04; }
.password-meter > span[data-level="3"] { background: var(--green-700); }
.password-meter > span[data-level="4"] { background: var(--success); }

/* Password fields with inline Show toggle */
.admin-shell .settings-input-wrap input[type="password"],
.admin-shell .settings-input-wrap input[type="text"] { padding-right: 4.2rem; }
.admin-shell .settings-input-wrap .settings-reveal { color: var(--green-800); }
.admin-shell .settings-input-wrap .settings-reveal:hover { background: var(--green-100); }

.admin-shell .app-main-inner { width: min(1280px, calc(100% - 2rem)); }

/* Page header — premium banner */
.admin-shell .page-header {
  position: relative;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.35rem;
  border-radius: calc(var(--radius) + 6px);
  background:
    radial-gradient(700px 160px at 0% 0%, rgba(245, 196, 81, 0.16), transparent 55%),
    linear-gradient(135deg, #fff 0%, #FBFDFC 100%);
  border: 1px solid rgba(0, 47, 42, 0.08);
  box-shadow: 0 12px 34px rgba(0, 47, 42, 0.07);
  overflow: hidden;
}
.admin-shell .page-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--gold), var(--green-700));
}
.admin-shell .page-header > * { position: relative; z-index: 1; }
.admin-shell .page-header h1 {
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  letter-spacing: -0.02em;
}
.admin-shell .page-header .subtitle {
  max-width: 68ch;
  color: var(--muted);
  font-size: 0.94rem;
}
.admin-shell .page-header .form-actions { margin-top: 0; }
.admin-shell .page-header.dash-header,
.admin-shell .settings-hero { background: none; border: 0; box-shadow: none; padding: 0; margin-bottom: 1.25rem; }
.admin-shell .page-header.dash-header::before { display: none; }

/* Cards / form panels */
.admin-shell .card {
  border-radius: calc(var(--radius) + 4px);
  border-color: rgba(0, 47, 42, 0.08);
  box-shadow: 0 10px 28px rgba(0, 47, 42, 0.06);
  background: linear-gradient(180deg, #ffffff 0%, #FBFDFC 100%);
}
.admin-shell .card > h3,
.admin-shell .card > .row-between > h3 {
  position: relative;
  padding-left: 0.85rem;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}
.admin-shell .card > h3::before,
.admin-shell .card > .row-between > h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.1em;
  bottom: 0.15em;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold), var(--green-700));
}
.admin-shell .card--flat {
  background: #fff;
  box-shadow: none;
  border-color: var(--line);
}
.admin-application-hero {
  position: relative; overflow: hidden; padding: 1.25rem 1.35rem; margin-bottom: 1.15rem;
  border: 1px solid rgba(245,196,81,0.22); border-radius: calc(var(--radius) + 6px);
  background: radial-gradient(520px 180px at 100% 0%, rgba(245,196,81,0.18), transparent 58%), linear-gradient(135deg, #00352F, #002F2A);
  box-shadow: 0 18px 42px rgba(0,47,42,0.14); color: #EAF6F3;
}
.admin-application-hero::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(180deg, var(--gold), var(--green-700)); }
.admin-application-hero > div:first-child { position: relative; z-index: 1; }
.admin-application-hero .eyebrow { color: var(--gold); }
.admin-application-hero h1 { color: #fff; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.admin-application-hero .subtitle { color: rgba(234,246,243,0.72); }
.admin-application-hero .form-actions { position: relative; z-index: 1; }
.admin-application-grid { gap: 1rem; }
.admin-detail-card { border-radius: calc(var(--radius) + 5px) !important; }
.admin-summary-card { border-top: 3px solid var(--gold) !important; }
.admin-decision-card { border-color: rgba(245,196,81,0.4) !important; background: linear-gradient(180deg, #fff, #FBFDFC) !important; }
[data-theme="dark"] .admin-application-hero { border-color: rgba(245,196,81,0.2); }
[data-theme="dark"] .admin-decision-card { background: var(--surface) !important; }
.admin-shell .grid[style*="align-items:start"] { gap: 1.25rem; }

/* Forms */
.admin-shell .form-grid { gap: 1rem 1.1rem; }
.admin-shell .field {
  margin-bottom: 1rem;
  gap: 0.4rem;
}
.admin-shell .form-grid > .field { margin-bottom: 0; }
.admin-shell .field:last-child { margin-bottom: 0; }
.admin-shell .field label {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--green-800);
}
.admin-shell .field .hint {
  font-size: 0.8rem;
  color: var(--muted);
}
.admin-shell input[type="text"],
.admin-shell input[type="email"],
.admin-shell input[type="password"],
.admin-shell input[type="tel"],
.admin-shell input[type="number"],
.admin-shell input[type="date"],
.admin-shell input[type="search"],
.admin-shell input[type="url"],
.admin-shell select,
.admin-shell textarea {
  border-radius: 12px;
  border: 1.5px solid #D7E2DF;
  background: #fff;
  padding: 0.7rem 0.9rem;
  font-size: 0.95rem;
  box-shadow: inset 0 1px 2px rgba(0, 47, 42, 0.03);
}
.admin-shell input:hover,
.admin-shell select:hover,
.admin-shell textarea:hover { border-color: #B9C9C5; }
.admin-shell input:focus,
.admin-shell select:focus,
.admin-shell textarea:focus {
  border-color: var(--green-700);
  box-shadow: 0 0 0 4px rgba(10, 94, 85, 0.12);
  background: #fff;
}
.admin-shell textarea { min-height: 110px; }
.admin-shell .checkbox-row {
  font-weight: 600;
  color: var(--ink);
}
.admin-shell .form-actions {
  gap: 0.65rem;
}
.admin-shell form > .form-actions:not(.between) {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(227, 240, 238, 0.75), rgba(246, 248, 247, 0.95));
  border: 1px solid rgba(0, 47, 42, 0.07);
}
.admin-shell form > .form-actions.between {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: var(--cream);
  border: 1px dashed var(--line);
}
.admin-shell .btn-primary {
  box-shadow: 0 10px 24px rgba(245, 196, 81, 0.38);
}
.admin-shell .btn-dark {
  box-shadow: 0 8px 20px rgba(0, 47, 42, 0.2);
}
.admin-shell .btn-outline {
  border-width: 1.5px;
  background: rgba(255, 255, 255, 0.7);
}
.admin-shell .btn-outline:hover { background: var(--green-900); }

/* Filter toolbar */
.admin-shell .toolbar {
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(180deg, #ffffff, #FAFCFB);
  border: 1px solid rgba(0, 47, 42, 0.08);
  box-shadow: 0 8px 22px rgba(0, 47, 42, 0.05);
}
.admin-shell .toolbar::before {
  content: "Filters";
  display: none;
}
.admin-shell form.toolbar .field label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.admin-shell .toolbar input,
.admin-shell .toolbar select {
  border-radius: 10px;
  background: var(--cream);
}
.admin-shell .toolbar input:focus,
.admin-shell .toolbar select:focus { background: #fff; }
.admin-shell .toolbar .tab-row { align-items: center; }
.admin-shell .toolbar > .tab-row { width: auto; flex: 1 1 100%; }
.admin-shell .toolbar .tab-link.is-active { box-shadow: 0 8px 18px rgba(0, 47, 42, 0.18); }

/* List count chip next to page title */
.admin-shell .page-header .panel-note,
.admin-shell .page-header .badge {
  flex: 0 0 auto;
}

/* Customer/loan/etc detail grids */
.admin-shell .split-panel > .stack,
.admin-shell .split-panel > .card { min-width: 0; }

/* Tables */
.admin-shell .table-wrap {
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid rgba(0, 47, 42, 0.08);
  box-shadow: 0 12px 30px rgba(0, 47, 42, 0.06);
  overflow: hidden auto;
}
.admin-shell .table-wrap table.data { background: #fff; }
.admin-shell table.data th {
  background: linear-gradient(135deg, var(--green-900), var(--green-800));
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  padding: 0.85rem 1rem;
  border-bottom: 0;
}
.admin-shell table.data td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #EDF2F1;
}
.admin-shell table.data tbody tr:nth-child(even) td { background: #FCFDFD; }
.admin-shell table.data tbody tr:hover td { background: #F3F8F7; }
.admin-shell table.data tbody tr:last-child td { border-bottom: 0; }
.admin-shell table.data td .btn-sm { min-height: 32px; }
.admin-shell table.data .badge {
  box-shadow: inset 0 0 0 1px rgba(0, 47, 42, 0.06);
  letter-spacing: 0.04em;
}
.admin-shell table.data td:empty::after { content: "—"; color: var(--muted); }

/* Empty states */
.admin-shell .empty-state {
  background:
    radial-gradient(420px 120px at 50% 0%, rgba(245, 196, 81, 0.12), transparent 70%),
    #fff;
  border-style: solid;
  border-color: rgba(0, 47, 42, 0.1);
  border-radius: calc(var(--radius) + 4px);
  padding: 2.75rem 1.5rem;
}
.admin-shell .empty-state h3 { margin-bottom: 0.35rem; }
.admin-shell .empty-state p { max-width: 48ch; margin-inline: auto; }
.admin-shell .empty-state .btn { margin-top: 0.5rem; }

/* KPI / stat cards (reports + any .stat-grid) */
.admin-shell .stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  margin-bottom: 1.35rem;
}
.admin-shell .stat-card {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid rgba(0, 47, 42, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #FBFDFC 100%);
  box-shadow: 0 10px 28px rgba(0, 47, 42, 0.06);
  padding: 1.15rem 1.2rem 1.2rem;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.admin-shell .stat-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(10, 94, 85, 0.4));
  opacity: 0.85;
}
.admin-shell .stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 47, 42, 0.1);
  border-color: rgba(0, 47, 42, 0.14);
}
.admin-shell .stat-card .label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.admin-shell .stat-card .label::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 196, 81, 0.25);
}
.admin-shell .stat-card .value {
  margin-top: 0.45rem;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--green-900);
  font-variant-numeric: tabular-nums;
}
.admin-shell .stat-card .meta {
  margin-top: 0.35rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}
.admin-shell .stat-card.accent {
  background:
    radial-gradient(circle at 100% 0%, rgba(245, 196, 81, 0.22), transparent 45%),
    linear-gradient(145deg, var(--green-900), var(--green-800));
  border-color: transparent;
}
.admin-shell .stat-card.accent .label { color: rgba(255, 255, 255, 0.72); }
.admin-shell .stat-card.accent .label::before { background: var(--gold-soft); }
.admin-shell .stat-card.accent .value { color: var(--gold); }
.admin-shell .stat-card.accent .meta {
  color: rgba(255, 255, 255, 0.78);
  border-top-color: rgba(255, 255, 255, 0.14);
}
.admin-shell .stat-card.accent::after {
  background: linear-gradient(90deg, transparent, rgba(245, 196, 81, 0.75));
}

/* Charts on reports */
.admin-shell .chart-box {
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid rgba(0, 47, 42, 0.08);
  box-shadow: 0 10px 28px rgba(0, 47, 42, 0.06);
  padding: 1.2rem 1.25rem 1.15rem;
}
.admin-shell .chart-box h3 {
  position: relative;
  padding-left: 0.85rem;
  font-size: 1rem;
  margin-bottom: 0.85rem;
}
.admin-shell .chart-box h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.1em;
  bottom: 0.15em;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold), var(--green-700));
}

/* Split list/form layouts (admin-users, faqs, testimonials, notifications, loan-limits) */
.admin-shell .split-panel { align-items: start; }
.admin-shell .panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}
.admin-shell .panel-head h3 {
  position: relative;
  margin: 0;
  padding-left: 0.85rem;
}
.admin-shell .panel-head h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.1em;
  bottom: 0.15em;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold), var(--green-700));
}
.admin-shell .count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 1.7rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--green-900);
  font-size: 0.78rem;
  font-weight: 800;
}
.admin-shell .panel-note {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green-800);
  background: rgba(245, 196, 81, 0.16);
  border: 1px solid rgba(245, 196, 81, 0.35);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
}

/* Member-style rows used in admin-users / list cards */
.admin-shell .member-card {
  position: relative;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid rgba(0, 47, 42, 0.08);
  background: #fff;
  box-shadow: 0 8px 22px rgba(0, 47, 42, 0.05);
  overflow: hidden;
}
.admin-shell .member-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--gold), rgba(10, 94, 85, 0.55));
}
.admin-shell .member-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}
.admin-shell .member-id {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.admin-shell .member-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: linear-gradient(145deg, var(--green-900), var(--green-800));
  color: var(--gold);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 18px rgba(0, 47, 42, 0.18);
}
.admin-shell .member-meta { min-width: 0; }
.admin-shell .member-meta strong {
  display: block;
  color: var(--green-900);
  font-size: 0.98rem;
  line-height: 1.25;
}
.admin-shell .member-meta span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  word-break: break-all;
}
.admin-shell .member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.admin-shell .member-form {
  padding-top: 0.15rem;
  border-top: 1px dashed var(--line);
}
.admin-shell .member-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}
.admin-shell .member-delete {
  margin-top: 0.55rem;
  display: flex;
  justify-content: flex-end;
}

/* Inline create/add form panel */
.admin-shell .aside-form {
  position: sticky;
  top: 1rem;
}
.admin-shell .aside-form .btn-primary { width: 100%; }
.admin-shell .aside-form .alert { font-size: 0.9rem; }

/* Detail / KVO blocks on detail pages */
.admin-shell .kv {
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: var(--cream);
  border: 1px solid var(--line);
  grid-template-columns: minmax(120px, 180px) 1fr;
}
.admin-shell .kv dt {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.admin-shell .kv dd {
  color: var(--green-900);
}

/* Alerts in admin content */
.admin-shell .app-main-inner > .alert {
  border-radius: 16px;
  border-width: 1.5px;
  box-shadow: 0 10px 26px rgba(0, 47, 42, 0.08);
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Loan-limits dense table */
.admin-shell .table-wrap table.data input[type="text"],
.admin-shell .table-wrap table.data input[type="number"] {
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  font-size: 0.88rem;
  min-width: 0;
}
.admin-shell .table-wrap table.data .btn { vertical-align: middle; }

/* Section intro copy under page headers */
.admin-shell .section-intro {
  margin: -0.5rem 0 1.1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

/* List cards — table + pager inside a panel */
.admin-shell .list-card {
  overflow: hidden;
}
.admin-shell .list-card > .panel-head {
  margin-bottom: 0;
  padding: 1.05rem 1.2rem 0.9rem;
}
.admin-shell .list-card > .toolbar,
.admin-shell .list-card > .tab-row {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  border-bottom: 1px solid var(--line);
}
.admin-shell .list-card > .table-wrap,
.admin-shell .list-card .stack > .table-wrap {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.admin-shell .list-card > .pager-wrap {
  margin-top: 0;
  padding: 0.85rem 1.2rem 1.1rem;
  border-top: 1px solid var(--line);
  background: #FBFDFC;
}
.admin-shell .list-card > .empty-state {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.admin-shell .table-wrap .empty-row td {
  padding: 0;
}
.admin-shell .table-wrap .empty-row .empty-state {
  margin: 1rem;
  border-radius: 16px;
}

/* Header count chip */
.admin-shell .page-header .count-pill {
  min-width: auto;
  height: 2rem;
  padding: 0 0.85rem;
  font-size: 0.84rem;
  background: linear-gradient(145deg, var(--green-900), var(--green-800));
  color: var(--gold);
  border: 1px solid rgba(245, 196, 81, 0.35);
  box-shadow: 0 8px 18px rgba(0, 47, 42, 0.16);
}

/* Row actions */
.admin-shell table.data .row-actions {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}
.admin-shell table.data .admin-action {
  display: inline-grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  min-height: 2.15rem;
  padding: 0;
  border-radius: 10px;
  background: linear-gradient(145deg, #fff, #f4f8f7);
  color: var(--green-900);
  box-shadow: 0 5px 12px rgba(0, 47, 42, .08);
}
.admin-shell table.data .admin-action:hover {
  color: var(--green-900);
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 8px 16px rgba(245, 196, 81, .28);
}
.admin-shell table.data .admin-action:focus-visible {
  outline: 3px solid rgba(245, 196, 81, .48);
  outline-offset: 2px;
}
.admin-action-icon { font-size: 1.05rem; font-weight: 800; line-height: 1; }
.admin-shell table.data th:last-child,
.admin-shell table.data td:last-child { width: 4.25rem; padding-right: 1.15rem; text-align: right; }
.admin-shell table.data tbody tr { transition: background-color .15s ease; }
.admin-shell table.data td strong {
  color: var(--green-900);
}
.admin-shell table.data .cell-sub {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
}
.admin-shell table.data .mono {
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--green-800);
}

/* Priority / channel chips */
.admin-shell .chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: capitalize;
  border: 1px solid transparent;
  white-space: nowrap;
}
.admin-shell .chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.75;
}
.admin-shell .chip-urgent { background: #FDE8E8; color: #9B1C1C; border-color: #F5C2C2; }
.admin-shell .chip-high { background: #FFF4E5; color: #9A5B00; border-color: #F5D9A8; }
.admin-shell .chip-medium { background: #E8F3FF; color: #1D4E89; border-color: #C7DDF5; }
.admin-shell .chip-low { background: #E8F6EF; color: #0F5C3C; border-color: #C5EBD9; }

/* Identity banner on detail pages */
.admin-shell .identity-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  border-radius: calc(var(--radius) + 6px);
  background:
    radial-gradient(720px 160px at 0% 0%, rgba(245, 196, 81, 0.2), transparent 55%),
    linear-gradient(135deg, var(--green-900) 0%, var(--green-800) 100%);
  color: #EAF6F3;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-lg);
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.admin-shell .identity-banner .member-avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  font-size: 1.15rem;
  background: linear-gradient(145deg, var(--gold), var(--gold-soft));
  color: var(--green-900);
  box-shadow: 0 10px 24px rgba(245, 196, 81, 0.3);
}
.admin-shell .identity-banner .member-meta strong { color: #fff; font-size: 1.15rem; }
.admin-shell .identity-banner .member-meta span { color: rgba(234, 246, 243, 0.7); }
.admin-shell .identity-banner .badge {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: none;
}
.admin-shell .identity-banner .identity-actions {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: end;
}
.admin-shell .identity-banner .identity-actions .field { margin: 0; gap: 0.3rem; }
.admin-shell .identity-banner label {
  font-size: 0.7rem !important;
  color: rgba(234, 246, 243, 0.7) !important;
}
.admin-shell .identity-banner select {
  min-width: 9rem;
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(255, 255, 255, 0.2);
}
.admin-shell .identity-banner .btn-dark {
  background: #fff;
  color: var(--green-900);
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

/* Mini KPI strip */
.admin-shell .mini-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}
.admin-shell .mini-kpi {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.95rem 1.05rem;
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(180deg, #fff, #FBFDFC);
  border: 1px solid rgba(0, 47, 42, 0.08);
  box-shadow: 0 8px 22px rgba(0, 47, 42, 0.05);
  text-decoration: none;
  color: inherit;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.admin-shell .mini-kpi::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(245, 196, 81, 0.9), rgba(10, 94, 85, 0.35));
}
.admin-shell a.mini-kpi:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 47, 42, 0.1);
}
.admin-shell .mini-kpi .label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.admin-shell .mini-kpi .value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--green-900);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.admin-shell .mini-kpi .meta {
  font-size: 0.82rem;
  color: var(--muted);
}

/* Page form editor */
.admin-shell .editor-body textarea {
  min-height: 360px;
  font-family: var(--font);
  font-size: 0.9rem;
  line-height: 1.55;
  background:
    linear-gradient(180deg, #FBFDFC 0%, #fff 100%);
}
.admin-shell .form-sticky-actions {
  position: sticky;
  bottom: 0.85rem;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 47, 42, 0.1);
  box-shadow: 0 14px 36px rgba(0, 47, 42, 0.12);
  backdrop-filter: blur(8px);
}

/* Loan-limit rule cards */
.admin-shell .rule-card {
  position: relative;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid rgba(0, 47, 42, 0.08);
  background: #fff;
  box-shadow: 0 8px 22px rgba(0, 47, 42, 0.05);
  overflow: hidden;
}
.admin-shell .rule-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--gold), rgba(10, 94, 85, 0.55));
}
.admin-shell .rule-card form.rule-form {
  padding: 1rem 1.1rem 1.05rem;
}
.admin-shell .rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.85rem;
  align-items: end;
}
.admin-shell .rule-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.95rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--line);
}
.admin-shell .weight-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 6.5rem auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border-radius: 14px;
  background: var(--cream);
  border: 1px solid var(--line);
}
.admin-shell .weight-row label {
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--green-900);
}
.admin-shell .weight-row .muted { display: block; font-size: 0.78rem; font-weight: 600; }
.admin-shell .weight-row input { text-align: right; }
.admin-shell .weight-sum {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--green-900);
  font-weight: 800;
  font-size: 0.84rem;
}
.admin-shell .weight-sum.is-over {
  background: #FDE8E8;
  color: #9B1C1C;
}

/* Reports export bar */
.admin-shell .export-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}
.admin-shell .section-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.85rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px dashed var(--line);
}
.admin-shell .section-band h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  position: relative;
  padding-left: 0.85rem;
}
.admin-shell .section-band h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.1em;
  bottom: 0.15em;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold), var(--green-700));
}
.admin-shell .chart-box {
  background: linear-gradient(180deg, #ffffff 0%, #FBFDFC 100%);
}

/* Notifications outbox filter row */
.admin-shell .panel-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: end;
}
.admin-shell .panel-filter .field { margin: 0; }
.admin-shell .panel-filter .field input { min-width: 14rem; }
.admin-notification-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
  margin: 0 0 1rem;
}
.admin-notification-stat {
  position: relative;
  overflow: hidden;
  min-height: 6.3rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(0,47,42,.09);
  border-radius: 15px;
  background: linear-gradient(180deg, #fff, #fbfdfc);
  box-shadow: 0 9px 24px rgba(0,47,42,.06);
}
.admin-notification-stat::after { position: absolute; right: -1.2rem; bottom: -2rem; width: 5rem; height: 5rem; border: 1px solid rgba(10,94,85,.1); border-radius: 50%; content: ""; }
.admin-notification-stat span { display: block; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.admin-notification-stat strong { display: block; margin-top: .45rem; color: var(--green-900); font-size: 1.3rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.admin-notification-stat small { display: block; margin-top: .35rem; color: var(--muted); font-size: .76rem; }
.admin-notification-stat--accent { border-color: transparent; background: linear-gradient(145deg, var(--green-900), var(--green-800)); }
.admin-notification-stat--accent span, .admin-notification-stat--accent small { color: rgba(255,255,255,.7); }
.admin-notification-stat--accent strong { color: var(--gold); }
.admin-notification-stat--warning { border-color: rgba(245,196,81,.45); background: #fffaf0; }
.admin-notification-stat--warning strong { color: #9a6b00; }
.admin-notification-outbox .table-wrap { min-height: 18rem; }
.admin-notification-action { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; min-height: 2.1rem; padding: 0; border-radius: 10px; font-size: 1.05rem; }
.admin-notification-action:hover { background: var(--gold); border-color: var(--gold); color: var(--green-900); }
.admin-notification-action-placeholder { color: #a5b5b1; font-size: .9rem; }
.admin-notification-broadcast { border-top: 3px solid var(--gold); background: linear-gradient(180deg, #fff, #fbfdfc); }

@media (max-width: 720px) {
  .admin-notification-stats { grid-template-columns: 1fr; gap: .6rem; }
  .admin-notification-stat { min-height: 0; padding: .85rem 1rem; }
  .admin-notification-outbox .panel-head { align-items: stretch; }
  .admin-notification-outbox .panel-filter { width: 100%; }
  .admin-notification-outbox .panel-filter .field { flex: 1 1 auto; }
  .admin-notification-outbox .panel-filter .field input { min-width: 0; width: 100%; }
}

@media (max-width: 980px) {
  .admin-shell .page-header { padding: 1.1rem 1.15rem; }
  .admin-shell .aside-form { position: static; }
  .admin-shell .kv { grid-template-columns: 1fr; }
  .admin-shell .identity-banner .identity-actions { margin-left: 0; width: 100%; }
}

@media (max-width: 720px) {
  .admin-shell .app-main-inner { width: min(100% - 1.25rem, 1280px); margin-top: 1rem; }
  .admin-shell .page-header {
    flex-direction: column;
    align-items: stretch;
    padding: 1.05rem 1.05rem 1.1rem;
  }
  .admin-shell .page-header .form-actions { width: 100%; }
  .admin-shell .page-header .form-actions .btn { flex: 1 1 auto; }
  .admin-shell .toolbar { flex-direction: column; align-items: stretch; }
  .admin-shell .toolbar .field { min-width: 0; width: 100%; }
  .admin-shell .toolbar .btn { width: 100%; }
  .admin-shell .toolbar .tab-row { width: 100%; }
  .admin-shell .tab-link { flex: 1 1 auto; justify-content: center; }
  .admin-shell form > .form-actions:not(.between) { flex-direction: column; align-items: stretch; }
  .admin-shell form > .form-actions .btn { width: 100%; }
  .admin-shell .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-shell .mini-kpis { grid-template-columns: 1fr; }
  .admin-shell .weight-row { grid-template-columns: 1fr; }
  .admin-shell .export-bar { width: 100%; justify-content: stretch; }
  .admin-shell .export-bar .btn { flex: 1 1 auto; }
  .admin-shell .form-sticky-actions { flex-direction: column-reverse; }
  .admin-shell .form-sticky-actions .btn { width: 100%; }
}

@media (max-width: 480px) {
  .admin-shell .stat-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   Premium public design system
   Header · nav · footer · home · products · calculator
   how-it-works · contact
   ========================================================= */

/* ---------- Header / menu ---------- */
.site-header {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 47, 42, 0.08);
  box-shadow: 0 8px 28px rgba(0, 47, 42, 0.04);
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(245, 196, 81, 0.55), transparent);
  pointer-events: none;
}
.site-header--compact {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 10px 30px rgba(0, 47, 42, 0.08);
}
.header-inner { min-height: 74px; gap: 1rem; }
.site-header .brand-mark {
  background: linear-gradient(145deg, var(--green-900), var(--green-700));
  box-shadow:
    inset 0 0 0 1px rgba(245, 196, 81, 0.45),
    0 8px 18px rgba(0, 47, 42, 0.18);
}
.site-header .brand-text strong {
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}
.site-header .brand-text small {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--green-700);
  text-transform: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.28rem;
  border-radius: 999px;
  background: rgba(246, 248, 247, 0.9);
  border: 1px solid rgba(0, 47, 42, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.nav-link {
  position: relative;
  padding: 0.52rem 0.9rem;
  border-radius: 999px;
  color: var(--green-800);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.nav-link:hover {
  background: #fff;
  color: var(--green-900);
  box-shadow: 0 6px 16px rgba(0, 47, 42, 0.08);
}
.nav-link.is-active {
  background: linear-gradient(145deg, var(--green-900), var(--green-800));
  color: #fff;
  box-shadow:
    0 8px 18px rgba(0, 47, 42, 0.18),
    inset 0 0 0 1px rgba(245, 196, 81, 0.28);
}
.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.28rem;
  width: 6px;
  height: 3px;
  border-radius: 999px;
  background: var(--gold);
  transform: translateX(-50%);
  box-shadow: 0 0 0 3px rgba(245, 196, 81, 0.18);
}

.header-actions { gap: 0.45rem; }
.header-actions .btn-primary {
  box-shadow: 0 10px 24px rgba(245, 196, 81, 0.4);
}
.header-actions .btn-ghost {
  font-weight: 700;
  border-radius: 999px;
  padding-inline: 0.9rem;
}
.header-actions .btn-ghost:hover {
  background: var(--green-100);
}

.nav-toggle {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1.5px solid rgba(0, 47, 42, 0.1);
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 47, 42, 0.06);
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background 0.16s ease, border-color 0.16s ease;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--green-900);
  border-radius: 2px;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.nav-toggle[aria-expanded="true"] {
  background: var(--green-900);
  border-color: var(--green-900);
}
.nav-toggle[aria-expanded="true"] span { background: var(--gold); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  margin-top: 2.5rem;
  padding-top: 0;
  background:
    radial-gradient(900px 280px at 0% 0%, rgba(245, 196, 81, 0.1), transparent 55%),
    linear-gradient(180deg, #00352F 0%, var(--green-900) 45%, #012823 100%);
  color: rgba(234, 246, 243, 0.86);
  border-top: 1px solid rgba(245, 196, 81, 0.28);
  box-shadow: 0 -18px 50px rgba(0, 47, 42, 0.12);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(180px, 40%);
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, var(--green-700), var(--gold));
  box-shadow: 0 8px 24px rgba(245, 196, 81, 0.35);
}
.footer-grid {
  grid-template-columns: 1.45fr repeat(3, 1fr);
  gap: 2rem 1.5rem;
  padding: 2.75rem 0 2rem;
}
.site-footer .brand { color: #fff; }
.site-footer .brand-mark {
  background: linear-gradient(145deg, var(--gold), var(--gold-soft));
  color: var(--green-900);
  box-shadow: 0 10px 22px rgba(245, 196, 81, 0.28);
}
.site-footer .brand-text strong { color: #fff; }
.footer-brand > p {
  margin-top: 1rem;
  max-width: 34ch;
  color: rgba(234, 246, 243, 0.74);
  font-size: 0.95rem;
  line-height: 1.6;
}
.footer-brand {
  position: relative;
  padding-right: 1rem;
  min-width: 0;
}
.footer-brand::after {
  content: "";
  position: absolute;
  right: 0.25rem;
  top: 0.25rem;
  bottom: 0.5rem;
  width: 1px;
  background: linear-gradient(180deg, rgba(245, 196, 81, 0.35), transparent);
}
.site-footer h4,
.footer-group summary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  margin: 0 0 1rem;
  font-weight: 800;
  text-transform: uppercase;
  list-style: none;
  cursor: default;
}
.footer-group summary::-webkit-details-marker { display: none; }
.site-footer h4::before,
.footer-group summary::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 196, 81, 0.22);
}
.footer-group summary::after { display: none; }
.footer-group { min-width: 0; }
.site-footer ul { gap: 0.55rem; }
.site-footer li a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(234, 246, 243, 0.82);
  font-weight: 600;
  font-size: 0.93rem;
  transition: color 0.15s ease, transform 0.15s ease;
}
.site-footer li a:hover {
  color: var(--gold-soft);
  transform: translateX(3px);
}
.site-footer li a::before {
  content: "";
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--gold);
  transition: width 0.15s ease;
}
.site-footer li a:hover::before { width: 10px; }
.footer-contact {
  margin-top: 1.1rem;
  gap: 0.55rem;
}
.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: rgba(234, 246, 243, 0.78);
  overflow-wrap: anywhere;
}
.footer-contact li::before {
  content: "●";
  color: var(--gold);
  font-size: 0.55rem;
  line-height: 1.6;
  opacity: 0.85;
}
.footer-contact a { color: rgba(234, 246, 243, 0.9); font-weight: 600; }
.footer-contact a:hover { color: var(--gold); }

.social-row { gap: 0.55rem; margin-top: 1rem; }
.social-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 38px;
  padding: 0 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(234, 246, 243, 0.9);
  font-size: 0.82rem;
  font-weight: 700;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.social-row a:hover {
  background: rgba(245, 196, 81, 0.16);
  border-color: rgba(245, 196, 81, 0.4);
  color: var(--gold-soft);
  transform: translateY(-2px);
}

.footer-bottom {
  margin-top: 0.25rem;
  padding: 1.15rem 0 1.6rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.12);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.03) inset;
  width: 100%;
  font-size: 0.86rem;
  color: rgba(234, 246, 243, 0.7);
}
.footer-bottom p:first-child {
  font-weight: 700;
  color: rgba(234, 246, 243, 0.88);
}
.footer-disclaimer {
  max-width: 42rem;
  text-align: right;
  color: rgba(234, 246, 243, 0.58);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* ---------- Interior page hero ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2.4rem, 5vw, 3.4rem) 0;
  background:
    radial-gradient(700px 220px at 0% 0%, rgba(245, 196, 81, 0.18), transparent 60%),
    radial-gradient(500px 200px at 100% 0%, rgba(10, 94, 85, 0.35), transparent 55%),
    linear-gradient(160deg, var(--green-900) 0%, var(--green-800) 100%);
  color: #EAF6F3;
  border-bottom: 1px solid rgba(245, 196, 81, 0.18);
}
.page-hero::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -80px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 196, 81, 0.16), transparent 70%);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 {
  color: #fff;
  margin-bottom: 0.55rem;
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
}
.page-hero .section-kicker { color: var(--gold); }
.page-hero .section-lead {
  max-width: 46rem;
  color: rgba(234, 246, 243, 0.8);
  margin-bottom: 0;
}
.page-hero .hero-points { margin-top: 1.25rem; }

/* ---------- Premium home bits ---------- */
.hero {
  background:
    radial-gradient(900px 420px at 88% -8%, rgba(245, 196, 81, 0.2), transparent 58%),
    radial-gradient(500px 320px at 8% 100%, rgba(10, 94, 85, 0.55), transparent 60%),
    linear-gradient(155deg, var(--green-900) 0%, var(--green-800) 52%, #03463F 100%);
  padding: clamp(3.6rem, 8vw, 6.4rem) 0;
}
.hero h1 {
  font-size: clamp(2.05rem, 4.4vw, 3.15rem);
  letter-spacing: -0.03em;
}
.hero h1 em {
  background: linear-gradient(120deg, var(--gold-soft), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead {
  font-size: 1.1rem;
  color: rgba(244, 251, 249, 0.88);
  line-height: 1.65;
}
.hero-actions .btn-outline {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
}
.hero-actions .btn-outline:hover {
  background: #fff;
  color: var(--green-900);
  border-color: #fff;
}
.hero-points li {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.hero-card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background:
    radial-gradient(320px 120px at 100% 0%, rgba(245, 196, 81, 0.14), transparent 70%),
    #fff;
  box-shadow: 0 28px 70px rgba(0, 24, 21, 0.28);
}
.hero-card::before {
  content: "";
  position: absolute;
  left: 1.35rem;
  right: 1.35rem;
  top: 0;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, var(--green-700), var(--gold));
}
.hero-card h3 {
  position: relative;
  padding-left: 0.85rem;
}
.hero-card h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.1em;
  bottom: 0.15em;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold), var(--green-700));
}

.section-head h1,
.section-head h2 {
  letter-spacing: -0.025em;
}
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(10, 94, 85, 0.08);
  border: 1px solid rgba(10, 94, 85, 0.12);
  color: var(--green-700);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}
.section-head.center .section-kicker { justify-content: center; }
.section-dark .section-kicker,
.hero .section-kicker,
.page-hero .section-kicker {
  background: rgba(245, 196, 81, 0.12);
  border-color: rgba(245, 196, 81, 0.28);
  color: var(--gold);
}

.card.feature-card,
.card.product-card {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid rgba(0, 47, 42, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #FBFDFC 100%);
  box-shadow: 0 12px 32px rgba(0, 47, 42, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card.feature-card::after,
.card.product-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(10, 94, 85, 0.35));
}
.card.feature-card:hover,
.card.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(0, 47, 42, 0.1);
  border-color: rgba(0, 47, 42, 0.14);
}
.card-icon {
  box-shadow: 0 10px 22px rgba(0, 47, 42, 0.1);
}
.card-icon.gold { box-shadow: 0 10px 22px rgba(245, 196, 81, 0.28); }
.product-card .price-range {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(245, 196, 81, 0.16);
  border: 1px solid rgba(245, 196, 81, 0.35);
  color: var(--green-900);
  font-size: 1rem;
}
.product-features {
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  background: var(--cream);
  border: 1px solid var(--line);
}

.step {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid rgba(0, 47, 42, 0.08);
  background: linear-gradient(180deg, #fff, #FBFDFC);
  box-shadow: 0 10px 26px rgba(0, 47, 42, 0.05);
  padding: 1.2rem 1.25rem;
}
.step::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--gold), rgba(10, 94, 85, 0.45));
}
.step-num {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--green-900), var(--green-800));
  color: var(--gold);
  box-shadow: 0 10px 22px rgba(0, 47, 42, 0.18);
}
.step h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.steps.is-timeline .step + .step { margin-top: 0; }

.faq-item {
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid rgba(0, 47, 42, 0.08);
  box-shadow: 0 8px 22px rgba(0, 47, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.faq-item:hover { border-color: rgba(0, 47, 42, 0.14); }
.faq-item[open] {
  border-color: rgba(245, 196, 81, 0.45);
  box-shadow: 0 12px 30px rgba(0, 47, 42, 0.08);
}
.faq-item summary {
  background: linear-gradient(180deg, #fff, #FBFDFC);
  padding: 1.05rem 1.2rem;
}
.faq-item summary::after {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--green-100);
  color: var(--green-900);
  font-weight: 800;
  content: "+";
  flex: 0 0 auto;
}
.faq-item[open] summary::after {
  content: "–";
  background: var(--gold);
  color: var(--ink);
}

.testimonial-card {
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid rgba(0, 47, 42, 0.08);
  box-shadow: 0 12px 32px rgba(0, 47, 42, 0.06);
  position: relative;
  overflow: hidden;
}
.testimonial-card::before {
  content: "“";
  position: absolute;
  right: 0.8rem;
  top: 0.2rem;
  font-size: 4rem;
  line-height: 1;
  color: rgba(245, 196, 81, 0.28);
  font-family: var(--font);
}

.section-dark {
  background:
    radial-gradient(700px 240px at 50% 0%, rgba(245, 196, 81, 0.14), transparent 65%),
    linear-gradient(180deg, #00352F, var(--green-900));
  border-block: 1px solid rgba(245, 196, 81, 0.16);
}

/* ---------- Calculator ---------- */
.wizard-layout .card {
  border-radius: calc(var(--radius) + 6px);
  border-color: rgba(0, 47, 42, 0.08);
  box-shadow: 0 14px 36px rgba(0, 47, 42, 0.07);
}
.calc-result {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(420px 160px at 100% 0%, rgba(245, 196, 81, 0.22), transparent 55%),
    linear-gradient(160deg, var(--green-900), var(--green-800) 70%, #043C36);
  border: 1px solid rgba(245, 196, 81, 0.22);
  border-radius: calc(var(--radius) + 8px);
  padding: 1.6rem 1.5rem 1.5rem;
  box-shadow: 0 24px 55px rgba(0, 47, 42, 0.22);
}
.calc-result::before {
  content: "";
  position: absolute;
  left: 1.5rem;
  right: 1.5rem;
  top: 0;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, var(--green-700), var(--gold));
}
.calc-result .amount {
  font-size: clamp(1.85rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
  text-shadow: 0 10px 30px rgba(245, 196, 81, 0.25);
  margin-bottom: 1rem;
}
.calc-result .estimate-row {
  padding: 0.7rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.14);
}
.calc-result .estimate-row:last-of-type { border-bottom: 0; }
.calc-result .estimate-row span { color: rgba(255, 255, 255, 0.78); font-weight: 600; }
.calc-result .estimate-row strong {
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.wizard-aside { top: 96px; }

/* ---------- Contact ---------- */
.contact-section { padding-top: clamp(2.25rem, 5vw, 3.5rem); }
.contact-page-grid { gap: clamp(1.25rem, 3vw, 2rem); }
.contact-intro { min-width: 0; }
.contact-channel {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 0.85rem 0.95rem;
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(180deg, #fff, #FBFDFC);
  border: 1px solid rgba(0, 47, 42, 0.08);
  box-shadow: 0 10px 26px rgba(0, 47, 42, 0.05);
  transition: transform 0.16s ease, border-color 0.16s ease;
}
.contact-channel:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 47, 42, 0.14);
}
.contact-channel .card-icon {
  margin: 0;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  flex: 0 0 auto;
}
.contact-channel strong {
  display: block;
  color: var(--green-900);
  font-size: 0.98rem;
  margin-bottom: 0.15rem;
}
.contact-channel a,
.contact-channel span {
  color: var(--muted);
  font-size: 0.94rem;
  word-break: break-word;
}
.contact-channel a { font-weight: 600; color: var(--green-800); }
.contact-channel a:hover { color: var(--green-900); text-decoration: underline; }

.contact-form-card {
  border-radius: calc(var(--radius) + 8px);
  border: 1px solid rgba(0, 47, 42, 0.08);
  box-shadow: 0 18px 46px rgba(0, 47, 42, 0.08);
  padding: 1.35rem 1.4rem 1.2rem;
  position: relative;
  overflow: hidden;
}
.contact-form-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--green-800), var(--gold));
}
.contact-form-heading { display: flex; align-items: flex-start; gap: 0.8rem; margin-bottom: 1.15rem; }
.contact-form-mark {
  display: grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; border-radius: 13px;
  color: var(--gold); background: linear-gradient(145deg, var(--green-900), var(--green-800));
  box-shadow: 0 9px 20px rgba(0,47,42,0.16);
}
.contact-form-mark svg { width: 21px; height: 21px; }
.contact-form-heading .section-kicker { margin-bottom: 0.22rem; }
.contact-form-heading h2 { margin: 0; font-size: 1.25rem; color: var(--green-900); }
.contact-form-heading p { margin: 0.18rem 0 0; color: var(--muted); font-size: 0.86rem; }
.contact-form .form-grid { gap: 0.15rem 0.85rem; }
.contact-form .field { margin-bottom: 0.72rem; }
.contact-form .field label { font-size: 0.82rem; }
.contact-form input, .contact-form textarea { min-height: 46px; border-radius: 11px; }
.contact-form textarea { min-height: 128px; }
.contact-form .form-actions { margin-top: 0.45rem; padding-top: 0.95rem; border-top: 1px solid var(--line); }
.contact-form-footnote { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--muted); font-size: 0.78rem; line-height: 1.35; }
.contact-form-footnote span { color: var(--success); font-size: 0.75rem; }
[data-theme="dark"] .contact-form-heading h2 { color: #F2F8F6; }
[data-theme="dark"] .contact-form .form-actions { border-color: var(--border); }

/* ---------- Terms and payment ---------- */
.payment-hero {
  padding: 1.1rem 1.25rem; margin-bottom: 1.15rem; border-radius: calc(var(--radius) + 6px);
  background: linear-gradient(135deg, var(--green-900), var(--green-800)); color: #EAF6F3;
  border: 1px solid rgba(245,196,81,0.2); box-shadow: var(--shadow-lg);
}
.payment-hero h1 { color: #fff; font-size: clamp(1.35rem, 2.5vw, 1.8rem); }
.payment-hero .subtitle { color: rgba(234,246,243,0.72); }
.payment-hero .eyebrow { color: var(--gold); }
.payment-hero-status { display: grid; justify-items: end; gap: 0.35rem; }
.payment-hero-status > span { color: rgba(234,246,243,0.7); font-size: 0.74rem; font-weight: 700; }
.payment-summary-card, .payment-side-card, .payment-action-card { border-radius: calc(var(--radius) + 5px); box-shadow: 0 12px 30px rgba(0,47,42,0.06); }
.payment-summary-card { border-top: 3px solid var(--gold); }
.fee-emphasis { color: var(--green-800); font-weight: 800; }
.payment-action-card { border-color: rgba(245,196,81,0.35); background: linear-gradient(180deg, #fff, #FBFDFC); }
.payment-confirm-form { padding-top: 0.8rem; border-top: 1px solid var(--line); }
.payment-amount-card { overflow: hidden; }
.payment-amount-label { color: var(--muted); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.payment-amount-value { margin: 0.2rem 0 1.1rem; color: var(--green-900); font-size: clamp(1.7rem, 4vw, 2.35rem); font-weight: 800; font-variant-numeric: tabular-nums; }
ol.payment-instructions {
  margin: 0 0 0.9rem;
  padding: 0.4rem 0;
  list-style: none;
  counter-reset: pay-step;
  border: 0;
  background: transparent;
  display: grid;
  gap: 0.55rem;
}
.payment-instructions li { padding: 0; color: var(--ink); margin: 0; }
.payment-instructions li > span {
  position: relative;
  display: block;
  padding: 0.75rem 0.9rem 0.75rem 3rem;
  border-radius: 13px;
  border: 1px solid var(--border, var(--line));
  background: var(--surface-2, #FBFDFC);
  font-size: 0.9rem;
  line-height: 1.55;
  counter-increment: pay-step;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.payment-instructions li > span:hover { border-color: rgba(245, 196, 81, 0.55); box-shadow: 0 8px 20px rgba(0, 47, 42, 0.06); }
.payment-instructions li > span::before {
  content: counter(pay-step);
  position: absolute;
  left: 0.7rem;
  top: 0.7rem;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--green-900), var(--green-800));
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
}
.ref-callout {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 15px;
  border: 1.5px solid rgba(245, 196, 81, 0.5);
  background:
    radial-gradient(320px 110px at 100% 0%, rgba(245, 196, 81, 0.18), transparent 70%),
    linear-gradient(180deg, rgba(245, 196, 81, 0.1), rgba(245, 196, 81, 0.04));
  box-shadow: 0 10px 26px rgba(0, 47, 42, 0.07);
}
.ref-callout-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--green-800);
}
.ref-callout strong {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  color: var(--green-900);
  overflow-wrap: anywhere;
}
[data-theme="dark"] .payment-instructions li > span { background: rgba(255,255,255,0.03); border-color: var(--border); color: var(--text); }
[data-theme="dark"] .ref-callout strong { color: var(--gold-soft); }
[data-theme="dark"] .ref-callout-label { color: var(--gold-soft); }
.next-step-card {
  display: flex; align-items: center; gap: 0.85rem; margin-bottom: 1.15rem; padding: 0.95rem 1rem;
  border: 1px solid rgba(245,196,81,0.4); border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(110deg, rgba(245,196,81,0.12), rgba(10,94,85,0.06));
  box-shadow: 0 10px 26px rgba(0,47,42,0.06);
}
.next-step-icon { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; background: var(--green-900); color: var(--gold); font-size: 1.2rem; }
.next-step-copy { flex: 1; min-width: 0; }
.next-step-copy .eyebrow { margin: 0; color: var(--green-700); }
.next-step-copy h2 { margin: 0.12rem 0 0.1rem; font-size: 1rem; color: var(--green-900); }
.next-step-copy p { margin: 0; color: var(--muted); font-size: 0.82rem; }
.payment-destination { display: grid; gap: 0.55rem; margin-bottom: 1.2rem; padding: 0.85rem; border: 1px solid rgba(245,196,81,0.35); border-radius: 14px; background: rgba(245,196,81,0.08); }
.payment-destination div { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.payment-destination span { color: var(--muted); font-size: 0.75rem; }
.payment-destination strong { color: var(--green-900); font-size: 0.84rem; text-align: right; }
[data-theme="dark"] .payment-action-card { background: var(--surface); border-color: rgba(245,196,81,0.25); }
[data-theme="dark"] .payment-amount-value, [data-theme="dark"] .fee-emphasis { color: var(--gold); }
[data-theme="dark"] .payment-instructions { background: rgba(255,255,255,0.03); border-color: var(--border); }
[data-theme="dark"] .next-step-card { background: rgba(245,196,81,0.07); border-color: rgba(245,196,81,0.25); }
[data-theme="dark"] .next-step-copy h2, [data-theme="dark"] .payment-destination strong { color: #F2F8F6; }
[data-theme="dark"] .payment-destination { background: rgba(245,196,81,0.06); border-color: rgba(245,196,81,0.22); }
@media (max-width: 640px) {
  .next-step-card { align-items: flex-start; flex-wrap: wrap; }
  .next-step-card .btn { width: 100%; margin-left: 2.85rem; }
  .payment-destination div { align-items: flex-start; flex-direction: column; gap: 0.1rem; }
  .payment-destination strong { text-align: left; }
}

/* ---------- How it works callout ---------- */
.checklist-card {
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid rgba(245, 196, 81, 0.35);
  background:
    radial-gradient(480px 160px at 0% 0%, rgba(245, 196, 81, 0.14), transparent 70%),
    #fff;
  box-shadow: 0 14px 36px rgba(0, 47, 42, 0.07);
  border-left: 4px solid var(--gold);
}
.checklist-card .product-features {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--ink);
}

/* ---------- Mobile menu polish ---------- */
@media (max-width: 860px) {
  .site-header { z-index: 55; }
  .nav {
    position: absolute;
    top: calc(100% + 0px);
    left: 1rem;
    right: 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0.75rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0, 47, 42, 0.1);
    box-shadow: 0 24px 55px rgba(0, 47, 42, 0.16);
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .nav.is-open { display: flex; animation: navIn 0.18s ease; }
  .nav-link {
    padding: 0.85rem 1rem;
    border-radius: 14px;
    font-size: 0.98rem;
    background: var(--cream);
  }
  .nav-link.is-active { background: linear-gradient(145deg, var(--green-900), var(--green-800)); }
  .nav-link.is-active::after { display: none; }
  .header-actions .btn-ghost { display: inline-flex; }
  .footer-brand::after { display: none; }
  .footer-group { border-top: 1px solid rgba(255,255,255,0.12); }
  .footer-group:last-child { border-bottom: 1px solid rgba(255,255,255,0.12); }
  .footer-group summary { display: flex; justify-content: space-between; align-items: center; min-height: 3.2rem; margin: 0; padding: 0.75rem 0; cursor: pointer; }
  .footer-group summary::after { display: block; content: "+"; color: var(--gold); font-size: 1.15rem; line-height: 1; }
  .footer-group[open] summary::after { content: "−"; }
  .footer-group ul { padding: 0 0 0.85rem; }
  .footer-disclaimer { text-align: left; }
  .page-hero { padding-top: 2rem; }
}
@media (max-width: 640px) {
  .header-inner { min-height: 68px; }
  .site-header .brand-text small { display: none; }
  .hero-actions .btn { width: 100%; }
  .site-footer { overflow-x: hidden; margin-top: 3rem; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1rem; row-gap: 0; padding-top: 2rem; padding-bottom: 1.35rem; }
  .footer-grid, .footer-bottom { width: min(100% - 2rem, 100%); min-width: 0; }
  .footer-brand { grid-column: 1 / -1; margin-bottom: 1rem; padding: 1.1rem; border: 1px solid rgba(245,196,81,.2); border-radius: 16px; background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.03)); }
  .footer-brand > p { max-width: none; margin-top: .85rem; font-size: 0.88rem; }
  .footer-contact { gap: .45rem; margin-top: .95rem; }
  .footer-contact li { min-height: 2.7rem; align-items: center; padding: .55rem .7rem; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; background: rgba(0,0,0,.12); font-size: .82rem; }
  .footer-group { align-self: start; margin: 0; border-top-color: rgba(255,255,255,.1); }
  .footer-group:last-child { border-bottom-color: rgba(255,255,255,.1); }
  .footer-group summary { min-height: 3.55rem; padding: .85rem .15rem; font-size: .72rem; }
  .footer-group summary::after { display: grid; place-items: center; width: 1.55rem; height: 1.55rem; border: 1px solid rgba(245,196,81,.35); border-radius: 50%; background: rgba(245,196,81,.08); }
  .footer-group ul { padding: .1rem .15rem 1rem; gap: .2rem; }
  .footer-group li a { width: 100%; min-height: 2.5rem; padding: .35rem 0; font-size: .88rem; }
  .social-row { flex-wrap: wrap; margin-top: .8rem; }
  .social-row a { min-width: 0; flex: 1 1 auto; height: 2.6rem; }
  .footer-bottom { display: grid; gap: .7rem; padding-top: 1.1rem; padding-bottom: 1.5rem; }
  .footer-bottom p { max-width: 100%; }
  .footer-bottom p:first-child { font-size: .8rem; }
  .footer-disclaimer { padding-top: .1rem; font-size: .76rem; }
}

@keyframes navIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .nav.is-open { animation: none; }
}

/* =========================================================
   Premium customer portal
   Sidebar with icons · dashboard · apply wizard
   ========================================================= */

/* ---------- Customer sidebar ---------- */
.customer-sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #FAFCFB 100%);
  border-right: 1px solid var(--border);
  padding: 1rem 0.75rem 1.1rem;
  gap: 0.9rem;
  overflow: hidden;
  overscroll-behavior: contain;
}
.cust-user-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 0.8rem;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--green-900), var(--green-800));
  color: #EAF6F3;
  box-shadow: 0 12px 28px rgba(0, 47, 42, 0.18);
  border: 1px solid rgba(245, 196, 81, 0.22);
  flex: 0 0 auto;
}
.avatar--lg { width: 42px; height: 42px; font-size: 1rem; flex: 0 0 auto; }
.cust-user-card .avatar {
  background: linear-gradient(145deg, var(--gold), var(--gold-soft));
  color: var(--green-900);
}
.cust-user-meta { display: grid; line-height: 1.25; min-width: 0; }
.cust-user-meta strong {
  color: #fff; font-size: 0.93rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cust-user-meta span {
  color: rgba(234, 246, 243, 0.62); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.08em; font-weight: 700;
}
.cust-sidebar-context {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(10, 94, 85, 0.035);
}
.cust-sidebar-context__pulse {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(46, 125, 98, 0.12);
}
.cust-sidebar-context div { display: grid; gap: 0.12rem; min-width: 0; }
.cust-sidebar-context strong { color: var(--green-900); font-size: 0.76rem; }
.cust-sidebar-context small { color: var(--muted); font-size: 0.7rem; }
.cust-nav-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.15rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(10, 94, 85, 0.3) transparent;
}
.cust-nav-scroll::-webkit-scrollbar { width: 6px; }
.cust-nav-scroll::-webkit-scrollbar-thumb { background: rgba(10, 94, 85, 0.25); border-radius: 999px; }
.cust-nav-scroll::-webkit-scrollbar-track { background: transparent; }
.customer-sidebar .side-group-label {
  color: var(--green-700);
  margin: 0.85rem 0.6rem 0.35rem;
}
.customer-sidebar .side-group-label:first-child { margin-top: 0; }
.customer-sidebar .side-group { gap: 0.3rem; }
.customer-sidebar .side-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.62rem 0.7rem;
  border-radius: 13px;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.92rem;
  border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), transform 0.15s ease;
}
.customer-sidebar .side-link:hover {
  background: var(--green-100);
  color: var(--green-900);
  transform: translateX(2px);
}
.customer-sidebar .side-link.is-active {
  background: linear-gradient(135deg, var(--green-900), var(--green-800));
  color: #fff;
  border-color: rgba(245, 196, 81, 0.3);
  box-shadow: 0 10px 22px rgba(0, 47, 42, 0.18);
}
.customer-sidebar .side-link .side-link-ico {
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center; flex: 0 0 auto;
  background: var(--green-100); color: var(--green-800);
}
.customer-sidebar .side-link .side-link-ico svg { width: 16px; height: 16px; display: block; }
.customer-sidebar .side-link.is-active .side-link-ico {
  background: rgba(245, 196, 81, 0.2); color: var(--gold);
}
.customer-sidebar .side-link .side-link-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.customer-sidebar .side-link .side-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 0 4px rgba(245, 196, 81, 0.2); flex: 0 0 auto;
}
.cust-footnote {
  flex: 0 0 auto;
  margin-top: 0;
  padding: 0.8rem 0.85rem;
  border-radius: 14px;
  background: var(--cream);
  border: 1px solid var(--line);
  font-size: 0.76rem;
  line-height: 1.45;
}
.cust-footnote strong { display: block; color: var(--green-900); font-size: 0.8rem; margin-bottom: 0.2rem; }
.cust-footnote p { margin: 0; }

/* ---------- Customer dashboard ---------- */
.cust-hero {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 8px);
  padding: 1.7rem 1.7rem 1.5rem;
  margin-bottom: 1.25rem;
  background:
    radial-gradient(600px 180px at 100% 0%, rgba(245, 196, 81, 0.22), transparent 55%),
    linear-gradient(140deg, var(--green-900) 0%, var(--green-800) 70%, #043C36 100%);
  color: #EAF6F3;
  border: 1px solid rgba(245, 196, 81, 0.22);
  box-shadow: var(--shadow-lg);
}
.cust-hero::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--gold), var(--green-700));
}
.cust-hero h1 { color: #fff; margin: 0 0 0.3rem; font-size: clamp(1.35rem, 2.4vw, 1.7rem); letter-spacing: -0.02em; }
.cust-hero .subtitle { color: rgba(234, 246, 243, 0.75); margin: 0; }
.cust-hero-grid { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.cust-limit { text-align: right; }
.cust-limit .label {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(234, 246, 243, 0.65);
}
.cust-limit .value {
  font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; color: var(--gold);
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.15;
}
.cust-limit .meta { font-size: 0.82rem; color: rgba(234, 246, 243, 0.7); }
.cust-hero-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.1rem; position: relative; z-index: 1; }
.cust-hero-actions .btn-outline { border-color: rgba(255, 255, 255, 0.5); color: #fff; background: rgba(255,255,255,0.06); }
.cust-hero-actions .btn-outline:hover { background: #fff; color: var(--green-900); border-color: #fff; }

.cust-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.cust-kpi {
  position: relative; overflow: hidden;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface, #fff) 0%, var(--surface-2, #FBFDFC) 100%);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.15rem;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.cust-kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.cust-kpi::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 3px;
  background: linear-gradient(90deg, transparent, rgba(10, 94, 85, 0.35));
}
.cust-kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.55rem; }
.cust-kpi-ico {
  width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
  background: var(--green-100); color: var(--green-800); font-weight: 800;
}
.cust-kpi-ico svg { width: 17px; height: 17px; display: block; }
.cust-kpi .label { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cust-kpi .value { font-size: 1.4rem; font-weight: 800; color: var(--green-900); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 0.15rem; }
.cust-kpi .meta { font-size: 0.82rem; color: var(--muted); margin-top: 0.2rem; }
.cust-kpi--accent { background: linear-gradient(150deg, var(--green-900), var(--green-800)); border-color: transparent; }
.cust-kpi--accent::after { background: linear-gradient(90deg, transparent, rgba(245,196,81,0.7)); }
.cust-kpi--accent .cust-kpi-ico { background: rgba(245,196,81,0.18); color: var(--gold); }
.cust-kpi--accent .label { color: rgba(255,255,255,0.7); }
.cust-kpi--accent .value { color: var(--gold); }
.cust-kpi--accent .meta { color: rgba(255,255,255,0.75); }

.cust-loan-card {
  position: relative; overflow: hidden;
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface, #fff), var(--surface-2, #FBFDFC));
  box-shadow: var(--shadow);
  padding: 1.25rem 1.3rem;
  margin-bottom: 1.25rem;
}
.cust-loan-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--gold), rgba(10,94,85,0.5));
}
.cust-progress { height: 10px; border-radius: 999px; background: var(--green-100); overflow: hidden; margin-top: 0.9rem; }
.cust-progress > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--green-700), var(--gold)); transition: width 0.5s ease; }
.loans-page-hero {
  position: relative; overflow: hidden; padding: 1.25rem 1.35rem; margin-bottom: 1.1rem;
  border-radius: calc(var(--radius) + 6px); border: 1px solid rgba(245,196,81,0.22);
  background: radial-gradient(520px 180px at 100% 0%, rgba(245,196,81,0.2), transparent 58%), linear-gradient(135deg, var(--green-900), var(--green-800));
  box-shadow: var(--shadow-lg); color: #EAF6F3;
}
.loans-page-hero::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(180deg, var(--gold), var(--green-700)); }
.loans-page-hero > div { position: relative; z-index: 1; }
.loans-page-hero .eyebrow { color: var(--gold); }
.loans-page-hero h1 { color: #fff; font-size: clamp(1.4rem, 2.6vw, 1.85rem); }
.loans-page-hero .subtitle { color: rgba(234,246,243,0.72); }
.loans-page-hero > .btn { position: relative; z-index: 1; }
.loan-feature-card { position: relative; overflow: hidden; border-top: 3px solid var(--gold); border-radius: calc(var(--radius) + 5px); box-shadow: 0 16px 36px rgba(0,47,42,0.08); }
.loan-card-kicker { margin: 0 0 0.15rem; color: var(--green-700); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.loans-table-card { border-radius: calc(var(--radius) + 5px); box-shadow: 0 12px 30px rgba(0,47,42,0.06); }
.loans-overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.loans-overview-item { position: relative; overflow: hidden; min-height: 6.5rem; padding: 1rem 1.1rem; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); box-shadow: 0 8px 24px rgba(0,47,42,.045); }
.loans-overview-item::after { position: absolute; right: -1.5rem; bottom: -2.2rem; width: 5.5rem; height: 5.5rem; border: 1px solid rgba(10,94,85,.1); border-radius: 50%; content: ""; }
.loans-overview-item--highlight { border-color: transparent; background: linear-gradient(145deg, var(--green-900), var(--green-800)); }
.loans-overview-label { display: block; color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.loans-overview-item strong { display: block; margin-top: .45rem; color: var(--green-900); font-size: 1.12rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.loans-overview-item small { display: block; margin-top: .35rem; color: var(--muted); font-size: .76rem; }
.loans-overview-item--highlight .loans-overview-label, .loans-overview-item--highlight small { color: rgba(255,255,255,.68); }
.loans-overview-item--highlight strong { color: var(--gold); }
.loan-feature-title { margin: 0; color: var(--green-900); font-size: 1.2rem; }
.loan-feature-progress-head { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.05rem; color: var(--muted); font-size: .76rem; }
.loan-feature-progress-head strong { color: var(--green-900); }
.loans-table-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: .35rem 0 .7rem; }
.loans-table-heading h2 { margin: 0; color: var(--green-900); font-size: 1.2rem; }
.loans-table-heading > span { color: var(--muted); font-size: .78rem; }
.btn-icon { display: inline-grid; place-items: center; min-width: 1em; font-size: 1.05em; line-height: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[data-theme="dark"] .loans-page-hero { border-color: rgba(245,196,81,0.2); }
[data-theme="dark"] .loan-card-kicker { color: var(--gold); }
[data-theme="dark"] .loans-table-card { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .loans-overview-item { box-shadow: none; }
[data-theme="dark"] .loans-overview-item strong, [data-theme="dark"] .loan-feature-title, [data-theme="dark"] .loan-feature-progress-head strong, [data-theme="dark"] .loans-table-heading h2 { color: var(--text); }

.cust-panel { border-radius: calc(var(--radius) + 4px); }
.cust-panel-head {
  display: flex; justify-content: space-between; align-items: center; gap: 0.75rem;
  margin-bottom: 0.9rem; padding-bottom: 0.7rem; border-bottom: 1px solid var(--border, var(--line));
}
.cust-panel-head h3 { margin: 0; padding-left: 0.8rem; position: relative; font-size: 1.02rem; }
.cust-panel-head h3::before {
  content: ""; position: absolute; left: 0; top: 0.1em; bottom: 0.15em; width: 3px; border-radius: 999px;
  background: linear-gradient(180deg, var(--gold), var(--green-700));
}
.cust-item { display: flex; justify-content: space-between; gap: 0.75rem; align-items: flex-start; padding: 0.6rem 0; border-bottom: 1px dashed var(--border, var(--line)); }
.cust-item:last-child { border-bottom: 0; padding-bottom: 0; }
.cust-item:first-of-type { padding-top: 0; }

/* ---------- Application detail ---------- */
.application-detail-hero {
  position: relative; overflow: hidden; padding: 1.35rem 1.45rem; margin-bottom: 1.25rem;
  border: 1px solid rgba(245,196,81,0.22); border-radius: calc(var(--radius) + 8px);
  background: radial-gradient(520px 180px at 100% 0%, rgba(245,196,81,0.2), transparent 58%), linear-gradient(140deg, var(--green-900), var(--green-800));
  box-shadow: var(--shadow-lg); color: #EAF6F3;
}
.application-detail-hero::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(180deg, var(--gold), var(--green-700)); }
.application-detail-hero > div:first-child { position: relative; z-index: 1; }
.application-detail-hero .eyebrow { color: var(--gold); }
.application-detail-hero .eyebrow .mono { margin-left: 0.35rem; color: rgba(255,255,255,0.72); }
.application-detail-hero h1 { color: #fff; font-size: clamp(1.35rem, 2.6vw, 1.85rem); }
.application-detail-hero .subtitle { color: rgba(234,246,243,0.72); }
.application-detail-grid { gap: 1rem; }
.detail-card { border-radius: calc(var(--radius) + 5px); box-shadow: 0 12px 30px rgba(0,47,42,0.06); }
.detail-summary-card { border-top: 3px solid var(--gold); }
.detail-timeline-card { position: sticky; top: 88px; }
[data-theme="dark"] .application-detail-hero { border-color: rgba(245,196,81,0.2); }
[data-theme="dark"] .detail-card { box-shadow: none; }

/* ---------- Apply wizard ---------- */
.apply-hero {
  position: relative; overflow: hidden;
  border-radius: calc(var(--radius) + 8px);
  padding: 1.5rem 1.6rem 1.35rem;
  margin-bottom: 1.25rem;
  background:
    radial-gradient(560px 160px at 0% 0%, rgba(245,196,81,0.18), transparent 55%),
    linear-gradient(140deg, var(--green-900), var(--green-800));
  color: #EAF6F3;
  border: 1px solid rgba(245,196,81,0.22);
  box-shadow: var(--shadow-lg);
}
.apply-hero::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--gold), var(--green-700));
}
.apply-hero .eyebrow { color: var(--gold); margin: 0 0 0.3rem; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.hero-step-mark {
  display: inline-grid; place-items: center; width: 25px; height: 25px; margin-right: 0.35rem;
  border: 1px solid rgba(245,196,81,0.4); border-radius: 8px; background: rgba(245,196,81,0.12);
  color: var(--gold); font-size: 0.68rem; letter-spacing: 0;
}
.apply-hero h1 { color: #fff; margin: 0 0 0.3rem; font-size: clamp(1.4rem, 2.6vw, 1.8rem); letter-spacing: -0.02em; }
.apply-hero p { color: rgba(234,246,243,0.78); margin: 0; }
.apply-hero-copy { position: relative; z-index: 1; }
.apply-hero-meta { position: relative; z-index: 1; display: flex; gap: 0.55rem; margin-top: 1rem; }
.apply-hero-meta span { display: grid; gap: 0.12rem; min-width: 8.5rem; padding: 0.55rem 0.7rem; border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; background: rgba(255,255,255,0.06); }
.apply-hero-meta strong { color: #fff; font-size: 0.8rem; }
.apply-hero-meta small { color: rgba(234,246,243,0.62); font-size: 0.68rem; }
.apply-hero-meta--compact { margin-top: 0; flex-wrap: wrap; justify-content: flex-end; }
.wizard-track { margin-bottom: 1.25rem; }
.wizard-progress { height: 8px; border-radius: 999px; background: var(--green-100); overflow: hidden; margin-bottom: 0.85rem; }
.wizard-progress > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--green-700), var(--gold)); transition: width 0.4s ease; }
.wizard-steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 0.5rem;
  list-style: none; padding: 0.85rem; margin: 0;
  background: var(--surface, #fff); border: 1px solid var(--border, var(--line));
  border-radius: calc(var(--radius) + 4px); box-shadow: var(--shadow);
}
.wizard-steps li {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  padding: 0.7rem 0.4rem; border-radius: 12px; text-align: center;
  font-size: 0.76rem; font-weight: 800; color: var(--muted); background: transparent;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.wizard-steps li .idx {
  width: 32px; height: 32px; border-radius: 11px; display: grid; place-items: center;
  background: var(--cream); border: 1.5px solid var(--line); font-size: 0.8rem; color: var(--muted);
}
.wizard-steps li.is-done { color: var(--green-800); }
.wizard-steps li.is-done .idx { background: var(--green-100); border-color: var(--green-700); color: var(--green-900); }
.wizard-steps li.is-current { color: var(--green-900); background: rgba(245,196,81,0.12); box-shadow: inset 0 0 0 1.5px rgba(245,196,81,0.5); }
.wizard-steps li.is-current .idx { background: linear-gradient(145deg, var(--green-900), var(--green-800)); border-color: transparent; color: var(--gold); }
.wizard-main-card { padding: 1.35rem 1.45rem; }
.wizard-form-header {
  display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 1.25rem; padding-bottom: 1rem;
  border-bottom: 1px solid var(--border, var(--line));
}
.wizard-form-icon {
  display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(145deg, var(--green-900), var(--green-800)); color: var(--gold);
  font-size: 0.75rem; font-weight: 800; letter-spacing: 0.04em; box-shadow: 0 8px 18px rgba(0,47,42,0.14);
}
.wizard-form-header h2 { margin: 0; color: var(--green-900); font-size: 1.15rem; }
.wizard-form-header p { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.86rem; line-height: 1.45; }
.wizard-main-card .form-grid { column-gap: 0.9rem; row-gap: 0.1rem; }
.wizard-main-card .field { margin-bottom: 0.8rem; }
.wizard-main-card .field label { font-size: 0.82rem; }
.wizard-main-card input, .wizard-main-card select, .wizard-main-card textarea { min-height: 44px; }
.estimate-card {
  position: relative; overflow: hidden;
  border-radius: calc(var(--radius) + 6px);
  padding: 1.35rem 1.3rem;
  background:
    radial-gradient(380px 140px at 100% 0%, rgba(245,196,81,0.2), transparent 55%),
    linear-gradient(155deg, var(--green-900), var(--green-800));
  color: #EAF6F3; border: 1px solid rgba(245,196,81,0.22); box-shadow: var(--shadow-lg);
}
.estimate-card::before {
  content: ""; position: absolute; left: 1.3rem; right: 1.3rem; top: 0; height: 3px;
  border-radius: 0 0 999px 999px; background: linear-gradient(90deg, var(--green-700), var(--gold));
}
.estimate-card h3 { color: #fff; margin-top: 0; padding-left: 0.8rem; position: relative; }
.estimate-card h3::before {
  content: ""; position: absolute; left: 0; top: 0.1em; bottom: 0.15em; width: 3px; border-radius: 999px; background: var(--gold);
}
.estimate-card .estimate-row { border-bottom: 1px dashed rgba(255,255,255,0.14); }
.estimate-card .estimate-row span { color: rgba(255,255,255,0.75); }
.estimate-card .estimate-row strong { color: #fff; font-variant-numeric: tabular-nums; }
.estimate-card .estimate-total strong { color: var(--gold); }
.estimate-card .muted { color: rgba(255,255,255,0.65) !important; }
.apply-timeline { list-style: decimal; margin: 0; padding: 0.8rem 0.9rem 0.8rem 2rem; border-radius: 14px; background: var(--cream); border: 1px solid var(--line); display: grid; gap: 0.5rem; font-size: 0.9rem; color: var(--ink); }
.apply-timeline li::marker { color: var(--green-700); font-weight: 800; }

/* Dark mode — customer portal */
[data-theme="dark"] .customer-sidebar { background: #101E1C; border-right-color: var(--border); }
[data-theme="dark"] .customer-sidebar .side-link { color: var(--text); }
[data-theme="dark"] .customer-sidebar .side-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
[data-theme="dark"] .customer-sidebar .side-group-label { color: var(--gold); }
[data-theme="dark"] .cust-footnote { background: rgba(255,255,255,0.03); border-color: var(--border); }
[data-theme="dark"] .cust-sidebar-context { background: rgba(255,255,255,0.03); border-color: var(--border); }
[data-theme="dark"] .cust-sidebar-context strong { color: #F2F8F6; }
[data-theme="dark"] .cust-footnote strong { color: #F2F8F6; }
[data-theme="dark"] .cust-kpi { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .cust-kpi .value { color: #F2F8F6; }
[data-theme="dark"] .cust-loan-card { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .cust-progress { background: rgba(255,255,255,0.08); }
[data-theme="dark"] .wizard-steps { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .wizard-form-header { border-color: var(--border); }
[data-theme="dark"] .wizard-form-header h2 { color: #F2F8F6; }
[data-theme="dark"] .wizard-steps li.is-current { color: var(--gold-soft); }
[data-theme="dark"] .wizard-steps li .idx { background: rgba(255,255,255,0.05); border-color: var(--border); }
[data-theme="dark"] .wizard-progress { background: rgba(255,255,255,0.08); }
[data-theme="dark"] .apply-timeline { background: rgba(255,255,255,0.03); border-color: var(--border); color: var(--text); }
[data-theme="dark"] .trust-item strong { color: #F2F8F6; }

@media (max-width: 1024px) {
  .cust-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wizard-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .cust-kpis { grid-template-columns: 1fr; }
  .cust-hero-grid { flex-direction: column; align-items: flex-start; }
  .cust-limit { text-align: left; }
  .wizard-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wizard-main-card { padding: 1.05rem; }
  .wizard-form-header { margin-bottom: 1rem; padding-bottom: 0.85rem; }
  .apply-hero-meta, .apply-hero-meta--compact { justify-content: flex-start; }
  .apply-hero-meta span { min-width: 0; flex: 1 1 8rem; }
  .cust-hero-actions .btn, .apply-hero + * .btn { width: 100%; }
}

/* ---------- Global type and spacing rhythm ---------- */
:root {
  --space-section: clamp(2.25rem, 4vw, 3.75rem);
  --space-card: 1.15rem;
  --space-grid: 1rem;
}

body { line-height: 1.5; }
h1, h2, h3, h4 { letter-spacing: 0; }
h1 { font-size: clamp(1.75rem, 3.4vw, 2.45rem); }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
h3 { font-size: 1.08rem; }
h4 { font-size: .92rem; }
p { margin-bottom: .8rem; }
.container { width: min(1160px, calc(100% - 2.25rem)); }
.grid { gap: var(--space-grid); }
.card { padding: var(--space-card); }
.stack { gap: .8rem; }
.section { padding: var(--space-section) 0; }
.section-head { margin-bottom: 1.45rem; }
.app-main-inner { margin-top: 1.25rem; margin-bottom: 2.25rem; }
.page-header { gap: .8rem; margin-bottom: 1rem; }
.page-header h1 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); }
.page-header .subtitle { font-size: .9rem; }
.hero { padding: clamp(2.75rem, 6vw, 4.75rem) 0; }
.hero h1, .page-hero h1 { font-size: clamp(1.8rem, 3.8vw, 2.7rem); letter-spacing: 0; }
.page-hero { padding: clamp(2rem, 4vw, 3rem) 0; }
.loan-page-header h1, .payment-hero h1, .application-detail-hero h1, .apply-hero h1, .cust-hero h1, .settings-hero-copy h1 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); letter-spacing: 0; }
.table-wrap { border-radius: 12px; }

/* ---------- Premium admin detail surfaces ---------- */
.admin-shell .admin-application-hero,
.admin-shell .admin-loan-hero {
  position: relative;
  overflow: hidden;
  padding: 1.35rem 1.45rem;
  border: 1px solid rgba(245,196,81,.24);
  border-radius: 18px;
  background: radial-gradient(560px 190px at 100% 0%, rgba(245,196,81,.2), transparent 58%), linear-gradient(140deg, var(--green-900), var(--green-800));
  box-shadow: 0 18px 42px rgba(0,47,42,.14);
}
.admin-shell .admin-application-hero::before,
.admin-shell .admin-loan-hero::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(180deg, var(--gold), var(--green-700)); }
.admin-shell .admin-application-hero > *,
.admin-shell .admin-loan-hero > * { position: relative; z-index: 1; }
.admin-shell .admin-application-hero h1,
.admin-shell .admin-loan-hero h1 { color: #fff; }
.admin-shell .admin-application-hero .eyebrow,
.admin-shell .admin-loan-hero .eyebrow { color: var(--gold); }
.admin-shell .admin-application-hero .subtitle,
.admin-shell .admin-loan-hero .subtitle { color: rgba(234,246,243,.74); }
.admin-shell .admin-application-hero .form-actions,
.admin-shell .admin-loan-hero .form-actions { flex-wrap: wrap; }
.admin-shell .admin-application-hero .btn-ghost,
.admin-shell .admin-loan-hero .btn-ghost { color: rgba(255,255,255,.9); border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.06); }
.admin-shell .admin-application-hero .btn-ghost:hover,
.admin-shell .admin-loan-hero .btn-ghost:hover { color: var(--green-900); background: #fff; }
.admin-shell .admin-application-grid,
.admin-shell .admin-loan-grid { gap: 1rem; }
.admin-shell .admin-detail-card,
.admin-shell .admin-loan-summary,
.admin-shell .admin-loan-history,
.admin-shell .admin-loan-schedule { border-radius: 16px; }
.admin-shell .admin-summary-card,
.admin-shell .admin-loan-summary { border-top: 3px solid var(--gold); }
.admin-shell .admin-decision-card,
.admin-shell .admin-loan-action { border: 1px solid rgba(245,196,81,.42); background: linear-gradient(180deg, #fff, #fbfdfc); box-shadow: 0 14px 34px rgba(0,47,42,.08); }
.admin-shell .admin-decision-card .btn,
.admin-shell .admin-loan-action .btn { min-height: 2.7rem; }
.admin-shell .admin-decision-card form .btn,
.admin-shell .admin-loan-action form .btn { width: 100%; }
.admin-shell .admin-loan-progress { padding: 1rem 1.2rem; border-top: 3px solid var(--gold); border-radius: 15px; box-shadow: 0 12px 28px rgba(0,47,42,.07); }
.admin-shell .admin-loan-progress .progress { height: 10px; }
.admin-shell .admin-loan-history .table-wrap,
.admin-shell .admin-loan-schedule .table-wrap { border-color: rgba(0,47,42,.08); }

@media (max-width: 700px) {
  .admin-shell .admin-application-hero,
  .admin-shell .admin-loan-hero { padding: 1.15rem; }
  .admin-shell .admin-application-hero .form-actions,
  .admin-shell .admin-loan-hero .form-actions { width: 100%; align-items: stretch; }
  .admin-shell .admin-application-hero .form-actions .btn,
  .admin-shell .admin-loan-hero .form-actions .btn { flex: 1 1 auto; }
  .admin-shell .admin-decision-card,
  .admin-shell .admin-loan-action { box-shadow: 0 10px 24px rgba(0,47,42,.07); }
}

@media (max-width: 640px) {
  .container { width: min(100% - 1.5rem, 1160px); }
  .app-main-inner { margin-top: 1rem; margin-bottom: 1.75rem; }
  .card { padding: 1rem; }
  .grid { gap: .85rem; }
  .section { padding: 2.5rem 0; }
  .hero { padding: 3rem 0; }
  .hero h1, .page-hero h1 { font-size: clamp(1.7rem, 8vw, 2.2rem); }
  .page-header { margin-bottom: .85rem; }
  .page-header h1 { font-size: 1.45rem; }
}
