/* ============================================================================
   Forster Hub — Design-System
   Display: Fraunces (warme Editorial-Serife) · Body: Inter
   Warme Sand-Palette mit EINEM Akzent (Terrakotta). Luftig, dezente Schatten.
   ========================================================================== */
:root {
  /* Flaechen */
  --bg: #f4ede3;
  --bg-2: #efe6d9;
  --surface: #fffcf7;
  --surface-2: #faf4ea;
  --line: #e6dac9;
  --line-strong: #d8c8b2;

  /* Text */
  --ink: #2c2620;
  --ink-soft: #5c5147;
  --muted: #8a7d70;

  /* Akzent (Terrakotta) + Status */
  --accent: #c2682f;
  --accent-deep: #a8531f;
  --accent-tint: #f6e7d8;
  --accent-ink: #fffaf4;
  --danger: #b23b2e;
  --ok: #5b7d4f;
  --info: #4f6d8f;

  /* Form */
  --radius: 18px;
  --radius-sm: 11px;
  --shadow-sm: 0 1px 2px rgba(60,45,30,.06), 0 2px 8px rgba(60,45,30,.05);
  --shadow: 0 8px 30px rgba(74,52,28,.10);
  --shadow-lg: 0 18px 50px rgba(74,52,28,.16);
  --ring: 0 0 0 3px rgba(194,104,47,.28);

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 600px at 100% -10%, var(--bg-2), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, .display { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; line-height: 1.15; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font-family: inherit; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px 16px; font-size: 1rem; font-weight: 600; cursor: pointer;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  color: var(--accent-ink); border: 0; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm); transition: transform .12s ease, filter .12s ease, box-shadow .12s;
}
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn-ghost {
  background: transparent; color: var(--ink-soft); border: 1px solid var(--line-strong);
  box-shadow: none; width: auto; padding: 8px 14px; font-weight: 500;
}
.btn-ghost:hover { background: var(--surface-2); filter: none; }

/* ── Login ────────────────────────────────────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card {
  width: 100%; max-width: 392px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 38px 32px;
}
.auth-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; }
.auth-brand .mark { width: 38px; height: 38px; border-radius: 11px; background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; flex: none; }
.auth-brand .name { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; }
.auth-card h1 { margin: 0 0 4px; font-size: 1.55rem; }
.auth-card .sub { margin: 0 0 24px; color: var(--muted); font-size: .95rem; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .82rem; font-weight: 500; color: var(--ink-soft); margin-bottom: 7px; }
.field input {
  width: 100%; padding: 12px 14px; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  transition: border-color .12s, box-shadow .12s;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.msg { font-size: .9rem; margin: 10px 0 0; min-height: 1.2em; }
.msg.err { color: var(--danger); }
.msg.ok { color: var(--ok); }
.step { display: none; }
.step.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.qr { display: block; margin: 6px auto 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; padding: 8px; }
.secret { font-family: ui-monospace, "SFMono-Regular", monospace; font-size: .95rem; letter-spacing: 1.5px; background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: 10px; padding: 10px; text-align: center; word-break: break-all; margin-bottom: 16px; color: var(--ink-soft); }
.hint { font-size: .88rem; color: var(--muted); margin: 0 0 18px; }
.code-input { letter-spacing: 8px; text-align: center; font-size: 1.4rem !important; font-weight: 600; }

/* ── App-Rahmen (Dashboard + Module) ─────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; background: rgba(255,252,247,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; }
.topbar .brand .mark { width: 30px; height: 30px; border-radius: 9px; background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; }
.topbar .right { display: flex; align-items: center; gap: 12px; }
.topbar .user { color: var(--muted); font-size: .9rem; }
.container { max-width: 1000px; margin: 0 auto; padding: 40px 24px 64px; }
.page-head { margin-bottom: 28px; }
.page-head h2 { margin: 0; font-size: 2rem; }
.page-head .date { color: var(--muted); font-size: .98rem; margin-top: 2px; }

/* Kacheln */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.tile {
  position: relative; display: block; color: inherit; text-decoration: none; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 24px; overflow: hidden; transition: transform .16s ease, box-shadow .16s ease, border-color .16s;
}
.tile::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--tile-accent, var(--accent)); opacity: .0; transition: opacity .16s; }
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); text-decoration: none; }
.tile:hover::after { opacity: .9; }
.tile .ico { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 16px; }
.tile h3 { margin: 0 0 5px; font-size: 1.25rem; }
.tile p { margin: 0; color: var(--muted); font-size: .93rem; }

