/* ==========================================================================
   Tamos Kundenportal · Aussehen
   Derselbe Stil wie das Dashboard (Qonto-Stil, siehe .claude/skills/qonto-stil):
   Schwarz, Weiß und Grau, Pastell nur als Akzent, runde Karten ohne Schatten,
   schwarze Knöpfe, eine Schrift (Geist, lokal im Ordner fonts/), kurze Bewegungen.
   Zuerst fürs Handy gebaut: große Tippflächen, Leiste unten.
   Farben, Knöpfe, Felder, Fenster, Listen und Marken sind aus dashboard/seite/style.css
   übernommen. Neu ist nur der Rahmen (Kopf oben, Leiste unten) und die Abgabe.
   ========================================================================== */

/* ---------- Schrift (lokal, nie von einem fremden Server) ---------- */
@font-face { font-family: "Geist"; src: url("fonts/geist-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/geist-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/geist-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* ---------- Farben und Maße ---------- */
:root {
  color-scheme: light;
  /* Feste Töne */
  --black: #050505; --white: #ffffff;
  --grey-25: #f9f9f9; --grey-50: #f5f5f5; --grey-100: #e8e8e8; --grey-200: #e0e0e0; --grey-300: #cccccc; --grey-400: #b8b8b8;
  --grey-500: #8f8f8f; --grey-600: #616161; --grey-700: #3d3d3d; --grey-800: #262626; --grey-850: #2c2c2c; --grey-900: #1a1a1a;
  --blueberry-50: #cfdeff; --blueberry-100: #99b9ff; --blueberry-900: #2450b0; --blueberry-1000: #0c2351;
  --plum-50: #d5c8ff; --plum-1000: #461068;
  --mint-50: #c8ffec; --mint-1000: #0d5563;
  --peach-50: #ffc9a6; --peach-1000: #7a250c;
  --mustard-50: #faffa4; --mustard-1000: #705208;
  --sakura-50: #ffdfea; --sakura-1000: #7e0f4c;
  --success: #0a7037; --promo: #0247f6;

  /* Rollen (hell). Der Dunkelmodus setzt sie weiter unten neu. */
  --bg: var(--grey-25);        /* Grund der Seite */
  --panel: var(--white);       /* Kästen, Fenster */
  --surface: var(--grey-50);   /* Fläche in Kästen, Hover auf Zeilen */
  --ink: var(--black);         /* Text */
  --muted: var(--grey-600);    /* Nebentext */
  --line: var(--grey-100);     /* Linien und Ränder */
  --line-strong: var(--grey-400); /* Rand von Eingabefeldern */
  --btn-bg: var(--black); --btn-fg: var(--white);
  --btn-hover: rgba(29, 29, 27, 0.92); --btn-active: #373737;
  --ghost-hover: rgba(29, 29, 27, 0.08); --ghost-active: rgba(29, 29, 27, 0.12);
  --nav-active: var(--grey-100);
  --focus: var(--blueberry-900); --focus-soft: var(--blueberry-50);
  --late: #ba2c22;             /* Fehler */
  --error-bg: #ffe9e7;
  --notice-bg: var(--blueberry-50); --notice-fg: var(--black); --notice-tag-bg: var(--blueberry-1000); --notice-tag-fg: var(--white);
  --bar: rgba(255, 255, 255, 0.86);

  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --r-xs: 4px; --r-sm: 8px; --r-md: 16px; --r-lg: 24px; --r-full: 999px;
  --head: 60px;                /* Höhe der Zeile oben */
  --band: 0px;                 /* Höhe des Demo-Bands, wird gemessen */
  --tabbar: calc(64px + env(safe-area-inset-bottom)); /* Leiste unten (nur Handy und Tablet) */
  --pad: 16px;                 /* Seitenrand des Inhalts */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-arrow: cubic-bezier(0.4, 0, 0.6, 1);
  --ease-spring: cubic-bezier(0.25, 0.89, 0.35, 1.15);
}
@media (min-width: 761px) { :root { --pad: 24px; } }
@media (min-width: 900px) { :root { --tabbar: 0px; --head: 68px; } }

/* Dunkel */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: var(--black); --panel: var(--grey-900); --surface: var(--grey-800); --ink: var(--white); --muted: var(--grey-400);
    --line: var(--grey-850); --line-strong: var(--grey-600);
    --btn-bg: var(--white); --btn-fg: var(--black); --btn-hover: rgba(255, 255, 255, 0.92); --btn-active: var(--grey-200);
    --ghost-hover: rgba(245, 245, 245, 0.08); --ghost-active: rgba(245, 245, 245, 0.14);
    --nav-active: var(--grey-800);
    --focus: var(--blueberry-100); --focus-soft: rgba(153, 185, 255, 0.3);
    --late: #ff9991; --error-bg: #3a1512;
    --notice-bg: var(--blueberry-1000); --notice-fg: var(--white); --notice-tag-bg: var(--blueberry-50); --notice-tag-fg: var(--black);
    --success: #77e5a4;
    --bar: rgba(26, 26, 26, 0.86);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: var(--black); --panel: var(--grey-900); --surface: var(--grey-800); --ink: var(--white); --muted: var(--grey-400);
  --line: var(--grey-850); --line-strong: var(--grey-600);
  --btn-bg: var(--white); --btn-fg: var(--black); --btn-hover: rgba(255, 255, 255, 0.92); --btn-active: var(--grey-200);
  --ghost-hover: rgba(245, 245, 245, 0.08); --ghost-active: rgba(245, 245, 245, 0.14);
  --nav-active: var(--grey-800);
  --focus: var(--blueberry-100); --focus-soft: rgba(153, 185, 255, 0.3);
  --late: #ff9991; --error-bg: #3a1512;
  --notice-bg: var(--blueberry-1000); --notice-fg: var(--white); --notice-tag-bg: var(--blueberry-50); --notice-tag-fg: var(--black);
  --success: #77e5a4;
  --bar: rgba(26, 26, 26, 0.86);
}
:root:has(body.is-demo) { --band: 40px; }
@media (max-width: 760px) { :root:has(body.is-demo) { --band: 52px; } }

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink); font: 400 16px/24px var(--font); }
:where(h1, h2, h3, p, ul, ol, dl, dd, figure) { margin: 0; }
:where(h1, h2, h3) { font-weight: 600; }
:where(ul, ol) { list-style: none; padding: 0; }
:where(a) { color: inherit; text-decoration: none; }
:where(button, input, textarea, select) { font: inherit; color: inherit; }
:where(b, strong) { font-weight: 600; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-xs); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { width: min(100% - 2 * var(--pad), 760px); margin-inline: auto; }
.wrap--breit { width: min(100% - 2 * var(--pad), 1120px); }
.icon { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 14px; line-height: 22px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Schrift-Bausteine ---------- */
.eyebrow { color: var(--muted); font-size: 12px; line-height: 16px; }
.title { font-size: 28px; line-height: 36px; font-weight: 600; letter-spacing: 0; overflow-wrap: anywhere; }
.h3 { font-size: 18px; line-height: 24px; font-weight: 600; }

/* ---------- Knöpfe ---------- */
/* Gefüllt: schwarz (im Dunkeln weiß). Beim Überfahren ändert sich nur die Farbe. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 11px 16px;
  border: 1px solid transparent; border-radius: var(--r-sm); background: var(--btn-bg); color: var(--btn-fg);
  font-size: 16px; line-height: 24px; font-weight: 400; white-space: nowrap; }
.btn:hover { background: var(--btn-hover); }
.btn:active { background: var(--btn-active); }
.btn--line { border-color: var(--ink); background: transparent; color: var(--ink); }
.btn--line:hover { background: var(--ghost-hover); }
.btn--line:active { background: var(--ghost-active); }
.btn--tonal { background: var(--ghost-hover); color: var(--ink); }
.btn--tonal:hover { background: var(--ghost-active); }
.btn--tonal:active { background: var(--ghost-active); }
.btn--full { width: 100%; justify-content: space-between; }
.btn[disabled] { opacity: 0.45; cursor: progress; }
.btn .icon { width: 16px; height: 16px; }

/* Textlink: unterstrichen. Mit Pfeil oder Symbol ohne Strich. */
.text-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--ink);
  font-size: 14px; line-height: 22px; text-align: left; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; text-decoration-color: var(--line-strong); }
