/* ==========================================================================
   Clear Trust — design system
   Brand colours (--brand-*) are generated from Site settings and injected in
   base.html; the values below are fallbacks.
   ========================================================================== */

:root {
  --brand-50: #f0f8fd; --brand-100: #e0f0fa; --brand-200: #bfe0f3; --brand-300: #8bc6e9;
  --brand-400: #57a9dd; --brand-500: #2390d0; --brand-600: #0284c7; --brand-700: #036ca5;
  --brand-800: #045684; --brand-900: #05436a; --brand-950: #052e4a;

  --slate-50: #f8fafc; --slate-100: #f1f5f9; --slate-200: #e2e8f0; --slate-300: #cbd5e1;
  --slate-400: #94a3b8; --slate-500: #64748b; --slate-600: #475569; --slate-700: #334155;
  --slate-800: #1e293b; --slate-900: #0f172a; --slate-950: #020617;

  --success: #059669; --success-bg: #ecfdf5; --success-text: #047857;
  --warning: #d97706; --warning-bg: #fffbeb; --warning-text: #b45309;
  --danger: #dc2626;  --danger-bg: #fef2f2;  --danger-text: #b91c1c;
  --info: #2563eb;    --info-bg: #eff6ff;    --info-text: #1d4ed8;
  --teal: #0d9488;    --teal-bg: #f0fdfa;    --teal-text: #0f766e;

  --bg: #ffffff;
  --surface: #ffffff;
  --text: var(--slate-900);
  --text-muted: var(--slate-500);
  --border: var(--slate-200);

  --radius-sm: 8px; --radius: 12px; --radius-lg: 16px; --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgb(15 23 42 / .06);
  --shadow: 0 1px 3px rgb(15 23 42 / .08), 0 4px 12px rgb(15 23 42 / .05);
  --shadow-lg: 0 10px 30px rgb(15 23 42 / .10), 0 4px 10px rgb(15 23 42 / .05);
  --shadow-xl: 0 25px 50px -12px rgb(15 23 42 / .25);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 72px;
}

