/* ==========================================================================
   Zeiterfassung – Fachoberfläche (Erfassung, Kalender, Genehmigungen, Report-Druck, Blöcke, Stempeln, Betrieb).
   Rahmen und gemeinsame Bausteine: _content/ItSmith.Portal/portal.css (wird davor geladen).
   ========================================================================== */

/* ---------- Erfassung ---------- */
.quick-hours { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 4px; }

.day-card { overflow: hidden; background: #fff; }
.day-today { border-color: var(--brand-primary) !important; box-shadow: 0 0 0 1px var(--brand-primary); }
.day-holiday { background: color-mix(in srgb, var(--brand-secondary) 5%, #fff); }
.day-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px 8px 16px;
    background: #f8fafb;
    border-bottom: 1px solid #edf0f2;
}
.day-name { font-family: var(--brand-heading-font); font-weight: 600; color: var(--brand-dark); }
.day-date { color: #7a8794; margin-left: 6px; }
.day-total { font-weight: 600; font-variant-numeric: tabular-nums; margin-right: 4px; }

.entry-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px 8px 16px;
    border-bottom: 1px solid #f1f3f5;
}
.entry-row:last-child { border-bottom: 0; }
.entry-row:hover { background: #fafbfc; }
.entry-active { background: color-mix(in srgb, var(--brand-primary) 8%, white) !important; }
.entry-hours {
    min-width: 56px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--brand-dark);
}
.entry-main { flex: 1; min-width: 0; }
.entry-activity { font-weight: 600; }
.entry-desc { color: #6b7783; font-size: var(--font-small); white-space: pre-line; }
/* Beschreibungen mit Zeilenumbrüchen (Report, Genehmigungen) */
.desc-text { white-space: pre-line; overflow-wrap: anywhere; }
.entry-reject { color: #c62828; font-size: var(--font-caption); }
.entry-actions { display: flex; white-space: nowrap; }

/* ---------- Genehmigungen ---------- */
.approval-group { overflow: hidden; }
.approval-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px 10px 4px;
    border-bottom: 1px solid #edf0f2;
    border-left: 4px solid var(--brand-primary);
}
.row-selected { background: color-mix(in srgb, var(--brand-primary) 7%, white); }
.action-bar {
    position: sticky;
    bottom: 16px;
    z-index: 10;
    margin-top: 16px;
}
/* Begründungsfeld in Aktionsleisten (Ablehnen, Entsperren) */
.action-reason { min-width: 240px; flex: 1; }

/* Berichtskopf (Druck) */
.print-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 6px; }
.print-head h2 { margin: 0 0 2px; font-size: 15pt; }
.print-logo { max-height: 42px; max-width: 200px; width: auto; }
/* Invertiert: hell ↔ dunkel tauschen, Farbtöne bleiben erhalten (weißes Logo wird schwarz) */
.print-logo-inverted { filter: invert(1) hue-rotate(180deg); }
.print-id { font-size: 8pt; color: #5a6773; margin: 2px 0 10px; border-top: 1px solid #d5dbe1; padding-top: 3px; }
.print-id-missing { color: #b3261e; font-weight: 600; }

.report-logo-preview { display: inline-flex; background: #fff; border: 1px solid #d5dbe1; border-radius: 6px; padding: 12px 16px; }

/* Kompakte Drucktabelle (Report) */
.print-table { width: 100%; border-collapse: collapse; font-size: 8.5pt; line-height: 1.25; }
.print-table th, .print-table td { border-bottom: 1px solid #d5dbe1; padding: 2px 5px; text-align: left; vertical-align: top; }
.print-table thead th { background: #e8ecf0 !important; font-weight: 600; border-bottom: 1.5px solid #8a96a3;
    -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.print-table thead { display: table-header-group; }   /* Kopfzeile auf jeder Seite wiederholen */
.print-table tr { break-inside: avoid; page-break-inside: avoid; }
.print-table tfoot td { font-weight: 600; border-top: 1.5px solid #8a96a3; border-bottom: none; }
.print-table .num { text-align: right; white-space: nowrap; }
.print-table .nowrap { white-space: nowrap; }
.print-table .print-muted td { color: #6b7782; }
.print-table .print-note { font-size: 7.5pt; color: #b3261e; }

/* ---------- Tageskalender ---------- */
.cal { background: #fff; border: 1px solid #e3e7eb; border-radius: 6px; overflow: clip; }   /* clip statt hidden: sonst könnte das Zeitraster nicht mitlaufen (sticky) */
.cal-toolbar {
    display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
    padding: 6px 12px; background: #f8fafb; border-bottom: 1px solid #edf0f2;
}
.cal-date {
    display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; color: var(--brand-dark);
    width: 13.5em; flex-shrink: 0; white-space: nowrap; font-variant-numeric: tabular-nums;
}
@media (max-width: 420px) { .cal-date { width: 7.5em; flex-direction: column; gap: 0; line-height: 1.15; } }
.cal-weekday { font-family: var(--brand-heading-font); }
.cal-total { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--brand-dark); }

.cal-body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; }
@media (max-width: 960px) { .cal-body { grid-template-columns: 1fr; } }

.cal-grid {
    --slot-h: 24px;
    position: relative;
    user-select: none;
    padding-left: 56px;
    margin-top: 10px;   /* Platz für die erste Uhrzeit (steht halb über der ersten Zeile) */
}
/* Das Zeitraster läuft beim Scrollen mit, solange die (längere) Tätigkeitenliste rechts daneben scrollt – passt es nicht ins
   Fenster, scrollt es mit, bis sein unteres Ende sichtbar ist (timeStickyCols setzt --grid-top). Rückmeldung 12.11.2026. */
@media (min-width: 961px) {
    .cal-grid { position: sticky; top: var(--grid-top, 88px); align-self: start; }
    .widgets-editing .cal-grid { position: relative; }
}
.cal-slot {
    height: var(--slot-h);
    border-top: 1px solid #f1f3f5;
    position: relative;
    cursor: crosshair;
}
.cal-slot.hour { border-top-color: #e3e7eb; }
.cal-slot:hover { background: color-mix(in srgb, var(--brand-primary) 6%, transparent); }
.cal-slot.selecting { background: color-mix(in srgb, var(--brand-primary) 22%, transparent); }
.cal-time {
    position: absolute; left: -52px; top: -8px; width: 44px; text-align: right;
    font-size: var(--font-tiny); color: #8a96a3; font-variant-numeric: tabular-nums;
}

.cal-block {
    position: absolute; /* left/width je nach Überlappung inline */
    margin-top: 1px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--block-color) 16%, #fff);
    border: 1px solid color-mix(in srgb, var(--block-color) 55%, #fff);
    border-left: 4px solid var(--block-color);
    padding: 2px 8px;
    overflow: hidden;
    cursor: pointer;
    font-size: var(--font-caption);
    display: flex; flex-direction: column; gap: 2px;
    transition: box-shadow .1s;
}
.cal-block.draft { border-style: dashed; border-left-style: solid; background: #fafbfc; }
.cal-block.selected { box-shadow: 0 0 0 2px var(--brand-primary); }
.cal-block.drop-target { box-shadow: 0 0 0 2px var(--brand-secondary); background: color-mix(in srgb, var(--brand-secondary) 12%, #fff); }
.cal-block.locked { cursor: default; opacity: .85; }
.cal-block.rejected { border-color: #c62828; }
.cal-block.saving { opacity: .6; }
.cal-block-head { display: flex; align-items: center; gap: 6px; min-height: 18px; }
.cal-block-time { font-variant-numeric: tabular-nums; color: #4b5763; white-space: nowrap; }
/* Zeilenumbrüche der Beschreibung übernehmen; was nicht in den Zeitraum passt, wird unten abgeschnitten (Tooltip zeigt alles) */
.cal-block-desc { color: #6b7783; font-size: var(--font-caption); line-height: 1.25; white-space: pre-line; overflow-wrap: anywhere; overflow: hidden; flex: 1 1 auto; min-height: 0; }
/* Beschreibungs-Editor (Doppelklick): eigene Höhe und volle Kalenderbreite (Lage: EditorStyle in DayCalendar.razor) –
   deckend, mit fester Schrift, damit auch bei sehr niedrigen oder schmalen Zeiträumen nichts durchscheint oder abgeschnitten wird */
.cal-desc-editor {
    position: absolute; z-index: 30; margin-top: 1px; box-sizing: border-box; height: auto; min-height: 0; overflow: visible;
    background: #fff; color: #1f2933; border: 1px solid var(--brand-primary); border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .14); padding: 6px 8px 5px; display: flex; flex-direction: column; gap: 4px;
    cursor: default; font-size: var(--font-caption); line-height: 1.35;
}
.cal-desc-title { color: #4b5763; font-variant-numeric: tabular-nums; }
.cal-desc-editor textarea {
    width: 100%; box-sizing: border-box; resize: vertical; min-height: 54px; font: inherit; font-size: var(--font-small); line-height: 1.35;
    padding: 4px 6px; border: 1px solid #c9d1d9; border-radius: 4px; outline: none; background: #fff; color: #1f2933;
}
.cal-desc-editor textarea:focus { border-color: var(--brand-primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-primary) 20%, transparent); }
.cal-desc-hint { color: #8a949e; font-size: var(--font-tiny); }
.cal-x {
    margin-left: auto; border: 0; background: none; cursor: pointer;
    font-size: var(--font-base); line-height: 1; color: #8a96a3; padding: 0 2px;
}
.cal-x:hover { color: #c62828; }
.cal-tag {
    align-self: flex-start;
    color: #fff; border-radius: 10px; padding: 1px 10px;
    font-weight: 600; font-size: var(--font-caption);
    max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    cursor: grab;
}
.cal-tag[draggable=false] { cursor: default; }
.cal-tag.empty { background: #e8ecf0; color: #6b7783; font-weight: 400; cursor: default; }

.cal-side { padding: 12px; background: #fcfdfd; border-left: 1px solid #edf0f2; }
@media (max-width: 960px) { .cal-side { border-left: 0; border-top: 1px solid #edf0f2; } }
.cal-palette {
    display: flex; flex-direction: column; gap: 4px;
    border-radius: 6px; padding: 2px;
    transition: background .1s;
}
/* Ablage zum Entfernen (Tätigkeitenliste, Favoriten) */
.cal-palette.drop-hint, .cal-favorites.drop-hint { background: #fdecea; outline: 2px dashed #e57373; }
.cal-drop-remove { font-size: var(--font-caption); color: #c62828; text-align: center; padding: 6px; }
.cal-activity {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 10px;
    border: 1px solid #e3e7eb; border-left: 4px solid; border-radius: 4px;
    background: #fff; cursor: grab; font-size: var(--font-small);
    user-select: none;
}
.cal-activity:hover { background: #f5f7f9; }
.cal-activity.active { background: color-mix(in srgb, var(--brand-primary) 10%, #fff); border-color: var(--brand-primary); font-weight: 600; }
.cal-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* Favoriten über den Tätigkeiten: Ablagefläche, beim Ziehen hervorgehoben */
.cal-favorites {
    display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px;
    min-height: 38px; border-radius: 6px; padding: 2px; border: 1px dashed transparent;
    transition: background .1s, border-color .1s;
}
.cal-favorites.fav-drop { background: color-mix(in srgb, var(--brand-primary) 8%, #fff); border-color: var(--brand-primary); }
.cal-fav-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-fav .cal-x { visibility: hidden; }
.cal-fav:hover .cal-x { visibility: visible; }
@media (hover: none) { .cal-fav .cal-x { visibility: visible; } }
.cal-fav-empty { font-size: var(--font-caption); color: #8a949e; text-align: center; padding: 8px 6px; border: 1px dashed #c9d1d9; border-radius: 4px; }
.cal-untimed { display: flex; align-items: center; gap: 8px; font-size: var(--font-small); padding: 4px 0; border-bottom: 1px solid #f1f3f5; }
.entry-time { font-weight: 400; color: #6b7783; font-size: var(--font-caption); margin-left: 6px; font-variant-numeric: tabular-nums; }

/* Kalender: Aufteilung & Überlappung */
.cal-grid.is-selecting .cal-block { pointer-events: none; opacity: .75; }
.cal-grid::after {
    /* freier Streifen rechts: hier lassen sich jederzeit neue (auch überlappende) Zeiträume markieren */
    content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 34px;
    background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(0,0,0,.025) 6px 12px);
    pointer-events: none;
}
.cal-tags { display: flex; flex-wrap: wrap; gap: 3px; }
.cal-tag.rejected { outline: 2px solid #c62828; outline-offset: 1px; }

/* Kalender: Kontextmenü */
.cal-grid:focus { outline: none; }
.cal-block { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.cal-ctx-backdrop { position: fixed; inset: 0; z-index: 1400; }
.cal-ctx {
    position: fixed; z-index: 1401; min-width: 220px; max-height: calc(100vh - 16px); overflow-y: auto;
    background: #fff; border-radius: 6px; padding: 4px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .18), 0 1px 3px rgba(0, 0, 0, .12);
}
/* Einträge einheitlich linksbündig (Buttons zentrieren Inhalt sonst je nach Browser/Theme) */
.cal-ctx-item {
    display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%;
    padding: 8px 12px; border: 0; background: none; border-radius: 4px;
    font: inherit; font-size: var(--font-base); text-align: left; cursor: pointer; color: #2b3540;
}
.cal-ctx-item:hover:not(:disabled) { background: #f1f4f7; }
.cal-ctx-item.danger { color: #c62828; }
.cal-ctx-item:disabled { opacity: .5; cursor: default; }
.cal-ctx-note { font-size: var(--font-caption); color: #8a96a3; padding: 4px 12px 6px; }
.cal-ctx-label { flex: 1 1 auto; text-align: left; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ctx-sub .cal-ctx-item .cal-dot { flex: none; }

/* ---------- Arbeitszeitregeln: Hinweise/Warnungen/Verstöße ---------- */
.issue-list { display: flex; flex-direction: column; gap: 6px; }
.issue {
    display: flex; align-items: flex-start; gap: 8px; padding: 6px 10px; border-radius: 6px;
    font-size: var(--font-small); line-height: 1.35; border-left: 3px solid;
}
.issue .mud-icon-root { font-size: var(--font-large); margin-top: 1px; flex-shrink: 0; }
.issue-violation { background: #fdecea; border-left-color: #c62828; color: #7f1d1d; }
.issue-violation .mud-icon-root { color: #c62828; }
.issue-warning { background: #fff4e5; border-left-color: #ef8a00; color: #6b3d00; }
.issue-warning .mud-icon-root { color: #ef8a00; }
.issue-info { background: #eef6fb; border-left-color: var(--brand-primary); color: #23465a; }
.issue-info .mud-icon-root { color: var(--brand-primary); }
.issue-label { font-weight: 700; margin-right: 4px; }
.issue-law { display: block; font-size: var(--font-tiny); opacity: .75; margin-top: 2px; }

/* Wochen-/Monatskarte */
.summary-grid { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; font-size: var(--font-base); margin-top: 6px; }
.summary-grid strong { font-variant-numeric: tabular-nums; text-align: right; }
.summary-grid .pos { color: #2e7d32; }
.summary-grid .neg { color: #c62828; }
.entry-row.entry-pause { opacity: .7; }

/* Tageskalender: Warnungen, Pausen, Verschieben */
.cal-issues { padding: 8px 12px; border-bottom: 1px solid #eef1f4; }
.cal-block.pause {
    background: repeating-linear-gradient(135deg, #f6f7f8, #f6f7f8 6px, #eceff2 6px, #eceff2 12px);
    border-left-color: #9aa5b1;
}
.cal-block[data-move] { cursor: grab; touch-action: pan-y; }
.cal-block.move-armed { box-shadow: 0 0 0 2px var(--brand-secondary); }
.cal-block.moving {
    cursor: grabbing; z-index: 30; opacity: .92; transition: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18), 0 0 0 2px var(--brand-primary);
}
.cal-block.moving::after {
    content: attr(data-move-label);
    position: absolute; right: 6px; top: 4px; padding: 1px 6px; border-radius: 4px;
    background: var(--brand-dark, #1d2b36); color: #fff; font-size: var(--font-tiny); font-weight: 600;
}
.cal-palette-sep {
    font-size: var(--font-tiny); text-transform: uppercase; letter-spacing: .04em; color: #8a96a3;
    margin: 8px 2px 2px;
}

/* Tageskalender: Anfasser zum Ändern von Beginn/Ende */
.cal-resize {
    position: absolute; left: 0; right: 0; height: 8px; z-index: 2;
    cursor: ns-resize; touch-action: none;
}
.cal-resize.top { top: -2px; }
.cal-resize.bottom { bottom: -2px; }
.cal-resize::after {
    content: ""; position: absolute; left: 50%; width: 28px; height: 4px; margin-left: -14px; border-radius: 2px;
    background: var(--block-color, #9aa5b1); opacity: 0; transition: opacity .12s;
}
.cal-resize.top::after { top: 2px; }
.cal-resize.bottom::after { bottom: 2px; }
.cal-block:hover .cal-resize::after, .cal-block.selected .cal-resize::after, .cal-block.resizing .cal-resize::after { opacity: .9; }
@media (pointer: coarse) {
    .cal-resize { height: 14px; }
    .cal-block.selected .cal-resize::after { opacity: 1; }
}
.cal-block.resizing {
    z-index: 30; transition: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18), 0 0 0 2px var(--brand-primary);
}
.cal-block.resizing::after {
    content: attr(data-move-label);
    position: absolute; right: 6px; top: 4px; padding: 1px 6px; border-radius: 4px;
    background: var(--brand-dark, #1d2b36); color: #fff; font-size: var(--font-tiny); font-weight: 600;
}

/* Kontextmenü: Teilen & Tätigkeiten */
.cal-ctx-row { display: flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: var(--font-small); }
.cal-ctx-chip {
    min-width: 30px; height: 26px; border-radius: 6px; border: 1px solid #d5dbe1; background: #fff;
    font-weight: 600; cursor: pointer; font-family: inherit;
}
.cal-ctx-chip:hover:not(:disabled) { border-color: var(--brand-primary); color: var(--brand-primary); }
.cal-ctx-chip:disabled { opacity: .4; cursor: default; }
.cal-ctx-caret { color: #8a96a3; font-size: var(--font-caption); }
.cal-ctx-sub { max-height: 280px; overflow-y: auto; padding-bottom: 4px; background: #fafbfc; }
.cal-ctx-sub .cal-ctx-item { padding-left: 22px; }
.cal-ctx-search { padding: 6px 8px 2px; min-width: 260px; }   /* Tätigkeitssuche im Untermenü (ZE7) */
.cal-ctx-group {
    font-size: var(--font-tiny); text-transform: uppercase; letter-spacing: .04em; color: #8a96a3; padding: 8px 12px 2px;
}
.cal-ctx-sep { height: 1px; background: #eef1f4; margin: 4px 0; }

/* Wochen-Navigation "Meine Zeiten" */
.week-nav { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
/* Anordnen-Knopf neben der Wochen-Navigation: an deren Knopfreihe ausrichten, nicht an der Mitte samt Beschriftung */
.page-actions .arrange-btn { align-self: flex-end; display: flex; align-items: flex-end; }
.page-actions .arrange-btn .mud-icon-button { padding: 5px; }   /* 24 px Symbol + 2 × 5 px = Höhe der KW-Knöpfe (zwei Textzeilen) */
.week-nav-label { text-transform: uppercase; letter-spacing: .06em; color: #8a96a3; }
.week-nav .mud-button-root { white-space: nowrap; }
.week-nav .week-nav-current { min-width: 176px; text-transform: none; padding-top: 3px; padding-bottom: 3px; }
.week-nav-stack { display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.week-nav-kw { font-weight: 600; letter-spacing: .01em; }
.week-nav-hint { font-size: var(--font-tiny); opacity: .85; font-weight: 400; }

/* Schnelloptionen: Vorschau "Tag übernehmen" */
.copy-preview { max-height: 180px; overflow-y: auto; border: 1px solid #eef1f4; border-radius: 6px; }
.copy-preview-row { display: flex; gap: 8px; align-items: center; padding: 4px 8px; font-size: var(--font-small); border-bottom: 1px solid #f3f5f7; }
.copy-preview-row:last-child { border-bottom: none; }

/* Rufbereitschaft: dezent schraffiert, Einsätze (Arbeit) liegen daneben */
.cal-block.standby {
    background: repeating-linear-gradient(135deg, #eef6fb, #eef6fb 6px, #e1eef7 6px, #e1eef7 12px);
    border-style: dashed; border-left-style: solid;
}

/* Lohnvorschau */
.payslip-table { width: 100%; border-collapse: collapse; font-size: var(--font-base); }
.payslip-table th { text-align: left; font-size: var(--font-tiny); text-transform: uppercase; letter-spacing: .05em; color: #8a96a3; padding: 14px 6px 4px; font-weight: 600; }
.payslip-table thead:first-child th { padding-top: 0; }
.payslip-table td { padding: 4px 6px; border-bottom: 1px solid #f1f3f5; vertical-align: top; }
.payslip-table td.num, .payslip-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.payslip-table td:nth-child(2) { font-size: var(--font-caption); }
.payslip-table tr.sum td { font-weight: 700; border-top: 1px solid #d5dbe1; }
.payslip-table tr.total td { font-weight: 700; font-size: var(--font-large); color: var(--brand-dark); background: color-mix(in srgb, var(--brand-primary) 7%, #fff); }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 14px; }

/* Buchen für andere */
.onbehalf-bar { border-left: 4px solid #ef8a00; }

/* Gruppen: Mitgliederliste */

/* ---------- Report-Druck: Abschnitte und Fußzeile ---------- */
.print-section-title { font-size: 11pt; margin: 6px 0 4px; }
.print-table .print-subtotal td { font-weight: 600; border-top: 1px solid #8a96a3; background: #f3f5f7 !important;
    -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.print-table .print-total td { font-weight: 700; border-top: 1.5px solid #333; border-bottom: none; }
.print-table tfoot.print-footer-space td { height: 11mm; border: none !important; padding: 0 !important; }
@media print {
    /* Jede Woche bzw. jeder Monat beginnt auf einer neuen Seite */
    .print-section + .print-section { break-before: page; page-break-before: always; }
    /* Fußzeile mit Bericht-ID auf jeder Seite */
    .print-only.print-footer {
        display: flex; justify-content: space-between; gap: 12px;
        position: fixed; left: 8mm; right: 8mm; bottom: 2mm;
        font-size: 7.5pt; color: #5a6773; background: #fff;
        border-top: 1px solid #d5dbe1; padding: 3px 2mm 0;
    }
}

/* ---------- Verschiebbare Blöcke auf "Meine Zeiten": Spalten, Griffe und Vorschau liegen im Portal (portal.css, auch Profilseite);
   hier nur das Mitlaufen der Spalten ---------- */
.widgets-editing .widget-col.sticky-col { position: static; }
/* Hohe Kalender-Spalte: läuft mit, bis ihr unteres Ende sichtbar ist (timeStickyCols setzt data-tall und --stick-top) */
.widget-col.sticky-tall[data-tall] { position: sticky; top: var(--stick-top, 0px); }
.widgets-editing .widget-col.sticky-tall[data-tall] { position: static; }
@media (max-width: 959px) { .widget-col.sticky-tall[data-tall] { position: static; } }
/* Ziehen und Ablegen: portal.css (portalWidgets) */
.widget-empty { color: var(--mud-palette-text-secondary); text-align: center; padding: 32px 8px; font-size: var(--font-base); }

/* Blöcke auf „Meine Zeiten“ – Rahmen, einstellbar unter System › Organisation & Design */
.widgets { --wf-radius: 10px; --wf-line: rgba(15, 30, 45, .09); }
.widget-card { border-radius: var(--wf-radius) !important; background: var(--mud-palette-surface, #fff); }
.wf-subtle .widget-card { border: 1px solid var(--wf-line); box-shadow: 0 1px 2px rgba(15, 30, 45, .04); }
.wf-line .widget-card { border: 1px solid rgba(15, 30, 45, .2); box-shadow: none; }
.wf-shadow .widget-card { border: none; box-shadow: 0 1px 2px rgba(15, 30, 45, .06), 0 3px 10px rgba(15, 30, 45, .07); }
.wf-accent .widget-card { border: 1px solid var(--wf-line); border-top: 3px solid var(--brand-primary); box-shadow: 0 1px 2px rgba(15, 30, 45, .04); }
.wf-none .widget-card { border: none; box-shadow: none; }
/* Vorschau in den Admin-Einstellungen */
.wf-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; padding: 16px;
    background: var(--mud-palette-background, #f5f7fa); border-radius: 8px; }
.wf-preview .widget-card { padding: 14px 16px; min-height: 84px; }
.wf-preview-line { height: 8px; border-radius: 4px; background: #e8ecf0; margin-top: 8px; }

/* Stempeln */
.clock-running { display: flex; align-items: center; gap: 14px; }
.clock-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--mud-palette-success, #2e7d32); flex: none;
    box-shadow: 0 0 0 0 rgba(46, 125, 50, .5); animation: clock-pulse 1.8s ease-out infinite; }
@keyframes clock-pulse { 0% { box-shadow: 0 0 0 0 rgba(46, 125, 50, .45); } 70% { box-shadow: 0 0 0 10px rgba(46, 125, 50, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0); } }
@media (prefers-reduced-motion: reduce) { .clock-dot { animation: none; } }
.clock-elapsed { font-size: calc(var(--font-base) * 2.25); font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--brand-dark); }
.cal-block.running { background-image: repeating-linear-gradient(135deg, transparent 0 8px, rgba(255, 255, 255, .18) 8px 16px); }
.cal-block.running .cal-block-time::before { content: "● "; color: #43a047; }

/* Aktionsleiste über einer fixierten Fußzeile (Fußzeile: Portal) */
body:has(.app-footer.fixed) .action-bar { bottom: calc(var(--footer-height, 44px) + 16px); }

/* Tätigkeiten-Hierarchie: Gruppen (nicht buchbar) in Auswahllisten und in der Kalender-Palette */
.activity-group { font-weight: 600; color: #6b7783; }
.cal-ctx-heading { font-size: var(--font-caption); font-weight: 600; color: #6b7783; padding: 4px 12px 2px; }
.cal-activity.cal-activity-group { cursor: default; background: #f5f7f9; border-left-color: #c9d1d9; color: #6b7783; font-weight: 600; }

/* Zeit erfassen › Sammelbearbeitung: Liste der markierten Zeiträume */
.edit-groups td { padding: 2px 8px; font-size: var(--font-caption); }

/* Tätigkeiten: gerade bearbeiteter Eintrag in der Liste */
.activity-row-selected > td { background-color: var(--mud-palette-primary-hover); }

/* Kalender: Vorschläge aus der Projektverwaltung */
/* Breite: Meldungstext füllt den Rest neben dem Symbol und darf schrumpfen (min-width: 0) – sonst schiebt der nicht umbrechende
   Name die Karten über den Rand (Rückmeldung 18.11.2026) */
.planned-proposals { overflow: hidden; }
/* Vorschläge oben auf „Meine Zeiten“ neben „Zeiten von“ (Versuch 18.11.2026): füllt den Rest der Leiste, darf schrumpfen */
.top-proposals { flex: 1 1 420px; min-width: 0; }
/* Schwebend: Kopfzeile bleibt in der Leiste, der aufgeklappte Inhalt liegt darunter über der Seite (Leiste wächst nicht) */
.planned-floating { position: relative; }
.planned-floating .planned-proposals { overflow: visible; }
.planned-floating .planned-body {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 1050;   /* über klebenden Spalten, unter Menüs und Dialogen */
    background: var(--mud-palette-surface); border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius); box-shadow: var(--mud-elevation-8);
    padding: 8px 12px; max-height: 70vh; overflow-y: auto;
}
.planned-proposals .mud-alert-message { flex: 1 1 auto; min-width: 0; }
/* Vorschläge je Karte (Rückmeldung 18.11.2026): Name oben, Zeitraum links und Knöpfe rechts darunter – einheitlich */
.planned-list { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; min-width: 0; }
.planned-card { border: 1px solid var(--mud-palette-lines-default); border-left: 3px solid var(--mud-palette-primary);
                border-radius: var(--mud-default-borderradius); padding: 4px 8px; background: var(--mud-palette-background-gray); min-width: 0; }
/* width 0 + min-width 100 %: der Name trägt nichts zur Mindestbreite bei (sonst wüchse ein umgebender Kalender-Bereich mit) und füllt
   trotzdem die Karte – lange Namen enden mit „…“ (Rückmeldung 18.11.2026) */
.planned-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; width: 0; min-width: 100%; }
.planned-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.planned-time { font-variant-numeric: tabular-nums; color: var(--mud-palette-text-secondary); }
/* Pause zwischen den Vorschlägen (Rückmeldung 18.11.2026) */
.planned-break { font-size: var(--font-caption); color: var(--mud-palette-text-secondary); padding: 0 8px 0 11px;
                 border-left: 3px dashed var(--mud-palette-lines-default); font-variant-numeric: tabular-nums; }

/* Woche / Monat auf „Meine Zeiten“ (PeriodCalendar): Tage markieren, je Tag Summe und Buchungen */
.period-cal { user-select: none; }
.period-toolbar { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 4px 0; }
.period-label { font-weight: 600; min-width: 11em; text-align: center; }
.period-total { font-weight: 600; font-variant-numeric: tabular-nums; margin-left: 8px; }
.period-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.period-weekday { font-size: var(--font-tiny); color: #8a96a3; text-align: center; text-transform: uppercase; }
.period-day {
    border: 1px solid #e3e7eb; border-radius: 6px; padding: 4px 6px; cursor: pointer; background: var(--mud-palette-surface);
    display: flex; flex-direction: column; gap: 2px; overflow: hidden;
    /* Touch: kurz halten zum Markieren – ohne Textauswahl und Bildmenü des Browsers (periodTouch in app.js) */
    -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
}
.period-week .period-day { min-height: 9em; }
.period-month .period-day { min-height: 6em; }
.period-day:hover { border-color: color-mix(in srgb, var(--brand-primary) 50%, #e3e7eb); }
.period-weekend, .period-holiday-day { background: #f6f8fa; }
.period-outside { opacity: .45; }
.period-today { border-color: var(--brand-primary); }
.period-selected { background: color-mix(in srgb, var(--brand-primary) 16%, #fff); border-color: var(--brand-primary); }
.period-day-head { display: flex; align-items: center; gap: 4px; }
.period-day-number { font-weight: 600; font-size: var(--font-small); }
.period-day-sum { margin-left: auto; font-size: var(--font-caption); font-variant-numeric: tabular-nums; color: #5c6b7a; }
.period-open { border: none; background: none; cursor: pointer; color: #8a96a3; font-size: var(--font-base); line-height: 1; padding: 0 2px; }
.period-day-number + .period-open { margin-left: auto; }   /* ohne Summe rechtsbündig */
.period-holiday { font-size: var(--font-tiny); color: var(--mud-palette-secondary); }
.period-entry { display: flex; align-items: center; gap: 4px; font-size: var(--font-tiny); }
.period-entry-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; min-width: 0; }
.period-entry-hours { font-variant-numeric: tabular-nums; color: #5c6b7a; }
.period-more { font-size: var(--font-tiny); color: #8a96a3; }
@media (max-width: 600px) { .period-grid.period-week { grid-template-columns: 1fr; } .period-grid.period-week .period-weekday { display: none; } }

/* Tätigkeitssuche über Auswahllisten (ActivitySearchField): Treffer direkt unter dem Feld */
/* Zeiten importieren, Schritt 3: feste Raster statt Flex-Umbruch – Beschriftung | Feld, und im Feld Suchfeld | Auswahl.
   Der Text bricht innerhalb seiner Spalte um, die Felder bleiben in ihrer Zeile; erst auf schmalen Bildschirmen stapeln sie sich. */
.import-map-row { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(0, 2fr); gap: 12px; align-items: start; }
.import-map-label { padding-top: 10px; overflow-wrap: anywhere; }
.import-activity-select { display: grid; grid-template-columns: minmax(140px, 190px) minmax(0, 1fr); gap: 8px; align-items: start; }
.import-activity-select:not(:has(.import-activity-search)) { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 600px) {
    .import-map-row, .import-activity-select { grid-template-columns: minmax(0, 1fr); }
    .import-map-label { padding-top: 0; }
}
.import-activity-search { min-width: 0; position: relative; }
.import-section { background: var(--mud-palette-background-gray, #fafafa); }
.import-activity-search .activity-hits { position: absolute; left: 0; right: 0; z-index: 5; box-shadow: var(--mud-elevation-4); }
/* Suchfeld in einer Filterzeile (Bericht, Korrekturen): Treffer schweben über dem Inhalt statt ihn nach unten zu schieben (Rückmeldung 13.11.2026) */
.activity-search-float { position: relative; }
.activity-search-float .activity-hits { position: absolute; left: 0; z-index: 5; width: max-content; min-width: 100%; max-width: 420px; box-shadow: var(--mud-elevation-4); }
/* Schritt 4: Tag, Stunden und Tätigkeit je Zeile änderbar; abgelehnte Zeilen gedämpft (Rückmeldung 12.11.2026) */
.import-preview .edit-cell .mud-input-control { margin: 0; }
.import-preview .date-edit { width: 10em; }
.import-preview .hours-edit { width: 5.5em; }
.import-preview .hours-edit input { text-align: right; }
.import-preview .activity-edit { min-width: 12em; max-width: 22em; }
.import-preview .row-actions { white-space: nowrap; }
.import-preview .origin { font-size: var(--font-tiny); line-height: 1.3; }
/* Bericht: Tage abwechselnd hinterlegt, Tages- und Wochensummen als Zeilen (nur Seite – die Tabelle ist no-print; Rückmeldung 13.11.2026) */
.report-table tr.day-odd:not(:hover) td { background: #f7f9fb; }
.report-table tr.sum-row td { background: #eef3f8; border-top: 1px solid #d5dde6; }
.report-table tr.sum-row .sum-label { font-weight: 600; }
.report-table tr.week-sum td { background: #e3ebf4; border-bottom: 2px solid #b9c7d6; }
.report-table tr.sum-row:hover td { background: #e6edf5; }
.report-switches { border-top: 1px solid var(--mud-palette-lines-default); margin-top: 4px; padding-top: 4px !important; }
.preset-divider { height: 1.6em; align-self: center; }
/* Auswertungen: Kacheln je Mitarbeiter (Soll/Ist, Urlaub) – Rückmeldung 14.11.2026 */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.kpi-card .kpi-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi-card .kpi-label { font-size: var(--font-small); text-transform: uppercase; letter-spacing: .05em; color: #6b7682; }
.kpi-card .kpi-small { font-size: var(--font-small); }
.kpi-positive { color: var(--mud-palette-success); }
.kpi-negative { color: var(--mud-palette-error); }
.kpi-table td.num, .kpi-table th.num { text-align: right; white-space: nowrap; }
.import-preview tr.pause td, .month-overview tr.pause td { background: #eef1f4; }      /* Pausen etwas dunkler */
.import-preview tr.rejected td { background: #fffaf3; }
.import-preview tr.rejected.pause td { background: #f6f1ea; }
.import-preview tr.day-sum td { background: #eef3f8; border-top: 1px solid #d5dde6; }
.import-preview tr.month-header td { background: #e3ebf4; border-top: 2px solid #b9c7d6; cursor: pointer; user-select: none; }
.import-preview tr.month-header:hover td { background: #d9e4f0; }
.month-overview tr.rejected td { color: var(--mud-palette-text-secondary); background: #fffaf3; }
.month-overview td.row-actions { white-space: nowrap; }
/* Monats- und Tätigkeitsübersicht nebeneinander; erst im schmalen Fenster untereinander – sonst rutschte die rechte Tabelle beim
   Ablehnen eines Monats (andere Spaltenbreiten) nach unten (Rückmeldung 14.11.2026) */
.import-overviews { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
@media (min-width: 1280px) { .import-overviews { flex-wrap: nowrap; } }
.month-overview td, .month-overview th { white-space: nowrap; }
/* Monatsübersicht behält ihre Breite (kein waagrechtes Scrollen); die Tätigkeitsübersicht nimmt den Rest, lange Namen gekürzt
   mit „…“ und Tooltip (Rückmeldung 14.11.2026) */
.import-overviews > .month-overview-box { flex: 0 0 auto; }
.import-overviews > .activity-sums-box { flex: 1 1 320px; min-width: 0; max-width: 100%; }
.activity-sums { width: 100%; }
.activity-sums .mud-table-container { overflow-x: hidden; }
.activity-sums td.activity-name { max-width: 0; width: 100%; overflow: hidden; text-overflow: ellipsis; }
.import-preview tr.rejected .desc-text, .import-preview tr.rejected .mud-td:nth-child(2) { color: var(--mud-palette-text-secondary); }
.activity-hits { margin-top: 2px; border: 1px solid #dfe3e8; border-radius: 4px; max-height: 280px; overflow-y: auto; background: var(--mud-palette-surface); }
.activity-hit { display: flex; align-items: center; gap: 6px; padding: 6px 8px; font-size: var(--font-small); cursor: pointer; border-bottom: 1px solid #f1f3f5; }
.activity-hit:last-child { border-bottom: none; }
.activity-hit:hover, .activity-hit:focus { background: var(--mud-palette-action-default-hover); outline: none; }
.activity-hit.chosen { font-weight: 500; color: var(--mud-palette-primary); }
.activity-hits-note { font-size: var(--font-caption); color: #8a949e; padding: 6px 8px; }
