/* ============================================================================
   Ledger — PWA styles
   Mobile-first, iOS-safe-area aware, light + dark themes, editorial feel.
   ============================================================================ */

:root {
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:
    "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --bg: #faf8f4;
  --surface: #ffffff;
  --surface-2: #f3efe7;
  --ink: #181512;
  --ink-soft: #4a4540;
  --ink-muted: #8a847d;
  --line: #e8e2d6;
  --accent: #b8402a; /* warm clay red */
  --accent-ink: #ffffff;
  --positive: #2f7a4d;
  --warning: #b06b00;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-sm:
    0 1px 2px rgba(24, 21, 18, 0.04), 0 1px 1px rgba(24, 21, 18, 0.02);
  --shadow: 0 4px 16px rgba(24, 21, 18, 0.06);

  --safe-top: env(safe-area-inset-top);
  --safe-bot: env(safe-area-inset-bottom);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f1a;
    --surface: #131826;
    --surface-2: #1b2132;
    --ink: #f1ece4;
    --ink-soft: #c9c1b4;
    --ink-muted: #7e8699;
    --line: #232a3c;
    --accent: #e37155;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.1;
}
h2 {
  font-size: 20px;
  line-height: 1.2;
}
h3 {
  font-size: 17px;
  font-family: var(--font-body);
  font-weight: 600;
}

a {
  color: var(--accent);
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}

input,
select,
textarea {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  width: 100%;
  outline: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 64, 42, 0.12);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.serif {
  font-family: var(--font-display);
}

/* ----- Boot / loading ----------------------------------------------------- */
.boot {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.boot-mark {
  font-family: var(--font-display);
  font-size: 48px;
  color: var(--accent);
}
.boot-label {
  color: var(--ink-muted);
  font-size: 14px;
}

/* ----- App shell ---------------------------------------------------------- */
#app[data-loading="true"] .shell {
  display: none;
}

.shell {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100dvh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(12px + var(--safe-top)) 18px 12px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
}
.topbar-title em {
  color: var(--accent);
  font-style: normal;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.topbar-user {
  font-size: 13px;
  color: var(--ink-soft);
  padding: 0 4px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.icon-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 16px;
}
.icon-btn:hover {
  background: var(--surface-2);
}

/* ----- Main scroll area --------------------------------------------------- */
main {
  padding: 18px 18px 110px;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

/* ----- Bottom nav (mobile-first) ----------------------------------------- */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 8px 8px calc(8px + var(--safe-bot));
  gap: 2px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 5;
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 0;
  color: var(--ink-muted);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  border-radius: 10px;
}
.bottom-nav a.active {
  color: var(--accent);
}
.bottom-nav a .ic {
  font-size: 20px;
  line-height: 1;
}
.bottom-nav .fab {
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 999px;
  width: 52px;
  height: 52px;
  margin: -22px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 6px 20px rgba(184, 64, 42, 0.35);
  font-weight: 300;
}
.bottom-nav .fab-wrap {
  display: flex;
  justify-content: center;
}

/* ----- Cards -------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.card h2 {
  margin-bottom: 10px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.card-head .link {
  font-size: 13px;
  color: var(--accent);
}

/* ----- Hero totals -------------------------------------------------------- */
.hero {
  padding: 22px;
  background:
    radial-gradient(
      ellipse at top right,
      color-mix(in srgb, var(--accent) 12%, transparent),
      transparent 60%
    ),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin-bottom: 18px;
}
.hero-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
}
.hero-amount {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 6px 0 4px;
}
.hero-amount .cur {
  font-size: 22px;
  vertical-align: 0.25em;
  margin-right: 2px;
  color: var(--ink-muted);
}
.hero-delta {
  font-size: 13px;
  color: var(--ink-muted);
}
.hero-delta .up {
  color: var(--warning);
}
.hero-delta .down {
  color: var(--positive);
}

