/* =====================================================================
   CiCo minus1 – Design-System (Redesign 2026)
   Dunkles Theme, Primärfarbe #8000FF, Euclid Flex + Inter Variable,
   Icons: Phosphor (Regular), inline als SVG.

   Diese Datei ist ein Startpunkt: Tokens + Basis-Komponenten.
   Klassen dürfen an die bestehende Struktur angepasst werden,
   die Werte (Farben, Grössen, Abstände) sind verbindlich.
   ===================================================================== */

/* ---------- Schriften (selbst gehostet, keine externen Requests) ---------- */
/* Euclid Flex: lizenziert, Dateien liegen bereits unter legacy/fonts/
   → nach public/assets/fonts/euclid/ kopieren. */
@font-face {
  font-family: "Euclid Flex";
  src: url("../fonts/euclid/EuclidFlex-Regular-WebS.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Euclid Flex";
  src: url("../fonts/euclid/EuclidFlex-Semibold-WebS.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
/* Inter Variable (OFL 1.1), Achsen opsz + wght */
@font-face {
  font-family: "Inter Variable";
  src: url("../fonts/inter/InterVariable-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter Variable";
  src: url("../fonts/inter/InterVariable-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;

  /* Flächen */
  --c-bg: #0C0A12;          /* Grund */
  --c-surface: #211A30;     /* Karten, Felder */
  --c-surface-2: #2B2340;   /* erhöht: Sekundär-Buttons, Chips */
  --c-border: #3A3054;      /* Ränder, Schalter aus */

  /* Text */
  --c-text: #F4F1FA;        /* Primärtext            15.0:1 auf surface */
  --c-text-2: #D4CDE0;      /* Sekundärtext          10.8:1 auf surface (heller seit 23.11.2026) */
  --c-text-3: #948BA8;      /* Labels, Meta           5.2:1 auf surface */

  /* Primär */
  --c-primary: #8000FF;     /* Buttons, aktive Flächen, Logo */
  --c-primary-hover: #9A33FF; /* Rand aktiver Kacheln, Fokus, :active */
  --c-primary-text: #C9A2FF;  /* Text-Akzent, Links (8.0:1 auf surface) */
  --c-primary-soft: rgba(128, 0, 255, 0.18); /* getönte Flächen, Icon-Kacheln */
  --c-on-primary: #FFFFFF;    /* Text auf #8000FF: 6.2:1 */
  --c-on-primary-2: rgba(255, 255, 255, 0.86);
  --c-on-primary-soft: rgba(255, 255, 255, 0.16);

  /* Status */
  --c-success: #3DDC97;
  --c-warning: #FFC24A;
  --c-danger: #FF6B81;
  /* getönte Status-Flächen und ihre Ränder (Hinweise, Löschen-Buttons, Pills) */
  --c-info-line: rgba(154, 51, 255, 0.4);
  --c-success-soft: rgba(61, 220, 151, 0.10);
  --c-success-line: rgba(61, 220, 151, 0.35);
  --c-warning-soft: rgba(255, 194, 74, 0.10);
  --c-warning-line: rgba(255, 194, 74, 0.35);
  --c-danger-soft: rgba(255, 107, 129, 0.10);
  --c-danger-line: rgba(255, 107, 129, 0.35);
  --c-danger-soft-2: rgba(255, 107, 129, 0.12);  /* Löschen-Button, Fehler-Pill */
  --c-danger-line-2: rgba(255, 107, 129, 0.5);

  /* Links, Felder, Karten (im hellen Admin-Theme überschrieben, siehe admin-light.css) */
  --c-link-hover: #E2CCFF;
  --c-field-border: #3A3054;   /* = --c-border */
  --shadow-card: none;
  --icon-caret: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%23D4CDE0'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E");

  /* Effekte */
  --glow: 0 12px 40px rgba(128, 0, 255, 0.35);  /* «aktiv / eingeschaltet» */
  --focus-ring: 0 0 0 4px rgba(128, 0, 255, 0.35);

  /* Radien */
  --r-xs: 8px;    /* Checkbox */
  --r-sm: 12px;   /* QR-Rahmen klein */
  --r-md: 14px;   /* Inputs, Icon-Kacheln */
  --r-lg: 16px;   /* Buttons, QR */
  --r-xl: 22px;   /* Strom-/Hilfe-Kacheln, Option-Karten */
  --r-2xl: 24px;  /* Karten Startseite */
  --r-3xl: 28px;  /* grosse Auswahl-Karten */
  --r-pill: 999px;

  /* Abstände */
  --s-1: 4px; --s-2: 8px; --s-3: 10px; --s-4: 12px; --s-5: 16px;
  --s-6: 20px; --s-7: 24px; --s-8: 28px; --s-9: 32px; --s-10: 40px;

  /* Schrift */
  --font-display: "Euclid Flex", "Inter Variable", system-ui, sans-serif;
  --font-ui: "Inter Variable", system-ui, -apple-system, sans-serif;
  --fw-text: 350;     /* Fliesstext, Eingaben */
  --fw-meta: 450;     /* hervorgehobene Meta-Texte, Chips */
  --fw-ui: 550;       /* Labels, Buttons */
  --fw-display: 600;  /* Euclid Flex Semibold – alle Titel */

  /* Touch-Grössen */
  --h-btn-lg: 64px;
  --h-btn-md: 52px;
  --h-icon-btn: 56px;
  --h-input: 60px;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-ui);
  font-weight: var(--fw-text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation; /* kein Doppeltipp-Zoom (Kiosk) */
}

h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: var(--fw-display); line-height: 1.1; }
p { margin: 0; }

a { color: var(--c-primary-text); }
a:hover, a:active { color: var(--c-link-hover); }

:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* Icons: Phosphor-SVG inline, Farbe über currentColor */
.icon { width: 24px; height: 24px; flex: none; display: block; fill: currentColor; }
.icon--20 { width: 20px; height: 20px; }
.icon--22 { width: 22px; height: 22px; }
.icon--26 { width: 26px; height: 26px; }
.icon--28 { width: 28px; height: 28px; }
.icon--30 { width: 30px; height: 30px; }
.icon--40 { width: 40px; height: 40px; }

/* ---------- Layout ---------- */
/* iPad (Kiosk, Hochformat 820 × 1180 CSS-px) und Handy (390 × 844) */
.app {
  width: 100%;
  max-width: 820px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 32px 40px 28px;
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
}
.app__spacer { flex: 1 1 auto; }

@media (max-width: 600px) {
  .app { padding: 20px 20px 24px; gap: var(--s-6); }
}

.app-header { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); }
.app-header__actions { display: flex; gap: var(--s-3); }

.brand { display: flex; align-items: center; gap: var(--s-5); color: var(--c-text); text-decoration: none; }
.brand__logo { width: 64px; height: 64px; color: var(--c-primary); flex: none; }
.brand__name { font-family: var(--font-display); font-weight: var(--fw-display); font-size: 30px; line-height: 1; }
/* Testmodus: kleiner Hinweis direkt nach dem Schriftzug (ersetzt den Streifen oben) */
.brand__text { display: flex; align-items: baseline; gap: var(--s-3); }
.brand__test { font-size: 12px; line-height: 1; font-weight: var(--fw-ui); letter-spacing: 0.08em; color: var(--c-warning); }
@media (max-width: 600px) {
  .brand { gap: var(--s-4); }
  .brand__logo { width: 48px; height: 48px; }
  .brand__name { font-size: 24px; }
  .brand__text { flex-direction: column; align-items: flex-start; gap: 4px; } /* Platz für die Pill */
  .brand__test { font-size: 11px; }
}

.page-intro { display: flex; flex-direction: column; gap: var(--s-3); }
.page-title { font-size: 46px; line-height: 1.05; }
.page-title--start { font-size: 52px; letter-spacing: -0.01em; }
.page-lead { font-size: 19px; line-height: 1.5; color: var(--c-text-2); }
@media (max-width: 600px) {
  .page-title, .page-title--start { font-size: 34px; line-height: 1.1; }
  .page-lead { font-size: 16px; }
}

.section { display: flex; flex-direction: column; gap: var(--s-4); }
.section__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); }
.section-label {
  font-size: 13px; font-weight: var(--fw-ui); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--c-text-3);
}
.section__meta { font-size: 13px; color: var(--c-text-3); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
/* .grid-2--stack: auf dem Handy untereinander (z. B. Check-in-Karten). Strom-Kacheln bleiben nebeneinander. */
@media (max-width: 600px) {
  .grid-3, .grid-2--stack { grid-template-columns: 1fr; }
}

.app-footer { font-size: 12px; line-height: 1.5; color: var(--c-text-3); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-3);
  height: var(--h-btn-lg); padding: 0 28px;
  border: 1px solid transparent; border-radius: var(--r-lg);
  font-family: var(--font-ui); font-size: 19px; font-weight: var(--fw-ui);
  text-decoration: none; white-space: nowrap; cursor: pointer; user-select: none;
  transition: background-color 120ms, border-color 120ms, transform 80ms;
}
.btn:active { transform: scale(0.98); }
.btn--md { height: var(--h-btn-md); padding: 0 24px; font-size: 16px; }
.btn--md .icon { width: 20px; height: 20px; }
.btn--block { width: 100%; }

