/* Büro: Heute, Monat, Personen, Abwesenheiten, Hinweise – nur was css/app.css nicht schon hat. Tokens aus app.css verwenden, keine neuen Farben. */

/* ---------- Gemeinsames ---------- */
.kasten .icon { width: 18px; height: 18px; vertical-align: -3px; }
.kasten.ruhig { border-style: solid; border-color: var(--line-strong); background: var(--panel2); display: flex; flex-direction: column; gap: 6px; }
.durchgestrichen { text-decoration: line-through; text-decoration-thickness: 1.5px; color: var(--dim); }
.vermerke { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.zeiten { display: inline-flex; flex-wrap: wrap; gap: 2px 12px; align-items: center; }
.zeiten-block { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.tabelle .ampel, .zeilenkarte .ampel { white-space: nowrap; }
.karte-titel.abschnitt { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.kennzahlen.vier { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 899.98px) { .kennzahlen.vier { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.folgetag { font-size: .68em; font-weight: 600; color: var(--accent-text); margin-left: 1px; }
.tag-wt { display: inline-block; min-width: 1.7em; font-weight: 600; }
.steuerleiste { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.steuerleiste > .feld { margin-bottom: 0; flex: 1 1 200px; max-width: 320px; }
.steuerleiste > .feld.schmal { flex: 0 1 170px; }
.monatwahl, .tagwahl { display: flex; align-items: center; gap: 2px; }
.monatwahl .eingabe { flex: 1 1 auto; min-width: 0; }
.tagwahl-datum { width: auto; min-width: 0; max-width: 11.5rem; }

/* Zeilen als Karten (am Handy statt der Tabelle): ein Knopf je Zeile */
.kartenliste { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.zeilenkarte {
  display: flex; flex-direction: column; gap: 6px; width: 100%; min-height: var(--treffer); padding: 10px 12px; text-align: left;
  background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius-sm); color: inherit; font: inherit; cursor: pointer;
  transition: border-color .2s;
}
.zeilenkarte:hover { border-color: rgba(var(--accent-rgb), .55); }
.zeilenkarte-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.zeilenkarte-werte { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: .86rem; }
.zeilenkarte-werte .icon { width: 14px; height: 14px; vertical-align: -2px; }
.zeilenkarte-fuss { display: flex; flex-wrap: wrap; gap: 4px; }
.zeilenkarte.ist-frei { background: transparent; border-style: dashed; padding-top: 6px; padding-bottom: 6px; min-height: 44px; }
.zeilenkarte.ist-zukunft { opacity: .75; }
.zeilenkarte.ist-heute { border-color: var(--accent-line); box-shadow: 0 0 0 1px var(--accent-line) inset; }
.wochensumme-karte { display: flex; flex-wrap: wrap; gap: 2px 14px; align-items: baseline; padding: 6px 12px 10px; font-size: .84rem; border-bottom: 1px solid var(--line-strong); margin-bottom: 4px; }

/* ---------- Heute ---------- */
.achtung-eintrag { flex-wrap: wrap; }
.achtung-eintrag .liste-haupt { flex: 1 1 220px; }
.heute-tabelle .ampel + .gedimmt { margin-left: 4px; }
.heute-tabelle .tabelle th, .heute-tabelle .tabelle td { padding-left: 10px; padding-right: 10px; }
.heute-tabelle .tabelle th { letter-spacing: .1em; }

/* ---------- Monat ---------- */
.monatstabelle .tabelle td { vertical-align: middle; }
.monatstabelle .tabelle.kompakt td, .monatstabelle .tabelle.kompakt th { padding: 7px 8px; }
.monatstabelle .tabelle th { letter-spacing: .08em; }
.monatstabelle tr.ist-frei td { background: var(--panel2); color: var(--dim); }
.monatstabelle tr.ist-zukunft td { color: var(--dim); }
.monatstabelle tr.wochensumme td { background: var(--panel3); font-weight: 600; border-bottom: 2px solid var(--line-strong); }
.monatstabelle tr.wochensumme:hover td { background: var(--panel3); }
/* Die ganze Zeile öffnet den Tag; der Pfeil ist nur das Zeichen dafür – seine Trefferfläche reicht bis an den Zeilenrand */
.monatstabelle .symbolknopf.klein { width: 32px; height: 32px; }
.monatstabelle .symbolknopf.klein::after { inset: -7px -8px; }
.monat-unten { align-items: start; }
@media (max-width: 1100px) { .monat-unten { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Tagesansicht (Dialog) ---------- */
.tagdetail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.tag-leiste { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tag-leiste-luecke { flex: 1 1 auto; }
.tag-zahlen .kennzahl { padding: 10px 14px; }
.tag-zahlen .kennzahl-wert { font-size: 1.4rem; }
.tag-abschnitt { border-top: 1px solid var(--line); padding-top: 14px; min-width: 0; }
.tag-abschnitt .karte-kopf { margin-bottom: 8px; }
.tag-zeiten { margin: 0 0 8px; font-weight: 600; }
.buchungen { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.buchung { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.buchung:last-child { border-bottom: 0; }
.buchung-symbol { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--panel2); border: 1px solid var(--line); color: var(--accent-text); }
.buchung-symbol .icon { width: 18px; height: 18px; }
.buchung-haupt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.buchung-titel { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.buchung-titel strong { margin-right: 4px; font-variant-numeric: tabular-nums; }
.buchung-aktionen { flex: 0 0 auto; display: flex; gap: 8px; }   /* Korrigieren und Stornieren: je 44 px, mit Abstand – kein Fehlgriff */
.buchung.ist-storniert .buchung-symbol { color: var(--dim); }
.kette { list-style: none; margin: 4px 0 0; padding: 6px 10px; border-left: 3px solid var(--line-strong); background: var(--panel2); border-radius: 0 var(--radius-xs) var(--radius-xs) 0; font-size: .84rem; display: flex; flex-direction: column; gap: 4px; }
.kette .icon { width: 13px; height: 13px; vertical-align: -1px; color: var(--dim); }

/* ---------- Hinweise ---------- */
.hinweisliste { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.hinweis { padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); border-left: 4px solid var(--info); background: var(--panel2); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hinweis-warnung { border-left-color: var(--warn); }
.hinweis-rot { border-left-color: var(--danger); }
.hinweis.ist-gesehen { border-left-color: var(--line-strong); }
.hinweis.ist-gesehen .hinweis-text { color: var(--dim); }
.hinweis-kopf { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.hinweis-datum { color: var(--dim); font-size: .84rem; }
.hinweis-text { margin: 0; font-weight: 600; }
.hinweis-werte { display: flex; flex-wrap: wrap; gap: 2px 16px; align-items: center; font-size: .82rem; }
.hinweis-gesehen { margin: 0; }
.hinweis-gesehen .icon { width: 14px; height: 14px; vertical-align: -2px; }
.hinweis-aktionen { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.grund { color: var(--ink); }

@media (max-width: 699.98px) {
  .steuerleiste > .feld { max-width: none; flex-basis: 100%; }
  .tagwahl { flex: 1 1 100%; }
  .tagwahl-datum { flex: 1 1 auto; max-width: none; }
  .buchung { flex-wrap: wrap; }
  .buchung-haupt { flex-basis: calc(100% - 50px); }
  .buchung-aktionen { margin-left: 44px; }
  .tag-zahlen { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .tag-zahlen .kennzahl { padding: 8px 10px; }
  .tag-zahlen .kennzahl-wert { font-size: 1.15rem; }
  .tag-zahlen .kennzahl-label { letter-spacing: .04em; font-size: .66rem; }
}

/* ---------- Hinweise (Ansicht) ---------- */
.hinweisgruppe + .hinweisgruppe { margin-top: 18px; }
.hinweisgruppe-titel { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.steuerleiste > .feld:has(> .haken) { flex: 0 1 auto; }

/* ---------- Personen ---------- */
.personenliste .liste-eintrag { padding: 0; }
.personzeile { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0; padding: 12px 4px; color: inherit; text-decoration: none; border-radius: var(--radius-xs); }
.personzeile:hover { text-decoration: none; background: rgba(var(--accent-rgb), .05); }
.personzeile > .icon { width: 18px; height: 18px; color: var(--dim); }
.personzeile-marken { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.person-kopf { display: flex; align-items: center; gap: 12px; }
.eyebrow a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; }
.eyebrow a .icon { width: 14px; height: 14px; }
.paare .block { display: block; }
.personkarten { align-items: start; }
.modellzeile.ist-aktuell .liste-titel { color: var(--ink); }
fieldset.gruppe.nur-lokal { border-style: dashed; border-color: var(--line-strong); background: var(--panel2); }
fieldset.gruppe.nur-lokal > legend { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-text); }
fieldset.gruppe.nur-lokal > legend .icon { width: 14px; height: 14px; }
fieldset.gruppe > .feld:last-child, fieldset.gruppe > .raster-2:last-child { margin-bottom: 10px; }
.schnell { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-bottom: 14px; }
.schnell > .feld { flex: 1 1 220px; margin-bottom: 0; }
.schnell > .knopf { margin-bottom: 0; }
.schnell > .feld:has(.hilfe) ~ .knopf, .schnell > .feld.hat-fehler ~ .knopf { align-self: flex-start; margin-top: 23px; }
.wochentage, .plantage { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.wochentage .feld, .plantage .feld { margin-bottom: 8px; }
.wochentage .eingabe { padding-left: 8px; padding-right: 8px; text-align: center; }
.plantage { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.aufklappen { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 16px; margin: 0 0 14px; }
.aufklappen > summary { min-height: var(--treffer); display: flex; align-items: center; cursor: pointer; font-weight: 600; font-size: .9rem; }
.aufklappen[open] { padding-bottom: 8px; }
/* Weitere Zeitarten im Arbeitszeitmodell: je Zeitart „beim Stempeln wählbar“ und „zählt als Arbeitszeit“ */
.zeitarten-liste { display: grid; gap: 2px; margin-bottom: 8px; }
.zeitart-zeile { display: grid; grid-template-columns: minmax(9em, 1.2fr) repeat(2, minmax(0, 1fr)); gap: 0 14px; align-items: center; border-bottom: 1px solid var(--line); }
.zeitart-zeile:last-child { border-bottom: 0; }
.zeitart-zeile > .feld { margin-bottom: 0; }
.zeitart-name { font-size: .92rem; }

/* ---------- Abwesenheiten ---------- */
.abw-rahmen { overflow: auto; max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); -webkit-overflow-scrolling: touch; }
.abw-matrix { display: grid; grid-template-columns: minmax(118px, 170px) repeat(var(--abw-tage, 31), minmax(25px, 1fr)); min-width: calc(118px + var(--abw-tage, 31) * 25px); }
.abw-kopf { position: sticky; top: 0; z-index: 2; background: var(--panel); border-bottom: 1px solid var(--line); padding: 6px 0; text-align: center; font-size: .62rem; text-transform: uppercase; letter-spacing: .04em; color: var(--dim); font-weight: 600; display: flex; flex-direction: column; line-height: 1.25; }
.abw-kopf strong { font-size: .82rem; color: var(--ink); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.abw-kopf.ist-frei { background: var(--panel2); }
.abw-kopf.ist-heute { box-shadow: 0 -3px 0 var(--accent-line) inset; }
.abw-kopf.ist-heute strong { color: var(--accent-text); }
.abw-ecke { position: sticky; left: 0; z-index: 3; text-align: left; padding-left: 12px; justify-content: center; border-right: 1px solid var(--line); }
.abw-name { position: sticky; left: 0; z-index: 1; background: var(--panel); display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-weight: 600; min-width: 0; }
/* Zelle im Raster: schmal, aber 44 px hoch und ganz tippbar – der Tipp öffnet den Dialog, gebucht wird dort */
.abw-zelle { min-height: 44px; padding: 0; border: 0; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.abw-zelle:hover { background: rgba(var(--accent-rgb), .12); }
.abw-zelle:focus-visible { outline-offset: -2px; }
.abw-zelle.ist-heute { box-shadow: 0 0 0 1px var(--accent-line) inset; }
.abw-frei { background: var(--panel2); }
.abw-urlaub { background: rgba(var(--info-rgb), .22); color: var(--info); }
.abw-krank { background: rgba(var(--warn-rgb), .22); color: var(--warn); }
.abw-sonst { background: rgba(var(--neutral-rgb), .26); color: var(--ink); }
.abw-zelle.abw-urlaub:hover, .abw-zelle.abw-krank:hover, .abw-zelle.abw-sonst:hover { filter: brightness(1.15); }
.abw-legende { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; color: var(--dim); }
.abw-legende > span { display: inline-flex; align-items: center; gap: 6px; }
.abw-muster { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 6px; font-size: .74rem; font-weight: 700; border: 1px solid var(--line-strong); flex: 0 0 auto; }
.abw-muster.abw-halb { color: var(--dim); }
.abw-eintrag { flex-wrap: wrap; }
.abw-eintrag .liste-haupt { flex: 1 1 180px; }
.jahr-zahl { min-width: 3.2em; text-align: center; font-size: 1.05rem; }
.jahr-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 12px; }
.minimonat { border: 1px solid var(--line); border-radius: var(--radius-xs); padding: 8px; background: var(--panel2); min-width: 0; }
.minimonat-titel { font-size: .8rem; font-weight: 600; margin-bottom: 4px; }
.minimonat-titel a { color: inherit; display: flex; align-items: center; min-height: 44px; margin: -6px 0 -4px; }   /* Monatsname als Link: 44 px Tippfläche */
.minimonat-tage { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.mini-wt { font-size: .58rem; text-align: center; color: var(--dim); font-weight: 600; }
.mini-tag { aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; font-size: .66rem; font-variant-numeric: tabular-nums; border-radius: 5px; border: 0; padding: 0; font-family: inherit; color: var(--ink); background: var(--panel); min-width: 0; }
button.mini-tag { cursor: pointer; font-weight: 700; }
button.mini-tag:hover { filter: brightness(1.2); }
.mini-tag.ist-leer { background: transparent; }
.mini-tag.abw-frei { background: transparent; color: var(--dim); }
.mini-tag.ist-heute { box-shadow: 0 0 0 1px var(--accent-line) inset; }
.mini-tag.abw-urlaub { background: rgba(var(--info-rgb), .22); color: var(--info); }
.mini-tag.abw-krank { background: rgba(var(--warn-rgb), .22); color: var(--warn); }
.mini-tag.abw-sonst { background: rgba(var(--neutral-rgb), .26); }
.blatt-tabelle.aushang th, .blatt-tabelle.aushang td { padding: 4px 2px; text-align: center; border: 1px solid var(--paper-line); }
.blatt-tabelle.aushang th:first-child, .blatt-tabelle.aushang td:first-child { text-align: left; padding-left: 6px; white-space: nowrap; }
.blatt-tabelle.aushang .aushang-frei { background: var(--paper-head); -webkit-print-color-adjust: exact; print-color-adjust: exact; }

@media (max-width: 699.98px) {
  .wochentage { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .personzeile { flex-wrap: wrap; }
  .personzeile .liste-haupt { flex: 1 1 60%; }
  .personzeile-marken { flex: 1 1 100%; justify-content: flex-start; padding-left: 52px; }
  .personzeile > .icon { display: none; }
  .schnell > .knopf { flex: 1 1 auto; }
  .schnell > .knopf.still { padding-left: 10px; padding-right: 10px; }
  .jahr-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .minimonat { padding: 6px; }
  .ansicht-kopf .aktionen > .knopf { flex: 1 1 auto; }
  .schnell > .feld:has(.hilfe) ~ .knopf, .schnell > .feld.hat-fehler ~ .knopf { margin-top: 0; }
  .pausen-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zeitart-zeile { grid-template-columns: minmax(0, 1fr); padding: 8px 0 2px; }
  /* Tippfläche mindestens 44 × 44 px: Die Tage der Abwesenheiten werden breiter, das Raster wischt dafür im eigenen Rahmen */
  .abw-matrix { grid-template-columns: minmax(104px, 140px) repeat(var(--abw-tage, 31), minmax(44px, 1fr)); min-width: calc(104px + var(--abw-tage, 31) * 44px); }
}
