/* REWE Personalmanagement App - Redesign CSS - Updated */

/* TailwindCSS Direktiven */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Line Clamp Utilities */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Module-specific CSS imports */
@import "salary-hHywQke.css";
@import "absence-JOq_iXH.css";

/* CSS Custom Properties für REWE Corporate Design
   (Rest: PWA-Banner und Alt-Debug-Seite in base.html.twig/test_styles.html.twig) */
:root {
  --rewe-red: #E30613;
  --rewe-orange: #FFCC00;
  --rewe-dark-gray: #333333;
  --rewe-light-gray: #F5F5F5;
}

/* HR Portal Design Tokens (docs/employee-detail-design/styleguide/tokens.json) */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #5c6e85;
  --ink: #0f172a;
  --ink-muted: #475569;
  --ink-subtle: #5a6a80;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-ink: #ffffff;
  --primary-soft: #eff6ff;
  --primary-soft-ink: #1e40af;
  --success: #15803d;
  --success-soft: #f0fdf4;
  --warning: #b45309;
  --warning-soft: #fffbeb;
  --danger: #b91c1c;
  --danger-hover: #991b1b;
  --danger-ink: #ffffff;
  --danger-soft: #fef2f2;
  --neutral-soft: #f1f5f9;
  --focus: #2563eb;
  --scrim: rgba(15, 23, 42, 0.45);
  --shadow-pop: 0 10px 30px rgba(15,23,42,0.12), 0 2px 6px rgba(15,23,42,0.08);
}

:root.dark {
  --bg: #0b1120;
  --surface: #111827;
  --surface-muted: #1e293b;
  --border: #334155;
  --border-strong: #64748b;
  --ink: #f1f5f9;
  --ink-muted: #cbd5e1;
  --ink-subtle: #94a3b8;
  --primary: #60a5fa;
  --primary-hover: #93c5fd;
  --primary-ink: #0b1120;
  --primary-soft: #172554;
  --primary-soft-ink: #bfdbfe;
  --success: #4ade80;
  --success-soft: #052e16;
  --warning: #fbbf24;
  --warning-soft: #422006;
  --danger: #f87171;
  --danger-hover: #fca5a5;
  --danger-ink: #0b1120;
  --danger-soft: #450a0a;
  --neutral-soft: #1e293b;
  --focus: #93c5fd;
  --scrim: rgba(15, 23, 42, 0.45);
  --shadow-pop: 0 10px 30px rgba(0,0,0,0.5);
}

/* Reset and Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: #e5e7eb;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  margin: 0;
  line-height: inherit;
  font-size: 14px;
  line-height: 1.6;
  color: var(--rewe-dark-gray);
  background-color: var(--rewe-light-gray);
}

/* Custom Component Classes */
@layer components {
  .btn-rewe {
    @apply inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-rewe shadow-rewe;
    @apply bg-rewe-red text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-rewe-red;
    @apply transition-all duration-rewe;
  }

  .btn-rewe-secondary {
    @apply inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-rewe shadow-rewe;
    @apply bg-white text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-rewe-red;
    @apply transition-all duration-rewe;
  }

  .card-rewe {
    @apply bg-white rounded-rewe shadow-rewe border border-gray-200;
  }

  .input-rewe {
    @apply block w-full px-3 py-2 border border-gray-300 rounded-rewe shadow-sm;
    @apply focus:outline-none focus:ring-rewe-red focus:border-rewe-red;
    @apply transition-all duration-rewe;
  }

  .badge-status {
    @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
  }

  .badge-created {
    @apply bg-gray-100 text-gray-800;
  }

  .badge-signed {
    @apply bg-orange-100 text-orange-800;
  }

  .badge-delivered {
    @apply bg-green-100 text-green-800;
  }

  .dark-mode-transition {
    @apply transition-colors duration-300 ease-in-out;
  }
}

/* Custom Utility Classes */
@layer utilities {
  .text-rewe-red {
    color: var(--rewe-red);
  }

  .bg-rewe-red {
    background-color: var(--rewe-red);
  }

  .border-rewe-red {
    border-color: var(--rewe-red);
  }

  .text-rewe-orange {
    color: var(--rewe-orange);
  }

  .bg-rewe-orange {
    background-color: var(--rewe-orange);
  }
}