.btn--primary { background: var(--c-primary); color: var(--c-on-primary); }
.btn--primary:hover, .btn--primary:active { background: var(--c-primary-hover); color: var(--c-on-primary); }

.btn--secondary { background: var(--c-surface-2); border-color: var(--c-border); color: var(--c-text); }
.btn--secondary:active { border-color: var(--c-primary-hover); }

.btn--ghost { background: transparent; color: var(--c-primary-text); }

.btn--danger { background: var(--c-danger-soft-2); border-color: var(--c-danger-line-2); color: var(--c-danger); }

/* Gesperrt, z. B. 15-s-Countdown bei den Nutzungsregeln */
.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--c-surface-2); border-color: var(--c-border); color: var(--c-text-2);
  cursor: not-allowed; transform: none;
}

.btn-row { display: grid; grid-template-columns: 1fr 2fr; gap: var(--s-4); } /* Zurück | Weiter */

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--h-icon-btn); height: var(--h-icon-btn);
  border: 1px solid var(--c-border); border-radius: var(--r-lg);
  background: var(--c-surface); color: var(--c-text); cursor: pointer; text-decoration: none;
}

/* ---------- Karten ---------- */
.card {
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--s-7);
  padding: 26px; border: 1px solid var(--c-border); border-radius: var(--r-2xl);
  background: var(--c-surface); color: var(--c-text); text-decoration: none;
}
.card--primary { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-on-primary); }
.card__top { display: flex; justify-content: space-between; align-items: flex-start; }
.card__body { display: flex; flex-direction: column; gap: 6px; }
.card__title { font-family: var(--font-display); font-weight: var(--fw-display); font-size: 28px; line-height: 1.15; }
.card__text { font-size: 16px; line-height: 1.45; color: var(--c-text-2); }
.card--primary .card__text { color: var(--c-on-primary-2); }
.card__arrow { color: var(--c-text-2); }
.card--primary .card__arrow { color: var(--c-on-primary); }

