@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&display=swap');

:root {
  --font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;

  --bg: oklch(0.975 0.004 258);
  --surface: oklch(1 0 0);
  --surface-2: oklch(0.966 0.006 258);
  --surface-3: oklch(0.945 0.008 258);
  --border: oklch(0.915 0.01 258);
  --border-strong: oklch(0.855 0.014 258);

  --ink: oklch(0.24 0.035 258);
  --ink-2: oklch(0.42 0.03 258);
  --muted: oklch(0.53 0.025 258);

  --nav-bg: oklch(0.215 0.04 258);
  --nav-line: oklch(0.3 0.035 258);
  --nav-ink: oklch(0.78 0.025 258);
  --nav-hover: oklch(0.27 0.04 258);
  --nav-active: oklch(0.31 0.045 258);

  --brand: oklch(0.7 0.17 38);
  --accent: oklch(0.565 0.165 37);
  --accent-hover: oklch(0.52 0.16 37);
  --accent-soft: oklch(0.96 0.025 40);
  --focus: oklch(0.565 0.165 37 / 0.28);

  --ok: oklch(0.5 0.12 155);
  --ok-soft: oklch(0.955 0.035 155);
  --warn: oklch(0.52 0.11 70);
  --warn-soft: oklch(0.965 0.04 80);
  --bad: oklch(0.52 0.18 24);
  --bad-soft: oklch(0.955 0.03 20);
  --info: oklch(0.48 0.13 255);
  --info-soft: oklch(0.955 0.025 255);

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;

  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;

  --control-h: 38px;
  --control-h-sm: 32px;

  --shadow-sm: 0 1px 2px oklch(0.24 0.035 258 / 0.05);
  --shadow-lg: 0 24px 64px oklch(0.2 0.04 258 / 0.22), 0 2px 8px oklch(0.2 0.04 258 / 0.08);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 150ms;

  --z-sticky: 10;
  --z-modal: 40;
  --z-toast: 50;

  color-scheme: light;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; font-weight: 600; letter-spacing: -0.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg.icon { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Form controls (global) ---------- */

input:not([type='checkbox']):not([type='radio']),
select,
textarea {
  display: block;
  width: 100%;
  min-height: var(--control-h);
  padding: 0 var(--s-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
textarea { padding: var(--s-2) var(--s-3); min-height: 96px; resize: vertical; }
select {
  appearance: none;
  padding-right: var(--s-8);
  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='%23626c80' 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 10px center;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:not([type='checkbox']):not([type='radio']):hover,
select:hover,
textarea:hover { border-color: oklch(0.78 0.018 258); }
input:not([type='checkbox']):not([type='radio']):focus,
select:focus,
textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
input:user-invalid, select:user-invalid, textarea:user-invalid { border-color: var(--bad); }
input:user-invalid:focus, select:user-invalid:focus { box-shadow: 0 0 0 3px oklch(0.52 0.18 24 / 0.22); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; box-shadow: none; }
input[type='checkbox'], input[type='radio'] { width: 16px; height: 16px; margin: 0; flex: none; accent-color: var(--accent); cursor: pointer; }

.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .field-label { font-size: 13px; font-weight: 500; color: var(--ink); }
.field-label .optional { color: var(--muted); font-weight: 400; }
.field-hint { font-size: 12px; color: var(--muted); }
.form-stack { display: grid; gap: var(--s-4); }
.check { display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); cursor: pointer; }
.check input { margin-top: 2px; }
.check strong { display: block; font-size: 13px; font-weight: 600; }
.check span { display: block; font-size: 12px; color: var(--ink-2); margin-top: 2px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: var(--control-h);
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.btn:hover { background: var(--surface-2); border-color: oklch(0.8 0.016 258); }
.btn:active { background: var(--surface-3); }
.btn:disabled, .btn[aria-busy='true'] { opacity: 0.55; cursor: not-allowed; }
.btn[aria-busy='true'] { cursor: progress; }
.btn.sm { min-height: var(--control-h-sm); padding: 0 var(--s-3); font-size: 12.5px; }
.btn.block { width: 100%; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: oklch(1 0 0); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: oklch(1 0 0); }
.btn.dark:hover { background: oklch(0.3 0.04 258); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-3); color: var(--ink); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); border-color: oklch(0.85 0.06 24); }
.btn.icon-only { width: var(--control-h); padding: 0; }
.btn.sm.icon-only { width: var(--control-h-sm); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.actions.end { justify-content: flex-end; }
.actions .spacer { flex: 1; }

/* ---------- Shell ---------- */

.app-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
  padding: var(--s-5) var(--s-3);
  background: var(--nav-bg);
  color: var(--nav-ink);
}
.brand { display: flex; align-items: center; gap: var(--s-3); padding: 0 var(--s-2); color: oklch(1 0 0); font-size: 17px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-md); background: var(--brand); color: oklch(1 0 0); font-size: 15px; font-weight: 700; flex: none; }
.brand small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; letter-spacing: 0; color: var(--nav-ink); }

.nav { display: grid; gap: 2px; }
.nav button {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: 38px;
  padding: 0 var(--s-3);
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--nav-ink);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.nav button:hover { background: var(--nav-hover); color: oklch(1 0 0); }
.nav button.active { background: var(--nav-active); color: oklch(1 0 0); }
.nav button.active .icon { color: var(--brand); }
.nav .icon { width: 18px; height: 18px; }

.user-block { margin-top: auto; padding-top: var(--s-4); border-top: 1px solid var(--nav-line); display: grid; gap: var(--s-1); }
.user-id { display: flex; align-items: center; gap: var(--s-3); padding: 0 var(--s-2) var(--s-2); min-width: 0; }
.user-id > div { min-width: 0; }
.user-id strong { display: block; color: oklch(1 0 0); font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-id > div > span { display: block; font-size: 12px; color: var(--nav-ink); }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--nav-active); color: oklch(1 0 0); font-size: 12px; font-weight: 600; }
.user-block .nav button { min-height: 34px; font-size: 13px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  height: 56px;
  padding: 0 var(--s-8);
  background: oklch(1 0 0 / 0.92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}
.breadcrumb { display: flex; align-items: center; gap: var(--s-2); min-width: 0; font-size: 13px; color: var(--muted); }
.breadcrumb .icon { width: 14px; height: 14px; }
.breadcrumb strong { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.date-pill { font-size: 13px; color: var(--ink-2); white-space: nowrap; }

.content { width: 100%; max-width: 1320px; margin: 0 auto; padding: var(--s-8) var(--s-8) 64px; display: grid; gap: var(--s-6); align-content: start; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.page-head h1 { font-size: 24px; line-height: 1.25; letter-spacing: -0.02em; }
.page-head p { margin-top: var(--s-1); color: var(--ink-2); font-size: 14px; max-width: 70ch; }

/* ---------- Surfaces ---------- */

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: var(--s-5); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; margin-bottom: var(--s-4); min-height: var(--control-h-sm); }
.card-head h2 { font-size: 15px; line-height: 1.3; }
.card-head .meta { font-size: 13px; color: var(--muted); }
.card > p.lead { color: var(--ink-2); font-size: 13px; margin-bottom: var(--s-4); max-width: 65ch; }
.card.danger-zone { border-color: oklch(0.9 0.03 24); }

.grid { display: grid; gap: var(--s-6); min-width: 0; align-content: start; }
.wide-grid { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); align-items: start; }
.detail-grid { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; overflow: hidden; }
.stat { padding: var(--s-5); border-left: 1px solid var(--border); min-width: 0; }
.stat:first-child { border-left: 0; }
.stat-label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.stat-value { margin-top: var(--s-2); font-size: 24px; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-sub { margin-top: var(--s-1); font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Lists ---------- */

.list { display: grid; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-3) 0; border-top: 1px solid var(--border); min-width: 0; }
.list-row:first-child { border-top: 0; padding-top: 0; }
.list-row:last-child { padding-bottom: 0; }
.list-row > .grow { flex: 1; min-width: 0; }
.list-row .title { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.list-row .sub { margin-top: 2px; font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.list-row .sub + .sub { margin-top: 0; }
.list-row .end { display: flex; align-items: center; gap: var(--s-2); flex: none; }
.list-row.selectable { cursor: pointer; border-radius: var(--r-md); }
.list-row .amount { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }

.client-logo { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: var(--r-md); background: var(--surface-3); color: var(--ink-2); font-size: 12px; font-weight: 600; }

.account { padding: var(--s-4) 0; border-top: 1px solid var(--border); }
.card-head + .account { border-top: 0; padding-top: 0; }
.account:last-child { padding-bottom: 0; }
.account .list-row { padding: 0; border: 0; }
.account .toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: var(--s-3); }
.account .toolbar .divider { width: 1px; align-self: stretch; margin: 4px var(--s-1); background: var(--border); }

.log { display: grid; }
.log div { padding: var(--s-2) 0; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.log div:first-child { border-top: 0; }
.subhead { margin: var(--s-6) 0 var(--s-2); font-size: 13px; font-weight: 600; }

/* ---------- Badges ---------- */

.status, .provider { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 var(--s-2); border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; line-height: 1; }
.status { background: var(--surface-3); color: var(--ink-2); }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.ok { background: var(--ok-soft); color: var(--ok); }
.status.warn { background: var(--warn-soft); color: var(--warn); }
.status.bad { background: var(--bad-soft); color: var(--bad); }
.provider { border-radius: var(--r-sm); font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
.provider.meta { background: var(--info-soft); color: var(--info); }
.provider.google { background: var(--warn-soft); color: var(--warn); }

/* ---------- Tables ---------- */

.table-wrap { margin: 0 calc(var(--s-5) * -1) calc(var(--s-5) * -1); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { padding: 10px var(--s-3); text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); background: var(--surface-2); border-block: 1px solid var(--border); white-space: nowrap; }
.table td { padding: var(--s-3); border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th:first-child, .table td:first-child { padding-left: var(--s-5); }
.table th:last-child, .table td:last-child { padding-right: var(--s-5); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: oklch(0.985 0.003 258); }
.table td strong { font-weight: 600; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .cell-actions { text-align: right; white-space: nowrap; }
.table .cell-actions .actions { justify-content: flex-end; flex-wrap: nowrap; }
.table .cell-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.table td.empty { padding: var(--s-10) var(--s-5); }

/* ---------- Callouts, empty, preview ---------- */

.callout { display: flex; gap: var(--s-3); padding: var(--s-3) var(--s-4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); color: var(--ink-2); font-size: 13px; line-height: 1.55; }
.callout .icon { margin-top: 2px; color: var(--muted); }
.callout strong { color: var(--ink); font-weight: 600; }
.callout.warn { background: var(--warn-soft); border-color: oklch(0.9 0.05 80); color: oklch(0.38 0.06 70); }
.callout.warn .icon, .callout.warn strong { color: oklch(0.42 0.09 70); }
.callout.accent { background: var(--accent-soft); border-color: oklch(0.9 0.05 40); color: oklch(0.4 0.08 38); }
.callout.accent .icon, .callout.accent strong { color: var(--accent-hover); }

.empty { padding: var(--s-8) var(--s-4); text-align: center; color: var(--ink-2); font-size: 13px; }
.empty strong { display: block; color: var(--ink); font-size: 14px; font-weight: 600; margin-bottom: var(--s-1); }
.empty .actions { justify-content: center; margin-top: var(--s-4); }

.report-preview { margin-top: var(--s-4); padding: var(--s-4); max-height: 480px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); font-size: 13px; line-height: 1.6; }
.report-preview:first-child { margin-top: 0; }
.note { margin-top: var(--s-3); }
.sep { height: 1px; margin: var(--s-5) 0; background: var(--border); border: 0; }

/* ---------- Modal ---------- */

.modal-backdrop { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: var(--s-5); background: oklch(0.18 0.035 258 / 0.55); animation: fade var(--t-fast) var(--ease); }
.modal { display: flex; flex-direction: column; width: min(480px, 100%); max-height: min(760px, calc(100dvh - 40px)); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); animation: rise 200ms var(--ease); }
.modal.wide { width: min(680px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); padding: var(--s-5) var(--s-6) var(--s-4); }
.modal-head h2 { font-size: 17px; line-height: 1.3; }
.modal-head p { margin-top: var(--s-1); font-size: 13px; color: var(--ink-2); }
.modal-head .btn { margin: -6px -10px 0 0; }
.modal-body { padding: var(--s-1) var(--s-6) var(--s-6); overflow-y: auto; overscroll-behavior: contain; }
.modal-body > .callout { margin-bottom: var(--s-4); }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: var(--s-2); padding: var(--s-4) var(--s-6); border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.modal-foot .spacer { flex: 1; }

/* ---------- Toast ---------- */

.toast { position: fixed; right: var(--s-6); bottom: var(--s-6); z-index: var(--z-toast); display: flex; align-items: flex-start; gap: var(--s-3); max-width: min(380px, calc(100vw - 32px)); padding: var(--s-3) var(--s-4); background: var(--ink); color: oklch(1 0 0); border-radius: var(--r-md); box-shadow: var(--shadow-lg); font-size: 13px; line-height: 1.45; animation: rise 200ms var(--ease); }
.toast .icon { margin-top: 1px; color: oklch(0.8 0.1 155); }
.toast.error { background: var(--bad); }
.toast.error .icon { color: oklch(1 0 0); }

/* ---------- Auth ---------- */

.auth-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; background: var(--surface); }
.auth-art { display: flex; flex-direction: column; justify-content: space-between; gap: var(--s-8); padding: var(--s-10) clamp(32px, 6vw, 80px); background: var(--nav-bg); color: oklch(1 0 0); }
.auth-art h1 { max-width: 16ch; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.12; letter-spacing: -0.03em; }
.auth-art p { margin-top: var(--s-4); max-width: 42ch; font-size: 15px; line-height: 1.6; color: var(--nav-ink); }
.auth-art .foot { font-size: 13px; color: var(--nav-ink); }
.auth-form { display: grid; place-items: center; padding: var(--s-10) var(--s-6); }
.auth-form > div { width: min(380px, 100%); }
.auth-form h2 { font-size: 22px; letter-spacing: -0.02em; }
.auth-form > div > p { margin: var(--s-1) 0 var(--s-6); font-size: 14px; color: var(--ink-2); }
.auth-form .btn.primary { margin-top: var(--s-2); }
.auth-switch { margin-top: var(--s-4); text-align: center; }

/* ---------- Motion ---------- */

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .wide-grid, .detail-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(odd) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--border); }
}
@media (max-width: 760px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .sidebar { position: static; height: auto; gap: var(--s-3); padding: var(--s-3) var(--s-4); }
  .sidebar > .nav { display: flex; overflow-x: auto; margin: 0 calc(var(--s-4) * -1); padding: 0 var(--s-4); scrollbar-width: none; }
  .sidebar > .nav button { white-space: nowrap; flex: none; }
  .user-block { margin: 0; padding-top: var(--s-3); grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .user-id { padding: 0; }
  .user-block .nav { display: flex; }
  .user-block .nav button span { display: none; }
  .topbar { display: none; }
  .content { padding: var(--s-6) var(--s-4) var(--s-10); gap: var(--s-5); }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-head h1 { font-size: 22px; }
  .card { padding: var(--s-4); }
  .table-wrap { margin: 0 calc(var(--s-4) * -1) calc(var(--s-4) * -1); }
  .table th:first-child, .table td:first-child { padding-left: var(--s-4); }
  .table th:last-child, .table td:last-child { padding-right: var(--s-4); }
  .stat { padding: var(--s-4); }
  .stat-value { font-size: 20px; }
  .list-row { flex-wrap: wrap; row-gap: var(--s-2); }
  .list-row > .grow { flex: 1 1 180px; }
  .list-row > .end { margin-left: auto; }
  .auth-page { grid-template-columns: minmax(0, 1fr); }
  .auth-art { padding: var(--s-8) var(--s-6); gap: var(--s-6); }
  .auth-art h1 { font-size: 28px; }
  .auth-art .foot { display: none; }
  .auth-form { place-items: start center; padding: var(--s-8) var(--s-6); }
  .modal-backdrop { place-items: end center; padding: 0; }
  .modal, .modal.wide { width: 100%; max-height: calc(100dvh - 24px); border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .modal-head, .modal-body, .modal-foot { padding-left: var(--s-5); padding-right: var(--s-5); }
  .modal-foot { border-radius: 0; flex-wrap: wrap; }
  .toast { left: var(--s-4); right: var(--s-4); bottom: var(--s-4); max-width: none; }
}
