/* =========================================================================
   Timekeeper – Ergaenzungen zum MSI-Design-System.
   Nutzt dieselben Tokens (--msi-*), damit Hell/Dunkel automatisch mitlaufen.
   ========================================================================= */

/* Grundregel: Innenabstaende zaehlen zur Breite. Ohne diesen Reset addiert der
   Browser Padding auf die 100%-Breite – Karteninhalte laufen dann rechts heraus
   und werden abgeschnitten (msi.css setzt das nicht selbst, es erbt den Reset
   sonst von Bootstrap). */
*, *::before, *::after { box-sizing: border-box; }

/* Feldtypen, die das Design-System nicht erfasst (es kennt nur text/date/email/
   number/password). Ohne diese Zeilen bleiben Uhrzeit-, Such- und Dateifelder
   in der Browser-Rohform stehen und sehen fremd aus. */
.msi-scope input[type=time], .msi-scope input[type=search],
.msi-scope input[type=tel], .msi-scope input[type=url],
.msi-scope input[type=month], .msi-scope input[type=week],
.msi-scope input[type=datetime-local], .msi-scope input[type=color] {
  min-height: 46px; font-size: 16px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--msi-line); background: var(--msi-surface); color: var(--msi-ink);
}
.msi-scope input[type=color] { padding: 4px; min-width: 64px; }
.msi-scope input[type=file] { font-size: 14px; color: var(--msi-ink-soft); }
.msi-scope input[type=time]:focus, .msi-scope input[type=search]:focus,
.msi-scope input[type=tel]:focus, .msi-scope input[type=url]:focus,
.msi-scope input[type=datetime-local]:focus {
  outline: none; border-color: var(--msi-brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--msi-brand) 18%, transparent);
}

html, body { max-width: 100%; overflow-x: hidden; }
img, svg { max-width: 100%; height: auto; }

.tk-plus { color: var(--msi-good); font-weight: 700; }
.tk-minus { color: var(--msi-bad); font-weight: 700; }
.tk-num { font-variant-numeric: tabular-nums; }

/* Kopfzeile jeder Seite */
.tk-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px;
  flex-wrap:wrap; margin:6px 2px 4px; }
.tk-head__sub { color:var(--msi-ink-soft); font-size:13.5px; margin:4px 0 0; }
.tk-actions { display:flex; gap:8px; flex-wrap:wrap; }

/* Stempeluhr */
.tk-clock { background:var(--msi-navy); color:#fff; border-radius:var(--msi-radius-lg);
  padding:22px 20px; box-shadow:var(--msi-shadow); }
.tk-clock__k { font-size:11px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; opacity:.75; }
.tk-clock__time { font-size:46px; font-weight:800; line-height:1; margin:8px 0 4px;
  font-variant-numeric:tabular-nums; }
.tk-clock__meta { font-size:13px; opacity:.85; }
.tk-clock__btns { display:flex; gap:10px; margin-top:16px; flex-wrap:wrap; }
.tk-clock__btn { flex:1; min-width:120px; border:0; border-radius:12px; padding:14px 12px;
  font-size:15px; font-weight:700; cursor:pointer; background:rgba(255,255,255,.14); color:#fff; }
.tk-clock__btn:hover { background:rgba(255,255,255,.24); }
.tk-clock__btn--start { background:var(--msi-brand); }
.tk-clock__btn--start:hover { background:var(--msi-brand-deep); }
.tk-clock__btn--stop { background:var(--msi-bad); }
.tk-clock__btn--pause { background:rgba(255,255,255,.2); }
.tk-clock.is-pause .tk-clock__time { opacity:.55; }

/* Kennzahlen-Kacheln */
.tk-kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(155px,1fr)); gap:12px; margin-top:14px; }
.tk-kpi { background:var(--msi-card); border:1px solid var(--msi-line); border-radius:var(--msi-radius);
  padding:14px 16px; box-shadow:var(--msi-shadow); }
.tk-kpi__k { font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  color:var(--msi-ink-faint); }
.tk-kpi__v { font-size:24px; font-weight:800; margin-top:4px; font-variant-numeric:tabular-nums; letter-spacing:-.02em; }
.tk-kpi__s { font-size:12.5px; color:var(--msi-ink-soft); margin-top:2px; }