@media (max-width: 600px) {
  .card { padding: 22px; }
  .card--choice { min-height: 0; padding: 24px; }
  .card--choice .card__title { font-size: 28px; }
  .usage { flex-wrap: wrap; padding: 16px; }
  .usage .btn { width: 100%; }
}

/* Startseite: Check-in-Karten */
.card--entry { min-height: 212px; }      /* Entwurf: 236 px, gekürzt damit die Startseite ins iPad passt */
/* Startseite: 24 statt 28 px zwischen den Abschnitten; Header und Ränder wie auf allen Seiten */
.app--start .app__main { gap: var(--s-7); }
@media (max-width: 600px) { .app--start .app__main { gap: var(--s-6); } }

/* Grosse Auswahl-Karten (Event / Kurznutzung) */
.card--choice { min-height: 280px; padding: 32px; border-radius: var(--r-3xl); gap: var(--s-8); justify-content: flex-start; }
.card--choice .card__title { font-size: 36px; }
.card--choice .card__text { font-size: 18px; line-height: 1.5; }

/* Icon-Kachel in Karten */
.icon-tile {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 56px; height: 56px; border-radius: var(--r-lg);
  background: var(--c-primary-soft); color: var(--c-primary-text);
}
.icon-tile--sm { width: 48px; height: 48px; border-radius: var(--r-md); }
.icon-tile--lg { width: 72px; height: 72px; border-radius: 20px; }
.card--primary .icon-tile { background: var(--c-on-primary-soft); color: var(--c-on-primary); }
.icon-tile--solid { background: var(--c-primary); color: var(--c-on-primary); }

