/* Money Tree admin portal design system. Self-contained: no framework, no CDN. */

:root {
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;

  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --bg: #f4f6fa;
  --panel: #ffffff;
  --fill: #f8fafc;

  --accent-50: #f0fdfa;
  --accent-100: #ccfbf1;
  --accent-200: #99f6e4;
  --accent-500: #14b8a6;
  --accent-600: #0d9488;
  --accent: #0f766e;
  --accent-800: #115e59;

  --success-bg: #ecfdf5; --success-fg: #047857; --success-dot: #10b981;
  --warn-bg: #fffbeb;    --warn-fg: #b45309;    --warn-dot: #f59e0b;
  --danger-bg: #fef2f2;  --danger-fg: #b91c1c;  --danger-dot: #ef4444;
  --info-bg: #eff6ff;    --info-fg: #1d4ed8;    --info-dot: #3b82f6;
  --neutral-bg: #f1f5f9; --neutral-fg: #475569; --neutral-dot: #94a3b8;

  --sidebar-bg: #0b1220;
  --sidebar-fg: #cbd5e1;
  --sidebar-muted: #64748b;
  --sidebar-line: rgba(148, 163, 184, .14);
  --sidebar-w: 260px;
  --topbar-h: 60px;

  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, .06), 0 2px 4px rgba(15, 23, 42, .04);
  --shadow-lg: 0 24px 48px -12px rgba(15, 23, 42, .25);
  --ease: 160ms cubic-bezier(.2, .7, .3, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--ink);
  background: var(--bg); font-feature-settings: "cv11", "ss01", "tnum"; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent-500); outline-offset: 2px; border-radius: var(--r-sm); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 1rem; height: 1rem; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon--lg { width: 1.5rem; height: 1.5rem; }
.mono { font-family: var(--mono); font-size: .8125rem; }
.muted { color: var(--muted); }
.break { overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } html { scroll-behavior: auto; } }

/* ---------- app shell ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--sidebar-bg); color: var(--sidebar-fg); border-right: 1px solid var(--sidebar-line);
}
.brand { display: flex; align-items: center; gap: .75rem; padding: 1.125rem 1.25rem; border-bottom: 1px solid var(--sidebar-line); color: #fff; }
.brand__mark { width: 36px; height: 36px; border-radius: 10px; flex: none; }
.brand__name { font-weight: 700; font-size: .9375rem; letter-spacing: -.01em; line-height: 1.2; }
.brand__sub { font-size: .6875rem; color: var(--sidebar-muted); text-transform: uppercase; letter-spacing: .16em; }
.nav { padding: 1rem .75rem; display: flex; flex-direction: column; gap: .125rem; flex: 1; }
.nav__group { padding: 1rem .75rem .375rem; font-size: .6875rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--sidebar-muted); }
.nav__link {
  display: flex; align-items: center; gap: .75rem; padding: .625rem .75rem; border-radius: var(--r-sm);
  color: var(--sidebar-fg); font-weight: 500; transition: background var(--ease), color var(--ease);
}
.nav__link:hover { background: rgba(148, 163, 184, .1); color: #fff; }
.nav__link.is-active { background: var(--accent); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.nav__link.is-soon { color: var(--sidebar-muted); cursor: not-allowed; }
.nav__link.is-soon:hover { background: transparent; color: var(--sidebar-muted); }
.nav__tag { margin-left: auto; font-size: .625rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: .125rem .5rem; border-radius: var(--r-pill); background: rgba(148, 163, 184, .16); color: var(--sidebar-muted); }
.sidebar__footer { padding: 1rem 1.25rem; border-top: 1px solid var(--sidebar-line); font-size: .75rem; color: var(--sidebar-muted); display: flex; justify-content: space-between; gap: .5rem; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--topbar-h); display: flex; align-items: center; gap: 1rem;
  padding: 0 1.5rem; background: rgba(255, 255, 255, .86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.topbar__menu { display: none; }
.breadcrumbs { display: flex; align-items: center; gap: .5rem; font-size: .8125rem; color: var(--muted); min-width: 0; }
.breadcrumbs a:hover { color: var(--ink); }
.breadcrumbs .is-current { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breadcrumbs__sep { color: var(--line-2); }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-100); color: var(--accent-800); font-weight: 700; font-size: .75rem; }
.content { padding: 1.75rem 1.5rem 4rem; width: 100%; max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.5rem; }
.scrim { display: none; }
/* Pages author a single <main>; space its sections here (closed dialogs are display:none and take no gap). */
.content > main { display: flex; flex-direction: column; gap: 2rem; min-width: 0; }