/* Reset ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--text);
  background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; color: var(--slate-900); }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: clamp(1.75rem, 3vw, 2.4rem); letter-spacing: -.03em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--brand-300); outline-offset: 2px; border-radius: 6px; }
.icon { flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Layout helpers ------------------------------------------------------------ */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 820px; }
.grid { display: grid; gap: 24px; }
.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)); }
.flex { display: flex; align-items: center; gap: 12px; }
.flex-wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 24px; }
.muted { color: var(--text-muted); }
.small { font-size: .875rem; }
.xsmall { font-size: .78rem; }
.strong { font-weight: 600; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .9em; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt-0 { margin-top: 0 !important; } .mb-0 { margin-bottom: 0 !important; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.text-gradient {
  background: linear-gradient(120deg, var(--brand-500), var(--brand-700) 60%, var(--teal));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.text-success { color: var(--success-text); } .text-danger { color: var(--danger-text); }
.text-warning { color: var(--warning-text); } .text-brand { color: var(--brand-700); }

/* Buttons ------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius); border: 1px solid transparent;
  font-weight: 600; font-size: .95rem; line-height: 1.2; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s, box-shadow .15s, transform .15s;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand-600); color: #fff; box-shadow: 0 4px 14px -4px var(--brand-500); }
.btn-primary:hover { background: var(--brand-700); color: #fff; }
.btn-secondary { background: #fff; color: var(--brand-700); border-color: var(--brand-200); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: var(--brand-50); color: var(--brand-800); }
.btn-outline { background: #fff; color: var(--slate-700); border-color: var(--slate-300); }
.btn-outline:hover { background: var(--slate-50); color: var(--slate-900); }
.btn-ghost { background: transparent; color: var(--slate-600); }
.btn-ghost:hover { background: var(--slate-100); color: var(--slate-900); }
.btn-dark { background: var(--slate-900); color: #fff; }
.btn-dark:hover { background: var(--slate-800); color: #fff; }
.btn-white { background: #fff; color: var(--brand-800); }
.btn-white:hover { background: var(--brand-50); color: var(--brand-900); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: var(--success-text); color: #fff; }
.btn-danger { background: #fff; color: var(--danger-text); border-color: #fecaca; }
.btn-danger:hover { background: var(--danger-bg); color: var(--danger-text); }
.btn-sm { padding: 7px 12px; font-size: .85rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 15px 28px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* Badges -------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: .76rem; font-weight: 600; line-height: 1.5; white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-success { background: var(--success-bg); color: var(--success-text); }
.badge-warning { background: var(--warning-bg); color: var(--warning-text); }
.badge-danger { background: var(--danger-bg); color: var(--danger-text); }
.badge-info { background: var(--info-bg); color: var(--info-text); }
.badge-teal { background: var(--teal-bg); color: var(--teal-text); }
.badge-brand { background: var(--brand-50); color: var(--brand-700); }
.badge-muted { background: var(--slate-100); color: var(--slate-600); }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-100);
  font-size: .82rem; font-weight: 600;
}

/* Alerts / flash messages ---------------------------------------------------- */
.messages { display: grid; gap: 10px; margin-bottom: 20px; }
.alert {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: var(--radius);
  border: 1px solid; font-size: .93rem;
}
.alert .icon { margin-top: 2px; }
.alert-close { margin-left: auto; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; opacity: .6; }
.alert-close:hover { opacity: 1; }
.alert-success { background: var(--success-bg); border-color: #a7f3d0; color: var(--success-text); }
.alert-error { background: var(--danger-bg); border-color: #fecaca; color: var(--danger-text); }
.alert-warning { background: var(--warning-bg); border-color: #fde68a; color: var(--warning-text); }
.alert-info { background: var(--info-bg); border-color: #bfdbfe; color: var(--info-text); }

/* Cards ------------------------------------------------------------------------ */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-body { padding: 24px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 24px; border-bottom: 1px solid var(--border);
}
.card-head h2, .card-head h3 { font-size: 1.02rem; margin: 0; letter-spacing: -.01em; }
.card-foot { padding: 14px 24px; border-top: 1px solid var(--border); background: var(--slate-50); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.card-link { display: block; color: inherit; transition: border-color .2s, box-shadow .2s, transform .2s; }
.card-link:hover { color: inherit; border-color: var(--brand-200); box-shadow: var(--shadow-lg); transform: translateY(-2px); }

/* Forms ------------------------------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-check { flex-direction: row; align-items: flex-start; gap: 10px; }
.field-check .label { font-weight: 500; }
.label { font-weight: 600; font-size: .88rem; color: var(--slate-700); }
.required-mark { color: var(--danger); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--slate-300); border-radius: 10px;
  background: #fff; color: var(--text); font: inherit; font-size: .95rem; line-height: 1.4;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { resize: vertical; min-height: 90px; }
.select {
  appearance: none; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 4px var(--brand-100); }
.input[type="color"] { padding: 4px; height: 46px; max-width: 120px; cursor: pointer; }
.checkbox { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--brand-600); flex-shrink: 0; }
.file-input { font-size: .9rem; color: var(--slate-600); }
.file-input::file-selector-button {
  margin-right: 12px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--slate-300);
  background: var(--slate-50); font-weight: 600; cursor: pointer; color: var(--slate-700);
}
.help { font-size: .8rem; color: var(--text-muted); }
.errorlist { list-style: none; margin: 0; padding: 0; color: var(--danger-text); font-size: .83rem; font-weight: 500; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: #f87171; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 24px; }
.form-section + .form-section { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--border); }
.form-section-title { font-size: 1rem; margin-bottom: 4px; }
.form-section-intro { color: var(--text-muted); font-size: .88rem; margin-bottom: 18px; }
.hp-field { position: absolute !important; left: -9999px !important; }

/* Tables ------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th {
  text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600;
  color: var(--slate-500); background: var(--slate-50); padding: 11px 16px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td { padding: 14px 16px; border-bottom: 1px solid var(--slate-100); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--slate-50); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table a.row-link { color: var(--slate-900); font-weight: 600; }
.table a.row-link:hover { color: var(--brand-700); }

/* Public site: top bar & header ----------------------------------------------- */
.announcement { background: var(--brand-700); color: #fff; text-align: center; font-size: .88rem; padding: 9px 20px; font-weight: 500; }
.topbar { background: var(--slate-900); color: var(--slate-300); font-size: .82rem; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.topbar a { color: var(--slate-200); }
.topbar a:hover { color: #fff; }
.topbar-info, .topbar-links { display: flex; align-items: center; gap: 20px; }
.topbar-info span { display: inline-flex; align-items: center; gap: 6px; }

.site-header {
  position: sticky; top: 0; z-index: 50; background: rgb(255 255 255 / .86);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgb(226 232 240 / .8); box-shadow: 0 6px 20px -12px rgb(2 132 199 / .18);
}
.site-header .container { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--slate-900); font-weight: 800; letter-spacing: -.03em; font-size: 1.15rem; }
.logo:hover { color: var(--slate-900); }
.logo img { max-height: 40px; width: auto; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-800)); box-shadow: 0 6px 16px -6px var(--brand-600);
}
.logo-text small { display: block; font-size: .64rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--slate-500); margin-top: -2px; }
.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.main-nav > a, .nav-dropdown > button {
  display: inline-flex; align-items: center; gap: 4px; padding: 9px 14px; border-radius: 10px;
  color: var(--slate-700); font-weight: 500; font-size: .94rem; background: none; border: 0; cursor: pointer;
}
.main-nav > a:hover, .nav-dropdown > button:hover, .main-nav > a.is-active { color: var(--brand-700); background: var(--brand-50); }
.nav-dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 270px; padding: 8px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xl);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .18s ease;
}
.nav-dropdown:hover .dropdown-menu, .nav-dropdown:focus-within .dropdown-menu, .nav-dropdown.open .dropdown-menu {
  opacity: 1; visibility: visible; transform: none;
}
.dropdown-menu a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--slate-700); font-size: .92rem; }
.dropdown-menu a:hover { background: var(--brand-50); color: var(--brand-700); }
.dropdown-menu .dd-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle { display: none; background: none; border: 0; padding: 8px; border-radius: 10px; color: var(--slate-800); cursor: pointer; }
.menu-toggle:hover { background: var(--slate-100); }
body.no-scroll { overflow: hidden; }

/* Mobile navigation: a full-screen panel, shown below 960px */
.mobile-nav { display: none; }
.mobile-nav-head {
  flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: var(--header-h); padding: 0 20px; border-bottom: 1px solid var(--border);
}
.mobile-nav-body {
  flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 8px 20px calc(32px + env(safe-area-inset-bottom));
}
.mobile-nav-links a {
  display: flex; align-items: center; gap: 14px; padding: 15px 4px; border-bottom: 1px solid var(--slate-100);
  color: var(--slate-800); font-weight: 600; font-size: 1.02rem;
}
.mobile-nav-links a .icon { color: var(--slate-400); }
.mobile-nav-links a:hover, .mobile-nav-links a.is-active { color: var(--brand-700); }
.mobile-nav-links a:hover .icon, .mobile-nav-links a.is-active .icon { color: var(--brand-600); }
.mobile-nav-label { margin: 26px 4px 2px; font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--slate-400); }
.mobile-nav-actions { display: grid; gap: 10px; margin-top: 26px; }
.mobile-nav-contact { display: grid; gap: 12px; margin-top: 24px; padding: 18px; border-radius: var(--radius); background: var(--slate-50); font-size: .9rem; color: var(--slate-600); }
.mobile-nav-contact a, .mobile-nav-contact span { display: flex; align-items: center; gap: 10px; color: var(--slate-600); overflow-wrap: anywhere; }

/* Hero ------------------------------------------------------------------------------ */
.hero {
  position: relative; overflow: hidden; padding: 84px 0 96px;
  background: radial-gradient(1200px 500px at 85% -10%, var(--brand-100), transparent 60%),
              linear-gradient(180deg, #fff 0%, var(--brand-50) 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--slate-200) 1px, transparent 1px), linear-gradient(90deg, var(--slate-200) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(ellipse at 30% 40%, #000 0%, transparent 65%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none; }
.blob-1 { width: 320px; height: 320px; background: var(--brand-200); opacity: .5; top: -80px; left: -80px; }
.blob-2 { width: 260px; height: 260px; background: #99f6e4; opacity: .35; bottom: -60px; right: 30%; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.hero h1 { margin: 20px 0 20px; }
.hero-lead { font-size: 1.15rem; color: var(--slate-600); max-width: 560px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 30px; color: var(--slate-600); font-size: .88rem; font-weight: 500; }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; }
.hero-trust .icon { color: var(--success); }
.hero-image { border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); width: 100%; object-fit: cover; aspect-ratio: 4/3.4; }

/* Hero tracker preview card */
.tracker {
  position: relative; background: rgb(255 255 255 / .9); backdrop-filter: blur(10px);
  border: 1px solid rgb(255 255 255 / .9); border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); padding: 26px;
}
.tracker-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.tracker-ref { font-size: .78rem; font-weight: 600; color: var(--slate-500); letter-spacing: .04em; }
.tracker-title { font-weight: 700; font-size: 1.02rem; margin-top: 2px; }
.tracker-amount { font-size: 2.3rem; font-weight: 800; letter-spacing: -.04em; margin: 4px 0 2px; }
.tracker-floating {
  position: absolute; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); padding: 12px 16px;
  display: flex; align-items: center; gap: 12px; font-size: .84rem; border: 1px solid var(--slate-100);
}
.tracker-floating .fi { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; }
.tracker-floating.one { left: -40px; bottom: -56px; animation: float 6s ease-in-out infinite; }
.tracker-floating.two { right: -28px; top: -52px; animation: float 7s ease-in-out infinite reverse; }
@keyframes float { 50% { transform: translateY(-8px); } }

/* Progress bar */
.progress { height: 8px; border-radius: 999px; background: var(--slate-100); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-500), var(--teal)); }
.progress-lg { height: 12px; }

