/* Shared visual system. Reference: user-supplied customer dashboard, 2026-11-09.
   Orange leads the reference highlights; petrol remains the data accent. */
:root {
    --ink: #18191b;
    --accent: #ff582b;
    --accent-ink: #a33112;
    --peach: #ffe5dc;
    --sidebar-width: 256px;
    --muted: #62676b;
    --canvas: #f1f1f1;
    --line: #e9eaec;
    --soft: #eaf4f2;
    --surface: #fff;
    --panel-radius: 30px;
    --surface-shadow: 0 2px 3px #20252c08, 0 8px 24px #20252c03;
}
html { background: #e1e2e6; scrollbar-color: #b9c3c4 #f1f1f2; }
body {
    margin: 24px;
    padding: 20px;
    min-height: calc(100svh - 48px);
    background: var(--canvas);
    border-radius: 40px;
}
::selection { background: #c8e8e3; color: #073c3d; }
:focus-visible { outline: 3px solid var(--petrol); outline-offset: 4px; }
/* Reference sidebar: white icon tiles, neutral selection, branching links. */
.sidebar {
    inset: 44px auto 44px 44px;
    width: var(--sidebar-width);
    padding: 24px 16px 20px;
    border: 0;
    border-radius: 32px;
    background: var(--surface);
}
.sidebar-brand { display: flex; align-items: start; gap: 10px; padding: 4px 4px 26px; border-bottom: 1px solid var(--line); }
.sidebar .brand { flex: 1; min-width: 0; padding: 0; border: 0; }
.sidebar .brand-original img { width: 174px; max-width: 100%; }
.sidebar .brand small { font-size: 11px; margin-top: 12px; }
.sidebar-toggle { flex: 0 0 28px; padding: 4px; min-height: 28px; border-radius: 7px; background: transparent; color: #65676a; border: 0; }
.sidebar-toggle:hover { color: var(--ink); background: #f0f0f0; }
.sidebar-toggle svg { width: 20px; height: 20px; }
.sidebar nav { display: flex; flex-direction: column; gap: 10px; margin-top: 30px; overflow-y: auto; scrollbar-width: thin; padding: 3px; margin-inline: -3px; min-height: 0; }
.sidebar nav .nav-item, .sidebar .nav-branch > summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    min-height: 54px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: #303033;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}
.nav-icon { width: 34px; height: 36px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 9px; background: #f2f2f2; color: #27272a; }
.sidebar nav .nav-icon svg { width: 22px; height: 22px; padding: 0; stroke-width: 1.6; }
.sidebar nav .nav-item:hover, .sidebar .nav-branch > summary:hover { background: #f6f6f6; color: var(--ink); }
.sidebar nav .nav-item.selected, .sidebar .nav-branch > .branch-current { background: #f0f0f0; border-color: #e6e6e6; box-shadow: 0 2px 2px #2020200a; color: #171719; font-weight: 600; }
.selected .nav-icon, .branch-current .nav-icon { background: #fff; color: var(--accent-ink); box-shadow: 0 1px 3px #20202009; }
.sidebar .nav-branch { margin: 0; padding: 0; border: 0; }
.nav-branch > summary { list-style: none; }
.nav-branch > summary::-webkit-details-marker { display: none; }
.nav-chevron { display: flex; margin-left: auto; color: #6e7073; }
.nav-chevron svg { width: 14px; height: 14px; transition: transform 120ms ease-out; }
.nav-branch[open] .nav-chevron svg { transform: rotate(90deg); }
.nav-children { margin: 6px 0 2px 25px; padding: 2px 0 2px 16px; border-left: 1px solid #e0e0e0; }
.sidebar nav .nav-children a { position: relative; display: block; min-height: 34px; margin: 2px 0; padding: 7px 10px; border: 0; border-radius: 8px; color: #656569; font-size: 12px; font-weight: 400; line-height: 20px; background: transparent; text-decoration: none; }
.sidebar nav .nav-children a::before { content: ''; position: absolute; left: -17px; top: 17px; width: 12px; height: 1px; background: #e0e0e0; }
.sidebar nav .nav-children a:hover { color: #242426; background: #f5f5f5; }
.sidebar nav .nav-children a[aria-current] { color: var(--accent-ink); background: #fff0e9; font-weight: 600; }
.nav-divider { height: 1px; flex: 0 0 1px; background: var(--line); margin: 16px 0; }
.sidebar-bottom { border-top: 1px solid var(--line); padding-top: 20px; gap: 10px; flex-shrink: 0; }
.avatar { width: 34px; height: 34px; flex-shrink: 0; background: #fff0e9; color: var(--accent-ink); }
body > main, .dashboard-page main, .position-budget-page main {
    margin-left: calc(var(--sidebar-width) + 24px);
    max-width: none;
    min-width: 0;
    padding: 10px 8px 8px 24px;
}
.page-head, .dashboard-page .page-head { margin-bottom: 28px; align-items: center; gap: 24px; flex-wrap: nowrap; flex-direction: row; }
.page-heading { flex: 1; min-width: 180px; }
.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.app-search { display: flex; align-items: center; width: clamp(210px, 22vw, 360px); height: 50px; background: white; border-radius: 999px; padding: 4px 6px 4px 18px; border: 1px solid transparent; }
.app-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px #ff582b18; }
.app-search label { display: flex; flex-direction: row; align-items: center; gap: 10px; flex: 1; min-width: 0; margin: 0; }
.app-search label > svg { flex: 0 0 19px; width: 19px; height: 19px; color: #757579; }
.app-search input { width: 100%; min-width: 0; padding: 6px 0; min-height: 36px; border: 0; background: transparent; border-radius: 0; font-weight: 400; font-size: 13px; }
.app-search input:focus-visible { outline: 0; }
.app-search button { background: transparent; color: #66666a; min-height: 36px; width: 32px; padding: 6px; flex-shrink: 0; }
.app-search button:hover { background: #f1f1f1; color: var(--ink); }
.app-search button svg { width: 17px; height: 17px; }
.header-primary { background: #242424; color: white; min-height: 50px; padding: 12px 22px; box-shadow: inset 0 1px 3px #ffffff30, 0 2px 4px #0000000c; font-size: 13px; white-space: nowrap; }
.header-primary:hover { background: #3b3b3b; }
.header-icon, .header-avatar { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: white; color: #55555a; text-decoration: none; flex-shrink: 0; }
.header-icon svg { width: 20px; height: 20px; stroke-width: 1.5; }
.header-icon:hover { color: var(--accent-ink); background: #fff1eb; }
.header-avatar { background: var(--peach); color: var(--accent-ink); border: 4px solid white; font-weight: 600; }
.page-controls { margin: 0 0 24px; }
.page-controls .dashboard-filters { justify-content: flex-start; }

.page-head h1, .dashboard-page .page-head h1 {
    font-size: 34px;
    font-weight: 600;
    line-height: 1.18;
    letter-spacing: -.025em;
    margin: 0;
    text-wrap: balance;
}
.page-head .project-identity { margin-top: 10px; }
h2, .dashboard-grid h2, .position-budget-head h2 { font-size: 20px; font-weight: 600; letter-spacing: -.015em; }
h3 { font-weight: 600; }
.head-meta { font-size: 13px; }
.panel { border: 0; border-radius: var(--panel-radius); box-shadow: var(--surface-shadow); margin-bottom: 24px; }
.panel.compact { padding: 28px; }
.section-head, .dashboard-grid .section-head { padding: 26px 28px 20px; }
.compact .section-head { padding: 0 0 20px; }
.section-head p { line-height: 1.6; }
.panel > .table-wrap { padding: 0 8px 8px; }
.panel > .table-wrap:focus-visible { outline-offset: -4px; }
.filters { padding: 20px 28px 24px; gap: 14px; }
.panel > .filters { border-bottom-color: var(--line); }
input, select, textarea {
    border-color: #dfe2e4;
    border-radius: 14px;
    background: #fdfdfd;
    padding: 11px 14px;
    min-height: 44px;
    accent-color: var(--petrol);
}
input::placeholder, textarea::placeholder { color: #6b7074; }
input:hover, select:hover, textarea:hover { border-color: #a8bdbc; }
textarea { line-height: 1.6; resize: vertical; }
select[multiple] { border-radius: 16px; padding: 12px; }
button, .button { background: #242424; border-radius: 999px; min-height: 44px; padding: 11px 20px; font-weight: 500; }
button.secondary { border-color: #dfe2e4; }
button.secondary:hover { border-color: #b0cbc7; }
button:disabled { color: #5c6669; background: #e5e9e9; }
.icon-button { border-radius: 50%; min-height: 36px; padding: 7px; }
.budget-link { border-radius: 5px; padding: 0; min-height: 24px; font-weight: 600; }
.badge { border-radius: 9px; font-weight: 500; }
.notice { border-radius: 18px; }
.empty-icon { border-radius: 16px; }
.empty { padding: 56px 28px 64px; }
.stats { gap: 12px; padding: 12px; background: #fafafa; border-radius: 30px; box-shadow: var(--surface-shadow); }
.stat { padding: 24px; border: 0; border-radius: 23px; box-shadow: 0 2px 3px #20252c0a; gap: 8px; }
.stat > span { color: #4f595e; font-size: 14px; }
.stat strong { font-size: 38px; font-weight: 600; line-height: 1.2; }
a.stat:hover { background: #f6fbfa; }
th { background: #f7f8f8; color: #626a6d; font-weight: 500; }
th, td { border-bottom-color: #eeeff0; padding: 16px 20px; }
tbody tr:hover { background: #f7fbfa; }
.project-link { font-weight: 600; }
.table-wrap { scrollbar-width: thin; scrollbar-color: #b9c7c5 #f5f6f6; }
.pagination { padding: 20px 28px; }
.split { gap: 24px; }
.split > *, .form-grid > *, .filters > *, .stats > * { min-width: 0; }
fieldset { border-radius: 16px; padding: 16px 20px; }
details { border-color: var(--line); }
summary { padding-block: 4px; }
summary:hover { color: var(--petrol); }
.portfolio-tabs, .project-navigation {
    padding: 6px;
    gap: 4px;
    background: #e7e9e9;
    border: 0;
    border-radius: 18px;
    max-width: 100%;
    flex-wrap: wrap;
}
.portfolio-tabs a, .project-navigation a { border-radius: 13px; border-color: transparent; }
.portfolio-tabs a.selected, .project-navigation a[aria-current] {
    background: white;
    border-color: transparent;
    box-shadow: 0 2px 4px #20252c0b;
    color: var(--petrol-dark);
}
.project-navigation-wrap { margin-bottom: 24px; }
.project-actions { margin-bottom: 24px; }
.project-economics-title { padding: 26px 28px 0; }
.project-economics-grid { padding: 24px 28px 28px; }
.project-cost-figure > strong { font-size: 32px; }
.project-cost-meter, .project-cost-meter i, .annual-track, .annual-bar { border-radius: 999px; }
.project-overview-page .split > .panel { padding: 28px; }
.heat { border-radius: 16px; padding: 16px; }
.heat strong { font-weight: 600; font-size: 22px; }
.dashboard-filters { gap: 10px; }
.dashboard-filters label, .dashboard-filters label:first-child { min-width: 150px; max-width: 220px; }
.dashboard-filters select { min-height: 44px; border-radius: 999px; background: #fff; }
.dashboard-grid { gap: 24px; }
.steering-grid { grid-template-columns: minmax(0, 1.8fr) minmax(400px, 1fr); align-items: start; }
.steering-grid .dashboard-capacity { max-width: none; }
.dashboard-projects .table-wrap { margin: 0 8px 12px; max-height: 560px; overflow: auto; }
.dashboard-projects thead { position: sticky; top: 0; z-index: 1; }
/* Stable worklist columns, independent of case text and refresh results. */
#arbeitsliste .dashboard-table { table-layout: fixed; min-width: 800px; }
#arbeitsliste th:nth-child(1) { width: 24%; }
#arbeitsliste th:nth-child(2) { width: 30%; }
#arbeitsliste th:nth-child(3) { width: 20%; }
#arbeitsliste th:nth-child(4), #arbeitsliste th:nth-child(5) { width: 13%; }
#arbeitsliste .dashboard-table th, #arbeitsliste .dashboard-table td { min-width: 0; max-width: none; white-space: normal; overflow-wrap: anywhere; }
#arbeitsliste .dashboard-table td:first-child { width: auto; }

.dashboard-table th, .dashboard-table td { padding: 16px 12px; }
.dashboard-table .project-link { font-weight: 600; }
.dashboard-capacity-scroll .dashboard-heatmap { min-width: 360px; table-layout: fixed; }
.dashboard-heatmap th:first-child { width: 36%; }
.dashboard-heatmap th, .dashboard-heatmap td { padding: 10px 5px; }
.dashboard-heatmap td > span { border-radius: 12px; padding: 16px 5px; }
.dashboard-panel-footer { padding: 20px 28px; }
.dashboard-fineprint { margin: 0 28px 20px; }
.dashboard-empty { padding: 36px 28px; }
.position-budget-head { padding: 26px 28px; }
.budget-context { flex-wrap: wrap; }
.budget-visual-summary { border-top: 0; padding: 0 12px 12px; gap: 8px; }
.budget-stat { padding: 24px 20px; border: 0; border-radius: 22px; background: #f8f9f9; }
.budget-stat:last-child { border: 0; }
.budget-stat > strong { font-size: 30px; font-weight: 600; }
.budget-ring { width: 124px; height: 124px; flex-basis: 124px; }
.budget-ring > span { width: 98px; height: 98px; background: #f8f9f9; }
.budget-hours-chart i { height: 10px; border-radius: 999px; }
.budget-disclosure { border: 0; border-radius: 22px; overflow: hidden; box-shadow: var(--surface-shadow); margin-bottom: 16px; }
.budget-disclosure > summary { padding: 22px 26px; }
.budget-disclosure-body { padding: 0 26px 24px; }
.budget-disclosure-body .table-wrap { margin: 0 -26px -24px; }
.budget-overrun td:first-child { box-shadow: none; }
.budget-overrun .budget-position-name { color: var(--red); }
.budget-change-body { padding: 0 28px 24px; }
footer, .dashboard-page footer { color: var(--muted); padding: 20px 4px 4px; font-size: 12px; }
/* The login shares the same material, without inheriting the app's sidebar offset. */
body.auth { padding: 40px; }
body.auth > main.auth-panel { margin: 0; padding: 40px; max-width: 460px; border: 0; border-radius: 30px; box-shadow: var(--surface-shadow); }
.auth-panel .brand-original { white-space: normal; }
.auth-panel h1 { letter-spacing: -.025em; font-weight: 600; }
.header-filter-menu { position: relative; margin: 0; padding: 0; border: 0; }
.header-filter-menu > summary { cursor: pointer; list-style: none; position: relative; padding: 0; }
.header-filter-menu > summary::-webkit-details-marker { display: none; }
.header-filter-menu[open] > summary { background: var(--peach); color: var(--accent-ink); }
.header-filter-popover { position: absolute; z-index: 5; right: 0; top: 62px; width: min(720px, calc(100vw - 360px)); padding: 24px; background: #fff; border-radius: 24px; box-shadow: 0 12px 44px #24252b26; }
.header-filter-popover > strong { display: block; margin-bottom: 18px; font-size: 16px; }
.header-filter-popover .dashboard-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.header-filter-popover .dashboard-filters label, .header-filter-popover .dashboard-filters label:first-child { min-width: 0; max-width: none; }
.header-filter-popover label:last-of-type { grid-column: 1/-1; }
.filter-active { position: absolute; right: 5px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
/* Four operational figures use existing local, permission-scoped data. */
.overview-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px 8px; padding: 10px; margin: 0 0 24px; background: #fafafa; border-radius: 32px; box-shadow: inset 0 0 0 1px #ffffff, 0 2px 2px #00000008; }
.overview-metric { display: grid; grid-template-rows: subgrid; grid-row: span 3; min-width: 0; gap: 10px; padding: 24px; background: #fff; color: var(--ink); border-radius: 25px; text-decoration: none; box-shadow: 0 2px 3px #2020200a; }
.overview-metric > span { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.overview-metric svg { width: 22px; height: 22px; flex-shrink: 0; stroke-width: 1.6; }
.overview-metric strong { font-size: 48px; letter-spacing: -.035em; line-height: 1.1; font-weight: 600; }
.overview-metric small { font-size: 12px; color: var(--muted); }
.overview-metric:hover { background: #fff7f3; }
.overview-metric.metric-highlight { background: #fff0e9; }
.metric-highlight strong { color: #e7481d; }
.portfolio-tabs a.selected { color: var(--accent-ink); }
.project-navigation a[aria-current] { color: var(--accent-ink); }
.budget-ring { background: conic-gradient(var(--accent) var(--used), #e7e7ec 0); }
.budget-hours-chart > div:last-child i { background: linear-gradient(to right, var(--accent) var(--fill), #f8e3db var(--fill)); }
.budget-hours-chart > div:first-child i { background: linear-gradient(to right, var(--petrol) var(--fill), #e5efed var(--fill)); }
.budget-stat { background: #fafafa; }
.budget-ring > span { background: #fafafa; }
.budget-stat h3 { color: #48484d; }
.dashboard-projects .section-head h2::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 10px; vertical-align: middle; border-radius: 50%; background: var(--accent); }
/* Compact mode changes navigation only and persists as a local view preference. */
.navigation-compact { --sidebar-width: 80px; }
.navigation-compact .sidebar-brand { flex-direction: column; align-items: center; padding-bottom: 18px; }
.navigation-compact .sidebar .brand { display: none; }
.navigation-compact .sidebar nav .nav-label, .navigation-compact .sidebar nav .nav-chevron, .navigation-compact .sidebar nav .nav-children { display: none; }
.navigation-compact .sidebar nav .nav-item, .navigation-compact .sidebar .nav-branch > summary { justify-content: center; padding: 8px 0; }
.navigation-compact .sidebar-user, .navigation-compact .sidebar-bottom > .avatar { display: none; }
.navigation-compact .sidebar-bottom { justify-content: center; }
.navigation-compact .sidebar-bottom form { margin: 0; }
@media (prefers-reduced-motion: reduce) { .nav-chevron svg { transition: none; } }
@media (max-width: 1499px) {
    .steering-grid { grid-template-columns: minmax(0, 1fr); }
    
    .dashboard-filters { justify-content: flex-start; }
}
@media (min-width: 851px) and (max-width: 1280px) {
    body { --sidebar-width: 224px; margin: 16px; padding: 16px; border-radius: 32px; }
    .sidebar { inset: 32px auto 32px 32px; width: var(--sidebar-width); padding-inline: 12px; }
    body > main, .dashboard-page main, .position-budget-page main { margin-left: calc(var(--sidebar-width) + 16px); padding: 10px 0 8px 20px; }
    .page-head h1, .dashboard-page .page-head h1 { font-size: 30px; }
    .panel.compact, .project-overview-page .split > .panel { padding: 24px; }
    .split { grid-template-columns: minmax(0, 1fr); }
    .split.unboxed > form + form { border-left: 0; border-top: 1px solid var(--line); padding: 24px 0 0; }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .budget-stat > strong { font-size: 26px; }
}
/* Preserve the incumbent small-screen flow; desktop is the acceptance target. */
@media (max-width: 850px) {
    body { margin: 0; padding: 0; border-radius: 0; }
    .sidebar { position: static; width: auto; border-radius: 0; padding: 20px; }
    .sidebar nav { margin-top: 16px; }
    .sidebar nav a { min-height: 44px; }
    .sidebar .brand { padding-bottom: 16px; }
    body > main, .dashboard-page main, .position-budget-page main { margin: 0; padding: 24px 18px; }
}

@media (min-width: 851px) { body.navigation-compact { --sidebar-width: 80px; } }
@media (max-width: 1100px) { .header-primary { display: none; } .header-actions { gap: 8px; } .header-icon, .header-avatar { width: 40px; height: 40px; } .overview-metric { padding: 18px; } .overview-metric > span { font-size: 13px; } }

/* At the reference's desktop size, match its frame and navigation proportions. */
@media (min-width: 1600px) and (min-height: 1000px) {
    body { --sidebar-width: 296px; margin: 3.6vw 5vw; min-height: calc(100svh - 7.2vw); }
    .sidebar { inset: calc(3.6vw + 20px) auto calc(3.6vw + 20px) calc(5vw + 20px); padding: 26px 20px 20px; }
    body > main, .dashboard-page main, .position-budget-page main { padding-left: 0; }
    .sidebar nav .nav-item, .sidebar .nav-branch > summary { min-height: 58px; font-size: 16px; }
    .sidebar nav { gap: 12px; margin-top: 38px; }
    .nav-icon { width: 36px; height: 38px; flex-basis: 36px; }
    .sidebar .brand-original img { width: 196px; }
    .page-head h1, .dashboard-page .page-head h1 { font-size: 38px; }
    .app-search { width: clamp(260px, 20vw, 360px); }
    .overview-metric { padding: 28px; }
    .overview-metric > span { font-size: 15px; }
}

/* Search suggestions remain anchored to the shared header. */
.app-search { position: relative; }
.search-results { position: absolute; top: calc(100% + 8px); left: 0; width: max(100%, 320px); z-index: 20; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 12px 32px #20252c1a; text-align: left; }
.search-results[hidden] { display: none; }
.search-results .search-status { margin: 0; padding: 8px 12px; color: var(--muted); font-size: 12px; }
.search-results ul { list-style: none; padding: 0; margin: 0; max-height: 360px; overflow-y: auto; }
.search-results a { display: block; padding: 12px; border-radius: 8px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.search-results a:hover, .search-results a:focus-visible { background: #fff0e9; }
.search-results strong, .search-results small { display: block; }
.search-results strong { font-size: 14px; font-weight: 600; }
.search-results small { margin-top: 4px; color: var(--muted); font-size: 12px; }

.project-secondary-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 24px; padding: 16px 4px 0; border-top: 1px solid var(--line); font-size: 12px; }
.project-secondary-links a { color: var(--muted); text-underline-offset: 3px; }
.project-secondary-links a:hover, .project-secondary-links a:focus-visible { color: var(--petrol); }
.search-results .search-group { padding: 10px 12px 4px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.search-results .search-inactive strong { color: var(--muted); font-weight: 500; }

/* Project pages: search stays in the top row; customer, then the title, get the full width below. */
.project-overview-page .page-head, .position-budget-page .page-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 24px; }
.project-overview-page .page-heading, .position-budget-page .page-heading, .page-head .project-identity { display: contents; }
.project-identity .identity-list { grid-area: 1 / 1; justify-self: start; color: var(--muted); font-size: 13px; text-decoration: none; }
.project-identity .identity-list:hover { color: var(--accent-ink); }
.project-overview-page .header-actions, .position-budget-page .header-actions { grid-area: 1 / 2; }
.identity-customer { grid-area: 2 / 1 / 3 / 3; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 14px; color: var(--muted); font-size: 14px; line-height: 24px; }
.identity-customer strong { color: var(--ink); font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.project-overview-page .page-head h1, .position-budget-page .page-head h1 { grid-area: 3 / 1 / 4 / 3; text-wrap: pretty; }
/* Quiet orange links to the leading source systems. */
.source-links { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.source-link { display: inline-flex; align-items: center; padding: 2px 10px; border: 1px solid #ffd3c4; border-radius: 999px; background: #fff7f3; color: var(--accent-ink); font-size: 12px; font-weight: 500; line-height: 20px; text-decoration: none; white-space: nowrap; transition: background-color 120ms ease-out, border-color 120ms ease-out; }
.source-link:hover { background: var(--peach); border-color: var(--accent); }
td > .source-link { margin-top: 8px; }
/* The open project and its pages appear inside its list branch. */
.sidebar nav .nav-children a.nav-parent { color: #242426; font-weight: 600; }
.nav-project { margin: 2px 0 6px 2px; padding-left: 10px; border-left: 1px solid #e0e0e0; }
.nav-project > span { display: block; padding: 6px 8px 2px; color: #242426; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar nav .nav-project a { padding-inline: 8px; }
.sidebar nav .nav-project a::before { left: -11px; width: 8px; }
@media (prefers-reduced-motion: reduce) { .source-link { transition: none; } }

/* Motion: short, compositor-friendly, and off for reduced-motion users. */
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: 160ms; animation-timing-function: ease-out; }
::view-transition-old(*), ::view-transition-new(*) { animation-duration: 160ms; }
.sidebar { view-transition-name: sidebar; }
.header-actions { view-transition-name: header-actions; }
button, .button, .header-icon, .overview-metric, .source-link { transition: background-color 120ms ease-out, color 120ms ease-out, border-color 120ms ease-out, transform 100ms ease-out; }
button:active, .button:active, .header-icon:active, .overview-metric:active { transform: scale(.98); }
.budget-people-toggle:active, .budget-link:active, .sidebar-toggle:active { transform: none; }
.search-results, .header-filter-popover { transition: opacity 150ms ease-out, transform 150ms ease-out; }
@starting-style { .search-results, .header-filter-popover { opacity: 0; transform: translateY(-6px); } }
:root { interpolate-size: allow-keywords; }
.nav-branch::details-content, .budget-disclosure::details-content { height: 0; overflow: clip; transition: height 180ms ease-out, content-visibility 180ms allow-discrete; }
.nav-branch[open]::details-content, .budget-disclosure[open]::details-content { height: auto; }
.navigation-animated .sidebar { transition: width 180ms ease-out; }
.navigation-animated > main { transition: margin-left 180ms ease-out; }
@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
    ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
    button, .button, .header-icon, .overview-metric, .source-link, .search-results, .header-filter-popover, .navigation-animated .sidebar, .navigation-animated > main { transition: none; }
    .nav-branch::details-content, .budget-disclosure::details-content { transition: none; }
    button:active, .button:active, .header-icon:active, .overview-metric:active { transform: none; }
}

/* Project lists: at most two lines per row, every column visible without sideways scrolling. */
.cockpit-list .table-wrap th, .cockpit-list .table-wrap td { padding: 10px 12px; vertical-align: top; }
.cockpit-list .table-wrap th:first-child, .cockpit-list .table-wrap td:first-child { padding-left: 20px; }
.cockpit-list .table-wrap th { white-space: normal; font-size: 12px; line-height: 16px; vertical-align: bottom; }
.cockpit-list .table-wrap td small { margin-top: 2px; }
.cockpit-list .table-wrap td:first-child { max-width: 240px; }
.cockpit-list .table-wrap td:first-child .project-link, .cockpit-list .table-wrap td:first-child small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cockpit-list .project-target, .cockpit-list .list-synced { white-space: nowrap; }
.cockpit-list .list-synced { color: var(--muted); font-size: 12px; }
.cockpit-list .list-action { max-width: 220px; }
.cockpit-list .list-action > span:not(.muted) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.cockpit-list .list-action > span:not(.muted):has(+ small) { -webkit-line-clamp: 1; }
.cockpit-list .table-wrap td form { margin: 0; }
.cockpit-list .table-wrap td .budget-link { min-height: 0; margin: 0; padding: 0; line-height: inherit; }
.cockpit-list .filters label { min-width: 118px; flex: 1 1 118px; }
.cockpit-list .budget-link { white-space: nowrap; }

.metric-warn strong { color: var(--red); }
@media (max-width: 1280px) { .overview-metric { padding: 18px; } .overview-metric strong { font-size: 40px; } }

/* Sidebar focus rings stay inside the scrolling navigation instead of being clipped. */
.sidebar nav :focus-visible { outline-offset: -3px; }
.cockpit-list .list-kind { white-space: nowrap; color: var(--muted); }

/* Density: sized for a laptop viewport at 100 % zoom; the navigation fits without scrolling. */
body { margin: 12px; padding: 14px; min-height: calc(100svh - 24px); border-radius: 28px; }
.sidebar { inset: 26px auto 26px 26px; padding: 18px 14px 14px; border-radius: 24px; }
.sidebar-brand { padding: 2px 4px 16px; }
.sidebar .brand-original img { width: 150px; }
.sidebar .brand small { margin-top: 8px; }
.sidebar nav { gap: 2px; margin-top: 14px; scrollbar-width: none; }
.sidebar nav .nav-item, .sidebar .nav-branch > summary { min-height: 42px; padding: 5px 8px; gap: 10px; border-radius: 12px; font-size: 13.5px; }
.nav-icon { width: 30px; height: 30px; flex-basis: 30px; border-radius: 8px; }
.sidebar nav .nav-icon svg { width: 18px; height: 18px; }
.nav-children { margin: 2px 0 2px 22px; padding: 0 0 0 14px; }
.sidebar nav .nav-children a { min-height: 28px; margin: 1px 0; padding: 4px 10px; }
.sidebar nav .nav-children a::before { left: -15px; top: 14px; width: 10px; }
.nav-project > span { padding: 4px 8px 0; }
.nav-divider { margin: 8px 0; }
.sidebar-bottom { padding-top: 12px; }
body > main, .dashboard-page main, .position-budget-page main { margin-left: calc(var(--sidebar-width) + 18px); padding: 6px 4px 4px 18px; }
.page-head, .dashboard-page .page-head { margin-bottom: 20px; }
.page-head h1, .dashboard-page .page-head h1 { font-size: 26px; }
.app-search { height: 42px; }
.header-primary { min-height: 42px; padding: 9px 18px; }
.header-icon, .header-avatar { width: 40px; height: 40px; }
h2, .dashboard-grid h2, .position-budget-head h2 { font-size: 17px; }
.panel { border-radius: 22px; margin-bottom: 18px; }
.panel.compact, .project-overview-page .split > .panel { padding: 20px 22px; }
.section-head, .dashboard-grid .section-head { padding: 18px 22px 12px; }
.filters { padding: 12px 22px 16px; gap: 10px; }
input, select, textarea { min-height: 38px; padding: 8px 12px; border-radius: 12px; }
button, .button { min-height: 38px; padding: 8px 16px; }
th, td { padding: 10px 16px; }
.dashboard-table th, .dashboard-table td { padding: 9px 12px; }
.dashboard-grid, .split { gap: 18px; }
.overview-metrics { gap: 6px; padding: 8px; margin-bottom: 18px; border-radius: 24px; }
.overview-metric { padding: 16px 18px; gap: 4px; border-radius: 18px; }
.overview-metric > span { font-size: 13px; gap: 8px; }
.overview-metric svg { width: 18px; height: 18px; }
.overview-metric strong { font-size: 32px; }
.stats { padding: 8px; gap: 8px; border-radius: 24px; }
.stat { padding: 16px 18px; border-radius: 18px; }
.stat strong { font-size: 30px; }
.dashboard-heatmap th, .dashboard-heatmap td { padding: 5px 4px; }
.dashboard-heatmap td > span { padding: 9px 4px; border-radius: 10px; }
.heat { padding: 10px; border-radius: 12px; }
.portfolio-tabs, .project-navigation { padding: 4px; border-radius: 14px; }
.portfolio-tabs a { min-height: 32px; padding: 6px 14px; border-radius: 10px; }
.project-navigation a { padding: 8px 14px; border-radius: 10px; }
.position-budget-head { padding: 18px 22px; }
.budget-disclosure > summary { padding: 14px 22px; }
.budget-stat { padding: 16px 18px; }
.budget-stat > strong { font-size: 24px; }
.budget-ring { width: 96px; height: 96px; flex-basis: 96px; }
.budget-ring > span { width: 76px; height: 76px; }
.project-cost-figure > strong { font-size: 24px; }
.identity-customer { margin-top: 8px; }
.identity-customer strong { font-size: 16px; }
.cockpit-list .table-wrap th, .cockpit-list .table-wrap td { padding: 8px 12px; }
.cockpit-list .table-wrap th:first-child, .cockpit-list .table-wrap td:first-child { padding-left: 18px; }

/* Target date: the date itself is the control; a small month view writes the choice to MOCO. */
.target-edit { min-height: 0; margin: -2px -6px; padding: 2px 6px; border: 0; border-radius: 6px; background: none; font: inherit; font-weight: 500; white-space: nowrap; cursor: pointer; text-decoration: underline dotted #b9bdc1; text-underline-offset: 4px; }
.target-edit:hover, .target-edit[aria-expanded="true"] { background: var(--peach); text-decoration-color: transparent; }
.target-edit:active { transform: none; }
.target-calendar { inset: auto; margin: 0; width: 248px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); box-shadow: 0 12px 32px #20252c24; transition: opacity 140ms ease-out, transform 140ms ease-out; }
@starting-style { .target-calendar:popover-open { opacity: 0; transform: translateY(-4px); } }
.target-calendar-title { margin: 0 2px 8px; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.target-calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.target-calendar-head strong { font-size: 13px; font-weight: 600; }
.target-calendar button { min-height: 0; margin: 0; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 12px; font-variant-numeric: tabular-nums; cursor: pointer; }
.target-calendar-head button { width: 28px; height: 28px; border-radius: 8px; font-size: 18px; line-height: 1; color: var(--muted); }
.target-calendar-week, .target-calendar-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.target-calendar-week span { padding: 4px 0; color: var(--muted); font-size: 11px; }
.target-calendar-days button { height: 30px; border-radius: 8px; }
.target-calendar-head button:hover, .target-calendar-days button:hover { background: #f1f1f1; }
.target-calendar-days .is-today { box-shadow: inset 0 0 0 1px #c9cdd1; }
.target-calendar-days .is-current { background: var(--peach); color: var(--accent-ink); font-weight: 600; }
.target-calendar-days .is-picked, .target-calendar-days .is-picked:hover { background: #242424; color: #fff; font-weight: 600; }
.target-calendar-note { min-height: 18px; margin: 8px 2px; color: var(--muted); font-size: 12px; line-height: 18px; }
.target-calendar .target-calendar-save { width: 100%; height: 34px; border-radius: 999px; background: #242424; color: #fff; font-size: 12px; font-weight: 500; }
.target-calendar .target-calendar-save:hover { background: #3b3b3b; }
.target-calendar .target-calendar-save:disabled { background: #eceeee; color: #6a7073; cursor: default; }
@media (prefers-reduced-motion: reduce) { .target-calendar { transition: none; } }

/* Operative steering: one dense block instead of a long form. */
.steering-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.steering-head h2 { margin: 0; }
.steering-head small { color: var(--muted); font-size: 12px; }
.steering-grid-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; }
.steering-grid-fields > .span-2 { grid-column: span 2; }
.steering label { margin: 0; gap: 3px; color: var(--muted); font-size: 12px; font-weight: 500; }
.steering input, .steering select { min-height: 34px; padding: 5px 10px; border-radius: 10px; font-size: 13px; }
/* Blockade fields appear only for the two states that need them. */
.steering .when-blocked { display: none; }
.steering form:has(select[name="status"] option:is([value="blocked"], [value="approval"]):checked) .when-blocked { display: flex; }
.steering-more { margin: 12px 0 0; padding: 0; border: 0; }
.steering-more > summary { display: inline-block; padding: 4px 0; color: var(--muted); font-size: 12px; font-weight: 500; cursor: pointer; }
.steering-more > .steering-grid-fields { margin-top: 8px; }
.steering-checks { display: flex; flex-wrap: wrap; align-items: end; gap: 6px 16px; padding-bottom: 7px; }
.steering .steering-checks .checkbox { flex-direction: row; align-items: center; gap: 6px; color: var(--ink); font-weight: 400; }
.steering .steering-checks input { min-height: 0; padding: 0; }
.steering-save { min-height: 34px; margin-top: 14px; padding: 6px 18px; font-size: 13px; }
@media (max-width: 1100px) { .steering-grid-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.steering-more > summary { list-style: none; }
.steering-more > summary::-webkit-details-marker { display: none; }
.steering-more > summary::before { content: '›'; display: inline-block; width: 12px; transition: transform 120ms ease-out; }
.steering-more[open] > summary::before { transform: rotate(90deg); }
.steering-more > summary:hover { color: var(--accent-ink); }
@media (prefers-reduced-motion: reduce) { .steering-more > summary::before { transition: none; } }

/* Tree: the open project hangs on its list, its pages hang one level below the project. */
.nav-project { margin: 0; padding: 0; border: 0; }
.nav-project > span { position: relative; padding: 4px 10px 2px; }
.nav-project > span::before { content: ''; position: absolute; left: -15px; top: 14px; width: 10px; height: 1px; background: #e0e0e0; }
.sidebar nav .nav-project a { margin-left: 22px; padding-inline: 10px; }
.sidebar nav .nav-project a::before { left: -9px; top: 14px; width: 7px; }
.sidebar nav .nav-project a::after { content: ''; position: absolute; left: -10px; top: -1px; bottom: -1px; width: 1px; background: #e0e0e0; }
.sidebar nav .nav-project a:last-child::after { bottom: 13px; }
.nav-project { position: relative; margin-left: 16px; }
.nav-project::before { content: ''; position: absolute; left: -6px; top: -2px; height: 17px; width: 1px; background: #e0e0e0; }
.nav-project > span::before { left: -6px; width: 9px; }

/* Project tabs: real page tabs, docked onto the content sheet below; status and actions share their row. */
.project-navigation-wrap { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0; flex-wrap: nowrap; }
.project-navigation { display: flex; gap: 2px; padding: 0; background: none; border: 0; border-radius: 0; flex-wrap: nowrap; }
.project-navigation a { min-width: 0; padding: 9px 20px 10px; border: 0; border-radius: 14px 14px 0 0; background: transparent; color: var(--muted); box-shadow: none; }
.project-navigation a:hover { background: #e7e9e9; color: var(--ink); }
.project-navigation a[aria-current] { position: relative; background: #fff; color: var(--accent-ink); box-shadow: none; }
.project-navigation a span { font-size: 14px; font-weight: 600; }
.project-navigation a small { margin-top: 1px; }
/* Outward curves let the active tab flow into the sheet. */
.project-navigation a[aria-current]::before, .project-navigation a[aria-current]::after { content: ''; position: absolute; bottom: 0; width: 14px; height: 14px; background: radial-gradient(circle at 0 0, transparent 14px, #fff 14.5px); }
.project-navigation a[aria-current]::before { left: -14px; background: radial-gradient(circle at 0 0, transparent 14px, #fff 14.5px); }
.project-navigation a[aria-current]::after { right: -14px; background: radial-gradient(circle at 100% 0, transparent 14px, #fff 14.5px); }
.project-navigation a[aria-current]:first-child::before { display: none; }
.project-navigation-wrap .project-actions { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; flex-wrap: nowrap; }
.project-navigation-wrap .project-actions form { margin: 0; }
.project-navigation-wrap .project-actions button { min-height: 32px; padding: 5px 14px; font-size: 13px; }
/* The sheet under the tabs: square where the first tab meets it. */
.project-navigation-wrap + .panel, .project-navigation-wrap + .split > .panel:first-child { position: relative; }
.project-navigation-wrap:has(a:first-child[aria-current]) + .panel, .project-navigation-wrap:has(a:first-child[aria-current]) + .split > .panel:first-child { border-top-left-radius: 0; }
/* Switching tabs keeps the project head in place; only the content below changes. */
.page-head h1 { view-transition-name: page-title; }
.identity-customer { view-transition-name: project-identity; }
.project-navigation { view-transition-name: project-tabs; }
/* Both project tabs share one head height, so nothing jumps when switching. */
.project-overview-page .page-head, .position-budget-page .page-head { margin-bottom: 18px; }
.nav-project { margin-left: 10px; }
.sidebar nav .nav-project a { margin-left: 16px; padding-inline: 8px; white-space: nowrap; }

/* One sheet per project tab: sections sit on it, separated by hairlines instead of floating as cards. */
.project-sheet { margin-bottom: 18px; background: #fff; border-radius: 22px; box-shadow: var(--surface-shadow); overflow: clip; }
.project-navigation-wrap:has(a:first-child[aria-current]) + .project-sheet { border-top-left-radius: 0; }
.project-sheet > .panel, .project-sheet > .split > .panel, .project-sheet > .budget-disclosure { margin: 0; background: transparent; border-radius: 0; box-shadow: none; }
.project-sheet > * + * { border-top: 1px solid var(--line); }
.project-sheet > .split { gap: 0; }
.project-sheet > .split > .panel + .panel { border-left: 1px solid var(--line); }
.project-sheet > p { margin: 0; padding: 14px 22px; }
@media (max-width: 1280px) { .project-sheet > .split > .panel + .panel { border-left: 0; border-top: 1px solid var(--line); } }
.panel > div.compact { padding: 12px 22px 16px; }
.panel > div.compact p { margin: 0 0 4px; }

/* Worklist: two lines per case at most; the maintainable fields are edited in place. */
#arbeitsliste .case-table { table-layout: fixed; min-width: 860px; }
#arbeitsliste .case-table th:nth-child(1) { width: 22%; }
#arbeitsliste .case-table th:nth-child(2) { width: 22%; }
#arbeitsliste .case-table th:nth-child(3) { width: 13%; }
#arbeitsliste .case-table th:nth-child(4) { width: 19%; }
#arbeitsliste .case-table th:nth-child(5) { width: 13%; }
#arbeitsliste .case-table th:nth-child(6) { width: 11%; }
#arbeitsliste .case-table th, #arbeitsliste .case-table td { padding: 7px 8px; vertical-align: middle; }
#arbeitsliste .case-table th:first-child, #arbeitsliste .case-table td:first-child { padding-left: 12px; }
#arbeitsliste .case-table td:first-child .project-link, #arbeitsliste .case-table td:first-child small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
#arbeitsliste .case-table td small { margin-top: 1px; }
.case-reason { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.case-inline input, .case-inline select { width: 100%; min-height: 30px; margin: 0; padding: 3px 8px; border-color: transparent; border-radius: 8px; background-color: transparent; font-size: 13px; text-overflow: ellipsis; }
.case-inline select { padding-right: 20px; cursor: pointer; }
.case-inline:hover input, .case-inline:hover select { border-color: #e3e6e8; }
.case-inline input:hover, .case-inline select:hover { border-color: #b9c3c4; }
.case-inline input:focus, .case-inline select:focus { border-color: var(--accent); background-color: #fff; outline: 0; box-shadow: 0 0 0 3px #ff582b18; }
.case-inline input::placeholder { color: #9aa0a4; }
.case-inline input.is-empty:not(:focus) { color: #9aa0a4; }
.case-inline .is-error { border-color: var(--red); background-color: #fdf1ef; }
.case-inline.is-saved { animation: case-saved 900ms ease-out; }
@keyframes case-saved { from { background-color: #eaf4f2; } to { background-color: transparent; } }
@media (prefers-reduced-motion: reduce) { .case-inline.is-saved { animation: none; } }
#arbeitsliste .case-table { min-width: 0; }
#arbeitsliste .case-table th:nth-child(1) { width: 20%; }
#arbeitsliste .case-table th:nth-child(2) { width: 19%; }
#arbeitsliste .case-table th:nth-child(3) { width: 15%; }
#arbeitsliste .case-table th:nth-child(4) { width: 18%; }
#arbeitsliste .case-table th:nth-child(5) { width: 14%; }
#arbeitsliste .case-table th:nth-child(6) { width: 14%; }
#arbeitsliste .case-table th, #arbeitsliste .case-table td { padding-inline: 5px; }
.case-inline input, .case-inline select { padding-inline: 6px; font-size: 12.5px; }
.case-inline select { padding-right: 18px; }
.case-inline input[type="date"] { padding-right: 2px; }

/* Shortened project and customer names unfold in place the moment the pointer is on them. */
#arbeitsliste .case-table td:first-child :is(.project-link, small):hover,
.cockpit-list .table-wrap td:first-child :is(.project-link, small):hover { position: relative; z-index: 2; width: max-content; max-width: none; overflow: visible; padding-right: 10px; border-radius: 4px; background: #f7fbfa; box-shadow: 6px 0 8px #f7fbfa; }