/* Animation Classes */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

/* Tiptap-Editor: Platzhalter bei leerem Editor (is-editor-empty wird vom Controller getoggelt) */
.ProseMirror[data-placeholder].is-editor-empty::before {
  content: attr(data-placeholder);
  color: #9ca3af;
  pointer-events: none;
  float: left;
  height: 0;
}

/* Tiptap-Toolbar: aktives Format (Klasse wird vom tiptap-editor Controller gesetzt) */
.tiptap-toolbar-active {
  background-color: #dcfce7;
  color: #166534;
}

/* ============================================================
   Kalender-Raster (FullCalendar) — orientiert an cal.css des Entwurfs
   ============================================================ */

/* Raster: Linien stündlich, 48px je Stunde, 07–20 Uhr */
.cal-root.fc .fc-scrollgrid,
.cal-root.fc .fc-scrollgrid-section > *,
.cal-root.fc th,
.cal-root.fc td {
  border-color: var(--border);
}
.cal-root.fc .fc-timegrid-slot {
  height: 48px !important;
}
.cal-root.fc .fc-timegrid-slot-lane {
  border-top: 1px solid var(--border);
}
.cal-root.fc .fc-timegrid-slot-label-cushion,
.cal-root.fc .fc-timegrid-axis-cushion {
  font-size: 11px;
  color: var(--ink-subtle);
  font-variant-numeric: tabular-nums;
}

