/* GSE Team - Oberflaeche. Design-Tokens wie im GSE Leitstand (gleiche Themes), mobil zuerst. */

:root {
  --bg: #0b1220; --body-bg: radial-gradient(1200px 600px at 20% -10%, #0e2a3d 0%, #0b1220 60%); --bg2: #101a2e;
  --panel: #0f172a; --panel-bg: #0f172acc; --input-bg: #0a1322; --header-bg: #0b1220e6; --hover: #12253d; --scrim: #00000099;
  --line: #1e3a5f; --line-soft: #1a2c47; --line2: #22d3ee44;
  --text: #dbe7f3; --strong: #ffffff; --muted: #7c93ab;
  --accent: #22d3ee; --accent2: #38bdf8; --acc-bg: #0e3a4a; --acc-fg: #e0fbff;
  --warn: #fbbf24; --warn-bg: #2a200c; --bad: #f87171; --bad-bg: #3a1010; --good: #34d399; --good-bg: #0d3a2a; --violet: #a78bfa; --orange: #fb923c;
  --gold: #D8AE5F;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace; --sans: -apple-system, "Segoe UI", Inter, Roboto, sans-serif;
  --head: var(--mono); --head-tr: uppercase; --head-sp: .1em; --head-w: 600;
  --r: 8px; --rl: 12px; --shadow: inset 0 0 0 1px #ffffff05, 0 8px 24px #00000040;
  --tap: 48px;
}
[data-theme="hell"] {
  --bg: #ffffff; --body-bg: linear-gradient(180deg, #f7f9fc 0%, #eef2f7 100%) fixed; --bg2: #f1f5f9;
  --panel: #ffffff; --panel-bg: #ffffff; --input-bg: #ffffff; --header-bg: #ffffffee; --hover: #eef4ff; --scrim: #0f172a55;
  --line: #d7dee8; --line-soft: #e7ecf3; --line2: #2563eb33;
  --text: #16202f; --strong: #0b1220; --muted: #667a90;
  --accent: #1d4ed8; --accent2: #0369a1; --acc-bg: #1d4ed8; --acc-fg: #ffffff;
  --warn: #b45309; --warn-bg: #fff7e6; --bad: #be123c; --bad-bg: #fff1f2; --good: #047857; --good-bg: #ecfdf5; --violet: #6d28d9; --orange: #c2410c;
  --head: var(--sans); --head-tr: none; --head-sp: .01em; --head-w: 700; --r: 8px; --rl: 12px; --shadow: 0 1px 2px #0f172a0f, 0 8px 20px #0f172a0d;
}
[data-theme="gse"] {
  --bg: #16130f; --body-bg: radial-gradient(900px 500px at 85% -15%, #34291a 0%, #16130f 60%); --bg2: #221c15;
  --panel: #1d1813; --panel-bg: #1d1813e6; --input-bg: #120f0b; --header-bg: #16130ff2; --hover: #2b2318; --scrim: #000000aa;
  --line: #3b3125; --line-soft: #2b2419; --line2: #e2a33c55;
  --text: #f0e7d8; --strong: #fffaf0; --muted: #a2947c;
  --accent: #e2a33c; --accent2: #f0c274; --acc-bg: #e2a33c; --acc-fg: #241b0d;
  --warn: #f0b429; --warn-bg: #3a2c0d; --bad: #e26d5c; --bad-bg: #3a1a14; --good: #8fbf5f; --good-bg: #263218; --violet: #c2a3e0; --orange: #e2853c;
  --head: "Iowan Old Style", Palatino, Georgia, serif; --head-tr: none; --head-sp: .02em; --head-w: 600; --r: 4px; --rl: 6px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); background-image: var(--body-bg); color: var(--text); font: 16px/1.45 var(--sans); padding-bottom: env(safe-area-inset-bottom); }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { font-family: var(--head); text-transform: var(--head-tr); letter-spacing: var(--head-sp); font-weight: var(--head-w); color: var(--strong); margin: 0 0 10px; }
