:root {
  color-scheme: light;
  font-family: "Segoe UI", "Arial", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --navy: #102944;
  --navy-deep: #0b223c;
  --ink: #102944;
  --muted: #60738a;
  --teal: #0ba99b;
  --blue: #1672df;
  --page: #f2f6fb;
  --line: #dfe7f0;
  --shadow: 0 2px 7px rgba(26, 49, 76, .09), 0 1px 2px rgba(26, 49, 76, .05);
}

* { box-sizing: border-box; }
html, body { width: 100%; min-width: 0; min-height: 100%; margin: 0; }
body { overflow-x: hidden; overflow-y: auto; background: var(--page); color: var(--ink); }
button { font: inherit; }
button:focus-visible { outline: 3px solid rgba(15, 169, 155, .45); outline-offset: 2px; }

.app-shell { display: flex; width: 100%; height: auto; min-height: 100vh; overflow: visible; }
.sidebar {
  position: sticky; top: 0; align-self: flex-start; display: flex; flex: 0 0 clamp(218px, 16.03vw, 268px); flex-direction: column;
  height: 100vh; min-height: 600px; padding: 21px 13px 18px; color: #f3f8fc;
  background: radial-gradient(ellipse at 8% 0%, rgba(43, 77, 109, .34), transparent 55%), linear-gradient(160deg, #102944 4%, #0b223b 100%);
}
.brand { display: flex; align-items: center; gap: 15px; height: 73px; padding: 0 10px 8px; }
.brand-mark { width: 56px; height: 56px; flex: none; fill: #10b8aa; filter: drop-shadow(0 2px 3px rgba(0,0,0,.16)); }
.brand-copy { display: grid; line-height: 1.08; letter-spacing: -.3px; }
.brand-copy strong { color: #f6f9fd; font-size: clamp(17px, 1.21vw, 21px); font-weight: 750; }
.brand-copy span { margin-top: 3px; color: #edf4fa; font-size: 17px; font-weight: 650; }
.nav-list { display: grid; gap: 7px; margin-top: 23px; }
.nav-item {
  display: flex; align-items: center; gap: 16px; min-width: 0; height: clamp(45px, 6.05vh, 57px); padding: 0 20px;
  border: 0; border-radius: 12px; color: #eef5fb; text-align: left; background: transparent; cursor: pointer;
  font-size: clamp(15px, 1.05vw, 18px); font-weight: 550; transition: background .15s ease, transform .15s ease;
}
.nav-item:hover { background: rgba(255,255,255,.09); }
.nav-item:active { transform: translateY(1px); }
.nav-item.is-active { color: white; background: linear-gradient(100deg, #0cb4a7, #0ca79a); box-shadow: 0 5px 14px rgba(5, 18, 35, .17); }
.nav-icon { display: grid; width: 25px; height: 25px; flex: none; place-items: center; }
.nav-icon svg { width: 24px; height: 24px; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid rgba(220, 234, 246, .28); padding: 18px 4px 0; }
.profile-row { display: flex; align-items: center; gap: 10px; min-height: 43px; padding: 0 4px; }
.avatar { display: grid; width: 39px; height: 39px; flex: none; place-items: center; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; background: #415871; }
.avatar svg { width: 22px; height: 22px; }
.profile-name { overflow: hidden; flex: 1; color: #f2f7fb; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.settings-shortcut { display: grid; width: 29px; height: 29px; flex: none; place-items: center; border: 0; border-radius: 7px; color: #dfeaf3; background: transparent; cursor: pointer; }
.settings-shortcut:hover { background: rgba(255,255,255,.1); }
.settings-shortcut svg { width: 20px; height: 20px; }
.local-status { margin: 10px 0 0 40px; color: #b4c4d4; font-size: 11px; }
.status-dot, .badge-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #25cfb7; vertical-align: 1px; }

.main-content {
  display: block; flex: 1; min-width: 0; height: auto; min-height: 100vh; overflow: visible; padding: 20px 20px 26px; 
  background: radial-gradient(ellipse at 58% 4%, rgba(255,255,255,.8), transparent 56%), var(--page);
}
.topbar { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 16px; padding: 0 8px 0 13px; }
.welcome { display: flex; min-width: 0; align-items: center; gap: 21px; }
.welcome-accent { width: 6px; height: 65px; flex: none; border-radius: 8px; background: var(--teal); }
.welcome h1 { margin: 0; color: #102944; font-size: clamp(25px, 2.05vw, 34px); font-weight: 730; letter-spacing: -.8px; line-height: 1.12; }
.welcome p { margin: 5px 0 0; color: #344c68; font-size: clamp(14px, 1.11vw, 18px); font-weight: 450; }
.topbar-tools { display: flex; align-items: center; gap: clamp(9px, 1.1vw, 18px); color: #122943; white-space: nowrap; }
.demo-badge { display: inline-flex; align-items: center; padding: 8px 10px; border: 1px solid #edca7b; border-radius: 8px; color: #735112; background: #fff5da; font-size: 10px; font-weight: 750; letter-spacing: .55px; }
.badge-dot { width: 7px; height: 7px; background: #e9a92b; }
.top-date, .top-time { display: inline-flex; align-items: center; gap: 9px; font-size: clamp(12px, .94vw, 15px); font-weight: 600; }
.inline-icon { display: inline-flex; color: #122943; }
.inline-icon svg { width: 23px; height: 23px; }
.tool-divider { width: 1px; height: 34px; background: #c6d1dc; }

.metric-grid { display: grid; min-width: 0; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.metric-card {
  display: flex; min-width: 0; align-items: flex-start; gap: 15px; padding: clamp(13px, 1.2vw, 20px) clamp(12px, 1.43vw, 24px);
  overflow: visible; border: 1px solid rgba(208, 220, 233, .64); border-radius: 16px; box-shadow: var(--shadow);
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(255,255,255,.82));
}
.metric-teal { background: linear-gradient(115deg, #fff 20%, #e5f9f8); }
.metric-blue { background: linear-gradient(115deg, #fff 20%, #edf4ff); }
.metric-mint { background: linear-gradient(115deg, #fff 20%, #e5f9f6); }
.metric-lilac { background: linear-gradient(115deg, #fff 20%, #f0f3ff); }
.metric-green { background: linear-gradient(115deg, #fff 20%, #eff9ed); }
.metric-icon { display: grid; width: 40px; height: 42px; flex: 0 0 40px; place-items: center; color: var(--teal); }
.metric-blue .metric-icon { color: #1672df; }
.metric-lilac .metric-icon { color: #1672df; }
.metric-green .metric-icon { color: #23a64f; }
.metric-icon svg { width: 38px; height: 38px; }
.metric-copy { min-width: 0; }
.metric-name { color: #112844; font-size: clamp(13px, 1.03vw, 17px); font-weight: 700; letter-spacing: -.2px; line-height: 1.1; }
.metric-period { margin-top: 3px; color: #4c6178; font-size: clamp(11px, .9vw, 14px); }
.metric-value { margin-top: 7px; color: #102944; font-size: clamp(24px, 2.08vw, 35px); font-weight: 750; letter-spacing: -.8px; line-height: 1; }

.middle-grid { display: grid; min-height: 0; min-width: 0; grid-template-columns: 1.06fr 1fr; gap: 13px; }
.panel { min-width: 0; min-height: 0; overflow: hidden; border: 1px solid rgba(215, 225, 236, .88); border-radius: 17px; background: rgba(255,255,255,.88); box-shadow: var(--shadow); }
.calendar-panel { display: flex; flex-direction: column; padding: 13px 20px 17px; }
.workspace-page { display: grid; gap: 16px; }
.workspace-controls, .workspace-content { padding: 18px; }
.workspace-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:9px; }
.workspace-toolbar input, .workspace-toolbar select { min-height:40px; padding:7px 10px; border:1px solid #ced8e3; border-radius:7px; color:#18344f; background:#fff; }
.workspace-calendar { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:7px; }
.calendar-weekdays { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:7px; margin-bottom:7px; color:#637489; font-size:12px; font-weight:700; text-align:center; }
.workspace-day { min-height:94px; display:flex; flex-direction:column; align-items:flex-start; gap:6px; padding:9px; border:1px solid #d9e1ea; border-radius:8px; background:#fff; color:#18344f; text-align:left; cursor:pointer; }
.workspace-day.has-report { border-left:4px solid #348a69; background:#f2faf6; }
.workspace-day.current-day { outline:2px solid #246ca0; outline-offset:1px; }
.workspace-day.missing-report { border-left:4px solid #d79a32; background:#fff9ed; }
.workspace-day.status-urlaub { background:#eff4ff; border-left-color:#658bd6; }
.workspace-day.status-krankheit { background:#fff0f0; border-left-color:#c46b6b; }
.workspace-day.status-feiertag { background:#f4efff; border-left-color:#9075c8; }
.workspace-day small { color:#637489; }
.workspace-day.status-vacation { background:#eff4ff; border-left-color:#658bd6; }
.workspace-day.status-sick { background:#fff0f0; border-left-color:#c46b6b; }
.workspace-day.status-holiday { background:#f4efff; border-left-color:#9075c8; }
.workspace-day.status-reduction { background:#fff5e8; border-left-color:#d28c32; }
.workspace-day.status-free,.workspace-day.status-other { background:#f7f8fa; border-left-color:#c7ced6; }
.calendar-legend { display:flex; flex-wrap:wrap; gap:14px; margin-bottom:12px; color:#52677c; font-size:13px; }
.calendar-legend span::before { content:""; display:inline-block; width:9px; height:9px; margin-right:6px; border-radius:50%; background:#348a69; }
.calendar-legend .legend-vacation::before { background:#658bd6; }.calendar-legend .legend-sick::before { background:#c46b6b; }.calendar-legend .legend-holiday::before { background:#9075c8; }.calendar-legend .legend-reduction::before { background:#d28c32; }.calendar-legend .legend-missing::before { background:#d79a32; }
.workspace-table { width:100%; border-collapse:collapse; font-size:14px; }
.workspace-table th,.workspace-table td { padding:9px 10px; border-bottom:1px solid #e1e7ed; text-align:left; vertical-align:top; }
.workspace-table th { position:sticky; top:0; background:#f4f7fa; color:#354c64; }
.table-scroll { overflow:auto; max-height:68vh; }
.workspace-note { margin-top:14px; font-weight:600; }
.metric-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(145px,1fr)); gap:10px; margin-bottom:20px; }
.workspace-metric { display:flex; flex-direction:column; gap:8px; padding:14px; border-radius:9px; background:#f2f6fa; color:#536981; }
.workspace-metric strong { color:#15324f; font-size:21px; }
.stat-bars { display:flex; align-items:end; gap:8px; height:180px; padding:12px; background:#f7f9fb; }
.stat-bars div { flex:1; height:100%; display:flex; flex-direction:column; justify-content:end; align-items:center; gap:4px; font-size:11px; }
.stat-bars i { width:75%; min-height:2px; border-radius:4px 4px 0 0; background:#3976ab; }
.stat-bars small { font-size:10px; color:#637489; white-space:nowrap; }
.stat-inline-bar { display:block; width:100px; height:7px; border-radius:6px; background:#e3eaf0; overflow:hidden; }
.stat-inline-bar i { display:block; height:100%; background:#12a99b; }
.search-result header { display:flex; justify-content:space-between; gap:12px; margin-bottom:8px; }
.search-result details { margin:8px 0; padding:8px 10px; background:#f5f8fa; border-radius:7px; }
.search-result summary { cursor:pointer; }
.search-result mark { background:#ffdd72; color:#17344d; border-radius:2px; }
.search-pagination { display:flex; justify-content:center; gap:10px; padding:16px; }
.weekend-row { background:#f6f8fa; }
.holiday-row { background:#f4efff; }
.delta-positive { color:#19784f; font-weight:700; }
.delta-negative { color:#b74949; font-weight:700; }
.timesheet-summary { margin-top:16px; }
.search-result { padding:12px 0; border-top:1px solid #e0e7ee; }
.print-report h1 { margin-top:0; }
.print-day { padding:10px 0; border-top:1px solid #ccd5de; break-inside:avoid; }
@media print { body { background:#fff!important; } .sidebar,.topbar,.workspace-controls,.nav-list,.toast { display:none!important; } .app-shell,.main-content,.workspace-page,.workspace-content { display:block!important; width:auto!important; max-width:none!important; margin:0!important; padding:0!important; border:0!important; box-shadow:none!important; } .workspace-page[hidden] { display:none!important; } .print-day { break-inside:avoid; } }
@media (max-width: 760px) { .workspace-calendar,.calendar-weekdays { grid-template-columns:repeat(7,minmax(76px,1fr)); min-width:560px; } .workspace-content { overflow-x:auto; } .workspace-day { min-height:78px; padding:6px; font-size:11px; } .workspace-table { min-width:760px; } .workspace-controls,.workspace-content { padding:12px; } }
.panel-heading { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; }
.heading-title { display: flex; min-width: 0; align-items: center; gap: 13px; }
.heading-title h2 { overflow: hidden; margin: 0; color: #102944; font-size: clamp(16px, 1.35vw, 22px); font-weight: 720; letter-spacing: -.45px; text-overflow: ellipsis; white-space: nowrap; }
.section-icon { display: inline-flex; flex: none; color: #0c9d93; }
.section-icon svg { width: 28px; height: 28px; }
.calendar-heading { margin-bottom: 13px; }
.calendar-controls { display: flex; flex: none; align-items: center; gap: 8px; }
.icon-button, .today-button { display: grid; height: 38px; place-items: center; border: 1px solid transparent; border-radius: 10px; color: #142c45; background: #f1f5f9; cursor: pointer; }
.icon-button { width: 39px; }
.icon-button:hover, .today-button:hover { border-color: #bdd5e5; background: #e9f3f8; }
.icon-button svg { width: 21px; height: 21px; }
.today-button { padding: 0 16px; border-color: #e1e8f0; background: #f8fafc; font-size: 13px; font-weight: 650; }
.calendar-grid { display: grid; min-height: 0; flex: 1; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: 29px repeat(6, minmax(0, 1fr)); overflow: hidden; border: 1px solid #dce5ef; border-radius: 9px; background: #fff; }
.weekday { display: grid; place-items: center; border-right: 1px solid #e3eaf2; border-bottom: 1px solid #dce5ef; color: #172e48; background: #f3f6fa; font-size: clamp(11px, .91vw, 15px); font-weight: 700; }
.weekday:last-child { border-right: 0; }
.day-cell { position: relative; display: flex; align-items: flex-start; justify-content: flex-start; min-width: 0; min-height: 0; padding: 7px 8px; border: 0; border-right: 1px solid #e2e9f1; border-bottom: 1px solid #e2e9f1; color: #142a44; background: rgba(255,255,255,.72); text-align: left; cursor: pointer; font-size: clamp(11px, .92vw, 15px); }
.day-cell:nth-child(7n) { border-right: 0; }
.day-cell:nth-last-child(-n+7) { border-bottom: 0; }
.day-cell:hover { background: #eef9f8; }
.day-cell.is-weekend { background: #f5f6f8; }
.day-cell.is-empty { cursor: default; }
.day-cell.is-empty:hover { background: rgba(255,255,255,.72); }
.day-cell.has-work { background: #dcf6f3; }
.day-cell.missing-report { border-color: #d79a32; box-shadow: inset 0 -3px 0 #d79a32; }
.day-cell.missing-report:not(.has-work) { background: #fff9ed; }
.day-cell.is-selected { outline: 2px solid #1672df; outline-offset: -3px; border-radius: 8px; color: #115baa; background: #edf5ff; font-weight: 700; }
.day-number { line-height: 1.2; }
.day-hours { position: absolute; right: 5px; bottom: 5px; left: 7px; overflow: hidden; color: #078972; font-size: clamp(9px, .78vw, 12px); font-weight: 750; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.today-label { position: absolute; right: 4px; bottom: 5px; left: 4px; color: #0879b8; text-align: center; font-size: clamp(9px, .75vw, 12px); font-weight: 650; }
.right-stack { display: grid; min-width: 0; min-height: 0; grid-template-rows: 1.23fr .86fr; gap: 12px; }
.recent-panel, .notices-panel { padding: 14px 17px; }
.recent-panel .panel-heading { margin-bottom: 12px; }
.text-link { display: inline-flex; flex: none; align-items: center; gap: 5px; padding: 4px 0; border: 0; color: #0872cf; background: none; cursor: pointer; font-size: clamp(11px, .9vw, 14px); font-weight: 650; }
.text-link svg { width: 18px; height: 18px; }
.recent-row { display: grid; width: 100%; min-height: 50px; align-items: center; grid-template-columns: 1.15fr .7fr .85fr 20px; gap: 7px; padding: 7px 11px; border: 1px solid #dbe4ee; border-radius: 10px; color: #172e48; background: linear-gradient(90deg, #f5f9fd, #fff); box-shadow: 0 1px 3px rgba(34, 56, 82, .06); cursor: pointer; text-align: left; }
.recent-row:hover { border-color: #a9d9d3; background: #f3fbfa; }
.recent-date, .recent-hours { display: inline-flex; align-items: center; gap: 8px; font-size: clamp(11px, .91vw, 15px); font-weight: 600; white-space: nowrap; }
.recent-date svg, .recent-hours svg { width: 21px; height: 21px; flex: none; }
.workday-pill { justify-self: start; padding: 7px 13px; border-radius: 9px; color: #087848; background: #d3f4e6; font-size: clamp(10px, .9vw, 14px); font-weight: 700; white-space: nowrap; }
.recent-chevron { justify-self: end; color: #1874d2; }
.recent-chevron svg { width: 21px; height: 21px; }
.notice-heading { margin-bottom: 8px; }
.notice-emoji { display: inline-flex; flex: none; color: #efaa17; }
.notice-emoji svg { width: 27px; height: 27px; }
.notice-row { display: flex; width: 100%; min-height: 38px; align-items: center; gap: 10px; padding: 6px 11px; border: 0; border-radius: 9px; color: #152c46; background: linear-gradient(90deg, #f3f7fb, #f8fafd); cursor: pointer; text-align: left; font-size: clamp(11px, .92vw, 15px); }
.notice-row + .notice-row { margin-top: 5px; }
.notice-row:hover { background: #edf5fa; }
.notice-row strong { color: #1269c5; }
.notice-symbol { display: grid; width: 24px; height: 24px; flex: none; place-items: center; border-radius: 50%; color: white; }
.notice-symbol.success { background: #17a24b; }
.notice-symbol.info { background: #1680df; }
.notice-symbol svg { width: 15px; height: 15px; }
.notice-chevron { display: inline-flex; margin-left: auto; color: #1676ce; }
.notice-chevron svg { width: 20px; height: 20px; }

.lower-grid { display: grid; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(300px, auto); gap: 13px; margin-top: 13px; }
.chart-panel, .status-panel, .account-panel { padding: 12px 17px 11px; }
.chart-panel .panel-heading, .status-panel .panel-heading, .account-panel .panel-heading { margin-bottom: 7px; }
.chart-panel, .status-panel, .account-panel { min-height: 300px; overflow: visible; }
.chart-wrap { min-height: 260px; height: 285px; overflow: visible; }
.chart-wrap svg { display: block; width: 100%; height: 100%; }
.chart-bar { fill: var(--teal); }
.chart-label { fill: #40566f; font-size: 12px; font-weight: 650; }
.chart-gridline { stroke: #dce5ee; stroke-width: 1; }
.chart-axis { stroke: #718399; stroke-width: 1.3; }
.status-content { display: flex; min-height: 245px; align-items: center; justify-content: center; gap: clamp(14px, 2vw, 31px); }
.donut { position: relative; display: grid; width: min(69%, 168px); aspect-ratio: 1; flex: none; place-items: center; border-radius: 50%; background: conic-gradient(#0ba99b 0deg 359deg, #dbe4ed 359deg 360deg); }
.donut::before { position: absolute; width: 73%; aspect-ratio: 1; border-radius: 50%; background: #fff; content: ""; }
.donut-center { z-index: 1; display: grid; justify-items: center; color: #102944; line-height: 1.1; }
.donut-center strong { font-size: clamp(25px, 2.2vw, 36px); font-weight: 750; }
.donut-center span { margin-top: 3px; font-size: clamp(12px, .97vw, 16px); font-weight: 650; }
.legend-list { display: grid; min-width: 136px; gap: 6px; margin: 0; padding: 0; list-style: none; }
.legend-list li { display: grid; align-items: center; grid-template-columns: 15px minmax(0, 1fr) 18px; gap: 8px; color: #1c3049; font-size: clamp(10px, .9vw, 14px); white-space: nowrap; }
.legend-list b { text-align: right; font-weight: 650; }
.legend-color { width: 13px; height: 13px; border-radius: 3px; background: #0ba99b; }
.legend-color.vacation { background: #aebbc9; }
.legend-color.overtime { background: #8dc1fb; }
.legend-color.reduction { background: #7756a7; }
.legend-color.holiday { background: #f4bd21; }
.legend-color.sick { background: #ed5f66; }
.legend-color.other { background: #b9c2cd; }
.demo-inline { margin-left: 4px; padding: 3px 6px; border: 1px solid #edca7b; border-radius: 5px; color: #815c13; background: #fff5da; font-size: 9px; letter-spacing: .5px; vertical-align: 2px; }
.account-lines { display: grid; gap: 7px; }
.account-line { display: flex; min-height: 39px; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 11px; border: 1px solid #dce5ee; border-radius: 9px; background: linear-gradient(90deg, #f6f9fc, #fff); color: #152d47; font-size: clamp(10px, .89vw, 14px); }
.account-line strong { flex: none; color: #132c46; font-size: clamp(12px, .98vw, 16px); font-weight: 700; }
.account-line small { color: #64768b; font-size: .86em; }
.account-change { min-height: 32px; padding-top: 4px; padding-bottom: 4px; border: 0; background: transparent; }
.account-change strong { color: #069a77; }
.account-current { border: 0; background: #d8f5f3; font-weight: 700; }
.account-current strong { font-size: clamp(13px, 1.04vw, 17px); }
.account-caption { margin: 7px 3px 0; color: #7a8998; font-size: 9px; }

.toast { position: fixed; z-index: 10; right: 24px; bottom: 22px; max-width: min(420px, calc(100vw - 32px)); padding: 12px 17px; transform: translateY(18px); border: 1px solid rgba(255,255,255,.17); border-radius: 10px; color: white; background: #102944; box-shadow: 0 8px 26px rgba(10,35,60,.22); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; font-size: 13px; }
.toast.is-visible { transform: translateY(0); opacity: 1; }

.page-view[hidden] { display: none !important; }
.dashboard-rest[hidden] { display: none !important; }
.report-page { min-height: 0; height: 100%; grid-row: 1 / -1; overflow: auto; padding: 5px 9px 3px; }
.main-content.show-report { display: block; overflow: auto; }
.dashboard-rest { display: grid; gap: 13px; margin-top: 13px; }
.report-header { display:flex; min-height:76px; align-items:center; justify-content:space-between; gap:18px; padding:0 9px 12px; }
.report-date-nav { display:flex; align-items:center; gap:9px; }
.report-date-nav input, .report-panel input, .report-panel select, .report-panel textarea { min-width:0; padding:10px 12px; border:1px solid #cdd9e6; border-radius:9px; color:#152d47; background:#fff; font:inherit; }
.report-date-nav input { font-weight:650; }
.report-columns { display:grid; min-height:calc(100% - 143px); grid-template-columns:1.02fr .98fr; gap:13px; }
.report-stack { display:grid; align-content:start; gap:12px; }
.report-panel { padding:15px 17px; }
.report-panel .panel-heading { margin-bottom:12px; }
.time-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:11px; }
.time-fields label, .field-label { display:grid; gap:6px; color:#203751; font-size:13px; font-weight:650; }
.time-fields input, .time-fields select { width:100%; height:42px; }
.hours-result { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:12px 0; padding:13px 15px; border-radius:10px; color:#123850; background:#d8f5f1; font-size:15px; font-weight:650; }
.hours-result strong { font-size:18px; }
.status-fields { grid-template-columns:1fr 1fr 1fr; }
.account-preview { margin-top:13px; padding:11px 13px; border:1px solid #dce5ee; border-radius:10px; background:#f6f9fc; color:#233b55; }
.account-preview summary { cursor:pointer; font-weight:700; }
.account-preview summary span { float:right; color:#8b5d12; font-size:12px; }
.account-preview p { margin:10px 0 0; color:#53677d; font-size:13px; line-height:1.5; }
.add-button, .secondary-button { min-height:38px; padding:8px 13px; border:0; border-radius:9px; color:#fff; background:linear-gradient(100deg,#0cb4a7,#0c9b91); cursor:pointer; font-weight:700; }
.add-button:hover, .save-button:hover { filter:brightness(.95); }
.record-list { display:grid; gap:8px; }
.record-row { display:flex; align-items:center; gap:8px; padding:10px 11px; border:1px solid #dce5ee; border-radius:9px; color:#1b3048; background:linear-gradient(90deg,#f6f9fc,#fff); }
.record-row > span { flex:1; min-width:0; overflow-wrap:anywhere; font-size:13px; font-weight:600; }
.record-action { padding:6px 9px; border:1px solid #cbd9e7; border-radius:7px; color:#1269c5; background:#fff; cursor:pointer; font-size:12px; font-weight:650; }
.record-action.danger { color:#c43d45; }
.empty-records { margin:0; padding:12px; color:#708195; font-size:13px; }
.report-notes { min-height:380px; }
.report-notes textarea { width:100%; margin-top:7px; resize:vertical; font-weight:400; }
.field-label { margin-top:17px; }
.report-footer { display:flex; min-height:58px; align-items:center; justify-content:space-between; gap:14px; padding:8px 3px 0; }
.report-footer > div { display:flex; gap:9px; }
.preview-save-note { max-width:660px; color:#66798e; font-size:12px; }
.secondary-button { border:1px solid #ccd9e7; color:#26425e; background:#fff; }
.save-button { min-width:210px; }
.report-save-status.is-dirty { color:#9b6310; font-weight:700; }
.main-content.show-report > .topbar { display:none; }
.main-content.show-report { padding-top:14px; }
.main-content.show-report .report-page { height:auto; min-height:calc(100vh - 26px); padding-top:0; }
.people-editor { grid-column:1/-1; display:grid; gap:9px; }
.people-entry-row, .purpose-add { display:flex; align-items:center; gap:8px; }
.people-entry-row input, .purpose-add input { flex:1; min-width:0; min-height:42px; padding:9px 11px; border:1px solid #cbd8e5; border-radius:9px; color:#132d48; background:#fff; font:inherit; }
.people-chips { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.person-chip { display:inline-flex; min-height:40px; align-items:center; gap:9px; padding:4px 5px 4px 12px; border:1px solid #b9e5df; border-radius:999px; color:#17364b; background:#eaf8f6; font-size:13px; font-weight:650; }
.person-chip button, .purpose-chip button { display:grid; width:32px; height:32px; flex:none; place-items:center; border:0; border-radius:50%; color:#31556c; background:#d9efec; cursor:pointer; font-size:18px; line-height:1; }
.person-chip button:hover, .purpose-chip button:hover { color:#fff; background:#087e78; }
.person-chip button:focus-visible, .purpose-chip button:focus-visible { outline:2px solid #116fb3; outline-offset:2px; }
.round-purpose-block, .round-stops-field { grid-column:1/-1; min-width:0; }
.dialog-label, .round-stops-field legend { color:#203751; font-size:13px; font-weight:700; }
.purpose-options { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0; }
.purpose-choice, .purpose-chip { display:inline-flex; min-height:38px; align-items:center; gap:8px; padding:6px 12px; border:1px solid #ccd9e7; border-radius:999px; color:#27435c; background:#fff; cursor:pointer; font:inherit; font-size:13px; font-weight:650; }
.purpose-choice:hover { border-color:#7fcfc5; background:#f1fbf9; }
.purpose-choice.is-chosen, .purpose-chip.is-chosen { border-color:#72c8bd; color:#075c58; background:#e4f7f4; }
.round-stops-field { margin:0; padding:13px; border:1px solid #dce5ee; border-radius:12px; }
.round-stop-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:8px; margin:8px 0; }
.stop-actions { display:flex; align-items:center; gap:5px; }
.stop-actions button { min-width:36px; min-height:36px; }
.stop-actions button:disabled { opacity:.4; cursor:not-allowed; }
.route-leg-km { display:grid; grid-template-columns:minmax(0,1fr) minmax(110px,150px); align-items:center; gap:12px; margin:5px 0 12px 12px; padding:9px 11px; border-left:2px solid #86d4ca; border-radius:0 8px 8px 0; color:#536b80; background:#f4faf9; font-size:12px; }
.route-leg-km input { width:100%; min-height:38px; padding:7px 9px; border:1px solid #cbd8e5; border-radius:8px; color:#132d48; background:#fff; font:inherit; }
.round-total { grid-column:1/-1; display:flex; justify-content:space-between; gap:10px; padding:10px 13px; border-radius:9px; color:#16384d; background:#e3f7f4; }
.compact-stop-row { grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:6px; margin:4px 0; }
.compact-stop-row .dialog-field { gap:3px; font-size:11px; color:#586d80; }
.compact-stop-row .dialog-field input { min-height:37px; padding:7px 10px; }
.compact-stop-row .stop-actions { gap:3px; }
.compact-stop-row .stop-actions button { min-width:32px; min-height:32px; padding:4px 7px; }
.compact-stop-row .stop-actions button:disabled { opacity:.35; }
.compact-leg-km { display:grid; grid-template-columns:minmax(0,1fr) 150px; align-items:center; gap:9px; margin:2px 0 7px 12px; padding:5px 9px; border-left:2px solid #8bd5cb; color:#586d80; font-size:12px; }
.compact-km-label { display:flex; align-items:center; gap:6px; color:#304a61; white-space:nowrap; }
.compact-km-label input { width:77px; min-height:33px; padding:5px 7px; border:1px solid #cbd8e5; border-radius:7px; color:#132d48; font:inherit; }
.compact-leg-label { margin:0 0 6px 12px; padding-left:9px; border-left:2px solid #e1e8ee; color:#77889a; font-size:11px; }
.compact-route-line { display:grid; grid-template-columns:minmax(0,1fr) 145px auto; align-items:center; gap:9px; margin:3px 0; padding:4px 6px; border-bottom:1px solid #edf1f5; }
.compact-route-line .dialog-field { display:grid; grid-template-columns:48px minmax(0,1fr); align-items:center; gap:7px; font-size:11px; }
.compact-route-line .dialog-field input { min-height:34px; padding:6px 9px; }
.compact-km-label { display:flex; align-items:center; gap:5px; color:#61758a; font-size:11px; white-space:nowrap; }
.compact-km-label input { width:88px; min-height:34px; padding:6px 8px; border:1px solid #cbd8e5; border-radius:8px; font:inherit; }
.route-order-select { width:45px; min-height:30px; border:1px solid #d5dfe8; border-radius:7px; color:#53677d; background:white; }
.settings-catalogs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.settings-catalog-panel,.settings-distance-panel { padding:18px; }
.settings-list { display:grid; gap:7px; }
.settings-row,.settings-add-row,.settings-distance-row { display:grid; grid-template-columns:minmax(100px,1fr) minmax(100px,1fr) auto auto; gap:7px; align-items:center; margin:6px 0; }
.settings-row input,.settings-add-row input,.settings-distance-row input { width:100%; min-width:0; min-height:36px; padding:7px 9px; border:1px solid #cbd8e5; border-radius:8px; color:#17314b; background:#fff; font:inherit; }
.settings-row .secondary-button,.settings-add-row .add-button,.settings-distance-row .secondary-button { min-height:34px; padding:7px 10px; white-space:nowrap; }
.settings-distance-row { grid-template-columns:minmax(150px,1fr) 100px auto auto; padding:6px 0; border-bottom:1px solid #edf1f5; }
.settings-distance-panel .field-help { margin:0 0 12px; }
@media(max-width:850px){.settings-catalogs{grid-template-columns:1fr}}
@media(max-width:600px){.compact-route-line{grid-template-columns:minmax(0,1fr) 100px auto;gap:4px;padding:3px}.compact-route-line .dialog-field{grid-template-columns:38px minmax(0,1fr);gap:4px}.compact-km-label input{width:60px}.settings-row,.settings-add-row{grid-template-columns:1fr 1fr}.settings-distance-row{grid-template-columns:minmax(100px,1fr) 75px auto auto}.settings-distance-row button{font-size:11px}}
.trip-record-meta { margin:5px 0 0; color:#708195; font-size:11px; }
.metric-hint { min-height:12px; margin-top:2px; color:#8a6419; font-size:10px; line-height:1.2; }
.trip-dialog { overflow:hidden; }
.trip-dialog form { display:flex; max-height:min(88vh,850px); flex-direction:column; }
.trip-dialog .dialog-fields { min-height:0; overflow-y:auto; align-content:start; }
.trip-dialog .dialog-actions { position:sticky; bottom:0; flex:none; background:#fff; }
.round-record-details { flex:1; min-width:0; font-size:13px; }
.round-record-details summary { cursor:pointer; font-weight:650; }
.round-leg-list { display:grid; gap:5px; margin:9px 0 2px; padding-left:24px; color:#596f84; font-size:12px; }
.legacy-task-note { padding:8px 10px; border-left:3px solid #9aafc0; color:#53677d; background:#f4f7fa; }
.settings-header { margin-bottom:20px; }
.settings-header .report-title p { max-width:720px; margin-top:5px; color:#667b90; }
.settings-catalog-panel { border:1px solid #e1e8ef; border-radius:14px; box-shadow:0 4px 16px rgba(19,45,72,.035); }
.settings-catalog-panel .panel-heading { margin-bottom:5px; }
.settings-catalog-help { min-height:34px; margin:0 0 14px; line-height:1.45; }
.settings-list { gap:9px; }
.settings-row { grid-template-columns:minmax(130px,1fr) minmax(150px,1fr) auto auto; margin:0; padding:8px; border:1px solid #edf1f5; border-radius:10px; background:#fbfcfd; }
.settings-row:has(input[aria-label="Tätigkeiten: Name"]) { grid-template-columns:minmax(150px,1fr) minmax(120px,.65fr) auto auto; }
.settings-row:has(input[aria-label="Hilfsmittel: Name"]),.settings-row:has(input[aria-label="Vorkommnisarten: Name"]),.settings-row:has(input[aria-label="Fahrtzwecke: Name"]) { grid-template-columns:minmax(180px,1fr) auto auto; }
.settings-row.is-inactive { background:#f3f5f7; }
.settings-row.is-inactive input { color:#718092; background:#f8f9fa; }
.settings-row input,.settings-add-row input { min-height:38px; }
.settings-add-row { grid-template-columns:minmax(120px,1fr) minmax(120px,1fr) auto; margin-top:13px; padding-top:13px; border-top:1px solid #e9eef3; }
.settings-catalog-panel:not(:has(.settings-add-row input[aria-label="Neue Standortadresse"])):not(:has(.settings-add-row input[aria-label="Einheit für neue Tätigkeit"])) .settings-add-row { grid-template-columns:minmax(150px,1fr) auto; }
.settings-distance-panel,.settings-routines-panel { margin-top:16px; padding:20px; border:1px solid #e1e8ef; border-radius:14px; }
.settings-distance-row { grid-template-columns:minmax(180px,1fr) minmax(90px,130px) 28px auto; gap:10px; }
.settings-distance-label { color:#27425d; font-weight:600; }
.settings-reactivate-button { min-height:34px; padding:7px 10px; border:1px solid #a7d8cd; border-radius:8px; color:#155e52; background:#effaf7; font:inherit; font-weight:650; cursor:pointer; }
.settings-reactivate-button:hover { background:#dff5ef; }
.settings-routines-panel { border-color:#d8e4ef; background:linear-gradient(135deg,#fff,#f5f9fc); }
.settings-routines-panel .heading-title { gap:12px; }
.settings-routines-panel p { max-width:850px; margin:8px 0 0; color:#586e82; line-height:1.6; }
.settings-future-badge { padding:5px 9px; border-radius:20px; color:#53677b; background:#eaf0f5; font-size:11px; font-weight:650; }
@media(max-width:700px){.settings-row,.settings-row:has(input),.settings-add-row,.settings-distance-row { grid-template-columns:1fr 1fr; }.settings-row button,.settings-add-row button { width:100%; }.settings-distance-row .settings-distance-label { grid-column:1/-1; }.settings-catalog-help { min-height:0; }.settings-routines-panel .heading-title { align-items:flex-start; flex-direction:column; gap:5px; }}
.settings-layout { display:grid; grid-template-columns:190px minmax(0,1fr); align-items:start; gap:18px; }
.settings-local-nav { position:sticky; top:16px; display:grid; gap:4px; padding:8px; border:1px solid #e0e8ef; border-radius:13px; background:#fff; box-shadow:0 4px 16px rgba(19,45,72,.035); }
.settings-nav-item { min-height:39px; padding:8px 11px; border:0; border-radius:8px; color:#38516a; background:transparent; text-align:left; font:inherit; font-size:13px; font-weight:600; cursor:pointer; transition:background .15s,color .15s; }
.settings-nav-item:hover { color:#113550; background:#f0f6f8; }
.settings-nav-item.is-selected { color:#075b62; background:#def3f0; box-shadow:inset 3px 0 #16a99b; }
.settings-content { width:100%; max-width:1160px; min-width:0; }
.settings-category-panel,.settings-distance-panel,.settings-routines-panel { margin:0; padding:19px; border:1px solid #e0e8ef; border-radius:14px; box-shadow:0 5px 18px rgba(19,45,72,.04); }
.settings-category-panel[hidden],.settings-distance-panel[hidden],.settings-routines-panel[hidden] { display:none!important; }
.settings-panel-heading { display:flex; align-items:center; justify-content:space-between; min-height:27px; margin-bottom:4px; }
.settings-panel-heading h2,.distance-origin-group h3 { margin:0; color:#173650; font-size:17px; font-weight:700; }
.settings-panel-help { margin:0 0 14px; color:#6b7d8d; font-size:12px; line-height:1.45; }
.settings-table { width:100%; border-collapse:separate; border-spacing:0; table-layout:fixed; font-size:13px; }
.settings-table th { padding:8px 10px; border-bottom:1px solid #dfe7ee; color:#63788b; text-align:left; font-size:10px; font-weight:750; letter-spacing:.055em; text-transform:uppercase; }
.settings-table td { padding:8px 10px; border-bottom:1px solid #edf1f5; color:#304b63; vertical-align:middle; overflow-wrap:anywhere; }
.settings-table tbody tr:last-child td { border-bottom:0; }
.settings-table tbody .settings-table-divider th { padding:12px 10px 6px; border-bottom:1px solid #e1e8ef; color:#728292; text-align:left; font-size:10px; font-weight:750; letter-spacing:.05em; text-transform:uppercase; }
.settings-table tbody tr.is-inactive { background:#f7f8fa; }
.settings-table tbody tr.is-inactive td { color:#7c8996; }
.settings-table th:first-child,.settings-table td:first-child { width:27%; }
.settings-table th:last-child,.settings-table td:last-child { width:270px; }
.settings-table th:nth-child(2),.settings-table td:nth-child(2) { width:26%; }
.settings-table:has(th:nth-child(4)) th:nth-child(3),.settings-table:has(th:nth-child(4)) td:nth-child(3) { width:100px; }
.settings-table:not(.distance-table):has(th:nth-child(3):last-child) th:first-child,.settings-table:not(.distance-table):has(th:nth-child(3):last-child) td:first-child { width:auto; }
.settings-table:not(.distance-table):has(th:nth-child(3):last-child) th:nth-child(2),.settings-table:not(.distance-table):has(th:nth-child(3):last-child) td:nth-child(2) { width:105px; }
.settings-table:not(.distance-table):has(th:nth-child(3):last-child) th:last-child,.settings-table:not(.distance-table):has(th:nth-child(3):last-child) td:last-child { width:270px; }
.settings-table:has(th:nth-child(4)) th:first-child,.settings-table:has(th:nth-child(4)) td:first-child { width:30%; }
.settings-table:has(th:nth-child(4)) th:nth-child(2),.settings-table:has(th:nth-child(4)) td:nth-child(2) { width:23%; }
.settings-address-cell { color:#61768a!important; font-size:12px; }
.settings-status { display:inline-flex; align-items:center; min-height:23px; padding:3px 8px; border-radius:20px; font-size:10px; font-weight:700; white-space:nowrap; }
.settings-status.is-active { color:#17675b; background:#e1f5ef; }
.settings-status.is-inactive { color:#687582; background:#e9edf1; }
.settings-actions { white-space:nowrap; }
.settings-small-button { min-height:30px; margin:1px 3px 1px 0; padding:5px 9px; border:1px solid #d3dee7; border-radius:7px; color:#38516a; background:#fff; font:inherit; font-size:11px; font-weight:650; cursor:pointer; }
.settings-small-button:hover { border-color:#9eb6c7; background:#f6fafb; }
.settings-small-button.is-primary { border-color:#0c948b; color:#fff; background:#0c948b; }
.settings-small-button.is-primary:hover { background:#087b76; }
.settings-small-button.is-reactivate { border-color:#a6d5ca; color:#17675b; background:#effaf7; }
.settings-small-button.is-danger { border-color:#ead2d2; color:#a34d4d; background:#fff; }
.settings-small-button.is-danger:hover { border-color:#d6a5a5; color:#8a3030; background:#fff6f6; }
.settings-table input,.settings-add-form input { width:100%; min-width:60px; min-height:32px; padding:5px 8px; border:1px solid #cbd8e5; border-radius:7px; color:#17314b; background:#fff; font:inherit; font-size:12px; }
.settings-add-form { display:flex; align-items:center; gap:8px; max-width:660px; margin-top:14px; padding-top:13px; border-top:1px solid #e9eef3; }
.settings-add-form input:first-child { max-width:260px; }
.settings-add-form input:nth-child(2) { max-width:220px; }
.distance-origin-group { margin-top:15px; padding-top:13px; border-top:1px solid #edf1f5; }
.distance-origin-group:first-child { margin-top:0; padding-top:0; border-top:0; }
.distance-origin-group h3 { margin-bottom:6px; font-size:13px; }
.distance-table th:first-child,.distance-table td:first-child { width:auto; }
.distance-table th:nth-child(2),.distance-table td:nth-child(2) { width:130px; }
.distance-table th:last-child,.distance-table td:last-child { width:220px; }
.distance-kilometers { font-variant-numeric:tabular-nums; font-weight:700; color:#1c485d!important; white-space:nowrap; }
.distance-kilometers input { max-width:105px; }
.settings-distance-add { margin:12px 0 14px; padding:12px; border:1px solid #e5edf2; border-radius:10px; background:#f8fbfc; }
.settings-distance-form { display:grid; grid-template-columns:minmax(145px,1fr) minmax(145px,1fr) 125px auto; align-items:end; gap:9px; max-width:850px; }
.settings-distance-field { display:grid; gap:5px; color:#617589; font-size:10px; font-weight:700; }
.settings-distance-field select,.settings-distance-field input { width:100%; min-width:0; min-height:34px; padding:6px 8px; border:1px solid #cbd8e5; border-radius:7px; color:#17314b; background:#fff; font:inherit; font-size:12px; }
.settings-distance-form>.settings-small-button { min-height:34px; }
.settings-distance-panel>.field-help { margin:2px 0 12px; color:#6b7d8d; font-size:12px; line-height:1.45; }
.settings-routines-panel { background:linear-gradient(135deg,#fff,#f5f9fc); }
.settings-routines-panel p { max-width:750px; margin:8px 0 0; color:#586e82; font-size:13px; line-height:1.6; }
.routine-card { max-width:900px; margin:10px 0; padding:13px 15px; border:1px solid #e2eaf0; border-radius:11px; background:#fff; }
.routine-card.is-inactive { background:#f7f8fa; }
.routine-card-heading { display:flex; align-items:center; gap:10px; color:#1b3d58; }
.routine-sequence,.routine-description,.routine-warning { margin:7px 0 0!important; font-size:12px!important; line-height:1.45!important; }
.routine-sequence { color:#2d5968!important; font-weight:650; }
.routine-warning { color:#896421!important; }
.routine-actions { display:flex; flex-wrap:wrap; gap:4px; margin-top:9px; }
.routine-editor-list { display:grid; gap:7px; margin:12px 0; }
.routine-editor-list { max-height:48vh; overflow-y:auto; padding:2px 4px 2px 0; }
.routine-editor-dialog { width:min(760px,calc(100vw - 24px)); max-height:90vh; overflow:hidden; }
.routine-editor-dialog form { display:flex; max-height:90vh; min-height:0; flex-direction:column; }
.routine-editor-dialog .dialog-fields { min-height:0; overflow-y:auto; align-content:start; grid-template-columns:minmax(0,1fr); }
.routine-editor-dialog .dialog-actions { flex:none; background:#fff; }
.routine-stop-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(125px,.72fr) auto; gap:8px; align-items:end; min-width:0; padding:8px; border:1px solid #e5edf2; border-radius:9px; background:#f8fbfc; }
.routine-stop-row > *, .routine-stop-row .dialog-field { min-width:0; }
.routine-stop-row .dialog-field { margin:0; }
.routine-stop-row select,.routine-km-field input { width:100%; min-height:34px; padding:6px 8px; border:1px solid #cbd8e5; border-radius:7px; color:#17314b; background:#fff; font:inherit; font-size:12px; }
.routine-km-field { display:grid; gap:4px; color:#617589; font-size:10px; font-weight:700; }
.routine-leg-fields { display:grid; grid-template-columns:minmax(100px,1fr); gap:4px; }
.routine-standard-option { display:flex; align-items:center; gap:5px; color:#587084; font-size:10px; }
.routine-standard-option input { accent-color:#0c948b; }
.routine-manual-tag { color:#846526; font-size:10px; }
.routine-stop-actions { display:flex; gap:3px; }
.routine-picker-field { margin-bottom:3px; }
.routine-leg-list { display:grid; gap:3px; max-width:700px; margin:9px 0 0; padding:0; list-style:none; }
.routine-leg-list li { display:grid; grid-template-columns:minmax(0,1fr) 105px; gap:10px; align-items:center; padding:4px 8px; border-radius:6px; color:#38556d; background:#f6f9fb; font-size:12px; }
.routine-leg-list li strong { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.routine-leg-list .is-open { color:#9a6a19; }
.routine-total { max-width:700px; margin:7px 0 0!important; color:#1c485d!important; font-size:12px!important; font-weight:750; }
.routine-total.is-incomplete { color:#886321!important; }
@media(max-width:600px){.routine-editor-dialog .dialog-fields{padding:14px}.routine-stop-row{grid-template-columns:minmax(0,1fr) auto;gap:7px}.routine-stop-row .dialog-field{grid-column:1/-1}.routine-stop-row .routine-leg-fields{grid-column:1/-1;grid-row:2}.routine-stop-actions{grid-column:2;grid-row:2;justify-content:flex-end;align-self:end}.routine-actions .settings-small-button{flex:1 1 auto}}
@media(max-width:900px){.settings-layout{grid-template-columns:165px minmax(0,1fr);gap:12px}.settings-category-panel,.settings-distance-panel,.settings-routines-panel{padding:15px}.settings-table th:last-child,.settings-table td:last-child{width:245px}.distance-table th:last-child,.distance-table td:last-child{width:205px}.settings-distance-form{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.settings-layout{grid-template-columns:minmax(0,1fr);gap:11px}.settings-local-nav{position:static;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;padding:6px}.settings-nav-item{min-height:35px;padding:7px 9px;font-size:12px}.settings-table{min-width:650px}.settings-category-panel,.settings-distance-panel{overflow-x:auto}.settings-add-form{align-items:stretch;flex-wrap:wrap}.settings-add-form input:first-child,.settings-add-form input:nth-child(2){max-width:none;flex:1 1 180px}.distance-table{min-width:480px}.settings-distance-form{grid-template-columns:1fr}.settings-distance-form>.settings-small-button{width:100%}}
@media(max-width:600px){.people-entry-row,.purpose-add{align-items:stretch;flex-direction:column}.round-stop-row{grid-template-columns:minmax(0,1fr)}.stop-actions{justify-content:flex-end}.route-leg-km{grid-template-columns:1fr 110px;margin-left:5px}.compact-leg-km{grid-template-columns:1fr;gap:4px;margin-left:5px}.compact-km-label{justify-content:space-between}.round-stops-field{padding:9px}}
.app-dialog { width:min(560px,calc(100vw - 28px)); max-height:min(88vh,850px); padding:0; overflow:auto; border:1px solid #d9e3ee; border-radius:18px; color:var(--ink); background:#fff; box-shadow:0 24px 80px rgba(8,31,54,.3); }
.app-dialog::backdrop { background:rgba(9,28,48,.48); backdrop-filter:blur(2px); }
.app-dialog form { padding:0; }
.dialog-header { display:flex; align-items:flex-start; justify-content:space-between; gap:15px; padding:22px 24px 14px; border-bottom:1px solid #e5ebf2; }
.dialog-kicker { color:#0a9b91; font-size:10px; font-weight:800; letter-spacing:1px; }
.dialog-header h2 { margin:5px 0 0; color:var(--navy); font-size:23px; }
.dialog-close { width:34px; height:34px; border:0; border-radius:9px; color:#455b72; background:#f1f5f8; cursor:pointer; font-size:24px; line-height:1; }
.dialog-fields { display:grid; grid-template-columns:1fr 1fr; gap:13px; padding:19px 24px; }
.dialog-field { display:grid; align-content:start; gap:6px; color:#243c55; font-size:13px; font-weight:650; }
.dialog-field:has(textarea) { grid-column:1/-1; }
.dialog-field input,.dialog-field select,.dialog-field textarea { width:100%; min-width:0; min-height:42px; padding:10px 11px; border:1px solid #cbd8e5; border-radius:9px; color:#132d48; background:white; font:inherit; font-weight:450; }
.dialog-field textarea { min-height:82px; resize:vertical; }
.dialog-message { grid-column:1/-1; margin:0; color:#53677d; line-height:1.5; }
.dialog-error { margin:0 24px 14px; padding:10px 12px; border-radius:8px; color:#8b222a; background:#fff0f0; font-size:13px; }
.dialog-actions { display:flex; justify-content:flex-end; gap:9px; padding:13px 24px 20px; border-top:1px solid #edf1f5; }
.app-dialog .secondary-button { min-width:105px; }
@media(max-width:600px){.dialog-fields{grid-template-columns:1fr;padding:16px}.dialog-field:has(textarea){grid-column:auto}.dialog-header,.dialog-actions{padding-left:16px;padding-right:16px}.app-dialog{border-radius:14px}}
.day-cell.is-today:not(.is-selected) { box-shadow:inset 0 0 0 2px #0ba99b; border-radius:8px; }
@media(max-width:1150px) { .report-columns { grid-template-columns:1fr; } .report-page { overflow:visible; } .report-header { align-items:flex-start; flex-direction:column; } .report-footer { align-items:flex-start; flex-direction:column; } }
@media(max-width:700px) { .time-fields,.status-fields { grid-template-columns:1fr; } .report-date-nav { flex-wrap:wrap; } .record-row { flex-wrap:wrap; } }

@media (max-width: 1450px) {
  .metric-card { gap: 9px; padding: 9px 10px; }
  .metric-icon { width: 32px; flex-basis: 32px; }
  .metric-icon svg { width: 32px; height: 32px; }
  .metric-name { display: block; overflow: visible; white-space: normal; line-height: 1.08; }
  .metric-value { margin-top: 4px; font-size: clamp(22px, 1.85vw, 27px); }
  .calendar-panel { padding-right: 13px; padding-left: 13px; }
  .recent-panel, .notices-panel { padding-right: 12px; padding-left: 12px; }
}
@media (max-width: 1100px) {
  body { overflow-x: hidden; overflow-y: auto; }
  .app-shell { min-height: 100vh; height: auto; overflow: visible; }
  .sidebar { position: sticky; height: 100vh; min-height: 600px; flex-basis: 198px; }
  .main-content { height: auto; min-height: 100vh; overflow: visible; }
  .topbar { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .middle-grid, .lower-grid { grid-template-columns: minmax(0, 1fr); }
  .calendar-panel { min-height: 420px; }
  .right-stack { grid-template-rows: minmax(160px, auto) minmax(130px, auto); }
  .chart-panel { min-height: 300px; }
  .status-panel, .account-panel { min-height: 260px; }
  .report-page { min-height: 0; height: auto; overflow: visible; }
  .report-columns { grid-template-columns: minmax(0, 1fr); }
}

.settings-deleted-details { margin-top:14px; border-top:1px solid #e2e9ef; padding-top:10px; }
.settings-deleted-details > summary { color:#405970; cursor:pointer; font-weight:650; }
.settings-deleted-list { display:grid; gap:8px; list-style:none; margin:10px 0 0; padding:0; }
.settings-deleted-list li { display:flex; flex-wrap:wrap; align-items:center; gap:8px; border:1px solid #e5ebf0; border-radius:8px; padding:8px; }
.settings-deleted-list li span { flex:1 1 180px; }

.auth-screen { position: fixed; z-index: 10000; inset: 0; display: grid; place-items: center; padding: 22px; background: radial-gradient(ellipse at 20% 0%, #e2f6f2 0, transparent 48%), #f1f5f9; }
.auth-screen[hidden] { display: none; }
.app-shell { display: none; }
.app-shell:not(.is-authenticated) { display: none !important; }
.app-shell.is-authenticated { display: flex; }
.auth-card { width: min(100%, 440px); padding: clamp(26px, 6vw, 48px); border: 1px solid #dce7ef; border-radius: 22px; background: #fff; box-shadow: 0 24px 70px #10294418; }
.auth-mark { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 15px; color: white; background: #0ba99b; font-size: 25px; font-weight: 800; }
.auth-eyebrow { margin: 23px 0 8px; color: #0b9186; font-size: 11px; font-weight: 800; letter-spacing: 1.2px; }
.auth-card h1 { margin: 0; color: #102944; font-size: clamp(26px, 5vw, 34px); }
.auth-copy { margin: 9px 0 25px; color: #65788b; }
.auth-card form { display: grid; gap: 17px; }
.auth-card form > label { display: grid; gap: 8px; color: #273e55; font-size: 13px; font-weight: 700; }
.auth-card input { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid #cbd8e3; border-radius: 9px; color: #102944; background: white; font: inherit; }
.auth-card input:focus { outline: 3px solid #0ba99b35; border-color: #0ba99b; }
.password-control { display: flex; gap: 8px; }
.password-control button,.auth-back { border: 0; color: #137d76; background: transparent; font: inherit; cursor: pointer; }
.auth-submit { min-height: 48px; border: 0; border-radius: 10px; color: #fff; background: #087f78; font: inherit; font-weight: 750; cursor: pointer; }
.auth-submit:hover { background: #066b66; }
.auth-error { margin: 0; color: #a32b36; font-size: 13px; }
.auth-footnote { margin: 20px 0 0; color: #65788b; font-size: 12px; }
.auth-back { margin: 0 0 12px; padding: 0; }
.auth-toolbar-button { padding: 7px 10px; border: 1px solid #cfdae4; border-radius: 8px; color: #29435c; background: white; font: inherit; cursor: pointer; }

@media (max-width: 900px) {
  body { overflow: auto; }
  .app-shell.is-authenticated { min-height: 100vh; height: auto; flex-direction: column; overflow: visible; }
  .sidebar { position: relative; top: auto; width: 100%; min-height: 0; height: auto; flex: none; padding: 7px 8px 8px; }
  .brand { height: 43px; gap: 9px; padding: 0 6px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-copy strong { font-size: 16px; }
  .brand-copy span { font-size: 12px; }
  .nav-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin: 5px 0 0; }
  .nav-item { min-height: 46px; height: auto; flex-direction: column; justify-content: center; gap: 2px; padding: 4px 2px; border-radius: 8px; font-size: 10px; line-height: 1.15; text-align: center; }
  .nav-icon, .nav-icon svg { width: 19px; height: 19px; }
  .sidebar-bottom { margin-top: 6px; padding: 6px 4px 0; }
  .profile-row { min-height: 32px; }
  .avatar { width: 29px; height: 29px; }
  .avatar svg { width: 17px; height: 17px; }
  .local-status { margin: 3px 0 0 34px; font-size: 10px; }
  .main-content, .main-content.show-report { display: block; width: 100%; height: auto; min-height: 0; overflow: visible; padding: 10px; }
  .topbar { align-items: flex-start; flex-direction: column; gap: 9px; padding: 4px 2px 9px; }
  .welcome { gap: 10px; }
  .welcome-accent { height: 42px; }
  .welcome h1 { font-size: 22px; }
  .welcome p { font-size: 13px; }
  .topbar-tools { flex-wrap: wrap; gap: 7px; white-space: normal; }
  .tool-divider { display: none; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .metric-card { min-height: 95px; padding: 10px 8px; }
  .middle-grid, .lower-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .calendar-panel { min-height: 360px; padding: 10px; }
  .calendar-grid { grid-template-rows: 25px repeat(6, minmax(38px, 1fr)); }
  .right-stack { grid-template-rows: auto auto; }
  .recent-panel, .notices-panel { min-height: 0; }
  .chart-panel { min-height: 280px; }
  .status-panel, .account-panel { min-height: 250px; }
  .lower-grid { margin-top: 10px; }
  .report-page { min-height: 0; height: auto; overflow: visible; padding: 0; }
  .report-header { min-height: 0; flex-direction: column; gap: 10px; padding: 0 0 12px; }
  .report-columns { min-height: 0; grid-template-columns: minmax(0, 1fr); }
  .report-footer { align-items: stretch; flex-direction: column; }
  .report-footer > div { flex-wrap: wrap; }
  .save-button { min-width: 0; }
  .workspace-calendar, .calendar-weekdays { grid-template-columns: repeat(7, minmax(76px, 1fr)); min-width: 560px; }
  .workspace-content { overflow-x: auto; }
}

/* Phase 3I.6: resilient cards, charts and touch layouts. */
.metric-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.metric-card, .metric-copy, .workspace-metric, .panel, .panel-heading { min-width: 0; }
.metric-name, .metric-period, .metric-hint, .workspace-metric span, .panel h2 { overflow-wrap: anywhere; word-break: normal; }
.chart-wrap { min-height: 260px; height: 285px; overflow: visible; }
.workspace-controls .workspace-toolbar { flex-wrap: wrap; }
.workspace-toolbar input, .workspace-toolbar select, .workspace-toolbar button { min-height: 42px; }
.workspace-content { min-width: 0; overflow-wrap: anywhere; }
.table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
.report-notes textarea { min-height: 190px; }
.account-current strong { font-size: 1.3rem; color: #087d77; }
.calendar-legend .legend-reduction, .status-reduction { color: #7756a7; }
.status-uberstundenabbau { background: #f0eafb; border-color: #a78bd0; }
@media (max-width: 1100px) { .metric-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); } }
@media (max-width: 900px) { .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card { padding: 12px; }
  .metric-name { font-size: .88rem; }
  .metric-value { font-size: 1.35rem; }
  .chart-wrap { min-height: 240px; height: 260px; }
  .lower-grid { grid-template-columns: minmax(0, 1fr); }
  .status-content { min-height: 220px; }
  .report-footer, .panel-heading { gap: 10px; flex-wrap: wrap; }
  .calendar-legend { flex-wrap: wrap; }
}
@media (max-width: 420px) {
  .main-content, .main-content.show-report { padding: 9px; }
  .metric-grid { grid-template-columns: minmax(0, 1fr); }
  .metric-card { min-height: 82px; }
  .status-content { flex-wrap: wrap; justify-content: flex-start; gap: 14px; padding: 8px 0; }
  .donut { width: 138px; }
  .legend-list { min-width: min(170px, 100%); }
}
@media print {
  body.printing-report { background: #fff !important; }
  body.printing-report .app-shell > :not(.main-content),
  body.printing-report .main-content > :not(#workspace-page),
  body.printing-report #workspace-page > :not(.workspace-content) { display: none !important; }
  body.printing-report #workspace-title,
  body.printing-report #workspace-subtitle,
  body.printing-report #workspace-page > .report-header { display: none !important; }
  body.printing-report .app-shell, body.printing-report .main-content,
  body.printing-report #workspace-page, body.printing-report .workspace-content {
    display: block !important; width: auto !important; max-width: none !important;
    height: auto !important; min-height: 0 !important; overflow: visible !important;
    margin: 0 !important; padding: 0 !important; border: 0 !important; box-shadow: none !important;
  }
  body.printing-report .print-report { display: block !important; }
  body.printing-report .print-report-header { margin: 0 0 4mm; }
  body.printing-report .print-day { break-inside: auto; page-break-inside: auto; margin: 0; padding: 4px 6px; }
  body.printing-report .print-day h2, body.printing-report .print-day h3 { break-after: avoid-page; }
  body.printing-report .print-day table { width: 100%; border-collapse: collapse; font-size: 10pt; }
  body.printing-report .print-day th, body.printing-report .print-day td { padding: 3px 5px; }
  body.printing-report .print-day h2 { margin: 0 0 4px; padding: 4px 7px; font-size: 14pt; }
  body.printing-report .print-day h3 { margin: 5px 0 3px; font-size: 11pt; }
  body.printing-report .print-day p { margin: 3px 0; line-height: 1.25; font-size: 10pt; }
  body.printing-report .print-day tr { break-inside: avoid; }
  body.printing-report .report-summary-grid { break-inside: avoid; }
  body.printing-report * { color: #111 !important; box-shadow: none !important; }
  @page { size: A4 portrait; margin: 12mm; }
}

.day-cell.status-vacation { background:#eff4ff; }
.day-cell.status-sick { background:#fff0f0; }
.day-cell.status-holiday { background:#fff8df; }
.day-cell.status-reduction { background:#f0eafb; border-color:#a78bd0; }
.day-cell.status-free { background:#f7f8fa; }
.middle-grid { align-items:stretch; min-height:500px; }
.calendar-panel { min-height:480px; }
.right-stack { grid-template-rows:auto auto; align-content:start; }
.recent-panel,.notices-panel { min-height:0; overflow:visible; }
.latest-reports { display:grid; gap:7px; }
.day-status-label { position:absolute; right:5px; bottom:5px; left:7px; overflow-wrap:anywhere; color:#425b72; font-size:clamp(8px,.72vw,11px); line-height:1.1; font-weight:650; }
.day-cell.status-vacation { border-bottom:3px solid #658bd6; }
.day-cell.status-sick { border-bottom:3px solid #c46b6b; }
.day-cell.status-holiday { border-bottom:3px solid #9075c8; }
.day-cell.status-reduction { border-bottom:3px solid #8b6db4; }
.day-cell.status-missing { background:#fff8e8; border-bottom:3px solid #d79a32; }
.day-cell.status-pending { background:#f3f6f9; border-bottom:3px solid #b9c2cd; }
.recent-row { grid-template-columns:minmax(130px,1fr) minmax(65px,.55fr) minmax(105px,.8fr) 20px; }
.metric-name { overflow-wrap:anywhere; }
.stats-summary-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:14px 0; }
.stats-summary-grid .workspace-metric { min-height:100px; overflow-wrap:anywhere; }
.stats-summary-grid .workspace-metric strong { font-size:clamp(20px,2vw,27px); font-variant-numeric:tabular-nums; }
.stats-summary-grid .is-positive strong { color:#19784f; }
.stats-summary-grid .is-negative strong { color:#b74949; }
.stats-account-line { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px 18px; margin:4px 0 14px; padding:12px 15px; border-left:4px solid var(--teal); border-radius:8px; background:#e8f7f5; color:#173a50; }
.stats-account-line strong { color:#087d77; font-size:18px; font-variant-numeric:tabular-nums; }
.stats-aux { display:flex; flex-wrap:wrap; gap:7px 16px; margin:10px 0 18px; color:#52677c; font-size:13px; }
.stats-aux span { padding:5px 9px; border-radius:20px; background:#f0f4f7; }
.stats-section { margin:18px 0; }
.stats-section h2 { margin:14px 0 8px; color:#173650; font-size:18px; }
.people-settings-layout { display:grid; gap:16px; padding:16px; }
.person-settings-section { min-width:0; padding:16px; border:1px solid #e0e8ef; border-radius:13px; background:#fff; }
.person-settings-section h3 { margin:0 0 13px; color:#173650; font-size:17px; }
.people-add-form,.people-inline-form { display:flex; flex-wrap:wrap; align-items:flex-end; gap:10px; }
.people-add-form { margin-bottom:14px; padding-bottom:14px; border-bottom:1px solid #e8edf2; }
.people-add-form label,.people-inline-form label { display:grid; flex:1 1 200px; gap:6px; color:#405970; font-size:12px; font-weight:650; }
.people-add-form input,.people-inline-form input { width:100%; min-width:0; min-height:40px; padding:8px 10px; border:1px solid #cbd8e5; border-radius:8px; color:#17314b; background:#fff; font:inherit; }
.person-settings-list { display:grid; gap:9px; }
.person-settings-card { display:grid; gap:12px; min-width:0; padding:13px; border:1px solid #e3eaf0; border-radius:10px; background:#fbfcfd; }
.person-settings-card-heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:9px; color:#1b3d58; }
.person-settings-actions { display:flex; flex-wrap:wrap; gap:7px; }
.person-alias-block { display:grid; gap:8px; padding-top:9px; border-top:1px solid #e8edf2; color:#51677c; font-size:12px; }
.person-alias-list { display:flex; flex-wrap:wrap; gap:7px; }
.person-alias-item { display:inline-flex; align-items:center; gap:5px; padding:4px 6px; border:1px solid #e1e8ee; border-radius:18px; background:#fff; }
.person-alias-chip { color:#304d65; }
.person-search-term { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; }
.person-search-term > strong { min-width:0; overflow-wrap:anywhere; }
.person-settings-section .settings-deleted-details { margin-top:12px; }
.print-report { color:#173650; }
.print-report-header { padding:14px 18px; border-top:8px solid #102944; border-radius:7px; background:#e9f2f8; }
.print-report-header h1 { margin:0 0 5px; color:#102944; font-size:22px; }
.print-report-header p { margin:0; color:#405970; }
.print-day { margin:0 0 12px; padding:10px 12px; border:1px solid #dbe4eb; border-radius:7px; background:#fff; }
.print-day h2 { margin:0 0 9px; padding:6px 9px; border-left:4px solid #0ba99b; color:#173650; background:#eaf6f4; font-size:16px; }
.print-day h3 { margin:10px 0 5px; color:#174052; font-size:13px; }
.print-day table { width:100%; border-collapse:collapse; font-size:12px; }
.print-day th,.print-day td { padding:5px 7px; border:1px solid #dce5eb; text-align:left; vertical-align:top; }
.print-day th { color:#173650; background:#edf3f8; }
.print-day tbody tr:nth-child(even) { background:#f7f9fb; }
.print-day p { margin:5px 0; line-height:1.4; white-space:pre-wrap; overflow-wrap:anywhere; }
.print-day .delta-positive { color:#19784f; }.print-day .delta-negative { color:#b74949; }
@media(max-width:900px) { .stats-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { .stats-summary-grid { grid-template-columns:minmax(0,1fr); }.people-settings-layout,.person-settings-section { padding:11px; }.person-settings-card-heading { align-items:flex-start; flex-direction:column; }.people-add-form > button { width:100%; } }