.text-btn:hover { text-decoration-color: currentColor; }
.text-btn:has(.arrow), .text-btn:has(.icon) { text-decoration: none; }
.text-btn .icon { width: 16px; height: 16px; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--r-full); background: none; color: var(--ink); }
.icon-btn:hover { background: var(--ghost-hover); }

/* Pfeil ↗: zwei gleiche Pfeile. Beim Überfahren fliegt der erste nach oben rechts hinaus,
   der zweite kommt von unten links herein. */
.arrow { position: relative; display: inline-block; width: 18px; height: 18px; overflow: hidden; flex: none; }
.arrow::before, .arrow::after { content: ""; position: absolute; inset: 0; background: currentColor;
  --pfeil: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13 13 5M6.5 5H13v6.5'/%3E%3C/svg%3E");
  -webkit-mask: var(--pfeil) center / contain no-repeat; mask: var(--pfeil) center / contain no-repeat; }
.arrow::after { transform: translate(-18px, 18px); }
.text-btn .arrow { width: 14px; height: 14px; }
.text-btn .arrow::after { transform: translate(-14px, 14px); }

/* ---------- Demo-Hinweis (das eine blaue Band ganz oben, wie im Dashboard) ---------- */
.demo-band { position: fixed; inset: 0 0 auto; z-index: 60; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0 16px;
  min-height: var(--band); padding: 6px 16px; background: var(--promo); color: var(--white); font-size: 14px; line-height: 22px; text-align: center; }
