/* Zeit & Urlaub v2 – ein Stylesheet, keine externen Schriften */

:root {
  --papier: #edf1ef;
  --flaeche: #ffffff;
  --tinte: #1c2b30;
  --tinte-2: #56676e;
  --linie: #d3dcd9;
  --linie-2: #e5ebe9;
  --akzent: #0e6b57;
  --akzent-hell: #dcefe9;
  --minus: #b3261e;
  --warn: #8a5a00;
  --warn-hell: #fff3d4;

  --c-urlaub: #2b67ac;        --b-urlaub: #dbe8f7;
  --c-krank: #b3261e;         --b-krank: #f8e0dd;
  --c-freizeitausgleich: #8a5a00; --b-freizeitausgleich: #f6e9c9;
  --c-sonderurlaub: #6a45b8;  --b-sonderurlaub: #ebe4f9;
  --c-betriebsruhe: #4a5a60;  --b-betriebsruhe: #dfe6e5;

  --schrift: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, sans-serif;
  --r: 6px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --papier: #172124;
    --flaeche: #1f2b2f;
    --tinte: #e6eeec;
    --tinte-2: #9fb0b5;
    --linie: #34454a;
    --linie-2: #2a393d;
    --akzent: #4fc2a3;
    --akzent-hell: #1d3d36;
    --minus: #f08a80;
    --warn: #e6b450;
    --warn-hell: #3a3220;
    --c-urlaub: #8cb8ef;        --b-urlaub: #22374f;
    --c-krank: #f08a80;         --b-krank: #4a2723;
    --c-freizeitausgleich: #e6b450; --b-freizeitausgleich: #3d321b;
    --c-sonderurlaub: #b9a2f0;  --b-sonderurlaub: #342a4d;
    --c-betriebsruhe: #b4c3c7;  --b-betriebsruhe: #2e3d41;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { font-size: 15px; }
body {
  margin: 0;
  background: var(--papier);
  color: var(--tinte);
  font-family: var(--schrift);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--akzent); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }

h1 { font-size: 1.75rem; line-height: 1.2; font-weight: 650; letter-spacing: -0.01em; margin: 0 0 .25rem; }
h2 { font-size: 1.15rem; font-weight: 650; margin: 0 0 .75rem; }
h3 { font-size: 1rem; font-weight: 650; margin: 0 0 .5rem; }
p { margin: 0 0 .75rem; max-width: 72ch; }
small, .klein-text { font-size: .85rem; color: var(--tinte-2); }

