:root {
  --ink: #15202b;
  --ink-soft: #2a3a48;
  --muted: #546372;
  --muted-2: #5c6b7a;
  --line: #e2e8ee;
  --line-strong: #cfd8e1;
  --surface: #ffffff;
  --surface-2: #f6f8fa;
  --surface-3: #eef2f5;
  --brand: #0d6b66;
  --brand-dark: #0a524e;
  --brand-soft: #e5f4f3;
  --brand-mid: #1a8a84;
  /* Solid fills only. #056a64 is 6.46:1 with #fff; hover #034e49 is 9.59:1.
     Do not repoint these in dark mode — --brand there is a light accent for text. */
  --brand-fill: #056a64;
  --brand-fill-hover: #034e49;
  --on-brand: #fff;
  --warn: #9a5b12;
  --warn-soft: #fff6e8;
  --warn-line: #f0d4a8;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --danger-line: #f3c4bf;
  --ok: #0e6b3f;
  --ok-soft: #eaf8f0;
  --ok-line: #b7e4c7;
  --sidebar: #101920;
  --sidebar-2: #16232d;
  --sidebar-text: #d7e0e7;
  --shadow-sm: 0 1px 2px rgba(21, 32, 43, 0.04);
  --shadow: 0 8px 24px rgba(21, 32, 43, 0.06);
  --shadow-lg: 0 24px 48px rgba(21, 32, 43, 0.14);
  --radius: 14px;
  --radius-sm: 10px;
  --font-display: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --font-body: "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

html[data-theme="dark"] {
  --ink: #e8eef3;
  --ink-soft: #c5d0da;
  --muted: #a9b8c4;
  --muted-2: #96a6b4;
  --line: #2a3844;
  --line-strong: #3a4a58;
  --surface: #151e26;
  --surface-2: #1a2430;
  --surface-3: #212d3a;
  --brand: #2bb3ab;
  --brand-dark: #7fd4cf;
  --brand-soft: #14353a;
  --brand-mid: #1a8a84;
  --warn: #e0b06a;
  --warn-soft: #3a2e18;
  --warn-line: #6a5228;
  --danger: #f0a19a;
  --danger-soft: #3a1c1a;
  --danger-line: #6a3530;
  --ok: #7dcea0;
  --ok-soft: #163326;
  --ok-line: #2a5a40;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    linear-gradient(180deg, var(--surface-2) 0%, var(--surface-3) 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[data-theme="light"] body,
body {
  background:
    linear-gradient(180deg, #f8fafb 0%, #eef3f6 100%);
}
html[data-theme="dark"] body {
  background:
    linear-gradient(180deg, #0f161c 0%, #121a22 100%);
}

.theme-swatches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 360px;
}
button.theme-swatch {
  min-height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
button.theme-swatch.on {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
}
button.theme-swatch.theme-light {
  background: #f8fafb;
  color: #15202b;
}
button.theme-swatch.theme-dark {
  background: #151e26;
  color: #e8eef3;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { font-family: var(--font-body); }

.app-shell {
  display: grid;
  grid-template-columns: 268px 1fr;
  min-height: 100vh;
}
.app-column { min-width: 0; display: flex; flex-direction: column; }
.trial-banner-host { padding: 16px 36px 0; }
.trial-banner-host a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--brand-fill, #056a64);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.trial-banner-host a:hover,
.trial-banner-host a:focus {
  background: var(--brand-fill-hover, #034e49);
  color: #fff;
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px 20px;
  background:
    linear-gradient(180deg, rgba(26, 138, 132, 0.12) 0%, transparent 28%),
    linear-gradient(180deg, var(--sidebar-2) 0%, var(--sidebar) 100%);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  gap: 22px;
  border-right: 1px solid rgba(255,255,255,0.04);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #056a64, #045e59 55%, #034e49);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 8px 18px rgba(0,0,0,0.25);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.04em;
  flex-shrink: 0;
}
.brand-copy { min-width: 0; }
.brand-mark {
  font-family: var(--font-display);
  font-size: 1.28rem;
  letter-spacing: -0.03em;
  color: #f4f8fb;
  line-height: 1.15;
}
.brand-sub {
  color: rgba(215, 224, 231, 0.62);
  font-size: 0.75rem;
  margin-top: 2px;
  letter-spacing: 0.01em;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-label {
  padding: 8px 12px 6px;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(215, 224, 231, 0.42);
}
.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 11px;
  color: rgba(215, 224, 231, 0.82);
  font-size: 0.94rem;
  font-weight: 500;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.nav a svg {
  width: 18px;
  height: 18px;
  opacity: 0.72;
  flex-shrink: 0;
}
.nav a:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}
.nav a:hover svg { opacity: 1; }
.nav a.active {
  background: var(--brand-fill);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}
.nav a.active svg { opacity: 1; stroke: currentColor; color: #fff; }

.sidebar-footer {
  margin-top: auto;
  padding: 14px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}
.sidebar-footer strong {
  display: block;
  font-size: 0.82rem;
  color: #f0f5f8;
  font-weight: 600;
}
.sidebar-footer span {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: rgba(215, 224, 231, 0.55);
  line-height: 1.35;
}
.sidebar-footer .site-version {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: rgba(215, 224, 231, 0.72);
}

/* ---------- Main ---------- */
.main {
  padding: 28px 36px 56px;
  max-width: 1440px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.topbar h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 2.2vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.15;
}
.topbar p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 52ch;
  line-height: 1.45;
}

.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 15px;
  cursor: pointer;
  background: var(--brand-fill);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 1px 2px rgba(10, 82, 78, 0.2);
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(5, 106, 100, 0.28);
}
body:not(.admin-body) .btn:not(.secondary):not(.ghost):not(.danger):hover,
body:not(.admin-body) .btn:not(.secondary):not(.ghost):not(.danger):focus,
body:not(.admin-body) .btn:not(.secondary):not(.ghost):not(.danger):focus-visible,
body:not(.admin-body) .btn:not(.secondary):not(.ghost):not(.danger):active {
  background: var(--brand-fill-hover);
  color: #fff;
}
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.secondary {
  background: var(--surface);
  color: var(--ink-soft);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.btn.secondary:hover {
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--muted-2);
}
.btn.ghost {
  background: transparent;
  color: var(--brand-dark);
  box-shadow: inset 0 0 0 1px rgba(13, 107, 102, 0.28);
}
.btn.ghost:hover { background: var(--brand-soft); box-shadow: inset 0 0 0 1px rgba(13, 107, 102, 0.4); }
html[data-theme="dark"] .btn.ghost:hover,
html[data-theme="dark"] .btn.ghost:focus,
html[data-theme="dark"] .btn.ghost:focus-visible {
  background: #14353a;
  color: #fff;
}
.btn.danger,
.btn.danger:focus,
.btn.danger:focus-visible,
.btn.danger:active {
  background: #9f1d14;
  color: #fff;
  box-shadow: none;
}
.btn.danger:hover { background: #7f160f; color: #fff; }
.btn.sm { padding: 7px 11px; font-size: 0.82rem; border-radius: 8px; }

/* ---------- KPIs ---------- */
.grid-kpi {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.kpi {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-sm);
  animation: rise 420ms ease both;
}
.kpi::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--brand);
}
.kpi:nth-child(2) { animation-delay: 50ms; }
.kpi:nth-child(2)::before { background: var(--warn); }
.kpi:nth-child(3) { animation-delay: 100ms; }
.kpi:nth-child(4) { animation-delay: 150ms; }
.kpi-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.kpi-value {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
}
.kpi-meta {
  margin-top: 10px;
  color: var(--muted-2);
  font-size: 0.8rem;
}
.kpi:hover { border-color: var(--line-strong); }
.kpi.alert {
  background: var(--surface);
  border-color: var(--danger-line);
}
.kpi.alert:hover,
.kpi.alert:focus-within {
  background: var(--surface);
  border-color: var(--danger);
}
.kpi.alert .kpi-value { color: var(--danger); }
.kpi.alert .kpi-label,
.kpi.alert .kpi-meta { color: var(--ink-soft); }
.kpi.alert::before { background: var(--danger); }

/* ---------- Panels ---------- */
.panel-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 14px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 18px 14px;
  animation: rise 480ms ease both;
}
.panel + .panel,
.panel-grid + .panel,
.panel.spaced { margin-top: 14px; }
.panel h2 {
  margin: 0 0 14px;
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.panel-header h2 { margin: 0; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
th, td {
  text-align: left;
  padding: 12px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-size: 0.92rem;
}
th {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line-strong);
}
th:first-child { border-top-left-radius: 10px; }
th:last-child { border-top-right-radius: 10px; }
tbody tr { transition: background 120ms ease; }
tbody tr:hover td { background: rgba(13, 107, 102, 0.035); }
tbody tr:last-child td { border-bottom: 0; }
td.mono, .mono {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  letter-spacing: -0.01em;
}
.cell-sub {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--brand-soft);
  color: var(--brand-dark);
  border: 1px solid rgba(13, 107, 102, 0.12);
  text-transform: capitalize;
}
html[data-theme="dark"] .badge:not(.warn):not(.danger):not(.ok) {
  background: #14353a;
  color: #fff;
}
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.badge.danger { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-line); }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.field input, .field select, .field textarea,
.line-row input, .line-row select {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 11px 12px;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.field input:hover, .field select:hover, .field textarea:hover,
.line-row input:hover, .line-row select:hover {
  border-color: var(--muted-2);
}
.field input:focus, .field select:focus, .field textarea:focus,
.line-row input:focus, .line-row select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13, 107, 102, 0.14);
}
.field textarea { min-height: 96px; resize: vertical; }
.pw-field { position: relative; }
.pw-field input { width: 100%; padding-right: 64px; }
.pw-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #056a64;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px;
}
html[data-theme="dark"] .pw-toggle { color: #7fd4cf; }

/* ---------- Reminders ---------- */
.stack { display: flex; flex-direction: column; gap: 10px; }
.reminder-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 14px 12px;
  background: var(--surface);
  border-left: 3px solid var(--brand-mid);
  transition: box-shadow 160ms ease, transform 160ms ease;
}
.reminder-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.reminder-card.critical {
  border-color: var(--danger-line);
  border-left-color: var(--danger);
  background: linear-gradient(90deg, var(--danger-soft), var(--surface) 55%);
  color: var(--ink);
}
.reminder-card.critical:hover { background: var(--surface); }
.reminder-card.warning {
  border-color: var(--warn-line);
  border-left-color: var(--warn);
  background: linear-gradient(90deg, var(--warn-soft), var(--surface) 55%);
  color: var(--ink);
}
.reminder-card.warning:hover { background: var(--surface); }
.reminder-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 650;
}
.reminder-card h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.reminder-card p {
  margin: 0 0 12px;
  color: var(--ink-soft);
  line-height: 1.5;
  font-size: 0.9rem;
}