.demo-band strong { font-weight: 600; }
@media (max-width: 760px) { .demo-band__mehr { display: none; } }
.demo-band button { min-height: 28px; padding: 0 10px; border: 1px solid currentColor; border-radius: var(--r-sm); background: none; color: inherit; font-size: 12px; line-height: 18px; }
.demo-band button:hover { background: rgba(255, 255, 255, 0.14); }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 20px; line-height: 1; white-space: nowrap; }
.logo svg { width: 22px; height: 18px; flex: none; }
.logo b { font-weight: 700; }
.logo span { font-weight: 400; color: var(--muted); }

/* ---------- Rahmen: Zeile oben, Leiste unten (Handy), Menü oben (Rechner) ---------- */
.header { position: fixed; inset: var(--band) 0 auto; z-index: 50; background: var(--bar); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: calc(var(--head) - 1px); }
.header__kunde { min-width: 0; overflow: hidden; color: var(--muted); font-size: 14px; line-height: 22px; white-space: nowrap; text-overflow: ellipsis; text-align: right; }
/* Menü im Kopf: nur am Rechner */
.nav { display: none; }
@media (min-width: 900px) {
  .nav { display: flex; gap: 4px; margin-right: auto; margin-left: 24px; }
  .nav a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 12px; border-radius: var(--r-sm); color: var(--muted); }
  .nav a:hover { background: var(--surface); color: var(--ink); }
  .nav a[aria-current="page"] { background: var(--nav-active); color: var(--ink); font-weight: 600; }
}
/* Leiste unten: vier Punkte, große Tippflächen */
.tabbar { position: fixed; inset: auto 0 0; z-index: 50; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); height: var(--tabbar);
  padding: 0 4px env(safe-area-inset-bottom); background: var(--bar); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-top: 1px solid var(--line); }
.tabbar a { position: relative; display: grid; place-items: center; align-content: center; gap: 4px; font-size: 12px; line-height: 16px; color: var(--muted); }
.tabbar a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.tabbar .icon { width: 22px; height: 22px; }
.tabbar .tag { position: absolute; top: 6px; left: calc(50% + 6px); }
@media (min-width: 900px) { .tabbar { display: none; } }

/* ---------- Seite ---------- */
.main { padding: calc(var(--band) + var(--head) + 24px) 0 calc(var(--tabbar) + 32px); }
@media (min-width: 900px) { .main { padding-top: calc(var(--band) + var(--head) + 40px); padding-bottom: 64px; } }
.view { display: grid; gap: 24px; align-content: start; }
.view > * { min-width: 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.page-head__sub { margin-top: 2px; color: var(--muted); }
.page-head__actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Kasten: weiß, feine Linie, 16 px Ecken, kein Schatten */
.block, .view > .rows { padding: 20px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); }
@media (min-width: 761px) { .block { padding: 24px; } }
.view > .rows { padding-block: 8px; }
@media (min-width: 761px) { .view > .rows { padding: 8px 24px; } }
.block__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 32px; margin-bottom: 8px; }
.block__head .text-btn { min-height: 32px; flex: none; }
.block > .h3 + p { margin-top: 4px; }
.empty { padding-block: 8px; color: var(--muted); }
.view > .empty { padding: 24px; border: 1px dashed var(--line-strong); border-radius: var(--r-md); text-align: center; }

