/* Firmenfarben wie im PC-Programm (zeiterfassung/ui/design.py) */
:root {
  --lila: #72217d; --lila-hover: #5a1a63; --lila-hell: #f2e8f4;
  --gelb: #fdc600; --gelb-hover: #e6b400; --gelb-hell: #fff4cc;
  --hintergrund: #f5f3f8; --karte: #ffffff; --rand: #e4dfea;
  --text: #1f1d2b; --grau: #6b6778;
  --gruen: #1b7f3b; --gruen-hell: #e3f3e8; --rot: #b3261e; --rot-hell: #fbe4e2;
  --orange: #b35c00; --orange-hell: #fdf0e1;
  --tab-hoehe: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--hintergrund); color: var(--text);
  font: 16px/1.4 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  padding-bottom: calc(var(--tab-hoehe) + env(safe-area-inset-bottom) + 16px);
}
body.ohne-tabs { padding-bottom: 24px; }
h1 { font-size: 22px; margin: 4px 0; }
h2 { font-size: 17px; margin: 0 0 8px; }
a { color: var(--lila); }
.grau { color: var(--grau); }
.klein { font-size: 13px; }
.mitte { text-align: center; }

.kopf {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--karte); border-bottom: 1px solid var(--rand);
  padding: calc(8px + env(safe-area-inset-top)) 16px 8px;
  position: sticky; top: 0; z-index: 5;
}
.logo { height: 34px; width: auto; }
.kopf-name { font-size: 13px; color: var(--grau); text-align: right; }

.inhalt { max-width: 560px; margin: 0 auto; padding: 14px 16px; }

.karte {
  background: var(--karte); border: 1px solid var(--rand); border-radius: 16px;
  padding: 16px; margin: 12px 0;
}

