/* Flauschzeit – heller Hintergrund, dunkles Marineblau, dezente tuerkise Akzente. Keine externen Fonts. */
:root {
  --marine: #14315c;
  --marine-dunkel: #0d2242;
  --tuerkis: #2bb8c6;
  --tuerkis-hell: #e3f6f8;
  --grund: #f5f7fa;
  --karte: #ffffff;
  --linie: #d6dde8;
  --text: #1b2433;
  --leise: #556377;
  --rot: #a4262c;
  --rot-hell: #fdecec;
  --gruen: #1d6b3a;
  --gruen-hell: #e7f5ec;
  --gelb-hell: #fff6dc;
  --gelb: #7a5200;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { font-size: 17px; }
body {
  margin: 0; background: var(--grund); color: var(--text); line-height: 1.5;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--marine); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--tuerkis); outline-offset: 2px;
}
h1 { font-size: 1.6rem; margin: 0 0 1rem; color: var(--marine); }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; color: var(--marine); }
p { margin: 0 0 .75rem; }

.kopf {
  background: var(--karte); border-bottom: 3px solid var(--tuerkis);
  display: flex; align-items: center; gap: 1rem; padding: .5rem 1.25rem; flex-wrap: wrap;
}
.marke img { display: block; height: 60px; width: auto; }
.kopf nav { display: flex; gap: .25rem; flex-wrap: wrap; flex: 1; }
.kopf nav a {
  text-decoration: none; padding: .55rem .9rem; border-radius: 8px; font-weight: 600; color: var(--marine);
}
.kopf nav a:hover { background: var(--tuerkis-hell); }
.kopf nav a[aria-current="page"] { background: var(--marine); color: #fff; }
.kopf form { margin: 0 0 0 auto; }

main { max-width: 60rem; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
main.schmal { max-width: 30rem; }
footer { text-align: center; color: var(--leise); font-size: .85rem; padding: 0 1rem 2rem; }

.karte {
  background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius);
  padding: 1.25rem; margin-bottom: 1.25rem;
}
.meldung { border-radius: 10px; padding: .8rem 1rem; margin-bottom: 1rem; border: 1px solid; }
.meldung.success { background: var(--gruen-hell); border-color: #a9d8bb; color: var(--gruen); }
.meldung.error { background: var(--rot-hell); border-color: #f0b5b5; color: var(--rot); }
.meldung.info { background: var(--tuerkis-hell); border-color: #a5dfe6; color: var(--marine-dunkel); }
.meldung.warning { background: var(--gelb-hell); border-color: #ecd58f; color: var(--gelb); }

/* Bedienelemente */
.knopf {
  display: inline-block; font: inherit; font-weight: 700; text-decoration: none; text-align: center;
  cursor: pointer; border-radius: 10px; border: 2px solid var(--marine); padding: .7rem 1.2rem;
  background: var(--marine); color: #fff; min-height: 48px;
}
.knopf:hover { background: var(--marine-dunkel); }
.knopf.akzent { background: var(--tuerkis); border-color: var(--tuerkis); color: var(--marine-dunkel); }
.knopf.akzent:hover { background: #23a6b3; }
.knopf.leise { background: #fff; color: var(--marine); }
.knopf.leise:hover { background: var(--tuerkis-hell); }
.knopf.gefahr { background: #fff; border-color: var(--rot); color: var(--rot); }
.knopf.gefahr:hover { background: var(--rot-hell); }
.knopf.klein { padding: .4rem .8rem; min-height: 40px; font-size: .95rem; }
.knopf.gross { font-size: 1.25rem; padding: 1rem 1.5rem; min-height: 64px; width: 100%; }
.aktionen { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin-top: 1rem; }
.aktionen form { margin: 0; flex: 1 1 14rem; }

label { font-weight: 600; display: block; margin-bottom: .25rem; }
input[type="text"], input[type="password"], input[type="email"], input[type="number"], select {
  font: inherit; width: 100%; padding: .6rem .7rem; border: 1px solid #8a97aa; border-radius: 8px;
  background: #fff; color: var(--text); min-height: 46px;
}
input[type="checkbox"] { width: 1.2rem; height: 1.2rem; vertical-align: middle; margin-right: .4rem; }
.formular > div { margin-bottom: 1rem; }
.helptext, .hinweis { color: var(--leise); font-size: .9rem; font-weight: 400; }
.helptext ul { margin: .25rem 0 0; padding-left: 1.1rem; }
ul.errorlist { list-style: none; margin: .25rem 0; padding: 0; color: var(--rot); font-weight: 600; }
.raster { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); align-items: end; }
.pausen { display: grid; gap: .5rem .75rem; grid-template-columns: 5.5rem 1fr 1fr; align-items: center; }
.pausen .voll { grid-column: 2 / -1; }

/* Startseite */
.stempel { text-align: center; border-top: 6px solid var(--linie); }
.stempel.arbeitet { border-top-color: var(--tuerkis); }
.stempel.pause { border-top-color: #e2b23a; }
.status { font-size: 1.15rem; margin-bottom: .25rem; }
.stempel .hinweis { margin: 1rem 0 0; }
.uhr { font-size: 3rem; font-weight: 800; color: var(--marine); font-variant-numeric: tabular-nums; line-height: 1.1; }
.uhr small { display: block; font-size: .95rem; font-weight: 400; color: var(--leise); }
.kennzahlen { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); margin-bottom: 1.25rem; }
.kennzahl { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); padding: .8rem 1rem; }
.kennzahl span { display: block; color: var(--leise); font-size: .85rem; }
.kennzahl strong { font-size: 1.35rem; color: var(--marine); font-variant-numeric: tabular-nums; }

/* Tabellen */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
th { color: var(--leise); font-size: .85rem; font-weight: 600; }
td.zahl, th.zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tfoot td { font-weight: 700; border-bottom: 0; }
.marke-klein {
  display: inline-block; border-radius: 999px; padding: .05rem .6rem; font-size: .8rem; font-weight: 700;
  background: var(--tuerkis-hell); color: var(--marine-dunkel); white-space: nowrap;
}
.marke-klein.warn { background: var(--gelb-hell); color: var(--gelb); }
.marke-klein.aus { background: #eceff3; color: var(--leise); }
.monatswahl { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.monatswahl h1 { margin: 0; flex: 1; }

.einmal { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 1.4rem; font-weight: 700;
  background: var(--tuerkis-hell); border-radius: 8px; padding: .6rem 1rem; display: inline-block; letter-spacing: .05em; }
.codes { columns: 2; list-style: none; padding: 0; font-family: ui-monospace, Consolas, monospace; font-size: 1.1rem; }
.qr { width: 220px; height: 220px; display: block; margin: 0 auto 1rem; border: 1px solid var(--linie); border-radius: 8px; }
.anmeldung-logo { display: block; width: min(100%, 22rem); height: auto; margin: 1rem auto 1.5rem; }
.trenner { border: 0; border-top: 1px solid var(--linie); margin: 1.25rem 0; }

/* Verwaltung */
.subnav { display: flex; gap: .25rem; flex-wrap: wrap; margin-bottom: 1.25rem; border-bottom: 1px solid var(--linie); padding-bottom: .5rem; }
.subnav a { text-decoration: none; padding: .35rem .8rem; border-radius: 8px; font-weight: 600; }
.subnav a:hover { background: var(--tuerkis-hell); }
.subnav a[aria-current="page"] { background: var(--tuerkis-hell); color: var(--marine-dunkel); }
.woche { display: grid; gap: .5rem; grid-template-columns: repeat(7, minmax(4.2rem, 1fr)); }
.woche label { font-size: .85rem; }
.haken > div { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; margin-bottom: .75rem; }
.haken > div label { font-weight: 400; display: inline; }
.vorschau { border: 2px solid var(--tuerkis); }
dl.werte { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.25rem; margin: 0 0 1rem; }
dl.werte dt { color: var(--leise); }
dl.werte dd { margin: 0; font-weight: 600; }

@media (max-width: 640px) {
  html { font-size: 16px; }
  .kopf { padding: .5rem .75rem; }
  .marke img { height: 42px; }
  .kopf nav { order: 3; flex-basis: 100%; }
  .monatswahl h1 { order: -1; flex-basis: 100%; }
  main { padding: 1rem .75rem 2.5rem; }
  .uhr { font-size: 2.5rem; }
  table.stapel thead { display: none; }
  table.stapel tr { display: block; border-bottom: 1px solid var(--linie); padding: .5rem 0; }
  table.stapel td { display: flex; justify-content: space-between; gap: 1rem; border: 0; padding: .15rem 0; text-align: right; }
  table.stapel td::before { content: attr(data-titel); color: var(--leise); font-size: .85rem; text-align: left; }
  .pausen { grid-template-columns: 4.5rem 1fr 1fr; }
  .woche { grid-template-columns: repeat(4, 1fr); }
  dl.werte { grid-template-columns: 1fr; gap: 0; }
  dl.werte dd { margin-bottom: .5rem; }
}
label.inline { display: inline; font-weight: 400; }
.kennzahl.betont { border-color: var(--tuerkis); background: var(--tuerkis-hell); }
.antrag { border-bottom: 1px solid var(--linie); padding: .5rem 0 1rem; margin-bottom: .75rem; }
.antrag:last-child { border-bottom: 0; margin-bottom: 0; }
form.zeile { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: .75rem; }
form.zeile input[type="text"], form.zeile select { flex: 1 1 14rem; width: auto; }
[hidden] { display: none !important; }

/* Kalender */
table.kalender { table-layout: fixed; }
table.kalender th { text-align: center; }
table.kalender td { padding: 0; border: 1px solid var(--linie); height: 5.5rem; }
table.kalender td.leer { background: var(--grund); }
table.kalender td a { display: block; height: 100%; padding: .3rem; text-decoration: none; color: var(--text); }
table.kalender td a:hover { background: var(--tuerkis-hell); }
table.kalender td.heute .nr { background: var(--marine); color: #fff; }
table.kalender td.gewaehlt { outline: 3px solid var(--tuerkis); outline-offset: -3px; }
table.kalender td.k-feiertag, table.kalender td.k-frei { background: #f1f4f8; }
.nr { display: inline-block; min-width: 1.6rem; text-align: center; border-radius: 999px; font-weight: 700; }
.k-marke { display: block; border-radius: 6px; padding: 0 .35rem; margin-top: .15rem; font-size: .72rem; font-weight: 600;
  line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-left: 4px solid; }
.k-feiertag.k-marke { background: #e6e9f2; border-color: var(--marine); color: var(--marine-dunkel); }
.k-frei.k-marke { background: #ece8f5; border-color: #6a4fa3; color: #3f2c6b; }
.k-urlaub { background: var(--gruen-hell); border-color: var(--gruen); color: var(--gruen); }
.k-krank { background: var(--rot-hell); border-color: var(--rot); color: var(--rot); }
.k-bezahlt { background: var(--tuerkis-hell); border-color: var(--tuerkis); color: var(--marine-dunkel); }
.k-unbezahlt { background: #eceff3; border-color: var(--leise); color: var(--text); }
.k-offen { background: #fff; border-style: dashed; border-width: 1px 1px 1px 4px; }
.k-konflikt { background: var(--gelb-hell); border-color: var(--gelb); color: var(--gelb); }
.k-zeit { display: block; margin-top: .15rem; font-size: .8rem; font-variant-numeric: tabular-nums; color: var(--leise); }
.legende { display: flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: center; margin: 1rem 0 0; font-size: .85rem; color: var(--leise); }
.legende .k-marke, .legende .k-zeit { display: inline-block; margin: 0; }
@media (max-width: 640px) {
  table.kalender td { height: 4.2rem; }
  table.kalender td a { padding: .15rem; }
  .k-marke { font-size: .62rem; padding: 0 .15rem; border-left-width: 3px; }
  .k-zeit { font-size: .68rem; }
}