/* „Braucht Ihre Antwort“: der eine Pastell-Block */
.note-band { padding: 12px 20px 4px; border-radius: var(--r-md); background: var(--notice-bg); color: var(--notice-fg); }
.note-band .block__head { margin-bottom: 0; }
.note-band li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 24px; min-height: 44px; padding-block: 8px; }
.note-band li + li { border-top: 1px solid color-mix(in srgb, var(--notice-fg) 14%, transparent); }
.note-band li > span { flex: 1 1 14rem; min-width: 0; overflow-wrap: anywhere; }
.note-band .muted { color: inherit; opacity: 0.75; }
.note-band .text-btn { color: inherit; text-decoration-color: currentColor; }

/* ---------- Listenzeilen ---------- */
.rows { display: grid; }
.rows > li { min-width: 0; }
.rows > li + li { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; width: calc(100% + 24px); margin-inline: -12px; padding: 10px 12px;
  border: 0; border-radius: var(--r-sm); background: none; color: inherit; text-align: left; }
button.row:hover, a.row:hover { background: var(--surface); }
.row--plain { grid-template-columns: minmax(0, 1fr) auto; }
.row__title { display: block; font-size: 16px; line-height: 24px; font-weight: 600; overflow-wrap: anywhere; }
.row__meta { display: flex; flex-wrap: wrap; gap: 0 12px; color: var(--muted); font-size: 14px; line-height: 22px; }
.row__side { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; line-height: 22px; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Nebenzeile, die nie umbricht: was nicht passt, endet mit „…“ */
.row__meta--eins { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.row__meta--eins > * { margin-right: 12px; }
/* Langer Text als Hauptzeile (Nachrichten): normale Stärke, höchstens zwei Zeilen */
.row__title--lang { font-weight: 400; }
.row__title--kurz { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
/* Rundes Feld mit Symbol vor der Zeile (Foto oder PDF) */
.row__bild { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--surface); color: var(--muted); }

/* Kleine Marken (Pillen). Farbe nur als Pastell. */
.tag { display: inline-flex; align-items: center; min-height: 20px; padding: 2px 8px; border: 0; border-radius: var(--r-full); background: var(--ghost-hover); color: var(--ink);
  font-size: 12px; line-height: 16px; font-weight: 400; white-space: nowrap; }
.tag--grey { background: var(--ghost-active); }
.tag--solid { background: var(--blueberry-1000); color: var(--white); }
.tag--blueberry { background: var(--blueberry-50); color: var(--blueberry-1000); }
.tag--mint { background: var(--mint-50); color: var(--mint-1000); }
.tag--peach { background: var(--peach-50); color: var(--peach-1000); }
.tag--mustard { background: var(--mustard-50); color: var(--mustard-1000); }
:root[data-theme="dark"] .tag--solid { background: var(--blueberry-50); color: var(--black); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag--solid { background: var(--blueberry-50); color: var(--black); } }

/* ---------- Filter: Auswahl-Pillen, die gewählte ist schwarz ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg button { min-height: 40px; padding: 7px 14px; border: 1px solid var(--line); border-radius: var(--r-full); background: var(--panel); font-size: 14px; line-height: 22px; white-space: nowrap; }
.seg button:hover { border-color: var(--line-strong); }
.seg button[aria-pressed="true"] { border-color: var(--btn-bg); background: var(--btn-bg); color: var(--btn-fg); }
.count { margin-left: auto; color: var(--muted); font-size: 14px; line-height: 22px; align-self: center; }

/* ---------- Formulare ---------- */
.field { display: grid; gap: 4px; margin-bottom: 16px; }
.field label, .field legend { padding: 0; font-size: 14px; line-height: 22px; }
.field .hint { color: var(--muted); font-size: 14px; line-height: 22px; }
.field :is(input, textarea, select) { width: 100%; min-height: 48px; padding: 11px 16px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--panel); font-size: 16px; line-height: 24px; }
.field :is(input, textarea, select):hover { border-color: var(--muted); }
.field :is(input, textarea, select):focus-visible { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--focus-soft); }
.field textarea { min-height: 6.5rem; resize: vertical; }
.field textarea.low { min-height: 4.25rem; }
fieldset.field { min-width: 0; margin-inline: 0; border: 0; padding: 0; }
.inline-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 16px; line-height: 24px; cursor: pointer; }
.inline-check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--btn-bg); }
.form-error { margin-bottom: 16px; padding: 10px 12px; border: 1px solid var(--late); border-radius: var(--r-sm); background: var(--error-bg); color: var(--late); font-size: 14px; line-height: 22px; white-space: pre-line; }
.form-error:empty { display: none; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.form-actions .spacer { flex: 1; }

/* Auswahl-Kästchen in Fenstern (Hinweis oder Aufgabe): das gewählte ist schwarz */
.tabs { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 6px; }
.tabs label { position: relative; }
.tabs input { position: absolute; opacity: 0; }
.tabs span { display: flex; align-items: center; justify-content: center; min-height: 48px; padding-inline: 6px; border-radius: var(--r-sm); background: var(--ghost-hover); color: var(--muted);
  font-size: 16px; line-height: 20px; text-align: center; cursor: pointer; }
.tabs span:hover { background: var(--ghost-active); color: var(--ink); }
.tabs input:checked + span { background: var(--btn-bg); color: var(--btn-fg); }
.tabs input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.tabs--3 { --n: 3; }

/* ---------- Fenster ---------- */
dialog { width: min(100% - 32px, 36rem); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: var(--r-md); background: var(--panel); color: var(--ink); }
dialog::backdrop { background: rgba(5, 5, 5, 0.5); }
.dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 12px 12px 24px; border-bottom: 1px solid var(--line); }
.dialog__head .h3 { font-size: 20px; line-height: 28px; }
.dialog__body { display: grid; gap: 20px; padding: 24px; }
.dialog__body > * { min-width: 0; }
.dialog__body form > p.muted { margin-bottom: 20px; font-size: 14px; line-height: 22px; }
@media (max-width: 760px) {
  dialog { width: 100%; max-width: 100%; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; }
  .dialog__body { padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); }
  .dialog__head { padding-left: 16px; }
}
.abschnitt { display: grid; gap: 8px; }
.abschnitt > .eyebrow { font-size: 14px; line-height: 22px; }
.abschnitt + .abschnitt, .dialog__body > .form-actions { padding-top: 16px; border-top: 1px solid var(--line); }

