/* =======================================================================
   Lytchie Club Card — Design wie NexoMilo2: Nachtschwarz in Stufen,
   warmes Gold als sparsamer Akzent, native Systemschrift, mobile-first
   (max. 480px Spaltenbreite). Große Tippflächen für den Salon-Alltag.
   ======================================================================= */
:root {
  --bg: #08080a;
  --card: #121216;
  --card-2: #1a1a20;
  --card-3: #23232a;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);

  --text: #f5f5f7;
  --text-2: #b4b4bd;
  --muted: #8e8e99;

  --gold: #d4af37;
  --gold-2: #f0dca4;
  --gold-dim: rgba(212, 175, 55, 0.12);
  --gold-glow: rgba(212, 175, 55, 0.22);

  --danger: #ff4d45;
  --danger-dim: rgba(255, 77, 69, 0.12);
  --ok: #35d07f;
  --ok-dim: rgba(53, 208, 127, 0.12);

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { background: var(--bg); }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

.value, .stat .value, .stand { font-variant-numeric: tabular-nums; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
}

#app {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
}

.hidden { display: none !important; }

/* ---------- Kopfzeile ---------- */
.appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(10, 10, 11, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  margin-right: auto;
  min-width: 0;
}
.brand b {
  font-size: 16px;
  letter-spacing: 0.3px;
  font-family: Georgia, 'Times New Roman', serif;
}
.brand .brand-gold { color: var(--gold); }
.brand small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.iconbtn {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  border-radius: 10px;
  /* 42px hoch: nah an der 44px-Tippflächen-Empfehlung, ohne die
     Kopfzeile aufzublähen. In Listenzeilen sorgt der Zeilen-Abstand
     für den Rest. */
  height: 42px;
  min-width: 46px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}
.iconbtn:active { transform: scale(0.97); }

/* Sprachumschalter: EIN Knopf, die Flagge zeigt die aktuelle Sprache. */
.lang-toggle { font-size: 20px; line-height: 1; padding: 0 10px; }
.login-lang { text-align: center; margin-top: 18px; }
.login-lang .lang-toggle { border: none; background: none; font-size: 24px; }

/* ---------- Tabs (Inhaber) ---------- */
.tabs {
  display: flex;
  gap: 6px;
  padding: 10px 12px 0;
}
.tabs button {
  flex: 1;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: bold;
  padding: 10px 4px 12px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.tabs button.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ---------- Inhalt ---------- */
main {
  flex: 1;
  padding: 16px;
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
  margin: 2px 0 10px;
}

.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }
.gold { color: var(--gold); }
.danger { color: var(--danger); }

/* Statistik-Kacheln */
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.stat.wide { grid-column: 1 / -1; }
.stat .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}
.stat .value {
  font-size: 30px;
  font-weight: bold;
  line-height: 1.12;
  margin-top: 4px;
}
.stat.gold .value { color: var(--gold); }