/* Stepper (refund stage tracker) */
.stepper { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; list-style: none; padding: 0; margin: 0; counter-reset: step; }
.stepper li { position: relative; text-align: center; font-size: .78rem; font-weight: 600; color: var(--slate-400); padding-top: 40px; }
.stepper li::before {
  content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 3px; background: var(--slate-200); z-index: 0;
}
.stepper li:first-child::before { display: none; }
.stepper .dot {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 1; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; border: 3px solid var(--slate-200); color: var(--slate-400);
}
.stepper li.done { color: var(--slate-700); }
.stepper li.done::before, .stepper li.current::before { background: var(--brand-500); }
.stepper li.done .dot { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.stepper li.current { color: var(--brand-700); }
.stepper li.current .dot { border-color: var(--brand-600); color: var(--brand-600); box-shadow: 0 0 0 5px var(--brand-100); }
.stepper.compact li { padding-top: 30px; font-size: .68rem; }
.stepper.compact .dot { width: 22px; height: 22px; border-width: 2px; }
.stepper.compact li::before { top: 10px; height: 2px; }

/* Stats --------------------------------------------------------------------------- */
.stats-band { position: relative; margin-top: -48px; z-index: 2; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg); border: 1px solid var(--slate-100); overflow: hidden;
}
.stat { padding: 28px 24px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--slate-100); }
.stat-value { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; color: var(--brand-700); }
.stat-label { color: var(--slate-500); font-size: .9rem; font-weight: 500; }

