/* klaus-stil.css — gemeinsames Erscheinungsbild der GaLa-Objektservice-Apps im Klaus-Stil
   (Vorbild klaus.html / klaus-team.html: dunkles Glas, Lila/Violett, Orbitron für Überschriften,
   abgerundete Karten, große Knöpfe). Zuerst genutzt von der Mitarbeiter-App (17.10.2026);
   weitere Apps sollen später dieselbe Datei einbinden.

   Einbinden:
     <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Orbitron:wght@500;600&display=swap">
     <link rel="stylesheet" href="klaus-stil.css">
     <body> … <div class="bgfx"><i></i><i></i><i></i></div> (weiche Farbflecken im Hintergrund)

   Regel (Daniel): keine iPhone-Auswahllisten, Uhrzeit-Räder oder Systemdialoge – Auswahlen, Datum,
   Fragen und Meldungen kommen aus eigenen Dialogen (.kdlg, .auswahl, .kal, #meldung).
   Druck-/PDF-Ansichten dürfen hell bleiben. */

:root {
  --bg: #07080d; --bg2: #0c0e16;
  --glass: rgba(22,24,36,.62); --glass2: rgba(30,33,48,.72); --glass-hi: rgba(255,255,255,.06);
  --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.14);
  --text: #eef0f7; --dim: #9aa1b6; --dim2: #6b7186;
  --violet: #a855f7; --violet-soft: rgba(168,85,247,.16); --indigo: #6366f1; --pink: #ec4899; --cyan: #22d3ee;
  --green: #34d399; --amber: #fbbf24; --red: #f87171;
  --grad: linear-gradient(135deg, #7c3aed, #4f46e5);
  --radius: 16px;
  --font-titel: Orbitron, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden], .hidden { display: none !important; }
