
:root {
    color-scheme: light;
    --nav: #152b3d; --ink: #203447; --muted: #52677a; --accent: #087681;
    --hover: #075d67; --line: #dce5ec; --canvas: #f4f6f9;
    font-family: "Segoe UI", system-ui, sans-serif;
    color: var(--ink); background: var(--canvas);
}
* { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); font-weight: 650; letter-spacing: -.035em; line-height: 1.15; }
h2 { font-size: 1.13rem; font-weight: 650; }
h3 { font-size: .98rem; }
p { margin-top: .55rem; line-height: 1.5; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { color: var(--hover); }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 3px solid #27a9b6; outline-offset: 3px; }
.skip-link { position: absolute; left: 14px; top: -100px; z-index: 10; background: white; padding: 10px; }
.skip-link:focus { top: 8px; }
.muted { color: var(--muted); }
.warning, .negative { color: #9a352b; }
.preline { white-space: pre-line; overflow-wrap: anywhere; }

.top { background: var(--nav); color: white; border-bottom: 3px solid #147d8a; }
.top-inner, .shell { width: min(100% - 48px, 1376px); margin-inline: auto; }
.top-inner { display: flex; align-items: center; min-height: 58px; gap: 24px; }
.brand { display: inline-flex; align-items: center; flex: none; color: white; font-size: 1.24rem; font-weight: 740; letter-spacing: -.04em; text-decoration: none; }
.brand:hover { color: white; }
.brand > span:not(.brand-icon) { color: #82d8df; }
.brand-icon { width: 23px; height: 23px; border: 2px solid #82d8df; border-radius: 50%; margin-right: 8px; position: relative; }
.brand-icon::after { content: ""; position: absolute; inset: 4px 4px 8px 8px; border-left: 2px solid white; border-bottom: 2px solid white; }
.top nav { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.top nav a { color: #dce6ef; padding: 8px 11px; border-radius: 8px; font-weight: 590; font-size: .88rem; white-space: nowrap; text-decoration: none; }
.top nav a:hover, .top nav .current { color: white; background: #25475b; }
.top-test { border-bottom-color: #e0a03e; }
.instance-label { margin-left: 8px; padding: 3px 6px; border-radius: 5px; background: #ffd77c; color: #3c2c12; font-size: .65rem; letter-spacing: .02em; }
.top nav .instance-link { color: #ffd77c; box-shadow: inset 0 0 0 1px #a78044; }
.sign-out { display: flex; align-items: center; min-width: 0; gap: 10px; font-size: .85rem; }
.account-link {
    min-width: 0; max-width: 155px; padding: 6px 8px; border-radius: 8px;
    color: #dce6ef; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.account-link:hover, .account-link[aria-current=page] { color: white; background: #25475b; }
.sign-out button { flex: none; font-size: .8rem; color: white; background: transparent; border-color: #607789; }
.sign-out button:hover { background: #25475b; }

main.shell { padding-top: clamp(10px, 1.5vw, 20px); min-height: calc(100vh - 141px); }
.footer { display: flex; gap: 12px; padding-block: 22px; color: var(--muted); font-size: .81rem; }
.footer span:last-child { border-left: 1px solid var(--line); padding-left: 12px; }
.page-heading, .section-heading, .approval-title { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.page-heading { margin-bottom: 13px; row-gap: 7px; flex-wrap: wrap; }
.page-heading p, .approval-title p { color: var(--muted); margin-top: 3px; }
.page-heading > .button { min-height: 36px; padding-block: 6px; }
.section-heading { margin-bottom: 13px; flex-wrap: wrap; }
.card { background: white; border: 1px solid var(--line); border-radius: 13px; padding: 20px; box-shadow: 0 2px 5px #263d5108; }
main > .card { margin-bottom: 10px; }
.card > h2 { margin-bottom: 12px; }
.form-card { max-width: 980px; }
.plan-layout { display: grid; grid-template-columns: minmax(245px, 25%) minmax(0, 1fr); align-items: start; gap: 12px; }
.plan-tree { min-width: 0; overflow-wrap: anywhere; }
.plan-tree .section-heading { flex-wrap: nowrap; }
.plan-tree .icon-btn { flex: 0 0 40px; }
.plan-tree-list { list-style: none; padding-left: 14px; margin: 0; }
.plan-tree > .plan-tree-list { padding: 0; }
.plan-tree-folder > summary, .plan-tree-entry > summary, .plan-tree-root { padding: 6px; border-radius: 6px; }
.plan-tree-folder > summary svg { vertical-align: middle; margin-inline-end: 3px; }
.plan-tree-root { margin-top: 8px; color: var(--muted); font-size: .9rem; }
.plan-tree-entry > summary { cursor: grab; }
.plan-tree-entry > :is(p, label, dl) { margin: 6px 0 8px 12px; }
.plan-tree-entry > .plan-tree-weekdays { grid-template-columns: auto minmax(0, 1fr); }
.plan-drop-active { background: #dff2f3; outline: 1px dashed #0b7580; }
.plan-assignment-remove > summary { display: inline-flex; width: 32px; min-height: 30px; color: #a12e27; }
.plan-assignment-remove > summary::-webkit-details-marker { display: none; }
.plan-assignment-remove > form { margin-top: 6px; }
[data-auto-booking-fields][hidden] { display: none; }
.login { width: min(100%, 478px); margin: 7vh auto; padding: 34px; }
.login h1 { margin-bottom: 22px; }
.login-form { display: grid; gap: 14px; }
.login-secondary { margin-block: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.login-secondary button { width: 100%; }
.demo-users { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 10px; }
.demo-users button { width: 100%; }

button, .button {
    display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 15px;
    background: white; color: var(--ink); border: 1px solid #bacad5; border-radius: 8px;
    text-decoration: none; cursor: pointer; font-weight: 620; line-height: 1.24; text-align: center;
}
button:hover, .button:hover { background: #eef4f8; }
.primary, button.primary { background: var(--accent); border-color: var(--accent); color: white; }
.primary:hover, button.primary:hover { background: var(--hover); }
button:disabled { cursor: default; opacity: .5; }
button.danger { color: #a12e27; border-color: #d8a69e; }
.icon-btn { font-size: 1.3rem; width: 40px; padding: 2px; }
.group-rename summary { display: flex; margin-inline-start: auto; }
.group-rename summary::-webkit-details-marker { display: none; }
.group-rename form { margin-top: 10px; }
input, select, textarea { width: 100%; border: 1px solid #bdcdd8; border-radius: 8px; padding: 9px 11px; color: var(--ink); background: white; min-height: 42px; min-width: 0; }
textarea { min-height: 74px; resize: vertical; }
label { color: var(--muted); display: grid; gap: 5px; font-size: .87rem; font-weight: 575; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 12px; min-width: 0; }
legend { color: var(--ink); font-weight: 620; padding: 0 6px; }
.check { display: flex; align-items: center; gap: 9px; min-height: 36px; }
input[type=checkbox] { accent-color: var(--accent); width: 18px; min-height: 18px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; align-items: end; margin-top: 12px; }
.fields > .wide { grid-column: 1 / -1; }
.fields > details { align-self: center; }
.week-target { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding-top: 10px; border-top: 1px solid var(--line); }
.week-target output { font-weight: 650; font-variant-numeric: tabular-nums; }
.filter, .form-actions { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 9px; }
.filter input, .filter select { width: auto; max-width: 100%; }
.filter label { max-width: 100%; }
.toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px; padding: 8px 12px; }
.toolbar label { gap: 3px; }
.toolbar :is(button, .button, input, select) { min-height: 36px; padding-block: 6px; }
.notice, .validation { padding: 12px 16px; border-radius: 8px; margin-bottom: 14px; border: 1px solid #acd8d4; color: #145a51; background: #e6f5f2; }
.validation { border-color: #ebc6bc; background: #fff3ed; color: #8d3327; }
.validation ul { margin: 0; padding-left: 1.25rem; }

.dashboard, .quick-links { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; max-width: 1060px; }
.clock-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 12px; }
.clock-employee { color: var(--muted); font-weight: 600; overflow-wrap: anywhere; }
.clock-card, .actions-card { padding: clamp(18px, 3vw, 32px); }
.clock-card h2 { font-size: clamp(1.35rem, 2.8vw, 1.76rem); letter-spacing: -.025em; margin-top: 12px; }
.clock-form { margin-top: 18px; }
.clock-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 13px; }
.clock-buttons button { min-height: 62px; font-size: 1.06rem; }
.presence, .status, .cal-label { display: inline-flex; align-items: center; gap: 7px; border-radius: 8px; padding: 4px 8px; font-size: .78rem; font-weight: 650; background: #e9eef4; color: #364d5e; }
.presence { min-height: 29px; }
.presence span { width: 8px; height: 8px; border-radius: 50%; background: #728899; }
.presence.active, .status.bewilligt, .cal-label.urlaub { color: #145d51; background: #dff3ee; }
.presence.active span { background: #14806f; }
.status.offen { background: #fff0cc; color: #755414; }
.status.abgelehnt { background: #fde9e6; color: #8a3328; }
.cal-label.za { background: #e7effb; color: #2d5184; }
.action-row, .quick-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink); text-decoration: none; }
.action-row { min-height: 53px; padding: 10px 2px; border-bottom: 1px solid var(--line); font-weight: 610; }
.action-row span:last-child, .quick-link > span:last-child { color: var(--accent); font-size: 1.4rem; }
.text-link { display: inline-block; margin-top: 15px; font-size: .88rem; }
.quick-links { margin-top: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.quick-link small { display: block; margin-top: 3px; color: var(--muted); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs a { padding: 9px 12px; border-radius: 8px; text-decoration: none; font-weight: 590; color: var(--ink); border: 1px solid var(--line); background: white; }
.tabs a.selected { border-color: #79bfc4; color: #065969; background: #e3f3f4; }
.approval { max-width: 960px; }
.approval.highlight { border-color: #66b3ba; }
.approval-title { align-items: flex-start; }
.approval-title p { font-size: .88rem; }
.empty { max-width: 760px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .88rem; }
th, td { border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: left; vertical-align: top; }
thead th { background: #eef3f7; white-space: nowrap; }
tfoot { background: #e6f1f4; font-weight: 650; }
tbody td, tbody th { background: white; }
tbody tr:last-child > * { border-bottom: 0; }
th small, td small { color: var(--muted); }
main > .report-card { padding-block: 10px 12px; }
.report-card .section-heading { margin-bottom: 8px; row-gap: 5px; }
.report-view { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.report-view .check { min-height: 28px; gap: 6px; }
.report-view [hidden] { display: none; }
.report-header-actions { display: flex; align-items: center; gap: 8px; }
.report-header-actions .icon-btn { min-height: 32px; width: 34px; }
.report-columns-list { margin-block: 12px; }
.report-column-option { display: grid; grid-template-columns: 20px minmax(0, 1fr) 32px 32px; align-items: center; gap: 6px; padding-block: 3px; }
.report-column-option button { min-height: 30px; padding: 2px; }
.column-drag-handle { cursor: grab; color: var(--muted); padding: 3px; }
.week-navigation { display: flex; align-items: center; gap: 6px; font-size: .85rem; font-variant-numeric: tabular-nums; }
.week-navigation button { min-width: 28px; min-height: 28px; padding: 0; font-size: 1.1rem; }
.report-scroll { max-height: 70dvh; overflow: auto; }
.report-table { min-width: 620px; border-collapse: separate; border-spacing: 0; }
.report-table thead th { position: sticky; top: 0; z-index: 1; padding-block: 7px; }
.report-table [data-report-column][hidden] { display: none; }
.report-configurable-heading { width: var(--report-column-width, auto); min-width: var(--report-column-width, 0); }
.report-column-resize { position: absolute; inset: 0 0 0 auto; width: 8px; cursor: col-resize; touch-action: none; }
.report-column-resize:hover, .report-column-resize:focus-visible { border-right: 2px solid var(--accent); }
.report-table tbody tr > * { padding-block: 2px; }
.report-table td:nth-child(3) { width: 49%; }
.report-table th:first-child { width: 84px; }
.day-actions { white-space: nowrap; }
.day-actions .row-action { min-height: 24px; min-width: 24px; padding: 0; border-radius: 6px; font-size: 1rem; vertical-align: middle; }
.report-table tr.row-selected > *, .employee-table tr[aria-current=true] > * { background: #dff1f3; }
.report-table tr.row-selected > :first-child, .employee-table tr[aria-current=true] > :first-child { box-shadow: inset 3px 0 var(--accent); }
.employee-table tbody tr { cursor: pointer; }
.employee-edit { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.report-menu {
    position: fixed; z-index: 5; padding: 5px; min-width: 185px;
    max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow: auto;
    background: white; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 5px 18px #20344724;
}
.report-menu [role=menuitem] {
    display: flex; align-items: center; justify-content: flex-start; gap: 9px; width: 100%; min-height: 40px; padding: 8px 10px;
    text-align: left; border: 0; color: var(--ink); font-size: .88rem; text-decoration: none;
}
.report-menu svg, .employee-edit svg {
    width: 18px; height: 18px; flex: none; color: var(--muted); fill: none;
    stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.report-menu [role=menuitem]:disabled { background: transparent; }
.report-menu [role=menuitem]:not(:disabled):hover, .report-menu [role=menuitem]:focus-visible { background: #e5f3f4; }
.report-dialog, .time-calculator, .plan-folder-dialog {
    width: min(640px, calc(100% - 22px)); max-height: calc(100% - 26px);
    padding: 20px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink);
}
.report-dialog::backdrop, .time-calculator::backdrop, .plan-folder-dialog::backdrop { background: #152b3d70; }
.report-dialog [data-dialog-close] { min-width: 36px; padding: 4px; font-size: 1.25rem; }
.time-calculator { width: min(460px, calc(100% - 22px)); }
.time-calculator .form-actions { margin-top: 14px; }
.time-calculator input[aria-invalid=true] { border-color: #a12e27; }
.report-table th[scope=row], .num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.row-today > * { background: #f1f8fa; }
.num { text-align: right; }
.balance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px 8px; margin-bottom: 10px; }
.balance { display: flex; flex-direction: column; gap: 2px; padding: 7px 12px; }
.balance span, .balance small { color: var(--muted); }
.balance strong { font-size: 1.32rem; line-height: 1.18; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
summary { cursor: pointer; overflow-wrap: anywhere; }
summary:hover { color: var(--hover); }
.drawer, .audit-row { padding: 10px 0; border-top: 1px solid var(--line); }
.drawer summary, .audit-row summary { font-weight: 620; }
.detail-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-top: 9px; overflow-wrap: anywhere; }
.detail-row > details[open] { flex-basis: 100%; }
.audit-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-top: 9px; }
.audit-values pre { background: #f1f5f8; padding: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.legend { display: flex; gap: 7px; }
.calendar-wrap { max-height: 65vh; overflow: auto; }
.calendar-table { width: max-content; min-width: 100%; }
.calendar-table th, .calendar-table td { min-width: 47px; border-right: 1px solid var(--line); text-align: center; padding: 7px 4px; }
.calendar-table th:first-child { position: sticky; left: 0; min-width: 150px; text-align: left; padding-left: 11px; z-index: 1; }
.calendar-table thead th { position: sticky; top: 0; z-index: 2; }
.calendar-table thead th:first-child { z-index: 3; }
.calendar-table th small { display: block; }
.calendar-table .weekend { background: #f2f5f8; }
.calendar-table .today { color: #065969; background: #dff1f3; }
.calendar-table .cal-label { display: flex; flex-direction: column; white-space: nowrap; line-height: 1; }
.calendar-mobile { display: none; }
.day-list { margin-block: 10px; }
.day-list div { display: flex; align-items: center; justify-content: space-between; padding-block: 6px; gap: 9px; }
.approval-group > summary { font-size: 1.12rem; cursor: pointer; }
.approval-group-actions { justify-content: end; margin: 8px 0; }
.route-grid { display: grid; grid-template-columns: minmax(125px, 1fr) repeat(2, minmax(125px, 1.5fr)); gap: 12px; align-items: end; border-top: 1px solid var(--line); padding: 11px 0; }
.route-grid strong { align-self: center; }
.summary-list { display: grid; grid-template-columns: 180px 1fr; gap: 5px 10px; }
.summary-list dt { font-weight: 600; }
.summary-list dd { margin: 0; }
.break-row { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 8px; margin-bottom: 8px; }

@media (max-width: 1000px) {
    .top-inner { flex-wrap: wrap; column-gap: 15px; row-gap: 0; padding-block: 8px 4px; }
    .top nav { order: 3; flex-basis: 100%; padding-block: 4px; }
    .sign-out { flex: 1; justify-content: flex-end; }
}
@media (max-width: 680px) {
    .shell, .top-inner { width: calc(100% - 28px); }
    .top nav { flex-wrap: wrap; gap: 2px; }
    .top nav a { font-size: .8rem; padding-inline: 8px; }
    .dashboard, .quick-links { grid-template-columns: 1fr; gap: 11px; }
    .quick-links { margin-top: 11px; }
    .card { padding: 14px; }
    .toolbar, .balance { padding: 7px 10px; }
    .clock-card { padding: 20px; }
    .clock-buttons button { min-height: 59px; }
    .fields, .audit-values, .plan-layout { grid-template-columns: minmax(0, 1fr); }
    .calendar-desktop { display: none; }
    .calendar-mobile { display: block; }
    .route-grid { grid-template-columns: 1fr 1fr; }
    .route-grid > strong { grid-column: 1 / -1; }
    .summary-list { grid-template-columns: minmax(90px, 1fr) 1fr; }
    .page-heading { margin-bottom: 10px; }
}