@media (max-width: 1023px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; width: min(85vw, 300px); z-index: 40; transform: translateX(-102%); transition: transform 220ms cubic-bezier(.2, .7, .3, 1); box-shadow: var(--shadow-lg); }
  .app.is-nav-open .sidebar { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(15, 23, 42, .45); opacity: 0; pointer-events: none; transition: opacity var(--ease); }
  .app.is-nav-open .scrim { opacity: 1; pointer-events: auto; }
  .topbar__menu { display: inline-flex; }
  .topbar { padding: 0 1rem; }
  .content { padding: 1.25rem 1rem 5rem; }
  .content > main { gap: 1.5rem; }
}

/* ---------- page header ---------- */
.page-header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.page-header__eyebrow { font-size: .6875rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin-bottom: .375rem; }
.page-header__title { font-size: 1.625rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; display: flex; flex-wrap: wrap; align-items: center; gap: .625rem; }
.page-header__subtitle { margin-top: .375rem; color: var(--muted); max-width: 60ch; }
.page-header__actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .5625rem .9375rem; border-radius: var(--r-sm);
  font-weight: 600; font-size: .8125rem; line-height: 1.2; border: 1px solid transparent; white-space: nowrap; user-select: none;
  transition: background var(--ease), border-color var(--ease), color var(--ease), box-shadow var(--ease), transform var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--accent-800); }