/* ---------- Knöpfe ---------- */
.btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: var(--radius-sm);
  padding: 15px 16px;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.08s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.gold {
  background: linear-gradient(135deg, var(--gold) 0%, #b8942a 100%);
  color: #16130a;
  box-shadow: 0 6px 22px var(--gold-glow);
}
.btn.ghost {
  background: var(--card);
  border: 1px solid var(--line-strong);
  color: var(--text);
}
.btn.ok {
  background: var(--ok);
  color: #062c18;
}
.btn.danger-ghost {
  background: var(--danger-dim);
  border: 1px solid transparent;
  color: var(--danger);
}
.btn.big { padding: 20px 16px; font-size: 18px; border-radius: var(--radius); }
.btn.klein {
  display: inline-block;
  width: auto;
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 10px;
}
.stack { display: flex; flex-direction: column; gap: 10px; }
.row2 { display: flex; gap: 10px; }
.row2 > * { flex: 1; }

/* ---------- Formulare ---------- */
label.feld {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 12px 0 6px;
}
input[type="text"], input[type="password"], input[type="number"], input[type="url"],
select, textarea {
  width: 100%;
  background: var(--card-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 16px; /* 16px verhindert den iOS-Auto-Zoom beim Fokussieren */
  padding: 13px 14px;
  appearance: none;
}
textarea { font-family: inherit; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
}
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

/* ---------- Listen (Verwaltung, Kunden, Verlauf) ---------- */
.liste { display: flex; flex-direction: column; }
.zeile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
}
.zeile:last-child { border-bottom: none; }
.zeile .haupt { flex: 1; min-width: 0; }
.zeile .haupt b { font-size: 15px; display: block; }
.zeile .haupt small { color: var(--muted); font-size: 12px; }
.zeile .neben { text-align: right; font-size: 14px; font-weight: bold; }
.zeile .neben small { display: block; color: var(--muted); font-weight: normal; font-size: 11px; }
.zeile.klickbar { cursor: pointer; }
.zeile.aus .haupt b { color: var(--muted); text-decoration: line-through; }
/* Zurückgenommener Stempel (Tombstone): bleibt sichtbar, aber rot. */
.zeile.geloescht .haupt b { color: var(--danger); text-decoration: line-through; }
.zeile.geloescht .neben { color: var(--danger); }

.pille {
  display: inline-block;
  font-size: 11px;
  font-weight: bold;
  border-radius: 999px;
  padding: 3px 9px;
  background: var(--card-3);
  color: var(--text-2);
}
.pille.gold { background: var(--gold-dim); color: var(--gold); }
.pille.ok { background: var(--ok-dim); color: var(--ok); }
.pille.rot { background: var(--danger-dim); color: var(--danger); }

/* Filterchips im Verlauf */
.chips { display: flex; gap: 8px; }
.chips button {
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--text-2);
  border-radius: 999px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}
.chips button.active {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold);
}

/* ---------- Stempelanzeige ----------
   Kreise + Stand kommen aus stempel.css (geteilt mit der Kundenkarte).
   Die Karte drumherum braucht position:relative für den Halo. */
.stempelkarte { position: relative; overflow: hidden; }