.empty {
  padding: 36px 16px;
  text-align: center;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  font-size: 0.92rem;
}

/* ---------- Toast / Modal ---------- */
.toast-host {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 50;
}
.toast {
  background: var(--sidebar);
  color: white;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.08);
  animation: rise 220ms ease;
  font-size: 0.9rem;
  max-width: 360px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 25, 32, 0.52);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 40;
}
.modal-backdrop.open { display: flex; }
.modal {
  width: min(760px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--surface);
  color: var(--ink);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.4);
  animation: rise 220ms ease;
}
.modal h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.modal-lead {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.9rem;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.lines-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
  padding: 12px;
  background: var(--surface-2);
  border-radius: 12px;
  border: 1px solid var(--line);
}
.line-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}

.settings-note {
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}
.danger-zone {
  border-color: var(--danger-line);
  background: linear-gradient(180deg, var(--surface) 0%, var(--danger-soft) 160%);
}
.danger-zone .panel-header h2 { color: var(--danger); }
.danger-zone .settings-note {
  background: var(--surface);
  border-color: var(--danger-line);
  color: var(--ink-soft);
}

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

@media (max-width: 1100px) {
  .grid-kpi, .panel-grid, .form-grid.three { grid-template-columns: 1fr 1fr; }
  .panel-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: relative;
    height: auto;
    padding: 16px;
    gap: 14px;
  }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav a { padding: 8px 10px; font-size: 0.85rem; }
  .nav-label { display: none; }
  .sidebar-footer strong,
  .sidebar-footer #workspace-label { display: none; }
  .sidebar-footer {
    display: block;
    margin-top: 8px;
    padding: 8px 10px;
  }
  .main { padding: 18px 14px 40px; }
  .trial-banner-host { padding: 12px 14px 0; }
  .grid-kpi, .form-grid, .form-grid.three, .line-row { grid-template-columns: 1fr; }
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
}