.btn--secondary { background: var(--panel); color: var(--ink-2); border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.btn--secondary:hover { background: var(--fill); border-color: var(--muted-2); color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink-2); }
.btn--ghost:hover { background: var(--neutral-bg); color: var(--ink); }
.btn--danger { background: var(--panel); color: var(--danger-fg); border-color: #fecaca; }
.btn--danger:hover { background: var(--danger-bg); }
.btn--warn { background: var(--panel); color: var(--warn-fg); border-color: #fde68a; }
.btn--warn:hover { background: var(--warn-bg); }
.btn--success { background: var(--panel); color: var(--success-fg); border-color: #a7f3d0; }
.btn--success:hover { background: var(--success-bg); }
.btn--sm { padding: .375rem .625rem; font-size: .75rem; }
.btn--icon { padding: .4375rem; width: 2rem; height: 2rem; }
.btn--icon.btn--sm { width: 1.75rem; height: 1.75rem; padding: .25rem; }

/* ---------- cards & stats ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card__header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.card__title { font-size: .9375rem; font-weight: 700; display: flex; align-items: center; gap: .5rem; }
.card__title .icon { color: var(--accent); }
.card__hint { color: var(--muted); font-size: .8125rem; margin-top: .125rem; }
.card__body { padding: 1.25rem; }
.card__footer { padding: .875rem 1.25rem; border-top: 1px solid var(--line); background: var(--fill); border-radius: 0 0 var(--r-lg) var(--r-lg); display: flex; justify-content: flex-end; gap: .5rem; }
.card--interactive { transition: box-shadow var(--ease), border-color var(--ease), transform var(--ease); }
.card--interactive:hover { border-color: var(--line-2); box-shadow: var(--shadow-md); transform: translateY(-1px); }

.grid { display: grid; gap: 1.25rem; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid--4, .grid--2 { grid-template-columns: minmax(0, 1fr); } }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { display: flex; align-items: center; gap: 1rem; padding: 1.125rem 1.25rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.stat__icon { width: 42px; height: 42px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--accent-50); color: var(--accent); flex: none; }
.stat__icon--success { background: var(--success-bg); color: var(--success-fg); }
.stat__icon--warn { background: var(--warn-bg); color: var(--warn-fg); }
.stat__icon--neutral { background: var(--neutral-bg); color: var(--neutral-fg); }
.stat__label { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stat__value { font-size: 1.625rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin-top: .125rem; }

/* ---------- badges & chips ---------- */
.badge { display: inline-flex; align-items: center; gap: .4rem; padding: .1875rem .625rem .1875rem .5rem; border-radius: var(--r-pill); font-size: .75rem; font-weight: 600; white-space: nowrap; background: var(--neutral-bg); color: var(--neutral-fg); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--neutral-dot); }
.badge--success { background: var(--success-bg); color: var(--success-fg); } .badge--success::before { background: var(--success-dot); }
.badge--warn { background: var(--warn-bg); color: var(--warn-fg); } .badge--warn::before { background: var(--warn-dot); }
.badge--danger { background: var(--danger-bg); color: var(--danger-fg); } .badge--danger::before { background: var(--danger-dot); }
.badge--info { background: var(--info-bg); color: var(--info-fg); } .badge--info::before { background: var(--info-dot); }
.badge--accent { background: var(--accent-50); color: var(--accent-800); } .badge--accent::before { background: var(--accent-500); }

.code { display: inline-flex; align-items: center; gap: .375rem; padding: .125rem .25rem .125rem .5rem; border-radius: var(--r-sm); background: var(--fill); border: 1px solid var(--line); font-family: var(--mono); font-size: .75rem; color: var(--ink-2); max-width: 100%; }
.code > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code__copy { border: 0; background: transparent; padding: .125rem; border-radius: 4px; color: var(--muted); display: inline-flex; }
.code__copy:hover { color: var(--accent); background: var(--accent-50); }
.code__copy .icon { width: .875rem; height: .875rem; }
.code__copy.is-done { color: var(--success-fg); }

/* ---------- key/value lists ---------- */
.kv { display: grid; gap: .875rem; margin: 0; }
.kv dt { font-size: .6875rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.kv dd { margin: .125rem 0 0; color: var(--ink); overflow-wrap: anywhere; }
.kv dd.sub { color: var(--muted); font-size: .8125rem; }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table th { text-align: left; font-size: .6875rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: .75rem 1.25rem; background: var(--fill); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--ease); }
.table tbody tr:hover { background: #fbfcfe; }
.table__primary { font-weight: 600; color: var(--ink); }
.table__sub { margin-top: .25rem; color: var(--muted); font-size: .8125rem; }
.table__actions { text-align: right; white-space: nowrap; }
.table__actions .actions { display: inline-flex; gap: .375rem; align-items: center; }
.table__actions form { display: inline; }
@media (max-width: 767px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; }
  .table tr { border: 1px solid var(--line); border-radius: var(--r-md); margin: .75rem 1rem; padding: .25rem .875rem; background: var(--panel); }
  .table td { display: flex; justify-content: space-between; gap: 1rem; padding: .625rem 0; border-bottom: 1px solid var(--line); text-align: right; }
  .table td::before { content: attr(data-label); font-size: .6875rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-align: left; padding-top: .125rem; flex: none; }
  .table td:last-child { border-bottom: 0; }
  .table__actions::before { display: none; }
  .table__actions .actions { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
}

.search { position: relative; display: flex; align-items: center; min-width: 240px; }
.search .icon { position: absolute; left: .75rem; color: var(--muted-2); pointer-events: none; }
.search .input { padding-left: 2.25rem; }

/* ---------- empty state ---------- */
.empty-state { padding: 3.5rem 1.5rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.empty-state__icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-50); color: var(--accent); margin-bottom: .5rem; }
.empty-state__title { font-weight: 700; font-size: 1rem; }
.empty-state__text { color: var(--muted); max-width: 44ch; }
.empty-state .btn { margin-top: .75rem; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: .375rem; }
.field__label { font-weight: 600; font-size: .8125rem; color: var(--ink-2); display: flex; align-items: center; gap: .25rem; }
.field__label .req { color: var(--danger-fg); }
.field__help { color: var(--muted); font-size: .75rem; line-height: 1.5; }
.field__help code { font-family: var(--mono); font-size: .7rem; background: var(--fill); border: 1px solid var(--line); padding: 0 .25rem; border-radius: 4px; }
.field__error { color: var(--danger-fg); font-size: .75rem; font-weight: 500; }
.input, .textarea, .select {
  width: 100%; padding: .625rem .75rem; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--panel); color: var(--ink);
  transition: border-color var(--ease), box-shadow var(--ease); box-shadow: var(--shadow-sm);
}
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.input:hover, .textarea:hover { border-color: var(--muted-2); }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent-500); box-shadow: 0 0 0 3px var(--accent-100); }
.field.is-invalid .input, .field.is-invalid .textarea { border-color: #fca5a5; }
.field.is-invalid .input:focus, .field.is-invalid .textarea:focus { box-shadow: 0 0 0 3px #fee2e2; }
.textarea { resize: vertical; min-height: 6rem; line-height: 1.55; }
.input--mono, .textarea--mono { font-family: var(--mono); font-size: .8125rem; }
.input-group { position: relative; display: flex; }
.input-group .input { padding-right: 2.75rem; }
.input-group__btn { position: absolute; right: .375rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; padding: .375rem; border-radius: 6px; color: var(--muted); display: inline-flex; }
.input-group__btn:hover { color: var(--ink); background: var(--neutral-bg); }
.checkbox { display: flex; align-items: flex-start; gap: .75rem; padding: .875rem 1rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--fill); cursor: pointer; }
.checkbox input { margin-top: .2rem; width: 1rem; height: 1rem; accent-color: var(--accent); flex: none; }
.checkbox__title { font-weight: 600; font-size: .8125rem; }
.checkbox__text { color: var(--muted); font-size: .75rem; }
.fields { display: grid; gap: 1.125rem; }
.fields--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .fields--2 { grid-template-columns: minmax(0, 1fr); } }
.form-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 2rem; align-items: start; }
.form-sections { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.section-nav { position: sticky; top: calc(var(--topbar-h) + 1.5rem); display: flex; flex-direction: column; gap: .125rem; }
.section-nav__link { padding: .5rem .75rem; border-radius: var(--r-sm); color: var(--muted); font-weight: 500; font-size: .8125rem; border-left: 2px solid transparent; transition: color var(--ease), background var(--ease); }
.section-nav__link:hover { color: var(--ink); background: var(--neutral-bg); }
.section-nav__link.is-active { color: var(--accent-800); border-left-color: var(--accent); background: var(--accent-50); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
@media (max-width: 900px) { .form-layout { grid-template-columns: minmax(0, 1fr); } .section-nav { display: none; } }
.form-actions { position: sticky; bottom: 0; z-index: 10; margin-top: .5rem; padding: .875rem 1.25rem; display: flex; justify-content: flex-end; gap: .625rem; align-items: center; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-md); }
.form-actions__note { margin-right: auto; color: var(--muted); font-size: .8125rem; }
.token-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: .875rem 1rem; border: 1px dashed var(--line-2); border-radius: var(--r-md); background: var(--fill); }
.preview { padding: .875rem 1rem; border: 1px dashed var(--line-2); border-radius: var(--r-md); background: var(--fill); }
.preview__label { font-size: .6875rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .375rem; }
.preview__text { white-space: pre-line; color: var(--ink-2); font-size: .8125rem; line-height: 1.55; }
.preview__header { font-weight: 700; color: var(--ink); font-size: .8125rem; margin-bottom: .25rem; }
.preview__footer { color: var(--muted); font-size: .75rem; margin-top: .375rem; }
.template-buttons { margin-top: .75rem; }
.preview__media { display: block; max-width: 100%; max-height: 220px; border-radius: var(--r-md); margin-bottom: .75rem; }
.upload { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .5rem; }
.upload input[type=file] { font-size: .75rem; max-width: 100%; }

