/* Design-System für die Seiten außerhalb des Dashboards.
   Tokens und Bausteine sind 1:1 aus index.html übernommen — Anmeldung,
   Einrichtung und Einstellungen sollen sich anfühlen wie dieselbe App,
   nicht wie ein angeklebtes Formular. Wer hier etwas ändert, muss es in
   index.html mitziehen. */

[hidden] { display: none !important; }

:root {
  color-scheme: dark;
  --page: #05081a;
  --surface-1: rgba(255,255,255,.045);
  --surface-2: rgba(255,255,255,.07);
  --ink: #eef1fb; --ink-2: #aab3d0; --muted: #6f7a9c;
  --border: rgba(255,255,255,.09);
  --accent: #3f7bff;
  --s1: #3f7bff; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181;
  --good: #2fbf71; --warn: #fab219; --serious: #ec835a; --crit: #e66767;
  --sky-a: rgba(30,80,255,.34); --sky-b: rgba(30,80,255,.20);
  --glow: 0 1px 0 rgba(255,255,255,.04) inset, 0 10px 40px -18px rgba(0,0,0,.8);
  --glow-hover: 0 1px 0 rgba(255,255,255,.06) inset,
    0 0 0 1px rgba(63,123,255,.35), 0 14px 50px -16px rgba(63,123,255,.25);
  --chip-h: 22px; --ctl-h: 26px; --row-gap: 10px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --page: #eef1f9;
  --surface-1: rgba(255,255,255,.8);
  --surface-2: rgba(255,255,255,.95);
  --ink: #101a30; --ink-2: #46506b; --muted: #8a93ad;
  --border: rgba(16,26,48,.10);
  --accent: #2456d8;
  --s1: #2a78d6; --s2: #eb6834; --s3: #14985f; --s4: #c98500; --s5: #d55181;
  --good: #0a8a0a; --warn: #b57e00; --serious: #cf5a2e; --crit: #c43434;
  --sky-a: rgba(30,80,255,.14); --sky-b: rgba(30,80,255,.09);
  --glow: 0 1px 2px rgba(16,26,48,.05), 0 12px 36px -18px rgba(16,26,48,.25);
  --glow-hover: 0 0 0 1px rgba(36,86,216,.3), 0 14px 44px -16px rgba(36,86,216,.3);
}

* { box-sizing: border-box; }
body {
  margin: 0; color: var(--ink); min-height: 100vh;
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1350px 680px at 75% -12%, var(--sky-a), transparent 65%),
    radial-gradient(1050px 580px at 8% 112%, var(--sky-b), transparent 65%),
    radial-gradient(rgba(255,255,255,.055) 1px, transparent 1.4px),
    linear-gradient(180deg, #070c22 0%, var(--page) 100%);
  background-size: auto, auto, 28px 28px, auto;
  background-attachment: fixed;
}
:root[data-theme="light"] body {
  background:
    radial-gradient(1350px 680px at 75% -12%, var(--sky-a), transparent 65%),
    radial-gradient(1050px 580px at 8% 112%, var(--sky-b), transparent 65%),
    radial-gradient(rgba(16,26,48,.06) 1px, transparent 1.4px),
    linear-gradient(180deg, #f8faff 0%, var(--page) 100%);
  background-size: auto, auto, 28px 28px, auto;
  background-attachment: fixed;
}

@font-face {
  font-family: 'Quicksand';
  src: url('/static/quicksand.woff2') format('woff2');
  font-weight: 300 700; font-display: swap;
}

/* ---------- Grundgerüst ---------- */
.wrap { max-width: 30rem; margin: 0 auto; padding: 7vh 22px 64px; }
.wrap-wide { max-width: 46rem; }

.brand { display: flex; align-items: center; gap: 11px; margin-bottom: 28px;
  text-decoration: none; color: var(--ink); }
.brand span { font-family: 'Quicksand', system-ui, sans-serif;
  font-weight: 700; font-size: 23px; letter-spacing: .01em; }
.brand img { width: 30px; height: 30px; display: block; }

h1 { font-size: 25px; font-weight: 680; margin: 0 0 6px; letter-spacing: -.01em; }
h2 { font-size: 17px; font-weight: 660; margin: 0 0 4px; }
.lead { color: var(--ink-2); font-size: 14.5px; margin: 0 0 26px; }
.micro { font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 10.5px; font-weight: 500; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted); }

/* ---------- Karten ---------- */
.panel {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px; box-shadow: var(--glow);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
}
.panel + .panel { margin-top: 14px; }
.panel-tight { padding: 15px 16px; }

