/* Zeiterfassung Story-ID – Gestaltung nach Story-ID-CD (5.12.2026)
   Navy #001E38 Schrift · Story-Blau #3040FF Marke und Handlung · Lachs #FFA696 feine Linien
   Schrift Theinhardt Light/Medium · Dunkelmodus folgt der Systemeinstellung */

@font-face { font-family: "Theinhardt"; src: url("schrift/theinhardt-light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Theinhardt"; src: url("schrift/theinhardt-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  color-scheme: light dark;
  --papier: light-dark(#ffffff, #001528);
  --grund:  light-dark(#f4f5f8, #000f1e);
  --flaeche: light-dark(#f8f9fb, #021b31);
  --tinte:  light-dark(#001e38, #eef1f6);
  --grau:   light-dark(#5a6b7c, #9fb0c2);
  --akzent: light-dark(#3040ff, #8d96ff);
  --akzent-hell: light-dark(#eceeff, #16205a);
  --lachs:  light-dark(#ffa696, #ff9d8b);
  --rand:   light-dark(#dfe3ea, #1d3550);
  --gruen:  light-dark(#1f7a4d, #5fd39a);
  --gelb:   light-dark(#a66300, #f0b35a);
  --rot:    light-dark(#c4321f, #ff8a78);
  --logo:   light-dark(#3040ff, #ffffff);
  --r: 6px;
  --schrift: "Theinhardt", "Inter Tight", system-ui, sans-serif;
}
* { box-sizing: border-box; min-width: 0; }
body { font: 300 16px/1.5 var(--schrift); margin: 0; color: var(--tinte); background: var(--grund); overflow-x: clip; }
b, strong, h1, h2, h3, th { font-weight: 500; }
a { color: var(--akzent); }
::selection { background: var(--akzent-hell); }

/* Kopf */
header { position: sticky; top: 0; z-index: 50; background: light-dark(rgb(255 255 255 / .92), rgb(0 21 40 / .92)); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--rand); padding: 0 max(4vw, 16px); display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; min-height: 64px; }
header h1 { margin: 0; font-size: 15px; font-weight: 300; }
header h1 a { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--grau); }
header h1 img, header h1 svg { height: 22px; width: auto; display: block; }
header h1 .titel { padding-left: 14px; border-left: 1px solid var(--lachs); line-height: 22px; }
header nav { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; }
header nav a { color: var(--tinte); text-decoration: none; font-size: 15px; padding: 21px 14px 19px; border-bottom: 2px solid transparent; }
header nav a:hover { color: var(--akzent); }
header nav a.aktiv { font-weight: 500; border-bottom-color: var(--akzent); }
header button { font: 300 14px var(--schrift); background: none; border: 1px solid var(--rand); color: var(--grau); padding: 0 12px; min-height: 36px; border-radius: var(--r); cursor: pointer; margin-left: 10px; }
header button:hover { color: var(--tinte); border-color: var(--tinte); }
@media (prefers-color-scheme: dark) { header h1 img { filter: brightness(0) invert(1); } }

/* Seite und Blätter */
html { scroll-padding-top: 80px; }
main { max-width: 1120px; margin: 0 auto; padding: 28px max(4vw, 16px) 64px; }
section { background: var(--papier); border: 1px solid var(--rand); border-radius: var(--r); padding: 24px; margin-bottom: 24px; }
h2 { font-size: 20px; line-height: 1.3; margin: 0 0 16px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
h2 .klein, h2 small { font-size: 14px; font-weight: 300; }

/* Formulare */
.raster { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px 16px; }
.raster label { display: flex; flex-direction: column; font-size: 14px; color: var(--grau); gap: 6px; }
.s2 { grid-column: span 2; } .s3 { grid-column: span 3; } .s6 { grid-column: span 6; }
input, select, textarea { font: 300 16px/1.4 var(--schrift); padding: 10px 12px; min-height: 44px; border: 1px solid var(--rand); border-radius: var(--r); background: var(--papier); color: var(--tinte); width: 100%; }
input:hover, select:hover, textarea:hover { border-color: var(--grau); }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; border-color: var(--akzent); }
input.fehler, select.fehler { border-color: var(--rot); background: light-dark(#fff5f3, #2a1010); }
input:disabled, select:disabled { background: var(--flaeche); color: var(--grau); }
input[type=checkbox] { accent-color: var(--akzent); width: 18px; height: 18px; min-height: 0; }
.check { flex-direction: row !important; align-items: center; gap: 8px !important; font-size: 15px !important; color: var(--tinte) !important; align-self: end; min-height: 44px; }
.check input { width: 18px; }

/* Knöpfe */
.knoepfe { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; align-items: center; }
button.haupt, button.timer, button.neben { font: 500 15px/1 var(--schrift); min-height: 44px; padding: 0 18px; border-radius: var(--r); cursor: pointer; border: 1px solid transparent; }
button.haupt { background: var(--akzent); color: #fff; }
button.haupt:hover { filter: brightness(1.12); }
button.timer { background: var(--papier); color: var(--tinte); border-color: var(--tinte); }
button.timer::before { content: ""; display: inline-block; width: 0; height: 0; border-left: 8px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; margin-right: 8px; vertical-align: 1px; }
button.timer:hover { background: var(--tinte); color: var(--papier); }
button.timer.stopp { background: var(--lachs); color: #001e38; border-color: var(--lachs); }
button.timer.stopp::before { border: 0; width: 9px; height: 9px; background: currentColor; }
button.neben { background: var(--papier); color: var(--tinte); border-color: var(--rand); }
button.neben:hover { border-color: var(--tinte); }
.meldung { font-size: 15px; }
.meldung.fehler { color: var(--rot); } .meldung.ok { color: var(--gruen); }

/* Laufender Timer: das Navy-Band */
.laeuft { display: none; background: var(--tinte); color: var(--papier); border-radius: var(--r); padding: 20px 24px; margin-bottom: 24px; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.laeuft.an { display: flex; }
.laeuft .klein { color: inherit; opacity: .75; }
.laeuft .klein::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--lachs); margin-right: 8px; animation: puls 2s infinite; }
.laeuft .uhr { font: 300 clamp(34px, 6vw, 52px)/1 var(--schrift); font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin-left: auto; }
@keyframes puls { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .laeuft .klein::before { animation: none; } }

/* Listen nach Tag bzw. Kunde */
.tag { margin-top: 24px; }
.tag:first-child { margin-top: 0; }
.tag h3 { font-size: 15px; margin: 0; display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--lachs); padding-bottom: 6px; }
.tag h3 span + span { font-weight: 300; color: var(--grau); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
td { padding: 11px 10px; border-bottom: 1px solid var(--rand); vertical-align: baseline; }
td:first-child { padding-left: 0; } td:last-child { padding-right: 0; }
td.zeit { white-space: nowrap; width: 8.5rem; color: var(--grau); font-variant-numeric: tabular-nums; }
td.dauer { white-space: nowrap; text-align: right; width: 5rem; font-weight: 500; font-variant-numeric: tabular-nums; }
td.akt { white-space: nowrap; width: 7rem; text-align: right; }
td.akt button { background: none; border: none; cursor: pointer; color: var(--akzent); padding: 4px 8px; font: inherit; border-radius: var(--r); }
td.akt button:hover { background: var(--akzent-hell); }
td.akt button.weg { color: var(--rot); }
tr:hover td { background: var(--flaeche); }
.klein { color: var(--grau); font-size: 13px; }
td .klein { margin-top: 2px; }

/* Anmelden */
.login { max-width: 400px; margin: 10vh auto; }
.login h2 { font-size: 28px; font-weight: 300; }
.versteckt { display: none !important; }

/* Seite Projekte */
h3.zwischen { font-size: 15px; margin: 28px 0 12px; border-bottom: 1px solid var(--lachs); padding-bottom: 6px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
h3.zwischen .klein { font-weight: 300; }
.knoepfe.oben { margin-top: 0; margin-bottom: 16px; }
.unten { display: flex; align-items: flex-end; }
button.klein-knopf { min-height: 36px; padding: 0 12px; font-size: 14px; margin-top: 10px; }
table.zeilen th { text-align: left; font-weight: 300; font-size: 13px; color: var(--grau); padding: 0 8px 6px 0; }
table.zeilen td { border-bottom: none; padding: 4px 8px 4px 0; }
table.zeilen tr:hover td { background: none; }
.pos { border: 1px solid var(--rand); border-radius: var(--r); padding: 16px; margin-bottom: 12px; position: relative; background: var(--flaeche); }
.posWerkzeug { position: absolute; top: 8px; right: 10px; display: flex; gap: 4px; }
.posWerkzeug button { background: none; border: none; cursor: pointer; color: var(--akzent); font: inherit; font-size: 14px; padding: 4px 8px; border-radius: var(--r); }
.posWerkzeug button:hover { background: var(--akzent-hell); }
.posWerkzeug button.weg { color: var(--rot); }
.pos .raster { margin-top: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.chip { font-size: 14px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--rand); border-radius: 999px; padding: 4px 12px; background: var(--papier); cursor: pointer; }
.chip:has(input:checked) { background: var(--akzent-hell); border-color: var(--akzent); }
.chip input { width: 16px; height: 16px; margin: 0; }

/* Bausteine für Dashboard und neue Seiten */
.zahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); background: var(--papier); border: 1px solid var(--rand); border-radius: var(--r); margin-bottom: 24px; overflow: hidden; }
.zahl { padding: 18px 22px; box-shadow: -1px 0 0 var(--rand), 0 -1px 0 var(--rand); }
.zahl > span { font-size: 14px; color: var(--grau); }
.zahl b { display: block; font-size: 32px; line-height: 1.15; font-weight: 300; font-variant-numeric: tabular-nums; white-space: nowrap; }
.zahl small { font-size: 13px; color: var(--grau); }
.balken { height: 8px; background: var(--grund); border-radius: 4px; overflow: hidden; min-width: 80px; }
.balken i { display: block; height: 100%; border-radius: 4px; background: var(--gruen); }
.balken i.gelb { background: var(--gelb); } .balken i.rot { background: var(--rot); }
.ampel { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; background: var(--gruen); }
.ampel.gelb { background: var(--gelb); } .ampel.rot { background: var(--rot); }

/* Schnelles Erfassen (5.12.2026, Klassen aus dem Formular-Thread) */
.s5 { grid-column: span 5; }
.raster.zeile { margin-top: 14px; }
.fortsetzen { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 20px; }
.fortsetzen:last-child { margin-bottom: 0; }
button.weiter { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; font: 300 15px/1.35 var(--schrift); color: var(--tinte); background: var(--flaeche); border: 1px solid var(--rand); border-left: 3px solid var(--akzent); border-radius: var(--r); padding: 10px 14px; min-height: 56px; cursor: pointer; width: 100%; }
button.weiter:hover { border-color: var(--akzent); background: var(--akzent-hell); }
button.weiter span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.weiter .titel { font-weight: 500; }
button.link { background: none; border: none; color: var(--akzent); font: 300 15px var(--schrift); padding: 0 6px; min-height: 44px; cursor: pointer; text-decoration: underline; text-decoration-color: var(--lachs); text-underline-offset: 4px; }
button.link:hover { text-decoration-color: currentColor; }
.hinweis { font-size: 13px; color: var(--grau); margin: 12px 0 0; }

/* Übersicht / Startseite (5.12.2026) */
h1.gruss { font-size: 34px; line-height: 1.1; font-weight: 300; margin: 0 0 4px; text-wrap: balance; }
p.datum { margin: 0 0 24px; color: var(--grau); }
section.satz .satzzeile { display: flex; gap: 10px; flex-wrap: wrap; }
section.satz input { flex: 1 1 320px; font-size: 19px; padding: 14px 16px; min-height: 52px; }
section.satz button.haupt { min-height: 52px; }
section.satz button:disabled { opacity: .45; cursor: not-allowed; filter: none; }
table.projtab th, table.auswertung th { text-align: left; font-size: 13px; color: var(--grau); font-weight: 300; padding: 0 10px 8px; border-bottom: 1px solid var(--lachs); }
table.projtab th:first-child, table.auswertung th:first-child { padding-left: 0; } table.projtab th:last-child, table.auswertung th:last-child { padding-right: 0; }
table.projtab td, table.auswertung td { vertical-align: middle; }
table.auswertung { margin-bottom: 8px; }
table.auswertung tr:hover td { background: none; }
table.projtab tbody tr { cursor: pointer; }
table.projtab tbody tr:hover td { background: var(--akzent-hell); }
th.n, td.n, table.projtab th.n, table.auswertung th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.nr { color: var(--grau); font-variant-numeric: tabular-nums; white-space: nowrap; width: 5.5rem; }
td.bud { width: 30%; }
div.erkannt { margin-top: 14px; }
div.erkannt .chips { margin-top: 0; }
div.erkannt span.chip { cursor: default; background: var(--akzent-hell); border-color: transparent; gap: 6px; align-items: baseline; }
div.erkannt span.chip i { font-style: normal; font-size: 12px; color: var(--grau); }
.heute tr.luecke td { background: repeating-linear-gradient(135deg, transparent 0 6px, light-dark(#fff1ee, #2a1a1a) 6px 7px); color: var(--grau); border-bottom-color: var(--rand); padding-top: 6px; padding-bottom: 6px; }
.heute tr.luecke td.akt a, .heute tr.luecke td.akt button { color: var(--akzent); font-size: 14px; }

/* Kacheln als Links, Auswertungsseite (5.12.2026) */
a.zahl { display: block; color: inherit; text-decoration: none; transition: background .15s; }
a.zahl:hover { background: var(--akzent-hell); }
a.zahl:hover b { color: var(--akzent); }
a.zahl:focus-visible { outline: 2px solid var(--akzent); outline-offset: -2px; }
nav.ansichten { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin: 0 0 24px; background: var(--papier); border: 1px solid var(--rand); border-radius: calc(var(--r) + 4px); }
nav.ansichten a { color: var(--tinte); text-decoration: none; padding: 10px 16px; border-radius: var(--r); font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; }
nav.ansichten a:hover { background: var(--flaeche); }
nav.ansichten a.aktiv { background: var(--tinte); color: var(--papier); font-weight: 500; }
h2 span.klein button.link { font-size: 14px; min-height: 36px; text-decoration: none; }
table.auswertung { overflow-x: auto; }
section:has(> table.auswertung) { overflow-x: auto; }
table.auswertung tr.summe td { font-weight: 500; border-top: 1px solid var(--tinte); border-bottom: 0; }
td.verrechnen { white-space: nowrap; }
td.verrechnen > * { vertical-align: middle; }
td.verrechnen input { display: inline-block; width: 9em; min-height: 36px; padding: 6px 10px; font-size: 15px; margin-right: 6px; }
td.verrechnen.re input { width: 9em; margin-right: 0; }
td.verrechnen.bis input { width: 7.5em; margin-right: 0; }
td.verrechnen.knopf { text-align: right; }
td.verrechnen button.neben { min-height: 36px; padding: 0 12px; font-size: 14px; }

/* Frag Claude (5.12.2026) */
button.frage-knopf { position: fixed; right: 20px; bottom: 20px; z-index: 60; font: 500 15px/1 var(--schrift); min-height: 48px; padding: 0 20px; border-radius: 999px; border: 0; background: var(--tinte); color: var(--papier); cursor: pointer; box-shadow: 0 6px 20px rgb(0 30 56 / .25); }
button.frage-knopf::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--lachs); margin-right: 10px; vertical-align: 1px; }
button.frage-knopf:hover { background: var(--akzent); }
div.frage-panel { position: fixed; right: 20px; bottom: 20px; z-index: 70; width: 26rem; max-width: calc(100vw - 40px); max-height: 70vh; display: flex; flex-direction: column; background: var(--papier); border: 1px solid var(--rand); border-radius: calc(var(--r) + 4px); box-shadow: 0 16px 48px rgb(0 30 56 / .22); overflow: hidden; }
.frage-kopf { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 6px 18px; border-bottom: 1px solid var(--lachs); }
.frage-kopf b { font-size: 16px; }
.frage-kopf button.link { text-decoration: none; font-size: 14px; }
.frage-verlauf { flex: 1 1 auto; overflow-y: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; min-height: 80px; }
.frage-verlauf p { margin: 0; font-size: 15px; line-height: 1.45; max-width: 92%; }
p.frage-f { align-self: flex-end; background: var(--akzent-hell); padding: 8px 12px; border-radius: 12px 12px 2px 12px; }
p.frage-a { align-self: flex-start; white-space: pre-line; padding: 8px 0; }
p.frage-a.fehler { color: var(--rot); }
p.frage-a.klein { color: var(--grau); font-size: 14px; }
div.frage-panel .satzzeile { display: flex; gap: 8px; padding: 12px 18px 0; border-top: 1px solid var(--rand); }
div.frage-panel .satzzeile input { flex: 1 1 auto; }
div.frage-panel p.hinweis { padding: 0 18px 12px; margin-top: 6px; }
div.frage-panel p.hinweis button.link { min-height: 0; padding: 0; font-size: 13px; }
main { padding-bottom: 96px; }

/* Timer zu lang, gesperrte Einträge (5.12.2026) */
.laeuft.lang { box-shadow: inset 0 0 0 3px var(--lachs); }
.laeuft .lang-hinweis { color: var(--lachs); opacity: 1; font-size: 14px; margin-top: 4px; }
.laeuft .lang-hinweis::before { display: none; }
span.gesperrt { display: inline-flex; align-items: center; gap: 6px; color: var(--grau); font-size: 13px; white-space: nowrap; }
span.gesperrt::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gruen); }

/* Rapport: Bildschirm und Druck, angelehnt an die Story-ID-Offerte */
body.rapport { background: var(--grund); }
body.rapport main { max-width: 820px; background: var(--papier); margin: 24px auto; padding: 40px 48px 48px; border: 1px solid var(--rand); border-radius: var(--r); }
body.rapport .knoepfe.nicht-drucken { margin: 0 0 32px; padding-bottom: 20px; border-bottom: 1px solid var(--rand); }
body.rapport .knoepfe.nicht-drucken a { font-size: 15px; }
.rapport-kopf { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; margin-bottom: 48px; }
.rapport-kopf img { height: 30px; width: auto; }
.rapport-kopf .klein { font-weight: 500; color: var(--tinte); font-size: 12px; }
body.rapport h1#titel { font-size: 22px; font-weight: 500; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--lachs); }
body.rapport h2 { font-size: 16px; margin: 32px 0 8px; }
table.rapport-daten { width: auto; margin-bottom: 28px; font-size: 14px; }
table.rapport-daten th { text-align: left; font-weight: 300; color: var(--grau); padding: 3px 24px 3px 0; }
table.rapport-daten td { border: 0; padding: 3px 0; }
table.rapport-liste, table.rapport-summe { font-size: 13.5px; }
table.rapport-liste td, table.rapport-summe td { padding: 8px 10px; }
table.rapport-liste td:first-child { white-space: nowrap; color: var(--grau); }
table.rapport-summe { width: 60%; min-width: 320px; }
body.rapport p#stand { margin-top: 32px; }

@page { size: A4; margin: 18mm 16mm 20mm; }
@media print {
  :root { color-scheme: light; }
  html, body, body.rapport { background: #fff !important; color: #001e38; }
  body { font-size: 10.5pt; }
  header, nav, .nicht-drucken, button.frage-knopf, div.frage-panel { display: none !important; }
  body.rapport main { max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; }
  .rapport-kopf img { filter: none !important; }
  table { page-break-inside: auto; }
  thead { display: table-header-group; }
  tr, td, th { break-inside: avoid; page-break-inside: avoid; }
  tr:hover td { background: none !important; }
  h1, h2 { break-after: avoid; page-break-after: avoid; }
  table.rapport-summe { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  .klein { color: #5a6b7c; }
}

/* Schmale Bildschirme */
@media (max-width: 700px) {
  header { padding-top: 10px; }
  header nav a { padding: 12px 10px 10px; }
  section { padding: 18px 16px; }
  .raster { grid-template-columns: 1fr 1fr; }
  .s2, .s3, .s5, .s6 { grid-column: span 2; }
  td.zeit { width: auto; display: block; padding-bottom: 0; border: 0; }
  tr { display: grid; grid-template-columns: 1fr auto; }
  tr td.zeit { grid-column: 1 / -1; }
  td.akt { grid-column: 1 / -1; text-align: left; width: auto; padding-top: 0; }
  td.akt button:first-child { padding-left: 0; }
  table.zeilen tr { display: table-row; }
  .laeuft .uhr { margin-left: 0; }
  h1.gruss { font-size: 28px; }
  body.rapport main { margin: 0; padding: 20px 16px; border: 0; border-radius: 0; }
  table.rapport-summe { width: 100%; min-width: 0; }
  table.rapport-liste tr, table.rapport-summe tr { display: table-row; }
  table.rapport-liste td:first-child { display: table-cell; }
  div.frage-panel { right: 0; left: 0; bottom: 0; width: auto; max-width: none; max-height: 80vh; border-radius: 12px 12px 0 0; }
  button.frage-knopf { right: 12px; bottom: 12px; }
  td.verrechnen { white-space: normal; }
  td.verrechnen input { margin-bottom: 6px; }
  nav.ansichten { display: flex; }
  nav.ansichten a { flex: 1 1 auto; justify-content: center; }
  table.projtab td.bud, table.projtab th.bud, table.auswertung td.bud, table.auswertung th.bud { display: none; }
  table.projtab tr, table.auswertung tr { display: table-row; }
  table.auswertung td.zeit { display: table-cell; width: auto; border-bottom: 1px solid var(--rand); padding-bottom: 11px; }
}