/* ---------- InvoicePay extras ---------- */
.brand-logo.img {
  padding: 0;
  overflow: hidden;
  background: #000;
}
.brand-logo.img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.toolbar .filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.toolbar input[type="search"],
.toolbar select {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 9px 12px;
  background: var(--surface);
  min-width: 180px;
}

.aging-bars { display: flex; flex-direction: column; gap: 12px; }
.aging-row { display: grid; grid-template-columns: 90px 1fr 80px; gap: 10px; align-items: center; }
.aging-row span { font-size: 0.8rem; color: var(--muted); font-weight: 650; }
.aging-row strong { font-family: var(--font-mono); font-size: 0.84rem; text-align: right; }
.bar {
  height: 10px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-mid), var(--brand));
}
.bar.warn i { background: linear-gradient(90deg, #d4a017, var(--warn)); }
.bar.danger i { background: linear-gradient(90deg, #e35d4f, var(--danger)); }

.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.right { text-align: right; }

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(26, 138, 132, 0.16), transparent 55%),
    linear-gradient(180deg, #f8fafb 0%, #eef3f6 100%);
}
.auth-card {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow-lg);
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.auth-card h1 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: -0.03em;
}
.auth-card .lead { margin: 0 0 20px; color: var(--muted); font-size: 0.92rem; }
.auth-error {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--danger-soft);
  border: 1px solid var(--danger-line);
  color: var(--danger);
  font-size: 0.88rem;
}
.auth-ok {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--ok-soft);
  border: 1px solid var(--ok-line);
  color: var(--ok);
  font-size: 0.88rem;
}
.auth-card .field { margin-bottom: 12px; }
.auth-card .btn { width: 100%; margin-top: 8px; }
.auth-foot {
  margin-top: 16px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}