/* ---------- Rahmen & Navigation ---------- */
.rahmen { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
@media (min-width: 861px) {
  .rahmen { background: linear-gradient(to right, var(--flaeche) 249px, var(--linie) 249px 250px, transparent 250px); }
}
.leiste {
  background: var(--flaeche);
  padding: 1.25rem .75rem;
  display: flex; flex-direction: column; gap: 1.25rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.marke {
  display: flex; align-items: center; gap: .6rem;
  font-weight: 700; color: var(--tinte); text-decoration: none; padding: 0 .5rem; font-size: 1.05rem;
}
/* Das Zeichen: ein halb gefülltes Zifferblatt */
.marke-zeichen {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--akzent);
  background: conic-gradient(var(--akzent) 0 40%, transparent 40% 100%);
}
.nav-gruppe { display: flex; flex-direction: column; gap: 2px; }
.nav-titel { font-size: .8rem; color: var(--tinte-2); padding: 0 .65rem .25rem; }
.nav-gruppe a, .nav-knopf {
  display: flex; justify-content: space-between; align-items: center;
  padding: .45rem .65rem; border-radius: var(--r);
  color: var(--tinte); text-decoration: none; font: inherit; text-align: left;
  background: none; border: 0; cursor: pointer; width: 100%;
}
.nav-gruppe a:hover, .nav-knopf:hover { background: var(--papier); }
.nav-gruppe a.aktiv { background: var(--akzent-hell); color: var(--akzent); font-weight: 600; }
.nav-unten { margin-top: auto; border-top: 1px solid var(--linie-2); padding-top: .75rem; }
.zahl {
  background: var(--akzent); color: var(--flaeche);
  font-size: .75rem; font-weight: 700; border-radius: 99px; padding: 0 .45rem; min-width: 1.4rem; text-align: center;
}

.inhalt { padding: 2rem 2.5rem 4rem; max-width: 1180px; width: 100%; }
.inhalt.schmal { max-width: 420px; margin: 8vh auto; padding: 1.5rem; }
.inhalt.mittel { max-width: 760px; margin: 4vh auto; }

@media (max-width: 860px) {
  .rahmen { grid-template-columns: 1fr; }
  .leiste {
    position: static; height: auto; flex-direction: row; flex-wrap: nowrap; overflow-x: auto;
    border-right: 0; border-bottom: 1px solid var(--linie); padding: .5rem; gap: .25rem; align-items: center;
  }
  .nav-gruppe { flex-direction: row; gap: 2px; }
  .nav-gruppe a, .nav-knopf { white-space: nowrap; }
  .nav-titel, .marke { display: none; }
  .nav-unten { margin: 0; border: 0; padding: 0; }
  .inhalt { padding: 1.25rem 1rem 3rem; }
}

/* ---------- Seitenkopf ---------- */
.seitenkopf { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.seitenkopf p { color: var(--tinte-2); margin: 0; }
.blaettern { display: flex; align-items: center; gap: .25rem; }
.blaettern strong { min-width: 9.5rem; text-align: center; }

/* ---------- Flächen ---------- */
.flaeche {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: 10px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.25rem;
}
.flaeche > h2:first-child { margin-top: 0; }
.raster { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-bottom: 1.25rem; }
.raster > .flaeche { margin-bottom: 0; }
.abschnitt { margin: 2rem 0 1.25rem; }

/* ---------- Stempelkarte (Heute) ---------- */
.stempelkarte {
  display: grid; grid-template-columns: 1fr auto; gap: 1rem 2rem; align-items: center;
  border-left: 6px solid var(--linie);
}
.stempelkarte.laeuft { border-left-color: var(--akzent); }
.stempel-zeit { font-size: 3.4rem; font-weight: 300; line-height: 1; letter-spacing: -0.02em; }
.stempel-status { color: var(--tinte-2); margin-top: .35rem; }
.stempel-status strong { color: var(--tinte); }
.stempel-aktion { display: flex; flex-direction: column; gap: .5rem; align-items: stretch; min-width: 220px; }
.stempel-aktion .knopf { font-size: 1.05rem; padding: .8rem 1.4rem; }
.stempel-aktion label { font-size: .85rem; color: var(--tinte-2); display: flex; gap: .75rem; align-items: center; justify-content: space-between; white-space: nowrap; }
.stempel-aktion input { width: 5.5rem; }
.tagesbalken { grid-column: 1 / -1; }
.balken { height: 10px; background: var(--linie-2); border-radius: 99px; overflow: hidden; position: relative; }
.balken > span { display: block; height: 100%; background: var(--akzent); border-radius: 99px; }
.balken.ueber > span { background: var(--warn); }
.balken-text { display: flex; justify-content: space-between; font-size: .85rem; color: var(--tinte-2); margin-top: .35rem; }
@media (max-width: 640px) {
  .stempelkarte { grid-template-columns: 1fr; }
  .stempel-zeit { font-size: 2.6rem; }
}

/* ---------- Kontoauszug ---------- */
.auszug { width: 100%; border-collapse: collapse; }
.auszug th { text-align: left; font-weight: 400; padding: .35rem 0; }
.auszug th small { display: block; font-size: .78rem; }
.auszug td { text-align: right; padding: .35rem 0; white-space: nowrap; }
.auszug tbody tr + tr { border-top: 1px dotted var(--linie); }
.auszug tfoot th, .auszug tfoot td {
  font-weight: 700; font-size: 1.35rem; padding-top: .6rem;
  border-top: 1px solid var(--tinte);
}
.auszug tfoot td { border-bottom: 3px double var(--tinte); }
.auszug .einheit { font-size: .85rem; font-weight: 400; color: var(--tinte-2); }
.neg, .zahl-saldo.neg { color: var(--minus); }
.zahl-saldo.pos { color: var(--akzent); }
.hinweis { font-size: .85rem; color: var(--warn); background: var(--warn-hell); padding: .5rem .7rem; border-radius: var(--r); margin: .75rem 0 0; }

/* ---------- Tabellen ---------- */
.tabelle-huelle { overflow-x: auto; }
.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th, .tabelle td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--linie-2); vertical-align: top; }
.tabelle thead th { font-size: .85rem; font-weight: 600; color: var(--tinte-2); border-bottom: 1px solid var(--linie); white-space: nowrap; }
.tabelle td.r, .tabelle th.r { text-align: right; white-space: nowrap; }
.tabelle tr.leise td { color: var(--tinte-2); }
.tabelle tr.wochenende td { background: color-mix(in srgb, var(--papier) 60%, transparent); }
.tabelle tr.heute td { box-shadow: inset 0 -2px 0 var(--akzent); }
.tabelle tfoot td, .tabelle tfoot th { font-weight: 700; border-top: 1px solid var(--tinte); border-bottom: 0; }
.aktionen { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }
.aktionen form { margin: 0; }
.leer { color: var(--tinte-2); padding: 1rem 0; }