/* Aktiver Zustand: laufende Nutzung (Eingecheckt) = gleich wie eingeschalteter Strom */
.is-active,
.card--active {
  border-color: var(--c-primary-hover);
  background: var(--c-primary-soft);
  box-shadow: var(--glow);
}

/* Eingecheckt-Zeile (iPad Start) */
.usage {
  display: flex; align-items: center; gap: var(--s-5);
  padding: 18px 18px 18px 22px; border: 1px solid var(--c-border); border-radius: var(--r-xl);
  background: var(--c-surface);
}
/* Laufende Nutzung: violetter Rahmen wie eingeschalteter Strom (.usage überschreibt sonst .card--active) */
.usage.card--active { border-color: var(--c-primary-hover); background: var(--c-primary-soft); box-shadow: var(--glow); }
.usage__avatar {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 52px; height: 52px; border-radius: var(--r-md);
  background: var(--c-primary); color: var(--c-on-primary);
  font-family: var(--font-display); font-weight: var(--fw-display); font-size: 18px;
}
.usage__text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.usage__name { font-family: var(--font-display); font-weight: var(--fw-display); font-size: 20px; }
.usage__meta { font-size: 16px; line-height: 1.45; color: var(--c-primary-text); }

/* Chips (Hinweise auf Auswahl-Karten) */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip {
  display: inline-flex; align-items: center; height: 32px; padding: 0 14px;
  border-radius: var(--r-pill); background: var(--c-surface-2);
  font-size: 14px; font-weight: var(--fw-meta); color: var(--c-text);
}
.card--primary .chip { background: var(--c-on-primary-soft); color: var(--c-on-primary); }

/* ---------- Strom-Kacheln (Toggle) ---------- */
/* iPad: Icon | Text | Schalter in einer Zeile. Handy: kompakt, gestapelt. */
.power {
  display: flex; align-items: center; gap: var(--s-5); width: 100%;
  padding: 18px 20px; text-align: left;
  border: 1px solid var(--c-border); border-radius: var(--r-xl);
  background: var(--c-surface); color: var(--c-text); cursor: pointer;
  font-family: var(--font-ui);
}
.power__icon {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 52px; height: 52px; border-radius: var(--r-md);
  background: var(--c-surface-2); color: var(--c-text-2);
}
.power__text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.power__name { font-family: var(--font-display); font-weight: var(--fw-display); font-size: 22px; }
.power__state { font-size: 15px; font-weight: var(--fw-text); color: var(--c-text-2); }
.power__state--short { display: none; }

.power[aria-pressed="true"] { border-color: var(--c-primary-hover); background: var(--c-primary-soft); box-shadow: var(--glow); }
.power[aria-pressed="true"] .power__icon { background: var(--c-primary); color: var(--c-on-primary); }
.power[aria-pressed="true"] .power__state { color: var(--c-primary-text); }
.power[aria-busy="true"] { opacity: 0.6; pointer-events: none; } /* Vorschlag: während IFTTT-Request */