/* Monatsnavigation */
.tk-monthnav { display:flex; align-items:center; justify-content:space-between; gap:10px;
  background:var(--msi-card); border:1px solid var(--msi-line); border-radius:var(--msi-radius);
  padding:8px 12px; margin:14px 0; }
.tk-monthnav__t { font-weight:750; font-size:16px; }
.tk-monthnav a { text-decoration:none; color:var(--msi-ink-soft); font-weight:700; padding:6px 12px;
  border-radius:9px; }
.tk-monthnav a:hover { background:var(--msi-surface); color:var(--msi-brand-deep); }

/* Tabellen: waagerecht scrollbar statt Seite verbiegen */
.tk-tablewrap { overflow-x:auto; -webkit-overflow-scrolling:touch;
  background:var(--msi-card); border:1px solid var(--msi-line); border-radius:var(--msi-radius);
  box-shadow:var(--msi-shadow); }
.tk-tablewrap .msi-table { margin:0; }
.msi-table tr.tk-row-wochenende td { background:color-mix(in srgb, var(--msi-surface) 70%, transparent); }
.msi-table tr.tk-row-feiertag td { background:color-mix(in srgb, var(--msi-teal) 8%, transparent); }
/* Heutiger Tag: zarte Tönung der Zeile, Markierung nur am linken Rand –
   ein Rahmen auf jeder Zelle ergaebe sonst gruene Streifen quer durch die Zeile. */
.msi-table tr.tk-row-heute td { background:color-mix(in srgb, var(--msi-brand) 7%, transparent); }
.msi-table tr.tk-row-heute td:first-child { box-shadow:inset 3px 0 0 var(--msi-brand); }
.msi-table tr.tk-row-fehlt td { background:color-mix(in srgb, var(--msi-warn) 12%, transparent); }
.msi-table td.tk-right, .msi-table th.tk-right { text-align:right; }
.tk-mini { font-size:11.5px; color:var(--msi-ink-faint); }

/* Tages-Aktionsknoepfe in Tabellen */
.tk-iconbtn { border:1px solid var(--msi-line); background:var(--msi-card); color:var(--msi-ink-soft);
  border-radius:9px; padding:5px 9px; font-size:12px; cursor:pointer; text-decoration:none;
  display:inline-flex; align-items:center; gap:5px; }
.tk-iconbtn:hover { border-color:var(--msi-brand); color:var(--msi-brand-deep); }
.tk-iconbtn--bad:hover { border-color:var(--msi-bad); color:var(--msi-bad); }

/* +/- Schnellverstellung im Zeitformular */
.tk-step { display:flex; align-items:center; gap:8px; }
/* min-width:0 ist entscheidend: Eingabefelder haben eine intrinsische Mindestbreite,
   sonst laeuft die Zeile ueber und der Plus-Knopf wird abgeschnitten. */
.tk-step input { flex:1 1 0; min-width:0; width:100%; }
.tk-stepbtn { width:44px; height:46px; flex:none; border:1px solid var(--msi-line);
  background:var(--msi-surface); color:var(--msi-ink); border-radius:12px; font-size:19px;
  font-weight:700; cursor:pointer; }
.tk-stepbtn:hover { border-color:var(--msi-brand); color:var(--msi-brand-deep); }

/* Team-Kalender */
.tk-cal { border-collapse:collapse; font-size:11.5px; width:max-content; min-width:100%; }
.tk-cal th, .tk-cal td { border:1px solid var(--msi-line); padding:0; text-align:center; }
.tk-cal th.tk-cal__name, .tk-cal td.tk-cal__name { text-align:left; padding:6px 10px; min-width:170px;
  position:sticky; left:0; background:var(--msi-card); z-index:2; font-weight:650; white-space:nowrap; }