/* ---------- Anmeldung: dunkle Karte links, Formular rechts ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 26rem); align-items: stretch; gap: clamp(24px, 5vw, 72px);
  min-height: 100dvh; padding-block: calc(var(--band) + 24px) 24px; }
.auth__intro { display: flex; flex-direction: column; gap: 16px; padding: clamp(24px, 4vw, 48px); border-radius: var(--r-lg); color: var(--white);
  background: #1a1a1a radial-gradient(60% 60% at 60% 70%, #3d3d3d 0%, #2c2c2c 50%, #1a1a1a 100%); }
.auth__intro .logo span { color: var(--grey-300); }
.auth__intro .title { margin-top: auto; font-size: clamp(36px, 22px + 3.6vw, 56px); line-height: 1.04; font-weight: 700; }
.auth__intro .title > span { display: block; color: var(--grey-400); font-weight: 600; }
.auth__intro p { max-width: 36ch; color: var(--grey-300); font-size: 18px; line-height: 28px; }
/* Schwebende Kärtchen: zeigen, was das Portal kann */
.auth__floats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.float { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px 8px 8px; border-radius: var(--r-sm); background: rgba(255, 255, 255, 0.92); color: var(--black);
  font-size: 14px; line-height: 22px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); }
.float .icon { box-sizing: content-box; width: 16px; height: 16px; padding: 6px; border-radius: var(--r-xs); background: var(--grey-100); }
.auth__seite { display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.auth__card { padding: clamp(24px, 3vw, 32px); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); }
.auth__card h2 { margin-bottom: 20px; font-size: 24px; line-height: 32px; font-weight: 600; }
.auth__card p.muted { margin-bottom: 20px; font-size: 14px; line-height: 22px; }
.auth__card form > .btn + p, .auth__card form > p:last-child { margin: 12px 0 0; }
.auth__steps { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.auth__steps span { padding: 4px 12px; border-radius: var(--r-full); background: var(--ghost-hover); color: var(--muted); font-size: 12px; line-height: 18px; }
.auth__steps span[aria-current="step"] { background: var(--btn-bg); color: var(--btn-fg); }
@media (max-width: 760px) {
  .auth { grid-template-columns: 1fr; align-content: start; gap: 16px; padding-top: calc(var(--band) + 16px); }
  .auth__intro .title { margin-top: 24px; }
  .auth__floats { display: none; }
}

/* ---------- Abgeben ---------- */
/* Zwei große Knöpfe: Foto aufnehmen (schwarz) und Datei auswählen (weiß) */
.pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pick__btn { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 28px; min-height: 152px; padding: 20px;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); color: var(--ink); text-align: left; }
.pick__btn:hover { border-color: var(--line-strong); }
.pick__btn b { display: block; font-size: 18px; line-height: 24px; font-weight: 600; }
.pick__btn small { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; line-height: 20px; }
.pick__btn .icon { box-sizing: content-box; width: 22px; height: 22px; padding: 11px; border-radius: var(--r-full); background: var(--blueberry-50); color: var(--black); }
.pick__btn--haupt { border-color: var(--btn-bg); background: var(--btn-bg); color: var(--btn-fg); }
.pick__btn--haupt:hover { border-color: var(--btn-bg); background: var(--btn-hover); }
.pick__btn--haupt small { color: inherit; opacity: 0.7; }
.pick__btn--haupt .icon { background: var(--mint-50); }
@media (min-width: 761px) { .pick__btn { min-height: 176px; padding: 24px; } }