/* Handy: zwei Kacheln nebeneinander, darum gestapelt – oben Icon + Schalter, darunter Text */
@media (max-width: 600px) {
  .power {
    display: grid; grid-template-columns: 1fr auto; align-items: center;
    grid-template-areas: "icon switch" "text text"; gap: 14px; padding: 18px;
  }
  .power__icon { grid-area: icon; width: 44px; height: 44px; }
  .power .switch { grid-area: switch; }
  .power__text { grid-area: text; }
  .power__name { font-size: 18px; }
  .power__state--long { display: none; }
  .power__state--short { display: block; }
}

/* Schalter (rein visuell, das ganze Element ist der Button) */
.switch {
  display: flex; align-items: center; justify-content: flex-start; flex: none;
  width: 56px; height: 32px; padding: 4px; border-radius: var(--r-pill);
  background: var(--c-border);
}
.switch::after {
  content: ""; width: 24px; height: 24px; border-radius: var(--r-pill);
  background: var(--c-text-3); transition: transform 150ms;
}
[aria-pressed="true"] > .switch,
.switch.is-on { background: var(--c-primary); }
[aria-pressed="true"] > .switch::after,
.switch.is-on::after { background: #FFFFFF; transform: translateX(24px); }

/* ---------- Hilfe-Kacheln ---------- */
.help-tile {
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
  min-height: 110px; padding: 18px 20px;
  border: 1px solid var(--c-border); border-radius: var(--r-xl);
  background: var(--c-surface); color: var(--c-text); text-decoration: none;
}
.help-tile__top { display: flex; justify-content: space-between; align-items: flex-start; }
.help-tile__title { font-family: var(--font-display); font-weight: var(--fw-display); font-size: 19px; line-height: 1.25; }
.help-tile__text { font-size: 14px; line-height: 1.45; color: var(--c-text-2); }

/* ---------- QR-Codes ---------- */
.qr { flex: none; width: 124px; height: 124px; padding: 8px; border-radius: var(--r-lg); background: #FFFFFF; }
.qr--sm { width: 72px; height: 72px; padding: 5px; border-radius: var(--r-sm); }
.qr img, .qr svg { display: block; width: 100%; height: 100%; }

/* ---------- Status-Pill ---------- */
.pill {
  display: inline-flex; align-items: center; gap: var(--s-2); height: 36px; padding: 0 16px;
  border-radius: var(--r-pill); background: var(--c-surface-2);
  font-size: 15px; font-weight: var(--fw-ui); color: var(--c-text);
}
.pill__dot { width: 10px; height: 10px; border-radius: var(--r-pill); background: var(--c-text-3); }
.pill--free .pill__dot, .pill--ok .pill__dot { background: var(--c-success); }
.pill--busy .pill__dot { background: var(--c-warning); }
.pill--overdue .pill__dot { background: var(--c-danger); }

/* ---------- Fortschritt (Check-in-Schritte) ---------- */
.progress { display: flex; flex-direction: column; gap: var(--s-4); }
.progress__label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; font-weight: var(--fw-text); letter-spacing: 0.01em; color: var(--c-text-2);
}
.progress__flow { font-weight: var(--fw-meta); color: var(--c-primary-text); }
.progress__bar { display: flex; gap: 6px; }
.progress__seg { flex: 1 1 0; height: 6px; border-radius: var(--r-pill); background: var(--c-border); }
.progress__seg.is-done { background: var(--c-primary); }

/* ---------- Nutzungsregeln ---------- */
.rules { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--s-3); }
.rule {
  display: flex; gap: var(--s-6); align-items: flex-start;
  padding: 20px 22px; border-radius: 20px; background: var(--c-surface);
}
.rule__num {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 52px; height: 52px; border-radius: var(--r-md); background: var(--c-primary);
  font-family: var(--font-display); font-weight: var(--fw-display); font-size: 28px; line-height: 1; color: var(--c-on-primary);
}
.rule__body { display: flex; flex-direction: column; gap: 6px; padding-top: 2px; }
.rule__title { font-family: var(--font-display); font-weight: var(--fw-display); font-size: 21px; line-height: 1.3; }
.rule__text { font-size: 15px; line-height: 1.45; color: var(--c-text-2); }