/* ---------- alerts ---------- */
.alerts { display: flex; flex-direction: column; gap: .5rem; }
.alert { display: flex; align-items: flex-start; gap: .75rem; padding: .8125rem 1rem; border-radius: var(--r-md); border: 1px solid; font-size: .875rem; transition: opacity 300ms, transform 300ms; }
.alert .icon { margin-top: .125rem; }
.alert__text { flex: 1; }
.alert__close { margin-left: auto; border: 0; background: transparent; padding: .125rem; border-radius: 4px; color: inherit; opacity: .7; display: inline-flex; }
.alert__close:hover { opacity: 1; background: rgba(0, 0, 0, .06); }
.alert--success { background: var(--success-bg); border-color: #a7f3d0; color: var(--success-fg); }
.alert--error { background: var(--danger-bg); border-color: #fecaca; color: var(--danger-fg); }
.alert--warn { background: var(--warn-bg); border-color: #fde68a; color: var(--warn-fg); }
.alert.is-leaving { opacity: 0; transform: translateY(-4px); }

/* ---------- dialogs ---------- */
.dialog { border: 0; padding: 0; width: min(92vw, 40rem); border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--shadow-lg); color: var(--ink); }
.dialog::backdrop { background: rgba(15, 23, 42, .55); backdrop-filter: blur(3px); }
.dialog[open] { animation: dialog-in 180ms cubic-bezier(.2, .7, .3, 1); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.dialog__header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.125rem 1.25rem; border-bottom: 1px solid var(--line); }
.dialog__title { font-size: 1rem; font-weight: 700; }
.dialog__body { padding: 1.25rem; display: grid; gap: 1.125rem; }
.dialog__footer { padding: .875rem 1.25rem; border-top: 1px solid var(--line); background: var(--fill); display: flex; justify-content: flex-end; gap: .5rem; border-radius: 0 0 var(--r-lg) var(--r-lg); }

/* ---------- misc ---------- */
.divider { height: 1px; background: var(--line); }
.inline { display: inline-flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }

/* ---------- public site ---------- */
.site-body { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(1200px 480px at 50% -120px, var(--accent-100), transparent 70%), var(--bg); }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; max-width: 1120px; margin: 0 auto; padding: 1rem 1.5rem; }
.site-header__brand { display: flex; align-items: center; gap: .625rem; }
.site-header__brand img { border-radius: 9px; flex: none; }
.site-header__sub { font-size: .6875rem; color: var(--muted); text-transform: uppercase; letter-spacing: .16em; }
.site { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 3rem 1.5rem 4rem; display: flex; flex-direction: column; gap: 3.5rem; }
.hero { max-width: 44rem; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero__title { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.hero__subtitle { margin-top: 1rem; font-size: 1.0625rem; color: var(--muted); max-width: 38rem; }
.hero__actions { margin-top: 2rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
.hero__actions .btn { padding: .75rem 1.25rem; font-size: .875rem; }
.site-tag { font-size: .625rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: .125rem .5rem; border-radius: var(--r-pill); background: var(--neutral-bg); color: var(--neutral-fg); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.feature { display: flex; flex-direction: column; gap: .75rem; }
.site-footer { width: 100%; max-width: 1120px; margin: 0 auto; padding: 1.25rem 1.5rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: .5rem; font-size: .75rem; color: var(--muted); }
@media (max-width: 640px) {
  .site-header, .site-footer { padding-left: 1rem; padding-right: 1rem; }
  .site { padding: 2rem 1rem 3rem; gap: 2.5rem; }
  .hero__actions { flex-direction: column; align-self: stretch; }
}