/* Volle Karte — pinker Hinweis mit Sofort-Einlösen. */
.vollkarte-banner {
  background: rgba(255, 100, 180, 0.14);
  border: 1px solid #ff64b4;
  color: #ff9ccb;
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
  font-weight: bold;
  margin-top: 12px;
}
.vollkarte-banner .gross { font-size: 16px; color: #ff64b4; }
.vollkarte-banner small {
  display: block;
  font-weight: normal;
  color: var(--muted);
  margin-top: 4px;
}
.btn.pink {
  background: linear-gradient(135deg, #ff64b4 0%, #d63f8f 100%);
  color: #fff;
  box-shadow: 0 6px 22px rgba(255, 100, 180, 0.25);
}

/* Mitarbeiter-Kacheln: 3 je Zeile, weiß — ein Tipp vergibt den Stempel.
   Ausgewählt/feuernd leuchtet die Kachel grün. */
.kacheln {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.kachel {
  background: linear-gradient(135deg, var(--gold) 0%, #b8942a 100%);
  color: #16130a;
  border: 2px solid var(--gold);
  border-radius: var(--radius-sm);
  min-height: 56px;
  padding: 10px 6px;
  font-size: 15px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: transform 0.08s var(--ease), background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.kachel:active { transform: scale(0.96); }
.kachel.aktiv {
  background: var(--ok);
  border-color: var(--ok);
  color: #06301a;
  box-shadow: 0 0 22px rgba(53, 208, 127, 0.65);
}
.kachel:disabled { opacity: 0.55; cursor: default; }

/* Ziffernblock für die Kundennummer. */
.numanzeige {
  background: var(--card-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 24px;
  font-weight: bold;
  font-variant-numeric: tabular-nums;
  text-align: center;
  padding: 12px;
  min-height: 52px;
  letter-spacing: 2px;
  margin-bottom: 10px;
}
.numanzeige .platzhalter { color: var(--muted); font-size: 14px; font-weight: normal; letter-spacing: 0; }
.numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.numpad button {
  background: var(--card-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 22px;
  font-weight: bold;
  padding: 14px 0;
  cursor: pointer;
}
.numpad button:active { transform: scale(0.96); }
.numpad button.ok {
  background: linear-gradient(135deg, var(--gold) 0%, #b8942a 100%);
  border-color: var(--gold);
  color: #16130a;
}

/* ---------- Scanner ---------- */
.scanner {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #000;
  display: flex;
  flex-direction: column;
}
.scanner video {
  flex: 1;
  width: 100%;
  object-fit: cover;
}
.scanner .rahmen {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(70vw, 280px);
  height: min(70vw, 280px);
  transform: translate(-50%, -60%);
  border: 3px solid var(--gold);
  border-radius: 24px;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.scanner .leiste {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85) 40%);
}
.scanner .hinweis { text-align: center; color: #fff; font-size: 14px; text-shadow: 0 1px 4px #000; }

/* ---------- Erfolgsschirm ---------- */
.erfolg {
  text-align: center;
  padding: 26px 16px;
}
.erfolg .kreis {
  width: 84px;
  height: 84px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--ok-dim);
  border: 2px solid var(--ok);
  color: var(--ok);
  font-size: 42px;
  line-height: 80px;
}
.erfolg .kreis.gold-k {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold);
}
.erfolg h2 { margin: 4px 0 6px; }

/* ---------- Login ---------- */
.login {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
  gap: 0;
}
/* Wortmarke „LYTCHIE CLUB CARD" (freigestellt, Creme auf dem
   Nachtschwarz) — breit und ruhig, ersetzt Icon + Schriftzug. */
.login .wortmarke {
  display: block;
  width: min(100%, 320px);
  height: auto;
  margin: 0 auto 16px;
}
.login .unterzeile {
  text-align: center;
  color: var(--muted);
  margin: 0 0 28px;
  font-size: 13px;
  letter-spacing: 0.3px;
}

/* ---------- QR-Karte (Inhaber-Übersicht) ---------- */
.qrbox {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.qrbox img {
  width: 200px;
  height: 200px;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}
.qrbox .link {
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
  text-align: center;
}

/* ---------- Toast ---------- */
#toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  background: var(--card-3);
  border: 1px solid var(--line-strong);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: bold;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s var(--ease);
  z-index: 90;
  max-width: 90vw;
  text-align: center;
}
#toast.zeigen { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.fehler { border-color: var(--danger); color: var(--danger); }

.laden { text-align: center; color: var(--muted); padding: 40px 0; }

/* Aufklappbereiche der Verwaltung */
details.abschnitt {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 16px;
}
details.abschnitt summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 0;
  font-weight: bold;
  font-size: 15px;
  display: flex;
  align-items: center;
}
details.abschnitt summary::-webkit-details-marker { display: none; }
details.abschnitt summary::after {
  content: '›';
  margin-left: auto;
  color: var(--muted);
  font-size: 20px;
  transition: transform 0.15s var(--ease);
}
details.abschnitt[open] summary::after { transform: rotate(90deg); }
details.abschnitt .inhalt { padding: 0 0 16px; }

/* ---------- SaaS: Login-Links, Trial-Banner ---------- */
.login-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 18px;
  align-items: center;
}
.linkbtn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: bold;
  padding: 8px 12px;
  cursor: pointer;
}
.linkbtn:active { color: var(--gold); }

.trial-banner {
  background: var(--gold-dim);
  border: 1px solid var(--gold);
  color: var(--gold-2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  text-align: center;
  font-size: 13px;
  font-weight: bold;
}

/* ================================================================
   Dienstleistungs-Kacheln (blau) — erscheinen im Scan-Fenster nur,
   wenn der Salon Dienstleistungen pflegt. Erst Dienstleistung (blau)
   antippen, dann feuert die Mitarbeiter-Kachel (gold) den Stempel.
   ================================================================ */
.kachel.dichvu {
  background: linear-gradient(135deg, #5aa9ff 0%, #2f7fdb 100%);
  border-color: #5aa9ff;
  color: #08182c;
}
.kachel.dichvu.gewaehlt {
  background: linear-gradient(135deg, #7dbcff 0%, #4090ec 100%);
  border-color: #cfe6ff;
  box-shadow: 0 0 18px rgba(90, 169, 255, 0.55);
}

/* Wackeln, wenn die Dienstleistung fehlt (und für die PIN-Punkte). */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}
.shake { animation: shake 0.4s; }

/* ================================================================
   Eingelöste Vollkarten (pink — wie Gutscheine überall).
   ================================================================ */
.pink-titel { color: #ff64b4; }
.neben.pink { color: #ff64b4; font-weight: bold; }
.redeem-zeile .chev { color: var(--muted); font-size: 18px; }
.vollkarte-detail { border-color: rgba(255, 100, 180, 0.55); }

/* Kunden-Rückmeldungen: Sterne gold, 1-3-Sterne-Zeilen mit pinker
   Lichtkante (NexoMilo-Muster), bis der Inhaber sie abhakt. */
/* Stimmungs-Smiley (traurig/neutral/froh) in Listen und Kacheln. */
.stimmung { display: inline-flex; vertical-align: middle; line-height: 0; }
.stimmung.traurig { color: var(--danger); }
.stimmung.mittel { color: #f5c542; }
.stimmung.froh { color: var(--ok); }
.zeile > .stimmung { flex: 0 0 auto; }

.zeile.feedback-offen {
  position: relative;
  padding-left: 12px;
  border-radius: 10px;
  background: radial-gradient(140% 200% at -6% 50%, rgba(255, 100, 180, 0.14) 0%, transparent 60%);
}
.zeile.feedback-offen::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 999px;
  background: #ff64b4;
  box-shadow: 0 0 10px 1px rgba(255, 100, 180, 0.5);
}
.feedback-text { display: block; margin: 2px 0; color: var(--text-2, #b4b4bd); }

/* ================================================================
   PIN-Sperre (Lytchie-Look): vollflächige Maske, 6 Punkte, runder
   Ziffernblock in einer Glaskachel, Abmelden mit Sicherheitsabstand.
   ================================================================ */
#lockScreen {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: var(--bg);
  display: flex;
  /* flex-start + auto-Margins der Karte: zentriert bei Platz, oben
     beginnend und scrollbar auf kleinen Displays (center würde den
     Kopf abschneiden). */
  align-items: flex-start;
  justify-content: center;
  padding: 24px 18px calc(24px + env(safe-area-inset-bottom));
  overflow-y: auto;
}
.lock-card { width: 100%; max-width: 320px; text-align: center; margin: auto 0; }
.lock-mark { width: 64px; height: 64px; border-radius: 16px; display: block; margin: 0 auto 14px; }
.lock-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 20px;
  color: var(--gold-2);
  margin: 0;
}
.lock-sub { color: var(--muted); font-size: 12px; margin: 4px 0 0; }
.pin-dots { display: flex; gap: 14px; justify-content: center; margin: 22px 0 6px; }
.pin-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.pin-dot.on {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  border-color: var(--gold);
  transform: scale(1.12);
}
.lock-msg { min-height: 18px; font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.lock-msg.err { color: var(--danger); }
.lockpad {
  padding: 14px;
  border: 1px solid rgba(246, 227, 155, 0.24);
  border-radius: 34px;
  background-image: linear-gradient(150deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.lockpad button {
  width: min(84px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(246, 227, 155, 0.24);
  background: rgba(18, 18, 22, 0.9);
  color: var(--text);
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
}
.lockpad button:active { background: var(--card-2); transform: scale(0.95); }
.lockpad button.gold { color: var(--gold); }
/* Bewusst weit weg von ⌫ — sonst wird versehentlich abgemeldet. */
.lock-logout { margin-top: 34px; width: 100%; padding: 16px; font-size: 16px; color: var(--gold); }

/* Sichtschutz beim App-Wechsel: deckt das Dashboard ab, bevor der
   App-Umschalter des Systems einen Schnappschuss macht. */
#schutzDeckel {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: var(--bg);
}


/* ================================================================
   Kunden-Detail (vom Inhaber gewählte Variante "Kennzahlen-Säulen +
   Licht-Timeline"): Initialen-Kreis, vier Mini-Kacheln, Info-Streifen,
   Verlauf mit farbiger Lichtkante (grün/rot/pink).
   ================================================================ */
.kunden-kopf { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.kunden-kopf .avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--gold);
  font-size: 19px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Georgia, 'Times New Roman', serif;
}
.kunden-kopf .wer { flex: 1; min-width: 0; }
.kunden-kopf .name { font-size: 18px; font-weight: bold; }
.kunden-kopf .meta { color: var(--muted); font-size: 12px; margin-top: 2px; }

.cat-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.stat-mini {
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 4px;
  text-align: center;
}
.stat-mini .label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-mini .value { font-size: 20px; font-weight: bold; line-height: 1.2; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat-mini.gruen .value { color: var(--ok); }
.stat-mini.pink .value { color: #ff64b4; }
.stat-mini.goldwert .value { color: var(--gold); }

.info-strip {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 9px 12px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow-x: auto;
  font-size: 12px;
}
.info-strip .cell { white-space: nowrap; color: var(--muted); }
.info-strip .cell b { color: var(--text); font-weight: 600; }

.st-liste { display: flex; flex-direction: column; gap: 4px; }
.st-zeile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px 10px 14px;
  border-radius: 10px;
  background: radial-gradient(135% 210% at -6% 50%, var(--st-soft) 0%, transparent 62%);
}
.st-zeile::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 999px;
  background: var(--st);
  box-shadow: 0 0 10px 1px var(--st-glow);
}
.st-zeile .haupt { flex: 1; min-width: 0; }
.st-zeile .haupt b { font-size: 14px; }
.st-zeile .haupt small { display: block; color: var(--muted); font-size: 11px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-zeile .zeit { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.st-gruen { --st: var(--ok); --st-soft: rgba(53, 208, 127, 0.14); --st-glow: rgba(53, 208, 127, 0.5); }
.st-rot { --st: var(--danger); --st-soft: rgba(255, 77, 69, 0.11); --st-glow: rgba(255, 77, 69, 0.4); }
.st-rot .haupt b, .st-rot .haupt small { text-decoration: line-through; color: var(--muted); }
.st-pink { --st: #ff64b4; --st-soft: rgba(255, 100, 180, 0.13); --st-glow: rgba(255, 100, 180, 0.45); }
.st-pink .haupt b { color: #ff64b4; }

/* ================================================================
   Eigene Dialoge — Ersatz für window.prompt/confirm (in installierten
   Web-Apps unzuverlässig). Unterhalb der PIN-Sperre (9000).
   ================================================================ */
.dlg-deckel {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  /* Sehr flache Viewports (Querformat, offene Tastatur): der Deckel
     scrollt, damit kein Knopf unerreichbar abgeschnitten wird. */
  overflow-y: auto;
}
.dlg-deckel > .dlg { margin: auto 0; }
.dlg {
  width: 100%;
  max-width: 340px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  animation: dlg-auf 0.16s var(--ease);
}
@keyframes dlg-auf {
  from { transform: translateY(10px) scale(0.97); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.dlg-text {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.45;
  white-space: pre-line;
  overflow-wrap: break-word;
}
.dlg-feld { width: 100%; margin-bottom: 14px; }
.dlg-knoepfe { display: flex; gap: 10px; }
.dlg-knoepfe .btn { flex: 1; padding: 13px 10px; font-size: 15px; }
.dlg-knoepfe .btn.danger-ghost { border: 1px solid rgba(255, 77, 69, 0.4); }

/* Roter Lösch-Knopf in Verwaltungszeilen. */
.iconbtn.rot {
  color: var(--danger);
  border-color: rgba(255, 77, 69, 0.35);
  min-width: 42px;
  padding: 0 8px;
}

/* Passwort-Auge: Eingabe sichtbar machen (Hülle kommt aus app.js). */
.pw-feld { position: relative; }
.pw-feld input { width: 100%; padding-right: 52px; }
.pw-auge {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  padding: 10px;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
}
.pw-auge svg { display: block; }
.pw-auge.offen { color: var(--gold); }