/* ---------- Formulare ---------- */
.form { display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: var(--s-2); }
.field__label { font-size: 15px; font-weight: var(--fw-ui); color: var(--c-text); }
.field__control { position: relative; }
.field__icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--c-text-3); pointer-events: none; }
.field__caret { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: var(--c-text-2); pointer-events: none; }

.input, .select, .textarea {
  width: 100%; height: var(--h-input); padding: 0 18px;
  border: 1px solid var(--c-border); border-radius: var(--r-md);
  background: var(--c-surface); color: var(--c-text);
  font-family: var(--font-ui); font-size: 18px; font-weight: var(--fw-text);
  outline: none; -webkit-appearance: none; appearance: none;
}
.field__control--icon .input, .field__control--icon .select { padding-left: 52px; }
.select { padding-right: 52px; }
.textarea { height: auto; min-height: 120px; padding: 16px 18px; line-height: 1.5; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--c-text-3); }
.input:focus, .select:focus, .textarea:focus { border: 2px solid var(--c-primary-hover); box-shadow: var(--focus-ring); }

.field--error .input, .field--error .select, .field--error .textarea { border: 2px solid var(--c-danger); }
.field__error { display: flex; align-items: center; gap: var(--s-2); font-size: 14px; color: var(--c-danger); }