/* ---------- Marken ---------- */
.pill { display: inline-block; font-size: .8rem; font-weight: 600; padding: .05rem .55rem; border-radius: 99px; white-space: nowrap; }
.pill-beantragt { background: var(--warn-hell); color: var(--warn); }
.pill-genehmigt { background: var(--akzent-hell); color: var(--akzent); }
.pill-abgelehnt { background: var(--b-krank); color: var(--c-krank); }
.pill-storniert { background: var(--linie-2); color: var(--tinte-2); text-decoration: line-through; }
.art { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; }
.art::before { content: ""; width: .7rem; height: .7rem; border-radius: 3px; background: var(--c, var(--tinte-2)); }
.art-urlaub { --c: var(--c-urlaub); }
.art-krank { --c: var(--c-krank); }
.art-freizeitausgleich { --c: var(--c-freizeitausgleich); }
.art-sonderurlaub { --c: var(--c-sonderurlaub); }
.art-betriebsruhe { --c: var(--c-betriebsruhe); }
.warnung { color: var(--warn); font-size: .85rem; display: block; }
.fehler-text { color: var(--minus); font-size: .85rem; display: block; }

/* ---------- Formulare ---------- */
form { margin: 0; }
.formular { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); align-items: end; }
.formular .breit { grid-column: 1 / -1; }
.feld { display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; }
.feld > span { font-weight: 600; }
.feld > small { font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time],
input[type=number], input[type=month], select, textarea {
  font: inherit; color: var(--tinte); background: var(--flaeche);
  border: 1px solid var(--linie); border-radius: var(--r);
  padding: .5rem .6rem; min-height: 2.5rem; width: 100%;
}
textarea { min-height: 4.5rem; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--akzent); outline: 2px solid color-mix(in srgb, var(--akzent) 25%, transparent); outline-offset: 0; }
.haken { display: flex; gap: .5rem; align-items: center; font-size: .9rem; }
.haken input { width: 1.1rem; height: 1.1rem; accent-color: var(--akzent); }
.haken-reihe { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.wochenraster { display: grid; grid-template-columns: repeat(7, minmax(64px, 1fr)); gap: .5rem; }
.wochenraster .feld > span { font-weight: 400; color: var(--tinte-2); }
@media (max-width: 640px) { .wochenraster { grid-template-columns: repeat(4, 1fr); } }
.ma-wahl label { display: flex; gap: .5rem; align-items: center; font-size: .9rem; }
.ma-wahl select { width: auto; min-width: 14rem; }

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
  background: var(--akzent); color: var(--flaeche); border: 1px solid var(--akzent);
  border-radius: var(--r); padding: .5rem 1rem; min-height: 2.5rem;
}
.knopf:hover { filter: brightness(1.08); }
.knopf.zweit { background: var(--flaeche); color: var(--tinte); border-color: var(--linie); }
.knopf.zweit:hover { border-color: var(--tinte-2); filter: none; }
.knopf.gefahr { background: var(--flaeche); color: var(--minus); border-color: color-mix(in srgb, var(--minus) 40%, var(--linie)); }
.knopf.klein { padding: .2rem .6rem; min-height: 2rem; font-size: .85rem; }
.knopf.gehen { background: var(--tinte); border-color: var(--tinte); }
.knopf-reihe { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* ---------- Meldungen ---------- */
.meldung { padding: .7rem 1rem; border-radius: var(--r); margin: 0 0 1rem; max-width: none; border-left: 4px solid; }
.meldung-ok { background: var(--akzent-hell); border-color: var(--akzent); }
.meldung-fehler { background: var(--b-krank); border-color: var(--minus); }
.meldung-hinweis { background: var(--warn-hell); border-color: var(--warn); }

/* ---------- Teamkalender ---------- */
.kalender { border-collapse: separate; border-spacing: 2px; font-size: .8rem; min-width: 100%; }
.kalender th { font-weight: 500; color: var(--tinte-2); padding: 0 0 .25rem; text-align: center; min-width: 26px; }
.kalender th.name { text-align: left; color: var(--tinte); font-weight: 600; padding-right: .75rem; white-space: nowrap; font-size: .9rem; position: sticky; left: 0; background: var(--flaeche); }
.kalender th.we { color: color-mix(in srgb, var(--tinte-2) 60%, transparent); }
.kalender th.heute { color: var(--akzent); font-weight: 700; }
.kalender td {
  height: 28px; text-align: center; border-radius: 4px; font-weight: 700; font-size: .75rem;
  background: var(--papier);
}
.kalender td.frei { background: transparent; }
.kalender td.ft { background: repeating-linear-gradient(135deg, var(--linie-2) 0 3px, transparent 3px 7px); color: var(--tinte-2); }
.kalender td.a-urlaub { background: var(--b-urlaub); color: var(--c-urlaub); }
.kalender td.a-krank { background: var(--b-krank); color: var(--c-krank); }
.kalender td.a-freizeitausgleich { background: var(--b-freizeitausgleich); color: var(--c-freizeitausgleich); }
.kalender td.a-sonderurlaub { background: var(--b-sonderurlaub); color: var(--c-sonderurlaub); }
.kalender td.a-betriebsruhe { background: var(--b-betriebsruhe); color: var(--c-betriebsruhe); }
.kalender td.a-abwesend { background: var(--linie); color: var(--tinte-2); }
.kalender td.offen { background: var(--flaeche); outline: 1.5px dashed currentColor; outline-offset: -2px; }
.kalender td.halb { background-image: linear-gradient(135deg, transparent 50%, var(--flaeche) 50%); }
.legende { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; font-size: .85rem; color: var(--tinte-2); margin-top: 1rem; }
.legende span { display: inline-flex; gap: .4rem; align-items: center; }
.legende i { width: 1.2rem; height: 1rem; border-radius: 3px; display: inline-block; font-style: normal; font-size: .7rem; font-weight: 700; text-align: center; line-height: 1rem; }

/* ---------- Login ---------- */
.login-kopf { margin-bottom: 1.5rem; }
.login-kopf .marke { padding: 0; margin-bottom: 1.5rem; }
.stapel { display: flex; flex-direction: column; gap: 1rem; }

/* ---------- Kleinigkeiten ---------- */
.zweispaltig { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 860px) { .zweispaltig { grid-template-columns: 1fr; } }
.liste-schlicht { list-style: none; padding: 0; margin: 0; }
.liste-schlicht li { padding: .45rem 0; border-bottom: 1px solid var(--linie-2); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.liste-schlicht li:last-child { border-bottom: 0; }
details summary { cursor: pointer; color: var(--akzent); font-weight: 600; }
details[open] summary { margin-bottom: .75rem; }
.nur-druck { display: none; }

@media print {
  .leiste, .knopf, form, .nicht-drucken { display: none !important; }
  .rahmen { display: block; }
  .inhalt { padding: 0; max-width: none; }
  .flaeche { border: 0; padding: 0; }
  .nur-druck { display: block; }
  body { background: #fff; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Zeiteinträge in der Monatsübersicht */
.eintrag { display: flex; flex-wrap: wrap; gap: .1rem .5rem; align-items: baseline; }
.eintrag + .eintrag { margin-top: .2rem; }
.eintrag form { display: inline; }
.link-knopf { background: none; border: 0; padding: 0; font: inherit; font-size: .85rem; color: var(--minus); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.mt { margin-top: .75rem; }