/* Stempeln */
.gruss { margin-top: 6px; }
.stempel { text-align: center; padding: 20px 16px; }
.uhr { font-size: 64px; font-weight: 700; letter-spacing: 1px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.status {
  display: inline-block; margin: 8px 0 18px; padding: 6px 14px; border-radius: 999px;
  font-weight: 600; font-size: 15px;
}
.status::before { content: "● "; }
.status.aus { background: #ecebef; color: var(--grau); }
.status.aus::before { content: "○ "; }
.status.dienst { background: var(--gruen-hell); color: var(--gruen); }
.status.pause { background: var(--orange-hell); color: var(--orange); }
.status.feierabend { background: var(--lila-hell); color: var(--lila); }
.status.feierabend::before { content: "✓ "; }

/* Knöpfe */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 10px 18px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.knopf:disabled { opacity: .6; }
.knopf.lila { background: var(--lila); color: #fff; }
.knopf.lila:active { background: var(--lila-hover); }
.knopf.gelb { background: var(--gelb); color: var(--text); }
.knopf.gelb:active { background: var(--gelb-hover); }
.knopf.hell { background: var(--karte); color: var(--lila); border-color: var(--lila); }
.knopf.hell:active { background: var(--lila-hell); }
.knopf.gross { width: 100%; font-size: 18px; min-height: 54px; }
.knopf.riesig { width: 100%; font-size: 22px; min-height: 80px; border-radius: 16px; }
.knopf.breit { width: 100%; margin: 8px 0; }
.knopf.rund { width: 48px; height: 48px; padding: 0; border-radius: 50%; background: var(--karte);
  border-color: var(--rand); color: var(--lila); font-size: 26px; }
.klein-knopf { min-height: 40px; padding: 6px 14px; font-size: 15px; }

/* Kacheln */
.kacheln { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.kachel {
  display: block; background: var(--karte); border: 1px solid var(--rand); border-radius: 14px;
  padding: 12px; border-top: 4px solid var(--lila); color: inherit; text-decoration: none; min-width: 0;
}
.kachel.gelb-rand { border-top-color: var(--gelb); }
.kachel.gruen-rand { border-top-color: var(--gruen); }
.kachel-titel { font-size: 13px; color: var(--grau); }
.kachel-wert { font-size: 22px; font-weight: 700; margin: 2px 0; white-space: nowrap; }
.kachel-info { font-size: 12px; color: var(--grau); }
.plus { color: var(--gruen); }
.minus { color: var(--rot); }

/* Meldungen */
.meldung { display: block; padding: 12px 14px; border-radius: 12px; margin: 8px 0; font-weight: 600; text-decoration: none; }
.meldung.ok { background: var(--gruen-hell); color: var(--gruen); }
.meldung.hinweis { background: var(--orange-hell); color: var(--orange); }
.meldung.fehler { background: var(--rot-hell); color: var(--rot); }
.warnung { color: var(--orange); font-weight: 600; }

/* Monat */
.monatsleiste { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.monatsleiste h1 { font-size: 20px; text-align: center; flex: 1; }
.tage { list-style: none; padding: 0; margin: 8px 0; background: var(--karte); border: 1px solid var(--rand);
  border-radius: 16px; overflow: hidden; }
.tage li + li { border-top: 1px solid var(--rand); }
.tage a, .tage .zeile {
  display: grid; grid-template-columns: 76px 1fr auto; gap: 8px; align-items: center;
  padding: 10px 14px; min-height: 52px; color: inherit; text-decoration: none;
}
.tage a:active { background: var(--lila-hell); }
.tage small { display: block; font-size: 12px; color: var(--grau); }
.tage .tag-ist { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.tage .tag-ist small { font-weight: 600; }
.tage .tag-ist small.plus { color: var(--gruen); }
.tage .tag-ist small.minus { color: var(--rot); }
.tage li.frei { background: #f7f5f9; color: #8d899a; }
.tage li.heute { background: var(--lila-hell); }
.tage li.warn .tag-mitte small { color: var(--orange); }

/* Formulare */
.formular label { display: block; margin: 12px 0; font-weight: 600; font-size: 14px; }
.formular input:not([type=checkbox]), .formular select {
  display: block; width: 100%; margin-top: 4px; min-height: 48px; padding: 10px 12px;
  border: 1px solid var(--rand); border-radius: 10px; background: #fff; font: inherit; font-size: 17px; color: var(--text);
}
.formular input:focus, .formular select:focus { outline: 2px solid var(--lila); border-color: var(--lila); }
.formular .haken { display: flex; align-items: center; gap: 10px; font-weight: 400; font-size: 16px; }
.formular .haken input { width: 22px; height: 22px; accent-color: var(--lila); }
.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.zwei label { margin: 6px 0; }
.bloecke .block, .bloecke .block-kopf { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bloecke .block { margin-bottom: 8px; }
.bloecke .block input { margin-top: 0 !important; }
.block-kopf { font-size: 13px; color: var(--grau); font-weight: 600; margin-bottom: 4px; }
.zurueck { display: inline-block; padding: 8px 0; text-decoration: none; font-weight: 600; }

/* Listen */
.liste { list-style: none; padding: 0; margin: 0; }
.ruf { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 8px 0; }
.leer { padding: 16px 0; }
.menue { list-style: none; padding: 0; overflow: hidden; }
.menue li + li { border-top: 1px solid var(--rand); }
.menue a { display: flex; justify-content: space-between; padding: 14px 16px; color: var(--text); text-decoration: none; font-weight: 600; }
.menue.karte { padding: 0; }

.anmelden { margin-top: 24px; }
.offline { text-align: center; margin-top: 24px; }
.offline-icon { font-size: 48px; color: var(--orange); }

/* Untere Navigation */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--lila); padding-bottom: env(safe-area-inset-bottom);
}
.tabs a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: var(--tab-hoehe); color: rgba(255,255,255,.75); text-decoration: none; font-size: 12px; font-weight: 600;
}
.tabs .tab-icon { font-size: 22px; line-height: 1.1; }
.tabs a.aktiv { color: var(--gelb); }

@media (min-width: 600px) {
  .inhalt { padding-top: 24px; }
}
