/*
 * SG-Portal — Kundenportal von Simon Gruber
 * © 2026 Jonas Stolz. Alle Rechte vorbehalten. Proprietäre Software, siehe LICENSE.md.
 *
 * Mobile first (Kunden öffnen den Link am Handy), Desktop bekommt dieselbe Seite
 * zentriert (max. 720 px). Farben und Radien sind die Desktop-Tokens aus
 * sg-akten/DESIGN-GUIDELINES.md (E15: Optik nah an Atlas, kein Mercedes-CI).
 * Bewusste Abweichung: Schriftgrößen größer als in Atlas (Kundenseite, Handy,
 * iOS-Zoom-Schutz braucht Eingaben ≥ 16 px). Keine Inline-Styles (CSP style-src 'self'),
 * keine Fremd-Schriften, keine Emojis — Icons kommen als eigenes SVG-Set (Stufe 1).
 */
:root {
  --sb: #1a2732;
  --acc: #0d1117;
  --acc2: #e8ecef;
  --teal: #00a4e4;
  --teal-bg: #e0f3fb;
  --teal-fg: #006a96;
  --txt: #0d1117;
  --muted: #4a5568;
  --light: #718096;
  --border: #e2e6ea;
  --bg: #f4f6f8;
  --bg2: #e8ecef;
  --white: #ffffff;
  --hover-bg: #f0f3f5;
  --hover-border: #c0cdd4;
  --g: #1a6b3c;  --g2: #e9f7ef;  --g3: #145c35;
  --a: #f6d55c;  --a2: #fef8df;  --a3: #a3801a;
  --r: #e8807f;  --r2: #fceeed;  --r3: #b95755;
  --r-sm: 4px;  --r-md: 8px;  --r-lg: 12px;
  --sp-xs: 4px; --sp-sm: 8px; --sp-md: 12px; --sp-lg: 16px; --sp-xl: 24px; --sp-xxl: 32px;
  --fs-caption: 13px; --fs-body: 16px; --fs-subhead: 18px; --fs-heading: 22px;
  --sh-sm: 0 1px 2px rgba(13, 17, 23, .06);
  --sh-md: 0 4px 12px rgba(13, 17, 23, .08);
  --hero-bg: linear-gradient(135deg, #1a2732 0%, #27343c 100%);
  --inhalt-breite: 720px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--txt);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.5;
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* ─── Kopf: Wortmarke links, Platz für „Anrufen" rechts (häufigste Aktion am Handy) ─── */
.kopf {
  background: var(--hero-bg);
  color: var(--white);
}
.kopf-inner {
  max-width: var(--inhalt-breite);
  margin: 0 auto;
  padding: var(--sp-md) var(--sp-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
  min-height: 56px;
}
.wortmarke {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--fs-subhead);
  letter-spacing: .02em;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.wortmarke:hover { color: var(--white); text-decoration: underline; }
.kopf-aktionen { display: flex; gap: var(--sp-sm); }

/* ─── Inhalt ─── */
.inhalt {
  flex: 1;
  width: 100%;
  max-width: var(--inhalt-breite);
  margin: 0 auto;
  padding: var(--sp-lg);
}
.inhalt h1 {
  font-size: var(--fs-heading);
  line-height: 1.3;
  margin: 0 0 var(--sp-md);
}
.inhalt h2 {
  font-size: var(--fs-subhead);
  margin: 0 0 var(--sp-sm);
}
.inhalt p { margin: 0 0 var(--sp-md); }
.inhalt p:last-child { margin-bottom: 0; }
.gedaempft { color: var(--muted); }
.klein { font-size: var(--fs-caption); color: var(--light); }

/* ─── Karten (wie .card in Atlas) ─── */
.karte {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
  padding: var(--sp-lg);
  margin-bottom: var(--sp-md);
}
.karte-info {
  background: var(--teal-bg);
  border-color: var(--teal-bg);
  color: var(--teal-fg);
}
.karte-warn {
  background: var(--a2);
  border-color: var(--a2);
  color: var(--a3);
}

/* Berater-Karte: steht dauerhaft im Kopfbereich jeder Seite (§5.3, Phishing-Verdacht) */
.berater { display: flex; flex-direction: column; gap: var(--sp-xs); }
.berater-rolle { font-size: var(--fs-caption); color: var(--light); text-transform: uppercase; letter-spacing: .06em; }
.berater-name { font-weight: 600; }

/* ─── Knöpfe (Tap-Ziel ≥ 44 px) ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  min-height: 44px;
  padding: 0 var(--sp-lg);
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--hover-bg); border-color: var(--hover-border); }
.btn-primary { background: var(--acc); border-color: var(--acc); color: var(--white); box-shadow: var(--sh-sm); }
.btn-primary:hover { background: #27343c; border-color: #27343c; }
.btn-hell { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); color: var(--white); }
.btn-hell:hover { background: rgba(255, 255, 255, .2); }
.btn-block { width: 100%; }

/* ─── Formularfelder (Stufe 1 nutzt sie; ≥ 16 px gegen iOS-Auto-Zoom) ─── */
label { display: block; font-weight: 600; margin-bottom: var(--sp-xs); }
input, select, textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--white);
  color: var(--txt);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--acc);
  box-shadow: 0 0 0 3px rgba(26, 39, 50, .08);
}
input[type="checkbox"] { width: auto; accent-color: var(--teal); }

/* Tastatur-Fokus sichtbar (Basics: Tastatur, Labels, Kontraste) */
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

/* ─── Fuß ─── */
.fuss {
  max-width: var(--inhalt-breite);
  width: 100%;
  margin: 0 auto;
  padding: var(--sp-lg) var(--sp-lg) calc(var(--sp-lg) + env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-sm) var(--sp-lg);
  font-size: var(--fs-caption);
  color: var(--light);
}
.fuss a { color: var(--muted); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.fuss a:hover { text-decoration: underline; }
.fuss-links { display: flex; gap: var(--sp-lg); }

/* ─── Platzhalter für Hinweistexte (E10): sichtbar, bis der Text da ist ─── */
.platzhalter {
  border: 2px dashed var(--a3);
  border-radius: var(--r-md);
  padding: var(--sp-lg);
  background: var(--a2);
  color: var(--a3);
}

/* ─── Bewegung: nur dezent, und gar nicht bei reduced-motion (§6.5) ─── */
.karte { transition: box-shadow .15s ease; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ─── Desktop: dieselbe Seite, zentriert, etwas mehr Luft ─── */
@media (min-width: 721px) {
  .inhalt { padding: var(--sp-xl) var(--sp-lg); }
  .karte { padding: var(--sp-xl); }
}