.hero-sub {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.hero-sub .s-label {
  font-size: 11px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.hero-sub .s-value {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  margin-top: 2px;
}

/* ----- Lists -------------------------------------------------------------- */
.list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.list li:last-child {
  border-bottom: none;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  font-size: 18px;
  flex-shrink: 0;
}
.row-main {
  flex: 1;
  min-width: 0;
}
.row-title {
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-sub {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 1px;
}
.row-amt {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  text-align: right;
  flex-shrink: 0;
}
.row-amt.credit {
  color: var(--positive);
}

/* ----- Badges / pills ----------------------------------------------------- */
.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.pill.overdue {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
}
.pill.soon {
  background: color-mix(in srgb, var(--warning) 18%, transparent);
  color: var(--warning);
}

/* ----- Category breakdown bars ------------------------------------------- */
.catrow {
  padding: 8px 0;
}
.catrow-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 4px;
}
.catrow-head .name {
  flex: 1;
  font-weight: 500;
}
.catrow-head .amt {
  font-family: var(--font-mono);
  font-weight: 600;
}
.catbar {
  height: 5px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.catbar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
}

/* ----- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 16px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.1s ease;
}
.btn:active {
  transform: scale(0.98);
}
.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn.ghost {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn.full {
  width: 100%;
}
.btn.danger {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--line);
}

/* ----- Forms -------------------------------------------------------------- */
.field {
  margin-bottom: 12px;
}
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 5px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ----- Modal / sheet ------------------------------------------------------ */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.18s ease;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.sheet {
  background: var(--bg);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  max-width: 520px;
  width: 100%;
  padding: 18px 18px calc(18px + var(--safe-bot));
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.sheet-head h2 {
  font-size: 22px;
}

@media (min-width: 640px) {
  .scrim {
    align-items: center;
    padding: 20px;
  }
  .sheet {
    border-radius: var(--radius-lg);
    max-height: 80vh;
  }
}

/* ----- Auth screen -------------------------------------------------------- */
.auth {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 22px calc(40px + var(--safe-bot));
  max-width: 420px;
  margin: 0 auto;
}
.auth-mark {
  font-family: var(--font-display);
  font-size: 56px;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}
.auth h1 {
  font-size: 32px;
  margin-bottom: 8px;
}
.auth .sub {
  color: var(--ink-muted);
  margin-bottom: 28px;
}
.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--ink-muted);
}
.auth-switch button {
  color: var(--accent);
  font-weight: 600;
}

.error-msg {
  padding: 10px 12px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 12px;
}
.success-msg {
  padding: 10px 12px;
  background: color-mix(in srgb, var(--positive) 10%, transparent);
  color: var(--positive);
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 12px;
}

/* ----- Empty states ------------------------------------------------------- */
.empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--ink-muted);
  font-size: 14px;
}
.empty-mark {
  font-size: 36px;
  margin-bottom: 8px;
  opacity: 0.5;
}

/* ----- Toast ------------------------------------------------------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + var(--safe-bot));
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  z-index: 100;
  animation: toastIn 0.25s ease;
}
@keyframes toastIn {
  from {
    transform: translate(-50%, 20px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

/* ----- Statements table --------------------------------------------------- */
.txn-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.txn-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

/* ----- Utility ----------------------------------------------------------- */
.hide {
  display: none !important;
}
.muted {
  color: var(--ink-muted);
}
.right {
  text-align: right;
}
.stack-sm > * + * {
  margin-top: 8px;
}
.stack > * + * {
  margin-top: 14px;
}
.flex {
  display: flex;
  align-items: center;
  gap: 10px;
}
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.grow {
  flex: 1;
}

/* ----- Budget progress bars ---------------------------------------------- */
.catbar.has-budget > span.over-limit {
  background: var(--accent) !important;
}
.catbar.has-budget > span.near-limit {
  background: var(--warning) !important;
}
.catbar.has-budget > span.healthy {
  background: var(--positive) !important;
}

.budget-note {
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 2px;
  font-family: var(--font-mono);
}
.budget-note.over {
  color: var(--accent);
  font-weight: 600;
}
.budget-note.near {
  color: var(--warning);
  font-weight: 600;
}

.budget-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.budget-row:last-child {
  border-bottom: none;
}
.budget-row .cat-name {
  font-weight: 500;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.budget-row .bar {
  grid-column: 1 / -1;
  height: 5px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 4px;
}
.budget-row .bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
}
.budget-row input[type="number"] {
  width: 110px;
  padding: 6px 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: right;
}
.budget-row .actual {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
  text-align: right;
}
.budget-row .actual strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

/* ----- Month picker ------------------------------------------------------ */
.month-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.month-picker button {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.month-picker button:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.month-picker .label {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  min-width: 160px;
  text-align: center;
  letter-spacing: -0.01em;
}

/* ----- Analytics: SVG charts --------------------------------------------- */
.chart {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
}
.chart .chart-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin-bottom: 10px;
}
.chart svg {
  display: block;
  width: 100%;
  height: auto;
}
.chart .axis {
  stroke: var(--line);
  stroke-width: 1;
}
.chart .label {
  fill: var(--ink-muted);
  font-size: 10px;
  font-family: var(--font-mono);
}
.chart .bar {
  fill: var(--accent);
  transition: opacity 0.15s;
}
.chart .bar:hover {
  opacity: 0.78;
}
.chart .bar-empty {
  fill: var(--surface-2);
}
.chart .budget-line {
  stroke: var(--ink-soft);
  stroke-dasharray: 3 3;
  stroke-width: 1;
}
.chart .value-label {
  fill: var(--ink-soft);
  font-size: 9.5px;
  font-family: var(--font-mono);
}