html { background: #0a0b12; }
body {
  min-height: 100vh; background: var(--bg); color: var(--text);
  font: 14.5px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
/* mind. 16px, sonst zoomt iOS Safari beim Fokussieren hinein */
input, textarea { font: inherit; color: inherit; font-size: 16px; }
a { color: #c4b5fd; }
h1, h2, h3 { font-weight: 650; letter-spacing: -.01em; }
::selection { background: rgba(168,85,247,.35); }

/* ---------- Hintergrund: weiche Farbflecken hinter Glas ---------- */
.bgfx { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bgfx i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .33; }
.bgfx i:nth-child(1) { width: 46vw; height: 46vw; left: -12vw; top: -14vw; background: #4c1d95; }
.bgfx i:nth-child(2) { width: 38vw; height: 38vw; right: -10vw; bottom: -12vw; background: #1e3a8a; }
.bgfx i:nth-child(3) { width: 26vw; height: 26vw; left: 38vw; top: 60vh; background: #831843; opacity: .18; }

/* ---------- Kopfleiste ---------- */
.headerbar {
  position: sticky; top: 0; z-index: 40; min-height: 58px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 8px) 18px 8px;
  background: rgba(7,8,13,.86); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.hb-left, .hb-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hb-back { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--dim); text-decoration: none; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line2); background: var(--glass-hi); }
.hb-back:hover { color: var(--text); background: rgba(255,255,255,.1); }
.hb-back svg { width: 14px; height: 14px; }
.wort {
  font: 600 16px var(--font-titel); letter-spacing: .32em;
  background: linear-gradient(90deg, #a78bfa, #f1ecff 50%, #a78bfa); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 6px rgba(167,139,250,.55)); white-space: nowrap;
}
.hb-sub { font-size: 12px; color: var(--dim2); margin-top: 1px; }
.hb-user { font-size: 13px; color: var(--dim); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line2); background: var(--glass-hi); white-space: nowrap; }
.hb-logout { padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--glass-hi); color: var(--dim); font-size: 13px; font-weight: 600; }
.hb-logout:hover { color: var(--text); }

/* ---------- Layout: Seitenleiste + Inhalt ---------- */
.app { position: relative; z-index: 1; display: flex; gap: 14px; padding: 14px; min-height: calc(100vh - 58px); }
.side {
  width: 236px; flex-shrink: 0; align-self: flex-start; position: sticky; top: 72px;
  display: flex; flex-direction: column; gap: 4px; padding: 14px 10px;
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(24px) saturate(140%); -webkit-backdrop-filter: blur(24px) saturate(140%);
  min-height: calc(100vh - 86px);
}
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px; color: var(--dim); text-decoration: none; font-size: 14.5px; font-weight: 550; }
.nav a:hover { background: var(--glass-hi); color: var(--text); }
.nav a.on { background: rgba(255,255,255,.09); color: var(--text); box-shadow: inset 3px 0 0 var(--violet); }
.nav .ic { width: 20px; text-align: center; }
.nav .badge { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--amber); color: #1a1300; border-radius: 99px; padding: 0 7px; line-height: 18px; }
.side-foot { margin-top: auto; font-size: 11px; color: var(--dim2); padding: 0 12px; }
.main { flex: 1; min-width: 0; max-width: 1240px; padding: 8px 6px 60px; }

.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.topbar h1 { font: 600 22px/1.25 var(--font-titel); letter-spacing: .04em; }
.topbar p { color: var(--dim); font-size: 13.5px; margin-top: 4px; }
.topbar .acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Knöpfe (groß, abgerundet) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; text-decoration: none;
  min-height: 42px; padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 600;
  background: rgba(255,255,255,.08); border: 1px solid var(--line2); color: var(--text); transition: background .12s, border-color .12s;
}
.btn:hover { background: rgba(255,255,255,.13); }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(124,58,237,.28); }
.btn.primary:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--dim); }
.btn.ghost:hover { background: var(--glass-hi); color: var(--text); }
.btn.sm { min-height: 34px; padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn.danger { color: #fecaca; background: rgba(248,113,113,.12); border-color: rgba(248,113,113,.42); }
.btn.big { min-height: 54px; padding: 14px 20px; font-size: 16px; border-radius: 14px; }

/* ---------- Karten (Glas) ---------- */
.card {
  background: var(--glass2); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
}
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-h h2 { font: 600 13.5px var(--font-titel); letter-spacing: .08em; text-transform: uppercase; color: #ddd6fe; }
.card-b { padding: 16px 18px; }
.card-b.flush { padding: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--glass2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .n { font: 600 24px/1.1 var(--font-titel); }
.stat .l { font-size: 12.5px; color: var(--dim); margin-top: 6px; }

.controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.controls .grow { flex: 1; min-width: 200px; }
.muted { color: var(--dim); font-size: 12.5px; }
.note { color: var(--dim); font-size: 13.5px; margin-bottom: 12px; }
.empty { padding: 34px 20px; text-align: center; color: var(--dim); font-size: 14px; }
.code { font-family: ui-monospace, Consolas, monospace; font-weight: 700; font-size: 12.5px; padding: 2px 7px; border-radius: 6px; background: rgba(168,85,247,.14); color: #ddd6fe; border: 1px solid rgba(168,85,247,.25); }

/* Segmentschalter */
.seg { display: inline-flex; gap: 3px; padding: 3px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid var(--line2); }
.seg button { padding: 8px 14px; border-radius: 9px; color: var(--dim); font-size: 13.5px; font-weight: 600; }
.seg button.on { background: var(--grad); color: #fff; }

/* ---------- Tabellen ---------- */
.tablewrap { background: var(--glass2); border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { position: sticky; top: 0; text-align: left; padding: 11px 14px; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--dim2); background: rgba(14,15,24,.95); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tr.click { cursor: pointer; }
tr.click:hover td { background: rgba(168,85,247,.07); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Listenzeilen ---------- */
.row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: none; }
.row.click { cursor: pointer; }
.row.click:hover { background: rgba(168,85,247,.07); }
.row .grow { flex: 1; min-width: 0; }

/* ---------- Schlüssel/Wert ---------- */
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 8px 14px; font-size: 14.5px; margin-bottom: 14px; }
.kv dt { color: var(--dim); }
.kv dd { min-width: 0; overflow-wrap: anywhere; }

/* ---------- Ampel / Status ---------- */
.amp { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; white-space: nowrap; border: 1px solid var(--line2); background: rgba(255,255,255,.05); }
.amp::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.amp.g { color: #bbf7d0; border-color: rgba(52,211,153,.45); background: rgba(52,211,153,.12); }
.amp.g::before { background: var(--green); box-shadow: 0 0 8px var(--green); }
.amp.y { color: #fde68a; border-color: rgba(251,191,36,.45); background: rgba(251,191,36,.1); }
.amp.r { color: #fecaca; border-color: rgba(248,113,113,.5); background: rgba(248,113,113,.12); }
.amp.x { color: var(--dim); }

/* ---------- Formulare ---------- */
input[type=text], input[type=number], input[type=search], input[type=email], input[type=tel], input[type=url], input[type=password], textarea {
  width: 100%; max-width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 11px;
  background: rgba(255,255,255,.06); border: 1px solid var(--line2); color: var(--text); outline: 0;
}
input::placeholder, textarea::placeholder { color: var(--dim2); }
input:focus, textarea:focus { border-color: rgba(168,85,247,.65); box-shadow: 0 0 0 3px rgba(168,85,247,.16); }
textarea { min-height: 80px; resize: vertical; }
label { display: block; font-size: 11.5px; font-weight: 650; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form .full { grid-column: 1 / -1; }
.form .sect { grid-column: 1 / -1; font: 600 12px var(--font-titel); letter-spacing: .1em; text-transform: uppercase; color: #c4b5fd; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; }
.form .help { font-size: 12.5px; color: var(--dim2); margin-top: 5px; }
.withsuffix { display: flex; align-items: center; gap: 8px; }
.withsuffix span { color: var(--dim); font-size: 14px; }

/* Schalter (statt Kästchen) */
.swrow { display: flex; align-items: center; gap: 12px; cursor: pointer; text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 550; color: var(--text); margin: 4px 0 0; }
.sw { position: relative; width: 46px; height: 28px; flex: none; }
.sw input { opacity: 0; width: 0; height: 0; position: absolute; }
.sw span { position: absolute; inset: 0; border-radius: 99px; background: rgba(255,255,255,.14); transition: .2s; }
.sw span::before { content: ''; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: .2s; }
.sw input:checked + span { background: #7c3aed; }
.sw input:checked + span::before { transform: translateX(18px); }
.sw input:focus-visible + span { box-shadow: 0 0 0 3px rgba(168,85,247,.35); }

/* Auswahlfeld: Knopf mit aktuellem Wert + „▾“ (öffnet Klaus-Auswahl / Kalender) */
.pickbtn {
  width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left;
  padding: 10px 12px; border-radius: 11px; background: rgba(255,255,255,.06); border: 1px solid var(--line2); color: var(--text); font-size: 15.5px;
}
.pickbtn:hover { border-color: rgba(168,85,247,.55); }
.pickbtn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pickbtn span.leer { color: var(--dim2); }
.pickbtn b { color: var(--dim); font-weight: 400; }

/* ---------- Dialoge (Klaus-Optik, kein Systemdialog) ---------- */
dialog.kdlg {
  margin: auto; padding: 0; border-radius: 18px; color: var(--text); overflow: hidden;
  width: min(580px, calc(100vw - 24px)); max-height: calc(100vh - 32px);
  background: rgba(24,20,40,.98); border: 1px solid rgba(168,85,247,.4); box-shadow: 0 18px 50px rgba(0,0,0,.55);
}
dialog.kdlg.wide { width: min(920px, calc(100vw - 24px)); }
dialog.kdlg.klein { width: min(380px, calc(100vw - 24px)); }
dialog.kdlg::backdrop { background: rgba(5,6,12,.62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.dlg { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.dlg-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dlg-h h2 { font-size: 16.5px; font-weight: 650; }
button.x { font-size: 24px; line-height: 1; color: var(--dim); padding: 2px 9px; border-radius: 9px; }
button.x:hover { background: var(--glass-hi); color: var(--text); }
.dlg-b { padding: 18px 20px; overflow-y: auto; }
.dlg-f { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--line); }
.dlg-f .left { margin-right: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.dlg-err { color: #fecaca; background: rgba(248,113,113,.12); border: 1px solid rgba(248,113,113,.45); border-radius: 11px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }
.ftext { font-size: 15px; line-height: 1.55; white-space: pre-line; }

/* Auswahl: Liste großer Knöpfe */
.auswahl { display: flex; flex-direction: column; gap: 8px; }
.auswahl .aw { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; padding: 13px 14px; border-radius: 12px; font-size: 15px; font-weight: 600; background: rgba(255,255,255,.06); border: 1px solid var(--line2); }
.auswahl .aw:hover { background: rgba(255,255,255,.1); }
.auswahl .aw.on { background: var(--grad); border-color: transparent; }
.auswahl .aw small { color: var(--dim); font-size: 12.5px; font-weight: 500; }
.auswahl .aw.on small { color: #e9e3ff; }

/* Kalender (statt nativer Datumsauswahl) */
.kal-kopf { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.kal-kopf .mon { flex: 1; text-align: center; font: 600 15px var(--font-titel); letter-spacing: .06em; }
.kal-kopf button { width: 42px; height: 42px; border-radius: 11px; background: rgba(255,255,255,.07); border: 1px solid var(--line2); font-size: 16px; font-weight: 700; }
.kal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.kal .wt { text-align: center; font-size: 11.5px; font-weight: 700; color: var(--dim2); padding: 4px 0; }
.kal button { height: 42px; border-radius: 10px; font-size: 15px; font-weight: 600; background: rgba(255,255,255,.04); border: 1px solid transparent; font-variant-numeric: tabular-nums; }
.kal button:hover { background: rgba(255,255,255,.1); }
.kal button.we { color: var(--dim); }
.kal button.heute { border-color: rgba(168,85,247,.6); }
.kal button.on { background: var(--grad); color: #fff; }
.kal-fuss { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.kal-fuss .btn { flex: 1; }
.kal-jahre { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.kal-jahre button { height: 44px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--line2); font-weight: 600; }
.kal-jahre button.on { background: var(--grad); border-color: transparent; }

/* Plus/Minus-Zähler (statt Zahlenfeld/Rad) */
.stepper { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.stepper button { width: 44px; height: 42px; border-radius: 11px; background: rgba(255,255,255,.08); border: 1px solid var(--line2); font-weight: 700; font-size: 19px; line-height: 1; }
.stepper button:hover { background: rgba(255,255,255,.13); }
.stepper b { min-width: 40px; text-align: center; font: 600 18px var(--font-titel); font-variant-numeric: tabular-nums; }
.stepper span { color: var(--dim); font-size: 13px; margin-right: 2px; }

/* Uhrzeit-Auswahl (statt Uhrzeit-Rad) */
.uhr-gross { text-align: center; font: 600 38px/1.1 var(--font-titel); letter-spacing: .05em; margin: 2px 0 12px; }
.uhr-t { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--dim2); margin: 10px 0 6px; }
.uhrwahl { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.uhrwahl button { height: 40px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--line2); font-weight: 600; font-variant-numeric: tabular-nums; }
.uhrwahl button:hover { background: rgba(255,255,255,.1); }
.uhrwahl button.on { background: var(--grad); border-color: transparent; color: #fff; }

/* Hinweis-Kasten (gelb) */
.hinweis { margin-top: 10px; font-size: 13.5px; padding: 9px 12px; border-radius: 11px; color: #fde68a; background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.28); }

/* Leiste „Ungespeicherte Änderungen“ unten */
.savebar {
  position: sticky; bottom: calc(env(safe-area-inset-bottom) + 12px); z-index: 30; margin-top: 16px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px 10px 16px; border-radius: 14px;
  background: rgba(28,22,48,.96); border: 1px solid rgba(167,139,250,.45); box-shadow: 0 12px 34px rgba(0,0,0,.45);
}
.savebar span { flex: 1; min-width: 150px; font-weight: 600; color: #ddd6fe; }

/* Meldung unten (statt alert) */
#meldung {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 26px); z-index: 99999;
  max-width: min(440px, calc(100vw - 32px)); padding: 11px 16px; border-radius: 12px; font-size: 14.5px;
  color: #ede9fe; background: rgba(28,22,48,.97); border: 1px solid rgba(167,139,250,.45); box-shadow: 0 12px 34px rgba(0,0,0,.45);
  transform: translate(-50%, 10px); opacity: 0; transition: .18s; pointer-events: none;
}
#meldung.zeigen { opacity: 1; transform: translate(-50%, 0); }
#meldung.fehler { color: #fee2e2; background: rgba(40,18,26,.97); border-color: rgba(248,113,113,.5); }

/* ---------- Handy ---------- */
@media (max-width: 860px) {
  .app { flex-direction: column; padding: 10px; gap: 10px; }
  .side { width: 100%; min-height: 0; position: static; padding: 6px; }
  .nav { flex-direction: row; overflow-x: auto; }
  .nav a { white-space: nowrap; }
  .nav a.on { box-shadow: inset 0 -3px 0 var(--violet); }
  .side-foot { display: none; }
  .main { padding: 4px 2px 50px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid2, .form { grid-template-columns: 1fr; }
  .headerbar { padding-left: 10px; padding-right: 10px; }
  .hb-user, .hb-sub, .hb-back span { display: none; }
  .hb-left { gap: 10px; overflow: hidden; }
  .wort { font-size: 13px; letter-spacing: .2em; }
  .kv { grid-template-columns: 120px 1fr; }
  .topbar h1 { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) { #meldung { transition: none; } }