/* Vorschau der gewählten Seiten */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.thumb { position: relative; aspect-ratio: 3 / 4; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb__datei { display: grid; place-items: center; align-content: center; gap: 6px; height: 100%; padding: 28px 8px 8px; color: var(--muted); font-size: 12px; line-height: 16px; text-align: center; overflow-wrap: anywhere; }
.thumb__datei .icon { width: 24px; height: 24px; }
.thumb__nr { position: absolute; left: 6px; bottom: 6px; min-width: 22px; padding: 2px 7px; border-radius: var(--r-full); background: rgba(5, 5, 5, 0.72); color: var(--white); font-size: 12px; line-height: 16px; text-align: center; font-variant-numeric: tabular-nums; }
.thumb__x { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--r-full); background: rgba(5, 5, 5, 0.72); color: var(--white); }
.thumb__x:hover { background: var(--black); }
.thumb__x .icon { width: 14px; height: 14px; }
.mehr-seiten { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mehr-seiten .btn { min-height: 44px; padding-block: 9px; font-size: 14px; line-height: 22px; }

/* Fortschritt beim Hochladen */
.fortschritt { display: grid; gap: 6px; margin-top: 12px; font-size: 14px; line-height: 22px; }
progress { display: block; width: 100%; height: 6px; border: 0; border-radius: var(--r-full); background: var(--ghost-active); accent-color: var(--btn-bg); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--ghost-active); }
progress::-webkit-progress-value { background: var(--btn-bg); }
progress::-moz-progress-bar { background: var(--btn-bg); }

/* ---------- Beleg-Fenster und Nachrichten ---------- */
.link { text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 1px; text-decoration-color: var(--line-strong); }
.link:hover { text-decoration-color: currentColor; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; }
.kopf-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.file-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 52px; }
.file-row + .file-row { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
.file-row__name { display: block; font-weight: 600; overflow-wrap: anywhere; }
.file-row .btn { min-height: 40px; padding-block: 7px; font-size: 14px; line-height: 22px; }
/* Verlauf: links Tamos, rechts Sie */
.thread { display: grid; gap: 8px; }
.msg { justify-self: start; max-width: min(88%, 30rem); padding: 10px 14px; border-radius: var(--r-md); border-bottom-left-radius: var(--r-xs); background: var(--surface); }
.msg--ich { justify-self: end; border-radius: var(--r-md); border-bottom-right-radius: var(--r-xs); background: var(--notice-bg); color: var(--notice-fg); }
.msg__kopf { display: block; margin-bottom: 2px; font-size: 12px; line-height: 16px; opacity: 0.7; }
.hinweis { color: var(--muted); font-size: 14px; line-height: 22px; }

/* Konto */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 32px; margin: 0; }
.fact dt { color: var(--muted); font-size: 14px; line-height: 22px; }
.fact dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.fuss { display: flex; flex-wrap: wrap; gap: 4px 20px; color: var(--muted); font-size: 14px; line-height: 22px; }
.fuss a { display: inline-flex; align-items: center; min-height: 44px; }
.fuss a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 0.25em; }

