/* nc-tronix Schichtplan — Hausfarbe #B80014 */
:root {
  --rot: #B80014;
  --rot-dunkel: #8E0010;
  --rot-hell: #FBEDEE;
  --tinte: #1A1A1E;
  --grau: #6B6B72;
  --linie: #E6E4E1;
  --grund: #F7F6F4;
  --karte: #FFFFFF;
  --gruen: #1E7A3C;
  --gruen-hell: #E8F5EC;
  --radius: 14px;
  --schatten: 0 1px 3px rgba(20, 10, 10, .07), 0 8px 24px rgba(20, 10, 10, .06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--grund);
  color: var(--tinte);
  font-size: 16px;
  line-height: 1.45;
}
.verborgen { display: none !important; }

button { font: inherit; cursor: pointer; }
input, select, textarea {
  font: inherit; color: var(--tinte);
  border: 1px solid var(--linie); border-radius: 10px;
  padding: 10px 12px; background: #fff; width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--rot); outline-offset: 1px; border-color: var(--rot);
}
label { display: block; font-size: 13.5px; font-weight: 600; color: var(--grau); margin-bottom: 12px; }
label input, label select, label textarea { margin-top: 5px; font-weight: 400; color: var(--tinte); }

/* ---------- Knöpfe ---------- */
.knopf {
  border: 0; border-radius: 10px; padding: 10px 16px;
  background: var(--rot); color: #fff; font-weight: 600;
  transition: background .15s;
}
.knopf:hover { background: var(--rot-dunkel); }
.knopf-voll { width: 100%; padding: 13px; font-size: 17px; }
.knopf-leise {
  background: transparent; color: var(--grau); font-weight: 500;
  border: 1px solid var(--linie);
}
.knopf-leise:hover { background: #fff; color: var(--tinte); }
.knopf-rand {
  background: #fff; color: var(--rot); border: 1.5px solid var(--rot);
}
.knopf-rand:hover { background: var(--rot-hell); }
.knopf-gruen { background: var(--gruen); }
.knopf-gruen:hover { background: #16602E; }
.knopf:disabled { opacity: .5; cursor: default; }

/* ---------- Anmeldung ---------- */
.login-seite {
  min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 24px;
  background: linear-gradient(180deg, #FDFCFB 0%, var(--grund) 60%);
}
.login-karte {
  width: 100%; max-width: 380px; background: var(--karte);
  border-radius: 18px; box-shadow: var(--schatten);
  padding: 36px 30px 30px; text-align: center;
  border-top: 4px solid var(--rot);
}
.login-logo { height: 44px; margin-bottom: 18px; }
.login-karte h1 { font-size: 24px; letter-spacing: -.02em; }
.login-untertitel { color: var(--grau); font-size: 14px; margin: 6px 0 24px; }
.login-karte form { text-align: left; }
.login-fuss { margin-top: 22px; color: var(--grau); font-size: 12.5px; }
.feld-fehler {
  background: var(--rot-hell); color: var(--rot-dunkel);
  border-radius: 8px; padding: 9px 12px; font-size: 14px; margin-bottom: 12px;
}

/* ---------- Rahmen ---------- */
.kopf {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  background: #fff; border-bottom: 1px solid var(--linie);
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
}
.kopf-logo { height: 26px; }
.kopf-titel { font-weight: 700; letter-spacing: -.01em; }
.kopf-platz { flex: 1; }
.kopf-name { color: var(--grau); font-size: 14px; }

.inhalt {
  max-width: 860px; margin: 0 auto;
  padding: 20px 16px 96px;
}

.navigation {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  display: flex; justify-content: space-around;
  background: #fff; border-top: 1px solid var(--linie);
  padding: 6px 4px; padding-bottom: max(6px, env(safe-area-inset-bottom));
}
.nav-knopf {
  border: 0; background: none; color: var(--grau);
  font-size: 11.5px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 5px 10px; border-radius: 10px; min-width: 62px;
}
.nav-knopf svg { width: 23px; height: 23px; }
.nav-knopf.aktiv { color: var(--rot); background: var(--rot-hell); }

/* ---------- Karten & Listen ---------- */
.karte {
  background: var(--karte); border-radius: var(--radius);
  box-shadow: var(--schatten); padding: 18px; margin-bottom: 14px;
}
.seitentitel { font-size: 21px; letter-spacing: -.02em; margin-bottom: 14px; }
.seitentitel small { display: block; font-size: 13.5px; font-weight: 400; color: var(--grau); margin-top: 2px; }
.zeile-kopf { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.zeile-kopf .seitentitel { margin-bottom: 0; flex: 1; }

/* Stempeluhr */
.uhr-karte { text-align: center; padding: 28px 18px; }
.uhr-zeit { font-size: 44px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.uhr-datum { color: var(--grau); margin-bottom: 20px; }
.uhr-status {
  display: inline-block; border-radius: 999px; padding: 6px 14px;
  font-size: 14px; font-weight: 600; margin-bottom: 18px;
}
.uhr-status.an { background: var(--gruen-hell); color: var(--gruen); }
.uhr-status.aus { background: var(--grund); color: var(--grau); }
.uhr-laeuft { font-size: 15px; color: var(--grau); margin-bottom: 16px; }
.uhr-knoepfe { display: flex; flex-direction: column; gap: 10px; max-width: 340px; margin: 0 auto; }

.schicht-zeile {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 0; border-bottom: 1px solid var(--linie);
}
.schicht-zeile:last-child { border-bottom: 0; }
.schicht-zeit {
  min-width: 86px; text-align: center;
  background: var(--rot-hell); color: var(--rot-dunkel);
  border-radius: 10px; padding: 7px 4px;
  font-weight: 700; font-size: 14px; line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.schicht-zeit small { display: block; font-weight: 500; opacity: .75; }
.schicht-info { flex: 1; min-width: 0; }
.schicht-titel { font-weight: 650; }
.schicht-meta { color: var(--grau); font-size: 13.5px; }
.schicht-leute { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 5px; }
.person-chip {
  background: var(--grund); border: 1px solid var(--linie);
  border-radius: 999px; padding: 2px 10px; font-size: 12.5px; font-weight: 600;
}
.person-chip.ich { background: var(--rot); border-color: var(--rot); color: #fff; }

.tag-kopf {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--grau);
  margin: 18px 2px 6px;
}
.tag-kopf.heute { color: var(--rot); }

.wochen-nav { display: flex; align-items: center; gap: 8px; }
.wochen-nav .knopf-leise { padding: 7px 12px; }
.wochen-titel { font-weight: 650; font-size: 15px; flex: 1; text-align: center; }

/* Tabellen */
.tabelle { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tabelle th {
  text-align: left; font-size: 12px; text-transform: uppercase;
  letter-spacing: .05em; color: var(--grau);
  padding: 8px 10px; border-bottom: 2px solid var(--linie);
}
.tabelle td { padding: 10px; border-bottom: 1px solid var(--linie); vertical-align: top; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle .zahl { text-align: right; font-variant-numeric: tabular-nums; }
.tabellen-rolle { overflow-x: auto; }

.marke {
  display: inline-block; border-radius: 6px; padding: 1px 8px;
  font-size: 12px; font-weight: 700;
}
.marke.spontan { background: #FFF4E0; color: #9A6200; }
.marke.schicht { background: var(--rot-hell); color: var(--rot-dunkel); }
.marke.manuell { background: #EAEAF6; color: #45459A; }
.marke.laeuft { background: var(--gruen-hell); color: var(--gruen); }
.marke.inaktiv { background: var(--grund); color: var(--grau); }
.marke.admin { background: var(--tinte); color: #fff; }
.marke.offen { background: #FFF4E0; color: #9A6200; border: 1px dashed #D9A430; }

.knopf-klein { padding: 6px 12px; font-size: 13.5px; }
.offen-zeile { background: linear-gradient(90deg, #FFFBF2, transparent 30%); border-radius: 8px; }
.abw-band { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 10px; border-bottom: 1px dashed var(--linie); margin-bottom: 6px; }
.person-chip.abw { background: #FFF4E0; border-color: #EAD9B0; color: #9A6200; }
.haken-zeile { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--tinte); margin: 4px 0 12px; }
.haken-zeile input { width: auto; accent-color: var(--rot); transform: scale(1.25); }
.hinweis-inline { font-weight: 400; color: #9A6200; }
.chip-warn { color: #9A6200; }

.summen-band {
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.summen-kachel {
  flex: 1; min-width: 130px; background: var(--karte);
  border-radius: var(--radius); box-shadow: var(--schatten);
  padding: 14px 16px;
}
.summen-kachel .wert { font-size: 24px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.summen-kachel .titel { font-size: 12.5px; color: var(--grau); font-weight: 600; }

/* Team-Liste */
.ma-zeile {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--linie); cursor: pointer;
}
.ma-zeile:last-child { border-bottom: 0; }
.ma-kreis {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--rot); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  flex-shrink: 0;
}
.ma-zeile.inaktiv .ma-kreis { background: var(--grau); }
.ma-name { font-weight: 650; }
.ma-meta { color: var(--grau); font-size: 13px; }

/* Formulare */
.form-raster { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-raster .voll { grid-column: 1 / -1; }
@media (max-width: 540px) { .form-raster { grid-template-columns: 1fr; } }
.abschnitt-titel {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--rot);
  margin: 10px 0 12px; padding-top: 12px; border-top: 1px solid var(--linie);
}
.abschnitt-titel:first-child { border-top: 0; padding-top: 0; }

.personen-wahl { display: flex; flex-wrap: wrap; gap: 8px; margin: 5px 0 12px; }
.personen-wahl .wahl-chip {
  border: 1.5px solid var(--linie); background: #fff; border-radius: 999px;
  padding: 7px 14px; font-size: 14px; font-weight: 600; color: var(--grau);
}
.personen-wahl .wahl-chip.gewaehlt {
  background: var(--rot); border-color: var(--rot); color: #fff;
}

/* Dialog */
.dialog-huelle {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(20, 10, 10, .45);
  display: flex; align-items: flex-end; justify-content: center;
}
.dialog {
  background: var(--grund); width: 100%; max-width: 560px;
  max-height: 92dvh; overflow-y: auto;
  border-radius: 18px 18px 0 0; padding: 22px 18px;
  padding-bottom: max(22px, env(safe-area-inset-bottom));
}
@media (min-width: 600px) {
  .dialog-huelle { align-items: center; }
  .dialog { border-radius: 18px; padding: 26px; }
}
.dialog h2 { font-size: 19px; margin-bottom: 16px; letter-spacing: -.01em; }
.dialog-knoepfe { display: flex; gap: 10px; margin-top: 8px; }
.dialog-knoepfe .knopf { flex: 1; padding: 12px; }

/* Meldung */
.meldung {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
  background: var(--tinte); color: #fff; border-radius: 10px;
  padding: 11px 18px; font-size: 14.5px; font-weight: 500;
  box-shadow: var(--schatten); z-index: 60; max-width: 90vw; text-align: center;
}
.meldung.fehler { background: var(--rot-dunkel); }

.leer-hinweis { color: var(--grau); text-align: center; padding: 26px 10px; font-size: 14.5px; }
.hinweis-klein { color: var(--grau); font-size: 13px; margin-top: 8px; }
.dok-zeile { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--linie); }
.dok-zeile:last-child { border-bottom: 0; }
.dok-titel { font-weight: 600; flex: 1; min-width: 0; }
.dok-titel a { color: var(--tinte); text-decoration: none; }
.dok-titel a:hover { color: var(--rot); }
.dok-meta { color: var(--grau); font-size: 12.5px; }
