/* WoC-Design wie Dispo-Tool: weißer Grund, schwarzer Banner, Gold als Akzent */
:root {
  --ink: #141414;
  --ink-dim: #625E55;
  --bg: #FFFFFF;
  --raised: #F4F2EC;
  --hover: #EBE8DF;
  --line: #E2DFD4;
  --gold: #B9922E;
  --gold-dunkel: #8C6A2F;
  --banner: #0A0A0A;
  --gruen: #3F7F4A;
  --rot: #A33A2A;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Segoe UI", "Helvetica Neue", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  font-size: 16px; line-height: 1.4;
}
a { color: var(--gold-dunkel); }
a:hover { color: #5E4720; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Banner ---------- */
.banner { background: var(--banner); color: #fff; border-bottom: 3px solid var(--gold); padding-top: env(safe-area-inset-top); }
.banner-innen {
  max-width: 1040px; margin: 0 auto; padding: 14px 16px 12px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
}
.marke { grid-column: 2; display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; justify-self: center; }
.marke:hover { color: #fff; }
.marke-text { font-weight: 700; letter-spacing: 3px; font-size: 16px; white-space: nowrap; }
.marke-sub { grid-column: 2; grid-row: 2; justify-self: center; color: #BDB8AC; font-size: 12px; letter-spacing: 1px; }
.konto { grid-column: 3; grid-row: 1 / span 2; justify-self: end; position: relative; }

.avatar {
  width: 44px; height: 44px; border-radius: 22px; border: 2px solid var(--gold);
  background: #1E1E1E; color: #fff; font-weight: 700; font-size: 14px; cursor: pointer;
}
.menue {
  position: absolute; right: 0; top: 52px; z-index: 20; min-width: 220px;
  background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,.18); padding: 6px; display: flex; flex-direction: column;
}
.menue[hidden] { display: none; }
.menue .wer { padding: 10px 12px 8px; font-size: 13px; color: var(--ink-dim); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menue .wer strong { display: block; color: var(--ink); font-size: 15px; }
.menue a, .menue button {
  display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px;
  text-decoration: none; color: var(--ink); background: none; border: 0; text-align: left; cursor: pointer; font-size: 15px;
}
.menue a:hover, .menue button:hover { background: var(--raised); color: var(--ink); }

/* ---------- Inhalt ---------- */
.inhalt { max-width: 1040px; margin: 0 auto; padding: 22px 16px calc(40px + env(safe-area-inset-bottom)); outline: none; }
.laedt { color: var(--ink-dim); }
h1 { margin: 0; font-size: 26px; line-height: 1.2; }
h2 { margin: 0; font-size: 17px; }
.gruss { display: flex; flex-direction: column; gap: 4px; margin-bottom: 22px; }
.gruss .datum { font-size: 14px; color: var(--ink-dim); }

.raster { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 820px) {
  .raster { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; }
}
.abschnitt { display: flex; flex-direction: column; gap: 10px; }
.abschnitt-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.abschnitt-kopf a { font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }

/* ---------- Einsätze ---------- */
.liste { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.einsatz { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); }
.einsatz:first-child { border-top: 0; }
.einsatz .streifen { width: 4px; align-self: stretch; border-radius: 2px; background: var(--gold); flex: none; }
.einsatz .text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.einsatz .titel { font-weight: 600; font-size: 15px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.einsatz a.titel:hover { text-decoration: underline; color: var(--ink); }
.einsatz .info { font-size: 13px; color: var(--ink-dim); }
.knopf-klein {
  flex: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px;
  border: 1px solid var(--ink); border-radius: 8px; font-size: 13px; font-weight: 700;
  color: var(--ink); text-decoration: none; background: #fff; white-space: nowrap; cursor: pointer;
}
.knopf-klein:hover { background: var(--raised); color: var(--ink); }
.leer { padding: 16px; color: var(--ink-dim); font-size: 14px; background: var(--raised); border-radius: var(--radius); }
.leer strong { color: var(--ink); }

/* ---------- App-Kacheln ---------- */
.kacheln { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kachel {
  background: var(--banner); color: #fff; text-decoration: none; border-radius: var(--radius);
  padding: 16px; min-height: 104px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
}
.kachel:hover { color: #fff; background: #222; }
.kachel svg { color: var(--gold); }
.kachel .name { display: block; font-size: 16px; font-weight: 600; }
.kachel .unter { display: block; font-size: 13px; color: #BDB8AC; margin-top: 2px; }
.kachel.aus { background: var(--raised); color: var(--ink-dim); cursor: default; }
.kachel.aus svg { color: #9A968C; }
.kachel.aus .name { color: var(--ink); }
.kachel.aus .unter { color: var(--ink-dim); }

/* ---------- Formulare ---------- */
.karte { max-width: 420px; margin: 8px auto 0; border: 1px solid var(--line); border-radius: 16px; padding: 24px 20px; display: flex; flex-direction: column; gap: 16px; }
.karte p { margin: 0; color: var(--ink-dim); font-size: 14px; }
.feld { display: flex; flex-direction: column; gap: 6px; }
.feld label { font-size: 14px; font-weight: 600; }
.feld input, .feld select {
  height: 48px; border: 1px solid #BDB8AC; border-radius: 10px; padding: 0 12px; background: #fff; font-size: 17px;
}
.feld input:focus { border-color: var(--ink); }
.feld .hilfe { font-size: 13px; color: var(--ink-dim); }
.knopf {
  height: 50px; border-radius: 12px; border: 0; background: var(--ink); color: #fff;
  font-size: 16px; font-weight: 700; cursor: pointer; padding: 0 18px;
}
.knopf:hover { background: #333; }
.knopf:disabled { opacity: .6; cursor: wait; }
.knopf.gold { background: var(--gold); color: var(--ink); }
.knopf.hell { background: #fff; color: var(--ink); border: 1px solid var(--ink); }
.meldung { border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.meldung.fehler { background: #FBEDEA; color: var(--rot); border: 1px solid #EDC6BE; }
.meldung.ok { background: #EDF5EE; color: var(--gruen); border: 1px solid #C5DEC9; }
.meldung[hidden] { display: none; }

/* ---------- Verwaltung ---------- */
.zurueck { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-decoration: none; margin-bottom: 6px; }
.tabelle-box { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.person { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; padding: 14px; border-top: 1px solid var(--line); }
.person:first-child { border-top: 0; }
.person.inaktiv { background: #FAF9F6; }
.person .kz {
  width: 44px; height: 44px; border-radius: 22px; background: var(--raised); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: none;
}
.person .wer { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.person .wer strong { font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; font-weight: 600; border-radius: 10px; padding: 2px 8px; background: var(--raised); color: var(--ink-dim); }
.chip.gold { background: #F3EAD3; color: #6B5018; }
.chip.gruen { background: #E3F0E5; color: #2F6639; }
.chip.rot { background: #F8E3DF; color: #8E2F21; }
.person .aktionen { display: flex; flex-wrap: wrap; gap: 6px; }
.neu-form { display: grid; grid-template-columns: minmax(0, 110px) minmax(0, 1fr); gap: 10px; align-items: end; }
.neu-form .feld:nth-child(3) { grid-column: 1 / -1; }
.neu-form .knopf { grid-column: 1 / -1; }
@media (min-width: 720px) {
  .neu-form { grid-template-columns: 110px minmax(0, 1fr) 180px auto; }
  .neu-form .feld:nth-child(3), .neu-form .knopf { grid-column: auto; }
}
.protokoll { font-size: 13px; color: var(--ink-dim); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 14px; }
.protokoll summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; color: var(--ink); }
.protokoll ol { list-style: none; margin: 0 0 10px; padding: 0; max-height: 320px; overflow: auto; }
.protokoll li { padding: 5px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }

/* ---------- Dialog ---------- */
dialog { border: 0; border-radius: 16px; padding: 0; max-width: min(420px, calc(100vw - 32px)); width: 100%; box-shadow: 0 16px 48px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(10,10,10,.55); }
.dialog-innen { padding: 22px 20px; display: flex; flex-direction: column; gap: 14px; }
.dialog-innen p { margin: 0; color: var(--ink-dim); font-size: 14px; }
.passwort-anzeige {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 24px; font-weight: 700; letter-spacing: 1px;
  background: var(--raised); border: 1px dashed var(--gold-dunkel); border-radius: 10px; padding: 14px; text-align: center; user-select: all;
}
.knopf-reihe { display: flex; gap: 8px; flex-wrap: wrap; }
.knopf-reihe .knopf { flex: 1 1 140px; }
.versteckt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hilfe { font-size: 13px; color: var(--ink-dim); margin: 0; }