h1 { font-size: 20px; } h2 { font-size: 15px; }
@media (max-width: 600px) { h1 { font-size: 17px; letter-spacing: .04em; } } h3 { font-size: 13px; color: var(--muted); }
.muted { color: var(--muted); } .mono { font-family: var(--mono); } .strong { color: var(--strong); font-weight: 600; }
.small { font-size: 13px; } .tiny { font-size: 12px; }
.hidden { display: none !important; }
.right { text-align: right; } .center { text-align: center; }
.nowrap { white-space: nowrap; }
.break { overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- Layout */
.app { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
header.top { position: sticky; top: 0; z-index: 20; background: var(--header-bg); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: 8px 14px; padding-top: calc(8px + env(safe-area-inset-top)); display: flex; align-items: center; gap: 12px; }
header .logo { font-family: var(--head); text-transform: uppercase; letter-spacing: .14em; font-weight: 700; color: var(--strong); font-size: 15px; display: flex; align-items: center; gap: 8px; }
header .logo b { color: var(--gold); }
header .logo small { display: block; font: 10px/1 var(--sans); letter-spacing: .12em; color: var(--muted); margin-top: 3px; }
header .spacer { flex: 1; }
header .who { font-size: 13px; color: var(--muted); text-align: right; line-height: 1.2; }
header .who b { display: block; color: var(--text); font-weight: 600; }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px var(--good); }
.online-dot.off { background: var(--warn); box-shadow: none; }
main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 14px 14px 90px; }
@media (min-width: 900px) {
  .app.mit-seite { flex-direction: row; }
  .app.mit-seite header.top { position: fixed; left: 0; right: 0; }
  .app.mit-seite main { padding-top: 76px; padding-bottom: 30px; }
  nav.seite { position: fixed; top: 62px; left: 0; bottom: 0; width: 220px; border-right: 1px solid var(--line); background: var(--panel-bg); padding: 12px 8px; overflow-y: auto; }
  nav.seite a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r); color: var(--text); font-size: 14px; }
  nav.seite a.active, nav.seite a:hover { background: var(--hover); color: var(--strong); }
  nav.seite a svg { width: 18px; height: 18px; opacity: .8; }
  nav.seite .gruppe { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 14px 12px 4px; }
  .app.mit-seite main { margin-left: 220px; max-width: none; }
  nav.tabs { display: none; }
}
@media (max-width: 899px) { nav.seite { display: none; } }

nav.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex; background: var(--header-bg); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
nav.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px 6px; font-size: 11px; color: var(--muted); min-height: 56px; }
nav.tabs a svg { width: 24px; height: 24px; }
nav.tabs a.active { color: var(--accent); }
nav.tabs a .badge-dot { position: absolute; margin-left: 20px; margin-top: -2px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
@media (min-width: 900px) { .app.mit-seite nav.tabs { display: none; } }

/* ---------------------------------------------------------------- Bausteine */
.panel { background: var(--panel-bg); border: 1px solid var(--line); border-radius: var(--rl); padding: 14px; box-shadow: var(--shadow); margin-bottom: 12px; }
.panel h2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.panel h2 .count { font: 12px var(--mono); color: var(--muted); background: var(--bg2); padding: 2px 8px; border-radius: 999px; }
.grid { display: grid; gap: 12px; }
@media (min-width: 700px) { .grid.c2 { grid-template-columns: 1fr 1fr; } .grid.c3 { grid-template-columns: repeat(3, 1fr); } }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
@media (min-width: 700px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--panel-bg); border: 1px solid var(--line); border-radius: var(--rl); padding: 10px 12px; }
.kpi .n { font: 700 24px/1.1 var(--mono); color: var(--strong); }
.kpi .l { font-size: 12px; color: var(--muted); margin-top: 3px; }
.kpi.warn .n { color: var(--warn); } .kpi.bad .n { color: var(--bad); } .kpi.good .n { color: var(--good); } .kpi.acc .n { color: var(--accent); }
.kpi.link { cursor: pointer; } .kpi.link:hover { background: var(--hover); }

