/* Urlaub im Überblick: 6-Monats-Übersicht (25.11.2026), siehe assets/js/urlaub-halbjahr.js */

/* ---------- Knopf auf der Seite Urlaubsanträge ---------- */
.uh-kopfzeile { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.uh-knopf {
    display: inline-flex; align-items: center; gap: 12px;
    height: 52px; padding: 0 16px 0 8px; border-radius: 14px;
    border: 1px solid #0F1B2D; background: #0F1B2D; color: #F3E7CC;
    font-family: var(--font-body, system-ui, sans-serif); text-align: left;
    cursor: pointer; box-shadow: 0 6px 18px rgba(15,27,45,.16), 0 1px 2px rgba(15,27,45,.2);
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.uh-knopf:hover { background: #172742; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(15,27,45,.2), 0 1px 2px rgba(15,27,45,.2); }
.uh-knopf:active { transform: translateY(0); }
.uh-knopf:focus-visible { outline: 2px solid var(--accent, #B8862B); outline-offset: 3px; }
.uh-knopf-bild {
    width: 36px; height: 36px; border-radius: 10px; flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(243,231,204,.08); box-shadow: inset 0 0 0 1px rgba(201,164,92,.35);
}
.uh-kb-gold { fill: #C9A45C; }
.uh-kb-gruen { fill: #7FB894; }
.uh-knopf-text { display: flex; flex-direction: column; gap: 3px; line-height: 1.1; }
.uh-knopf-titel { font: 600 14px/1.1 var(--font-display, system-ui, sans-serif); letter-spacing: .005em; color: #F7EEDB; }
.uh-knopf-unter { font-size: 11.5px; color: #C9A45C; white-space: nowrap; }
.uh-knopf-unter b { color: #9FD3B0; font-weight: 600; }
.uh-knopf-pfeil { color: #C9A45C; margin-left: 2px; transition: transform .18s ease; }
.uh-knopf:hover .uh-knopf-pfeil { transform: translateX(2px); }
@media (prefers-reduced-motion: reduce) { .uh-knopf, .uh-knopf-pfeil { transition: none; } .uh-knopf:hover { transform: none; } }

body.uh-gesperrt { overflow: hidden; }

/* ---------- Fenster ---------- */
.uh-overlay {
    --uh-name: 260px;
    --uh-gold: var(--accent, #B8862B);
    --uh-gold-tief: var(--accent-hover, #8A6318);
    --uh-gruen: var(--success, #3D7A5A);
    --uh-rot: var(--danger, #9B3B3B);
    --uh-tinte: var(--text-primary, #0F1B2D);
    --uh-grau: var(--text-muted, #8B7E74);
    --uh-linie: var(--border, rgba(184,134,43,.12));
    --uh-linie-2: var(--border-strong, rgba(184,134,43,.22));
    --uh-grund: var(--bg-primary, #FAF6EF);
    --uh-karte: var(--bg-card, #fff);
    position: fixed; inset: 0; z-index: 10050;
    background: rgba(15,27,45,.42);
    display: none; align-items: center; justify-content: center;
    padding: 24px;
    font-family: var(--font-body, system-ui, sans-serif);
    color: var(--uh-tinte);
}
.uh-overlay.is-offen { display: flex; }
.uh-overlay *, .uh-overlay *::before, .uh-overlay *::after { box-sizing: border-box; }
.uh-fenster:focus { outline: none; }

.uh-fenster {
    width: 100%; max-width: 1680px; max-height: 100%;
    background: var(--uh-grund);
    border: 1px solid var(--uh-linie-2);
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(15,27,45,.22), 0 2px 8px rgba(184,134,43,.08);
    display: flex; flex-direction: column; overflow: hidden;
}

.uh-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 24px 28px 0; }
.uh-kopf-text { min-width: 0; }
.uh-titel { margin: 0; font: 500 28px/1.1 var(--font-display, system-ui, sans-serif); letter-spacing: -.015em; }
.uh-unter { margin: 6px 0 0; font-size: 14px; color: var(--uh-grau); overflow-wrap: anywhere; }
.uh-zu {
    flex: none; width: 38px; height: 38px; border-radius: 10px; border: 1px solid transparent;
    background: transparent; color: var(--uh-grau); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.uh-zu:hover { background: var(--uh-karte); border-color: var(--uh-linie-2); color: var(--uh-tinte); }
.uh-zu:focus-visible, .uh-blaettern button:focus-visible, .uh-seg button:focus-visible, .uh-abt:focus-visible, .uh-balken:focus-visible {
    outline: 2px solid var(--uh-gold); outline-offset: 2px;
}

/* ---------- Kennzahlen ---------- */
.uh-zahlen { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 18px 28px 4px; }
.uh-zahl {
    background: var(--uh-karte); border: 1px solid var(--uh-linie); border-radius: 14px;
    padding: 12px 16px; display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: baseline;
}
.uh-zahl b { grid-row: span 2; font: 500 34px/1 var(--font-display, system-ui, sans-serif); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.uh-zahl span { font-size: 13px; font-weight: 600; }
.uh-zahl small { font-size: 12px; color: var(--uh-grau); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uh-zahl.is-gold { border-color: rgba(184,134,43,.35); background: linear-gradient(0deg, rgba(184,134,43,.06), rgba(184,134,43,.06)), var(--uh-karte); }
.uh-zahl.is-gold b { color: var(--uh-gold-tief); }
.uh-zahl.is-rot { border-color: rgba(155,59,59,.3); }
.uh-zahl.is-rot b { color: var(--uh-rot); }

/* ---------- Leiste ---------- */
.uh-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 14px 28px 16px; }
.uh-blaettern { display: flex; align-items: center; gap: 6px; }
.uh-blaettern button, .uh-abt, .uh-seg {
    height: 34px; border-radius: 9px; border: 1px solid var(--uh-linie-2); background: var(--uh-karte);
    color: var(--uh-tinte); font: 500 13px/1 var(--font-body, system-ui, sans-serif);
}
.uh-blaettern button { min-width: 34px; padding: 0 10px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.uh-blaettern button:hover, .uh-seg button:hover { border-color: var(--uh-gold); }
.uh-zeitraum { min-width: 240px; text-align: center; font: 500 15px/1 var(--font-display, system-ui, sans-serif); }
.uh-abt { padding: 0 10px; cursor: pointer; }
.uh-schalter { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; user-select: none; }
.uh-schalter input { width: 16px; height: 16px; accent-color: var(--uh-gold); }
.uh-seg { display: inline-flex; padding: 2px; gap: 2px; }
.uh-seg button { border: 1px solid transparent; background: transparent; border-radius: 7px; padding: 0 12px; cursor: pointer; font: inherit; color: var(--uh-grau); }
.uh-seg button.is-an { background: var(--uh-grund); color: var(--uh-tinte); border-color: var(--uh-linie-2); }
.uh-legende { display: flex; gap: 16px; font-size: 12px; color: var(--uh-grau); margin-left: auto; }
.uh-legende span { display: inline-flex; align-items: center; gap: 6px; }
.uh-l { display: inline-block; width: 18px; height: 10px; border-radius: 4px; }
.uh-l.is-gen { background: var(--uh-gruen); }
.uh-l.is-offen { background: repeating-linear-gradient(135deg, rgba(184,134,43,.5) 0 3px, rgba(184,134,43,.16) 3px 6px); box-shadow: inset 0 0 0 1.5px var(--uh-gold); }
.uh-l.is-frei { background: rgba(15,27,45,.07); }

/* ---------- Raster ---------- */
.uh-inhalt { flex: 1; min-height: 0; display: flex; border-top: 1px solid var(--uh-linie-2); background: var(--uh-karte); }
.uh-scroll { flex: 1; overflow: auto; position: relative; overscroll-behavior: contain; }
.uh-leer { padding: 40px 28px; color: var(--uh-grau); }

.uh-kopfraster, .uh-zeile, .uh-gruppe, .uh-fuss { display: flex; width: calc(var(--uh-name) + var(--spur)); }
.uh-ecke, .uh-person, .uh-gname {
    position: sticky; left: 0; z-index: 3; flex: none; width: var(--uh-name);
    background: var(--uh-karte); border-right: 1px solid var(--uh-linie-2);
}
.uh-achse, .uh-spur, .uh-gspur, .uh-saeulen { position: relative; flex: none; width: var(--spur); }

/* Kopf (bleibt oben) */
.uh-kopfraster { position: sticky; top: 0; z-index: 5; background: var(--uh-karte); border-bottom: 1px solid var(--uh-linie-2); }
.uh-kopfraster .uh-ecke { z-index: 6; display: flex; align-items: flex-end; padding: 0 16px 10px; font-size: 12px; color: var(--uh-grau); }
.uh-reihe { position: relative; }
.uh-reihe > * { position: absolute; top: 0; bottom: 0; }
.uh-r-mon { height: 32px; }
.uh-mon { display: flex; align-items: flex-end; padding: 0 0 4px 8px; font-size: 12px; color: var(--uh-grau); white-space: nowrap; border-left: 1px solid var(--uh-linie-2); }
.uh-mon-text { position: sticky; left: calc(var(--uh-name) + 10px); }
.uh-mon-text b { font: 500 15px/1 var(--font-display, system-ui, sans-serif); color: var(--uh-tinte); margin-right: 4px; }
.uh-r-kw { height: 18px; }
.uh-kw { font-size: 10px; color: var(--uh-grau); padding-left: 4px; border-left: 1px solid var(--uh-linie); line-height: 18px; white-space: nowrap; overflow: hidden; }
.uh-r-tag { height: 34px; }
.uh-tk { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-variant-numeric: tabular-nums; }
.uh-tk i { font-style: normal; font-size: 9px; color: var(--uh-grau); line-height: 1; }
.uh-tk b { font-size: 11.5px; font-weight: 500; line-height: 1.1; }
.uh-tk.is-frei { background: rgba(15,27,45,.045); }
.uh-tk.is-frei b { color: var(--uh-grau); }
.uh-tk.is-ft b { color: var(--uh-rot); font-weight: 600; }
.uh-tk.is-heute b { background: var(--uh-gold); color: #fff; border-radius: 6px; padding: 1px 4px; font-weight: 600; }
.uh-tk.is-m1 { box-shadow: inset 1px 0 0 var(--uh-linie-2); }
.uh-r-band { height: 24px; }
.uh-band {
    top: 3px !important; bottom: 3px !important; border-radius: 6px;
    background: rgba(184,134,43,.1); box-shadow: inset 0 0 0 1px rgba(184,134,43,.3);
    font-size: 11px; color: var(--uh-gold-tief); white-space: nowrap; overflow: hidden;
    display: flex; align-items: center; padding: 0 8px;
}
.uh-band span { overflow: hidden; text-overflow: ellipsis; }

/* Körper */
.uh-koerper { position: relative; width: calc(var(--uh-name) + var(--spur)); }
.uh-hinten { position: absolute; top: 0; bottom: 0; left: var(--uh-name); width: var(--spur); pointer-events: none; z-index: 0; }
.uh-hinten > i { position: absolute; top: 0; bottom: 0; }
.uh-sp { background: rgba(15,27,45,.04); }
.uh-sp.is-zu { background: repeating-linear-gradient(90deg, rgba(15,27,45,.05) 0 1px, transparent 1px 4px), rgba(15,27,45,.03); }
.uh-m1 { width: 1px; background: var(--uh-linie-2); }
.uh-heute { width: 2px; margin-left: -1px; background: var(--uh-gold); opacity: .9; z-index: 2; }
.uh-heute span {
    position: absolute; top: 4px; left: 50%; transform: translateX(-50%);
    background: var(--uh-gold); color: #fff; font-size: 10px; font-weight: 600; letter-spacing: .02em;
    padding: 2px 6px; border-radius: 999px; white-space: nowrap;
}

.uh-gruppe { height: 36px; position: relative; z-index: 1; }
.uh-gname { display: flex; align-items: flex-end; gap: 8px; padding: 0 16px 6px; font-size: 12px; font-weight: 600; color: var(--uh-grau); border-bottom: 1px solid var(--uh-linie-2); }
.uh-gname i { width: 8px; height: 8px; border-radius: 50%; background: var(--abt); margin-bottom: 3px; }
.uh-gspur { border-bottom: 1px solid var(--uh-linie-2); }

.uh-zeile { height: 50px; position: relative; z-index: 1; }
.uh-zeile > * { border-bottom: 1px solid var(--uh-linie); }
.uh-zeile:hover .uh-person, .uh-zeile:hover .uh-spur { background-color: rgba(184,134,43,.05); }
.uh-person { display: flex; align-items: center; gap: 10px; padding: 0 16px; }
.uh-av {
    flex: none; width: 30px; height: 30px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 600; letter-spacing: .02em;
    background: color-mix(in srgb, var(--abt, #B8862B) 18%, #fff); color: color-mix(in srgb, var(--abt, #B8862B) 70%, #0F1B2D);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--abt, #B8862B) 35%, transparent);
}
.uh-pt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.uh-pn { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uh-ps { font-size: 11.5px; color: var(--uh-grau); white-space: nowrap; }
.uh-ps b { color: var(--uh-gold-tief); font-weight: 600; }
.uh-ps em { font-style: normal; color: var(--text-subtle, #A89E94); }

/* Balken */
.uh-balken {
    position: absolute; top: 11px; height: 28px; padding: 0; margin: 0;
    border: 0; background: transparent; cursor: default; font: inherit;
}
.uh-balken.is-offen { cursor: pointer; }
.uh-stueck {
    position: absolute; top: 0; bottom: 0; border-radius: 7px;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.uh-luecke { position: absolute; top: 50%; height: 2px; margin-top: -1px; }
.uh-bt { font-size: 11px; font-weight: 600; white-space: nowrap; padding: 0 6px; overflow: hidden; text-overflow: ellipsis; }
.uh-balken.is-gen .uh-stueck { background: var(--uh-gruen); color: #fff; box-shadow: 0 1px 2px rgba(15,27,45,.12); }
.uh-balken.is-gen .uh-luecke { background: color-mix(in srgb, var(--uh-gruen) 45%, transparent); }
.uh-balken.is-offen .uh-stueck {
    background: repeating-linear-gradient(135deg, rgba(184,134,43,.34) 0 4px, rgba(184,134,43,.12) 4px 8px), #fff;
    box-shadow: inset 0 0 0 1.5px var(--uh-gold); color: var(--uh-gold-tief);
}
.uh-balken.is-offen .uh-luecke { background: repeating-linear-gradient(90deg, var(--uh-gold) 0 4px, transparent 4px 7px); }
.uh-balken.is-offen .uh-bt { background: rgba(255,255,255,.85); border-radius: 4px; padding: 1px 5px; }
.uh-balken.is-offen:hover .uh-stueck { box-shadow: inset 0 0 0 2px var(--uh-gold-tief), 0 2px 8px rgba(184,134,43,.25); }

/* Fuß: gleichzeitig weg */
.uh-fuss { position: sticky; bottom: 0; z-index: 5; background: var(--uh-karte); border-top: 1px solid var(--uh-linie-2); box-shadow: 0 -6px 16px rgba(15,27,45,.04); }
.uh-fuss .uh-ecke { z-index: 6; display: flex; flex-direction: column; justify-content: center; padding: 0 16px; font-size: 12.5px; font-weight: 600; }
.uh-fuss .uh-ecke small { font-size: 11px; font-weight: 400; color: var(--uh-grau); margin-top: 2px; }
.uh-saeulen { height: 70px; }
.uh-s { position: absolute; bottom: 6px; top: 18px; display: flex; flex-direction: column-reverse; }
.uh-sg { background: color-mix(in srgb, var(--uh-gruen) 75%, #fff); }
.uh-so { background: repeating-linear-gradient(135deg, rgba(184,134,43,.65) 0 3px, rgba(184,134,43,.28) 3px 6px); }
.uh-s > span:first-child { border-radius: 0 0 3px 3px; }
.uh-s > span { flex: none; }
.uh-s em { position: absolute; left: -4px; right: -4px; top: -16px; text-align: center; font-style: normal; font-size: 10.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--uh-tinte); }
.uh-s.is-ueber .uh-sg, .uh-s.is-ueber .uh-so { background: var(--uh-rot); }
.uh-s.is-ueber em { color: var(--uh-rot); }
.uh-gl { position: absolute; height: 0; border-top: 1.5px dashed rgba(155,59,59,.5); }

@media (max-width: 900px) {
    .uh-zahlen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .uh-legende { margin-left: 0; }
}
@media (max-width: 640px) {
    .uh-overlay { padding: 0; --uh-name: 150px; }
    .uh-fenster { border-radius: 0; height: 100%; }
    .uh-kopf { padding: 16px 16px 0; }
    .uh-titel { font-size: 22px; }
    .uh-zahlen, .uh-leiste { padding-left: 16px; padding-right: 16px; }
    .uh-zahl { padding: 10px 12px; }
    .uh-zahl b { font-size: 26px; }
    .uh-zeitraum { min-width: 0; font-size: 13px; }
    .uh-av { display: none; }
    .uh-person, .uh-gname, .uh-ecke { padding-left: 10px !important; padding-right: 8px !important; }
}

/* breite Raster dürfen das Fenster nicht aufweiten */
.uh-fenster, .uh-inhalt, .uh-scroll { min-width: 0; }

/* ---------- Runde 3 (25.11.): Engpass, Zeiger, Rest, Karte ---------- */
.uh-l.is-konflikt { background: repeating-linear-gradient(135deg, rgba(184,134,43,.5) 0 3px, rgba(184,134,43,.16) 3px 6px); box-shadow: inset 0 0 0 1.5px var(--uh-rot); }
.uh-balken.ist-nein .uh-stueck { box-shadow: inset 0 0 0 1.5px var(--uh-rot); }
.uh-balken.ist-nein:hover .uh-stueck { box-shadow: inset 0 0 0 2px var(--uh-rot), 0 2px 8px rgba(155,59,59,.22); }
.uh-warn {
    position: absolute; top: -6px; right: -6px; width: 16px; height: 16px; border-radius: 50%;
    background: var(--uh-rot); color: #fff; font-size: 11px; font-weight: 700; line-height: 16px; text-align: center;
    box-shadow: 0 0 0 2px var(--uh-karte); pointer-events: none;
}
.uh-balken.is-gen { cursor: pointer; }
.uh-balken.is-gen:hover .uh-stueck { box-shadow: 0 2px 8px rgba(61,122,90,.3); }
.uh-sp-ueber { background: rgba(155,59,59,.05); }
.uh-zeiger { background: rgba(184,134,43,.10); box-shadow: inset 1px 0 0 rgba(184,134,43,.35), inset -1px 0 0 rgba(184,134,43,.35); opacity: 0; transition: opacity .12s; z-index: 1; }
.uh-zeiger.is-an { opacity: 1; }

.uh-gname span { color: var(--uh-tinte); }
.uh-gname small { font-weight: 400; color: var(--uh-grau); margin-left: auto; }
.uh-rest { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 4px; background: rgba(15,27,45,.05); color: var(--uh-grau); font-size: 10.5px; }
.uh-rest.is-knapp { background: rgba(155,59,59,.1); color: var(--uh-rot); font-weight: 600; }

.uh-fuss .uh-ecke span { font-size: 12.5px; font-weight: 600; }
.uh-fuss .uh-ecke small.is-rot { color: var(--uh-rot); font-weight: 600; }
.uh-fuss .uh-ecke .uh-wer { color: var(--uh-tinte); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.uh-karte {
    position: fixed; z-index: 10060; width: 340px; max-width: calc(100vw - 24px);
    background: var(--uh-karte); border: 1px solid var(--uh-linie-2); border-radius: 16px;
    box-shadow: 0 18px 48px rgba(15,27,45,.22), 0 2px 6px rgba(184,134,43,.08);
    padding: 14px 16px 16px; font-size: 13px; color: var(--uh-tinte);
    animation: uh-karte-ein .14s ease-out;
}
@keyframes uh-karte-ein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.uh-k-kopf { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.uh-k-kopf > div { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.uh-k-kopf b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uh-k-kopf small { font-size: 11.5px; color: var(--uh-grau); }
.uh-k-status { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.uh-k-status.is-offen { background: rgba(184,134,43,.12); color: var(--uh-gold-tief); }
.uh-k-status.is-gen { background: rgba(61,122,90,.12); color: var(--uh-gruen); }
.uh-k-zu { border: 0; background: transparent; font-size: 20px; line-height: 1; color: var(--uh-grau); cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.uh-k-zu:hover { background: var(--uh-grund); color: var(--uh-tinte); }
.uh-k-zeit { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--uh-grund); margin-bottom: 8px; }
.uh-k-zeit b { font: 500 15px/1.2 var(--font-display, system-ui, sans-serif); }
.uh-k-zeit span { color: var(--uh-grau); white-space: nowrap; }
.uh-kz { display: flex; justify-content: space-between; gap: 12px; padding: 7px 2px; border-bottom: 1px solid var(--uh-linie); }
.uh-kz span { color: var(--uh-grau); }
.uh-kz b { font-weight: 600; text-align: right; }
.uh-kz.is-rot b { color: var(--uh-rot); }
.uh-kz.is-gut b { color: var(--uh-gruen); }
.uh-kn { font-size: 12px; color: var(--uh-grau); padding: 6px 2px 2px; line-height: 1.4; }
.uh-k-notiz { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--uh-grund); font-size: 12px; color: var(--uh-grau); }
.uh-k-knoepfe { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.uh-k-knoepfe button {
    height: 36px; padding: 0 14px; border-radius: 10px; cursor: pointer;
    font: 600 13px/1 var(--font-body, system-ui, sans-serif); border: 1px solid var(--uh-linie-2); background: var(--uh-karte); color: var(--uh-tinte);
}
.uh-k-knoepfe .uh-k-ja { background: var(--uh-gruen); border-color: var(--uh-gruen); color: #fff; }
.uh-k-knoepfe .uh-k-ja:hover { filter: brightness(1.06); }
.uh-k-knoepfe .uh-k-nein:hover { border-color: var(--uh-rot); color: var(--uh-rot); }
.uh-k-knoepfe .uh-k-liste { margin-left: auto; border-color: transparent; color: var(--uh-gold-tief); padding: 0 6px; }
.uh-k-knoepfe .uh-k-liste:hover { text-decoration: underline; }
.uh-k-knoepfe button:disabled { opacity: .6; cursor: default; }
.uh-k-knoepfe button:focus-visible, .uh-k-zu:focus-visible { outline: 2px solid var(--uh-gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .uh-karte { animation: none; } .uh-zeiger { transition: none; } }

/* ---------- Runde 4 (25.11.): Prüfung wie der Server, Vorschlag, Abteilungs-Auslastung ---------- */
.uh-l.is-ja { background: repeating-linear-gradient(135deg, rgba(184,134,43,.5) 0 3px, rgba(184,134,43,.16) 3px 6px); box-shadow: inset 0 0 0 1.5px var(--uh-gold); position: relative; }
.uh-l.is-ja::after { content: ""; position: absolute; right: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--uh-gruen); box-shadow: 0 0 0 1.5px var(--uh-karte); }
.uh-warn.is-ja { background: var(--uh-gruen); display: flex; align-items: center; justify-content: center; }
.uh-warn.is-knapp { background: #C7902F; }
.uh-balken.ist-knapp .uh-stueck { box-shadow: inset 0 0 0 1.5px #C7902F; }
.uh-balken.ist-nein .uh-stueck { background: repeating-linear-gradient(135deg, rgba(155,59,59,.22) 0 4px, rgba(155,59,59,.07) 4px 8px), #fff; color: var(--uh-rot); }
.uh-balken.ist-nein .uh-bt { color: var(--uh-rot); }

.uh-gspur { position: relative; }
.uh-auslast { position: absolute; bottom: 5px; height: 8px; border-radius: 2px; }
.uh-auslast.is-ok { background: rgba(61,122,90,.28); }
.uh-auslast.is-gelb { background: repeating-linear-gradient(135deg, rgba(199,144,47,.75) 0 2px, rgba(199,144,47,.3) 2px 4px); }
.uh-auslast.is-rot { background: var(--uh-rot); }

.uh-zahl-vorschlag { align-items: center; }
.uh-zahl-vorschlag.is-gruen b { color: var(--uh-gruen); }
.uh-zahl-vorschlag.is-gruen { border-color: rgba(61,122,90,.3); }
.uh-vorschlag-knopf {
    grid-column: 2; justify-self: start; margin-top: 4px; height: 28px; padding: 0 12px; border-radius: 8px; cursor: pointer;
    border: 1px solid var(--uh-gruen); background: var(--uh-gruen); color: #fff; font: 600 12px/1 var(--font-body, system-ui, sans-serif);
}
.uh-vorschlag-knopf:hover { filter: brightness(1.06); }
.uh-vorschlag-knopf:focus-visible { outline: 2px solid var(--uh-gold); outline-offset: 2px; }

.uh-k-pruef { display: flex; gap: 10px; align-items: baseline; padding: 9px 12px; border-radius: 10px; margin-bottom: 6px; font-size: 12.5px; line-height: 1.4; }
.uh-k-pruef b { flex: none; font-size: 12px; text-transform: none; }
.uh-k-pruef.ist-ja { background: rgba(61,122,90,.08); color: var(--uh-gruen); }
.uh-k-pruef.ist-knapp { background: rgba(199,144,47,.1); color: #8A6318; }
.uh-k-pruef.ist-nein { background: rgba(155,59,59,.08); color: var(--uh-rot); }
.uh-k-pruef span { color: var(--uh-tinte); }

.uh-blatt { width: 460px; left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); max-height: min(640px, calc(100vh - 48px)); display: flex; flex-direction: column; animation: none; }
.uh-blatt .uh-k-kopf small { white-space: normal; line-height: 1.4; margin-top: 2px; }
.uh-bl-liste { overflow: auto; margin: 4px -4px 0; padding: 0 4px; border-top: 1px solid var(--uh-linie); border-bottom: 1px solid var(--uh-linie); }
.uh-bl-zeile { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--uh-linie); cursor: pointer; }
.uh-bl-zeile:last-child { border-bottom: 0; }
.uh-bl-zeile input { width: 16px; height: 16px; accent-color: var(--uh-gruen); flex: none; }
.uh-bl-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.uh-bl-t b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uh-bl-t small { color: var(--uh-grau); font-size: 11.5px; }
.uh-bl-tag { font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 999px; }
.uh-bl-tag.is-knapp { background: rgba(199,144,47,.14); color: #8A6318; }
.uh-k-knoepfe .uh-k-ja:disabled { background: rgba(61,122,90,.35); border-color: transparent; }

/* ---------- Knopf als letzte Kachel der Kennzahlen-Leiste (25.11.) ---------- */
#apv2Stats.hat-uh { grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(230px, 1.2fr); }
.uh-kachel {
    height: auto; min-height: 100%; width: 100%; border-radius: 0; border: 0;
    padding: 12px 16px 12px 14px; gap: 12px; box-shadow: none; justify-content: flex-start;
}
.uh-kachel:hover { transform: none; box-shadow: none; background: #172742; }
.uh-kachel .uh-knopf-text { flex: 1; min-width: 0; }
.uh-kachel .uh-knopf-unter { white-space: normal; line-height: 1.3; }
.uh-kachel .uh-knopf-pfeil { flex: none; }
.uh-kachel:focus-visible { outline: 2px solid var(--accent, #B8862B); outline-offset: -4px; }
@media (max-width: 1100px) {
    #apv2Stats.hat-uh { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .uh-kachel { grid-column: 1 / -1; min-height: 56px; }
}
@media (max-width: 768px) {
    #apv2Stats.hat-uh { grid-template-columns: 1fr 1fr; }
}

/* ---------- Kachel hell (25.11., Jannis: „mach ihn auch hell“) ---------- */
.uh-knopf.uh-kachel {
    background: var(--apv2-surface, #FFFDF8); color: var(--text-primary, #0F1B2D);
    box-shadow: inset 3px 0 0 var(--accent, #B8862B);
}
.uh-knopf.uh-kachel:hover { background: var(--apv2-gold-wash, rgba(184,134,43,.08)); }
.uh-kachel .uh-knopf-bild { background: rgba(184,134,43,.08); box-shadow: inset 0 0 0 1px rgba(184,134,43,.35); }
.uh-kachel .uh-kb-gold { fill: #B8862B; }
.uh-kachel .uh-kb-gruen { fill: #3D7A5A; }
.uh-kachel .uh-knopf-titel { color: var(--text-primary, #0F1B2D); }
.uh-kachel .uh-knopf-unter { color: var(--text-muted, #8B7E74); }
.uh-kachel .uh-knopf-unter b { color: #3D7A5A; }
.uh-kachel .uh-knopf-pfeil { color: var(--accent, #B8862B); }
.uh-kachel .uh-knopf-titel { white-space: nowrap; }
#apv2Stats.hat-uh { grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(270px, 1.3fr); }
@media (max-width: 1100px) { #apv2Stats.hat-uh { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 768px) { #apv2Stats.hat-uh { grid-template-columns: 1fr 1fr; } }

/* ---------- Feinschliff 27.11.2026 (Jannis: „bisschen besser“) ----------
   Die allgemeinen Formularregeln der Seite (label in Großbuchstaben, select
   und input 100 % breit) griffen auch hier: Die Abteilungswahl lief über die
   ganze Breite, die Schalter standen in Großbuchstaben. Kopf, Kennzahlen und
   Leiste sind niedriger, damit mehr Personen ins Fenster passen. In „Kompakt“
   stehen nur noch Montage und Monatserste als Zahl, vorher liefen die Zahlen
   ineinander. */
.uh-overlay .uh-schalter {
    display: inline-flex; margin: 0; text-transform: none; letter-spacing: 0;
    font-size: 13px; font-weight: 500; color: var(--uh-tinte);
}
.uh-overlay .uh-schalter input { width: 16px; height: 16px; padding: 0; margin: 0; flex: none; }
.uh-overlay select.uh-abt {
    width: auto; min-width: 170px; max-width: 240px; height: 34px;
    padding: 0 28px 0 12px; font: 500 13px/1 var(--font-body, system-ui, sans-serif);
    border-radius: 9px; border: 1px solid var(--uh-linie-2); background-color: var(--uh-karte);
}
.uh-kopf { padding: 20px 28px 0; }
.uh-titel { font-size: 26px; }
.uh-unter { margin-top: 4px; font-size: 13.5px; }
.uh-zahlen { padding: 14px 28px 0; gap: 10px; }
.uh-zahl { padding: 10px 14px; align-items: center; row-gap: 2px; min-height: 64px; }
.uh-zahl b { font-size: 30px; align-self: center; }
.uh-zahl span { line-height: 1.25; }
.uh-zahl small { line-height: 1.3; }
.uh-vorschlag-knopf { margin-top: 2px; height: 26px; }
.uh-leiste { padding: 12px 28px; gap: 10px 14px; }
.uh-zeitraum { min-width: 200px; }
.uh-legende { gap: 12px; }
.uh-gruppe { height: 46px; }
.uh-gname { align-items: center; padding-bottom: 0; }
.uh-gname i { margin-bottom: 0; align-self: flex-start; margin-top: 10px; }
.uh-gn-t { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.uh-gn-t span { color: var(--uh-tinte); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uh-gn-t small { margin-left: 0; font-size: 11px; font-weight: 400; color: var(--uh-grau); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .uh-zahl { min-height: 0; } }
@media (max-width: 900px) { .uh-overlay { --uh-name: 210px; } }
.uh-person { overflow: hidden; }
.uh-pt { min-width: 0; }
.uh-ps { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Schulferien (27.11.2026) ---------- */
.uh-r-ferien { height: 22px; }
.uh-ferien {
    top: 3px !important; bottom: 3px !important; border-radius: 6px;
    background: rgba(58,110,160,.10); box-shadow: inset 0 0 0 1px rgba(58,110,160,.28);
    font-size: 11px; color: #2F5C85; white-space: nowrap; overflow: hidden;
    display: flex; align-items: center; padding: 0 8px;
}
.uh-ferien span { overflow: hidden; text-overflow: ellipsis; }
.uh-sp-ferien { background: rgba(58,110,160,.05); }
.uh-l.is-ferien { background: rgba(58,110,160,.14); box-shadow: inset 0 0 0 1px rgba(58,110,160,.35); }
.uh-fuss-ferien { font-style: normal; color: #2F5C85; font-size: 11px; margin-left: 4px; }
body.theme-dark .uh-ferien, body.dark-mode .uh-ferien, body[data-theme="dark"] .uh-ferien { color: #A9CBEA; background: rgba(120,170,220,.14); }
body.theme-dark .uh-fuss-ferien, body.dark-mode .uh-fuss-ferien, body[data-theme="dark"] .uh-fuss-ferien { color: #A9CBEA; }

/* ---------- Feinschliff 27.11.2026 nachmittags (Jannis: „perfekt“) ----------
   1. Beim Überfahren einer Zeile war die Namensspalte nur halbdurchsichtig
      getönt, beim seitlichen Scrollen schienen die Balken durch. Jetzt deckend.
   2. Namen von Ferien und Grenzen bleiben beim Scrollen links lesbar
      (vorher abgeschnitten, z. B. „hjahrsferien“). clip-path statt overflow,
      sonst greift sticky nicht.
   3. Tablet: Kennzahlen in einer Reihe, damit mehr Personen ins Bild passen.
   4. Handy: Kennzahlen als waagerechte Leiste, Knopf kurz, Legende kleiner. */
.uh-zeile:hover .uh-person { background: linear-gradient(rgba(184,134,43,.06), rgba(184,134,43,.06)), var(--uh-karte); }
.uh-ferien, .uh-band { overflow: visible; clip-path: inset(0 round 6px); }
.uh-ferien span, .uh-band span { position: sticky; left: calc(var(--uh-name) + 8px); overflow: visible; text-overflow: clip; }
.uh-sp-ferien { background: rgba(58,110,160,.065); }
@media (max-width: 1100px) {
    .uh-zahlen { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
    .uh-zahl { padding: 8px 12px; min-height: 0; column-gap: 10px; }
    .uh-zahl b { font-size: 24px; }
    .uh-zahl span { font-size: 12px; }
    .uh-zahl small { font-size: 11px; }
    .uh-vorschlag-knopf { height: 24px; padding: 0 10px; font-size: 11.5px; }
    .uh-lang { display: none; }
}
@media (max-width: 640px) {
    .uh-zahlen { display: flex; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .uh-zahlen::-webkit-scrollbar { display: none; }
    .uh-zahl { flex: 0 0 auto; min-width: 158px; scroll-snap-align: start; }
    .uh-zahl small { white-space: nowrap; }
    .uh-leiste { gap: 8px 10px; padding-top: 10px; padding-bottom: 10px; }
    .uh-blaettern { width: 100%; }
    .uh-zeitraum { flex: 1; text-align: center; }
    .uh-overlay select.uh-abt { flex: 1 1 140px; max-width: none; }
    .uh-legende { gap: 10px; font-size: 11px; flex-wrap: wrap; width: 100%; }
    .uh-unter { display: none; }
    .uh-overlay { --uh-name: 136px; }
    .uh-zahlen { scroll-padding-inline: 16px; padding-left: 16px; padding-right: 16px; }
    .uh-blaettern .uh-txt { white-space: nowrap; padding: 0 8px; }
    .uh-zeitraum { min-width: 0; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .uh-pn { font-size: 13px; }
}

/* ==========================================================================
   Neuaufbau 27.11.2026 (Jannis: „im Design und Aufbau viel viel besser“)
   Kopf: Titel + ein Satz statt vier Kennzahl-Kästen. Darunter eine Leiste.
   Hauptteil zweispaltig: links „Zu entscheiden“, rechts die Zeitleiste.
   Ansicht „Jahr“ zeigt alle Monate ohne seitliches Scrollen.
   „Gleichzeitig weg“ als Leiste unter den Monaten, Einzelheiten beim Überfahren.
   ========================================================================== */
.uh-overlay { --uh-name: 200px; --uh-liste: 300px; }
.uh-fenster { height: 100%; }
.uh-kopf { padding: 22px 28px 0; align-items: flex-start; }
.uh-titel { font-size: 26px; }
.uh-satz { margin: 8px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--uh-grau); max-width: 820px; }
.uh-satz b { color: var(--uh-tinte); font-weight: 600; }
.uh-satz .is-rot { color: var(--uh-rot); }
.uh-leiste { padding: 14px 28px 14px; gap: 10px 14px; flex-wrap: wrap; }
.uh-leiste .uh-seg { margin-left: auto; }
.uh-seg button { min-width: 64px; }

.uh-haupt {
    flex: 1 1 auto; min-height: 0; display: grid;
    grid-template-columns: var(--uh-liste) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
    border-top: 1px solid var(--uh-linie-2);
}
.uh-haupt > .uh-inhalt { border-top: 0; min-height: 0; height: 100%; }

/* Liste links */
.uh-offen { overflow: auto; border-right: 1px solid var(--uh-linie-2); background: var(--uh-grund); padding: 16px 0 20px; overscroll-behavior: contain; }
.uh-o-kopf { display: flex; align-items: baseline; gap: 8px; padding: 0 20px 10px; }
.uh-o-kopf h3 { margin: 0; font: 600 15px/1.2 var(--font-display, system-ui, sans-serif); color: var(--uh-tinte); }
.uh-o-zahl { font-size: 13px; color: var(--uh-grau); font-variant-numeric: tabular-nums; }
.uh-o-vorschlag {
    margin: 2px 20px 12px; width: calc(100% - 40px); text-align: left; cursor: pointer;
    display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px;
    border: 1px solid rgba(61,122,90,.35); background: rgba(61,122,90,.07); color: var(--uh-gruen); font: inherit;
}
.uh-o-vorschlag b { font-size: 13.5px; font-weight: 600; }
.uh-o-vorschlag span { font-size: 12px; color: var(--uh-tinte); opacity: .8; }
.uh-o-vorschlag:hover { background: rgba(61,122,90,.12); }
.uh-o-liste { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--uh-linie); }
.uh-o-liste li { border-bottom: 1px solid var(--uh-linie); }
.uh-o {
    display: flex; flex-direction: column; gap: 3px; width: 100%; text-align: left; cursor: pointer;
    padding: 11px 20px 11px 20px; border: 0; background: transparent; font: inherit; color: var(--uh-tinte);
    box-shadow: inset 3px 0 0 transparent;
}
.uh-o:hover { background: var(--uh-karte); }
.uh-o.is-aktiv { background: var(--uh-karte); box-shadow: inset 3px 0 0 var(--uh-gold); }
.uh-o-zeile { display: flex; align-items: baseline; gap: 8px; }
.uh-o-name { font-weight: 600; font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uh-o-tage { font-size: 12px; color: var(--uh-grau); font-variant-numeric: tabular-nums; white-space: nowrap; }
.uh-o-zeit { font-size: 13px; color: var(--uh-tinte); opacity: .85; font-variant-numeric: tabular-nums; }
.uh-o-status { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--uh-grau); }
.uh-o-status i { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--uh-grau); }
.uh-o-status b { font-weight: 600; }
.uh-o.ist-ja .uh-o-status i { background: var(--uh-gruen); } .uh-o.ist-ja .uh-o-status b { color: var(--uh-gruen); }
.uh-o.ist-knapp .uh-o-status i { background: #C7902F; } .uh-o.ist-knapp .uh-o-status b { color: #8A6318; }
.uh-o.ist-nein .uh-o-status i { background: var(--uh-rot); } .uh-o.ist-nein .uh-o-status b { color: var(--uh-rot); }
.uh-o:focus-visible, .uh-o-vorschlag:focus-visible { outline: 2px solid var(--uh-gold); outline-offset: -2px; }
.uh-o-leer { margin: 0; padding: 14px 20px; font-size: 13px; color: var(--uh-grau); }

/* Ecke des Kopfrasters: oben Anzahl, unten Beschriftung der Leiste */
.uh-kopfraster .uh-ecke { flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 10px 16px 6px; }
.uh-kopfraster .uh-ecke small { font-size: 11.5px; color: var(--uh-grau); }

/* Gleichzeitig weg: Leiste unter den Monaten */
.uh-r-last { height: 26px; border-top: 1px solid var(--uh-linie); }
.uh-reihe > .uh-last { top: auto; bottom: 4px; border-radius: 2px 2px 0 0; background: rgba(61,122,90,.42); }
.uh-reihe > .uh-last.nur-offen { background: repeating-linear-gradient(135deg, rgba(184,134,43,.6) 0 2px, rgba(184,134,43,.25) 2px 4px); }
.uh-reihe > .uh-last.is-voll { background: #C7902F; }
.uh-reihe > .uh-last.is-ueber { background: var(--uh-rot); }
.uh-l.is-last { width: 12px; height: 10px; border-radius: 2px 2px 0 0; background: rgba(61,122,90,.42); }

/* Monatsgrenzen in der Jahresansicht deutlicher, Monatsnamen kleiner */
.uh-z-jahr .uh-r-mon { height: 30px; }
.uh-z-jahr .uh-mon { padding-left: 6px; }
.uh-z-jahr .uh-mon-text b { font-size: 13.5px; }
.uh-z-jahr .uh-m1 { background: var(--uh-linie-2); }
.uh-z-jahr .uh-sp { background: rgba(15,27,45,.035); }

/* Zeilen ruhiger */
.uh-zeile { height: 44px; }
.uh-z-jahr .uh-balken { top: 13px; height: 18px; }
.uh-z-jahr .uh-stueck { border-radius: 3px; }
.uh-z-jahr .uh-bt { display: none; }
.uh-z-jahr .uh-warn { transform: scale(.78); }
.uh-balken { top: 9px; height: 26px; }
.uh-balken.is-markiert .uh-stueck { box-shadow: inset 0 0 0 2px var(--uh-gold-tief), 0 0 0 3px rgba(184,134,43,.28); }
@media (prefers-reduced-motion: no-preference) {
    .uh-balken.is-markiert { animation: uh-mark 1.2s ease-out 1; }
    @keyframes uh-mark { 0%, 40% { filter: brightness(1.08); } 100% { filter: none; } }
}

/* Einzelheiten beim Überfahren */
.uh-tip {
    position: fixed; z-index: 10070; pointer-events: none; max-width: 280px;
    display: flex; flex-direction: column; gap: 2px; padding: 9px 11px; border-radius: 10px;
    background: var(--uh-tinte); color: #fff; font-size: 12.5px; line-height: 1.4;
    box-shadow: 0 8px 24px rgba(15,27,45,.22);
}
.uh-tip b { font-weight: 600; }
.uh-tip span { color: rgba(255,255,255,.82); }
.uh-tip .uh-tip-ferien { color: #A9CBEA; }
.uh-tip .is-rot { color: #F2A7A0; }
.uh-tip .uh-wer { color: rgba(255,255,255,.7); }

/* Fußzeile mit Legende */
.uh-fusszeile { border-top: 1px solid var(--uh-linie-2); padding: 10px 28px; background: var(--uh-grund); }
.uh-fusszeile .uh-legende { margin-left: 0; flex-wrap: wrap; }

/* Tablet */
@media (max-width: 1100px) {
    .uh-overlay { --uh-liste: 260px; --uh-name: 170px; }
}
/* Handy und schmales Tablet: Liste oben, Zeitleiste darunter */
@media (max-width: 760px) {
    .uh-overlay { --uh-name: 128px; }
    .uh-kopf { padding: 16px 16px 0; }
    .uh-titel { font-size: 22px; }
    .uh-satz { font-size: 13.5px; }
    .uh-leiste { padding: 10px 16px; }
    .uh-leiste .uh-seg { margin-left: 0; }
    .uh-haupt { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
    .uh-offen { max-height: 32vh; border-right: 0; border-bottom: 1px solid var(--uh-linie-2); padding-top: 10px; }
    .uh-o-kopf, .uh-o { padding-left: 16px; padding-right: 16px; }
    .uh-o-vorschlag { margin-left: 16px; margin-right: 16px; width: calc(100% - 32px); }
    .uh-fusszeile { display: none; }
    .uh-zeile { height: 46px; }
}
.uh-reihe > .uh-last { background: rgba(61,122,90,.6); }
.uh-l.is-last { background: rgba(61,122,90,.6); }
.uh-z-jahr .uh-stueck { border-radius: 4px; }
.uh-z-jahr .uh-heute span { font-size: 9.5px; padding: 1px 5px; }
.uh-tip[hidden] { display: none; }
@media (max-width: 760px) { .uh-satz-mehr { display: none; } }