.tk-cal th { padding:5px 0; font-size:10.5px; color:var(--msi-ink-faint); background:var(--msi-surface); }
.tk-cal td { width:26px; height:28px; }
.tk-cal .tk-cal__we { background:var(--msi-surface-2); }
.tk-cal .tk-cal__ft { background:color-mix(in srgb, var(--msi-teal) 16%, transparent); }
.tk-cal__zelle { display:block; width:100%; height:100%; line-height:28px; font-weight:700; font-size:10.5px; }
.tk-cal__zelle--urlaub { background:var(--msi-brand); color:#fff; }
.tk-cal__zelle--sonderurlaub { background:var(--msi-teal); color:#fff; }
.tk-cal__zelle--unbezahlt { background:#8a959b; color:#fff; }
.tk-cal__zelle--elternzeit { background:#7a5af5; color:#fff; }
.tk-cal__zelle--krank { background:var(--msi-bad); color:#fff; }
.tk-cal__zelle--kind_krank { background:#e8697a; color:#fff; }
.tk-cal__zelle--fortbildung { background:var(--msi-warn); color:#fff; }
.tk-cal__zelle--zeitausgleich { background:#4a6572; color:#fff; }
.tk-cal__zelle--offen { opacity:.45; border:1px dashed rgba(0,0,0,.35); }
.tk-legende { display:flex; flex-wrap:wrap; gap:10px; margin-top:12px; font-size:12px; color:var(--msi-ink-soft); }
.tk-legende span b { display:inline-block; min-width:22px; text-align:center; border-radius:5px;
  padding:1px 4px; color:#fff; margin-right:4px; font-size:11px; }

/* Formulare */
.tk-formgrid { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:14px; }
.tk-formgrid--tage { grid-template-columns:repeat(7,minmax(64px,1fr)); }
.tk-field { display:flex; flex-direction:column; gap:5px; }
.tk-field label { font-weight:650; font-size:13px; color:var(--msi-ink-soft); }
.tk-field .helptext { font-size:11.5px; color:var(--msi-ink-faint); }
.tk-field .errorlist { color:var(--msi-bad); font-size:12px; margin:2px 0 0; padding-left:16px; }
.tk-fieldset { border:1px solid var(--msi-line); border-radius:var(--msi-radius); padding:14px 16px;
  margin-top:16px; background:var(--msi-card); }
.tk-fieldset > legend { font-size:11.5px; font-weight:700; letter-spacing:.09em; text-transform:uppercase;
  color:var(--msi-ink-faint); padding:0 6px; }

/* Meldungen */
.tk-msgs { display:flex; flex-direction:column; gap:8px; margin:12px 0; }

/* Druck: keine Browser-Kopf-/Fusszeile, kein Menue, volle Breite */
.tk-printhead { display:none; }
@media print {
  @page { size:A4; margin:0; }
  body { background:#fff !important; }
  .msi-topbar, .tk-actions, .tk-monthnav a, .msi-tabbar, .tk-noprint, form.tk-noprint,
  .tk-iconbtn, .tk-msgs { display:none !important; }
  .msi-main { padding:0 !important; }
  .msi-shell, .msi-shell--wide { max-width:none !important; padding:12mm 10mm !important; }
  .tk-printhead { display:flex !important; align-items:center; gap:12px; border-bottom:2px solid #16232a;
    padding-bottom:8px; margin-bottom:14px; }
  .tk-printhead__logo { height:34px; }
  .tk-printhead__t { font-weight:800; font-size:17px; }
  .tk-printhead__s { font-size:11.5px; color:#556169; }
  .tk-printhead__r { margin-left:auto; font-size:11px; color:#556169; text-align:right; }
  .tk-tablewrap { overflow:visible !important; border:0 !important; box-shadow:none !important; }
  .msi-table { font-size:10.5px; }
  .msi-table th, .msi-table td { padding:4px 6px; }
  .tk-kpi, .msi-item, .tk-tablewrap { break-inside:avoid; }
  thead { display:table-header-group; }
  tr { break-inside:avoid; }
  .tk-cal td { height:20px; }
  .tk-cal__zelle { line-height:20px; }
}

/* Links in Tabellen sind im MSI-System rot (Loesch-Aktionen). Unsere neutralen
   Aktionsknoepfe sollen davon unberuehrt bleiben. */
.msi-table a.tk-iconbtn { color: var(--msi-ink-soft); font-weight: 600; }
.msi-table a.tk-iconbtn:hover { color: var(--msi-brand-deep); }
.msi-table a.tk-iconbtn--bad:hover { color: var(--msi-bad); }

/* ---- Lesbarkeit langer Tabellen ---------------------------------------- */
/* Kopfzeile bleibt beim Scrollen stehen. */
.tk-sticky thead th { position: sticky; top: 0; z-index: 3; background: var(--msi-surface); }
.msi-topbar + .msi-main .tk-sticky thead th { top: 0; }

/* Wochentrenner und Wochensumme in der Monatstabelle */
.msi-table tr.tk-row-kw td { background: var(--msi-surface-2); font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--msi-ink-faint);
  padding-top: 10px; padding-bottom: 6px; border-bottom: 0; }
.msi-table tr.tk-row-kwsumme td { font-weight: 700; color: var(--msi-ink-soft);
  border-top: 1px solid var(--msi-line); border-bottom: 2px solid var(--msi-line);
  background: color-mix(in srgb, var(--msi-surface) 55%, transparent); }
.msi-table tfoot td { font-weight: 800; font-size: 14px; padding-top: 12px; padding-bottom: 12px;
  border-top: 2px solid var(--msi-ink-faint); }

/* Schnellwahl von Zeiträumen und Filterleiste */
.tk-quick { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.tk-quick a { text-decoration: none; font-size: 13px; font-weight: 650; padding: 7px 13px;
  border-radius: 99px; border: 1px solid var(--msi-line); color: var(--msi-ink-soft);
  background: var(--msi-card); }
.tk-quick a:hover { border-color: var(--msi-brand); color: var(--msi-brand-deep); }
.tk-quick a.is-active { background: var(--msi-brand); border-color: var(--msi-brand); color: #fff; }

/* Suchfeld über Tabellen */
/* Suchfeld: type="search" wird vom Design-System nicht erfasst, deshalb hier
   vollstaendig ausformuliert – sonst bleibt ein blasses, randloses Kaestchen. */
.tk-suche { position: relative; max-width: 420px; }
.tk-suche i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  font-size: 14px; color: var(--msi-ink-faint); pointer-events: none; transition: color .15s; }
.tk-suche input[type="search"],
.tk-suche input {
  -webkit-appearance: none; appearance: none;
  width: 100%; min-height: 46px; font-size: 15px; line-height: 1.4;
  padding: 10px 14px 10px 42px;
  border: 1px solid var(--msi-line); border-radius: 12px;
  background: var(--msi-card); color: var(--msi-ink);
  box-shadow: var(--msi-shadow);
}
.tk-suche input::placeholder { color: var(--msi-ink-faint); opacity: 1; }
.tk-suche input:hover { border-color: var(--msi-ink-faint); }
.tk-suche input:focus {
  outline: none; border-color: var(--msi-brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--msi-brand) 18%, transparent);
}
.tk-suche input:focus + i, .tk-suche:focus-within i { color: var(--msi-brand-deep); }
/* Natives Loeschkreuz abschalten, sonst steht es doppelt neben unserem eigenen. */
.tk-suche input::-webkit-search-cancel-button,
.tk-suche input::-webkit-search-decoration { -webkit-appearance: none; display: none; }

/* Eigenes Loeschkreuz – erscheint, sobald etwas eingegeben wurde. */
.tk-suche__leeren { position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent;
  color: var(--msi-ink-faint); cursor: pointer; display: none; place-items: center; font-size: 13px; }
.tk-suche__leeren:hover { background: var(--msi-surface); color: var(--msi-ink); }
.tk-suche.hat-text .tk-suche__leeren { display: grid; }
.tk-leer { padding: 16px; color: var(--msi-ink-faint); font-size: 13px; }

/* Navigationsgruppe „Auswertungen" */
.tk-nav-gruppe { position: relative; }
.tk-nav-gruppe > summary { list-style: none; cursor: pointer; color: #cdd7db; font-size: 13.5px;
  font-weight: 600; padding: 8px 11px; border-radius: 9px; white-space: nowrap; display: flex;
  align-items: center; gap: 6px; }
.tk-nav-gruppe > summary::-webkit-details-marker { display: none; }
.tk-nav-gruppe > summary:hover { color: #fff; background: rgba(255,255,255,.09); }
.tk-nav-gruppe[open] > summary { color: #fff; background: rgba(255,255,255,.14); }
.tk-nav-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 210px;
  background: var(--msi-card); border: 1px solid var(--msi-line); border-radius: 14px;
  box-shadow: var(--msi-shadow-hover); padding: 6px; display: flex; flex-direction: column; }
.tk-nav-menu a { color: var(--msi-ink) !important; font-size: 14px; padding: 10px 12px;
  border-radius: 9px; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.tk-nav-menu a:hover { background: var(--msi-surface); color: var(--msi-brand-deep) !important; }
.tk-nav-menu i { width: 18px; text-align: center; color: var(--msi-ink-faint); }

/* Jahresübersicht */
.tk-jahr td.tk-jahr__monat { font-weight: 700; }
.tk-jahr tr.tk-jahr__kommend td { opacity: .5; }

/* Auf schmalen Geräten weniger wichtige Spalten ausblenden */
@media (max-width: 700px) {
  .tk-col-opt { display: none !important; }
  .tk-kpis { grid-template-columns: 1fr 1fr; }
  .tk-clock__time { font-size: 38px; }
}

/* ---- Navigation auf Handy und Tablet ------------------------------------
   Das Design-System blendet die Kopfzeilen-Links unter 1200px aus; hier klappt
   stattdessen ein Menue auf. */
.tk-burger { display: none; width: 42px; height: 42px; flex: none; border: 0; border-radius: 11px;
  background: rgba(255,255,255,.09); color: #eaf0f2; cursor: pointer; place-items: center;
  font-size: 17px; position: relative; }
.tk-burger:hover { background: rgba(255,255,255,.18); }
.tk-burger__punkt { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--msi-warn); }

@media (max-width: 1200px) {
  .tk-burger { display: grid; }

  .msi-topbar .msi-topnav {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 70;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--msi-navy); padding: 8px;
    border-top: 1px solid rgba(255,255,255,.14);
    box-shadow: 0 14px 28px rgba(0,0,0,.4);
    max-height: calc(100vh - 60px); overflow-y: auto;
  }
  .msi-topbar .msi-topnav.is-offen { display: flex; }
  .msi-topbar .msi-topnav a,
  .msi-topbar .msi-topnav .msi-nav-logout { font-size: 15.5px; padding: 13px 14px; width: 100%; text-align: left; }
  .msi-topbar .msi-topnav form { display: block !important; width: 100%; }

  /* Untermenü „Auswertungen" klappt im Panel nach unten auf statt zu schweben */
  .msi-topbar .tk-nav-gruppe > summary { font-size: 15.5px; padding: 13px 14px; }
  .msi-topbar .tk-nav-menu { position: static; min-width: 0; box-shadow: none;
    background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); margin: 2px 0 6px; }
  .msi-topbar .tk-nav-menu a { color: #dbe4e8 !important; }
  .msi-topbar .tk-nav-menu a:hover { background: rgba(255,255,255,.1); color: #fff !important; }
  .msi-topbar .tk-nav-menu i { color: #93a2a9; }
}

/* ---- Tabellen und Kopfzeilen auf schmalen Geraeten ---------------------- */
@media (max-width: 700px) {
  /* Kompakter, damit Ist/Soll/Saldo ohne seitliches Scrollen sichtbar sind */
  .msi-table { font-size: 12px; }
  .msi-table th, .msi-table td { padding: 7px 6px; }
  .msi-table th { font-size: 10px; letter-spacing: .04em; }
  .tk-col-pause { display: none; }

  /* Breite Tabellen duerfen auf dem Handy umbrechen statt seitlich zu scrollen.
     width:auto ist wichtig: sonst verteilt der Browser die Restbreite auf die
     ausgeblendeten Spalten (die durch colspan-Zeilen weiter existieren). */
  .msi-table--wide { width: auto; min-width: 0; }
  .msi-table--wide th, .msi-table--wide td { white-space: normal; }
  .tk-iconbtn { padding: 5px 6px; font-size: 12px; }
  /* Aktionsspalte weicht dem Platz: auf dem Handy fuehrt das Datum zur Bearbeitung */
  .tk-col-aktion { display: none; }
  /* Wochentag entfaellt: Wochenenden und Feiertage sind ohnehin farblich abgesetzt */
  .tk-col-tag { display: none; }
  /* Statusmarken kompakter, damit die Spalten der Antragsliste passen */
  .msi-pill, .msi-chip { font-size: 10.5px; padding: 2px 7px; }
  .msi-table th, .msi-table td { padding: 7px 4px; }

  /* Monatsblaetterung in einer Zeile statt dreizeilig */
  .tk-monthnav { font-size: 13px; padding: 8px 10px; gap: 6px; }
  .tk-monthnav a { white-space: nowrap; }
  .tk-monthnav__t { font-size: 15px; white-space: nowrap; }

  /* Aktionsknoepfe: volle Breite wirkt ruhiger als zerfledderte Reihen */
  .tk-head { gap: 10px; }
  .tk-actions .msi-btn { flex: 1 1 auto; justify-content: center; }
}

/* Datum in der Monatstabelle als Bearbeitungslink.
   Hoehere Spezifitaet noetig: msi.css faerbt Tabellenlinks sonst rot. */
.msi-table a.tk-tag-link { color: var(--msi-ink); font-weight: 600; text-decoration: none;
  border-bottom: 1px dotted var(--msi-ink-faint); }
.msi-table a.tk-tag-link:hover { color: var(--msi-brand-deep); border-bottom-color: var(--msi-brand); }

/* Sehr schmale Geraete: letzte Reserve, damit Ist/Soll/Saldo ohne Wischen sichtbar sind */
@media (max-width: 480px) {
  .tk-stepbtn { width: 40px; }
  .msi-table { font-size: 11.5px; }
  .msi-table th, .msi-table td { padding: 7px 3px; }
  .msi-table th { font-size: 9.5px; }
}

/* Nur auf schmalen Geraeten sichtbar (Ersatz fuer ausgeblendete Spalten) */
.tk-nur-mobil { display: none; }
@media (max-width: 700px) { .tk-nur-mobil { display: block; } }

/* ---- Pausen je Wochentag ------------------------------------------------ */
.tk-pausen__setzen { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.tk-pausen__setzen .tk-field { max-width: 140px; }
.tk-pausen__tage { display: flex; gap: 8px; flex-wrap: wrap; }
.tk-daychip { display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 62px; padding: 9px 10px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--msi-line); background: var(--msi-card); color: var(--msi-ink);
  font-family: inherit; transition: transform .12s, border-color .12s; }
.tk-daychip:hover { border-color: var(--msi-brand); transform: translateY(-1px); }
.tk-daychip__tag { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--msi-ink-soft); }
.tk-daychip__wert { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tk-daychip.ist-frei { opacity: .45; }
.tk-daychip.eben-gesetzt { border-color: var(--msi-brand); background: var(--msi-brand-soft); }
.tk-daychip.eben-gesetzt .tk-daychip__wert { color: var(--msi-brand-deep); }
/* Die echten Eingabefelder bleiben im Formular, sind aber nicht sichtbar. */
.tk-pausen__felder { position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; }

/* Monatstabelle soll ohne seitliches Scrollen lesbar sein: die Zahlenspalten
   bleiben schmal und einzeilig, die Hinweisspalte nimmt den Rest und bricht um. */
.tk-zeiten { width: 100%; min-width: 0; table-layout: auto; }
.tk-zeiten th, .tk-zeiten td { white-space: nowrap; }
.tk-zeiten th.tk-col-opt, .tk-zeiten td.tk-col-opt { white-space: normal; width: 100%; }
.tk-zeiten td.tk-col-opt .tk-mini { white-space: normal; }

/* ---- News: Auswahl, Archiv ---------------------------------------------- */
.tk-newsbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--msi-card); border: 1px solid var(--msi-line); border-radius: var(--msi-radius);
  padding: 10px 14px; margin: 12px 0 4px; }
.tk-newscheck { display: inline-flex; align-items: center; gap: 8px; font-size: 14px;
  font-weight: 600; color: var(--msi-ink-soft); cursor: pointer; margin: 0; }
.tk-newsitem { display: flex; gap: 12px; align-items: flex-start; }
.tk-newsitem__pick { padding-top: 2px; }
.tk-newsitem__body { flex: 1 1 auto; min-width: 0; }
@media (max-width: 700px) {
  .tk-newsbar .msi-btn { flex: 1 1 auto; justify-content: center; }
}

/* ---- Symbolknöpfe für Drucken und Speichern ----------------------------- */
.tk-aktion { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border: 1px solid var(--msi-line); border-radius: 12px; background: var(--msi-card);
  color: var(--msi-ink); font-size: 17px; cursor: pointer; text-decoration: none;
  transition: border-color .12s, color .12s, transform .12s; }
.tk-aktion:hover { border-color: var(--msi-brand); color: var(--msi-brand-deep);
  transform: translateY(-1px); }
.tk-aktion:focus-visible { outline: 2px solid var(--msi-brand); outline-offset: 2px; }

/* Speichern mit Auswahl (PDF oder CSV) */
.tk-speichern { position: relative; }
.tk-speichern > summary { list-style: none; }
.tk-speichern > summary::-webkit-details-marker { display: none; }
.tk-speichern[open] > summary { border-color: var(--msi-brand); color: var(--msi-brand-deep); }
.tk-speichern__menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
  min-width: 210px; padding: 6px; display: flex; flex-direction: column;
  background: var(--msi-card); border: 1px solid var(--msi-line);
  border-radius: 14px; box-shadow: var(--msi-shadow-hover); }
.tk-speichern__menu a { display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--msi-ink);
  text-decoration: none; white-space: nowrap; }
.tk-speichern__menu a:hover { background: var(--msi-surface); color: var(--msi-brand-deep); }
.tk-speichern__menu i { width: 18px; text-align: center; color: var(--msi-ink-faint); }
.tk-speichern__menu a:hover i { color: var(--msi-brand-deep); }

/* ---- Zwei-Faktor-Anmeldung ---------------------------------------------- */
.tk-leiselink { color: var(--msi-muted); text-decoration: none; }
.tk-leiselink:hover { color: var(--msi-text); text-decoration: underline; }
.tk-zfcheck input[type="checkbox"] { accent-color: var(--msi-brand); }
.tk-qr { display: inline-block; padding: 12px; border-radius: 14px; background: #fff;
  border: 1px solid var(--msi-line); }
.tk-qr svg { display: block; width: 200px; max-width: 100%; height: auto; }
.tk-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px;
  letter-spacing: .08em; word-break: break-all; background: var(--msi-surface);
  border: 1px solid var(--msi-line); border-radius: 10px; padding: 10px 12px; margin: 6px 0 0; }
.tk-codes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px;
  margin-top: 16px; }
.tk-codes__eintrag { font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 18px; font-weight: 700; letter-spacing: .08em; text-align: center;
  padding: 14px 10px; border-radius: 12px; background: var(--msi-card);
  border: 1px solid var(--msi-line); }

/* ---- Rechtevergabe Leitungskonto ---------------------------------------- */
.tk-recht { display: flex; gap: 12px; align-items: flex-start; padding: 11px 12px;
  border: 1px solid var(--msi-line); border-radius: 12px; margin-bottom: 8px;
  background: var(--msi-surface); cursor: pointer; }
.tk-recht:hover { border-color: var(--msi-brand); }
.tk-recht input[type="checkbox"] { margin-top: 3px; width: 17px; height: 17px;
  accent-color: var(--msi-brand); flex: none; }
.tk-recht--heikel { border-left: 3px solid var(--msi-warn, #d08700); }
.tk-rollenliste { display: grid; gap: 8px; }