/* Checkbox: echtes input, visuell versteckt, Box als Geschwister */
.check { display: flex; align-items: center; gap: 14px; min-height: 44px; font-size: 17px; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 28px; height: 28px; border-radius: var(--r-xs); border: 2px solid var(--c-text-3); color: transparent;
}
.check input:checked + .check__box { background: var(--c-primary); border-color: var(--c-primary); color: #FFFFFF; }
.check input:focus-visible + .check__box { box-shadow: var(--focus-ring); }

/* Option-Karten (Badge / WLAN), ganze Karte ist Toggle-Button */
.option {
  display: flex; gap: 14px; align-items: flex-start; width: 100%; padding: 18px; text-align: left;
  border: 1px solid var(--c-border); border-radius: 20px; background: var(--c-surface); color: var(--c-text);
  font-family: var(--font-ui); cursor: pointer;
}
.option__icon {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; border-radius: var(--r-md); background: var(--c-surface-2); color: var(--c-primary-text);
}
.option__text { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; }
.option__title { font-family: var(--font-display); font-weight: var(--fw-display); font-size: 18px; line-height: 1.25; }
.option__desc { font-size: 14px; line-height: 1.45; color: var(--c-text-2); }
.option[aria-pressed="true"] { border-color: var(--c-primary-hover); background: var(--c-primary-soft); }
.option[aria-pressed="true"] .option__icon { background: var(--c-primary); color: #FFFFFF; }

/* ---------- Hinweise ---------- */
.alert {
  display: flex; gap: var(--s-4); align-items: flex-start; padding: 14px 16px;
  border: 1px solid transparent; border-radius: var(--r-lg); font-size: 15px; line-height: 1.5; color: var(--c-text);
}
.alert .icon { width: 22px; height: 22px; }
.alert--info    { background: var(--c-primary-soft); border-color: var(--c-info-line); }
.alert--info .icon { color: var(--c-primary-text); }
.alert--success { background: var(--c-success-soft); border-color: var(--c-success-line); }
.alert--success .icon { color: var(--c-success); }
.alert--warning { background: var(--c-warning-soft); border-color: var(--c-warning-line); }
.alert--warning .icon { color: var(--c-warning); }
.alert--danger  { background: var(--c-danger-soft); border-color: var(--c-danger-line); }
.alert--danger .icon { color: var(--c-danger); }

/* ---------- Handy: Status-Karte «Du bist eingecheckt» ---------- */
.status-card {
  display: flex; flex-direction: column; gap: 14px; padding: 22px;
  border-radius: var(--r-2xl); background: var(--c-primary); color: var(--c-on-primary);
}
.status-card__kicker { display: flex; align-items: center; gap: var(--s-3); font-size: 15px; font-weight: var(--fw-ui); color: var(--c-on-primary-2); }
.status-card__title { font-family: var(--font-display); font-weight: var(--fw-display); font-size: 30px; line-height: 1.1; }
.status-card__meta { font-size: 15px; color: var(--c-on-primary-2); }

/* ---------- Kiosk-Feinheiten ---------- */
.kiosk, .kiosk * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.kiosk input, .kiosk textarea, .kiosk select { -webkit-user-select: text; user-select: text; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* =====================================================================
   Ergänzungen für die App (gleiche Tokens, keine neuen Farbwerte)
   ===================================================================== */

/* ---------- Grundgerüst ---------- */
.app__main { flex: 1 1 auto; display: flex; flex-direction: column; gap: inherit; }
.app__main > * { min-width: 0; }
.brand__logo { display: block; }
.app-footer a { color: inherit; }
.app-footer p + p { margin-top: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus { left: 16px; top: 24px; z-index: 20; padding: 8px 14px; border-radius: var(--r-md); background: var(--c-surface-2); color: var(--c-text); }

/* ---------- Texte ---------- */
.text { font-size: 17px; line-height: 1.5; color: var(--c-text-2); }
.text strong { color: var(--c-text); font-weight: var(--fw-ui); }
.small { font-size: 14px; line-height: 1.45; color: var(--c-text-3); }
.center { text-align: center; }
.list { margin: 0; padding: 0 0 0 1.2em; display: flex; flex-direction: column; gap: 6px; font-size: 16px; line-height: 1.45; color: var(--c-text-2); }
.list li::marker { color: var(--c-primary-text); }

/* Karte mit Fliesstext (Übernahme, Check-out-Listen) */
.panel { display: flex; flex-direction: column; gap: var(--s-4); padding: 22px; border-radius: 20px; background: var(--c-surface); }
.panel__title { font-family: var(--font-display); font-weight: var(--fw-display); font-size: 21px; line-height: 1.3; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 16px; line-height: 1.45; }
.facts dt { color: var(--c-text-3); }
.facts dd { margin: 0; color: var(--c-text); overflow-wrap: anywhere; }

/* ---------- Buttons und Aktionen ---------- */
.btn .icon { width: 24px; height: 24px; }
.btn--md .icon { width: 20px; height: 20px; }
.actions { display: flex; flex-direction: column; gap: var(--s-4); }
.btn-row--single { grid-template-columns: 1fr; }
form.inline { display: contents; }
@media (max-width: 600px) {
  .btn { padding: 0 20px; }
}

/* Startseite: ganze Karte als Link, Pfeil zeigt «antippbar» */
a.card, a.help-tile { transition: transform 80ms, border-color 120ms; }
a.card:active, a.help-tile:active { transform: scale(0.99); }
a.card--primary:active { background: var(--c-primary-hover); border-color: var(--c-primary-hover); }
.card--wide { min-height: 0; }

.qr-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--c-bg); }

/* ---------- Strom ---------- */
/* Nicht verfügbar: deutlich zurückgenommen, der Grund bleibt lesbar (text-3: 5.2:1) */
.power:disabled { cursor: not-allowed; background: var(--c-bg); border-color: var(--c-surface-2); box-shadow: none; }
.power:disabled .power__name,
.power:disabled .power__state { color: var(--c-text-3); }
.power:disabled .power__icon { background: var(--c-surface); color: var(--c-text-3); opacity: 0.6; }
.power:disabled .switch { opacity: 0.4; }
.power:active:not(:disabled) { transform: scale(0.99); }

/* ---------- Formulare ---------- */
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6); }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; gap: 22px; } }
.field__hint { font-size: 14px; line-height: 1.45; color: var(--c-text-2); }
.field__error .icon { width: 20px; height: 20px; }
.select option { background: var(--c-surface); color: var(--c-text); }