/* Sections ----------------------------------------------------------------------- */
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.section-alt { background: var(--slate-50); }
.section-head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.section-head p { color: var(--slate-600); font-size: 1.08rem; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-600); margin-bottom: 12px; }

.feature-card { padding: 30px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--border); transition: all .25s ease; position: relative; overflow: hidden; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--brand-200); }
.feature-card h3 { margin: 18px 0 8px; }
.feature-card p { color: var(--slate-600); margin: 0; font-size: .95rem; }
.icon-box {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-50), var(--brand-100)); color: var(--brand-600);
  border: 1px solid var(--brand-100);
}

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; padding: 28px; background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.step-num {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
  background: var(--brand-600); color: #fff; margin-bottom: 18px; box-shadow: 0 0 0 6px var(--brand-50);
}
.step p { color: var(--slate-600); font-size: .94rem; margin: 0; }

.dark-band {
  position: relative; overflow: hidden; color: var(--slate-300);
  background: radial-gradient(900px 400px at 10% 0%, rgb(255 255 255 / .06), transparent),
              linear-gradient(135deg, var(--slate-900) 0%, var(--brand-950) 55%, var(--brand-900) 100%);
}
.dark-band h2, .dark-band h3 { color: #fff; }
.dark-band .section-head p { color: var(--slate-300); }
.dark-band .eyebrow { color: var(--brand-300); }
.promise-card { padding: 28px; border-radius: var(--radius-lg); background: rgb(255 255 255 / .05); border: 1px solid rgb(255 255 255 / .1); backdrop-filter: blur(6px); }
.promise-card .icon-box { background: rgb(255 255 255 / .08); border-color: rgb(255 255 255 / .12); color: var(--brand-300); }
.promise-card h3 { margin: 18px 0 8px; }
.promise-card p { margin: 0; font-size: .95rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.check-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 14px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--slate-700); }
.check-list .icon { color: var(--success); margin-top: 3px; }

