/* LPM Haustechnik - Zeiterfassung. Schrift lokal eingebunden (keine externen Anfragen). */
@font-face { font-family: 'Josefin Sans'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('/assets/fonts/josefin-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Josefin Sans'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('/assets/fonts/josefin-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --brand: #175872; --brand-dark: #0e3a4c; --ink: #082530; --text: #1b2733; --muted: #5b6b7a;
  --bg: #f3f6f7; --card: #ffffff; --line: #dbe4ec; --soft: #e8f1f5;
  --green: #17855a; --green-bg: #e3f5ec; --amber: #9a6208; --amber-bg: #fff3d6; --red: #b3261e; --red-bg: #fde8e6;
  --violet: #5b3fb0; --violet-bg: #ece7fb; --gray: #536270; --gray-bg: #e9eef2; --blue-bg: #dff0f8;
  --radius: 12px; --shadow: 0 1px 2px rgba(11,22,34,.06), 0 4px 14px rgba(11,22,34,.05);
  --num: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Josefin Sans', Arial, Helvetica, sans-serif; font-size: 17px; line-height: 1.5; color: var(--text); background: var(--bg); }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0 0 .6rem; font-weight: 700; }
h1 { font-size: 1.8rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
a { color: var(--brand-dark); }
a:hover { color: var(--brand); }
p { margin: 0 0 .8rem; }
.muted { color: var(--muted); } .small { font-size: .88rem; } .right { text-align: right; } .nowrap { white-space: nowrap; } .center { text-align: center; }
.mono { font-family: ui-monospace, Consolas, monospace; }
[hidden] { display: none !important; }

/* ---- Kopfleiste und Navigation ---- */
.topbar { background: #fff; color: var(--text); position: sticky; top: 0; z-index: 40; border-bottom: 3px solid #1f94c9; box-shadow: 0 2px 8px rgba(8,37,48,.08); }
.topbar-in { max-width: 1400px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 46px; width: auto; display: block; }
.nav { display: flex; gap: 2px; margin-left: 8px; flex: 1; flex-wrap: wrap; }
.nav a { color: var(--text); text-decoration: none; padding: 8px 8px; border-radius: 8px; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.nav a:hover { background: var(--soft); color: var(--brand-dark); }
.nav a.on { background: var(--brand); color: #fff; }
.user-box { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--muted); }
.user-box form { margin: 0; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 8px; padding: 7px 11px; font: inherit; cursor: pointer; margin-left: auto; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 22px 16px 60px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.footer { text-align: center; color: var(--muted); font-size: .82rem; padding: 18px 16px 30px; }

/* ---- Karten und Raster ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 18px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.g21 { grid-template-columns: 2fr 1fr; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 18px; border-left: 5px solid var(--brand); }
.kpi .label { color: var(--muted); font-size: .86rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kpi .value { font-family: var(--num); font-size: 1.85rem; font-weight: 700; color: var(--ink); line-height: 1.2; }
.kpi .sub { color: var(--muted); font-size: .85rem; }
.kpi.green { border-left-color: var(--green); } .kpi.amber { border-left-color: #d9922a; } .kpi.red { border-left-color: var(--red); } .kpi.violet { border-left-color: var(--violet); }
.up { color: var(--green); } .down { color: var(--red); }

/* ---- Tabellen ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-family: var(--num); font-size: .93rem; }
th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 2px solid var(--line); padding: 8px 10px; white-space: nowrap; background: #fafcfd; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:hover td { background: #f8fbfd; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tfoot td { font-weight: 700; background: var(--soft); border-bottom: 0; }
.row-link { cursor: pointer; }
.empty { padding: 26px; text-align: center; color: var(--muted); }

/* ---- Formulare ---- */
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 4px; color: var(--ink); }
input[type=text], input[type=password], input[type=email], input[type=date], input[type=time], input[type=number], input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: 10px 12px; border: 1.5px solid #b9c7d3; border-radius: 9px; background: #fff; color: var(--text); }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid rgba(31,148,201,.4); outline-offset: 1px; border-color: var(--brand); }
.field { margin-bottom: 14px; }
.form-grid { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.hint { color: var(--muted); font-size: .84rem; margin-top: 3px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 14px; max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; padding: 10px; }
.checks label, label.inline { display: flex; gap: 8px; align-items: center; font-weight: 400; margin: 0; padding: 3px 2px; cursor: pointer; }
input[type=checkbox], input[type=radio] { width: 19px; height: 19px; accent-color: var(--brand); flex: none; }
.filter { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filter .field { margin: 0; min-width: 150px; flex: 1; }
.duration-preview { background: var(--soft); border-radius: 9px; padding: 10px 14px; font-family: var(--num); font-weight: 600; color: var(--brand-dark); }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 700; font-size: .98rem; padding: 10px 18px; border-radius: 9px; border: 1.5px solid var(--brand); background: var(--brand); color: #fff; text-decoration: none; cursor: pointer; line-height: 1.2; min-height: 44px; }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn.secondary { background: #fff; color: var(--brand-dark); }
.btn.secondary:hover { background: var(--soft); color: var(--brand-dark); }
.btn.danger { background: var(--red); border-color: var(--red); } .btn.danger:hover { background: #8e1d17; border-color: #8e1d17; }
.btn.danger.secondary { background: #fff; color: var(--red); } .btn.danger.secondary:hover { background: var(--red-bg); color: var(--red); }
.btn.green { background: var(--green); border-color: var(--green); } .btn.green:hover { background: #0f6a47; border-color: #0f6a47; }
.btn.small { padding: 6px 12px; min-height: 36px; font-size: .88rem; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.inline-form { display: inline; margin: 0; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--brand-dark); text-decoration: underline; cursor: pointer; }

/* ---- Hinweise und Status ---- */
.alert { border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; border: 1px solid; font-weight: 500; }
.alert.success { background: var(--green-bg); border-color: #9bd9bb; color: #0f5a3b; }
.alert.error { background: var(--red-bg); border-color: #f1b5b0; color: #8e1d17; }
.alert.info { background: var(--blue-bg); border-color: #a9cfec; color: #0a4f7f; }
.alert.warn { background: var(--amber-bg); border-color: #efd08c; color: #6f4605; }
.alert ul { margin: 4px 0 0; padding-left: 20px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; font-family: var(--num); }
.badge-gray { background: var(--gray-bg); color: var(--gray); } .badge-green { background: var(--green-bg); color: var(--green); }
.badge-amber { background: var(--amber-bg); color: var(--amber); } .badge-red { background: var(--red-bg); color: var(--red); }
.badge-violet { background: var(--violet-bg); color: var(--violet); } .badge-blue { background: var(--blue-bg); color: var(--brand-dark); }
.secret-box { font-family: ui-monospace, Consolas, monospace; font-size: 1.35rem; letter-spacing: .06em; background: var(--ink); color: #fff; border-radius: 10px; padding: 16px 20px; word-break: break-all; user-select: all; }

/* ---- Diagramme (per JS erzeugt) ---- */
.chart { width: 100%; }
.chart svg { width: 100%; height: auto; display: block; font-family: var(--num); }
.chart .axis { stroke: var(--line); } .chart .tick { fill: var(--muted); font-size: 11px; }
.chart .bar { fill: var(--brand); } .chart .bar:hover { fill: var(--brand-dark); }
.chart .bar.last { fill: var(--ink); }
.chart .line-a { stroke: var(--brand); fill: none; stroke-width: 2.6; } .chart .line-b { stroke: #9bb3c7; fill: none; stroke-width: 2; stroke-dasharray: 5 4; }
.chart .dot { fill: var(--brand); }
.legend { display: flex; gap: 16px; font-size: .84rem; color: var(--muted); margin-top: 4px; }
.legend i { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; background: var(--brand); }
.legend i.b { background: #9bb3c7; }
.hbar-row { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,2fr) auto; gap: 10px; align-items: center; margin-bottom: 8px; font-family: var(--num); font-size: .92rem; }
.hbar-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar { background: var(--gray-bg); border-radius: 6px; height: 12px; overflow: hidden; }
.hbar-fill { display: block; height: 100%; background: var(--brand); border-radius: 6px; width: 0; transition: width .5s; }

/* ---- Kalender ---- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 4px; font-family: var(--num); }
.cal .dow { text-align: center; font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 4px 0; }
.cal .day { min-height: 74px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 5px; background: #fff; font-size: .8rem; overflow: hidden; }
.cal .day.off { background: #f5f8fa; } .cal .day.today { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(9,114,182,.25); }
.cal .day .n { font-weight: 700; color: var(--muted); }
.cal .ev { display: block; border-radius: 4px; padding: 1px 5px; margin-top: 2px; font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.vacation { background: #d9ecfa; color: #0a4f7f; } .ev.sick { background: #fde1df; color: #8e1d17; } .ev.accident { background: #ffe6cf; color: #7a3f06; }
.ev.unpaid { background: #ece7fb; color: #4a2f9a; } .ev.other { background: #e9eef2; color: #3d4b57; } .ev.pending { border: 1.5px dashed currentColor; background: #fff; }
.month-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.month-nav h2 { margin: 0; min-width: 11rem; text-align: center; }

/* ---- Anmeldung ---- */
.guest { min-height: 100vh; display: flex; flex-direction: column; background: linear-gradient(160deg, var(--ink) 0%, #0e3a4c 55%, var(--brand) 100%); }
.guest-in { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 440px; background: #fff; border-radius: 16px; padding: 28px 28px 24px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.login-card .logo { text-align: center; padding: 4px 0 16px; margin: 0 0 20px; border-bottom: 3px solid #1f94c9; }
.login-card .logo img { height: 64px; width: auto; }
.guest .footer { color: #9fb4c6; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.photo { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.photo img { display: block; width: 100%; height: 130px; object-fit: cover; background: var(--gray-bg); }
.photo .cap { padding: 6px 8px; font-size: .78rem; font-family: var(--num); word-break: break-all; display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.timeline { list-style: none; margin: 0; padding: 0; font-family: var(--num); font-size: .9rem; }
.timeline li { padding: 8px 0 8px 18px; border-left: 3px solid var(--line); margin-left: 6px; position: relative; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: 14px; width: 11px; height: 11px; border-radius: 50%; background: var(--brand); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs a { padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: .92rem; }
.tabs a.on { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---- Mobil ---- */
@media (max-width: 960px) {
  .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g21 { grid-template-columns: 1fr; }
  .menu-btn { display: block; }
  .nav { display: none; flex-basis: 100%; flex-direction: column; margin: 6px 0 4px; order: 5; }
  .nav.open { display: flex; }
  .topbar-in { flex-wrap: wrap; } .user-box { order: 4; flex-basis: 100%; justify-content: space-between; display: none; }
  .user-box.open { display: flex; }
}
/* ---- Einsatzplanung ---- */
.plan-bar { align-items: flex-end; }
.plan-legend { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 12px; font-size: .84rem; }
.plan-legend .pchip { margin: 0; }
.plan-legend-note { color: var(--muted); }
.plan-card h2 { margin-top: 0; }
.plan-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.plan-day { border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: #fff; min-height: 110px; min-width: 0; }
.plan-day.today, .plan-table th.today { border-color: var(--brand); }
.plan-day.today { box-shadow: 0 0 0 1px var(--brand); }
.plan-dayhead { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: .84rem; color: var(--muted); margin-bottom: 4px; }
.plan-add { text-decoration: none; font-weight: 700; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; color: var(--brand); line-height: 1.5; }
.plan-add:hover { background: var(--soft); }
.plan-shift { border-top: 1px solid var(--line); padding-top: 5px; margin-top: 5px; }
.plan-time { font-family: var(--num); font-weight: 700; font-size: .86rem; }
.plan-note { color: var(--muted); font-size: .78rem; margin-bottom: 3px; }
.pchip { display: block; border-radius: 7px; padding: 4px 7px; margin: 3px 0; font-size: .8rem; line-height: 1.3; text-decoration: none; border: 1px solid transparent; font-family: var(--num); overflow-wrap: anywhere; }
a.pchip:hover { filter: brightness(.96); }
.pc-draft { background: #fff; color: var(--gray); border: 1px dashed #aab7c2; }
.pc-published { background: var(--amber-bg); color: #6f4605; }
.pc-confirmed { background: var(--green-bg); color: #0f5a3b; }
.pc-declined { background: var(--red-bg); color: #8e1d17; border-color: #f1b5b0; }
.pc-abs { background: var(--gray-bg); color: var(--gray); font-style: italic; }
.pchip.pk { border-left: 4px solid var(--brand); border-radius: 0 7px 7px 0; }
.pk-tag { font-weight: 700; font-size: .7rem; text-transform: uppercase; letter-spacing: .03em; }
.pwarn { color: #b45309; font-weight: 700; }
.pc-reason { font-size: .74rem; margin-top: 2px; font-weight: 400; }
.plan-table { min-width: 880px; table-layout: fixed; }
.plan-table th, .plan-table td { vertical-align: top; padding: 5px 6px; }
.plan-table .plan-name { width: 150px; font-weight: 700; position: sticky; left: 0; background: var(--card); }
.plan-table td.today, .plan-table th.today { background: var(--soft); }
.chip-check { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; background: #fff; font-weight: 600; cursor: pointer; }
.chip-check input { margin: 0; }
.people-list { max-height: 520px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.people-row { display: grid; grid-template-columns: 1fr 10.5rem; gap: 8px; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.people-row:last-child { border-bottom: 0; }
.people-row[hidden] { display: none; }
.people-row .pc-reason { grid-column: 1 / -1; color: var(--red); }
.people-name { font-weight: 600; }
.people-warn { grid-column: 1 / -1; color: #8a5a00; font-size: .8rem; font-family: var(--num); line-height: 1.35; }
.plan-item { border-left: 6px solid var(--line); }
.plan-item.st-published { border-left-color: #e0b252; }
.plan-item.st-confirmed { border-left-color: var(--green); }
.plan-item.st-declined { border-left-color: var(--red); }
.plan-item-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.plan-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; margin-top: 12px; }
.decline-box summary { list-style: none; cursor: pointer; }
.decline-box summary::-webkit-details-marker { display: none; }
.decline-box[open] { flex-basis: 100%; }
.decline-box form { margin-top: 10px; }
.plan-past summary { cursor: pointer; }
@media (max-width: 1100px) { .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .plan-grid { grid-template-columns: 1fr; } .people-row { grid-template-columns: 1fr; } .plan-actions .btn { flex: 1 1 auto; } .plan-actions .inline-form { flex: 1 1 auto; } .plan-actions .inline-form .btn { width: 100%; } }

/* ---- Projektdokumente ---- */
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.doc-row:last-child { border-bottom: 0; }
.doc-title { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; font-weight: 700; }
.doc-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 560px) { .doc-row { grid-template-columns: auto 1fr; } .doc-actions { grid-column: 1 / -1; justify-content: stretch; } .doc-actions .btn { flex: 1 1 auto; text-align: center; } }

/* ---- Zeiterfassung: Zeitfelder, Pause-Schnellwahl, Dateivorschau, Rueckfrage ---- */
.time-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.time-row input[type=time] { min-width: 0; text-align: center; font-family: var(--num); font-size: 1.15rem; font-weight: 600; padding-left: 8px; padding-right: 8px; }
.hint-tight { margin: -8px 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chip { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; min-width: 52px; padding: 9px 14px; font: inherit; font-weight: 600; cursor: pointer; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.file-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin: 6px 0 10px; }
.file-preview:empty { display: none; }
.file-item img, .file-item .file-icon { display: block; width: 100%; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--gray-bg); }
.file-item .file-icon { display: flex; align-items: center; justify-content: center; font-weight: 700; color: #536270; }
.file-item span { display: block; font-size: .74rem; font-family: var(--num); word-break: break-all; margin-top: 3px; }
.file-reset { grid-column: 1 / -1; justify-self: start; }
dialog.dialog { border: 0; border-radius: 14px; padding: 20px; max-width: 27rem; width: calc(100% - 32px); box-shadow: 0 12px 40px rgba(11,22,34,.35); color: var(--ink); }
dialog.dialog::backdrop { background: rgba(11,22,34,.55); }
dialog.dialog h3 { margin-top: 0; }
.missing-list { margin: 0 0 12px; padding-left: 20px; font-weight: 600; color: #6f4605; }
.missing-list li { margin-bottom: 4px; }
/* Speichern-Knopf bleibt beim Scrollen am unteren Bildschirmrand sichtbar */
.save-bar { display: grid; grid-template-columns: 1fr; gap: 10px; position: sticky; bottom: 0; z-index: 5; margin: 14px -4px 0; padding: 10px 4px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 28%); }

@media (max-width: 720px) {
  body { font-size: 16.5px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .kpi .value { font-size: 1.6rem; }
  .card { padding: 14px; }
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; padding: 6px 8px; background: #fff; }
  table.stack td { border: 0; padding: 4px 2px; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  table.stack td::before { content: attr(data-label); font-weight: 700; color: var(--muted); text-align: left; flex: none; font-size: .8rem; text-transform: uppercase; }
  table.stack td.num { text-align: right; } table.stack td.nolabel::before { content: none; }
  .cal .day { min-height: 56px; padding: 2px; } .cal .ev { font-size: .64rem; padding: 0 3px; }
  .hbar-row { grid-template-columns: 1fr auto; } .hbar-row .hbar { grid-column: 1 / -1; order: 3; }
  .btn-row .btn { flex: 1 1 auto; }
}
@media print { .topbar, .footer, .btn, .filter, .nav { display: none !important; } body { background: #fff; } .card { box-shadow: none; } }

/* ---- Hilfsklassen (statt Inline-Styles, wegen Content-Security-Policy) ---- */
.w-full { width: 100%; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 14px; } .mt-3 { margin-top: 24px; } .mb-0 { margin-bottom: 0; }
.narrow { max-width: 34rem; margin: 2rem auto; } .col-sm { width: 8rem; } .inline-block { display: inline-block; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pre { white-space: pre-wrap; word-break: break-word; }
.sep { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

fieldset { border: 0; padding: 0; margin: 0 0 8px; min-width: 0; }
fieldset:disabled input, fieldset:disabled select, fieldset:disabled textarea { background: #f2f6fa; color: #44525f; }