/* ---------- Formulare ---------- */
.fld { margin-bottom: 14px; }
.fld label { display: block; font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 10.5px; font-weight: 500; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.fld input, .fld textarea, .fld select {
  width: 100%; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 10px; color: var(--ink);
  font-family: inherit; font-size: 14.5px; line-height: 1.45;
  padding: 10px 12px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.fld input:focus, .fld textarea:focus, .fld select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(63,123,255,.15); }
.fld textarea { resize: vertical; min-height: 84px; }
.fld select { padding-right: 30px; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236f7a9c' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.fld .help { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.fld-row { display: flex; gap: 12px; }
.fld-row .fld { flex: 1; }
@media (max-width: 460px) { .fld-row { flex-direction: column; gap: 0; } }

/* ---------- Knöpfe ---------- */
.btn {
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--ink); border-radius: 10px; padding: 0 18px; height: 40px;
  font-size: 14px; font-weight: 650; font-family: inherit; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .15s, box-shadow .15s, background .15s, color .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--glow-hover); }
.btn:disabled { opacity: .5; cursor: wait; transform: none; box-shadow: none; }
.btn-primary { border: none; background: var(--accent); color: #fff; }
.btn-primary:hover { box-shadow: 0 8px 24px -8px rgba(63,123,255,.6); }
.btn-block { width: 100%; }
.btn-danger { color: var(--crit); border-color: rgba(230,103,103,.35); }
.btn-danger:hover { background: var(--crit); color: #fff; border-color: var(--crit); }
.btn-sm { height: var(--ctl-h); padding: 0 12px; font-size: 12.5px;
  border-radius: 8px; }
.btn svg { display: block; }

.linkrow { margin-top: 18px; font-size: 13.5px; color: var(--ink-2);
  text-align: center; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Rückmeldungen ---------- */
.note { border-radius: 10px; padding: 11px 13px; font-size: 13.5px;
  line-height: 1.5; margin-bottom: 16px; border: 1px solid; }
.note-err { background: rgba(230,103,103,.09);
  border-color: rgba(230,103,103,.3); color: var(--crit); }
.note-ok { background: rgba(47,191,113,.09);
  border-color: rgba(47,191,113,.3); color: var(--good); }
.note-warn { background: rgba(250,178,25,.09);
  border-color: rgba(250,178,25,.32); color: var(--warn); }
.note-info { background: rgba(63,123,255,.08);
  border-color: rgba(63,123,255,.28); color: var(--ink-2); }

.chip { display: inline-flex; align-items: center; gap: 5px; height: var(--chip-h);
  padding: 0 9px; border-radius: 11px; font-size: 11.5px; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--ink-2); white-space: nowrap; flex: none; line-height: 1; }
.chip-ok { color: var(--good); border-color: rgba(47,191,113,.35); }
.chip-err { color: var(--crit); border-color: rgba(230,103,103,.35); }

/* ---------- Auswahlkacheln (Ziel, Erfahrung, Plan-Variante) ---------- */
.opts { display: grid; gap: 10px; }
.opts-2 { grid-template-columns: 1fr 1fr; }
.opt {
  text-align: left; cursor: pointer; position: relative;
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: 12px; padding: 13px 15px; color: var(--ink);
  font-family: inherit; font-size: 14px; transition: all .16s;
}
.opt:hover { border-color: rgba(63,123,255,.4); transform: translateY(-1px); }
.opt[aria-pressed="true"] { border-color: var(--accent);
  background: rgba(63,123,255,.10);
  box-shadow: 0 0 0 1px var(--accent), 0 10px 34px -14px rgba(63,123,255,.5); }
.opt b { display: block; font-weight: 660; margin-bottom: 2px; }
.opt small { color: var(--muted); font-size: 12.5px; line-height: 1.45;
  display: block; }

/* ---------- Fortschritt ---------- */
.steps { display: flex; gap: 6px; margin-bottom: 26px; }
.steps i { flex: 1; height: 3px; border-radius: 2px;
  background: var(--surface-2); transition: background .3s; }
.steps i.on { background: var(--accent); }
.steps i.done { background: rgba(63,123,255,.45); }

/* ---------- Ladeanzeige (Windrad wie im Dashboard) ---------- */
.loader { display: flex; align-items: center; gap: 11px; color: var(--ink-2);
  font-size: 13.5px; padding: 8px 0; }
.loader svg { animation: spin 2.4s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .loader svg { animation: none; }
}

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; }
