/* Bergmann Urlaubsplaner. Farbe bedeutet Abteilung, Zollstock-Gelb bedeutet "hier und jetzt". */
@font-face {
    font-family: Nunito;
    src: url("fonts/Nunito.ttf") format("truetype");
    font-weight: 200 1000;
    font-display: swap;
}

:root {
    --ink: #14213D;
    --ink-soft: #4B5775;
    --paper: #F2F5FB;
    --card: #FFFFFF;
    --line: #D9E0EE;
    --ruler: #FFD23F;
    --ruler-soft: #FFF3C4;
    --ok: #15803D;
    --ok-soft: #DCFCE7;
    --warn: #A16207;
    --warn-soft: #FEF3C7;
    --danger: #B91C1C;
    --danger-soft: #FEE2E2;
    --away: #6B7280;
    --radius: 16px;
    --radius-small: 9px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); font-size: 112.5%; }
body {
    margin: 0;
    color: var(--ink);
    font: 500 1rem/1.5 Nunito, system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; font-weight: 900; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
a { color: #1D4ED8; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 6px var(--ruler); }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }

/* Kopfzeile mit Zollstock-Kante */
.topbar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 12px 28px 22px;
    background: var(--card);
}
.topbar::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 10px;
    background:
        repeating-linear-gradient(90deg, var(--ink) 0 1.5px, transparent 1.5px 50px) 0 0 / 100% 7px no-repeat,
        repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 10px) 0 0 / 100% 4px no-repeat,
        var(--ruler);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand strong { display: block; font-size: 1.3rem; font-weight: 900; line-height: 1.1; }
.brand small { display: block; color: var(--ink-soft); font-weight: 700; }
.mainnav { display: flex; gap: 6px; flex: 1; }
.mainnav a {
    padding: 8px 16px;
    border-radius: 999px;
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
}
.mainnav a:hover { background: var(--paper); }
.mainnav a[aria-current="page"] { background: var(--ruler); }
.account { display: flex; align-items: center; gap: 12px; }
.account form { margin: 0; }

.page { max-width: 1720px; margin: 0 auto; padding: 28px; }

/* Kacheln */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}
.notice { max-width: 640px; margin: 48px auto; }
.narrow { max-width: 460px; margin-inline: auto; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; max-width: 1100px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; }