/* Generische Karten (Module nutzen das ab Phase 3) */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px; }

/* ── Tabs ─────────────────────────────────────────────────────────────────── */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.tabs button {
  background: none; border: 0; padding: 10px 14px; cursor: pointer; color: var(--muted);
  font-size: .96rem; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button:hover { color: var(--ink); }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.tabpage { display: none; }
.tabpage.active { display: block; animation: fade .2s ease; }

/* ── Abschnitts-Kopf mit Aktion ──────────────────────────────────────────────── */
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 16px; gap: 12px; }
.section-head h3 { margin: 0; font-size: 1.3rem; }

/* ── Formulare ───────────────────────────────────────────────────────────────── */
.form-row { display: grid; gap: 14px; }
.form-row.two { grid-template-columns: 1fr 1fr; }
label.lbl { display: block; font-size: .82rem; font-weight: 500; color: var(--ink-soft); margin-bottom: 6px; }
input[type=text], input[type=password], input[type=date], input[type=time], input[type=number], select, textarea {
  width: 100%; padding: 10px 12px; font-size: .98rem; color: var(--ink); background: #fff;
  border: 1px solid var(--line-strong); border-radius: 10px; transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
textarea { resize: vertical; min-height: 80px; font-family: inherit; line-height: 1.5; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }

/* ── Listenzeilen (Aufgaben, Einkauf, Termine) ───────────────────────────────── */
.rows { display: flex; flex-direction: column; gap: 8px; }
.row {
  display: flex; align-items: center; gap: 12px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; box-shadow: var(--shadow-sm);
}
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 500; }
.row .title.done { text-decoration: line-through; color: var(--muted); }
.row .sub { font-size: .84rem; color: var(--muted); margin-top: 2px; }
.row .actions { display: flex; gap: 6px; flex: none; }
.iconbtn { background: none; border: 1px solid var(--line); border-radius: 8px; width: 32px; height: 32px; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.iconbtn:hover { color: var(--ink); border-color: var(--line-strong); background: var(--surface-2); }
.iconbtn.danger:hover { color: var(--danger); border-color: var(--danger); }

/* runde Checkbox */
.check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); cursor: pointer; flex: none; display: grid; place-items: center; background: #fff; transition: .12s; }
.check.on { background: var(--ok); border-color: var(--ok); color: #fff; }

/* ── Chips / Badges ──────────────────────────────────────────────────────────── */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 500; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-soft); border: 1px solid var(--line); }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.badge { font-size: .74rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.badge.due { background: #fbeee6; color: var(--accent-deep); }
.badge.overdue { background: #f7e0dc; color: var(--danger); }

/* ── Karten-Grid (Notizen) ───────────────────────────────────────────────────── */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.note { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); position: relative; }
.note.pinned { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-tint), var(--surface) 40%); }
.note h4 { margin: 0 0 6px; font-family: var(--font-display); font-size: 1.1rem; }
.note .body { white-space: pre-wrap; color: var(--ink-soft); font-size: .92rem; }
.note .note-actions { margin-top: 12px; display: flex; gap: 6px; justify-content: flex-end; }

/* RSVP-Buttons (Gäste-Seite) */
.rsvp { font-size: .88rem; padding: 7px 12px; }
.rsvp.on-yes { background: var(--ok); color: #fff; border-color: var(--ok); }
.rsvp.on-no { background: var(--danger); color: #fff; border-color: var(--danger); }

/* ============================================================================
   Einladungsseite (Partiful/Luma-Stil) — Hero, Social Proof, RSVP, Mitbringen
   ========================================================================== */
.invite { max-width: 560px; margin: 0 auto; padding-bottom: 110px; }
.hero {
  position: relative; border-radius: 0 0 28px 28px; overflow: hidden;
  min-height: 300px; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 28px 24px 26px; color: #fff8f1;
  background: linear-gradient(150deg, #e8d5c0 0%, #d88c6a 55%, #b0573b 100%);
  box-shadow: var(--shadow);
}
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(40,25,15,.05) 0%, rgba(40,25,15,.42) 100%); }
.hero > * { position: relative; z-index: 1; }
.hero .kicker { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; opacity: .9; margin-bottom: 8px; }
.hero h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.3rem, 9vw, 3.6rem); line-height: 1.04; letter-spacing: -.02em; margin: 0; text-shadow: 0 2px 20px rgba(0,0,0,.25); }
.hero .emoji { font-size: 2.6rem; line-height: 1; margin-bottom: 6px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.2)); }