.auth-foot a { color: #056a64; font-weight: 600; }
html[data-theme="dark"] .auth-foot a { color: #7fd4cf; }

/* Landing */
.landing {
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(ellipse 90% 60% at 70% -10%, rgba(26, 138, 132, 0.18), transparent 50%),
    radial-gradient(ellipse 50% 40% at 0% 30%, rgba(124, 80, 211, 0.08), transparent 45%),
    linear-gradient(180deg, #f8fafb 0%, #eef3f6 55%, #e8eef2 100%);
}
html[data-theme="dark"] .landing {
  background:
    radial-gradient(ellipse 90% 60% at 70% -10%, rgba(26, 138, 132, 0.22), transparent 50%),
    radial-gradient(ellipse 50% 40% at 0% 30%, rgba(124, 80, 211, 0.12), transparent 45%),
    linear-gradient(180deg, #0f161c 0%, #121a22 55%, #151e26 100%);
}
.landing-nav {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 12px 28px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 16px;
}
.nav-toggle {
  display: none;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }
body.landing {
  --ink: #102A43;
  --ink-soft: #243B53;
  --muted: #425466;
  --line: #D9E2EC;
  --line-strong: #D9E2EC;
  --surface: #FFFFFF;
  --surface-2: #F7FAFC;
  --surface-3: #F7FAFC;
  --brand: #087F78;
  --brand-dark: #056A64;
  --brand-soft: #E5F4F3;
  --accent: #5B5CE2;
  background:
    radial-gradient(ellipse 90% 60% at 70% -10%, rgba(26, 138, 132, 0.16), transparent 50%),
    linear-gradient(180deg, #f8fafb 0%, #eef3f6 55%, #e8eef2 100%);
  color: #425466;
}
html[data-theme="dark"] body.landing {
  --ink: #E8EEF3;
  --ink-soft: #C5D0DA;
  --muted: #C5D0DA;
  --line: #2a3844;
  --line-strong: #3a4a58;
  --surface: #151e26;
  --surface-2: #1a2430;
  --surface-3: #212d3a;
  --brand: #2bb3ab;
  --brand-dark: #7fd4cf;
  --brand-soft: #14353a;
  --accent: #8B8CF2;
  background:
    radial-gradient(ellipse 90% 60% at 70% -10%, rgba(26, 138, 132, 0.22), transparent 50%),
    linear-gradient(180deg, #0f161c 0%, #121a22 55%, #151e26 100%);
  color: #C5D0DA;
}
.landing-nav .brand { border: 0; padding: 0; text-decoration: none; color: inherit; }
.landing-nav .brand-mark,
.landing-footer .brand-mark { color: var(--ink); font-size: 1.28rem; }
.landing-nav .brand-sub,
.landing-footer .brand-sub { color: var(--accent); font-weight: 600; }
.landing-nav .nav-actions,
.landing-nav .nav-cta { display: flex; align-items: center; }
.landing-nav .nav-actions { flex-wrap: wrap; justify-content: flex-end; gap: 2px 11px; }
.landing-nav .nav-cta { flex-wrap: nowrap; gap: 8px; justify-content: flex-end; }
.landing-nav .nav-actions a:not(.btn) { color: var(--ink); font-weight: 600; text-decoration: none; font-size: 0.84rem; white-space: nowrap; }
.landing-nav .nav-actions a[aria-current="page"] { color: #056a64; text-decoration: underline; text-underline-offset: 3px; }
html[data-theme="dark"] .landing-nav .nav-actions a[aria-current="page"] { color: #7fd4cf; }
.hero-sample {
  margin: 0;
  padding: 8px 14px 0;
  font-size: 0.75rem;
  color: var(--muted);
}
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.hero-price { margin: 0 0 16px; font-size: 1.05rem; color: var(--ink); }
.hero-cta .text-link, a.text-link { color: #056a64; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
html[data-theme="dark"] .hero-cta .text-link,
html[data-theme="dark"] a.text-link { color: #7fd4cf; }
.faq-list { margin: 0; }
.faq-list dt { font-weight: 700; color: var(--ink); margin-top: 16px; }
.faq-list dd { margin: 6px 0 0; line-height: 1.55; }
.guide-wide { max-width: 1120px; }
.signup-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 28px;
  max-width: 980px;
  margin: 0 auto;
  padding: 8px 20px 40px;
  align-items: start;
}
.signup-offer h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.03em;
  margin: 0 0 12px;
  color: var(--ink);
}
.signup-offer ul { padding-left: 18px; line-height: 1.6; }
.field-hint { margin: 6px 0 0; color: var(--muted); font-size: 0.82rem; }
.signup-layout .auth-card h2 {
  font-family: var(--font-display);
  margin: 0 0 6px;
  font-size: 1.45rem;
}
@media (max-width: 980px) {
  .signup-layout { grid-template-columns: 1fr; }
  .landing-nav {
    display: flex;
    flex-wrap: wrap;
    padding: 12px 16px;
    align-items: center;
  }
  .nav-toggle { display: inline-grid; margin-left: auto; }
  .landing-nav .nav-actions,
  .landing-nav .nav-cta { display: none; }
  .landing-nav.is-open .nav-actions,
  .landing-nav.is-open .nav-cta { display: flex; }
  .landing-nav.is-open {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    border-radius: 0 0 16px 16px;
  }
  .landing-nav.is-open .nav-actions {
    order: 3;
    flex: 1 0 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }
  .landing-nav.is-open .nav-actions a {
    white-space: normal;
    padding: 10px 4px;
    font-size: 1rem;
  }
  .landing-nav.is-open .nav-cta {
    order: 4;
    flex: 1 0 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px 0 4px;
  }
  .landing-nav.is-open .nav-cta .btn { text-align: center; }
}
body.landing .auth-page {
  min-height: auto;
  background: transparent;
  padding-top: 8px;
}
body.app-body .site-nav,
body.admin-body .site-nav {
  max-width: none;
  width: 100%;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
}
body.app-body .sidebar { height: auto; min-height: calc(100vh - 64px); }
.landing-hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 24px 12px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: center;
}
.landing-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.7rem);
  font-weight: 650;
  letter-spacing: -0.04em;
  margin: 0 0 14px;
  color: var(--ink);
  max-width: 14ch;
  line-height: 1.05;
}
.landing-hero .sub {
  margin: 0 0 12px;
  color: #425466;
  font-size: 1.12rem;
  line-height: 1.55;
  max-width: 42ch;
}
html[data-theme="dark"] .landing-hero .sub,
html[data-theme="dark"] .landing-hero .audience,
html[data-theme="dark"] .hero-note,
html[data-theme="dark"] .feature p,
html[data-theme="dark"] .step p,
html[data-theme="dark"] .plan-save,
html[data-theme="dark"] .pricing-note,
html[data-theme="dark"] .landing-footer,
html[data-theme="dark"] .legal-page { color: var(--muted); }
html[data-theme="dark"] .landing-footer a,
html[data-theme="dark"] .footer-col h2,
html[data-theme="dark"] .legal-page h1 { color: var(--ink); }
.landing-hero .audience {
  margin: 0 0 22px;
  color: #425466;
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 46ch;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin: 12px 0 0; color: #425466; font-size: 0.9rem; }
.hero-visual { min-width: 0; position: relative; padding: 18px 8px 8px; }
.float-paid {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 18px;
  margin: 0;
  background: #fff;
  color: #0e6b3f;
  border: 1px solid #b7e4c7;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.88rem;
  font-weight: 750;
  box-shadow: 0 12px 28px rgba(16, 42, 67, 0.16);
  transform: rotate(2deg);
}
.browser-frame {
  background: #fff;
  color: #243B53;
  border: 1px solid #d9e2ec;
  border-radius: 18px;
  box-shadow: 0 28px 60px rgba(5, 106, 100, 0.16), 0 10px 24px rgba(16, 42, 67, 0.1);
  overflow: hidden;
  transform: rotate(-1.4deg);
}
.browser-frame .hero-sample,
.browser-frame .dash-kpis em,
.browser-frame .dash-aging div,
.browser-frame .browser-url { color: #425466; }
.browser-frame .dash-top strong,
.browser-frame .dash-kpis b { color: #102A43; }
.browser-frame .dash-reminders li { color: #243B53; }
.browser-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: #F7FAFC;
  border-bottom: 1px solid var(--line);
}
.browser-chrome span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #D9E2EC;
}
.browser-url {
  margin-left: 8px;
  flex: 1;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.75rem;
  color: #425466;
}
.dash-shot { padding: 14px 14px 16px; }
.dash-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 12px; }
.dash-top strong { color: var(--ink); font-size: 0.95rem; }
.dash-toast {
  background: #EAF8F0;
  color: #0E6B3F;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 650;
}
.dash-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.dash-kpis div { background: #F7FAFC; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.dash-kpis em { display: block; font-style: normal; font-size: 0.72rem; color: #425466; }
.dash-kpis b { color: var(--ink); font-size: 1.35rem; letter-spacing: -0.03em; }
.dash-aging { display: grid; gap: 6px; margin-bottom: 12px; }
.dash-aging div { display: grid; grid-template-columns: 42px 1fr auto; gap: 8px; align-items: center; font-size: 0.75rem; color: #425466; }
.dash-aging i { display: block; height: 8px; border-radius: 99px; background: #056a64; }
.dash-aging div:nth-child(2) i { background: #3D6FDB; }
.dash-aging div:nth-child(3) i { background: #5B5CE2; }
.dash-reminders { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dash-reminders li { font-size: 0.78rem; color: #243B53; }
.dash-reminders span { display: inline-block; min-width: 64px; color: #5B5CE2; font-weight: 650; }
.landing-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 24px 80px;
}
.landing-section h2 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}
.landing-section > .sub {
  margin: 0 0 28px;
  color: var(--muted);
  max-width: 50ch;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.feature h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}
.feature p,
.step p {
  margin: 0;
  color: #425466;
  font-size: 0.95rem;
  line-height: 1.55;
}
.feat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}
.feat-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feat-icon.teal { background: #E5F4F3; color: #056a64; }
.feat-icon.blue { background: #E7F0FF; color: #2456C5; }
.feat-icon.violet { background: #EEEEFB; color: #5B5CE2; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.step h3 { margin: 12px 0 6px; color: var(--ink); font-size: 1.02rem; }
.step-art {
  height: 72px;
  border-radius: 10px;
  background: #F7FAFC;
  border: 1px solid var(--line);
  padding: 12px;
  display: grid;
  align-content: center;
  gap: 6px;
}
.mini-row { height: 8px; border-radius: 99px; background: #D9E2EC; }
.mini-row.short { width: 62%; background: #056a64; }
.mini-cal { display: flex; gap: 6px; }
.mini-cal b { flex: 1; text-align: center; font-size: 0.75rem; padding: 8px 0; border-radius: 8px; background: #fff; border: 1px solid var(--line); color: #425466; }
.mini-cal b.on { background: #5B5CE2; color: #fff; border-color: #5B5CE2; }
.mini-paid { font-size: 0.8rem; font-weight: 650; color: #0E6B3F; background: #EAF8F0; border-radius: 8px; padding: 8px 10px; }
.trust-strip { max-width: 1120px; margin: 0 auto; padding: 0 24px 28px; }
.trust-strip ul { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; margin: 0; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.trust-strip li { color: #243B53; font-size: 0.88rem; font-weight: 600; }
.trust-strip li::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #056a64; }
.pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.price-card { display: flex; flex-direction: column; position: relative; }
.price-card .btn { width: 100%; text-align: center; margin-top: auto; text-decoration: none; }
.price-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.price-actions .btn,
.price-actions form,
.price-actions button { width: 100%; margin-top: 0; }
.pay-setup {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff6e8;
  color: #5c4308;
  border: 1px solid #e6d3a4;
  font-weight: 650;
}
.pay-setup.admin {
  background: #fdecec;
  color: #7a1f1a;
  border-color: #f0c2bf;
}
html[data-theme="dark"] .pay-setup {
  background: #3a2e14;
  color: #ffe7b0;
  border-color: #8a6a2a;
}
html[data-theme="dark"] .pay-setup.admin {
  background: #3a1c1c;
  color: #ffd0cb;
  border-color: #8a3a34;
}
.plan-save { min-height: 2.6em; margin: 0 0 10px; color: #425466; font-size: 0.88rem; }
.popular {
  position: absolute;
  top: -12px;
  left: 18px;
  background: #5B5CE2;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: 999px;
}
.pricing-note { margin-top: 18px; color: #425466; max-width: 70ch; }
.landing-section h2,
.price-card h3,
.feature h3 { color: var(--ink); }
.price-card ul { color: #243B53; }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.price-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.price-card.featured {
  padding-top: 28px;
  border-color: rgba(8, 127, 120, 0.35);
  box-shadow: var(--shadow), 0 0 0 1px rgba(13, 107, 102, 0.12);
  background: linear-gradient(180deg, var(--surface) 0%, var(--brand-soft) 160%);
}
.price-card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.price-card .price {
  font-family: var(--font-display);
  font-size: 2.2rem;
  letter-spacing: -0.03em;
  margin: 10px 0;
}
.price-card .price span { font-size: 0.95rem; color: var(--muted); font-family: var(--font-body); }
.price-card ul {
  margin: 0 0 18px;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.7;
}
.landing-footer {
  border-top: 1px solid var(--line);
  padding: 36px 24px 48px;
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.8fr;
  gap: 24px;
  color: #425466;
  font-size: 0.9rem;
  text-align: left;
}
.landing-footer .brand { border: 0; padding: 0; margin-bottom: 8px; }
.landing-footer a { color: #243B53; text-decoration: none; font-weight: 600; }
.landing-footer a:hover { color: #056a64; }
html[data-theme="dark"] .landing-footer a:hover { color: #7fd4cf; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h2 { margin: 0 0 4px; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: #102A43; }
.footer-meta { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 2px 0 0; text-align: center; }
.footer-brand p { margin: 8px 0 0; max-width: 36ch; }
.legal-page { max-width: 720px; margin: 0 auto; padding: 12px 24px 72px; color: #425466; }
.legal-page h1 { color: #102A43; font-family: var(--font-display); font-size: 2rem; margin: 0 0 16px; }
.legal-page p { line-height: 1.6; }
.legal-page a { color: #056a64; font-weight: 650; }
html[data-theme="dark"] .legal-page a { color: #7fd4cf; }
.landing-footer .footer-meta .page-version,
.landing-footer .footer-meta .page-version a {
  font-size: 12.5px;
  font-weight: 400;
  color: #425466;
}
.kicker {
  margin: 0 0 10px;
  color: var(--brand-dark);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
html[data-theme="dark"] .kicker { color: var(--brand-dark); }
.hero-price { margin: 0 0 16px; color: var(--ink-soft); font-size: 1.02rem; }
.hero-cta .btn { text-decoration: none; }
.problem-grid,
.audience-grid,
.value-grid { display: grid; gap: 14px; }
.problem-grid { grid-template-columns: 1.2fr 0.8fr; align-items: start; }
.problem-list,
.audience-grid,
.value-grid,
.feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.problem-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.problem-list li,
.audience-card,
.value-card,
.roi-card,
.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.problem-list li,
.audience-card,
.value-card { padding: 18px; }
.problem-list h3,
.audience-card h3,
.value-card h3,
.step h3 { margin: 10px 0 6px; color: var(--ink); font-size: 1.05rem; }
.problem-list p,
.audience-card p,
.value-card p,
.roi-note { margin: 0; color: var(--muted); line-height: 1.55; }
.math-callout {
  background: linear-gradient(160deg, var(--brand-soft), var(--surface) 70%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.math-callout strong { color: var(--ink); }
.math-callout p { margin: 8px 0 0; color: var(--ink-soft); line-height: 1.55; }
.step-icon,
.feat-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}
.step-icon {
  display: grid;
  place-items: center;
  background: var(--brand-fill);
  color: #fff;
}
.step-icon svg,
.feat-icon svg { width: 22px; height: 22px; }
.step-icon svg { stroke: #fff; }
.steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.audience-grid { display: grid; gap: 12px; }
.audience-card { display: flex; gap: 12px; align-items: flex-start; }
.value-layout { display: block; }
.value-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.roi-card { padding: 20px; }
.roi-card h3 { margin: 0 0 8px; }
.roi-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.roi-fields label { display: grid; gap: 6px; font-size: 0.88rem; font-weight: 650; color: var(--ink); }
.roi-fields input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
}
.roi-result {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--ink);
  line-height: 1.5;
  font-weight: 600;
}
.cta-band {
  max-width: none;
  margin: 0;
  padding: 56px 24px;
  border-radius: 0;
  background: linear-gradient(145deg, #056a64, #034e49);
  color: #fff;
}
.cta-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}
.cta-band h2,
.cta-band p { color: #fff; margin: 0; }
.cta-band h2 { font-family: var(--font-display); font-size: 1.8rem; letter-spacing: -0.03em; }
.cta-band p { margin-top: 6px; max-width: 52ch; }
.cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }
body.landing .cta-band a.btn.on-light,
body.landing .cta-band a.btn.on-light:visited,
body.landing .cta-band a.btn.on-light:hover,
body.landing .cta-band a.btn.on-light:focus,
body.landing .cta-band a.btn.on-light:focus-visible,
body.landing .cta-band a.btn.on-light:active {
  background: #fff;
  background-color: #fff;
  color: #056a64;
}
body.landing .cta-band a.btn.on-light:hover,
body.landing .cta-band a.btn.on-light:focus-visible { background: #e5f4f3; background-color: #e5f4f3; color: #034e49; }
body.landing .cta-band a.btn.secondary {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 1.5px #fff;
}
body.landing .cta-band a.btn.secondary:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
html[data-theme="dark"] body.landing .trust-strip ul { background: var(--surface); }
html[data-theme="dark"] body.landing .trust-strip li,
html[data-theme="dark"] body.landing .price-card ul,
html[data-theme="dark"] body.landing .price-card h3,
html[data-theme="dark"] body.landing .feature p,
html[data-theme="dark"] body.landing .step p,
html[data-theme="dark"] body.landing .plan-save,
html[data-theme="dark"] body.landing .pricing-note { color: var(--ink-soft); }
html[data-theme="dark"] body.landing .footer-col h2 { color: var(--ink); }
@media (max-width: 900px) {
  .landing-hero, .feature-grid, .pricing-grid, .steps, .landing-footer,
  .problem-grid, .problem-list, .audience-grid, .value-layout, .value-grid,
  .stat-row, .roi-panel { grid-template-columns: 1fr; }
  .landing-hero { padding-top: 8px; }
  .browser-frame, .float-paid { transform: none; }
  .float-paid { position: static; display: inline-block; margin: 0 0 12px; }
  .steps::before { display: none; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .roi-fields { grid-template-columns: 1fr; }
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 12px;
  margin: 0 auto 4px;
  max-width: 52rem;
}
.page-version {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 8px 16px 10px;
  text-align: center;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
  color: #425466;
  border-top: 1px solid var(--line);
}
.footer-meta .page-version { border-top: 0; padding: 8px 12px 2px; }
.page-version a {
  color: inherit;
  font-weight: 400;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.page-version a:hover { color: #056a64; }
html[data-theme="dark"] body .page-version,
html[data-theme="dark"] body .page-version a,
html[data-theme="dark"] body .page-version a:hover,
html[data-theme="dark"] body.landing .page-version,
html[data-theme="dark"] body.landing .page-version a,
html[data-theme="dark"] body.landing .page-version a:hover {
  color: #fff;
}

.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;
}
.inp-chat-msg.assistant a { color: #056a64; font-weight: 600; }
html[data-theme="dark"] .inp-chat-msg.assistant a { color: #7fd4cf; }
.inp-chat-msg.user a { color: #fff; font-weight: 600; text-decoration: underline; }
.inp-chat {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  font-family: var(--font-body);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.inp-chat.open {
  right: 18px;
  bottom: 18px;
}
.inp-chat-tab {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: var(--brand-fill);
  color: #fff;
  font: inherit;
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(8, 127, 120, 0.28);
}
.inp-chat-tab svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.inp-chat-tab:hover,
.inp-chat-tab:focus,
.inp-chat-tab:focus-visible { background: var(--brand-fill-hover); color: #fff; }
.inp-chat.open .inp-chat-tab { display: none; }
.inp-chat-panel {
  display: none;
  width: min(380px, calc(100vw - 28px));
  height: min(480px, calc(100vh - 96px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  flex-direction: column;
  overflow: hidden;
}
.inp-chat-panel[hidden] { display: none !important; }
.inp-chat.open .inp-chat-panel { display: flex !important; }
.inp-chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--brand-fill);
  color: #fff;
}
.inp-chat-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inp-chat-hide {
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #056a64;
  font: inherit;
  font-weight: 800;
  padding: 10px 18px;
  cursor: pointer;
}
.inp-chat-hide:hover,
.inp-chat-hide:focus-visible { background: #e5f4f3; color: #034e49; }
.inp-chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface-2);
}
.inp-chat-msg {
  max-width: 90%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 0.95rem;
  white-space: pre-wrap;
}
.inp-chat-msg.user {
  align-self: flex-end;
  background: var(--brand-fill);
  color: #fff;
}
.inp-chat-msg.assistant {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}
.inp-chat-msg.pending { opacity: 0.7; }
.inp-chat-form {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
}
.inp-chat-form input { margin: 0; flex: 1; }
.inp-chat-form .btn { flex: 0 0 auto; padding: 10px 16px; }
.inp-chat-mail {
  margin: 0;
  padding: 0 12px 10px;
  font-size: 0.82rem;
  color: var(--muted);
}
.inp-chat-mail a {
  color: inherit;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hero-band {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(640px 360px at 88% 8%, rgba(5, 106, 100, 0.28), transparent 68%),
    radial-gradient(420px 280px at 8% 90%, rgba(91, 92, 226, 0.14), transparent 70%),
    radial-gradient(280px 180px at 60% 100%, rgba(5, 106, 100, 0.12), transparent 70%);
}
.hero-band::before,
.hero-band::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.hero-band::before {
  width: 340px;
  height: 340px;
  right: -90px;
  top: -120px;
  border: 48px solid rgba(5, 106, 100, 0.1);
}
.hero-band::after {
  width: 180px;
  height: 180px;
  left: 42%;
  bottom: -70px;
  background: rgba(5, 106, 100, 0.08);
}
.hero-band .landing-hero,
.hero-band .trust-strip { position: relative; z-index: 1; }
html[data-theme="dark"] .hero-band {
  background:
    radial-gradient(640px 360px at 88% 0%, rgba(43, 179, 171, 0.22), transparent 68%),
    radial-gradient(420px 280px at 0% 100%, rgba(91, 92, 226, 0.18), transparent 70%),
    #0f161c;
}
html[data-theme="dark"] .hero-band::before { border-color: rgba(127, 212, 207, 0.16); }
html[data-theme="dark"] .hero-band::after { background: rgba(43, 179, 171, 0.08); }
.band-alt { background: rgba(5, 106, 100, 0.06); }
html[data-theme="dark"] .band-alt { background: rgba(43, 179, 171, 0.07); }
.band-alt > .landing-section,
.landing-section { padding-top: 56px; padding-bottom: 56px; }
.steps { position: relative; }
.steps::before {
  content: "";
  position: absolute;
  top: 19px;
  left: 12%;
  right: 12%;
  height: 2px;
  background: #056a64;
  z-index: 0;
}
.step-col { min-width: 0; }
.step-num {
  width: 40px;
  height: 40px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #056a64;
  color: #fff;
  font-weight: 750;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 6px var(--band-ring, #e7f3f2);
}
.band-alt { --band-ring: #e7f3f2; }
html[data-theme="dark"] .band-alt { --band-ring: #12262a; }
.step { padding: 16px 16px 18px; }
.stat-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 14px;
  margin: 0 0 16px;
}
.stat-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.stat-block strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--ink);
}
.stat-block span { display: block; margin-top: 6px; font-weight: 750; color: var(--ink); }
.stat-block p { margin: 8px 0 0; color: var(--muted); line-height: 1.45; }
.stat-block.lead {
  background: #056a64;
  border-color: #056a64;
}
.stat-block.lead strong,
.stat-block.lead span,
.stat-block.lead p { color: #fff; }
.roi-panel {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(240px, 0.9fr);
  gap: 22px;
  align-items: center;
  padding: 28px;
  border-radius: 18px;
  background: linear-gradient(145deg, #056a64, #034e49);
  color: #fff;
}
.roi-panel h3 { margin: 0 0 12px; color: #fff; font-size: 1.35rem; }
.roi-panel .roi-fields { margin: 0 0 12px; }
.roi-panel .roi-fields label,
.roi-panel .roi-note { color: #fff; }
.roi-panel input {
  background: #fff;
  color: #102A43;
  border-color: transparent;
}
.roi-readout { text-align: left; }
.roi-kicker {
  margin: 0;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.roi-figure {
  margin: 6px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 4.6rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  color: #fff;
  font-weight: 700;
}
.roi-panel .roi-result {
  margin: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  font-weight: 600;
  line-height: 1.45;
}
.feature,
.value-card,
.audience-card,
.problem-list li,
.price-card,
.step {
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.feature:hover,
.value-card:hover,
.audience-card:hover,
.problem-list li:hover,
.price-card:hover,
.step:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(16, 42, 67, 0.1);
}
@media (prefers-reduced-motion: reduce) {
  .feature, .value-card, .audience-card, .problem-list li, .price-card, .step, .browser-frame, .float-paid {
    transition: none;
    transform: none;
  }
  .feature:hover, .value-card:hover, .audience-card:hover, .problem-list li:hover, .price-card:hover, .step:hover {
    transform: none;
  }
}
@media (max-width: 900px) {
  .stat-row, .roi-panel, .value-grid, .problem-list, .steps, .feature-grid { grid-template-columns: 1fr; }
  .steps::before { display: none; }
  .browser-frame, .float-paid { transform: none; }
  .float-paid { position: static; display: inline-block; margin: 0 0 12px; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .roi-fields { grid-template-columns: 1fr; }
}

/* White on brand teal. #056a64 + #fff is 6.46:1; #034e49 + #fff is 9.59:1.
   Light chips (--brand-soft, #e5f4f3, secondary/ghost buttons) are not fills. */
body:not(.admin-body) .btn:not(.secondary):not(.ghost):not(.danger),
body:not(.admin-body) .btn:not(.secondary):not(.ghost):not(.danger):visited,
.inp-chat .btn,
.inp-chat .btn:visited,
.inp-chat-tab,
.inp-chat-head,
.inp-chat-msg.user,
.nav a.active,
.brand-logo:not(.img) {
  color: #fff;
}
body:not(.admin-body) .btn:not(.secondary):not(.ghost):not(.danger),
.inp-chat .btn,
.inp-chat-tab,
.inp-chat-head,
.inp-chat-msg.user,
.nav a.active {
  background-color: #056a64;
}
body:not(.admin-body) .btn:not(.secondary):not(.ghost):not(.danger):hover,
body:not(.admin-body) .btn:not(.secondary):not(.ghost):not(.danger):focus,
body:not(.admin-body) .btn:not(.secondary):not(.ghost):not(.danger):focus-visible,
body:not(.admin-body) .btn:not(.secondary):not(.ghost):not(.danger):active,
.inp-chat .btn:hover,
.inp-chat .btn:focus,
.inp-chat .btn:focus-visible,
.inp-chat .btn:active,
.inp-chat-tab:hover,
.inp-chat-tab:focus,
.inp-chat-tab:focus-visible,
.inp-chat-tab:active {
  background-color: #034e49;
  color: #fff;
}
body:not(.admin-body) .btn:not(.secondary):not(.ghost):not(.danger) :is(span, strong, em, small, b, svg),
.inp-chat .btn :is(span, strong, em, small, b, svg),
.inp-chat-head strong,
.inp-chat-msg.user :is(a, span, strong, em, small),
.nav a.active,
.nav a.active svg,
.inp-chat-tab,
.inp-chat-tab svg {
  color: #fff;
}
.inp-chat-tab svg { stroke: #fff; }
.inp-chat-msg.user a { color: #fff; text-decoration: underline; }
.inp-chat-head .inp-chat-hide,
.inp-chat-head .inp-chat-hide:hover,
.inp-chat-head .inp-chat-hide:focus,
.inp-chat-head .inp-chat-hide:focus-visible,
.inp-chat-head .inp-chat-hide:active {
  background: #fff;
  color: #056a64;
}
.inp-chat-head .inp-chat-hide:hover,
.inp-chat-head .inp-chat-hide:focus-visible {
  background: #e5f4f3;
  color: #034e49;
}
/* White button sitting on the teal closing band. Teal text on white is 6.46:1. */
body.landing .cta-band a.btn.on-light:not(.secondary):not(.ghost):not(.danger),
body.landing .cta-band a.btn.on-light:not(.secondary):not(.ghost):not(.danger):visited,
body.landing .cta-band a.btn.on-light:not(.secondary):not(.ghost):not(.danger):hover,
body.landing .cta-band a.btn.on-light:not(.secondary):not(.ghost):not(.danger):focus,
body.landing .cta-band a.btn.on-light:not(.secondary):not(.ghost):not(.danger):focus-visible,
body.landing .cta-band a.btn.on-light:not(.secondary):not(.ghost):not(.danger):active {
  background: #fff;
  background-color: #fff;
  color: #056a64;
}
body.landing .cta-band a.btn.on-light:not(.secondary):not(.ghost):not(.danger):hover,
body.landing .cta-band a.btn.on-light:not(.secondary):not(.ghost):not(.danger):focus-visible {
  background: #e5f4f3;
  background-color: #e5f4f3;
  color: #034e49;
}