button, .btn { font: 600 15px var(--sans); color: var(--text); background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 0 16px; min-height: var(--tap); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button:hover, .btn:hover { background: var(--hover); border-color: var(--line2); }
button:disabled { opacity: .5; cursor: default; }
button.primary, .btn.primary { background: var(--acc-bg); color: var(--acc-fg); border-color: transparent; }
button.primary:hover { filter: brightness(1.1); }
button.danger { color: var(--bad); border-color: var(--bad); background: transparent; }
button.good { background: var(--good-bg); color: var(--good); border-color: transparent; }
button.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
button.klein, .btn.klein { min-height: 36px; padding: 0 12px; font-size: 13px; }
button.gross { min-height: 64px; font-size: 18px; width: 100%; }
button.icon { padding: 0; width: var(--tap); }
button svg, .btn svg { width: 20px; height: 20px; }
.knopfreihe { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.knopfreihe > * { flex: 1 1 auto; }

label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
label.pflicht::after { content: " *"; color: var(--warn); }
input, select, textarea { width: 100%; font: 16px var(--sans); color: var(--strong); background: var(--input-bg); border: 1px solid var(--line); border-radius: var(--r); padding: 0 12px; min-height: var(--tap); }
textarea { padding: 10px 12px; min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input[type="date"], input[type="time"] { -webkit-appearance: none; }
input[type="checkbox"] { width: 22px; height: 22px; min-height: 0; accent-color: var(--accent); vertical-align: middle; }
.row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.row > * { flex: 1 1 120px; }
.row > .fix { flex: 0 0 auto; }
.feld-fehler { color: var(--bad); font-size: 13px; margin-top: 4px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }

.liste { list-style: none; margin: 0; padding: 0; }
.liste li { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.liste li:last-child { border-bottom: 0; }
.liste li > svg { width: 22px; height: 22px; flex: none; color: var(--muted); }
.liste li.link { cursor: pointer; } .liste li.link:hover { background: var(--hover); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: var(--r); }
.liste .haupt { flex: 1; min-width: 0; }
.liste .titel { color: var(--strong); font-weight: 600; }
.liste .sub { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.liste .rechts { text-align: right; white-space: nowrap; }
.liste .rechts .n { font: 600 16px var(--mono); color: var(--strong); }

.badge { display: inline-block; font: 600 11px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; padding: 4px 7px; border-radius: 999px; background: var(--bg2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.badge.offen { color: var(--warn); border-color: var(--warn); background: var(--warn-bg); }
.badge.freigegeben, .badge.erledigt, .badge.ok { color: var(--good); border-color: var(--good); background: var(--good-bg); }
.badge.abgelehnt, .badge.bad, .badge.sicherheit { color: var(--bad); border-color: var(--bad); background: var(--bad-bg); }
.badge.laufend, .badge.acc { color: var(--accent); border-color: var(--accent); background: var(--acc-bg); color: var(--acc-fg); }
.badge.hoch { color: var(--orange); border-color: var(--orange); }
.badge.gesehen { color: var(--violet); border-color: var(--violet); }
.badge.crm { color: var(--gold); border-color: var(--gold); }
.hinweis { display: inline-block; font-size: 12px; color: var(--warn); background: var(--warn-bg); border-radius: 4px; padding: 2px 6px; margin: 2px 4px 0 0; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; font-family: var(--mono); white-space: nowrap; }
tr.link { cursor: pointer; } tr.link:hover td { background: var(--hover); }
.tabelle { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.toast-box { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 440px); pointer-events: none; }
.toast { background: var(--panel); color: var(--strong); border: 1px solid var(--line2); border-left: 4px solid var(--accent); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow); font-size: 14px; animation: rein .2s ease-out; pointer-events: auto; }
.toast.bad { border-left-color: var(--bad); } .toast.good { border-left-color: var(--good); } .toast.warn { border-left-color: var(--warn); }
@keyframes rein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.modal-scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 700px) { .modal-scrim { align-items: center; } }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: var(--rl) var(--rl) 0 0; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; padding: 16px; box-shadow: var(--shadow); animation: rein .2s ease-out; }
@media (min-width: 700px) { .modal { border-radius: var(--rl); } }
.modal h2 { margin-bottom: 4px; }

/* Stoppuhr */
.uhr { text-align: center; padding: 10px 0 6px; }
.uhr .zeit { font: 700 48px/1 var(--mono); color: var(--strong); letter-spacing: .04em; }
.uhr .zeit.laeuft { color: var(--accent); text-shadow: 0 0 20px var(--line2); }
.uhr .seit { font-size: 13px; color: var(--muted); margin-top: 6px; }
.puls { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: puls 1.4s ease-in-out infinite; vertical-align: middle; margin-right: 6px; }
@keyframes puls { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.7); } }
@media (prefers-reduced-motion: reduce) { .puls { animation: none; } .toast, .modal { animation: none; } }

/* Wochenbalken */
.woche { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 8px; }
.woche .tag { text-align: center; font-size: 11px; color: var(--muted); }
.woche .balken { height: 46px; display: flex; align-items: flex-end; margin-bottom: 4px; }
.woche .balken i { display: block; width: 100%; border-radius: 3px 3px 0 0; background: var(--line); min-height: 2px; }
.woche .balken i.frei { background: var(--good); } .woche .balken i.offen { background: var(--warn); } .woche .balken i.abgelehnt { background: var(--bad); }
.woche .tag.heute { color: var(--accent); font-weight: 700; }
.woche .std { font: 600 12px var(--mono); color: var(--text); }

/* Fotos */
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
.galerie .foto { position: relative; aspect-ratio: 1; border-radius: var(--r); overflow: hidden; background: var(--bg2); cursor: pointer; border: 1px solid var(--line-soft); }
.galerie .foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.galerie .foto .kat { position: absolute; left: 4px; bottom: 4px; font: 600 10px var(--mono); text-transform: uppercase; background: #000000aa; color: #fff; padding: 2px 5px; border-radius: 4px; }
.galerie .foto .wartet { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #00000088; color: var(--warn); font-size: 12px; }
.foto-gross { max-width: 100%; max-height: 70vh; display: block; margin: 0 auto; border-radius: var(--r); }
.upload-feld { border: 2px dashed var(--line); border-radius: var(--rl); padding: 18px; text-align: center; color: var(--muted); cursor: pointer; }
.upload-feld:hover { border-color: var(--accent); color: var(--text); }
.upload-feld input { display: none; }

/* Chips / Filter */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chip { font: 600 13px var(--sans); padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg2); color: var(--muted); cursor: pointer; min-height: 36px; }
.chip.active { color: var(--acc-fg); background: var(--acc-bg); border-color: transparent; }
.chip .z { font-family: var(--mono); margin-left: 4px; opacity: .8; }

.ampel { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; background: var(--muted); }
.ampel.gruen { background: var(--good); } .ampel.gelb { background: var(--warn); } .ampel.rot { background: var(--bad); }

.login-box { max-width: 380px; margin: 8vh auto 0; }
.login-box .logo { text-align: center; margin-bottom: 20px; }
.login-box .logo .wort { font-family: var(--head); text-transform: uppercase; letter-spacing: .2em; font-size: 22px; color: var(--strong); font-weight: 700; }
.login-box .logo .wort b { color: var(--gold); }
.login-box .logo small { display: block; font-size: 11px; letter-spacing: .14em; color: var(--muted); margin-top: 6px; text-transform: uppercase; }
.sprachen { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.sprachen button { min-height: 36px; padding: 0 10px; font-size: 13px; }
.sprachen button.active { color: var(--accent); border-color: var(--accent); }

.leer { text-align: center; color: var(--muted); padding: 24px 10px; font-size: 14px; }
.kasten { border-left: 3px solid var(--accent); background: var(--bg2); padding: 10px 12px; border-radius: 0 var(--r) var(--r) 0; font-size: 14px; margin: 10px 0; }
.kasten.warn { border-color: var(--warn); } .kasten.bad { border-color: var(--bad); } .kasten.good { border-color: var(--good); }
details summary { cursor: pointer; color: var(--accent); font-size: 14px; padding: 6px 0; }
.zurueck { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.kopfzeile { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.kopfzeile h1 { margin: 0; }
.progress { height: 6px; background: var(--bg2); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.offline-leiste { background: var(--warn-bg); color: var(--warn); font-size: 13px; padding: 6px 14px; text-align: center; border-bottom: 1px solid var(--line); }
.checkzeile { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.checkzeile:last-child { border-bottom: 0; }
.checkzeile label { margin: 0; flex: 1; color: var(--text); font-size: 15px; cursor: pointer; }
/* ---------------------------------------------------------------- Spracheingabe, Notizen, Sprachfassungen */
h1 svg, h2 svg { width: 18px; height: 18px; vertical-align: -3px; }
.sprechknopf { width: 100%; min-height: 60px; font-size: 17px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 10px; }
.sprechknopf svg { width: 24px; height: 24px; }
form .sprechknopf { margin-bottom: 4px; }
.mikro { display: flex; align-items: center; justify-content: center; width: 112px; height: 112px; min-height: 112px; padding: 0; margin: 14px auto 8px; border-radius: 50%; background: var(--acc-bg); color: var(--acc-fg); border: 3px solid var(--accent); box-shadow: 0 0 0 0 var(--line2); }
.mikro svg { width: 52px; height: 52px; }
.mikro.an { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); animation: mikro 1.3s ease-out infinite; }
@keyframes mikro { 0% { box-shadow: 0 0 0 0 #f8717188; } 100% { box-shadow: 0 0 0 26px #f8717100; } }
.sprech-status { text-align: center; min-height: 22px; font-size: 15px; color: var(--muted); }
.sprech-status.an { color: var(--bad); font-weight: 600; }
.sprech-status.bad { color: var(--bad); }
.sprech-sprachen { justify-content: center; }
.sprech-sprachen .chip { min-height: 44px; padding: 8px 16px; font-size: 15px; }
.mikro-klein { margin-top: 6px; min-height: 44px; padding: 0 14px; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.mikro-klein svg { width: 18px; height: 18px; }
.sprachknopf { min-height: 40px; padding: 0 10px; display: inline-flex; align-items: center; gap: 5px; font: 600 12px var(--mono); letter-spacing: .06em; background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; }
.sprachknopf svg { width: 16px; height: 16px; }
.sprachwahl { display: grid; gap: 8px; }
.sprachwahl button { min-height: 52px; font-size: 17px; }
.fassung { font-size: 13px; color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }
.fassung .badge { font-size: 9px; padding: 3px 5px; vertical-align: 1px; }
@media (max-width: 420px) { header .who { max-width: 38vw; overflow: hidden; } header .who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } header .logo small { display: none; } }
@media (prefers-reduced-motion: reduce) { .mikro.an { animation: none; } }

@media print { header.top, nav.tabs, nav.seite, .knopfreihe, button { display: none !important; } main { padding: 0; margin: 0; max-width: none; } body { background: #fff; color: #000; } .panel { border: 0; box-shadow: none; } }