/* ---------- Kurze Meldung unten ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + 24px); z-index: 80; width: max-content; max-width: min(100% - 32px, 30rem); padding: 12px 16px; border-radius: var(--r-sm);
  background: var(--btn-bg); color: var(--btn-fg); font-size: 14px; line-height: 22px; transform: translateX(-50%); }

/* ---------- Handy ---------- */
@media (max-width: 760px) {
  .title { font-size: 24px; line-height: 32px; }
  .facts { grid-template-columns: 1fr; }
  .page-head__actions .btn { min-height: 44px; padding: 9px 14px; }
  .form-actions .btn { flex: 1 1 auto; }
  /* Am Handy rutscht die Marke unter den Text, damit der Titel Platz hat */
  .row--stack { grid-template-columns: auto minmax(0, 1fr); }
  .row--stack .row__side { grid-column: 2; justify-content: flex-start; }
  .row--stack.row--plain { grid-template-columns: minmax(0, 1fr); }
  .row--stack.row--plain .row__side { grid-column: 1; }
}

/* ---------- Bewegung (nur wenn erwünscht): kurz, leise, immer mit Auslöser ---------- */
@media (prefers-reduced-motion: no-preference) {
  .btn, .icon-btn, .seg button, .tabs span, .nav a, .row, .pick__btn, .thumb__x, .field :is(input, textarea, select)
    { transition: background-color 150ms var(--ease), color 150ms var(--ease), border-color 150ms var(--ease), box-shadow 150ms var(--ease), transform 250ms var(--ease-out); }
  .text-btn, .link { transition: text-decoration-color 150ms var(--ease), color 150ms var(--ease); }
  .pick__btn:active { transform: scale(0.98); }

  /* Pfeil-Wechsel */
  :is(a, button):hover > .arrow::before { animation: arrow-exit 300ms var(--ease-arrow) forwards; }
  :is(a, button):hover > .arrow::after { animation: arrow-enter 300ms var(--ease-arrow) 150ms forwards; }
  /* Klick-Puls auf Textlinks und runden Knöpfen */
  .text-btn:active, .icon-btn:active { animation: click-pulse 300ms var(--ease-arrow); }

  /* Einblenden: nur beim Wechsel der Seite (Klasse view--neu setzt portal.js), nacheinander */
  .view--neu > * { animation: fade-up 500ms ease-out backwards; }
  .view--neu > :nth-child(2) { animation-delay: 80ms; }
  .view--neu > :nth-child(3) { animation-delay: 160ms; }
  .view--neu > :nth-child(4) { animation-delay: 240ms; }
  .view--neu > :nth-child(n + 5) { animation-delay: 320ms; }
  .auth__intro, .auth__card { animation: fade-up 500ms ease-out backwards; }
  .auth__card { animation-delay: 100ms; }
  .auth__floats .float { animation: fade-up 500ms ease-out backwards; animation-delay: 300ms; }
  .auth__floats .float:nth-child(2) { animation-delay: 400ms; }
  .auth__floats .float:nth-child(3) { animation-delay: 500ms; }
  /* Neue Seite in der Vorschau ploppt auf */
  .thumb--neu { animation: thumb-pop 400ms var(--ease-spring) backwards; }

  /* Fenster erscheint, Hintergrund blendet ein */
  dialog[open] { animation: card-appear 300ms var(--ease-out) both; }
  dialog::backdrop { animation: fade 300ms ease-out; }
  /* Meldung fällt von unten herein und federt leicht */
  .toast { animation: toast 400ms var(--ease-spring) both; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(20px); } }
@keyframes card-appear { from { opacity: 0; transform: translateY(30px); } }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 200%); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes arrow-exit { to { transform: translate(18px, -18px); } }
@keyframes arrow-enter { to { transform: translate(0, 0); } }
@keyframes click-pulse { 50% { transform: scale(0.9); } }
@keyframes thumb-pop { from { opacity: 0; transform: scale(0.8); } }

@media print { .header, .tabbar, .demo-band { display: none !important; } .main { padding-top: 0; } }