/* Kopf: Wochentag + Nummer im Kreis (heute: primary) */
.cal-root.fc .fc-col-header-cell {
  background: var(--surface);
}
.cal-head-inner {
  padding: 8px 6px;
  text-align: center;
}
.cal-head-inner b {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}
.cal-num {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-top: 2px;
  border-radius: 9999px;
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.cal-root.fc .fc-day-today .cal-num {
  background: var(--primary);
  color: var(--primary-ink);
}
.cal-root.fc .fc-day-sat,
.cal-root.fc .fc-day-sun {
  background-color: var(--surface-muted);
}

/* Jetzt-Linie */
.cal-root.fc .fc-timegrid-now-indicator-line {
  background: var(--danger);
  border-color: var(--danger);
}
.cal-root.fc .fc-timegrid-now-indicator-arrow {
  display: none;
}

/* Termin-Block */
.cal-root.fc .fc-event {
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 15px;
  border-width: 1.5px;
  border-style: solid;
  cursor: pointer;
}
.cal-ev-inner {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cal-ev-title {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}
.cal-ev-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-ev-time {
  opacity: .85;
  font-variant-numeric: tabular-nums;
}
.cal-ev-pending {
  font-weight: 600;
}
.cal-i {
  width: 12px;
  height: 12px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Zustände: Antwort ausstehend (gestrichelt, weißer Grund),
   abgesagt/abgelehnt (matt statt halber Deckkraft — opacity
   unterschreitet den Kontrast, BEFUND-38; durchgestrichen),
   nur „belegt“ (schraffiert) */
.cal-root.fc .fc-event.cal-ev--pending {
  border-style: dashed !important;
  background-color: var(--surface) !important;
}
.cal-root.fc .fc-event.cal-ev--cancelled,
.cal-root.fc .fc-event.cal-ev--declined {
  text-decoration: line-through;
  background-color: var(--surface-muted) !important;
  border-color: var(--border) !important;
  color: var(--ink-muted) !important;
}
.cal-root.fc .fc-event.cal-ev--busy {
  background: repeating-linear-gradient(135deg, var(--surface-muted) 0 5px, var(--surface) 5px 10px) !important;
  border-color: var(--border) !important;
  color: var(--ink-muted) !important;
}

/* Ebenen (z. B. Abwesenheiten) als Chips in Ganztagszeile/Agenda */
.cal-root.fc .fc-event.cal-layer {
  background: transparent !important;
  border: none !important;
  padding: 1px 0;
  pointer-events: none;
}
.cal-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 12px;
  line-height: 16px;
  width: 100%;
  overflow: hidden;
  color: var(--ink);
}
.cal-chip span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-chip--absent {
  background: repeating-linear-gradient(135deg, var(--surface-muted) 0 5px, var(--surface) 5px 10px);
  box-shadow: inset 0 0 0 1px var(--border);
  color: var(--ink-muted);
}
.cal-chip--overdue {
  background: var(--danger-soft);
  color: var(--danger);
}
.cal-chip--today {
  background: var(--primary-soft);
  color: var(--primary-soft-ink);
}
.cal-chip--upcoming {
  background: var(--surface-muted);
  color: var(--ink);
}
.cal-chip--completed {
  background: var(--surface-muted);
  color: var(--ink-subtle);
}
.cal-chip--completed span {
  text-decoration: line-through;
}

/* Ebenen-Chips mit Aktion (Aufgaben): klickbar trotz pointer-events: none der Ebene */
.cal-root.fc .fc-event.cal-layer--action {
  pointer-events: auto;
  cursor: pointer;
}

/* Bestätigungsdialog „Häkchen zurücknehmen?“ des Kalender-Rasters */
.cal-confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgb(15 23 42 / 0.45);
}
.cal-confirm {
  width: 100%;
  max-width: 460px;
  padding: 20px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 20px 50px rgb(15 23 42 / 0.25);
}
.cal-confirm h2 {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
.cal-confirm p {
  margin-top: 8px;
  font-size: 13px;
  line-height: 18px;
  color: var(--ink-muted);
}
.cal-confirm__actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.cal-confirm__actions button {
  flex: 1;
  height: 40px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.cal-confirm__cancel {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
}
.cal-confirm__cancel:hover {
  background: var(--surface-muted);
}
.cal-confirm__confirm {
  border: none;
  background: var(--primary);
  color: var(--primary-ink);
  font-weight: 600;
}
.cal-confirm__confirm:hover {
  background: var(--primary-hover);
}

/* Monatsansicht */
.cal-root.fc .fc-daygrid-day-number {
  font-size: 12px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}
/* Fremdmonats-Tage: FullCalendar dimmt den Tageskopf per opacity .3 —
   der effektive Kontrast unterschreitet WCAG AA (BEFUND-24). Stattdessen
   über die Tinte absetzen. */
.cal-root.fc .fc-day-other .fc-daygrid-day-top {
  opacity: 1;
}
.cal-root.fc .fc-day-other .fc-daygrid-day-number {
  color: var(--ink-subtle);
}
.cal-root.fc .fc-daygrid-more-link {
  color: var(--primary);
  font-size: 12px;
}

/* ============================================================
   Aufgaben (Wochenplan, Liste, Board, Detail, Formular) —
   orientiert an task.css des Entwurfs
   ============================================================ */

.tk-num { font-variant-numeric: tabular-nums; }
.tk-dot { border-radius: 3px; flex: none; }

/* Seitenleiste (ab lg sichtbar) */
.tk-rail { display: none; }
@media (min-width: 1024px) {
  .tk-rail {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 240px;
    flex: none;
    padding: 16px;
    border-right: 1px solid var(--border);
    background: var(--surface);
    overflow: auto;
  }
}

/* Wochenzahlen */
.tk-kpi { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tk-kpi__tile {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.tk-kpi__tile > p:first-child { font-size: 20px; line-height: 24px; font-weight: 600; }
.tk-kpi__tile > p + p { font-size: 12px; color: var(--ink-muted); }

/* Wochenplan-Matrix */
.tk-wk { min-width: 0; }
.tk-wk__grid { display: grid; grid-template-columns: minmax(220px, 1fr) repeat(6, minmax(84px, 124px)); }
.tk-wk__corner,
.tk-wk__head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 8px 4px;
  text-align: center;
}
.tk-wk__corner {
  text-align: left;
  padding-left: 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  align-self: end;
}
.tk-wk__dow { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-subtle); }
.tk-wk__date {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-top: 2px;
  border-radius: 9999px;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.tk-wk__head--today .tk-wk__dow { color: var(--primary); }
.tk-wk__head--today .tk-wk__date { background: var(--primary); color: var(--primary-ink); }
.tk-wk__stat { font-size: 11px; color: var(--ink-subtle); font-variant-numeric: tabular-nums; }
.tk-bar { height: 4px; margin: 4px 10px 0; border-radius: 2px; background: var(--surface-muted); overflow: hidden; }
.tk-bar__fill { display: block; height: 100%; background: var(--success); }

.tk-wk__grp {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  border-top: 1px solid var(--border);
  background: var(--surface-muted);
}
.tk-wk__grp-sub { font-weight: 400; color: var(--ink-subtle); }

.tk-lbl {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 6px 12px 6px 16px;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  min-width: 0;
  color: var(--ink);
}
.tk-lbl__title {
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tk-lbl:hover .tk-lbl__title { color: var(--primary); }
.tk-lbl__meta {
  font-size: 12px;
  color: var(--ink-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}
.tk-lbl--sel { background: var(--primary-soft); }
.tk-lbl--sel .tk-lbl__title { color: var(--primary-soft-ink); }

.tk-cell {
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 36px;
  border-radius: 6px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 14px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  padding: 0 4px;
}
.tk-cell:hover { border-color: var(--primary); }
.tk-cell--empty { border: 0; background: none; cursor: default; }
.tk-cell--empty:hover { border: 0; }
.tk-cell--today { border-color: var(--primary); color: var(--primary); background: rgba(37, 99, 235, .035); }
.tk-cell--done { border-color: transparent; background: var(--success-soft); color: var(--success); }
.tk-cell--late { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.tk-cell--carry { border-style: dashed; border-color: var(--danger); background: var(--surface); color: var(--danger); }
.tk-cell--missed {
  border-color: transparent;
  background: repeating-linear-gradient(135deg, var(--surface-muted) 0 5px, var(--surface) 5px 10px);
  color: var(--ink-subtle);
  font-weight: 500;
}
.tk-cell--moved { border-style: dashed; border-color: var(--border-strong); color: var(--ink-subtle); font-weight: 500; }
.tk-cell--sel { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary); }

.tk-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--ink-muted);
}
.tk-legend__item { display: inline-flex; align-items: center; gap: 6px; }
.tk-legend__sw {
  display: inline-block;
  width: 18px;
  height: 12px;
  border-radius: 3px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
}
.tk-legend__sw--done { background: var(--success-soft); border-color: transparent; color: var(--success); display: inline-grid; place-items: center; font-size: 8px; }
.tk-legend__sw--today { border-color: var(--primary); }
.tk-legend__sw--late { background: var(--danger-soft); border-color: transparent; color: var(--danger); display: inline-grid; place-items: center; font-size: 8px; }
.tk-legend__sw--carry { border-style: dashed; border-color: var(--danger); }
.tk-legend__sw--missed { background: repeating-linear-gradient(135deg, var(--surface-muted) 0 5px, var(--surface) 5px 10px); border-color: transparent; }
.tk-legend__sw--moved { border-style: dashed; }

/* Liste */
.tk-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.tk-lhead {
  background: var(--surface-muted);
  height: 36px;
  padding: 0 16px;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}
.tk-lrow { min-height: 52px; padding: 0 16px; }
.tk-lrow:hover { background: var(--surface-muted); }
.tk-lrow--sel { background: var(--primary-soft); }
.tk-lrow--sel:hover { background: var(--primary-soft); }
.tk-bucket { padding: 14px 16px 6px; font-size: 12px; font-weight: 600; color: var(--ink-muted); }
.tk-bucket--late { color: var(--danger); }
.tk-check { display: grid; place-items: center; cursor: pointer; }
.tk-check--done { background: var(--success); border-color: var(--success); color: #fff; }
.tk-check--done:hover { background: var(--success); border-color: var(--success); color: #fff; }
.tk-ttl { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; min-width: 0; }
.tk-ttl:hover > span:first-child { color: var(--primary); }
.tk-who { min-width: 0; font-size: 12px; color: var(--ink-muted); }
.tk-who > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-due { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--ink-muted); }
.tk-due--late { color: var(--danger); font-weight: 600; }

/* Board */
.tk-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  align-items: start;
}
.tk-col {
  background: var(--surface-muted);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 300px;
}
.tk-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 2px rgb(15 23 42 / .05);
}
.tk-card__t { border: 0; background: none; padding: 0; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink); text-align: left; cursor: pointer; }
.tk-card__t:hover { color: var(--primary); }
.tk-card__m { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-subtle); flex-wrap: wrap; }
.tk-card__a { display: flex; gap: 6px; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--ink-muted); }
.tk-card__a--late { color: var(--danger); font-weight: 600; }
.tk-card--sel { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }

/* Detail-Panel */
.tk-slots { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.tk-slot { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border-top: 1px solid var(--border); }
.tk-slot:first-child { border-top: 0; }
.tk-status { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; font-size: 13px; }
.tk-status--late { background: var(--danger-soft); color: var(--danger); }
.tk-status--done { background: var(--success-soft); color: var(--success); }
.tk-status--open { background: var(--primary-soft); color: var(--primary-soft-ink); }
.tk-status--missed { background: var(--surface-muted); color: var(--ink-muted); }
.tk-status--moved { background: var(--surface-muted); color: var(--ink-muted); }
.tk-move {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface-muted);
}
.tk-hist ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tk-perm {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 16px;
}
.tk-sentence {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--primary-soft);
  font-size: 13px;
  line-height: 18px;
}
.tk-sentence > p:first-child { font-weight: 500; color: var(--primary-soft-ink); }
.tk-sentence > p + p { margin-top: 2px; font-size: 12px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }

/* Serien-Dialog */
.tk-radio {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}
.tk-radio:hover { background: var(--surface-muted); }
.tk-radio__dot {
  margin-top: 3px;
  width: 14px;
  height: 14px;
  border-radius: 9999px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  flex: none;
}

/* Rückgängig-Toast */
.tk-toast { animation: tk-toast-in .2s ease-out; }
@keyframes tk-toast-in {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Fokus-Ringe */
.tk-check:focus-visible,
.tk-cell:focus-visible,
.tk-ttl:focus-visible,
.tk-lbl:focus-visible,
.tk-nav button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* ============================================================
   Aufgaben mobil „Heute“ (< 768 px) — orientiert an task.css
   ============================================================ */

.tm-sec {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 16px 4px 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}
.tm-sec--late { color: var(--danger); }
.tm-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: hidden;
}
.tm-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 8px 12px 8px 8px;
}
.tm-item + .tm-item { border-top: 1px solid var(--border); }