.invite-body { padding: 0 22px; }
.meta-card { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-sm); margin-top: -18px; position: relative; z-index: 2; }
.meta-card + .meta-card { margin-top: 12px; }
.meta-card .mi { width: 42px; height: 42px; border-radius: 12px; background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; flex: none; }
.meta-card .mt { font-weight: 600; }
.meta-card .ms { color: var(--muted); font-size: .86rem; }

.invite-section { margin-top: 30px; }
.invite-section h3 { font-family: var(--font-display); font-size: 1.3rem; margin: 0 0 12px; }

/* Avatar-Stack (Social Proof) */
.attendees { display: flex; align-items: center; gap: 14px; }
.stack { display: flex; }
.stack .av { width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--surface); margin-left: -12px; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: .95rem; box-shadow: var(--shadow-sm); }
.stack .av:first-child { margin-left: 0; }
.count-big { font-family: var(--font-display); font-size: 1.9rem; line-height: 1; }
.count-sub { color: var(--muted); font-size: .85rem; }

/* RSVP pro Person */
.person { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.person:last-of-type { border-bottom: 0; }
.person .pname { flex: 1; min-width: 120px; font-weight: 500; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 7px 13px; border-radius: 999px; cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--muted); transition: .15s; }
.seg button.on-yes { background: var(--ok); color: #fff; }
.seg button.on-maybe { background: var(--accent); color: #fff; }
.seg button.on-no { background: var(--danger); color: #fff; }

/* Mitbring-Slot mit Fortschritt */
.bring-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.bring-item:last-child { border-bottom: 0; }
.bring-item.taken { opacity: .55; }
.bring-item .bt { flex: 1; }
.bring-item .bt .title { font-weight: 500; }
.bring-item .bt .who { font-size: .82rem; color: var(--muted); }

/* Sticky RSVP-Leiste (mobil) */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); background: rgba(255,252,247,.9); backdrop-filter: blur(12px); border-top: 1px solid var(--line); z-index: 50; }
.sticky-cta .inner { max-width: 560px; margin: 0 auto; }

/* Vollständiges Titelbild (kein Zuschnitt, keine Verzerrung) — Gast + Host */
.cover-wrap { width: 100%; max-height: 72vh; background: var(--bg-2); border-radius: 0 0 26px 26px; overflow: hidden; box-shadow: var(--shadow); text-align: center; line-height: 0; }
.cover-wrap img { display: inline-block; max-width: 100%; max-height: 72vh; width: auto; height: auto; }
.cover-wrap-host { text-align: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 10px; box-shadow: var(--shadow-sm); line-height: 0; }
.cover-wrap-host img { display: inline-block; max-width: 100%; max-height: 360px; width: auto; height: auto; }

/* Motto-Themen-Auswahl (Host) */
.theme-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 46px; height: 46px; border-radius: 12px; border: 2px solid transparent; cursor: pointer; display: grid; place-items: center; font-size: 1.2rem; box-shadow: var(--shadow-sm); outline-offset: 2px; }
.swatch.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.swatch span { filter: drop-shadow(0 1px 2px rgba(0,0,0,.3)); }

/* Host: Titelbild-/Themen-Banner in der Fest-Detailansicht */
.cover-banner { position: relative; border-radius: var(--radius); overflow: hidden; height: 150px; display: flex; align-items: flex-end; padding: 16px; margin-bottom: 18px; box-shadow: var(--shadow-sm); background-size: cover; background-position: center; }
.cover-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.35)); }
.cover-banner .cb-actions { position: relative; z-index: 1; display: flex; gap: 8px; margin-left: auto; }
.cover-banner .cb-actions .btn-ghost { background: rgba(255,255,255,.9); border: 0; }