/* Checkbox-Zeile mit längerem Text */
.check { align-items: flex-start; line-height: 1.45; }
.check__box { margin-top: -2px; }
.check__box .icon { width: 18px; height: 18px; }
.check__text { padding-top: 1px; }
.check--card { padding: 18px; border: 1px solid var(--c-border); border-radius: 20px; background: var(--c-surface); }
.check--card:has(input:checked) { border-color: var(--c-primary-hover); background: var(--c-primary-soft); }
.check--card.field--error { border: 2px solid var(--c-danger); }

/* Option-Karte als <label> mit echter Checkbox (Badge, WLAN) */
label.option { position: relative; }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option .check__box { align-self: center; margin-top: 0; }
.option:has(input:checked) { border-color: var(--c-primary-hover); background: var(--c-primary-soft); }
.option:has(input:checked) .option__icon { background: var(--c-primary); color: #FFFFFF; }
.option input:checked ~ .check__box { background: var(--c-primary); border-color: var(--c-primary); color: #FFFFFF; }
.option input:focus-visible ~ .check__box { box-shadow: var(--focus-ring); }

/* Auswahl einer Person (Kurznutzung): grosse antippbare Zeilen */
.pick { display: flex; flex-direction: column; gap: var(--s-3); }
.pick__item {
  display: flex; align-items: center; gap: var(--s-5); width: 100%; min-height: 64px; padding: 10px 18px 10px 12px;
  border: 1px solid var(--c-border); border-radius: 20px; background: var(--c-surface); color: var(--c-text);
  font-family: var(--font-display); font-weight: var(--fw-display); font-size: 20px; text-align: left; cursor: pointer;
}
.pick__item .usage__avatar { width: 44px; height: 44px; font-size: 16px; }
.pick__item .icon:last-child { margin-left: auto; color: var(--c-text-2); }
.pick__item:active, .pick__item.is-selected { border-color: var(--c-primary-hover); background: var(--c-primary-soft); }
.pick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
@media (max-width: 600px) { .pick-grid { grid-template-columns: 1fr; } }

/* ---------- Hinweise ---------- */
.alert p + p { margin-top: 6px; }
.alert__body { display: flex; flex-direction: column; gap: 4px; }
.alert__title { font-weight: var(--fw-ui); }
.alert a { color: var(--c-primary-text); }

/* ---------- Handy ---------- */
.status-card__kicker .icon { width: 22px; height: 22px; }
.link-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }

/* Erfolgsseiten */
.done-icon { display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 20px; background: var(--c-primary); color: var(--c-on-primary); }
.done-icon .icon { width: 40px; height: 40px; }

/* ---------- Schritte ---------- */
[hidden] { display: none !important; }
.step-form { flex: 1 1 auto; display: flex; flex-direction: column; gap: inherit; }
.btn > span { display: inline-flex; align-items: center; gap: var(--s-3); }
.help-tile--row { flex-direction: row; align-items: center; min-height: 0; gap: var(--s-5); }
.help-tile--row .card__body { flex: 1 1 auto; }

/* Startseite iPad mit offener Nutzung: Abschnitte etwas enger, damit alles ohne Scrollen sichtbar bleibt (Abnahme) */
.app--start.app--busy .app__main { gap: 18px; }
.btn > span > span { display: inline; }
.facts a { display: inline-flex; align-items: center; min-height: 44px; margin: -12px 0; }

/* Handy: Zurück/Abbrechen gibt es im Header, unten nur der Primär-Button in voller Breite (Redesign 06) */
@media (max-width: 600px) {
  .btn-row { grid-template-columns: 1fr; }
  .btn-row > .btn--secondary { display: none; }
}