/* Knoepfe */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 20px;
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font: 800 1rem Nunito, system-ui, sans-serif;
    text-decoration: none;
    cursor: pointer;
}
.btn:hover { background: #263A66; border-color: #263A66; }
.btn-secondary { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { background: var(--ruler-soft); border-color: var(--ink); }
.btn-danger { background: var(--card); color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-small { min-height: 32px; padding: 3px 12px; font-size: .9rem; }

/* Formulare */
.field { margin-bottom: 16px; }
.field label, legend { display: block; font-weight: 800; margin-bottom: 5px; }
input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="date"],
input[type="search"], select {
    width: 100%;
    min-height: 42px;
    padding: 7px 12px;
    border: 2px solid var(--line);
    border-radius: var(--radius-small);
    background: var(--card);
    color: var(--ink);
    font: 600 1rem Nunito, system-ui, sans-serif;
}
input[type="color"] { width: 64px; height: 42px; padding: 3px; border: 2px solid var(--line); border-radius: var(--radius-small); background: var(--card); }
input:focus, select:focus { border-color: var(--ink); }
.has-error input, .has-error select { border-color: var(--danger); }
.field-error { margin: 4px 0 0; color: var(--danger); font-weight: 700; font-size: .92rem; }
.hint { margin: 4px 0 12px; color: var(--ink-soft); font-size: .92rem; }
.check { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-weight: 700; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--ink); }
fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Meldungen */
.flash { padding: 12px 18px; border-radius: var(--radius-small); font-weight: 800; }
.flash-ok { background: var(--ok-soft); color: #14532D; }
.flash-error { background: var(--danger-soft); color: #7F1D1D; }
.flash-warn { background: var(--warn-soft); color: #713F12; }

.checks { list-style: none; padding: 0; margin: 0 0 12px; }
.checks li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.checks li:last-child { border-bottom: 0; }
.checks span { display: block; color: var(--ink-soft); font-size: .92rem; }
.checks .is-ok .icon { color: var(--ok); }
.checks .is-warn .icon { color: var(--warn); }
.checks .is-error .icon { color: var(--danger); }

@media (max-width: 900px) {
    .split { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Listen und Verwaltung */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-soft); }
.empty { margin: 0; color: var(--ink-soft); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 14px 20px; }
.toolbar label { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.toolbar input, .toolbar select { width: auto; min-width: 190px; }
.toolbar .count { margin-left: auto; color: var(--ink-soft); font-weight: 700; }
.table-card { padding: 8px 20px; overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; }
.list th { text-align: left; padding: 12px 10px; border-bottom: 2px solid var(--ink); font-weight: 900; }
.list td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list tbody tr:last-child td { border-bottom: 0; }
.list tbody tr:hover { background: var(--ruler-soft); }
.list td.name { border-left: 7px solid var(--c); padding-left: 14px; }
.list tr.is-inactive td { color: var(--ink-soft); }
.row-actions { text-align: right; }
.tag {
    display: inline-block;
    padding: 2px 11px;
    margin: 2px 4px 2px 0;
    border: 2px solid var(--c);
    border-radius: 999px;
    background: var(--c);
    color: var(--on);
    font-size: .86rem;
    font-weight: 800;
}
.tag-secondary { background: var(--card); color: var(--ink); }
.badge { display: inline-block; padding: 1px 9px; margin-right: 4px; border-radius: 6px; background: var(--line); font-size: .82rem; font-weight: 800; }
.badge-strong { background: var(--ink); color: #fff; }
.keymark {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    margin-left: 6px;
    border-radius: 50%;
    background: var(--ruler);
    color: var(--ink);
    vertical-align: middle;
}
.keymark .icon { width: 15px; height: 15px; vertical-align: 0; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; max-width: 1200px; }
.form-grid .card { margin: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.input-action { display: flex; gap: 8px; }
.input-action .btn { white-space: nowrap; }
.chip-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-checks label { cursor: pointer; margin: 0; }
.chip-checks input { position: absolute; opacity: 0; }
.chip-checks span { display: inline-block; padding: 5px 14px; border: 2px solid var(--c); border-radius: 999px; font-weight: 800; }
.chip-checks input:checked + span { background: color-mix(in srgb, var(--c) 18%, white); box-shadow: inset 0 0 0 2px var(--c); }
.chip-checks input:checked + span::before { content: "✓ "; }
.chip-checks input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.savebar { position: sticky; bottom: 0; z-index: 2; margin: 18px 0; padding: 14px 0; background: linear-gradient(transparent, var(--paper) 30%); max-width: 1200px; }
.danger-zone { max-width: 1200px; border-color: #F3B4B4; }
.danger-zone hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.danger-zone label { font-weight: 700; display: flex; align-items: center; gap: 10px; }
.danger-zone input[type="text"] { width: 200px; }

.department-list, .department-new { max-width: 1000px; }
.department-row { display: grid; grid-template-columns: 72px minmax(180px, 1fr) 150px 170px 220px; gap: 14px; align-items: center; padding: 8px 0; margin: 0; }
.department-head { font-weight: 900; border-bottom: 2px solid var(--ink); }

@media (max-width: 900px) {
    .form-grid { grid-template-columns: 1fr; }
}

/* Uebersicht: Leiste "Heute" */
.today { display: flex; align-items: stretch; margin-bottom: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.today-date { display: flex; flex-direction: column; justify-content: center; padding: 14px 26px; background: var(--ruler); }
.today-date strong { font-size: 1.7rem; font-weight: 1000; line-height: 1.1; }
.today-date span { font-weight: 800; white-space: nowrap; }
.today-away { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 22px; }
.today-away p { margin: 0; font-weight: 900; font-size: 1.1rem; }
.today-away ul, .month-grid ul { list-style: none; margin: 0; padding: 0; }
.today-away ul { display: flex; flex-wrap: wrap; gap: 8px; }
.today-keys { display: flex; align-items: center; gap: 10px; padding: 12px 26px; border-left: 1px solid var(--line); font-weight: 700; }
.today-keys .icon { width: 28px; height: 28px; }
.today-keys strong { display: block; font-size: 1.25rem; font-weight: 1000; line-height: 1.1; }
.today-keys.is-alert { background: var(--danger); color: #fff; }

/* Anhaenger wie am Schluesselbrett: Farbe der Abteilung */
.keytag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 14px 5px 11px;
    border: 2px solid var(--c);
    border-radius: 999px 10px 10px 999px;
    background: color-mix(in srgb, var(--c) 12%, white);
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
}
.keytag::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }

/* Bedienleiste */
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-bottom: 16px; }
.segmented { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--card); border: 2px solid var(--ink); }
.segmented a { padding: 5px 18px; border-radius: 999px; color: var(--ink); font-weight: 900; text-decoration: none; }
.segmented a:hover { background: var(--ruler-soft); }
.segmented a[aria-current="page"] { background: var(--ink); color: #fff; }
.period { display: flex; align-items: center; gap: 10px; }
.period h2 { margin: 0; min-width: 200px; text-align: center; font-size: 1.6rem; font-weight: 1000; }
.round { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--card); border: 2px solid var(--line); color: var(--ink); }
.round:hover { border-color: var(--ink); background: var(--ruler-soft); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0 0 0 auto; }
.filters label { display: flex; align-items: center; gap: 8px; font-weight: 800; margin: 0; }
.filters select { width: auto; min-width: 150px; }
.reset { font-weight: 800; }

/* Monat */
.month { padding: 12px; }
.month-head, .month-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) repeat(2, minmax(0, .34fr)); gap: 6px; }
.month-head span { padding: 2px 10px 8px; font-weight: 900; }
.month-grid { list-style: none; margin: 0; padding: 0; }
.day { min-height: 118px; padding: 7px 8px 9px; border-radius: 10px; background: #F8FAFE; border: 1px solid var(--line); }
.day.is-weekend { background: #E9EDF6; border-color: transparent; }
.day.is-holiday { background: repeating-linear-gradient(135deg, var(--ruler-soft) 0 8px, #FFF9E3 8px 16px); }
.day.is-outside { background: none; border: 0; }
.day.is-today { border: 3px solid var(--ink); box-shadow: 0 0 0 4px var(--ruler); }
.day-number { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.day-number time { font-weight: 1000; font-size: 1.05rem; }
.holiday { font-size: .76rem; font-weight: 800; overflow-wrap: anywhere; }
.chip {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    margin-top: 4px;
    padding: 2px 8px;
    border: 2px solid var(--c);
    border-radius: 7px;
    font-size: .88rem;
    font-weight: 800;
    line-height: 1.35;
}
.chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip small { margin-left: auto; font-size: .72rem; }
.chip.is-genehmigt { background: var(--c); color: var(--on); }
.chip.is-beantragt { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 30%, white) 0 5px, #fff 5px 10px); color: var(--ink); border-style: dashed; }
.chip.is-abwesend { background: #E5E7EB; border-color: var(--away); color: var(--ink); }

/* Zeitstrahl: Kopf als Zollstock */
.timeline-wrap { padding: 0; overflow-x: auto; }
.timeline { width: 100%; min-width: 1150px; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.timeline .who { position: sticky; left: 0; z-index: 3; width: 230px; text-align: left; background: var(--card); border-right: 2px solid var(--ink); }
.timeline thead th {
    height: 58px;
    padding: 4px 0 9px;
    border-bottom: 2px solid var(--ink);
    font-weight: 1000;
    line-height: 1.15;
    background:
        repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 25%) 0 100% / 100% 6px no-repeat,
        var(--ruler);
}
.timeline thead small { display: block; font-size: .72rem; font-weight: 800; }
.timeline thead .who { padding-left: 18px; vertical-align: middle; }
.timeline thead th.is-weekend, .timeline thead th.is-holiday { background-color: #F3BF1F; }
.timeline thead th.is-today { background: var(--ink); color: #fff; }
.timeline .group th { padding: 12px 18px 3px; text-align: left; }
.timeline .group span { position: sticky; left: 18px; display: inline-flex; align-items: center; gap: 9px; font-weight: 1000; font-size: 1.02rem; }
.timeline .group span::before { content: ""; width: 14px; height: 14px; border-radius: 4px; background: var(--c); }
.timeline tbody tr:not(.group) th { padding: 4px 8px 4px 18px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid var(--line); }
.timeline tbody tr:not(.group) th a { color: var(--ink); text-decoration: none; }
.timeline tbody tr:not(.group) th a:hover { text-decoration: underline; }
.also { display: inline-block; margin-left: 5px; padding: 0 6px; border: 2px solid var(--c); border-radius: 999px; font-size: .68rem; font-weight: 900; vertical-align: middle; }
.timeline td { position: relative; height: 38px; padding: 0; border-bottom: 1px solid var(--line); border-left: 1px solid #EDF1F8; }
.timeline td.is-weekend { background: #E9EDF6; }
.timeline td.is-holiday { background: var(--ruler-soft); }
.timeline td.is-today { background: #FFE58A; }
.timeline tbody tr:not(.group):hover th, .timeline tbody tr:not(.group):hover td:not(.is-weekend):not(.is-holiday) { background: #F4F7FD; }
.bar { position: absolute; inset: 7px -2px 7px -1px; z-index: 1; border-block: 2px solid var(--c); }
.bar.starts { left: 3px; border-left: 2px solid var(--c); border-radius: 12px 0 0 12px; }
.bar.ends { right: 3px; border-right: 2px solid var(--c); border-radius: 0 12px 12px 0; }
.bar.starts.ends { border-radius: 12px; }
.bar.is-genehmigt { background: var(--c); }
.bar.is-beantragt { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 45%, white) 0 4px, #fff 4px 8px); border-block-style: dashed; }
.bar.is-abwesend { background: #C9CED8; border-color: var(--away); }
.bar.is-abwesend::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 3px; margin: -1.5px 0 0 -5px; background: var(--ink); }

/* Beim Laden laeuft der Plan einmal von links nach rechts ein. */
@media (prefers-reduced-motion: no-preference) {
    .bar { animation: appear .28s cubic-bezier(.2, .8, .3, 1) backwards; animation-delay: calc(var(--col) * 14ms); }
    @keyframes appear { from { opacity: 0; transform: scaleY(.3); } }
}

/* Jahr */
.picker { display: flex; flex-wrap: wrap; gap: 10px; }
.year-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; border-left: 10px solid var(--c); }
.year-head h3, .year-head p { margin: 0; }
.year-head h3 { font-size: 1.5rem; font-weight: 1000; }
.totals { margin-left: auto !important; display: flex; gap: 18px; font-weight: 700; }
.totals strong { font-size: 1.35rem; font-weight: 1000; }
.year { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.mini-card { padding: 12px 10px 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); align-self: start; }
.mini-month { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 2px; }
.mini-month caption { text-align: left; font-weight: 1000; font-size: 1.08rem; padding: 0 4px 6px; }
.mini-month th { font-size: .74rem; color: var(--ink-soft); }
.mini-month td { height: 28px; text-align: center; font-size: .86rem; font-weight: 700; border-radius: 7px; border: 2px solid transparent; }
.mini-month td.is-weekend { background: #E9EDF6; }
.mini-month td.is-holiday { background: var(--ruler-soft); }
.mini-month td.is-genehmigt { background: var(--c); color: var(--on); font-weight: 1000; }
.mini-month td.is-beantragt { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 35%, white) 0 4px, #fff 4px 8px); border: 2px dashed var(--c); }
.mini-month td.is-abwesend { background: #D5D9E2; border-color: var(--away); text-decoration: underline; }
.mini-month td.is-today { box-shadow: 0 0 0 2px var(--ink); }

/* Legende */
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; font-weight: 800; }
.legend > span { display: inline-flex; align-items: center; gap: 8px; }
.legend .keymark { margin: 0; }
.swatch { width: 26px; height: 18px; border-radius: 6px; border: 2px solid var(--ink); }
.swatch.is-genehmigt { background: var(--ink); }
.swatch.is-beantragt { background: repeating-linear-gradient(135deg, #AEB6C9 0 4px, #fff 4px 8px); border-style: dashed; }
.swatch.is-abwesend { background: #C9CED8; border-color: var(--away); }
.legend-departments { margin-left: auto; flex-wrap: wrap; }
.legend-departments .tag { text-decoration: none; margin: 0; }

@media (max-width: 1500px) {
    .filters { margin-left: 0; width: 100%; }
}
@media (max-width: 1100px) {
    .year { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Demo-Modus */
.demo-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 22px;
    padding: 10px 28px;
    background: repeating-linear-gradient(135deg, #14213D 0 18px, #1D2D52 18px 36px);
    color: #fff;
}
.demo-banner strong { padding: 1px 14px; border-radius: 6px; background: var(--ruler); color: var(--ink); font-size: 1.1rem; font-weight: 1000; }
.demo-banner span { flex: 1; font-weight: 700; }
.demo-banner form { display: flex; align-items: center; gap: 8px; margin: 0; }
.demo-banner label { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.demo-banner select { width: auto; min-height: 34px; padding: 3px 8px; }
.demo-banner .btn { border-color: #fff; }
.demo-banner .btn:not(.btn-secondary) { background: var(--ruler); border-color: var(--ruler); color: var(--ink); }

/* Antraege */
textarea { width: 100%; padding: 9px 12px; border: 2px solid var(--line); border-radius: var(--radius-small); font: 600 1rem Nunito, system-ui, sans-serif; color: var(--ink); resize: vertical; }
textarea:focus { border-color: var(--ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.count-badge { display: inline-block; min-width: 22px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .8rem; text-align: center; }
.mainnav a[aria-current="page"] .count-badge { background: var(--ink); }

.tasks { margin-bottom: 20px; padding: 20px 24px; background: var(--ruler); border-radius: var(--radius); }
.tasks h2 { font-size: 1.45rem; font-weight: 1000; }
.tasks ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(430px, 1fr)); gap: 10px; }
.task { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 18px; background: var(--card); border-radius: 12px; border-left: 10px solid var(--ink); }
.task strong { display: block; font-size: 1.12rem; font-weight: 1000; }
.task-storno, .task-zurueck { border-left-color: var(--danger); }

.big-numbers { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.big-number { display: flex; align-items: baseline; gap: 14px; padding: 16px 28px; background: var(--ink); color: #fff; border-radius: var(--radius); }
.big-number strong { font-size: 3rem; font-weight: 1000; line-height: 1; color: var(--ruler); }
.big-number span { font-weight: 800; }
.big-number + .big-number { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.big-number + .big-number strong { color: var(--ink); }
.big-number.is-negative { background: var(--danger); color: #fff; }
.big-number.is-negative strong { color: #fff; }
.table-card h2 { padding-top: 12px; }
.account-table td, .account-table th { text-align: right; }
.account-table th[scope="row"], .account-table th:first-child { text-align: left; }
.account-table .available { font-weight: 1000; font-size: 1.15rem; }
.is-negative { color: var(--danger); }
.corrections { margin: 10px 0 12px; padding-left: 20px; }

.status { display: inline-block; padding: 3px 12px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); font-weight: 900; font-size: .88rem; white-space: nowrap; }
.status-genehmigt { background: var(--ok-soft); border-color: var(--ok); color: #14532D; }
.status-wartet_vertretung, .status-wartet_gf { background: var(--warn-soft); border-color: var(--warn); border-style: dashed; color: #713F12; }
.status-zurueck, .status-abgelehnt, .status-storno_beantragt { background: var(--danger-soft); border-color: var(--danger); color: #7F1D1D; }
.status-storniert, .status-zurueckgezogen { color: var(--ink-soft); text-decoration: line-through; }

.preview-days { font-size: 1.2rem; }
.preview-days strong { font-size: 2.4rem; font-weight: 1000; }
.preview-account strong { font-size: 1.15rem; font-weight: 1000; }
.findings { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.finding { display: flex; gap: 12px; padding: 10px 14px; border-radius: var(--radius-small); font-weight: 700; }
.finding .icon { margin-top: 3px; }
.finding-block { background: var(--danger-soft); color: #7F1D1D; }
.finding-warn { background: var(--warn-soft); color: #713F12; }
.finding-info { background: #DBEAFE; color: #1E3A8A; }
.confirm { padding: 12px 14px; border: 2px dashed var(--warn); border-radius: var(--radius-small); }
.confirm-box { max-width: 900px; border: 3px solid var(--warn); }
.facts, .action-card { max-width: 900px; }
.facts dl { display: grid; gap: 8px; margin: 0; }
.facts dl div { display: grid; grid-template-columns: 260px 1fr; gap: 12px; }
.facts dt { font-weight: 800; color: var(--ink-soft); }
.facts dd { margin: 0; font-weight: 800; }
.action-card summary { cursor: pointer; font-weight: 900; }
.action-card[open] summary { margin-bottom: 14px; }
.action-card hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* Pruefansicht der Geschaeftsfuehrung */
.review h2 .keymark { margin-left: 10px; }
.review h3 { margin-top: 20px; }
.review .decision { margin: 16px 0; }
.lamps { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.lamp { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 2px solid; }
.lamp .icon { width: 28px; height: 28px; }
.lamp strong { display: block; font-size: 1.08rem; font-weight: 1000; }
.lamp span { display: block; font-weight: 700; font-size: .93rem; }
.lamp-ok { background: var(--ok-soft); border-color: var(--ok); color: #14532D; }
.lamp-warn { background: var(--warn-soft); border-color: var(--warn); color: #713F12; }
.lamp-block { background: var(--danger-soft); border-color: var(--danger); color: #7F1D1D; }
.own-check { padding: 10px 14px; border-radius: var(--radius-small); background: var(--paper); }
.own-check span { margin-left: 6px; font-weight: 800; }
.day-table { max-height: 460px; overflow: auto; }
.day-table th[scope="row"] { text-align: left; white-space: nowrap; }
.staff { display: inline-block; margin-right: 10px; white-space: nowrap; }
.is-short { color: var(--danger); font-weight: 900; }
.decision { border: 3px solid var(--ink); }
.btn-approve { background: var(--ok); border-color: var(--ok); }
.btn-approve:hover { background: #166534; border-color: #166534; }
.balance { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline; padding: 12px 16px; margin-bottom: 14px; background: var(--ruler-soft); border-radius: var(--radius-small); }
.balance b { font-size: 1.5rem; font-weight: 1000; }
.narrow-left { max-width: 760px; }

/* Dashboard */
.today-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 20px; }
.today-line > strong { padding: 2px 14px; border-radius: 8px; background: var(--ruler); font-size: 1.2rem; font-weight: 1000; }
.today-line .keys { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-weight: 900; }
.people-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.person-tile { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-top: 8px solid var(--c); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.person-tile:hover { border-color: var(--c); background: color-mix(in srgb, var(--c) 6%, white); }
.person-name { font-weight: 1000; font-size: 1.1rem; }
.person-department { color: var(--ink-soft); font-weight: 800; font-size: .9rem; }
.person-left b { font-size: 2.1rem; font-weight: 1000; }
.person-more { font-size: .86rem; color: var(--ink-soft); font-weight: 700; }
@media (max-width: 1500px) {
    .topbar { gap: 18px; }
    .mainnav { gap: 2px; }
    .mainnav a { padding: 8px 11px; }
}

/* Konflikte */
@media (max-width: 1500px) {
    .request-button { margin-left: auto; }
}
.conflict-mark { position: relative; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--danger); color: #fff; cursor: help; }
.conflict-mark.is-possible { background: var(--card); color: var(--danger); border: 2px dashed var(--danger); }
.conflict-mark .icon { width: 15px; height: 15px; vertical-align: 0; }
.conflict-text { position: absolute; z-index: 20; top: calc(100% + 6px); right: -6px; width: max-content; max-width: 280px; padding: 8px 12px; border-radius: 8px; background: var(--ink); color: #fff; font-size: .82rem; font-weight: 700; text-align: left; line-height: 1.4; opacity: 0; pointer-events: none; }
.conflict-mark:hover .conflict-text, .conflict-mark:focus-visible .conflict-text, .conflict-mark:focus .conflict-text { opacity: 1; }
.day-number .conflict-mark { margin-left: auto; order: 3; align-self: center; }
.day.has-conflict { border-color: var(--danger); }
.timeline tfoot th, .timeline tfoot td { border-top: 2px solid var(--ink); border-bottom: 0; text-align: center; }
.timeline tfoot .who { padding-left: 18px; text-align: left; }
.timeline tfoot .conflict-mark { width: 100%; max-width: 24px; }
.timeline tfoot .conflict-text { top: auto; bottom: calc(100% + 6px); }

.list tbody th { border-bottom: 1px solid var(--line); }

/* Einfache Bedienung: grosse Karten, grosse Knoepfe */
.start { max-width: 900px; margin: 0 auto; }
.start > h1 { font-size: 2.2rem; }
.request-card { margin-bottom: 20px; padding: 22px 26px; background: var(--card); border: 1px solid var(--line); border-left: 12px solid var(--c); border-radius: var(--radius); }
.request-card header { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.request-card h2 { margin: 0; font-size: 1.7rem; font-weight: 1000; }
.request-department { color: var(--ink-soft); font-weight: 800; }
.more { margin-left: auto; font-weight: 800; }
.request-what { margin: 6px 0 2px; font-size: 1.35rem; }
.request-sub { margin: 0 0 12px; color: var(--ink-soft); font-weight: 700; }
.verdict { display: flex; gap: 14px; padding: 14px 18px; margin-bottom: 16px; border-radius: 12px; border: 2px solid; }
.verdict .icon { width: 30px; height: 30px; margin-top: 2px; }
.verdict strong { display: block; font-size: 1.3rem; font-weight: 1000; }
.verdict span { display: block; font-weight: 700; }
.verdict-ok { background: var(--ok-soft); border-color: var(--ok); color: #14532D; }
.verdict-warn { background: var(--warn-soft); border-color: var(--warn); color: #713F12; }
.verdict-block { background: var(--danger-soft); border-color: var(--danger); color: #7F1D1D; }
.request-buttons { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px; }
.request-buttons form { margin: 0; }
.btn-huge { min-height: 56px; padding: 12px 30px; font-size: 1.2rem; }
.reject summary { list-style: none; }
.reject summary::-webkit-details-marker { display: none; }
.reject[open] { flex-basis: 100%; }
.reject form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 12px; padding: 14px; background: var(--danger-soft); border-radius: 12px; }
.reject label { flex: 1; min-width: 280px; font-weight: 800; }
.reject form .btn-danger { background: var(--danger); color: #fff; }
.btn-giant { display: flex; width: 100%; min-height: 68px; margin: 6px 0 24px; font-size: 1.5rem; }
.all-done { display: flex; align-items: center; gap: 22px; padding: 26px 30px; margin-bottom: 20px; background: var(--ok-soft); border: 2px solid var(--ok); border-radius: var(--radius); color: #14532D; }
.all-done .icon { width: 56px; height: 56px; }
.all-done h1, .all-done p { margin: 0; }
.own-task { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 20px; margin-bottom: 14px; background: var(--ruler); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.own-task .btn { margin-left: auto; }
.at-a-glance p { margin-bottom: 6px; }
.who-away { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.plain-list li:last-child { border-bottom: 0; }
.waiting { text-align: center; }
.more-details { margin-bottom: 20px; }
.more-details > summary { cursor: pointer; font-weight: 900; padding: 10px 0; font-size: 1.1rem; }
.more-menu { position: relative; }
.more-menu summary { list-style: none; }
.more-menu summary::-webkit-details-marker { display: none; }
.more-menu summary::after { content: "▾"; }
.more-menu > div { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; display: grid; min-width: 260px; padding: 8px; background: var(--card); border: 2px solid var(--ink); border-radius: 14px; }
.more-menu a, .more-menu button { display: block; width: 100%; padding: 11px 14px; border: 0; border-radius: 9px; background: none; color: var(--ink); font: 800 1.05rem Nunito, system-ui, sans-serif; text-align: left; text-decoration: none; cursor: pointer; }
.more-menu a:hover, .more-menu button:hover, .more-menu a[aria-current="page"] { background: var(--ruler-soft); }
.more-menu form { margin: 0; border-top: 1px solid var(--line); }
.mainnav a { font-size: 1.15rem; padding: 10px 20px; }

.picker-calendar { max-width: 640px; margin: 0 auto; }
.calendar-hint { font-size: 1.25rem; font-weight: 1000; text-align: center; }
.calendar-month { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 12px; font-size: 1.4rem; }
.calendar-month strong { min-width: 210px; text-align: center; font-weight: 1000; }
.calendar-month .round { width: 52px; height: 52px; font: 900 1.8rem Nunito, system-ui, sans-serif; cursor: pointer; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.calendar-day-name { text-align: center; font-weight: 900; color: var(--ink-soft); }
.calendar-day { min-height: 54px; border: 2px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: 900 1.25rem Nunito, system-ui, sans-serif; cursor: pointer; }
.calendar-day:hover:not(:disabled) { border-color: var(--ink); background: var(--ruler-soft); }
.calendar-day.is-weekend { background: #E9EDF6; color: var(--ink-soft); }
.calendar-day.is-holiday { background: var(--ruler-soft); }
.calendar-day.is-beantragt { background: repeating-linear-gradient(135deg, #BBF7D0 0 5px, #fff 5px 10px); border-style: dashed; border-color: var(--ok); }
.calendar-day.is-genehmigt { background: var(--ok-soft); border-color: var(--ok); }
.calendar-day.is-abwesend { background: #D5D9E2; }
.calendar-day.is-today { box-shadow: 0 0 0 3px var(--ruler); }
.calendar-day.is-chosen, .calendar-day.is-chosen:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.calendar-day:disabled, .calendar-month .round:disabled { opacity: .35; cursor: default; }
.calendar-legend { margin: 10px 0 0; text-align: center; color: var(--ink-soft); font-size: .92rem; }
.preview-days span { display: block; font-size: 1.15rem; font-weight: 800; }
.optional { margin: 6px 0 16px; }
.optional summary { cursor: pointer; font-weight: 900; padding: 6px 0; }
.name-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.name-tile { display: flex; flex-direction: column; gap: 2px; min-height: 86px; justify-content: center; padding: 14px 18px; background: var(--card); border: 2px solid var(--line); border-left: 12px solid var(--c); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.name-tile strong { font-size: 1.3rem; font-weight: 1000; }
.name-tile span { color: var(--ink-soft); font-weight: 800; }
.name-tile:hover { border-color: var(--c); background: color-mix(in srgb, var(--c) 8%, white); }

.person-tags { display: flex; flex-wrap: wrap; }
.person-tile.is-inactive { opacity: .6; }
.person-summary { margin-bottom: 20px; padding: 22px 26px; background: var(--card); border: 1px solid var(--line); border-left: 12px solid var(--c); border-radius: var(--radius); }
.person-big { margin: 0 0 4px; font-size: 1.6rem; font-weight: 900; }
.person-big strong { font-size: 3.4rem; font-weight: 1000; }
.entry-list { list-style: none; margin: 0; padding: 0; }
.entry-list li { border-bottom: 1px solid var(--line); }
.entry-list li:last-child { border-bottom: 0; }
.entry-list a { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 6px; color: var(--ink); font-size: 1.15rem; font-weight: 800; text-decoration: none; }
.entry-list a:hover { background: var(--ruler-soft); }
.more-settings summary { cursor: pointer; font-weight: 1000; font-size: 1.15rem; }
.more-settings[open] summary { margin-bottom: 18px; }
.chip-checks span { font-size: 1.05rem; padding: 7px 18px; }
.start .savebar, form .savebar { max-width: 900px; margin-inline: auto; }
.danger-zone { max-width: 900px; margin-inline: auto; }

.break { overflow-wrap: anywhere; }

.choices { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 6px; }
.choices label { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.choices input { width: 22px; height: 22px; }
fieldset.field { border: 0; padding: 0; }

.big-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; border: 0; }
.big-choice input { position: absolute; opacity: 0; }
.big-choice span { display: grid; place-items: center; min-height: 74px; padding: 10px; border: 3px solid var(--line); border-radius: 14px; font-size: 1.25rem; font-weight: 800; cursor: pointer; text-align: center; }
.big-choice input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.big-choice input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.big-choice label { position: relative; }

/* Papierantrag */
.paper-sheet { background: #fff; padding: 28px 36px; border: 1px solid var(--line); border-radius: 8px; }
.paper-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 30px; margin: 18px 0 10px; }
.paper-facts dt { font-weight: 800; }
.paper-facts dd { margin: 0; font-size: 1.15rem; }
.paper-line { display: flex; align-items: flex-end; min-height: 46px; margin: 0; border-bottom: 1.5px solid #000; }
.paper-line span { font-weight: 800; padding-bottom: 3px; }
.paper-signature { display: grid; grid-template-columns: 1fr 2fr; gap: 30px; margin-top: 46px; }
.paper-signature span { border-top: 1.5px solid #000; padding-top: 3px; font-size: .9rem; }
.paper-decision { display: flex; align-items: center; gap: 10px; margin: 30px 0 0; font-size: 1.1rem; }
.paper-box { display: inline-block; width: 18px; height: 18px; border: 2px solid #000; margin-left: 18px; }

/* Jahresplan */
.plan-legend { margin: 0 0 8px; }
.year-plan { display: grid; grid-template-columns: repeat(auto-fit, minmax(430px, 1fr)); gap: 14px; align-items: start; }
.plan-month { width: 100%; border-collapse: collapse; table-layout: fixed; background: #fff; font-size: .68rem; }
.plan-month caption { text-align: left; font-weight: 900; font-size: .95rem; }
.plan-month th, .plan-month td { border: 1px solid #C9CCD6; padding: 0; height: 15px; text-align: center; overflow: hidden; }
.plan-month thead th:first-child { width: 84px; }
.plan-month tbody th { text-align: left; padding: 0 3px; white-space: nowrap; font-weight: 700; }
.plan-month tbody th .icon { width: 9px; height: 9px; }
.plan-month .is-weekend { background: #E4E6EE; }
.plan-month .is-holiday { background: #FDE68A; }
.plan-month td.is-genehmigt { background: var(--c); }
.plan-month td.is-beantragt { background: repeating-linear-gradient(135deg, var(--c) 0 2px, #fff 2px 4px); }
.plan-month td.is-abwesend { background: #6B7280; }

/* Buero-Monitor */
.monitor { font-size: 1.2rem; }
.monitor header { display: flex; justify-content: space-between; align-items: baseline; }
.monitor h1 { font-size: 2.4rem; margin: 0 0 10px; }
.monitor-today { background: var(--card); border-radius: 16px; padding: 14px 24px; margin-bottom: 14px; }
.monitor-names, .monitor-day { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; }
.monitor-today .keytag { font-size: 1.6rem; }
.monitor-keys.is-short { color: var(--danger); font-weight: 900; }
.monitor-week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.monitor-day { background: var(--card); border-radius: 12px; padding: 10px; min-height: 120px; border: 3px solid transparent; }
.monitor-day.is-today { border-color: var(--ink); }
.monitor-day h3 { width: 100%; margin: 0; }

/* Drucken: nur der Inhalt, mit Farben */
@media print {
    @page { margin: 10mm; }
    @page quer { size: A3 landscape; margin: 8mm; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; animation: none !important; }
    body { background: #fff; }
    .topbar, .demo-banner, .no-print, .controls, .today, .flash, .btn, .mainnav, .request-buttons { display: none !important; }
    .page { max-width: none; margin: 0; padding: 0; }
    .card, .paper-sheet { box-shadow: none; }
    .paper-sheet { border: 0; padding: 0; }
    .year-plan { page: quer; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5mm; }
    .plan-month { break-inside: avoid; font-size: 6.5pt; }
    .plan-month th, .plan-month td { height: 3mm; }
    .plan-month thead th:first-child { width: 20mm; }
    .month { break-inside: avoid; }
}