/* Kästchen zum Abhaken (44 px Tippziel) */
.tm-box {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  border-radius: 10px;
}
.tm-box__sq {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 2px solid var(--border-strong);
  display: grid;
  place-items: center;
  color: #fff;
}
.tm-box[aria-pressed="true"] .tm-box__sq { background: var(--success); border-color: var(--success); }
.tm-box--late .tm-box__sq { border-color: var(--danger); }
.tm-box--count {
  cursor: default;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

/* Wochentag-Kachel im Abschnitt „Diese Woche“ */
.tm-day {
  width: 44px;
  height: 44px;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  line-height: 14px;
  color: var(--ink-muted);
}
.tm-day small { font-weight: 400; }

.tm-txt {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.tm-txt > b { display: block; font-weight: 500; }
.tm-txt > span { display: block; font-size: 12px; color: var(--ink-subtle); }
.tm-txt--done > b { text-decoration: line-through; color: var(--ink-subtle); }
.tm-txt--late > span { color: var(--danger); font-weight: 600; }

/* Uhrzeit-Pillen (Durchgänge) */
.tm-pills { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 12px 12px 64px; }
.tm-pill {
  min-width: 56px;
  height: 36px;
  padding: 0 10px;
  border-radius: 9999px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}
.tm-pill:hover { border-color: var(--primary); }
.tm-pill--done { background: var(--success-soft); border-color: transparent; color: var(--success); }
.tm-pill--done:hover { border-color: transparent; }
.tm-pill--late { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.tm-pill--missed {
  border-color: transparent;
  background: var(--surface-muted);
  color: var(--ink-subtle);
  text-decoration: line-through;
  cursor: default;
}

/* Kenntnisnahme-Karte */
.tm-ack { padding: 14px; display: flex; flex-direction: column; gap: 10px; }

.tm-box:focus-visible,
.tm-pill:focus-visible,
.tm-txt:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
