/* Gemeinsame Designsprache aller Taskey-Verwaltungen.
 *
 * Dieselben Werte wie in der Demo-Verwaltung und im Analytics-Dashboard
 * (Next.js/Tailwind) — hier als reines CSS, damit die Flask-Oberflächen
 * identisch aussehen. Wer hier etwas ändert, ändert es überall. */

:root {
  --brand:        oklch(0.59 0.14 242);
  --brand-hover:  oklch(0.55 0.15 242);
  --brand-soft:   oklch(0.97 0.02 242);
  --brand-ring:   oklch(0.59 0.14 242 / 0.18);

  --ink:     #09090b;
  --ink-2:   #18181b;
  --ink-3:   #3f3f46;
  --ink-4:   #71717a;
  --ink-5:   #a1a1aa;

  --zinc-50:  #fafafa;
  --zinc-100: #f4f4f5;
  --zinc-200: #e4e4e7;
  --zinc-300: #d4d4d8;

  --gruen:  #059669;
  --gruen-soft: #ecfdf5;
  --rot:    #e11d48;
  --rot-soft: #fff1f2;

  --schatten-soft: 0 1px 2px rgba(9, 9, 11, .04), 0 1px 1px rgba(9, 9, 11, .025);
  --schatten-card: 0 1px 2px rgba(9, 9, 11, .04), 0 8px 24px -12px rgba(9, 9, 11, .1);
  --schatten-pop:  0 2px 4px rgba(9, 9, 11, .04), 0 12px 28px -12px rgba(9, 9, 11, .12);

  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;

  --ease: cubic-bezier(.32, .72, 0, 1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--zinc-50);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }
::selection { background: var(--brand-ring); }
.tnum { font-variant-numeric: tabular-nums; }

/* --- Flächen --------------------------------------------------------- */

.card {
  background: #fff;
  border: 1px solid var(--zinc-200);
  border-radius: var(--r-xl);
  box-shadow: var(--schatten-soft);
  padding: 24px;
}
.card-flach { box-shadow: none; }
.trenner { height: 1px; background: var(--zinc-200); border: 0; margin: 18px 0 0; }

/* --- Kopfleiste mit Plattform-Wechsler ------------------------------- */

.kopf {
  background: #fff;
  border-bottom: 1px solid var(--zinc-200);
}
.kopf-innen {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.kopf-links { display: flex; align-items: center; gap: 18px; }
.eyebrow {
  font-size: 10px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-5);
}
.kopf-titel { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.kopf-sub { font-size: 11.5px; color: var(--ink-4); }

.wechsler { display: flex; align-items: center; gap: 4px; }
.wechsler a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: var(--r-md);
  font-size: 12px; font-weight: 500; color: var(--ink-3);
  text-decoration: none; white-space: nowrap;
  transition: background-color .16s var(--ease), color .16s var(--ease);
}
.wechsler a:hover { background: var(--zinc-100); }
.wechsler a.aktiv { background: var(--ink); color: #fff; }
.wechsler svg { width: 14px; height: 14px; }

/* --- Schaltflächen --------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 12px;
  padding: 10px 16px;
  font: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer;
  transition: transform .16s var(--ease), background-color .16s var(--ease),
              box-shadow .16s var(--ease), border-color .16s var(--ease);
}
.btn:active { transform: translateY(.5px) scale(.985); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-block { width: 100%; }

.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--ink-2); }

.btn-ghost { background: #fff; color: var(--ink-3); border-color: var(--zinc-200); }
.btn-ghost:hover:not(:disabled) { background: var(--zinc-50); }

.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover:not(:disabled) { background: var(--brand-hover); }

.btn-klein { padding: 6px 10px; font-size: 12px; border-radius: var(--r-md); }
.btn-gefahr { background: #fff; color: var(--rot); border-color: var(--zinc-200); }
.btn-gefahr:hover:not(:disabled) { background: var(--rot-soft); }

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

.feld {
  width: 100%; height: 40px;
  border: 1px solid var(--zinc-200); border-radius: 12px;
  padding: 0 12px;
  font: inherit; font-size: 13px; background: #fff; color: var(--ink);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.feld:focus { outline: none; border-color: var(--ink-5); box-shadow: 0 0 0 3px var(--zinc-100); }
.code-feld {
  text-align: center; letter-spacing: .3em; font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.label {
  display: block; margin-bottom: 4px;
  font-size: 11px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-5);
}

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

.hinweis { margin: 0 0 10px; font-size: 12.5px; line-height: 1.6; color: var(--ink-4); }
.hinweis b { color: var(--ink-3); font-weight: 600; }
.fehler { margin: 12px 0 0; min-height: 16px; text-align: center; font-size: 12px; color: var(--rot); }

/* --- Marke im Anmeldedialog ------------------------------------------ */

.marke { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.marke-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--r-lg);
  background: var(--ink); color: #fff;
}
.marke-titel { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.marke-sub { font-size: 11.5px; color: var(--ink-4); }

.punkt {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--brand); flex: none;
}

/* --- Status ---------------------------------------------------------- */

.pille {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 600;
  background: var(--zinc-100); color: var(--ink-3);
}
.pille-gruen { background: var(--gruen-soft); color: var(--gruen); }
.pille-rot { background: var(--rot-soft); color: var(--rot); }

/* --- Abschnittsueberschrift in Karten --- */
.section-titel {
  font-size: 12px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-5);
}

/* --- Plattform-Wechsler --- */
.wechsler a.aktiv { background: var(--ink); color: #fff; }
