/* =========================================================
   WorkSkillHub – Design angelehnt an sah-zentralschweiz.ch
   Farben/Schriften zentral hier anpassen (:root).
   Schrift: Barlow + Barlow Condensed (Open Font License).
   Dateien in assets/fonts/ ablegen (siehe README) – sonst Ersatzschrift.
   ========================================================= */

@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("fonts/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("fonts/barlow-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("fonts/barlow-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url("fonts/barlow-700.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("fonts/barlow-condensed-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("fonts/barlow-condensed-700.woff2") format("woff2"); }

:root {
  --red: #e30613;          /* SAH-Rot */
  --red-dark: #b8050f;
  --red-soft: #fdecee;
  --black: #111111;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --line: #e2e2e2;
  --grey-bg: #f4f4f4;      /* graue Flächen (Top-Leiste, Footer) */
  --white: #ffffff;
  --green: #1f8a4c;
  --green-soft: #e6f4ec;
  --amber: #b26b00;
  --amber-soft: #fff4e0;
  --radius: 4px;
  --wrap: 1320px;
  --font: "Barlow", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--text); background: var(--white); }
a { color: var(--text); text-decoration-color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red); }
code { background: var(--grey-bg); padding: 1px 5px; border-radius: 3px; font-size: .9em; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.15; color: var(--black); letter-spacing: -.005em; }
h1 { font-size: 2.4rem; margin: .4em 0 .6em; }
h2 { font-size: 1.5rem; margin: 0 0 .7em; }
h1 .muted, h2 .muted { font-family: var(--font); font-weight: 400; font-size: .5em; letter-spacing: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.devbar { background: #000; color: #fff; text-align: center; padding: 6px; font-weight: 600; font-size: .875rem; }

/* ---------- Header ---------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: relative; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 104px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--black); }
.brand:hover { color: var(--black); }
.brand-logo { height: 58px; width: auto; display: block; }
.brand-mark { width: 12px; height: 56px; background: var(--red); border-radius: 2px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-org { font-weight: 700; font-size: 1.05rem; }
.brand-app { font-family: var(--font-head); font-weight: 600; font-size: 1.7rem; }
.userbox { display: flex; align-items: center; gap: 12px; font-size: .9rem; }
.user-name { font-weight: 600; }
.user-role { color: var(--muted); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius); font-size: 1.3rem; padding: 4px 10px; cursor: pointer; }

.mainnav { background: var(--grey-bg); }
.mainnav .wrap { display: flex; flex-wrap: wrap; gap: 0 22px; }
.mainnav a { display: inline-block; padding: 12px 0 10px; font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent; }
.mainnav a.active, .mainnav a:hover { border-bottom-color: var(--red); color: var(--black); }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: .75rem; line-height: 20px; text-align: center; }

.main { padding-top: 12px; padding-bottom: 64px; min-height: 60vh; }
.site-footer { background: var(--grey-bg); color: var(--muted); font-size: .875rem; padding: 28px 0; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; justify-content: center; font: inherit; font-weight: 600; font-size: .95rem; line-height: 1.2;
       padding: 10px 18px; border-radius: var(--radius); border: 1.5px solid var(--black); background: var(--white); color: var(--black); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--black); color: #fff; }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-success { background: var(--green); border-color: var(--green); color: #fff; }
.btn-success:hover { background: #166b3a; border-color: #166b3a; }
.btn-danger { background: var(--white); border-color: var(--red); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--grey-bg); color: var(--black); }
.btn-whatsapp { background: #25d366; border-color: #25d366; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-ms { width: 100%; }
.ms-logo { display: inline-grid; grid-template-columns: 9px 9px; gap: 2px; margin-right: 6px; }
.ms-logo i { width: 9px; height: 9px; background: #fff; display: block; }

/* ---------- Layout-Bausteine ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.toolbar h1 { margin: .3em 0; }
.toolbar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.inline { display: inline; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.card-flush { padding: 0; overflow: hidden; }
.card-accent { border-left: 5px solid var(--red); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.grid-2 > .card { margin-bottom: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 20px; }
.grid-3 > .card { margin-bottom: 0; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.tile { display: flex; flex-direction: column; padding: 20px 22px; background: var(--grey-bg); border-radius: var(--radius); text-decoration: none; border-bottom: 4px solid transparent; }
.tile:hover { border-bottom-color: var(--red); color: var(--text); }
.tile-num { font-family: var(--font-head); font-weight: 700; font-size: 2.6rem; line-height: 1; color: var(--black); }
.tile-label { color: var(--muted); margin-top: 6px; }
.tile-alert .tile-num { color: var(--red); }

.tabs { display: flex; gap: 40px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs a { font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; color: #8a8a8a; text-decoration: none; padding: 6px 0; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a.active { color: var(--black); border-bottom-color: var(--red); }

.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }

/* ---------- Meldungen ---------- */
.alert { padding: 12px 16px; border-radius: var(--radius); margin: 12px 0; border-left: 4px solid; }
.alert ul { margin: 0; padding-left: 18px; }
.alert-success { background: var(--green-soft); border-color: var(--green); }
.alert-error { background: var(--red-soft); border-color: var(--red); }
.alert-info { background: var(--grey-bg); border-color: var(--muted); }

.status { display: inline-block; white-space: nowrap; padding: 2px 10px; border-radius: 20px; font-size: .8rem; font-weight: 600; text-decoration: none; }
.status-offen { background: var(--amber-soft); color: var(--amber); }
.status-bestaetigt { background: var(--green-soft); color: var(--green); }
.status-info { background: #e8f0fb; color: #1d4f91; }
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); max-height: 240px; overflow-y: auto; }
.picker .check { font-size: .92rem; }
.msg-preview { white-space: pre-wrap; font-family: inherit; background: var(--grey-bg); border-left: 4px solid #25d366; padding: 12px 16px; border-radius: var(--radius); margin: 12px 0; max-width: 640px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 14px; font-weight: 600; }
.crumbs span { color: var(--red); }
.file-name { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.ico { width: 18px; height: 14px; flex: none; border-radius: 2px; display: inline-block; }
.ico-folder { background: #f2c14e; position: relative; top: 1px; }
.ico-file { width: 12px; height: 15px; background: #9a9a9a; clip-path: polygon(0 0, 65% 0, 100% 32%, 100% 100%, 0 100%); }
.ico-word { background: #2b579a; } .ico-excel { background: #217346; } .ico-ppt { background: #c43e1c; }
.ico-pdf { background: #d0021b; } .ico-img { background: #7a5cc4; }
.ico-up { width: 18px; height: auto; background: none; font-weight: 700; color: var(--muted, #777); text-align: center; }
.row-menu { display: inline-block; vertical-align: top; }
.row-menu[open] { display: block; margin-left: auto; width: 260px; }
.row-menu > summary { list-style: none; cursor: pointer; }
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu-panel { margin-top: 6px; background: #fff; border: 1px solid #ddd; border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0,0,0,.12); padding: 12px; width: 260px; text-align: left; white-space: normal; display: grid; gap: 10px; }
.row-menu-panel .form { gap: 6px; margin: 0; }
.journal { list-style: none; margin: 0; padding: 0; }
.journal li { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 150px 1fr; gap: 4px 16px; }
.journal li:last-child { border-bottom: 0; }
.journal .meta { color: var(--muted); font-size: .85rem; }
@media (max-width: 860px) { .journal li { grid-template-columns: 1fr; } }
.status-abgelehnt { background: var(--red-soft); color: var(--red-dark); }

.code { --c: #ccc; display: inline-block; min-width: 2.2em; padding: 1px 6px; border-radius: 3px; text-align: center; font-weight: 700; font-size: .85rem;
        background: color-mix(in srgb, var(--c) 22%, white); border: 1px solid var(--c); color: var(--black); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .9rem; }

.report-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.report-period { font-weight: 600; margin: 8px 0 4px; }
.quote { border-left: 3px solid var(--line); padding-left: 12px; margin: 8px 0; }
.quote-leitung { border-left-color: var(--red); }
.report-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.report-actions input { flex: 1 1 260px; }

/* ---------- Formulare ---------- */
label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .92rem; }
input, select, textarea { font: inherit; font-weight: 400; font-size: 1rem; padding: 9px 11px; border: 1px solid #c9c9c9; border-radius: var(--radius); background: #fff; color: var(--text); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--red); outline-offset: 0; border-color: var(--red); }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--red); }
input[type="search"] { width: 220px; }
.toolbar input[type="date"] { width: auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.span-2 { grid-column: span 2; }
.check, .radio { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.radio-row { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.radio-row legend { font-weight: 600; font-size: .92rem; margin-bottom: 6px; padding: 0; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 0 0; }
.card-flush .form-actions { padding: 16px 20px; border-top: 1px solid var(--line); }
.hint-box { background: var(--amber-soft); border-left: 4px solid var(--amber); padding: 10px 14px; border-radius: var(--radius); font-size: .92rem; }
.login-card { max-width: 460px; margin: 48px auto; }
.devlogin { margin-top: 24px; padding-top: 16px; border-top: 1px dashed var(--line); display: grid; gap: 10px; }

/* ---------- Tabellen ---------- */
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table thead th { background: var(--grey-bg); font-weight: 700; font-size: .85rem; text-transform: none; white-space: nowrap; }
.table tbody tr:hover { background: #fafafa; }
.table td.num, .table th.num { text-align: right; }
.warn { color: var(--red); font-weight: 700; }

.grid { border-collapse: separate; border-spacing: 0; font-size: .85rem; width: 100%; }
.grid th, .grid td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 4px; text-align: center; white-space: nowrap; }
.grid thead th { background: var(--grey-bg); font-weight: 700; position: sticky; top: 0; z-index: 1; }
.grid th.half { font-weight: 600; color: var(--muted); font-size: .75rem; }
.grid .sticky-col { position: sticky; left: 0; background: #fff; text-align: left; padding: 6px 12px; z-index: 2; min-width: 170px; font-weight: 600; }
.grid thead .sticky-col { background: var(--grey-bg); z-index: 3; }
.grid .is-today { background: var(--red-soft); }
.grid thead th.is-today { background: #f9d6d9; }
.grid td.inactive { background: repeating-linear-gradient(45deg, #fafafa, #fafafa 4px, #f0f0f0 4px, #f0f0f0 8px); }
.grid td.cell { position: relative; }
.code-select { --c: transparent; width: 62px; padding: 4px 2px; font-size: .85rem; font-weight: 700; text-align: center; background: color-mix(in srgb, var(--c) 25%, white); border-color: #d5d5d5; }
.partial { font-weight: 700; font-size: .8rem; color: var(--red-dark); margin-left: 2px; }
.pending-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--amber); border: 1.5px solid #fff; box-shadow: 0 0 0 1px var(--amber); }
.grid td.cell .pending-dot { position: absolute; top: 2px; right: 2px; }
.grid td.num { padding: 4px 10px; }
.grid textarea, .grid input[type=text] { font-size: .9rem; padding: 6px 8px; min-width: 200px; }
.grid.act td { text-align: left; vertical-align: top; white-space: normal; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat { background: var(--grey-bg); border-radius: var(--radius); padding: 12px 14px; }
.stat b { display: block; font-family: var(--font-head); font-size: 1.7rem; line-height: 1.1; }
.bar { height: 10px; background: var(--grey-bg); border-radius: 5px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--green); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  h1 { font-size: 1.9rem; }
  .header-inner { min-height: 72px; }
  .brand-mark { height: 40px; width: 9px; }
  .brand-app { font-size: 1.3rem; }
  .brand-logo { height: 42px; }
  .userbox .user-role, .userbox .user-name { display: none; }
  .nav-toggle { display: block; }
  .mainnav { display: none; }
  .mainnav.open { display: block; }
  .mainnav .wrap { flex-direction: column; gap: 0; }
  .mainnav a { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .wrap { padding: 0 16px; }
  .card { padding: 18px; }
  .tabs { gap: 24px; }
  input[type="search"] { width: 100%; }
}

/* ---------- TN «Mein Tag» ---------- */
.today { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 20px; }
.today:empty { display: none; }
.today-card { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--line); border-left: 5px solid var(--black); text-decoration: none; background: #fff; }
.today-card:hover { color: var(--text); border-left-color: var(--red); }
.today-todo { border-left-color: var(--red); background: var(--red-soft); }
.today-ok { border-left-color: var(--green); background: var(--green-soft); }
.today-ok .today-label { color: var(--green); }
.today-sb { border-left-color: #1d4f91; background: #eef3fb; }
.today-sb .today-label { color: #1d4f91; }
.row-mine td { background: var(--green-soft); }
.today-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.today-card strong { font-size: 1.1rem; }
.tn-tiles { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.tn-tiles .tile-num { color: var(--red); }
.green-day { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.green-date { flex: 1 1 260px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.green-date strong { font-size: 1.1rem; }

/* ---------- Monatsrapport ---------- */
.rapport { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; margin-bottom: 28px; }
.rapport-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 3px solid var(--red); padding-bottom: 10px; margin-bottom: 16px; }
.rapport-head h1 { margin: 0; font-size: 2rem; }
.rapport-org { font-weight: 700; color: var(--red); }
.rapport-meta { width: 100%; border-collapse: collapse; font-size: .9rem; margin-bottom: 16px; }
.rapport-meta th { text-align: left; color: var(--muted); font-weight: 600; padding: 3px 10px 3px 0; width: 16%; }
.rapport-meta td { padding: 3px 16px 3px 0; width: 34%; }
.rapport-days th, .rapport-days td { padding: 4px 10px; font-size: .88rem; }
.rapport-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 16px; }
.rapport-sum th, .rapport-sum td { padding: 5px 10px; font-size: .9rem; }
.rapport-sign { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 44px; font-size: .85rem; color: var(--muted); }
.rapport-sign span { display: block; border-bottom: 1px solid var(--black); height: 36px; order: -1; }
.rapport-sign div { display: flex; flex-direction: column-reverse; }

@media print {
  @page { size: A4; margin: 14mm; }
  body { font-size: 11pt; }
  .site-header, .site-footer, .toolbar-actions, .form-actions, .btn, .no-print, .devbar, .alert { display: none !important; }
  .card { border: 0; padding: 0; }
  .main { padding: 0; }
  .rapport { border: 0; padding: 0; margin: 0; page-break-after: always; break-after: page; }
  .rapport:last-of-type { page-break-after: auto; break-after: auto; }
  .rapport-days th, .rapport-days td { padding: 2px 8px; }
  .code { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Standortbestimmungen */
.sb-table td { vertical-align: top; }
.sb-table .input-sm, .sb-table select, .sb-table input { font-size: .85rem; padding: 4px 6px; min-height: 0; }
.sb-table td:nth-child(2) .input-sm { width: 120px; margin-top: 4px; }
.sb-head { min-width: 230px; border-left: 2px solid var(--line); }
.sb-cell { border-left: 2px solid var(--line); min-width: 230px; }
.sb-cell > * + * { margin-top: 6px; }
.sb-kw { font-size: .8rem; font-weight: 700; color: var(--muted); }
.sb-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.sb-row input[type=date] { flex: 1 1 130px; } .sb-row input[type=time] { flex: 0 1 90px; }
.sb-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.sb-more summary { cursor: pointer; color: var(--muted); }
.sb-more input, .sb-more textarea { width: 100%; margin-top: 4px; }
.sb-done { background: var(--green-soft); }
.sb-soon { background: var(--amber-soft); }
.sb-late { background: var(--red-soft); }
.sb-off { background: #f2f2f2; color: var(--muted); }
ul.sb-soon { background: none; }
.sb-table td select[name$="[day_w4]"], .sb-table td select[name$="[day_w8]"] { min-width: 70px; }

/* Unterreiter */
.subnav { display: flex; flex-wrap: wrap; gap: 6px; margin: -8px 0 22px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.subnav a { padding: 6px 14px; border-radius: 999px; text-decoration: none; font-weight: 600; color: var(--text); background: var(--grey, #f4f4f4); }
.subnav a:hover { background: #e9e9e9; color: var(--text); }
.subnav a.active { background: var(--black, #111); color: #fff; }
.subnav .badge { margin-left: 4px; }
.chk { font-weight: 700; } .chk-ok { color: var(--green); } .chk-bad { color: var(--red); }
.laptop-table td.center, .laptop-table th.center { text-align: center; }
.sw-sum { display: grid; gap: 14px; }
.sw-project { border-left: 3px solid var(--line); padding-left: 12px; }
.sw-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.sw-entries { list-style: none; margin: 6px 0 0; padding: 0; } .sw-entries li { padding: 2px 0; font-size: .92rem; }
.sw-day { display: inline-block; min-width: 46px; color: var(--muted); font-variant-numeric: tabular-nums; }
.week-head { font-size: 1.2rem; margin: 24px 0 10px; }
.future-tn .future-main { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: flex-start; }
.future-name { font-size: 1.15rem; }
.prep-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.prep { font-size: .85rem; padding: 3px 10px; border-radius: 999px; text-decoration: none; }
.prep-ok { background: var(--green-soft); color: var(--green); }
.prep-open { background: var(--amber-soft); color: var(--amber); }
.btn-ghost-danger { border-color: transparent; background: transparent; color: var(--red); }
.btn-ghost-danger:hover { background: var(--red); color: #fff; }

/* Warteliste, Abbrüche, Archiv, Auswahl */
.wl-table td { vertical-align: top; }
.wl-table .wl-done { background: var(--green-soft); }
.wl-notes { min-width: 220px; max-width: 360px; }
.wl-start { display: inline-block; text-align: left; }
.wl-start summary { list-style: none; cursor: pointer; }
.wl-start summary::-webkit-details-marker { display: none; }
.wl-start-form { display: grid; gap: 8px; margin-top: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); min-width: 200px; }
.wl-start-form label { font-size: 13px; }
.radio-group { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.radio-group legend { font-weight: 600; margin-bottom: 4px; font-size: 14px; }
.sel-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 12px 16px; margin-bottom: 12px; }
.sel-bar button:disabled { opacity: .45; cursor: not-allowed; }
td.end-month { font-weight: 700; }
.archiv-table input.input-sm { width: 100%; }
/* Statistik */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi { background: var(--white, #fff); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi b { display: block; font-size: 26px; line-height: 1.2; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 13px; color: var(--muted); }
.stat-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; gap: 8px; align-items: center; font-size: 13px; margin: 4px 0; }
.hbar i { display: block; height: 12px; border-radius: 3px; background: var(--red, #c00); min-width: 2px; }
.hbar .hb-track { background: var(--grey-bg, #f2f2f2); border-radius: 3px; }
.hbar em { font-style: normal; font-variant-numeric: tabular-nums; min-width: 2.5em; text-align: right; }
.month-chart { display: flex; gap: 6px; align-items: flex-end; height: 160px; padding-top: 8px; overflow-x: auto; }
.month-chart div { flex: 1 0 28px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; font-size: 11px; }
.month-chart i { display: block; width: 70%; background: var(--red, #c00); border-radius: 3px 3px 0 0; min-height: 1px; }
.month-chart b { font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .hbar { grid-template-columns: 40% 1fr auto; } }
.wl-table td:nth-child(2) { min-width: 230px; }
.wl-actions { margin-top: 8px; }
.wl-actions .btn-row { flex-wrap: nowrap; }
.wl-notes { max-width: 300px; }
/* TN-Tage */
.tage-table { font-size: 12px; }
.tage-table th, .tage-table td { padding: 4px 5px; }
.tage-table .day { text-align: center; min-width: 20px; padding: 4px 2px; font-variant-numeric: tabular-nums; }
.tage-table .we { background: #d9d9d9; }
.tage-table .tot { background: var(--green-soft); white-space: nowrap; }
.tage-table .reason-h { background: var(--amber-soft); }
.tage-table .reason { background: var(--amber-soft); height: 96px; vertical-align: bottom; padding: 4px 2px; }
.tage-table .reason span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-weight: 600; }
.tage-table .reason-c { background: var(--amber-soft); font-weight: 700; }
tr.q-row th { background: var(--green-soft); }
/* Notizen */
.notes-card .note-add { display: grid; gap: 8px; margin-bottom: 16px; }
.notes-card .note-add button { justify-self: start; }
.note { border-top: 1px solid var(--line); padding: 10px 0; }
.note-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; }
.note-text { margin-top: 4px; white-space: normal; }
.note-pinned { background: var(--amber-soft); border: 0; border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; }
.note-edit summary { list-style: none; cursor: pointer; }
.note-edit summary::-webkit-details-marker { display: none; }
.note-edit[open] { flex-basis: 100%; }
.note-edit form { display: grid; gap: 8px; margin-top: 8px; }
.note-link { font-size: 12px; color: var(--muted); white-space: nowrap; }
.note-snippet { color: var(--muted); font-style: italic; margin-top: 4px; }
.doc-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 4px; padding-top: 10px; border-top: 1px dashed var(--line); }
/* To-dos */
.todo-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.todo-col h3 { margin: 0 0 8px; font-size: 16px; }
.todo-other { opacity: .65; }
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-list li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; }
.todo-list li.done .todo-text { color: var(--muted); }
.todo-box { flex: 0 0 22px; width: 22px; height: 22px; border: 2px solid var(--muted); border-radius: 4px; background: var(--white); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; cursor: pointer; padding: 0; color: #fff; line-height: 1; }
.todo-box:hover { border-color: var(--red); }
.todo-box.todo-on { background: var(--green); border-color: var(--green); }
.todo-box.todo-auto { background: #bdbdbd; border-color: #bdbdbd; cursor: default; }
.todo-chip { font-size: 12px; white-space: nowrap; color: var(--amber); font-weight: 600; text-decoration: none; }
.todo-chip.todo-ok { color: var(--green); }
.todo-overview td { vertical-align: top; }
.todo-inline { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 13px; }
.todo-inline-head { margin-right: 4px; }
.todo-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--amber-soft); border-radius: 999px; padding: 3px 10px 3px 4px; }
.todo-pill .todo-box { flex-basis: 18px; width: 18px; height: 18px; }
.todo-box.todo-wait { border-style: dashed; color: var(--muted); cursor: default; background: transparent; }
/* Warteliste direkt bearbeiten */
.wl-edit { min-width: 110px; }
.wl-in { width: 100%; min-width: 90px; font-size: 13px; padding: 4px 6px; border: 1px solid transparent; background: transparent; border-radius: var(--radius); font-family: inherit; }
.wl-in:hover { border-color: var(--line); background: var(--white); }
.wl-in:focus { border-color: var(--red); background: var(--white); outline: none; }
textarea.wl-in { resize: vertical; min-width: 220px; }
.wl-in.saving { background: var(--amber-soft); }
.wl-in.saved { background: var(--green-soft); }
.wl-in.error { border-color: var(--red); background: var(--red-soft); }
.wl-edit .wl-in + .wl-in { margin-top: 2px; }
.wl-in { border-bottom: 1px dashed var(--line); }
.due-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }

/* Wiederholende Absenzen */
.series-box { border: 1px solid var(--line, #dfe3e8); border-radius: 10px; padding: 12px 14px 10px; margin: 0; }
.series-box legend { font-weight: 600; font-size: .92rem; padding: 0 6px; }
.series-row { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.series-row label { min-width: 180px; }
.series-wd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; }
.series-wd label.chk-pill { flex-direction: row; }
.chk-pill { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line, #dfe3e8); border-radius: 999px; padding: 4px 10px; cursor: pointer; font-weight: 500; }
.chk-pill:has(input:checked) { background: #e7f1fb; border-color: #8db7e6; }
.series-info { border-left: 4px solid #8db7e6; }
.report-series { border-left: 4px solid #8db7e6; }
.row-series td { background: #f4f8fd; }
.row-past td { color: #777; }
.section-title { font-size: 1.05rem; margin: 18px 0 8px; }

/* Passwort-Login */
.login-form { display: grid; gap: 12px; margin-top: 12px; }
.login-form label { display: grid; gap: 4px; }
.pw-once-box { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 8px; font-size: 1.05rem; }
.pw-code { font-size: 1.15rem; letter-spacing: .04em; padding: 2px 8px; background: #fff; border: 1px solid #b9d3ee; border-radius: 6px; user-select: all; }
.text-danger { color: #b42318; }