/* Scroll-Reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ── leerer Zustand ──────────────────────────────────────────────────────────── */
.empty { text-align: center; color: var(--muted); padding: 40px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-2); }

/* ============================================================================
   Kalender — Monatsraster (7×6) + Agenda
   ========================================================================== */
.cal-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.cal-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; min-width: 190px; }
.cal-nav { display: flex; gap: 6px; align-items: center; }
.cal-nav button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; color: var(--ink); display: grid; place-items: center; }
.cal-nav button:hover { background: var(--surface-2); }
.viewtoggle { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.viewtoggle button { border: 0; background: none; padding: 6px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .85rem; color: var(--muted); }
.viewtoggle button.on { background: var(--accent); color: #fff; }

/* Personen-Filter */
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.fchip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font-size: .85rem; font-weight: 500; user-select: none; transition: .12s; }
.fchip .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.fchip.off { opacity: .4; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); }
.cal-dow { text-align: center; padding: 10px 0; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.cal-cell { min-height: 116px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px 6px 4px; position: relative; cursor: pointer; transition: background .12s; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.other { background: var(--surface-2); }
.cal-cell.weekend:not(.other) { background: #faf6ef; }
.cal-cell:hover { background: var(--accent-tint); }
.cal-cell .dnum { font-size: .82rem; color: var(--ink-soft); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; margin-bottom: 3px; }
.cal-cell.today .dnum { background: var(--accent); color: #fff; font-weight: 600; }
.cal-cell.other .dnum { color: var(--muted); opacity: .6; }
.cal-cell .addhint { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 6px; display: none; place-items: center; background: var(--surface); border: 1px solid var(--line-strong); color: var(--accent); font-weight: 700; line-height: 1; }
.cal-cell:hover .addhint { display: grid; }
.pill { display: block; font-size: .72rem; font-weight: 500; padding: 2px 6px; border-radius: 5px; margin-bottom: 2px; border-left: 3px solid var(--accent); background: var(--accent-tint); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.pill:hover { filter: brightness(.97); }
.pill .pt { color: var(--ink-soft); font-weight: 600; }
.more { font-size: .7rem; color: var(--muted); font-weight: 600; padding: 1px 6px; cursor: pointer; }
.more:hover { color: var(--accent); }

/* Agenda */
.agenda-day { display: grid; grid-template-columns: 70px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.agenda-date { text-align: center; }
.agenda-date .d { font-family: var(--font-display); font-size: 1.6rem; line-height: 1; }
.agenda-date .m { font-size: .72rem; text-transform: uppercase; color: var(--muted); letter-spacing: .05em; }
.agenda-date.is-today .d { color: var(--accent); }
.agenda-ev { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.agenda-ev .bar { width: 4px; align-self: stretch; border-radius: 3px; background: var(--accent); flex: none; min-height: 30px; }

/* Mobile: Punkte statt Pills */
@media (max-width: 640px) {
  .cal-cell { min-height: 64px; padding: 4px 3px; }
  .cal-cell .dnum { font-size: .75rem; width: 22px; height: 22px; }
  .pill { font-size: 0; padding: 0; margin: 1px 1px 0; height: 7px; width: 7px; display: inline-block; border-radius: 50%; border-left: 0; }
  .pill .pt { display: none; }
  .more { font-size: .62rem; }
  .cal-cell .addhint { display: none !important; }
}

/* ── Modal ───────────────────────────────────────────────────────────────────── */
.modal-bg { position: fixed; inset: 0; background: rgba(40,30,20,.42); display: none; place-items: center; padding: 20px; z-index: 100; backdrop-filter: blur(2px); }
.modal-bg.open { display: grid; }
.modal { width: 100%; max-width: 460px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 26px; max-height: 90vh; overflow: auto; animation: fade .2s ease; }
.modal h3 { margin: 0 0 18px; font-size: 1.4rem; }
.modal .modal-actions { display: flex; gap: 10px; margin-top: 22px; }
.modal .modal-actions .btn { width: auto; flex: 1; }

@media (max-width: 600px) {
  .container { padding: 28px 16px 48px; }
  .page-head h2 { font-size: 1.7rem; }
  .auth-card { padding: 30px 22px; }
  .form-row.two { grid-template-columns: 1fr; }
}