/* Stat grid inside analytics cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.stat-grid > div {
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-align: center;
}
.stat-grid .stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}
.stat-grid .stat-value {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  margin-top: 3px;
}
@media (max-width: 480px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
/* ============================================================================
   v0.7.0 — append to the bottom of your existing assets/app.css.
   Provides styles for: insight strip, biggest-expense featured row.
   ============================================================================ */

/* ----- Insight strip ----------------------------------------------------- */
.insight-strip {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.insight {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13.5px;
  line-height: 1.4;
}
.insight-emoji {
  font-size: 18px;
  line-height: 1.2;
  flex-shrink: 0;
}
.insight-text {
  color: var(--ink);
  flex: 1;
}

.insight-warn {
  background: color-mix(in srgb, var(--warning) 10%, transparent);
  border-color: color-mix(in srgb, var(--warning) 30%, transparent);
}
.insight-warn .insight-text {
  color: var(--warning);
}

.insight-good {
  background: color-mix(in srgb, var(--positive) 10%, transparent);
  border-color: color-mix(in srgb, var(--positive) 30%, transparent);
}
.insight-good .insight-text {
  color: var(--positive);
}

.insight-info {
  background: var(--surface);
  border-color: var(--line);
}

/* ----- Biggest expense featured row ------------------------------------- */
.big-expense {
  background: linear-gradient(
    135deg,
    var(--surface) 0%,
    color-mix(in srgb, var(--accent) 6%, var(--surface)) 100%
  );
  border-color: color-mix(in srgb, var(--accent) 18%, var(--line));
}
.big-expense-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
  margin-bottom: 10px;
}
.big-expense-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.big-amt {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.01em;
}
/* ============================================================================
   v0.7.1 — append to the bottom of your existing assets/app.css.
   New editorial login page. The old .auth class still works (we don't break
   anything), but the new .auth-page is what renderAuth now generates.
   ============================================================================ */

.auth-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Subtle background — radial accent + paper-like surface for warmth */
.auth-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(
      ellipse 70% 50% at 100% 0%,
      color-mix(in srgb, var(--accent) 10%, transparent),
      transparent 60%
    ),
    radial-gradient(
      ellipse 60% 40% at 0% 100%,
      color-mix(in srgb, var(--accent) 6%, transparent),
      transparent 60%
    ),
    var(--bg);
  pointer-events: none;
}

.auth-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: calc(20px + env(safe-area-inset-top)) 22px
    calc(20px + env(safe-area-inset-bottom));
  box-sizing: border-box;
}

/* ----- Brand bar -------------------------------------------------------- */
.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.auth-brand .auth-mark {
  font-family: var(--font-display);
  color: var(--accent);
  font-size: 36px;
  line-height: 1;
  margin: 0;
}
.auth-brand-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.01em;
}
.auth-brand-tag {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 3px;
  letter-spacing: 0.01em;
}

/* ----- Main content ----------------------------------------------------- */
.auth-main {
  display: grid;
  gap: 28px;
  align-content: center;
  grid-template-columns: 1fr; /* mobile-first: single column, form first */
}

/* ----- Form card -------------------------------------------------------- */
.auth-form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 24px 22px;
  box-shadow: var(--shadow);
  max-width: 460px;
  width: 100%;
  box-sizing: border-box;
}

.auth-h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.auth-sub {
  color: var(--ink-muted);
  margin: 0 0 22px;
  font-size: 14.5px;
}

.auth-submit {
  margin-top: 6px;
  padding-top: 13px;
  padding-bottom: 13px;
  font-size: 15px;
}

.auth-switch {
  text-align: center;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--ink-muted);
}
.auth-switch button {
  color: var(--accent);
  font-weight: 600;
  margin-left: 4px;
}

/* ----- Features panel --------------------------------------------------- */
.auth-features {
  max-width: 460px;
  width: 100%;
  box-sizing: border-box;
}

.auth-features-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
  margin-bottom: 16px;
  padding-left: 2px;
}

.auth-feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.auth-feature-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  background: color-mix(in srgb, var(--surface) 50%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.auth-feat-emoji {
  font-size: 22px;
  line-height: 1;
}
.auth-feat-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 3px;
  color: var(--ink);
}
.auth-feat-sub {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* ----- Footer ----------------------------------------------------------- */
.auth-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-muted);
}

/* ----- Two-column layout on tablet+ ------------------------------------- */
@media (min-width: 768px) {
  .auth-main {
    grid-template-columns: minmax(380px, 460px) minmax(320px, 460px);
    gap: 56px;
    justify-content: center;
    padding: 24px 0;
  }
  .auth-h1 {
    font-size: 38px;
  }
  .auth-form-card {
    padding: 36px 32px 28px;
  }
  .auth-brand {
    margin-bottom: 12px;
  }
}

/* On wider desktops, give it a bit more breathing room */
@media (min-width: 1100px) {
  .auth-shell {
    padding: 48px 22px 32px;
  }
}
