/* base.css — Reset, Typografie, Raster, Knoepfe, Formulare.
   Alles, was auf JEDER Seite gilt, egal welcher Dienst sie ausliefert. */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

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

body {
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--txt);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  /* Der Hintergrund ist nicht flach. Zwei sehr weiche Lichter — eines blau oben links,
     eines violett rechts — geben der Seite Tiefe, ohne dass man sie als Verlauf erkennt. */
  background-image:
    radial-gradient(900px 520px at 12% -6%,  rgba(47,144,255,.10), transparent 62%),
    radial-gradient(760px 480px at 92% 4%,   rgba(168,85,247,.08), transparent 60%);
  background-attachment: fixed;
}

img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; border-top: 1px solid var(--line-soft); }

h1, h2, h3, h4, h5 { font-family: var(--f-head); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
h1 { font-size: 40px; } h2 { font-size: 24px; } h3 { font-size: 18px; } h4 { font-size: 15px; }

::selection { background: var(--blue); color: #fff; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

/* Bildlauf passend zum Entwurf — ein heller Balken auf dunklem Grund wirkt wie ein Fremdkoerper. */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: var(--r-pill); border: 3px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: #33456e; background-clip: padding-box; }

/* ---------------------------------------------------------------- Raster */

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 var(--shell-pad); }
.row   { display: flex; align-items: center; gap: 12px; }
.row-b { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.col   { display: flex; flex-direction: column; }
.grid  { display: grid; gap: 22px; }
.wrap  { flex-wrap: wrap; }
.grow  { flex: 1 1 auto; min-width: 0; }
.spacer{ flex: 1 1 auto; }

.mt-4{margin-top:4px}.mt-8{margin-top:8px}.mt-12{margin-top:12px}.mt-16{margin-top:16px}
.mt-24{margin-top:24px}.mt-32{margin-top:32px}.mt-40{margin-top:40px}.mb-8{margin-bottom:8px}
.mb-16{margin-bottom:16px}.mb-24{margin-bottom:24px}

/* ---------------------------------------------------------------- Text */

.t-1  { color: var(--txt); }
.t-2  { color: var(--txt-2); }
.t-3  { color: var(--txt-3); }
.t-sm { font-size: 13px; }
.t-xs { font-size: 12px; }
.t-b  { font-weight: 700; }
.t-mono { font-family: var(--f-mono); font-size: 12.5px; }
.t-up { text-transform: uppercase; letter-spacing: .09em; font-size: 11px; font-weight: 700; color: var(--txt-3); }
.hand { font-family: var(--f-hand); font-size: 22px; color: var(--txt-2); line-height: 1.2; }
.num  { font-variant-numeric: tabular-nums; }
.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- Knoepfe */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 42px; padding: 0 20px;
  border-radius: var(--r-sm);
  font-family: var(--f-head); font-weight: 700; font-size: 14.5px; letter-spacing: -.01em;
  white-space: nowrap; position: relative;
  transition: transform var(--t), box-shadow var(--t), background var(--t), border-color var(--t), opacity var(--t);
}
.btn svg { width: 17px; height: 17px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-off { opacity: .45; pointer-events: none; }

/* Der Hauptknopf aus dem Entwurf: Verlauf, heller Rand oben, blauer Schein darunter. */
.btn-pri {
  background: linear-gradient(180deg, var(--blue-lite) -30%, var(--blue) 42%, var(--blue-deep) 100%);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.28) inset, 0 8px 22px -8px var(--blue-glow);
}
.btn-pri:hover { box-shadow: 0 1px 0 rgba(255,255,255,.34) inset, 0 12px 30px -8px var(--blue-glow); filter: brightness(1.06); }

.btn-ghost {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  color: var(--txt); border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--line-strong); background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03)); }

.btn-soft { background: var(--card-hi); color: var(--txt-2); border: 1px solid var(--line-soft); }
.btn-soft:hover { color: var(--txt); border-color: var(--line); }

/* Modus-Knopf: nimmt die Farbe aus `data-mode` des Vorfahren. */
.btn-mode {
  background: linear-gradient(180deg, color-mix(in srgb, var(--m) 88%, white 12%), var(--m));
  color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 8px 20px -10px color-mix(in srgb, var(--m) 70%, transparent);
}
.btn-mode:hover { filter: brightness(1.08); }

.btn-red    { background: linear-gradient(180deg, #f05252, var(--red-deep)); color: #fff; }
.btn-green  { background: linear-gradient(180deg, #2fd46c, var(--green-deep)); color: #fff; }
.btn-amber  { background: linear-gradient(180deg, #fbbf24, var(--amber-deep)); color: #fff; }
.btn-purple { background: linear-gradient(180deg, #b972f9, var(--purple-deep)); color: #fff; }

.btn-sm  { height: 34px; padding: 0 14px; font-size: 13px; border-radius: var(--r-xs); }
.btn-sm svg { width: 15px; height: 15px; }
.btn-lg  { height: 52px; padding: 0 28px; font-size: 16px; border-radius: var(--r); }
.btn-lg svg { width: 19px; height: 19px; }
.btn-block { width: 100%; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: var(--r-sm); }

/* ---------------------------------------------------------------- Formulare */

.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--txt-2); }

.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 14px;
  background: var(--inset);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--txt); font-size: 14.5px;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
.input::placeholder, .textarea::placeholder { color: var(--txt-4); }
.input:focus, .select:focus, .textarea:focus {
  outline: 0; border-color: var(--blue-line);
  box-shadow: 0 0 0 3px var(--blue-ghost);
  background: #0a1120;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.6; font-family: inherit; }
.select {
  appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239cadd2' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 15px;
}

/* Suchfeld mit Lupe davor — im Entwurf ueberall gleich. */
.search { position: relative; }
.search > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--txt-3); pointer-events: none; }
.search > .input { padding-left: 42px; border-radius: var(--r-pill); }

.checkline { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--txt-2); cursor: pointer; }
.checkline input { width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; }

.form-note { font-size: 13px; color: var(--txt-3); }
.form-err  { display: flex; gap: 9px; align-items: flex-start; padding: 11px 14px; border-radius: var(--r-sm);
             background: rgba(239,68,68,.10); border: 1px solid rgba(239,68,68,.30); color: #ffb4b4; font-size: 13.5px; }
.form-ok   { display: flex; gap: 9px; align-items: flex-start; padding: 11px 14px; border-radius: var(--r-sm);
             background: rgba(34,197,94,.10); border: 1px solid rgba(34,197,94,.30); color: #9ff0bd; font-size: 13.5px; }
.form-err svg, .form-ok svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