.testimonial { padding: 30px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); display: flex; flex-direction: column; }
.stars { display: flex; gap: 3px; color: #f59e0b; margin-bottom: 16px; }
.stars .icon { fill: currentColor; }
.testimonial blockquote { margin: 0 0 22px; color: var(--slate-700); flex: 1; }
.person { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .88rem;
  background: linear-gradient(135deg, var(--brand-100), var(--brand-200)); color: var(--brand-800); flex-shrink: 0;
}
.avatar-sm { width: 32px; height: 32px; font-size: .74rem; }
.person-name { font-weight: 700; font-size: .95rem; }
.person-role { color: var(--slate-500); font-size: .84rem; }

.faq-list { display: grid; gap: 12px; max-width: 820px; margin: 0 auto; }
.faq-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); transition: box-shadow .2s, border-color .2s; }
.faq-item[open] { border-color: var(--brand-200); box-shadow: var(--shadow); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 20px 24px; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { transition: transform .2s; color: var(--brand-600); }
.faq-item[open] summary .icon { transform: rotate(180deg); }
.faq-answer { padding: 0 24px 22px; color: var(--slate-600); }
.faq-answer p:last-child { margin-bottom: 0; }

.cta-band {
  position: relative; overflow: hidden; border-radius: var(--radius-xl); padding: 56px; color: #fff;
  background: linear-gradient(120deg, var(--brand-700), var(--brand-500)); box-shadow: var(--shadow-xl);
  display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center;
}
.cta-band::after { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: rgb(255 255 255 / .08); right: -100px; top: -160px; }
.cta-band h2 { color: #fff; margin-bottom: 10px; }
.cta-band p { color: var(--brand-50); margin: 0; font-size: 1.05rem; max-width: 620px; }
.cta-band .btn { position: relative; z-index: 1; }

.page-hero { padding: 72px 0 56px; background: linear-gradient(180deg, var(--brand-50), #fff); border-bottom: 1px solid var(--slate-100); }
.page-hero p { color: var(--slate-600); font-size: 1.1rem; max-width: 680px; margin: 0; }
.prose { color: var(--slate-700); font-size: 1.02rem; }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.rounded-img { border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); width: 100%; object-fit: cover; }

.contact-card { display: flex; gap: 16px; align-items: flex-start; padding: 20px 0; border-bottom: 1px solid var(--slate-100); }
.contact-card:last-child { border-bottom: 0; }
.contact-card .icon-box { width: 44px; height: 44px; border-radius: 12px; }

/* Security notice */
.security-note {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius);
  background: var(--warning-bg); border: 1px solid #fde68a; color: #92400e; font-size: .88rem;
}
.security-note .icon { color: var(--warning); margin-top: 2px; }
.security-note strong { color: #78350f; }

/* Footer ---------------------------------------------------------------------------- */
.site-footer { background: var(--slate-950); color: var(--slate-400); padding: 72px 0 28px; font-size: .92rem; }
.site-footer h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 18px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; }
.site-footer .logo { color: #fff; margin-bottom: 18px; }
.site-footer .logo-text small { color: var(--slate-400); }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a { color: var(--slate-400); }
.site-footer a:hover { color: #fff; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact .icon { color: var(--brand-400); margin-top: 3px; }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: rgb(255 255 255 / .06); font-size: .78rem; font-weight: 700; }
.socials a:hover { background: var(--brand-600); }
.footer-notice { margin-top: 48px; padding: 18px 20px; border-radius: var(--radius); background: rgb(255 255 255 / .04); border: 1px solid rgb(255 255 255 / .08); display: flex; gap: 14px; align-items: flex-start; }
.footer-notice .icon { color: #fbbf24; margin-top: 2px; }
.footer-bottom { margin-top: 32px; padding-top: 24px; border-top: 1px solid rgb(255 255 255 / .08); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; font-size: .84rem; }
.trust-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.trust-badges span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; background: rgb(255 255 255 / .05); border: 1px solid rgb(255 255 255 / .08); font-size: .78rem; font-weight: 600; color: var(--slate-300); }

/* Auth pages -------------------------------------------------------------------------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-aside {
  position: relative; overflow: hidden; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; color: var(--slate-300);
  background: radial-gradient(700px 400px at 100% 0%, rgb(255 255 255 / .08), transparent),
              linear-gradient(150deg, var(--slate-900), var(--brand-950) 60%, var(--brand-800));
}
.auth-aside .logo { color: #fff; }
.auth-aside .logo-text small { color: var(--slate-400); }
.auth-aside h2 { color: #fff; font-size: 2rem; max-width: 440px; }
.auth-aside .check-list li { color: var(--slate-200); }
.auth-aside .check-list .icon { color: var(--brand-300); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 24px; background: #fff; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card h1 { font-size: 1.9rem; margin-bottom: 8px; }
.auth-card .lead { color: var(--slate-500); margin-bottom: 28px; }
.auth-switch { margin-top: 24px; text-align: center; color: var(--slate-500); font-size: .92rem; }
.auth-mobile-logo { display: none; margin-bottom: 28px; }

/* App shell (customer portal & staff dashboard) ------------------------------------------ */
.app {
  display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh;
  /* Paint the sidebar column full height, however long the page is. */
  background: linear-gradient(90deg, #fff 263px, var(--border) 263px 264px, var(--slate-50) 264px);
}
.app--staff { background: linear-gradient(90deg, var(--slate-950) 264px, var(--slate-50) 264px); }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; background: #fff; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 20px 14px;
}
.sidebar .logo { padding: 4px 10px 22px; font-size: 1.05rem; }
.sidebar-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.sidebar-close { display: none; }
.app--staff .sidebar-close { color: var(--slate-400); }
.app--staff .sidebar-close:hover { background: rgb(255 255 255 / .08); color: #fff; }
.side-label { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--slate-400); padding: 18px 12px 8px; }
.side-nav { display: grid; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--slate-600);
  font-weight: 500; font-size: .92rem;
}
.side-nav a:hover { background: var(--slate-100); color: var(--slate-900); }
.side-nav a.is-active { background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
.side-nav a.is-active .icon { color: var(--brand-600); }
.side-count { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; font-size: .72rem; font-weight: 700; text-align: center; background: var(--brand-600); color: #fff; }
.side-count.warn { background: var(--warning); }
.sidebar-foot { margin-top: auto; padding-top: 18px; }
.side-help { padding: 16px; border-radius: var(--radius); background: var(--brand-50); border: 1px solid var(--brand-100); font-size: .84rem; color: var(--slate-600); }
.side-help strong { display: block; color: var(--slate-900); margin-bottom: 4px; }

.app--staff .sidebar { background: var(--slate-950); border-right-color: var(--slate-900); }
.app--staff .sidebar .logo { color: #fff; }
.app--staff .sidebar .logo-text small { color: var(--slate-400); }
.app--staff .side-label { color: var(--slate-500); }
.app--staff .side-nav a { color: var(--slate-400); }
.app--staff .side-nav a:hover { background: rgb(255 255 255 / .06); color: #fff; }
.app--staff .side-nav a.is-active { background: rgb(255 255 255 / .1); color: #fff; }
.app--staff .side-nav a.is-active .icon { color: var(--brand-300); }

.app-main { min-width: 0; display: flex; flex-direction: column; }
.app-topbar {
  position: sticky; top: 0; z-index: 30; height: 64px; display: flex; align-items: center; gap: 16px; padding: 0 32px;
  background: rgb(255 255 255 / .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.app-topbar .search { max-width: 380px; flex: 1; position: relative; }
.app-topbar .search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--slate-400); }
.app-topbar .search .input { padding: 9px 12px 9px 38px; background: var(--slate-50); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: var(--slate-600); background: none; border: 0; cursor: pointer; }
.icon-btn:hover { background: var(--slate-100); color: var(--slate-900); }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .65rem; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.user-menu { position: relative; }
.user-menu > button { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 5px 8px 5px 5px; border-radius: 12px; cursor: pointer; }
.user-menu > button:hover { background: var(--slate-100); }
.user-menu .who { text-align: left; line-height: 1.25; }
.user-menu .who strong { display: block; font-size: .88rem; }
.user-menu .who span { font-size: .75rem; color: var(--slate-500); }
.user-menu .dropdown-menu { left: auto; right: 0; min-width: 220px; }
.user-menu.open .dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.dropdown-menu form button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: none; border: 0; color: var(--danger-text); font-size: .92rem; cursor: pointer; }
.dropdown-menu form button:hover { background: var(--danger-bg); }
.sidebar-toggle { display: none; }
.app-content { padding: 32px; flex: 1; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head h1 { font-size: 1.7rem; letter-spacing: -.03em; margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--slate-500); }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--slate-500); margin-bottom: 8px; }
.breadcrumb a { color: var(--slate-500); }
.breadcrumb a:hover { color: var(--brand-700); }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: 28px; }
.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi { padding: 22px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.kpi-label { font-size: .85rem; color: var(--slate-500); font-weight: 500; }
.kpi-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); }
.kpi-icon.success { background: var(--success-bg); color: var(--success); }
.kpi-icon.warning { background: var(--warning-bg); color: var(--warning); }
.kpi-icon.teal { background: var(--teal-bg); color: var(--teal); }
.kpi-value { font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: .8rem; color: var(--slate-500); margin-top: 6px; }
.kpi-hero { background: linear-gradient(135deg, var(--brand-700), var(--brand-500)); border: 0; color: #fff; box-shadow: 0 12px 30px -12px var(--brand-600); }
.kpi-hero .kpi-label, .kpi-hero .kpi-sub { color: var(--brand-100); }
.kpi-hero .kpi-icon { background: rgb(255 255 255 / .16); color: #fff; }

.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.layout-2-even { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }

/* Case cards (customer) */
.case-card { padding: 22px 24px; }
.case-card + .case-card { border-top: 1px solid var(--border); }
.case-card-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.case-card h3 { font-size: 1rem; margin: 2px 0 0; }
.case-amounts { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 12px; font-size: .86rem; }
.case-amounts strong { display: block; font-size: 1.05rem; font-variant-numeric: tabular-nums; }

/* Definition list */
.dl { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px 16px; margin: 0; font-size: .92rem; }
.dl dt { color: var(--slate-500); }
.dl dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

.amount-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.amount-grid > div { background: #fff; padding: 18px 20px; }
.amount-grid .label { font-weight: 500; font-size: .8rem; color: var(--slate-500); }
.amount-grid .value { font-size: 1.45rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 17px; top: 8px; bottom: 8px; width: 2px; background: var(--slate-100); }
.timeline li { position: relative; display: flex; gap: 16px; padding-bottom: 22px; }
.timeline li:last-child { padding-bottom: 0; }
.tl-icon { position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--slate-200); color: var(--slate-500); flex-shrink: 0; }
.tl-status .tl-icon { border-color: var(--brand-200); color: var(--brand-600); background: var(--brand-50); }
.tl-payment .tl-icon { border-color: #a7f3d0; color: var(--success); background: var(--success-bg); }
.tl-message .tl-icon { border-color: #ddd6fe; color: #7c3aed; background: #f5f3ff; }
.tl-internal .tl-body { background: var(--warning-bg); border-color: #fde68a; }
.tl-body { flex: 1; min-width: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; }
.tl-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .78rem; color: var(--slate-500); margin-bottom: 4px; }
.tl-meta strong { color: var(--slate-700); }
.tl-text { font-size: .92rem; color: var(--slate-700); white-space: pre-line; overflow-wrap: anywhere; }

/* Bar chart */
.bar-chart { display: flex; align-items: flex-end; gap: 14px; height: 200px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar { width: 100%; max-width: 56px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, var(--brand-400), var(--brand-600)); min-height: 4px; position: relative; }
.bar-col:last-child .bar { background: linear-gradient(180deg, var(--teal), var(--brand-600)); }
.bar-value { font-size: .7rem; font-weight: 600; color: var(--slate-600); white-space: nowrap; }
.bar-label { font-size: .78rem; color: var(--slate-500); font-weight: 500; }
.status-rows { display: grid; gap: 14px; }
.status-row { display: grid; grid-template-columns: 140px 1fr 36px; gap: 12px; align-items: center; font-size: .86rem; }
.status-row .progress { height: 7px; }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 24px; border-bottom: 1px solid var(--slate-100); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; font-size: .92rem; color: var(--slate-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .meta { font-size: .8rem; color: var(--slate-500); }
a.list-item:hover { background: var(--slate-50); }
.unread { position: relative; }
.unread::after { content: ""; position: absolute; left: 10px; top: 50%; width: 7px; height: 7px; margin-top: -3px; border-radius: 50%; background: var(--brand-600); }

/* Filters bar */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.filters .input, .filters .select { width: auto; padding-top: 9px; padding-bottom: 9px; font-size: .88rem; }
.filters .input { min-width: 240px; flex: 1; }
.chip-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-tabs a { padding: 7px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--slate-600); background: #fff; border: 1px solid var(--border); }
.chip-tabs a:hover { border-color: var(--brand-200); color: var(--brand-700); }
.chip-tabs a.is-active { background: var(--slate-900); border-color: var(--slate-900); color: #fff; }

.pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--border); font-size: .86rem; color: var(--slate-500); }
.pagination .pages { display: flex; gap: 6px; }

.empty { padding: 56px 24px; text-align: center; color: var(--slate-500); }
.empty .icon-box { margin: 0 auto 16px; }
.empty h3 { color: var(--slate-800); margin-bottom: 6px; }

.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form .input { width: auto; flex: 1; min-width: 140px; padding: 7px 10px; font-size: .85rem; }

.verify-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: space-between; }

/* Error pages */
.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 64px 20px; }
.error-code { font-size: 5rem; font-weight: 800; letter-spacing: -.05em; line-height: 1; }

/* Responsive ------------------------------------------------------------------------------ */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layout-2 { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .main-nav, .header-actions .btn-outline, .topbar-info .hide-md { display: none; }
  .menu-toggle { display: inline-grid; place-items: center; margin-left: auto; }
  .header-actions { margin-left: 0; }
  .mobile-nav {
    position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column;
    height: 100vh; height: 100dvh; background: #fff;
    visibility: hidden; opacity: 0; transform: translateY(-10px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  }
  .mobile-nav.open { visibility: visible; opacity: 1; transform: none; transition: opacity .2s ease, transform .2s ease; }
  .hero { padding: 56px 0 88px; }
  /* minmax(0, …) lets the column shrink below its content's width (e.g. nowrap titles). */
  .hero-grid, .split, .layout-2-even { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .tracker-floating.one { left: 8px; } .tracker-floating.two { right: 8px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--slate-100); }
  .cta-band { grid-template-columns: 1fr; padding: 40px 28px; }
  .section { padding: 72px 0; }
  .auth { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-mobile-logo { display: inline-flex; }
  .app, .app--staff { grid-template-columns: 1fr; background: var(--slate-50); }
  .sidebar {
    position: fixed; z-index: 60; left: 0; top: 0; width: min(300px, 86vw); height: 100vh; height: 100dvh;
    padding-bottom: calc(20px + env(safe-area-inset-bottom)); overscroll-behavior: contain;
    transform: translateX(-100%); visibility: hidden; box-shadow: var(--shadow-xl);
    transition: transform .25s ease, visibility 0s linear .25s;
  }
  .app.sidebar-open .sidebar { transform: none; visibility: visible; transition: transform .25s ease; }
  .app.sidebar-open::after { content: ""; position: fixed; inset: 0; background: rgb(15 23 42 / .45); z-index: 55; }
  .sidebar-toggle, .sidebar-close { display: inline-grid; }
  .app-topbar { padding: 0 16px; }
  .app-content { padding: 20px 16px; }
  .user-menu .who { display: none; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4, .steps, .form-grid, .footer-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .kpis, .kpis-3 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kpi { padding: 16px; }
  .kpi-hero { grid-column: 1 / -1; }
  .kpi-value { font-size: 1.3rem; }
  .kpi-icon { width: 32px; height: 32px; }
  .tracker-floating { display: none; }
  .topbar-info { display: none; }
  .topbar .container { justify-content: flex-end; }
  .dl { grid-template-columns: 1fr; gap: 2px; }
  .dl dd { margin-bottom: 10px; }
  .amount-grid { grid-template-columns: 1fr; }
  .stepper li { font-size: .62rem; }
  .card-body { padding: 18px; }
  .card-head { padding: 16px 18px; }
  .hero-actions .btn { flex: 1; }
  .status-row { grid-template-columns: 110px 1fr 30px; }
  .app-topbar .search { display: none; }
  .hide-sm { display: none !important; }
  .page-head .flex { width: 100%; flex-wrap: wrap; }
  .page-head .flex > .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .sidebar, .app-topbar, .site-header, .topbar, .site-footer, .btn, form { display: none !important; }
  .app { display: block; background: #fff; }
}
