﻿:root{
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #6b7280;
  --card: #f7fafc; /* very light gray */
  --card-2: #f3f4f6;
  --sidebar: #0f5132; /* dark green */
  --accent: #166534;
  --border: rgba(15, 23, 42, 0.06);
  --button-border: #7b8f84;
  --button-border-hover: #4e6659;
  --shadow: 0 8px 30px rgba(15,23,42,0.08);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* Dashboard */
.dashboard-page-header .muted{margin:7px 0 0}
.dashboard-filter-bar{display:grid;grid-template-columns:repeat(3,minmax(150px,1fr)) auto;gap:10px;align-items:end;margin:-5px 0 16px;padding:13px 15px;border:1px solid rgba(24,78,51,.12);border-radius:16px;background:rgba(255,255,255,.86);box-shadow:0 9px 24px rgba(24,63,42,.06)}
.dashboard-filter-bar label{display:grid;gap:5px}.dashboard-filter-bar label>span{color:var(--muted);font-size:.69rem;font-weight:750;text-transform:uppercase;letter-spacing:.06em}
.dashboard-filter-bar select{width:100%;min-height:40px;padding:7px 32px 7px 10px;border:1px solid rgba(24,78,51,.2);border-radius:10px;background:#fff;color:var(--text);font:inherit}
.dashboard-filter-actions{display:flex;gap:7px}.dashboard-filter-actions .button{min-height:40px;white-space:nowrap}
.dashboard-kpi-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-bottom:18px}
.dashboard-kpi{position:relative;overflow:hidden;min-height:126px;padding:18px;border:1px solid rgba(24,78,51,.14);border-radius:18px;background:linear-gradient(145deg,#fff,#f7faf7);box-shadow:0 12px 28px rgba(24,63,42,.08)}
.dashboard-kpi::after{content:"";position:absolute;right:-22px;bottom:-34px;width:92px;height:92px;border-radius:50%;background:rgba(34,111,70,.06)}
.dashboard-kpi-featured{color:#fff;border-color:#174d32;background:linear-gradient(140deg,#123d29,#287249)}
.dashboard-kpi-featured::after{background:rgba(255,255,255,.09)}
.dashboard-kpi-open{border-color:rgba(190,112,33,.26);background:linear-gradient(145deg,#fff,#fff7e9)}
.dashboard-kpi-label{display:block;position:relative;z-index:1;color:var(--muted);font-size:.78rem;font-weight:750;letter-spacing:.06em;text-transform:uppercase}
.dashboard-kpi-featured .dashboard-kpi-label{color:rgba(255,255,255,.7)}
.dashboard-kpi strong{display:block;position:relative;z-index:1;margin:14px 0 6px;font-family:"Aptos Display","Trebuchet MS",sans-serif;font-size:clamp(1.45rem,2vw,2.1rem);line-height:1}
.dashboard-kpi strong small{display:inline;font-size:.75rem;font-weight:700}
.dashboard-kpi > small{position:relative;z-index:1;color:var(--muted);font-size:.76rem}
.dashboard-kpi-featured > small{color:rgba(255,255,255,.72)}
.dashboard-layout{display:grid;grid-template-columns:minmax(360px,.8fr) minmax(520px,1.2fr);gap:18px;align-items:start}
.dashboard-panel{border:1px solid rgba(24,78,51,.14);border-radius:20px;background:#fff;box-shadow:0 14px 34px rgba(24,63,42,.08)}
.dashboard-panel-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:20px 22px;border-bottom:1px solid rgba(24,78,51,.1)}
.dashboard-panel-heading .eyebrow{margin:0 0 3px}
.dashboard-panel-heading h3{margin:0;font-size:1.25rem}
.dashboard-unit{padding:6px 10px;border-radius:999px;background:#edf5ef;color:#356047;font-size:.75rem;font-weight:750}
.dashboard-month-chart{display:grid;grid-template-columns:repeat(12,minmax(22px,1fr));gap:7px;align-items:end;height:315px;padding:30px 20px 18px}
.dashboard-month-column{display:grid;grid-template-rows:22px 1fr 28px;align-items:end;height:100%;min-width:0;text-align:center}
.dashboard-month-value{align-self:start;color:#31513f;font-size:.68rem;font-weight:750;white-space:nowrap}
.dashboard-month-track{position:relative;height:100%;overflow:hidden;border-radius:7px 7px 3px 3px;background:linear-gradient(180deg,#f4f7f4,#edf2ee)}
.dashboard-month-track span{position:absolute;right:0;bottom:0;left:0;min-height:2px;border-radius:7px 7px 3px 3px;background:linear-gradient(180deg,#8bb99b,#286e49)}
.dashboard-month-column small{padding-top:8px;color:var(--muted);font-size:.64rem;white-space:nowrap}
.dashboard-legend{display:flex;flex-wrap:wrap;gap:12px;color:var(--muted);font-size:.72rem}
.dashboard-legend span{display:flex;align-items:center;gap:5px}
.dashboard-legend span::before{content:"";width:9px;height:9px;border-radius:3px;background:#9ca3af}
.dashboard-legend .is-reported::before{background:#356b7b}.dashboard-legend .is-billed::before{background:#41835b}.dashboard-legend .is-open::before{background:#d38a32}
.dashboard-contract-list{display:grid;gap:12px;max-height:680px;padding:16px;overflow:auto}
.dashboard-contract{display:block;padding:16px;border:1px solid rgba(24,78,51,.12);border-radius:15px;background:linear-gradient(145deg,#fff,#fafcfa);color:var(--text);text-decoration:none;transition:border-color .16s ease,transform .16s ease,box-shadow .16s ease}
.dashboard-contract:hover{transform:translateY(-2px);border-color:rgba(34,111,70,.35);box-shadow:0 12px 24px rgba(24,63,42,.09)}
.dashboard-contract-heading{display:flex;justify-content:space-between;gap:18px;margin-bottom:13px}
.dashboard-contract-heading strong,.dashboard-contract-heading span{display:block}
.dashboard-contract-heading > div:first-child span{margin-top:3px;color:var(--muted);font-size:.78rem}
.dashboard-contract-volume{text-align:right}.dashboard-contract-volume span{color:var(--muted);font-size:.68rem;text-transform:uppercase;letter-spacing:.05em}.dashboard-contract-volume strong{margin-top:3px}
.dashboard-contract-bars{display:grid;gap:8px}
.dashboard-contract-line > div:first-child{display:flex;justify-content:space-between;gap:12px;margin-bottom:4px;font-size:.74rem}.dashboard-contract-line > div:first-child span{color:var(--muted)}
.dashboard-progress{height:9px;overflow:hidden;border-radius:999px;background:#e5e9e6}.dashboard-progress span{display:block;height:100%;min-width:2px;border-radius:inherit}
.dashboard-contract-line.is-reported .dashboard-progress span{background:#356b7b}.dashboard-contract-line.is-billed .dashboard-progress span{background:#41835b}.dashboard-contract-line.is-open .dashboard-progress span{background:#d38a32}
.dashboard-contract-foot{display:flex;flex-wrap:wrap;justify-content:space-between;gap:7px;margin-top:12px;padding-top:10px;border-top:1px solid rgba(24,78,51,.09);color:var(--muted);font-size:.72rem}
.dashboard-warning{color:#a6531c;font-weight:750}
.dashboard-empty{padding:44px 24px;text-align:center}.dashboard-empty strong{font-size:1.1rem}.dashboard-empty p{margin:8px auto 18px;color:var(--muted)}
@media(max-width:1220px){.dashboard-filter-bar{grid-template-columns:repeat(3,minmax(0,1fr))}.dashboard-filter-actions{grid-column:1/-1;justify-content:flex-end}.dashboard-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.dashboard-layout{grid-template-columns:1fr}.dashboard-contract-list{max-height:none}}
@media(max-width:760px){.dashboard-filter-bar{grid-template-columns:1fr}.dashboard-filter-actions{grid-column:auto;justify-content:stretch}.dashboard-filter-actions>*{flex:1}.dashboard-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-kpi{min-height:112px;padding:15px}.dashboard-month-chart{gap:4px;overflow-x:auto}.dashboard-month-column{min-width:34px}.dashboard-contract-heading{align-items:flex-start}.dashboard-panel-heading{padding:17px}.dashboard-contract-list{padding:10px}}

/* Own fleet and crane desktop */
.fleet-desktop-page{--fleet-ink:#18352a;--fleet-green:#17633f;--fleet-mint:#eaf4ed;--fleet-line:#dfe7e1;width:100%;max-width:none;margin:0}
.tour-mode-switch{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-bottom:16px;padding:5px;border:1px solid #dbe5de;border-radius:13px;background:#eef3f0}
.tour-mode-switch button{display:flex;align-items:center;justify-content:center;gap:9px;min-height:48px;padding:8px 14px;border:1px solid transparent;border-radius:9px;background:transparent;color:#607169;font:inherit;cursor:pointer}
.tour-mode-switch button span,.tour-mode-switch button small{display:block}
.tour-mode-switch button span{font-size:.78rem;font-weight:900}
.tour-mode-switch button small{font-size:.63rem}
.tour-mode-switch button.is-active{border-color:#cbdacf;background:#fff;color:#17633f;box-shadow:0 5px 16px rgba(20,57,41,.08)}
.tour-mode-switch button:focus-visible{outline:3px solid rgba(23,99,63,.16);outline-offset:1px}
.fleet-integrated-intro{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:14px;padding:15px 17px;border:1px solid #dfe7e1;border-radius:13px;background:linear-gradient(105deg,#f1f8f3,#fff)}
.fleet-integrated-intro h3,.fleet-integrated-intro p{margin:0}
.fleet-integrated-intro h3{color:#18352a;font-size:1.05rem}
.fleet-integrated-intro>div>p:last-child{margin-top:3px;color:#6b7c73;font-size:.7rem}
.fleet-desktop-header{align-items:center}
.fleet-desktop-header h2{color:var(--fleet-ink);letter-spacing:-.035em}
.fleet-desktop-header .muted{max-width:760px;margin-bottom:0}
.fleet-desktop-stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));overflow:hidden;margin-bottom:16px;border:1px solid var(--fleet-line);border-radius:14px;background:#fff;box-shadow:0 10px 30px rgba(20,57,41,.055)}
.fleet-desktop-stats article{position:relative;display:grid;gap:3px;min-width:0;padding:17px 20px}
.fleet-desktop-stats article+article{border-left:1px solid var(--fleet-line)}
.fleet-desktop-stats article.is-warning::before{position:absolute;inset:0 auto 0 0;width:3px;background:#d29b45;content:""}
.fleet-desktop-stats span,.fleet-desktop-stats small{color:#6c7c74;font-size:.72rem}
.fleet-desktop-stats span{text-transform:uppercase;letter-spacing:.08em;font-weight:800}
.fleet-desktop-stats strong{color:var(--fleet-ink);font-size:1.48rem;line-height:1.15}
.fleet-desktop-stats em{font-size:.76rem;font-style:normal}
.fleet-last-plan{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:16px;padding:11px 14px;border:1px solid #cfe0d4;border-radius:12px;background:linear-gradient(90deg,#f1f8f3,#fbfcfb);color:#456253}
.fleet-last-plan>div{display:flex;align-items:center;gap:10px}
.fleet-last-plan strong,.fleet-last-plan small{display:block}
.fleet-last-plan strong{color:#294b3b;font-size:.78rem}
.fleet-last-plan small,.fleet-last-plan>span{margin-top:2px;color:#718078;font-size:.65rem}
.fleet-status-dot{width:9px;height:9px;flex:0 0 9px;border-radius:50%;background:#c79a51;box-shadow:0 0 0 4px rgba(199,154,81,.13)}
.fleet-status-dot.is-active{background:#479064;box-shadow:0 0 0 4px rgba(71,144,100,.13)}
.fleet-vehicle-manager{margin-bottom:16px;overflow:hidden;border:1px solid var(--fleet-line);border-radius:14px;background:#fff;box-shadow:0 10px 30px rgba(20,57,41,.055)}
.fleet-vehicle-manager>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 18px;list-style:none;cursor:pointer;background:linear-gradient(90deg,#fff,#f4f8f5)}
.fleet-vehicle-manager>summary::-webkit-details-marker{display:none}
.fleet-vehicle-manager>summary>div{display:flex;align-items:center;gap:11px}
.fleet-vehicle-manager>summary h3,.fleet-vehicle-manager>summary p{margin:0}
.fleet-vehicle-manager>summary h3{color:var(--fleet-ink);font-size:.94rem}
.fleet-vehicle-manager>summary>small{color:#60746a;font-size:.7rem;font-weight:800}
.fleet-vehicle-manager-body{padding:15px 18px 17px;border-top:1px solid #e5ebe7}
.fleet-vehicle-manager .fleet-vehicle-list{grid-template-columns:repeat(3,minmax(0,1fr));max-height:none}
.fleet-parity-form{display:block}
.fleet-parity-setup{grid-template-columns:minmax(245px,.65fr) minmax(560px,1.8fr)}
.fleet-assignment-fields{display:grid;grid-template-columns:minmax(380px,1.6fr) minmax(220px,.8fr);gap:11px;align-items:stretch}
.fleet-assignment-fields .fleet-vehicle-picker{min-width:0;margin:0;padding:10px;border:1px solid #dfe7e1;border-radius:10px;background:#fbfcfb}
.fleet-assignment-fields .fleet-vehicle-picker legend{padding:0 5px;color:#617169;font-size:.65rem;font-weight:800}
.fleet-loader-field{display:grid;align-content:start;gap:6px;min-width:0;padding:10px;border:1px solid #dfe7e1;border-radius:10px;background:#fbfcfb}
.fleet-loader-field>span{color:#617169;font-size:.65rem;font-weight:800}
.fleet-loader-field select{width:100%;height:42px;padding:8px 10px;border:1px solid #d5e0d8;border-radius:8px;background:#fff;color:#244737;font:inherit}
.fleet-loader-field small{color:#7b8982;font-size:.58rem;line-height:1.4}
.fleet-time-grid{grid-template-columns:repeat(9,minmax(88px,1fr))}
.fleet-parity-workspace{margin-top:16px}
.fleet-parity-workspace .tour-result-panel{position:sticky;top:84px}
.fleet-polter-list{max-height:720px}
.fleet-polter-empty{margin:12px 0 0;padding:12px;border:1px dashed #d8e2db;border-radius:9px;color:#75847c;font-size:.68rem;text-align:center}
.fleet-result-placeholder{margin-top:14px;padding:22px 14px;border:1px dashed #d2ddd5;border-radius:10px;text-align:center}
.fleet-result-placeholder strong{display:block;color:#345444;font-size:.76rem}
.fleet-result-placeholder p{margin:5px 0 0;color:#7a8981;font-size:.64rem;line-height:1.45}
.fleet-result-panel .fleet-plan-result{margin-top:13px;padding-top:13px}
.fleet-result-panel .fleet-plan-result>h3{margin:0 0 9px;color:#18352a;font-size:.78rem}
.fleet-result-vehicle-select{display:grid;gap:5px;margin-bottom:10px}
.fleet-result-vehicle-select span{color:#60756a;font-size:.58rem;font-weight:900;text-transform:uppercase;letter-spacing:.06em}
.fleet-result-vehicle-select select{width:100%;min-height:38px;padding:0 34px 0 10px;border:1px solid #d5e1da;border-radius:8px;background:#fff;color:#18352a;font-family:inherit;font-size:.68rem;font-weight:800}
.fleet-result-panel .tour-route-preview{min-height:142px}
.fleet-result-panel .tour-day-schedule{max-height:520px;overflow-y:auto}
.fleet-parity-plan-list{grid-template-columns:1fr;max-height:520px;overflow-y:auto;padding-right:2px}
.fleet-parity-plan-list .fleet-result-card>header{display:grid}
.fleet-parity-plan-list .fleet-result-card>header>strong{white-space:normal}
.fleet-parity-plan-list .fleet-result-card ol{max-height:220px;overflow-y:auto}
.fleet-result-actions{display:grid;gap:7px;margin-top:10px}
.fleet-result-actions .button{width:100%}
.fleet-result-panel>.tour-calculate-button{margin-top:13px}
.fleet-map-vehicle-select{display:grid;grid-template-columns:auto minmax(220px,1fr);gap:10px;align-items:center;padding:10px 16px;border-bottom:1px solid #e1e8e3}
.fleet-map-vehicle-select span{color:#5f7168;font-size:.7rem;font-weight:800}
.fleet-map-vehicle-select select{height:39px;padding:7px 10px;border:1px solid #d5e0d8;border-radius:8px;background:#fff;color:#244737;font:inherit}
.fleet-desktop-workspace{display:grid;grid-template-columns:minmax(360px,.82fr) minmax(620px,1.35fr);gap:16px;align-items:start}
.fleet-desktop-panel{min-width:0;border:1px solid var(--fleet-line);border-radius:14px;background:#fff;box-shadow:0 10px 30px rgba(20,57,41,.055)}
.fleet-vehicle-panel{position:sticky;top:86px;padding:18px}
.fleet-planner-panel{padding:18px}
.fleet-panel-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-bottom:13px;border-bottom:1px solid #edf1ee}
.fleet-panel-header h3,.fleet-panel-header p{margin:0}
.fleet-panel-header h3{color:var(--fleet-ink);font-size:1.08rem}
.fleet-panel-header>span{padding:5px 8px;border-radius:999px;background:var(--fleet-mint);color:var(--fleet-green);font-size:.65rem;font-weight:900}
.fleet-panel-copy{margin:12px 0 15px;color:#6b7c73;font-size:.73rem;line-height:1.5}
.fleet-vehicle-list{display:grid;gap:9px;max-height:calc(100vh - 300px);overflow-y:auto;padding-right:3px}
.fleet-vehicle-card{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:11px;align-items:start;padding:12px;border:1px solid #e0e8e2;border-radius:11px;background:#fbfcfb;transition:border-color .18s ease,transform .18s ease,box-shadow .18s ease}
.fleet-vehicle-card:hover{border-color:#b7cebf;box-shadow:0 8px 20px rgba(20,57,41,.07);transform:translateY(-1px)}
.fleet-vehicle-icon{display:grid;width:42px;height:42px;place-items:center;border-radius:10px;background:#e6f2e9;color:#17633f;font-size:.72rem;font-weight:900}
.fleet-vehicle-icon.is-loader{background:#f5ead8;color:#98631f}
.fleet-vehicle-icon.is-combined{background:#e8eff3;color:#315c70}
.fleet-vehicle-copy{min-width:0}
.fleet-vehicle-title{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.fleet-vehicle-title strong,.fleet-vehicle-title small{display:block}
.fleet-vehicle-title strong{overflow:hidden;color:#224535;font-size:.79rem;text-overflow:ellipsis;white-space:nowrap}
.fleet-vehicle-title small{margin-top:2px;color:#7a8881;font-size:.61rem}
.fleet-active-badge{flex:0 0 auto;padding:3px 6px;border-radius:999px;background:#daf0e1;color:#28734a;font-size:.56rem;font-weight:900}
.fleet-vehicle-metrics{display:flex;flex-wrap:wrap;gap:5px;margin-top:9px}
.fleet-vehicle-metrics span{padding:4px 6px;border:1px solid #e1e8e3;border-radius:6px;background:#fff;color:#627269;font-size:.59rem}
.fleet-vehicle-metrics b{color:#2c5841}
.fleet-vehicle-metrics .is-warning{border-color:#ead7b9;background:#fff8ec;color:#956527}
.fleet-vehicle-meta{display:flex;flex-wrap:wrap;gap:5px 12px;margin-top:8px;color:#76867e;font-size:.59rem}
.fleet-vehicle-meta span::before{margin-right:4px;color:#5d8b70;content:"•"}
.fleet-edit-button{align-self:center;padding:6px 8px;border:0;border-radius:7px;background:transparent;color:#4d7160;font:800 .62rem inherit;cursor:pointer}
.fleet-edit-button:hover,.fleet-edit-button:focus-visible{background:#eaf4ed;color:#17633f;outline:none}
.fleet-empty-state{display:grid;justify-items:center;gap:8px;padding:32px 18px;border:1px dashed #cbd9cf;border-radius:11px;text-align:center}
.fleet-empty-state strong{color:#294b3b}
.fleet-empty-state p{margin:0;color:#75857d;font-size:.72rem}
.fleet-planner-form{display:grid;gap:14px}
.fleet-planner-form fieldset{min-width:0;margin:0;padding:14px;border:1px solid #e1e8e3;border-radius:11px;background:#fbfcfb}
.fleet-planner-form legend{display:flex;align-items:center;gap:8px;padding:0 7px;color:#294b3b;font-size:.75rem;font-weight:900}
.fleet-planner-form legend span{display:grid;width:24px;height:24px;place-items:center;border-radius:50%;background:#e4f1e8;color:#17633f;font-size:.6rem}
.fleet-vehicle-picker>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.fleet-vehicle-picker label{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:9px;align-items:center;padding:10px;border:1px solid #dce5df;border-radius:9px;background:#fff;cursor:pointer}
.fleet-vehicle-picker label:has(input:checked){border-color:#83ae91;background:#f0f8f2;box-shadow:inset 0 0 0 1px #b5d0bd}
.fleet-vehicle-picker input{width:17px;height:17px;accent-color:#17633f}
.fleet-vehicle-picker strong,.fleet-vehicle-picker small{display:block}
.fleet-vehicle-picker strong{color:#2a4b3b;font-size:.7rem}
.fleet-vehicle-picker small{margin-top:2px;color:#728078;font-size:.59rem}
.fleet-vehicle-picker i{width:7px;height:7px;border-radius:50%;background:#d6dfd9}
.fleet-vehicle-picker label:has(input:checked) i{background:#469265;box-shadow:0 0 0 3px rgba(70,146,101,.12)}
.fleet-inline-empty{grid-column:1/-1;margin:0;padding:12px;color:#78877f;font-size:.7rem;text-align:center}
.fleet-form-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.fleet-form-grid label,.fleet-dialog-grid label{display:grid;gap:5px;min-width:0}
.fleet-form-grid label.is-wide,.fleet-dialog-grid .is-wide{grid-column:1/-1}
.fleet-form-grid label>span,.fleet-dialog-grid label>span{color:#617169;font-size:.65rem;font-weight:800}
.fleet-form-grid :is(input,select),.fleet-dialog-grid :is(input,select,textarea){width:100%;min-width:0;padding:8px 9px;border:1px solid #d5e0d8;border-radius:8px;background:#fff;color:#244737;font:inherit}
.fleet-form-grid :is(input,select){height:39px}
.fleet-form-grid label>small{color:#7b8982;font-size:.58rem}
.fleet-unit-input{position:relative}
.fleet-unit-input input{padding-right:48px}
.fleet-unit-input i{position:absolute;top:50%;right:9px;color:#7b8982;font-size:.58rem;font-style:normal;font-weight:800;transform:translateY(-50%)}
.fleet-policy-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}
.fleet-policy-row label{display:flex;gap:8px;padding:9px;border:1px solid #dce5df;border-radius:9px;background:#fff;cursor:pointer}
.fleet-policy-row label:has(input:checked){border-color:#a9c7b3;background:#f1f8f3}
.fleet-policy-row input{width:16px;height:16px;accent-color:#17633f}
.fleet-policy-row strong,.fleet-policy-row small{display:block}
.fleet-policy-row strong{color:#2e503f;font-size:.66rem}
.fleet-policy-row small{margin-top:2px;color:#74837b;font-size:.58rem}
.fleet-planner-actions{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-top:2px}
.fleet-planner-actions p{margin:0;color:#708078;font-size:.67rem;line-height:1.4}
.fleet-plan-result{margin-top:18px;padding-top:17px;border-top:1px solid #dfe7e1}
.fleet-plan-result>header{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:12px}
.fleet-plan-result h3,.fleet-plan-result p{margin:0}
.fleet-plan-result h3{color:#18352a;font-size:1rem}
.fleet-plan-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.fleet-result-card{overflow:hidden;border:1px solid #dce5df;border-radius:11px;background:#fbfcfb}
.fleet-result-card>header{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:11px 12px;border-bottom:1px solid #e3eae5;background:#f1f7f3}
.fleet-result-card h4,.fleet-result-card p{margin:0}
.fleet-result-card h4{color:#244737;font-size:.76rem}
.fleet-result-card p{margin-top:2px;color:#718078;font-size:.59rem}
.fleet-result-card>header>strong{color:#17633f;font-size:.67rem;white-space:nowrap}
.fleet-result-card ol{display:grid;gap:0;margin:0;padding:7px 10px 9px;list-style:none}
.fleet-result-card li{display:grid;grid-template-columns:22px minmax(0,1fr) auto;gap:7px;align-items:center;padding:7px 0}
.fleet-result-card li+li{border-top:1px solid #edf1ee}
.fleet-result-card li>span{display:grid;width:20px;height:20px;place-items:center;border-radius:50%;background:#e2f0e6;color:#17633f;font-size:.55rem;font-weight:900}
.fleet-result-card li strong,.fleet-result-card li p{display:block;margin:0}
.fleet-result-card li strong{color:#345444;font-size:.64rem}
.fleet-result-card li p,.fleet-result-card li small{color:#7b8982;font-size:.55rem}
.fleet-result-card li small{white-space:nowrap}
.fleet-plan-warnings{margin-bottom:10px;padding:9px 11px;border:1px solid #ead7b9;border-radius:8px;background:#fff8ec;color:#855d28;font-size:.65rem;line-height:1.45}
.fleet-dialog-open{overflow:hidden}
.fleet-vehicle-dialog{position:fixed;z-index:120;inset:0;display:grid;place-items:center;padding:22px}
.fleet-vehicle-dialog[hidden]{display:none}
.fleet-dialog-backdrop{position:absolute;inset:0;width:100%;height:100%;border:0;background:rgba(14,34,24,.58);backdrop-filter:blur(3px)}
.fleet-vehicle-dialog>section{position:relative;z-index:1;width:min(760px,100%);max-height:calc(100vh - 44px);overflow-y:auto;border:1px solid #cfdcd3;border-radius:16px;background:#fff;box-shadow:0 26px 80px rgba(8,30,17,.34)}
.fleet-vehicle-dialog>section>header{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;padding:17px 20px;border-bottom:1px solid #e1e8e3;background:linear-gradient(100deg,#f1f8f3,#fff)}
.fleet-vehicle-dialog h3,.fleet-vehicle-dialog p{margin:0}
.fleet-vehicle-dialog h3{color:#18352a}
.fleet-dialog-close{display:grid;width:32px;height:32px;padding:0;border:1px solid #d1ddd5;border-radius:8px;place-items:center;background:#fff;color:#476253;font-size:1.25rem;cursor:pointer}
.fleet-vehicle-dialog form{padding:18px 20px}
.fleet-dialog-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}
.fleet-dialog-grid textarea{resize:vertical}
.fleet-dialog-check{display:flex!important;flex-direction:row;align-items:flex-start;gap:9px;padding:10px;border:1px solid #dce5df;border-radius:9px;background:#f7faf8}
.fleet-dialog-check input{width:17px!important;height:17px;margin-top:1px;accent-color:#17633f}
.fleet-dialog-check strong,.fleet-dialog-check small{display:block}
.fleet-dialog-check strong{color:#2e503f;font-size:.7rem}
.fleet-dialog-check small{margin-top:2px;color:#75847c;font-size:.59rem}
.fleet-dialog-message{min-height:19px;margin:10px 0 0!important;color:#875b24;font-size:.68rem}
.fleet-vehicle-dialog footer{display:flex;justify-content:flex-end;gap:8px;margin-top:5px;padding-top:14px;border-top:1px solid #edf1ee}

@media (max-width:1150px){
  .fleet-parity-setup{grid-template-columns:1fr}
  .fleet-time-grid{grid-template-columns:repeat(5,minmax(100px,1fr))}
  .fleet-vehicle-manager .fleet-vehicle-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .fleet-desktop-workspace{grid-template-columns:1fr}
  .fleet-vehicle-panel{position:static}
  .fleet-vehicle-list{grid-template-columns:repeat(2,minmax(0,1fr));max-height:none}
}
@media (max-width:850px){
  .fleet-assignment-fields{grid-template-columns:1fr}
  .fleet-time-grid{grid-template-columns:repeat(3,minmax(100px,1fr))}
  .fleet-parity-workspace .tour-result-panel{position:static}
  .fleet-polter-list{max-height:560px}
  .fleet-desktop-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .fleet-desktop-stats article+article{border-left:0}
  .fleet-desktop-stats article:nth-child(even){border-left:1px solid var(--fleet-line)}
  .fleet-desktop-stats article:nth-child(n+3){border-top:1px solid var(--fleet-line)}
  .fleet-desktop-stats article:last-child{grid-column:1/-1}
  .fleet-vehicle-list,.fleet-plan-list{grid-template-columns:1fr}
  .fleet-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:620px){
  .tour-mode-switch button{align-items:flex-start;flex-direction:column;gap:1px}
  .fleet-integrated-intro{align-items:stretch;flex-direction:column}
  .fleet-last-plan,.fleet-plan-result>header,.fleet-planner-actions{align-items:stretch;flex-direction:column}
  .fleet-vehicle-manager>summary{align-items:flex-start;flex-direction:column}
  .fleet-vehicle-manager .fleet-vehicle-list{grid-template-columns:1fr}
  .fleet-time-grid{grid-template-columns:1fr}
  .fleet-map-vehicle-select{grid-template-columns:1fr}
  .fleet-vehicle-picker>div,.fleet-policy-row,.fleet-dialog-grid{grid-template-columns:1fr}
  .fleet-form-grid{grid-template-columns:1fr}
  .fleet-form-grid label.is-wide,.fleet-dialog-grid .is-wide{grid-column:auto}
  .fleet-vehicle-card{grid-template-columns:38px minmax(0,1fr)}
  .fleet-vehicle-icon{width:38px;height:38px}
  .fleet-edit-button{grid-column:2;justify-self:start}
  .fleet-vehicle-dialog{padding:8px}
  .fleet-vehicle-dialog>section{max-height:calc(100vh - 16px)}
}

*{box-sizing:border-box}
html, body {max-width:100%;overflow-x:hidden}
body{margin:0;min-height:100vh;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--text)}
.auth-page{background:#eef4f0}
.auth-shell{min-height:100vh;display:grid;place-items:center;padding:24px}
.auth-panel{width:min(100%,430px);padding:28px;background:#fff;border:1px solid var(--border);box-shadow:0 18px 45px rgba(15,81,50,.12)}
.auth-panel-wide{width:min(100%,520px)}
.auth-brand{display:flex;align-items:center;margin-bottom:30px;padding:4px 0;background:transparent}
.auth-brand img{width:min(240px,100%);height:auto;max-height:64px;object-fit:contain;object-position:left center}
.password-field{position:relative;display:flex;align-items:center}.password-field input{width:100%;padding-right:48px}.password-toggle{position:absolute;right:5px;width:38px;height:34px;border:0;border-radius:8px;background:transparent;color:var(--muted);cursor:pointer;font-size:1.05rem}.password-toggle:hover{background:#eef4f0;color:var(--accent)}
.auth-brand div{display:flex;flex-direction:column}.auth-brand strong{font-size:1.05rem}.auth-brand span{color:var(--muted);font-size:.82rem}
.auth-heading{margin-bottom:22px}.auth-heading h1{margin:0 0 7px;font-size:1.65rem}.auth-heading p{margin-top:0}
.auth-form{display:grid;gap:16px}.auth-form .button{width:100%;margin-top:4px}
.settings-users{display:grid;gap:16px}
.settings-user-create{border:1px solid var(--border);background:#f8faf9}
.settings-user-create summary{cursor:pointer;padding:13px 15px;font-weight:700;list-style:none}
.settings-user-create summary::after{content:'+';float:right}.settings-user-create[open] summary::after{content:'−'}
.settings-user-create .details-content{padding:16px;border-top:1px solid var(--border);background:#fff}
.profile-page-layout{display:grid;grid-template-columns:minmax(260px,340px) minmax(0,1fr);gap:18px}
.profile-identity{display:flex;align-items:center;gap:16px}.profile-identity h3,.profile-identity p{margin:0 0 5px}
.profile-avatar-large{width:64px;height:64px;display:grid;place-items:center;flex-shrink:0;border-radius:50%;background:#e4f2e9;color:#185a35;font-size:1.55rem;font-weight:800}
.profile-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;margin:0}
.profile-details div{padding:13px 0;border-bottom:1px solid var(--border)}.profile-details dt{color:var(--muted);font-size:.8rem}.profile-details dd{margin:4px 0 0;font-weight:700}
@media(max-width:760px){.profile-page-layout,.profile-details{grid-template-columns:1fr}}
.layout{display:grid;grid-template-columns:240px minmax(0,1fr);min-height:100vh;position:relative;transition:grid-template-columns .2s ease}
.sidebar{background:var(--sidebar);color:#fff;padding:24px 12px;display:flex;flex-direction:column;gap:18px;min-width:0;z-index:120;transition:padding .2s ease}
.sidebar-overlay{display:none}
.mobile-menu-toggle{display:none}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.brand{display:flex;align-items:center;gap:12px}
.sidebar-logo{align-items:center;min-width:0}
.sidebar-logo img,
.sidebar-logo .brand-icon{width:160px;height:auto;max-height:48px;display:block;flex-shrink:1;object-fit:contain;object-position:left center}
.sidebar-logo-text{display:flex;flex-direction:column;justify-content:center;min-width:0}
.sidebar-collapse-toggle{width:30px;height:30px;margin-left:auto;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;border:1px solid rgba(255,255,255,.18);border-radius:7px;background:rgba(255,255,255,.08);color:#fff;font-size:1.35rem;line-height:1;cursor:pointer}
.sidebar-collapse-toggle:hover{background:rgba(255,255,255,.16)}
.brand-text h1{margin:0;font-size:1.1rem}
.brand-text p{margin:0;font-size:0.85rem;opacity:0.9}
.nav-menu{flex:1;overflow:auto;padding-right:6px}
.nav-group{background:transparent;border-radius:12px;color:#fff;margin-bottom:12px;border:1px solid rgba(255,255,255,0.08);overflow:hidden}
.nav-group summary{list-style:none;cursor:pointer;padding:12px 14px;border:none;font-weight:700;outline:none;display:flex;align-items:center;gap:8px;background:rgba(255,255,255,0.06);transition:background 0.2s ease, color 0.2s ease}
.nav-group summary::before,.nav-item::before{content:attr(data-icon);display:inline-flex;align-items:center;justify-content:center;width:22px;min-width:22px;height:22px;color:rgba(255,255,255,.92);font-family:"Segoe UI Symbol","Segoe UI",sans-serif;font-size:1.05rem;font-weight:400;line-height:1}
.nav-item[data-icon="polter"]::before{content:"";background:
  radial-gradient(circle at 25% 66%,transparent 0 2.5px,rgba(255,255,255,.92) 3px 4.5px,transparent 5px),
  radial-gradient(circle at 75% 66%,transparent 0 2.5px,rgba(255,255,255,.92) 3px 4.5px,transparent 5px),
  radial-gradient(circle at 50% 28%,transparent 0 2.5px,rgba(255,255,255,.92) 3px 4.5px,transparent 5px)}
.nav-group summary:hover{background:rgba(255,255,255,0.12)}
.nav-group summary::marker{display:none}
.nav-group[open] summary{background:rgba(255,255,255,0.14)}
.nav-group ul{list-style:none;padding:8px 12px;margin:0;background:rgba(255,255,255,0.04)}
.nav-group li{margin-bottom:8px}
.nav-group li:last-child{margin-bottom:0}
.nav-item{display:flex;align-items:center;gap:9px;padding:10px 12px;border-radius:8px;color:#fff;text-decoration:none;font-weight:600;background:transparent;transition:background 0.2s ease}
.nav-item:hover{background:rgba(255,255,255,0.08)}
.nav-item.active{background:rgba(255,255,255,0.18);color:#fff}
.nav-item-long{overflow-wrap:anywhere;line-height:1.3}
.active-group{color:#fff}
.nav-group[open] summary{position:relative}
.nav-group[open] summary::after{content:'▾';font-size:0.9rem;margin-left:auto}
.nav-group summary::after{content:'▸';font-size:0.9rem;margin-left:auto}
.nav-group ul{padding-left:16px}
.sidebar-footer{padding:8px 12px;color:rgba(255,255,255,0.75);font-size:0.85rem}

@media (min-width:901px){
  body.sidebar-collapsed .layout{grid-template-columns:72px minmax(0,1fr)}
  body.sidebar-collapsed .sidebar{padding:24px 9px}
  body.sidebar-collapsed .sidebar-logo{justify-content:center}
  body.sidebar-collapsed .sidebar-logo img{display:none}
  body.sidebar-collapsed .sidebar-logo-text,
  body.sidebar-collapsed .sidebar-footer{display:none}
  body.sidebar-collapsed .sidebar-collapse-toggle{margin:0}
  body.sidebar-collapsed .nav-menu{padding-right:0;overflow:visible}
  body.sidebar-collapsed .nav-group{border:0;margin-bottom:7px;overflow:visible}
  body.sidebar-collapsed .nav-group summary{justify-content:center;width:48px;height:46px;padding:0;font-size:0;border-radius:8px}
  body.sidebar-collapsed .nav-group summary::before{width:24px;min-width:24px;height:24px;font-size:1.25rem}
  body.sidebar-collapsed .nav-group summary::after,
  body.sidebar-collapsed .nav-group ul{display:none}
  body.sidebar-collapsed .nav-group summary.active-group{background:rgba(255,255,255,.18)}
}

.main-content{padding:28px 36px;min-width:0;width:100%}
.page-header{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;margin-bottom:24px}
.eyebrow{margin:0 0 8px;text-transform:uppercase;letter-spacing:0.14em;color:var(--accent);font-size:0.78rem}
.page-header h2{margin:0;font-size:clamp(1.6rem,2.4vw,2.4rem)}

/* Topbar */
.topbar{position:sticky;top:0;z-index:60;background:var(--bg);padding:12px 0}
.topbar-inner{display:flex;gap:16px;align-items:center;min-width:0}
.search-form{position:relative;flex:1;min-width:0}
.search-input-wrap{display:flex;align-items:center;background:var(--card);border:1px solid var(--border);padding:8px 10px;border-radius:10px;box-shadow:var(--shadow)}
.search-icon{margin-right:8px;color:var(--muted);font-size:1rem}
.search-input{flex:1;min-width:0;border:0;background:transparent;padding:8px;font-size:1rem;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.search-input:focus{outline:none}
.assistant-button{background:transparent;border:0;margin-left:8px;cursor:pointer;font-size:1.05rem;flex-shrink:0}
.assistant-button:hover,.assistant-button[aria-expanded="true"]{color:#176b45;background:#e8f4ed;border-radius:8px}
.search-suggestions{position:absolute;top:calc(100% + 7px);right:0;left:0;z-index:120;max-height:min(62vh,430px);overflow-y:auto;background:#fff;border:1px solid var(--border);padding:7px;border-radius:12px;box-shadow:0 18px 42px rgba(15,23,42,.18)}
.search-suggestions[hidden]{display:none}
.global-search-result{display:grid;grid-template-columns:minmax(84px,auto) minmax(0,1fr) auto;align-items:center;gap:11px;padding:10px 11px;border-radius:8px;color:var(--text);text-decoration:none}
.global-search-result:hover,.global-search-result:focus,.global-search-result.is-active{outline:0;background:#edf5ef}
.global-search-result-type{display:inline-flex;align-items:center;justify-content:center;padding:4px 7px;border-radius:999px;background:#e3eee7;color:#27633f;font-size:.72rem;font-weight:800;white-space:nowrap}
.global-search-result-content{display:grid;min-width:0;gap:2px}
.global-search-result-content strong,.global-search-result-content small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.global-search-result-content small{color:var(--muted)}
.global-search-result-meta{color:var(--muted);font-size:.78rem;white-space:nowrap}
.global-search-message{margin:0;padding:13px 11px;color:var(--muted);text-align:center}
.global-search-message.is-loading{color:var(--primary)}

.topbar-actions{display:flex;align-items:center;gap:10px;margin-left:12px;flex-shrink:0}
.icon-btn{background:transparent;border:0;padding:8px;border-radius:8px;cursor:pointer;font-size:1.05rem}
.icon-btn:hover{background:rgba(0,0,0,0.04)}

.profile{position:relative}
.profile-summary{display:flex;align-items:center;gap:8px;cursor:pointer;padding:6px 8px;border-radius:8px}
.avatar{width:36px;height:36px;border-radius:50%;background:var(--card);display:grid;place-items:center;color:var(--sidebar);font-weight:700}
.username{font-weight:700;color:var(--text)}
.profile[open] .profile-summary{background:rgba(0,0,0,0.03)}
.profile-menu{position:absolute;right:0;top:48px;background:#fff;border:1px solid var(--border);box-shadow:var(--shadow);padding:8px;border-radius:8px;min-width:160px}
.profile-menu a{display:block;padding:8px 10px;color:var(--text);text-decoration:none}
.profile-menu a:hover{background:var(--card-2)}
.profile-logout-form{margin:0}.profile-logout-form button{display:block;width:100%;padding:8px 10px;border:0;background:transparent;color:var(--text);font:inherit;text-align:left;cursor:pointer}.profile-logout-form button:hover{background:var(--card-2)}

/* Make sure main content doesn't hide behind sticky topbar: add spacing */
.main-content > .topbar + * {margin-top:12px}

@media (max-width:900px){
  body.sidebar-open{overflow:hidden}

  .layout{grid-template-columns:1fr}

  .sidebar{
    position:fixed;
    inset:0 auto 0 0;
    width:min(82vw,320px);
    max-width:320px;
    height:100vh;
    overflow-y:auto;
    transform:translateX(-100%);
    transition:transform .22s ease;
    box-shadow:0 18px 40px rgba(15,23,42,0.24);
  }

  .sidebar-collapse-toggle{display:none}

  body.sidebar-open .sidebar{transform:translateX(0)}

  .sidebar-overlay{
    position:fixed;
    inset:0;
    border:0;
    padding:0;
    margin:0;
    background:rgba(15,23,42,0.42);
    z-index:110;
    cursor:pointer;
  }

  body.sidebar-open .sidebar-overlay{display:block}

  .mobile-menu-toggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:44px;
    height:44px;
    border:1px solid var(--border);
    border-radius:10px;
    background:#fff;
    color:var(--text);
    font-size:1.25rem;
    cursor:pointer;
    flex-shrink:0;
  }

  .main-content{padding:18px 20px 28px}
  .topbar{padding:8px 0 14px}
  .topbar-inner{align-items:center}
  .search-suggestions{max-height:min(58vh,360px)}
  .page-header{flex-direction:column;align-items:flex-start}
  .page-header > div:last-child{width:100%}
  .cards-grid{grid-template-columns:1fr}
  .sidebar-logo img{width:156px;max-height:44px}
}

.cards-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.info-card{padding:20px;border-radius:12px;background:var(--card);border:1px solid var(--border);box-shadow:var(--shadow)}
.info-card h3{margin:0 0 8px;font-size:1.05rem}
.info-card p{margin:0;color:var(--muted);line-height:1.6}

.button{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:10px 14px;border-radius:10px;border:1px solid var(--button-border);background:#fff;color:var(--text);box-shadow:0 2px 6px rgba(15,23,42,.09);font:inherit;font-weight:700;line-height:1.2;text-align:center;text-decoration:none;cursor:pointer;transition:transform .15s ease,background-color .15s ease,border-color .15s ease,box-shadow .15s ease}
.button:hover{transform:translateY(-1px);border-color:var(--button-border-hover);background:#f3f7f4;box-shadow:0 5px 12px rgba(15,23,42,.13)}
.button:focus-visible{outline:3px solid rgba(22,101,52,.24);outline-offset:2px;border-color:var(--accent)}
.button-primary{background:var(--accent);color:#fff;border-color:#0f5132;box-shadow:0 8px 20px rgba(16,78,43,0.16)}
.button-primary:hover{background:#0f5a2d;border-color:#0a4422}
.button.is-disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.button-danger{background:#dc2626;color:#fff;border-color:#991b1b;box-shadow:0 8px 20px rgba(127,29,29,0.18)}
.button-danger:hover{background:#b91c1c;border-color:#7f1d1d}
.page-actions-equal{display:flex;flex-wrap:wrap;gap:10px;min-width:min(100%,630px)}
.page-actions-equal > .button,.page-actions-equal > form{flex:1 1 190px}
.page-actions-equal > form{display:flex;margin:0}
.page-actions-equal > form > .button{width:100%;height:100%}

.contract-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.contract-choice-card h4 {
  margin: 0 0 10px;
}

.contract-checkbox-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contract-checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

.contract-checkbox-pill input {
  margin: 0;
}

.discount-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.discount-row {
  display: grid;
  gap: 6px;
}

.discount-row label {
  font-weight: 700;
  color: var(--muted);
}

.tree-table-card {
  margin-top: 12px;
}

.table-input {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 0.94rem;
}

.table-input:focus {
  outline: none;
  border-color: rgba(22, 163, 74, 0.8);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.14);
}

.length-picker {
  display: grid;
  gap: 12px;
}

.length-custom-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.length-custom-toolbar input {
  flex: 0 1 180px;
}

.length-custom-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.length-custom-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.length-custom-row input {
  flex: 1;
}

.price-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 8px;
}

.price-row-remove {
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  border-radius: 999px;
  font-size: 1rem;
  line-height: 1;
}

.price-row-remove.button-danger {
  box-shadow: none;
}

.price-row-remove:hover {
  transform: translateY(-1px);
}

.price-row-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
}

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

  .discount-grid {
    grid-template-columns: 1fr;
  }

  .length-custom-toolbar {
    align-items: stretch;
  }

  .length-custom-toolbar input {
    flex-basis: 100%;
  }
}

.form-card{padding:20px;border-radius:12px;background:var(--card);border:1px solid var(--border);box-shadow:var(--shadow);max-width:1100px;min-width:0}

.accordion-section{border:1px solid var(--border);border-radius:10px;background:var(--card-2);overflow:hidden;margin-bottom:12px}
.accordion-section summary{list-style:none;padding:12px 14px;cursor:pointer;display:flex;justify-content:space-between;align-items:center;color:var(--text);font-weight:700;border-radius:8px}
.accordion-section summary::-webkit-details-marker{display:none}
.accordion-section summary::after{content:'+';font-size:1.1rem;color:var(--muted);transition:transform .15s}
.accordion-section[open] summary::after{content:'−'}
.details-content{padding:12px 14px;border-top:1px solid var(--border)}

.form-row {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.form-row label {
  font-size: 0.95rem;
  color: var(--muted);
}

.form-row input,.form-row textarea,.form-row select{width:100%;padding:10px 12px;border-radius:8px;border:1px solid var(--border);background:#fff;color:var(--text);font-size:0.98rem}

.form-row textarea {
  resize: vertical;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: none;
  border-color: rgba(22, 163, 74, 0.8);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.14);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}

.field-grid .full-width {
  grid-column: 1 / -1;
}

.arbeitszeit-form-card{max-width:none}
.page-intro{margin:6px 0 0;color:var(--muted)}
.arbeitszeit-message{padding:12px 14px;margin:0 0 14px;border-radius:10px;font-weight:700}
.arbeitszeit-message.is-success{background:#ecfdf3;color:#166534;border:1px solid #bbf7d0}
.arbeitszeit-message.is-error{background:#fff1f2;color:#9f1239;border:1px solid #fecdd3}
.arbeitszeit-section-heading,.arbeitszeit-section-heading>div,.arbeitszeit-table-heading{display:flex;align-items:center;justify-content:space-between;gap:14px}
.arbeitszeit-section-heading h3,.arbeitszeit-section-heading p,.arbeitszeit-table-heading h3,.arbeitszeit-table-heading p{margin:0}
.arbeitszeit-section-heading p{margin-top:3px;color:var(--muted);font-size:.9rem}
.arbeitszeit-step{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:10px;background:#e8f5ed;color:#166534;font-weight:800}
.arbeitszeit-base-grid{margin-top:18px}
.arbeitszeit-base-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.arbeitszeit-base-grid>*{min-width:0}.arbeitszeit-base-grid input,.arbeitszeit-base-grid select{display:block;width:100%;max-width:100%;min-width:0}
.arbeitszeit-mode-switch{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.arbeitszeit-mode-switch label{position:relative;display:grid;gap:3px;padding:13px 14px;border:1px solid var(--border);border-radius:10px;background:#fff;cursor:pointer}
.arbeitszeit-mode-switch input{position:absolute;opacity:0}
.arbeitszeit-mode-switch label:has(input:checked){border-color:#249157;background:#edf8f1;box-shadow:0 0 0 2px rgba(36,145,87,.1)}
.arbeitszeit-mode-switch span{font-weight:800;color:var(--text)}
.arbeitszeit-mode-switch small{color:var(--muted)}
.arbeitszeit-time-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.arbeitszeit-time-fields>*{min-width:0}.arbeitszeit-time-fields input,.arbeitszeit-time-fields select{display:block;width:100%;max-width:100%;min-width:0}
.arbeitszeit-time-fields.is-direct{grid-template-columns:minmax(0,1fr)}
.arbeitszeit-time-fields[hidden]{display:none}
.form-row small{color:var(--muted);line-height:1.35}
.arbeitszeit-divider{height:1px;background:var(--border);margin:24px 0}
.arbeitszeit-rows{display:grid;gap:10px;margin-top:14px}
.arbeitszeit-row{display:flex;align-items:flex-start;gap:8px;padding:12px;border:1px solid var(--border);border-radius:10px;background:#f8faf9}
.arbeitszeit-row-fields{display:grid;grid-template-columns:minmax(190px,1.2fr) minmax(190px,1.2fr) 110px minmax(150px,1fr);gap:10px;flex:1}
.arbeitszeit-row-fields{grid-template-columns:minmax(180px,1.2fr) minmax(180px,1.2fr) minmax(150px,1fr) 110px 105px minmax(120px,.8fr)}
.settings-permissions{border:1px solid var(--border);border-radius:10px;padding:12px}
.settings-module-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 14px}
.settings-user-rights{min-width:180px;margin-bottom:8px}.settings-user-rights>summary{cursor:pointer;font-weight:700}.settings-user-rights form{display:grid;gap:10px;min-width:min(480px,80vw);padding:12px}.settings-user-rights label{display:grid;gap:5px}
.arbeitszeit-row.is-machine .arbeitszeit-row-fields{grid-template-columns:minmax(170px,1fr) minmax(190px,1.2fr) minmax(180px,1.2fr) 125px minmax(150px,1fr)}
.arbeitszeit-row .form-row{margin:0;gap:6px}
.arbeitszeit-row .form-row label{font-size:.78rem;font-weight:700}
.arbeitszeit-remove{border:0;background:transparent;color:#9f1239;font-size:1.35rem;line-height:1;cursor:pointer;padding:8px}
.arbeitszeit-total-bar{display:flex;flex-wrap:wrap;gap:8px 22px;margin-top:18px;padding:12px 14px;border-radius:10px;background:#edf7f0;color:#315443}
.arbeitszeit-total-bar strong{color:#0f5132;margin-left:5px}
.arbeitszeit-table-heading{margin-bottom:8px}
.arbeitszeit-table-heading>span{color:var(--muted);font-size:.9rem}
.arbeitszeit-overview{margin-top:18px}
.arbeitszeit-overview td small{display:block;margin-top:3px;color:var(--muted)}

.harvester-desktop-panel{margin-top:18px;overflow:hidden}
.harvester-desktop-heading{display:flex;align-items:center;justify-content:space-between;gap:14px}
.harvester-desktop-heading p,.harvester-desktop-heading h3{margin:0}
.harvester-desktop-heading>span{color:var(--muted);font-size:.88rem}
.harvester-desktop-grid{display:grid;gap:14px;padding:16px}
.harvester-desktop-card{display:grid;grid-template-columns:minmax(220px,32%) minmax(0,1fr);overflow:hidden;border:1px solid var(--border);border-radius:12px;background:#fff}
.harvester-desktop-image{min-height:210px;background:#edf4ef}
.harvester-desktop-image>a{position:relative;display:block;width:100%;height:100%;min-height:210px;color:#fff}
.harvester-desktop-image img{display:block;width:100%;height:100%;min-height:210px;max-height:340px;object-fit:cover}
.harvester-desktop-image>a>span{position:absolute;right:10px;bottom:10px;padding:6px 9px;border-radius:7px;background:rgba(15,34,24,.76);font-size:.78rem;font-weight:700}
.harvester-desktop-no-image{display:grid;align-content:center;justify-items:center;gap:5px;height:100%;min-height:210px;padding:20px;color:var(--muted);text-align:center;background:linear-gradient(145deg,#eef5f0,#f8faf8)}
.harvester-desktop-no-image>span{font-weight:800;color:#42624e}
.harvester-desktop-content{display:grid;align-content:start;gap:10px;padding:15px}
.harvester-desktop-content>header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.harvester-desktop-content>header p,.harvester-desktop-content>header h4{margin:0}
.harvester-desktop-content>header h4{font-size:1.1rem}
.harvester-desktop-content>header>span{padding:5px 8px;border-radius:7px;background:#edf7f0;color:#166534;font-size:.78rem;font-weight:800}
.harvester-desktop-content table{width:100%;border-collapse:collapse}
.harvester-desktop-content th,.harvester-desktop-content td{padding:8px 7px;border-bottom:1px solid var(--border);text-align:left}
.harvester-desktop-content th{color:var(--muted);font-size:.76rem;text-transform:uppercase;letter-spacing:.03em}
.harvester-desktop-note{margin:0;padding:9px 10px;border-radius:8px;background:#f6f8f6;color:#4d6254;white-space:pre-line}
.harvester-desktop-filename{color:var(--muted);overflow-wrap:anywhere}
.harvester-desktop-empty{padding:28px}

@media (max-width:1100px){
  .arbeitszeit-row-fields,.arbeitszeit-row.is-machine .arbeitszeit-row-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:700px){
  .arbeitszeit-section-heading{align-items:flex-start;flex-direction:column}
  .arbeitszeit-row-fields,.arbeitszeit-row.is-machine .arbeitszeit-row-fields{grid-template-columns:1fr}
  .arbeitszeit-mode-switch,.arbeitszeit-time-fields{grid-template-columns:1fr}
  .harvester-desktop-card{grid-template-columns:1fr}
  .harvester-desktop-heading{align-items:flex-start;flex-direction:column}
}

.linked-polter-fields {
  gap: 8px;
}

.linked-polter-fields select {
  min-height: 150px;
}

.bereitstellung-picker tbody tr.is-selected {
  background: rgba(22, 163, 74, 0.08);
}

.inline-label-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-weight: 700;
  padding: 0;
}

.link-button:hover {
  text-decoration: underline;
}

.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.48);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-panel {
  width: min(980px, 100%);
  max-height: min(88vh, 920px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}

.modal-header,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  margin: 0;
}

.modal-body {
  overflow: auto;
  padding: 20px;
}

.document-action-modal-panel {
  width: min(1080px, 100%);
  max-height: calc(100vh - 48px);
}

.document-action-modal .modal-body.is-loading {
  opacity: 0.58;
  pointer-events: none;
}

.document-action-modal [data-document-action-content] > .page-header {
  margin-bottom: 16px;
}

.document-action-modal [data-document-action-content] > .page-header [data-document-modal-close] {
  display: none;
}

@media (max-width: 760px) {
  .document-action-modal { padding: 8px; }
  .document-action-modal-panel { max-height: calc(100vh - 16px); }
  .document-action-modal .modal-body { padding: 12px; }
}

.modal-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  border-bottom: 0;
  background: #fff;
}

.form-error {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
  font-weight: 700;
}

.filter-panel {
  padding: 20px;
  margin-bottom: 20px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-field label {
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 700;
}

.filter-field input,
.filter-field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 0.95rem;
}

.filter-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.quick-filter-card {
  color: inherit;
  text-decoration: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.quick-filter-card:hover,
.quick-filter-card-active {
  border-color: rgba(16, 78, 43, 0.28);
  box-shadow: 0 12px 30px rgba(16, 78, 43, 0.08);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border: 1px solid #c8d6cc;
  border-radius: 999px;
  background: #e8f0ea;
  font-size: 0.85rem;
  font-weight: 700;
  color: #294b35;
}

.status-inprogress { border-color: transparent; background: #168447; color: #fff; }
.status-planned { border-color: transparent; background: #087fae; color: #fff; }
.status-paused,
.status-warning { border-color: #e7b24a; background: #fff3cf; color: #704600; }
.status-completed { border-color: transparent; background: #12855e; color: #fff; }
.status-error { border-color: #e4b8b8; background: #fbe8e8; color: #8c2727; }

.progress-cell {
  display: grid;
  gap: 6px;
}

.progress-track {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: var(--card-2);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

.progress-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.table-card th,
.table-card td {
  padding: 16px 14px;
  text-align: left;
}

.table-card tbody tr {
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

@media (max-width: 1100px) {
  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .filter-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .field-grid,
  .field-grid .full-width {
    grid-template-columns: 1fr;
    grid-column: auto;
  }

  .button {
    width: 100%;
    padding: 16px 18px;
    font-size: 1rem;
  }

  .form-actions {
    justify-content: stretch;
  }
}
.werksabrechnung-detail-meta { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; margin: 0 0 14px; padding: 9px 14px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.werksabrechnung-detail-meta div { min-width: 0; padding: 1px 12px; border-right: 1px solid var(--border); }
.werksabrechnung-detail-meta div:first-child { padding-left: 0; }
.werksabrechnung-detail-meta div:last-child { border-right: 0; }
.werksabrechnung-detail-meta span { display: block; margin-bottom: 2px; color: var(--muted); font-size: .72rem; }
.werksabrechnung-detail-meta strong { display: block; overflow: hidden; color: var(--text); font-size: .84rem; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 980px) { .werksabrechnung-detail-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 0; } }
@media (max-width: 600px) { .werksabrechnung-detail-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.panel.werksabrechnung-compact-filter { padding: 8px 12px; margin-bottom: 10px; }
.werksabrechnung-compact-filter .filter-grid { display: grid; grid-template-columns: minmax(240px, 1.5fr) minmax(140px, .65fr) minmax(180px, .85fr) auto; gap: 10px; align-items: end; margin: 0; }
.werksabrechnung-compact-filter .form-row { margin: 0; }
.werksabrechnung-compact-filter label { margin-bottom: 3px; font-size: .74rem; }
.werksabrechnung-compact-filter input,
.werksabrechnung-compact-filter select { min-height: 34px; height: 34px; padding-top: 5px; padding-bottom: 5px; }
.werksabrechnung-compact-filter .form-actions { margin: 0; gap: 6px; flex-wrap: nowrap; }
.werksabrechnung-compact-filter .button { min-height: 34px; height: 34px; padding: 0 11px; }
.werksabrechnung-list-table { padding: 10px 14px; }
.werksabrechnung-list-table th { padding-top: 8px; padding-bottom: 8px; font-size: .76rem; }
.werksabrechnung-list-table td { padding-top: 8px; padding-bottom: 8px; }
.werksabrechnung-list-table td p { margin: 2px 0 0; }
.werksabrechnung-list-table .table-actions { display: flex; flex-wrap: nowrap; gap: 5px; }
.werksabrechnung-list-table .table-actions form { margin: 0; }
.werksabrechnung-list-table .button { min-height: 32px; height: 32px; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
@media (max-width: 1050px) { .werksabrechnung-compact-filter .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 650px) { .werksabrechnung-compact-filter .filter-grid { grid-template-columns: 1fr; } .werksabrechnung-compact-filter .form-actions { flex-wrap: wrap; } }

/* Shared compact structure for operational overview pages. */
.tiles-grid.compact-overview-stats { display: flex; align-items: stretch; gap: 0; margin: 0 0 10px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.compact-overview-stats .info-card { flex: 0 1 auto; min-width: 145px; padding: 2px 18px; border: 0; border-right: 1px solid var(--border); border-radius: 0; background: transparent; box-shadow: none; display: flex; align-items: baseline; gap: 7px; }
.compact-overview-stats .info-card:first-child { padding-left: 0; }
.compact-overview-stats .info-card:last-child { border-right: 0; }
.compact-overview-stats .info-card h4 { margin: 0; color: var(--muted); font-size: .73rem; font-weight: 600; white-space: nowrap; }
.compact-overview-stats .info-card p { margin: 0; color: var(--text); font-size: .9rem; font-weight: 750; white-space: nowrap; }
.form-card.filter-panel.compact-overview-filter { max-width: 100%; margin: 0 0 10px; padding: 8px 12px; }
.compact-overview-filter .filter-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px 10px; margin: 0; }
.compact-overview-filter .filter-field,
.compact-overview-filter .form-row { margin: 0; }
.compact-overview-filter label { margin-bottom: 3px; font-size: .73rem; }
.compact-overview-filter input,
.compact-overview-filter select { min-height: 34px; height: 34px; padding-top: 5px; padding-bottom: 5px; }
.compact-overview-filter .filter-actions,
.compact-overview-filter .form-actions { margin: 8px 0 0; gap: 6px; }
.compact-overview-filter .button { min-height: 34px; height: 34px; padding: 0 11px; display: inline-flex; align-items: center; justify-content: center; }
.table-card.compact-overview-table { padding: 9px 12px; }
.compact-overview-table th { padding-top: 7px; padding-bottom: 7px; font-size: .75rem; }
.compact-overview-table td { padding-top: 7px; padding-bottom: 7px; }
.compact-overview-table td p,
.compact-overview-table td .muted { margin-top: 2px; margin-bottom: 0; }
.compact-overview-table .button { min-height: 32px; height: 32px; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
@media (max-width: 760px) {
  .tiles-grid.compact-overview-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 0; }
  .compact-overview-stats .info-card { min-width: 0; padding: 2px 10px; border-right: 0; }
  .compact-overview-stats .info-card:nth-child(odd) { padding-left: 0; border-right: 1px solid var(--border); }
  .compact-overview-filter .filter-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1150px) and (min-width: 761px) { .compact-overview-filter .filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.table-card table {
  width: 100%;
  border-collapse: collapse;
}

.katalog-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 10px;
}

.katalog-section-header h3 {
  margin: 0;
  font-size: 1.15rem;
}

.katalog-actions {
  white-space: nowrap;
  display: flex;
  gap: 8px;
}

.inline-form {
  display: inline-block;
}

.katalog-checkbox-field {
  justify-content: flex-end;
}

.katalog-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
}

.katalog-input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 0.94rem;
}

.katalog-input:focus {
  outline: none;
  border-color: rgba(22, 163, 74, 0.8);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.14);
}
.katalog-werksgueten-field { min-width: 280px; }
.katalog-werksgueten-input { min-width: 260px; }

.katalog-filter-grid {
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
}

@media (max-width: 1100px) {
  .katalog-filter-grid {
    grid-template-columns: 1fr;
  }

  .katalog-actions {
    flex-wrap: wrap;
  }

  .katalog-checkbox-field {
    justify-content: flex-start;
  }
}

/* Structural parity for legacy desktop modules */
.desktop-page-shell {
  width: 100%;
}

.modern-kpi-grid-auto {
  grid-template-columns: repeat(var(--modern-kpi-count, 4), minmax(0, 1fr));
}

.modern-kpi-card .modern-kpi-value {
  display: block;
  margin: 2px 0 0;
  color: var(--modern-ink);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.05;
  white-space: nowrap;
}

.desktop-collapsible-filter > .desktop-filter-toggle.modern-section-heading {
  display: flex;
  min-height: 62px;
  padding: 14px 17px;
  border: 0;
  border-bottom: 1px solid #e9efeb;
  border-radius: 0;
  box-shadow: none;
}

.desktop-collapsible-filter > .desktop-filter-toggle::before,
.desktop-collapsible-filter > .desktop-filter-toggle::after {
  display: none;
}

.desktop-filter-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.desktop-filter-heading > span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.desktop-filter-heading strong {
  color: #18352a;
  font-size: .92rem;
}

.desktop-filter-heading small {
  overflow: hidden;
  color: #74837b;
  font-size: .69rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desktop-collapsible-filter.is-collapsed > .desktop-filter-toggle {
  border-bottom-color: transparent;
}

.desktop-collapsible-filter.is-collapsed .modern-filter-toggle i {
  transform: rotate(45deg) translateY(-2px);
}

.desktop-collapsible-filter:not(.is-collapsed) .modern-filter-toggle i {
  transform: rotate(225deg) translate(-1px, -1px);
}

.desktop-generated-table-heading {
  min-height: 72px;
}

.desktop-page-shell > .table-card,
.desktop-page-shell > .form-card,
.desktop-page-shell > .panel {
  margin-bottom: 16px;
}

.desktop-page-shell > .compact-overview-table.modern-table-card {
  margin-bottom: 0;
}

@media (max-width: 1180px) {
  .modern-kpi-grid-auto {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modern-kpi-grid-auto .modern-kpi-card:nth-child(2n) {
    border-right: 0;
  }

  .modern-kpi-grid-auto .modern-kpi-card:nth-child(n+3) {
    border-top: 1px solid var(--modern-line);
  }
}

@media (max-width: 600px) {
  .desktop-filter-heading small {
    display: none;
  }

  .modern-kpi-grid-auto {
    grid-template-columns: 1fr;
  }

  .modern-kpi-grid-auto .modern-kpi-card,
  .modern-kpi-grid-auto .modern-kpi-card:nth-child(2n) {
    border-right: 0;
    border-top: 1px solid var(--modern-line);
  }

  .modern-kpi-grid-auto .modern-kpi-card:first-child {
    border-top: 0;
  }
}

.table-card {
  overflow-x: auto;
}

.table-card th,
.table-card td {
  padding: 18px 16px;
  text-align: left;
}

.table-card thead{background:transparent}

.table-card th {
  font-weight: 600;
  color: var(--text);
}

.table-card tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.empty-state {
  text-align: center;
  color: var(--muted);
}

/* Tiles grid for Maßnahmen overview */
.tiles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 20px;
}
.tile .panel-body { min-height: 88px; }

@media (max-width: 1100px) {
  .tiles-grid { grid-template-columns: repeat(2, 1fr); }
}

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

/* E‑Mail module styles */
.email-layout{display:grid;grid-template-columns:220px 1fr 420px;gap:18px;margin-top:8px}

.folders {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
}

.folders ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.folders li {
  padding: 12px 10px;
  border-radius: 10px;
  color: var(--muted);
  margin-bottom: 6px;
  cursor: pointer;
}

.folders li.active,
.folders li:hover {
  background: rgba(22,163,74,0.12);
  color: var(--text);
}

.email-list {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.email-list .list-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--card-2);
}

.email-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.email-item {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(15,23,42,0.06);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.email-item .meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.9rem;
}

.email-item .subject {
  font-weight: 600;
}

.email-item.empty {
  text-align: center;
  color: var(--muted);
  padding: 24px;
}

.email-preview {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.preview-header h3 { margin: 0 0 6px 0; }
.preview-header .muted { color: var(--muted); margin: 0; }
.preview-body { margin-top: 12px; color: var(--text); }

@media (max-width: 1100px) {
  .email-layout { grid-template-columns: 180px 1fr 360px; }
}

@media (max-width: 900px) {
  .email-layout { grid-template-columns: 1fr; }
  .folders, .email-list, .email-preview { width: 100%; }
  .email-list { order: 2; }
  .email-preview { order: 3; }
  .folders { order: 1; }
}

.email-onboarding{max-width:760px;border:1px solid var(--border);background:#fff;padding:24px;box-shadow:var(--shadow)}
.email-onboarding-copy h3{margin:0 0 8px;font-size:1.25rem}
.email-provider-list{margin-top:22px;border-top:1px solid var(--border)}
.email-provider-row{display:grid;grid-template-columns:40px minmax(0,1fr) auto;gap:12px;align-items:center;padding:15px 0;border-bottom:1px solid var(--border)}
.email-provider-row p{margin:3px 0 0}
.email-provider-icon{width:36px;height:36px;display:grid;place-items:center;border:1px solid var(--border);border-radius:6px;background:var(--card);font-weight:800;color:var(--accent)}
.email-security-note{margin-top:20px;padding:14px 16px;border-left:3px solid #2f855a;background:#f3faf6}
.email-security-note p{margin:5px 0 0}
.email-workspace{display:grid;grid-template-columns:235px minmax(300px,420px) minmax(360px,1fr);min-height:calc(100vh - 150px);border:1px solid var(--border);background:#fff}
.email-folders{max-height:calc(100vh - 150px);padding:12px;border-right:1px solid var(--border);background:#f8faf9;overflow-y:auto}
.email-folder{width:100%;display:flex;align-items:center;justify-content:space-between;padding:10px;border:0;border-radius:6px;background:transparent;color:var(--text);font:inherit;text-align:left;text-decoration:none;cursor:pointer}
.email-folder:hover,.email-folder.active{background:#e8f3ec;color:#174d2c}
.email-account-section{margin-top:10px;padding-top:10px;border-top:1px solid var(--border)}.email-account-section-all{margin-top:0;padding-top:0;border-top:0}.email-account-heading{display:flex;align-items:center;gap:9px;min-width:0;margin:0 4px 5px;color:var(--text);list-style-position:outside;cursor:pointer}.email-account-heading>div{display:flex;min-width:0;flex-direction:column;gap:1px}.email-account-heading strong,.email-account-heading small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.email-account-heading strong{font-size:.82rem}.email-account-heading small{color:var(--muted);font-size:.68rem}.email-account-avatar{display:grid;flex:0 0 28px;width:28px;height:28px;place-items:center;border:1px solid #c9ded0;border-radius:5px;background:#edf6f0;color:#215c37;font-size:.76rem;font-weight:800}.email-account-section summary::marker{color:var(--muted);font-size:.7rem}.email-account-folders{padding-left:12px}.email-account-folders .email-folder{padding:7px 9px;font-size:.8rem}.email-account-controls{display:flex;flex-direction:column;align-items:flex-start;gap:5px;margin:6px 9px 2px}.email-account-controls form{margin:0}
.email-folder-heading{margin:18px 10px 5px;color:var(--muted);font-size:.75rem;font-weight:700;text-transform:uppercase}
.email-folder-create{margin-top:10px}.email-folder-create summary{padding:8px 10px;color:var(--accent);font-size:.82rem;font-weight:700;cursor:pointer}.email-folder-create form{display:grid;gap:7px;padding:8px}.email-folder-create input,.email-folder-create select{width:100%;min-width:0;padding:8px;border:1px solid var(--border);border-radius:5px}
.email-account-list{margin-top:24px;padding-top:14px;border-top:1px solid var(--border)}
.email-account-list div{display:flex;flex-direction:column;gap:3px;margin-top:10px;overflow-wrap:anywhere}
.email-account-list small{color:var(--muted)}
.email-sync-button{padding:0;border:0;background:transparent;color:var(--accent);font:inherit;font-size:.78rem;font-weight:700;text-align:left;cursor:pointer}
.email-message-list{border-right:1px solid var(--border);overflow:auto}
.email-list-toolbar{position:sticky;top:0;z-index:2;display:flex;gap:12px;align-items:center;justify-content:space-between;padding:13px 14px;border-bottom:1px solid var(--border);background:#fff}
.email-list-toolbar div{display:flex;flex-direction:column;gap:2px}
.email-list-toolbar small{color:var(--muted)}
.email-list-toolbar input{width:180px;min-width:0;padding:8px 10px;border:1px solid var(--border);border-radius:6px}
.email-message-row{display:block;padding:14px;border-bottom:1px solid var(--border);color:var(--text);text-decoration:none;cursor:pointer}
.email-message-row:hover{background:#f7faf8}
.email-message-row.unread{border-left:3px solid #2f855a;background:#f5faf7}
.email-message-row.selected{background:#eaf4ed}
.email-message-meta{display:flex;justify-content:space-between;gap:10px;font-size:.83rem}
.email-message-meta time{color:var(--muted);white-space:nowrap}
.email-message-row h4{margin:7px 0 4px;font-size:.95rem}
.email-message-row p{margin:0;color:var(--muted);font-size:.85rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.email-message-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}
.email-message-tags span{padding:3px 6px;border-radius:4px;background:#e8f3ec;color:#245c38;font-size:.72rem;font-weight:700}
.email-message-tags .email-account-tag{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#eef1f3;color:#46545d}
.email-reader{display:grid;place-items:center;min-width:0}
.email-reader:has(.email-reader-content){display:block;place-items:initial;overflow:auto}
.email-reader-content{padding:22px;min-width:0}.email-reader-content header{display:flex;justify-content:space-between;gap:18px;padding-bottom:15px;border-bottom:1px solid var(--border)}
.email-reader-content h3{margin:0 0 9px;font-size:1.2rem}.email-reader-content header p{margin:0 0 4px}.email-reader-content header small,.email-reader-content header time{color:var(--muted)}
.email-received-account{display:block;width:max-content;max-width:100%;margin-top:7px;padding:3px 6px;border-radius:4px;background:#eef1f3;color:#46545d;font-size:.72rem;font-weight:700;overflow-wrap:anywhere}
.email-reader-actions{display:flex;flex-wrap:wrap;gap:8px;margin:15px 0}.email-reader-actions form{display:flex;flex-wrap:wrap;gap:8px}.email-move-form{display:flex;gap:8px;margin-bottom:14px}.email-move-form select{min-width:160px;padding:8px;border:1px solid var(--border);border-radius:6px}.email-body{margin:0;min-height:220px;white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;line-height:1.55;color:var(--text)}
.email-attachments{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:22px;padding-top:14px;border-top:1px solid var(--border)}
.email-attachments a{padding:8px 10px;border:1px solid var(--border);border-radius:6px;color:var(--text);text-decoration:none;background:var(--card)}.email-attachments small{color:var(--muted)}
.email-composer{position:fixed;right:24px;bottom:0;z-index:180;width:min(520px,calc(100vw - 32px));background:#fff;border:1px solid rgba(15,23,42,.15);box-shadow:0 18px 55px rgba(15,23,42,.24)}
.email-header-actions,.email-connect-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.email-account-item{position:relative}.email-access-badge{display:inline-flex;width:max-content;margin-top:5px;padding:2px 7px;border-radius:999px;background:#fff3cd;color:#7a4d00;font-size:.68rem;font-weight:700}.email-access-badge.is-safe{background:#e5f5eb;color:#176138}.email-readonly-note{display:flex;gap:8px;align-items:center;margin:12px 0;padding:10px 12px;border:1px solid #b8dfc6;background:#f0faf4;color:#176138;font-size:.8rem}.email-readonly-note span{color:#3f6850}
.email-agent-folders{margin:11px 0;padding:10px 0;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}.email-agent-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 5px 7px}.email-agent-heading>div{display:flex;min-width:0;flex-direction:column}.email-agent-heading strong{font-size:.78rem}.email-agent-heading small{color:var(--muted);font-size:.66rem}.email-agent-heading form{margin:0}.email-agent-heading button{padding:3px 6px;border:1px solid #b9d2c1;border-radius:4px;background:#edf6f0;color:#215c37;font:inherit;font-size:.67rem;font-weight:700;cursor:pointer}.email-agent-heading button:hover{background:#e0f0e5}.email-agent-tree>summary{display:flex;align-items:center;justify-content:space-between;padding:7px 9px;border-radius:5px;color:var(--text);font-size:.8rem;cursor:pointer}.email-agent-tree>summary:hover{background:#e8eeea}.email-agent-tree>summary strong{color:var(--muted);font-size:.7rem}.email-agent-child{margin-left:12px;width:calc(100% - 12px);padding-top:6px;padding-bottom:6px;font-size:.76rem}.email-message-tags .email-agent-tag{background:#e9f0f7;color:#355b78}.email-agent-decision{display:inline-flex;width:max-content;max-width:100%;margin:6px 0 0 6px;padding:3px 6px;border-radius:4px;background:#e9f0f7;color:#355b78;font-size:.7rem;font-weight:700;overflow-wrap:anywhere}
.email-agent-subtree{margin-left:12px}.email-agent-subtree>summary{display:flex;align-items:center;justify-content:space-between;padding:6px 9px;border-radius:5px;color:var(--text);font-size:.76rem;cursor:pointer}.email-agent-subtree>summary:hover{background:#e8eeea}.email-agent-subtree>summary strong{color:var(--muted);font-size:.68rem}.email-agent-grandchild{margin-left:12px;width:calc(100% - 12px);padding-top:5px;padding-bottom:5px;font-size:.72rem}
.email-hide-account{color:#6b7280}.email-hidden-accounts{margin:10px 4px 0;padding-top:9px;border-top:1px solid var(--border)}.email-hidden-accounts>summary{display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:.72rem;font-weight:700;cursor:pointer}.email-hidden-account{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:7px 2px 2px 8px}.email-hidden-account span{min-width:0;overflow:hidden;color:var(--muted);font-size:.68rem;text-overflow:ellipsis;white-space:nowrap}.email-hidden-account form{margin:0}.email-hidden-account button{padding:3px 6px;border:1px solid var(--border);border-radius:4px;background:#fff;color:var(--text);font:inherit;font-size:.66rem;cursor:pointer}
.email-agent-correction{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin:10px 28px;padding:8px 10px;border:1px solid #d5e1e8;background:#f7fafc}.email-agent-correction label{color:#355b78;font-size:.72rem;font-weight:700;white-space:nowrap}.email-agent-correction select{min-width:150px;max-width:260px;padding:6px 8px;border:1px solid var(--border);border-radius:5px;background:#fff;font:inherit;font-size:.76rem}.email-agent-correction .button{padding:6px 8px;font-size:.72rem}
.email-appbar{display:flex;align-items:center;justify-content:space-between;min-height:48px;margin-bottom:10px}.email-app-title{display:flex;align-items:baseline;gap:10px}.email-app-title h2{margin:0;font-size:1.2rem}.email-app-title span{color:var(--muted);font-size:.78rem}.email-connect-button{padding:7px 10px;font-size:.8rem}.email-new-message{display:flex;width:100%;align-items:center;justify-content:center;gap:7px;margin-bottom:14px;padding:9px 10px}.email-new-message span{font-size:1.1rem;line-height:1}
.email-workspace{min-height:0;height:auto;overflow:hidden;box-shadow:0 1px 2px rgba(15,23,42,.04)}.email-folders{min-height:0;max-height:none;height:100%;background:#f4f6f5}.email-message-list,.email-reader{min-height:0;height:100%;background:#fff}.email-account-section{margin-top:8px;padding-top:8px}.email-account-heading{margin-bottom:3px}.email-account-heading strong{font-size:.78rem}.email-folder{padding:7px 9px;font-size:.8rem}.email-folder.active{box-shadow:inset 3px 0 #2f855a}.email-folder-heading{margin-top:10px}.email-account-controls{padding:4px 0 7px}
.email-list-toolbar{display:grid;grid-template-columns:minmax(0,1fr) 116px;min-height:58px;padding:9px 12px;background:#fafbfa}.email-list-title{min-width:0}.email-list-title strong{font-size:.96rem}.email-list-title small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.email-list-toolbar input{width:116px;padding:7px 9px;background:#fff}
.email-message-row{display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;min-height:102px;padding:11px 12px;border-left:3px solid transparent}.email-message-row.unread{border-left-color:#2f855a;background:#fbfdfb}.email-message-row.selected{border-left-color:#256d42;background:#e9f2ec}.email-message-content{min-width:0}.email-sender-avatar{display:grid;width:32px;height:32px;place-items:center;border-radius:50%;background:#dfe7e2;color:#315842;font-size:.72rem;font-weight:800}.email-message-meta{align-items:baseline}.email-message-meta strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.83rem}.email-message-meta time{font-size:.68rem}.email-message-row h4{margin:4px 0 2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.84rem;font-weight:600}.email-message-row.unread h4,.email-message-row.unread .email-message-meta strong{font-weight:800}.email-message-row p{font-size:.76rem}.email-message-tags{margin-top:6px}.email-message-tags span{padding:2px 5px;font-size:.64rem;font-weight:600}
.email-reader{align-items:stretch}.email-reader-content{min-height:100%;padding:0}.email-reader-toolbar{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:6px;min-height:48px;padding:7px 18px;border-bottom:1px solid var(--border);background:#fafbfa}.email-reader-toolbar form{display:flex;gap:6px}.email-reader-toolbar .button{padding:6px 9px;font-size:.76rem}.email-reader-back{display:none;width:30px;height:30px;place-items:center;border-radius:4px;color:var(--text);font-size:1.6rem;line-height:1;text-decoration:none}.email-reader-back:hover{background:#e8eeea}.email-reader-content .email-reader-header{display:grid;grid-template-columns:40px minmax(0,1fr) auto;gap:12px;margin:0 28px;padding:22px 0 18px;border-bottom:1px solid var(--border)}.email-sender-avatar-large{width:40px;height:40px;font-size:.85rem}.email-reader-header>div{min-width:0}.email-reader-content .email-reader-header h3{margin:0 0 12px;font-size:1.18rem;line-height:1.3}.email-reader-content .email-reader-header p{margin:0 0 3px;font-size:.82rem}.email-reader-header p span,.email-reader-header small,.email-reader-header time{color:var(--muted);font-size:.75rem}.email-reader-header time{max-width:150px;text-align:right}.email-received-account{margin-top:6px}.email-reader-content .email-readonly-note{margin:12px 28px}.email-reader-content .email-move-form{margin:12px 28px}.email-reader-content .email-body{margin:0 28px;padding:24px 0 40px;line-height:1.62}.email-reader-content .email-attachments{margin:0 28px 24px}.email-reader .empty-state{align-self:center}
.email-reader-toolbar .email-invoice-detected{border-color:#b8dfc4;background:#e4f5e9;color:#176b39}
.email-conversation-header .email-thread-count{display:grid;width:40px;height:40px;place-items:center;border-radius:50%;background:#e2e9e4;color:#2d5b3d;font-size:.85rem;font-weight:800}.email-conversation-header p{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.email-thread{display:grid;gap:9px;padding:10px 28px 32px}.email-thread-message{border:1px solid var(--border);border-left:3px solid #8392a0;border-radius:6px;background:#fff;overflow:hidden}.email-thread-message.is-outgoing{border-left-color:#2f855a}.email-thread-message[open]{box-shadow:0 2px 8px rgba(15,23,42,.06)}.email-thread-message summary{display:grid;grid-template-columns:32px minmax(0,1fr) auto;gap:10px;align-items:center;min-height:62px;padding:10px 12px;cursor:pointer;list-style:none}.email-thread-message summary::-webkit-details-marker{display:none}.email-thread-message summary>div{display:grid;grid-template-columns:auto 1fr;gap:2px 7px;align-items:center;min-width:0}.email-thread-message summary strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.82rem}.email-thread-message summary small{grid-column:1/-1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:.7rem}.email-thread-message summary time{color:var(--muted);font-size:.68rem;white-space:nowrap}.email-thread-direction{width:max-content;padding:2px 6px;border-radius:4px;background:#edf1f4;color:#52616c;font-size:.64rem;font-weight:700}.email-thread-message.is-outgoing .email-thread-direction{background:#e4f3e9;color:#23623a}.email-thread-message.is-outgoing .email-sender-avatar{background:#dceee2;color:#23623a}.email-thread-content{padding:0 14px 16px 54px;border-top:1px solid #edf0ee}.email-thread-routing{padding:9px 0;color:var(--muted);font-size:.7rem}.email-thread-content pre{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:.84rem;line-height:1.6;color:var(--text)}.email-thread-content .email-attachments{margin:16px 0 0;padding-top:10px}
.email-quoted-content{margin-top:14px;padding-top:10px;border-top:1px dashed var(--border)}.email-quoted-content summary{display:block;min-height:0;padding:3px 0;color:var(--muted);font-size:.72rem;font-weight:700;cursor:pointer}.email-quoted-content pre{margin-top:10px;padding-left:10px;border-left:2px solid #dce3df;color:var(--muted);font-size:.75rem}
.email-composer[hidden]{display:none}.email-composer>header{display:flex;align-items:center;justify-content:space-between;padding:11px 14px;background:#174d2c;color:#fff}.email-composer>header button{border:0;background:transparent;color:#fff;font-size:1.3rem;cursor:pointer}
.email-composer form{display:grid}.email-composer input,.email-composer select,.email-composer textarea{width:100%;border:0;border-bottom:1px solid var(--border);border-radius:0;padding:11px 13px;font:inherit}.email-composer textarea{min-height:220px;resize:vertical;border-bottom:0}.email-composer input:focus,.email-composer select:focus,.email-composer textarea:focus{outline:2px solid rgba(47,133,90,.2);outline-offset:-2px}
.email-format-toolbar{display:flex;gap:2px;padding:6px 10px;border-bottom:1px solid var(--border)}.email-format-toolbar button{min-width:30px;height:30px;padding:0 7px;border:0;border-radius:4px;background:transparent;color:var(--text);cursor:pointer}.email-format-toolbar button:hover{background:var(--card-2)}
.email-rich-editor{min-height:210px;max-height:42vh;padding:12px 13px;overflow:auto;line-height:1.5;border-bottom:1px solid var(--border)}.email-rich-editor:empty::before{content:attr(data-placeholder);color:var(--muted)}.email-rich-editor:focus{outline:2px solid rgba(47,133,90,.2);outline-offset:-2px}.email-rich-editor.is-dragging{background:#eef8f1;outline:2px dashed #2f855a}
.email-compose-attachments{display:flex;align-items:center;gap:10px;min-height:46px;padding:7px 13px;border-bottom:1px solid var(--border)}.email-compose-attachments .button{padding:7px 9px;white-space:nowrap}.email-compose-attachments div{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.email-compose-copy summary{padding:7px 13px;color:var(--accent);font-size:.8rem;cursor:pointer}.email-composer footer{display:flex;justify-content:flex-start;padding:10px 13px;border-top:1px solid var(--border)}
@media(min-width:761px){body:has(.email-workspace){height:100vh;overflow:hidden}body:has(.email-workspace) .layout{height:100vh;min-height:0}body:has(.email-workspace) .main-content{display:flex;height:100vh;min-height:0;flex-direction:column;overflow:hidden}body:has(.email-workspace) .main-content>.topbar{flex:0 0 auto}body:has(.email-workspace) .email-appbar{flex:0 0 auto}body:has(.email-workspace) .email-workspace{flex:1 1 auto}body:has(.email-workspace) .email-folders,body:has(.email-workspace) .email-message-list,body:has(.email-workspace) .email-reader{overflow-y:auto}}
@media(max-width:1100px){.email-workspace{grid-template-columns:215px minmax(280px,1fr)}.email-reader{display:none}.email-workspace:has(.email-reader-content) .email-message-list{display:none}.email-workspace:has(.email-reader-content) .email-reader{display:block}.email-reader-back{display:grid}}
@media(max-width:760px){.email-onboarding{padding:18px}.email-provider-row{grid-template-columns:36px 1fr}.email-provider-row .button{grid-column:1/-1;width:100%}.email-app-title span{display:none}.email-workspace{height:auto;min-height:calc(100vh - 115px);grid-template-columns:1fr}.email-folders{max-height:300px;border-right:0;border-bottom:1px solid var(--border)}.email-message-list{min-height:60vh;border-right:0}.email-list-toolbar input{width:112px}.email-workspace:has(.email-reader-content) .email-folders{display:none}.email-reader-content .email-reader-header{grid-template-columns:36px minmax(0,1fr);margin:0 16px}.email-reader-header time{grid-column:2;text-align:left}.email-reader-content .email-body,.email-reader-content .email-readonly-note,.email-reader-content .email-move-form,.email-reader-content .email-attachments{margin-left:16px;margin-right:16px}.email-thread{padding-left:16px;padding-right:16px}.email-thread-message summary{grid-template-columns:32px minmax(0,1fr)}.email-thread-message summary time{grid-column:2}.email-thread-content{padding-left:14px}.email-composer{right:16px}.email-reader-content{padding:0}}

@media (max-width: 900px) {
  .field-grid,
  .field-grid .full-width,
  .filter-grid,
  .tiles-grid,
  .detail-layout,
  .detail-info-strip,
  .module-grid,
  .detail-card-grid,
  .summary-sidebar,
  .detail-sidebar,
  .logistics-grid {
    grid-template-columns: 1fr;
  }

  .table-card th,
  .table-card td {
    padding: 14px 12px;
  }

  .topbar-actions {
    gap:8px;
    margin-left:0;
  }

  .search-input-wrap {
    min-width:0;
  }
}

@media (max-width: 600px) {
  .main-content{padding:14px 14px 24px}
  .topbar{padding:6px 0 12px}
  .topbar-inner{gap:10px;align-items:center;flex-wrap:nowrap}
  .search-form{flex:1 1 auto;min-width:0}
  .search-input-wrap{padding:6px 8px;min-width:0;overflow:hidden}
  .search-icon{margin-right:6px;font-size:0.95rem;flex-shrink:0}
  .search-input{padding:6px 4px;font-size:0.92rem;min-width:0}
  .search-input::placeholder{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .global-search-result{grid-template-columns:minmax(70px,auto) minmax(0,1fr);gap:8px;padding:9px 8px}
  .global-search-result-meta{display:none}
  .assistant-button{margin-left:4px;font-size:1rem;padding:4px;display:inline-flex;align-items:center;justify-content:center}
  .icon-btn{font-size:1rem;padding:6px;display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;flex-shrink:0}
  .profile-summary{padding:4px}
  .username{display:none}
  .avatar{width:32px;height:32px}
  .page-header h2{font-size:1.5rem}
  .page-header{margin-bottom:18px}
  .info-card,.form-card,.table-card,.panel{padding:16px}
  .table-card table{min-width:640px}
  .button{width:100%}
  .topbar-actions{justify-content:flex-end;flex-wrap:nowrap;gap:8px;margin-left:0;min-width:auto;flex-shrink:0}
  .profile{flex-shrink:0}
  .profile-menu{right:0;left:auto;min-width:140px}
  .sidebar-logo{gap:10px}
  .sidebar-logo img{width:148px;max-height:38px}
  .sidebar-logo-text h1{font-size:1rem}
  .sidebar-logo-text p{font-size:0.8rem}
}

/* Logistik dashboard styles */
.logistics-grid {
  display: grid;
  grid-template-columns: 1fr 480px 360px;
  gap: 20px;
  align-items: start;
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.panel-header { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.panel-body { padding: 14px 16px; }

.vehicle-editor-table-wrap {
  overflow-x: auto;
}

.vehicle-editor-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.vehicle-editor-table th,
.vehicle-editor-table td {
  vertical-align: top;
}

.vehicle-editor-table td input,
.vehicle-editor-table td select {
  width: 100%;
}

.vehicle-action-cell {
  width: 64px;
  text-align: right;
}

.vehicle-remove-button {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.vehicle-remove-button:hover {
  transform: translateY(-1px);
}

@media (max-width: 700px) {
  .vehicle-editor-table thead {
    display: none;
  }

  .vehicle-editor-table,
  .vehicle-editor-table tbody,
  .vehicle-editor-table tr,
  .vehicle-editor-table td {
    display: block;
    width: 100%;
  }

  .vehicle-editor-table tr {
    padding: 12px;
    border-bottom: 1px solid var(--border);
  }

  .vehicle-editor-table td {
    padding: 8px 0;
  }

  .vehicle-editor-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
  }

  .vehicle-action-cell {
    width: 100%;
    text-align: right;
  }
}

.detail-header-card .detail-header-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.detail-card-meta {
  display: grid;
  gap: 12px;
}

.detail-card-dates .key-value-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.detail-label {
  display: inline-block;
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-card-meta strong,
.detail-card-meta p {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
}

.detail-header-card .progress-track {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: var(--card-2);
  overflow: hidden;
}

.detail-header-card .progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

.detail-header-card .progress-label {
  font-size: 0.9rem;
  color: var(--muted);
}

.detail-page-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
  margin-bottom: 24px;
}

.detail-page-title h1 {
  margin: 0;
  font-size: clamp(2rem, 2.6vw, 2.6rem);
  line-height: 1.05;
}

.detail-page-title .detail-subtitle {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.detail-status-row {
  margin-top: 16px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.detail-delete-warning {
  display: grid;
  gap: 6px;
  margin: 0 0 20px;
  padding: 14px 16px;
  color: #7f1d1d;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 5px solid #dc2626;
  border-radius: 10px;
}

.detail-delete-warning strong {
  font-size: 1rem;
}

.button-secondary {
  background: #fff;
  border: 1px solid var(--button-border);
  color: var(--text);
}

.button-secondary:hover {
  background: #f3f7f4;
  border-color: var(--button-border-hover);
}

.detail-info-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.info-chip,
.info-progress-chip {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  display: grid;
  gap: 8px;
}

.info-chip strong,
.info-progress-chip strong {
  color: var(--text);
  font-size: 1rem;
}

.info-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.progress-track-large {
  height: 12px;
}

.process-panel {
  padding: 24px;
  margin-bottom: 24px;
}

.process-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.process-panel-header h2 {
  margin: 0;
  font-size: 1.15rem;
}

.process-panel-header .muted {
  margin: 0;
  color: var(--muted);
}

.process-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 16px;
  padding: 20px 0;
}

.process-steps::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 24px;
  right: 24px;
  height: 2px;
  background: var(--card-2);
  z-index: 0;
}

.process-step {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  padding: 18px 14px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  text-align: center;
  min-width: 170px;
}

.process-step::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--border);
}

.process-step.completed {
  border-color: #22c55e;
  background: #f0fdf4;
}

.process-step.completed::before {
  border-color: #22c55e;
  background: #22c55e;
}

.process-step.current {
  border-color: #15803d;
  background: #ecfdf5;
}

.process-step.current::before {
  border-color: #15803d;
  background: #fff;
}

.process-step.future {
  opacity: 0.7;
}

.step-index {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #d1fae5;
  color: #166534;
  font-weight: 700;
  margin: 0 auto 6px;
}

.process-step.completed .step-index {
  background: #16a34a;
  color: #fff;
}

.process-step.current .step-index {
  background: #f8faf5;
  color: #166534;
  border: 1px solid #15803d;
}

.step-label {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.4;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1.7fr 0.95fr;
  gap: 24px;
  align-items: start;
}

.main-column {
  display: grid;
  gap: 24px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.module-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  display: grid;
  gap: 16px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.module-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.module-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  align-items: center;
  justify-content: center;
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
  font-size: 1.2rem;
}

.module-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.module-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.module-card a.button {
  justify-self: start;
}

.detail-sidebar {
  display: grid;
  gap: 20px;
}

.summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.summary-list li {
  background: var(--card-2);
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  color: var(--text);
}

.hint-box {
  border: none;
  background: #ecfdf5;
  box-shadow: none;
}

.hint-header {
  padding: 18px 20px 10px;
}

.hint-body {
  padding: 0 20px 18px;
  font-size: 1rem;
  color: #166534;
}

.info-panel .info-list {
  display: grid;
  gap: 14px;
}

.info-row {
  display: grid;
  gap: 6px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.info-row:last-child {
  border-bottom: none;
}

/* Verträge Modul */
.table-card { padding: 18px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); }
.table-card table { width: 100%; border-collapse: collapse; }
.table-card thead th { font-weight: 700; color: var(--muted); font-size: 0.92rem; padding: 12px 10px; }
.table-card tbody td { padding: 12px 10px; vertical-align: middle; }
.upload-area { border-radius: 10px; padding: 14px; background: var(--card-2); border: 1px dashed var(--border); }
.ki-box { padding: 16px; border-radius: 12px; background: linear-gradient(180deg, rgba(22,163,74,0.04), rgba(255,255,255,0.02)); border: 1px solid var(--border); }
.tiles-grid { display:grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap:16px; }
.tiles-grid .info-card { text-align:center }

@media (max-width:1100px){
  .tiles-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Sicherheit & Benutzerverwaltung */
.role-badge { display:inline-block;padding:6px 10px;border-radius:999px;background:rgba(22,163,74,0.08);color:var(--accent);font-weight:700 }
.role-pill { display:inline-block;padding:8px 12px;border-radius:8px;border:1px solid var(--border);background:var(--card);font-weight:700 }
.table-card table th { text-align:left }

/* Betreiber-Adminseite */
.operator-grid { display:grid;grid-template-columns:minmax(0,1.6fr) minmax(320px,0.9fr);gap:18px;align-items:start }
.operator-stats { margin-bottom: 18px; }
.operator-header-actions { display:flex;align-items:center;gap:10px;flex-wrap:wrap }
.operator-support-banner { border-left:4px solid var(--accent); }
.support-banner-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 18px;padding:10px 0 0 }
.support-banner-grid div { display:flex;flex-direction:column;gap:4px;padding:12px 14px;border:1px solid var(--border);border-radius:10px;background:#fff }
.support-banner-grid span { color:var(--muted);font-size:.8rem }
.support-banner-grid strong { font-size:.96rem }
.operator-support-form { display:grid;gap:12px }
.operator-support-form label { display:grid;gap:6px;font-weight:700 }
.operator-support-form input,
.operator-support-form select { width:100% }
.operator-tenant-table,
.operator-audit-table { min-width: 820px; }
.operator-tenant-table th,
.operator-audit-table th { white-space:nowrap }
.operator-audit-table td:last-child { max-width: 340px }
.operator-audit-table td:last-child strong { display:block }
@media (max-width: 1100px){
  .operator-grid { grid-template-columns:1fr }
}
@media (max-width: 760px){
  .support-banner-grid { grid-template-columns:1fr }
}

.werksabrechnung-position-table { min-width: 1180px; }
.werksabrechnung-position-table th:first-child { width: 220px; }
.werksabrechnung-position-table th:nth-child(2) { width: 170px; }
.werksabrechnung-position-table th:nth-child(3) { width: 190px; }
.werksabrechnung-position-table input,
.werksabrechnung-position-table select { width: 100%; min-width: 0; margin-bottom: 6px; }
.werksabrechnung-position-table .inline-fields { display: grid; grid-template-columns: 1fr 70px; gap: 6px; }
.werksabrechnung-position-table .remove-position { width: 36px; min-width: 36px; padding: 6px; font-size: 1.15rem; }
.eldat-polter-overview select { min-width: 300px; width: 100%; }
.eldat-fixed-positions { margin-top: 22px; }
.eldat-position-group { padding: 0; overflow: hidden; margin-bottom: 10px; }
.eldat-position-group summary { cursor: pointer; list-style: none; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; }
.eldat-position-group summary::-webkit-details-marker { display: none; }
.eldat-position-group summary::after { content: '+'; color: var(--muted); font-size: 1.2rem; }
.eldat-position-group[open] summary::after { content: '−'; }
.eldat-position-group summary span { display: flex; gap: 6px; flex-direction: column; }
.eldat-position-group summary small { color: var(--muted); font-weight: 400; }
.eldat-position-group .table-scroll { border-top: 1px solid var(--border); }
.eldat-position-group table { min-width: 820px; width: 100%; border-collapse: collapse; }
.eldat-position-group th,
.eldat-position-group td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.eldat-assignment-info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 18px; padding: 16px 18px; border-top: 1px solid var(--border); background: #f7faf8; }
.eldat-assignment-info div { display: flex; flex-direction: column; gap: 3px; }
.eldat-assignment-info span { color: var(--muted); }
@media (max-width: 760px) { .eldat-assignment-info { grid-template-columns: 1fr; } }
.eldat-comparison { min-width: 230px; }
.eldat-progress-block + .eldat-progress-block { margin-top: 10px; }
.eldat-progress-block small { display: block; margin-bottom: 4px; color: var(--muted); }
.eldat-progress { position: relative; height: 26px; overflow: hidden; border-radius: 4px; background: #e3e9e5; }
.eldat-progress span { display: block; height: 100%; border-radius: inherit; background: #69bd84; transition: width 180ms ease; }
.eldat-progress em { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0 8px; color: #173c25; font-size: 0.78rem; font-style: normal; font-weight: 700; white-space: nowrap; }
.eldat-detail-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding: 16px 18px; border-top: 1px solid var(--border); background: #fff; }
@media (max-width: 760px) { .eldat-detail-comparison { grid-template-columns: 1fr; } }
.eldat-difference { margin: 5px 0 0; font-size: 0.78rem; font-weight: 700; }
.eldat-difference.is-warning { color: #9a4d12; }
.eldat-difference.is-equal { color: #247a45; }
.eldat-close-check { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-weight: 700; color: #234b31; }
.eldat-close-check input { width: 17px; height: 17px; margin: 0; accent-color: #2f9e5b; }
.status-badge.status-complete { color: #176b39; background: #e4f5e9; border-color: #b8dfc4; }
.contract-quantity-fields { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 8px; }
@media (max-width: 560px) { .contract-quantity-fields { grid-template-columns: 1fr; } }
.holzliste-row-actions { display: grid; grid-template-columns: repeat(2, 92px); gap: 7px; align-items: center; }
.holzliste-row-actions form { margin: 0; }
.holzliste-row-actions .button { width: 92px; height: 36px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; }
.polter-image-gallery { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.polter-image-item { position: relative; width: 112px; height: 82px; border: 1px solid var(--border); border-radius: 6px; overflow: visible; background: #f3f6f4; }
.polter-image-open { display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: inherit; overflow: hidden; background: transparent; cursor: zoom-in; }
.polter-image-open img { display: block; width: 100%; height: 100%; object-fit: cover; }
.polter-image-remove { position: absolute; top: -8px; right: -8px; z-index: 2; width: 24px; height: 24px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: #a73737; color: #fff; font-size: 17px; line-height: 18px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.polter-image-lightbox[hidden] { display: none; }
.polter-image-lightbox { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; padding: 32px; background: rgba(10, 18, 13, .82); }
.polter-image-lightbox img { display: block; max-width: min(1100px, 92vw); max-height: 88vh; object-fit: contain; background: #fff; box-shadow: 0 18px 60px rgba(0,0,0,.35); }
.polter-image-lightbox-close { position: fixed; top: 18px; right: 22px; width: 42px; height: 42px; padding: 0; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; background: rgba(0,0,0,.35); color: #fff; font-size: 28px; cursor: pointer; }
.polter-list-photo { position: relative; width: 68px; height: 48px; }
.polter-list-photo-open { display: block; width: 100%; height: 100%; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 5px; background: #f3f6f4; cursor: zoom-in; }
.polter-list-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.polter-list-photo span { position: absolute; right: -7px; bottom: -7px; min-width: 22px; height: 22px; padding: 0 5px; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; border-radius: 11px; background: #2b5639; color: #fff; font-size: .72rem; font-weight: 700; }

.polter-assignment-progress {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
  white-space: nowrap;
}
.eldat-total-price { margin: 5px 0; font-size: 1.45rem; font-weight: 800; color: #174d2c; }
.eldat-price-warnings { border-color: #e4c49d; }
.eldat-warning-links { display: grid; gap: 8px; }
.eldat-warning-link { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border: 1px solid #ead3b6; border-radius: 6px; color: #71400f; background: #fff9f1; text-decoration: none; }
.eldat-warning-link:hover { border-color: #c98b45; background: #fff5e8; }
.eldat-warning-link span { font-size: 0.82rem; }
.eldat-price-unmatched { background: #fff9f1; }
.eldat-price-missing { color: #9a4d12; font-weight: 700; }
.eldat-position-group tr.is-highlighted td { background: #fff0cf; }
.eldat-manual-price-editor { display: grid; grid-template-columns: 105px auto; gap: 6px; min-width: 210px; }
.eldat-manual-price-editor[hidden] { display: none; }
.eldat-manual-price-editor input { width: 105px; min-width: 0; margin: 0; }
.eldat-manual-price-editor .button { white-space: nowrap; }
.eldat-price-value { font-weight: 700; color: #245c38; white-space: nowrap; }
.eldat-phase-details { padding: 0; overflow: hidden; }
.eldat-phase-details > summary { cursor: pointer; list-style: none; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; }
.eldat-phase-details > summary::-webkit-details-marker { display: none; }
.eldat-phase-details > summary span { display: flex; flex-direction: column; gap: 4px; }
.eldat-phase-details > summary small { color: var(--muted); font-weight: 400; }
.eldat-phase-details > summary::after { content: '+'; color: var(--muted); font-size: 1.25rem; }
.eldat-phase-details[open] > summary::after { content: '−'; }
.eldat-phase-details > .details-content { border-top: 1px solid var(--border); padding: 20px; }
.eldat-phase-two[hidden] { display: none; }
.eldat-phase-two { margin-top: 22px; }
.eldat-phase-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.eldat-phase-heading h3 { margin: 2px 0 0; }
.werksabrechnung-compact-stats { display: flex; align-items: center; flex-wrap: wrap; gap: 0; margin: 0 0 14px; padding: 9px 14px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.werksabrechnung-compact-stats div { display: flex; align-items: baseline; gap: 7px; padding: 2px 18px; border-right: 1px solid var(--border); }
.werksabrechnung-compact-stats div:first-child { padding-left: 0; }
.werksabrechnung-compact-stats div:last-child { border-right: 0; }
.werksabrechnung-compact-stats span { color: var(--muted); font-size: .78rem; }
.werksabrechnung-compact-stats strong { color: var(--text); font-size: .92rem; white-space: nowrap; }
@media (max-width: 700px) {
  .werksabrechnung-compact-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 0; }
  .werksabrechnung-compact-stats div { padding: 2px 10px; border-right: 0; }
  .werksabrechnung-compact-stats div:nth-child(odd) { padding-left: 0; border-right: 1px solid var(--border); }
}
.panel { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px }


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

.info-row span {
  color: var(--muted);
  font-size: 0.85rem;
}

.info-row strong {
  color: var(--text);
}

.timeline-panel {
  padding: 24px;
}

.timeline-flow {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 40px;
  padding: 10px 0 0;
  overflow-x: auto;
}

.timeline-flow::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-2);
}

.timeline-item {
  position: relative;
  min-width: 172px;
  padding-left: 26px;
  display: grid;
  gap: 8px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--border);
}

.timeline-item.completed::before {
  border-color: #22c55e;
  background: #22c55e;
}

.timeline-item.future::before {
  background: #f8fafc;
}

.timeline-item strong {
  margin: 0;
  font-size: 0.95rem;
}

.timeline-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 1100px) {
  .detail-page-header,
  .detail-info-strip,
  .process-steps,
  .detail-layout,
  .module-grid {
    grid-template-columns: 1fr;
  }

  .process-steps {
    grid-template-columns: 1fr;
  }

  .module-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 800px) {
  .detail-info-strip,
  .detail-layout,
  .module-grid {
    grid-template-columns: 1fr;
  }

  .process-steps {
    padding: 0;
  }

  .process-steps::before {
    left: 34px;
    right: auto;
    width: 3px;
    height: calc(100% - 40px);
    top: 0;
  }

  .process-step {
    display: grid;
    grid-template-columns: auto 1fr;
    text-align: left;
    padding: 16px 16px 16px 42px;
    min-width: auto;
  }

  .process-step::before {
    left: 12px;
    top: 24px;
  }

  .step-index {
    margin: 0;
  }

  .timeline-flow {
    flex-direction: column;
    gap: 24px;
  }

  .timeline-flow::before {
    top: 0;
    left: 12px;
    height: 100%;
    width: 3px;
  }

  .timeline-item {
    padding-left: 40px;
  }

  .timeline-item::before {
    left: 12px;
    top: 0;
  }
}

@media (max-width: 1100px) {
  .process-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .process-steps {
    grid-template-columns: 1fr;
  }

  .process-step {
    grid-template-columns: auto 1fr;
    align-items: center;
    text-align: left;
    padding: 14px 16px;
  }

  .step-label {
    font-size: 0.95rem;
  }
}

.main-column {
  display: grid;
  gap: 20px;
}

.detail-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.detail-card {
  min-height: 160px;
}

.summary-sidebar {
  display: grid;
  gap: 20px;
}

.summary-panel .panel-body {
  padding-top: 12px;
}

.summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.summary-list li {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--card-2);
  border: 1px solid var(--border);
  color: var(--text);
}

.timeline {
  min-height: 240px;
}

.timeline-event {
  position: relative;
  display: grid;
  gap: 10px;
  padding-left: 30px;
  margin-bottom: 20px;
}

.timeline-event:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: 0;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(22, 163, 74, 0.12);
}

.timeline-event strong {
  display: block;
  color: var(--text);
  margin-bottom: 4px;
}

.timeline-event p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 1100px) {
  .detail-header-card .detail-header-grid,
  .detail-layout,
  .detail-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .detail-header-card,
  .detail-layout,
  .detail-card-grid,
  .summary-sidebar {
    display: block;
  }

  .detail-card {
    min-height: auto;
  }
}

.map-placeholder { height: 240px; display: grid; place-items: center; color: var(--muted); border-radius: 8px; background: linear-gradient(135deg, rgba(15,23,42,0.02), rgba(15,23,42,0.01)); }

.polter-overview .table-card { width: 100%; border-collapse: collapse; }
.polter-overview table th, .polter-overview table td { padding: 10px 8px; border-bottom: 1px solid rgba(15,23,42,0.06); text-align: left; }

.polter-form {
  display: grid;
  gap: 18px;
}

.modal-panel-wide {
  width: min(1040px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.modal-actions {
  position: sticky;
  bottom: 0;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 14px 18px;
  margin: 0 -18px -18px;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.row-actions form {
  margin: 0;
}

.polter-details-panel{width:min(920px,calc(100vw - 32px))}
.polter-details-summary{display:flex;align-items:center;flex-wrap:wrap;gap:10px 16px;margin-bottom:18px;color:var(--muted)}
.polter-details-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0}
.polter-details-grid>div{min-width:0;padding:13px 14px;border:1px solid var(--border);border-radius:10px;background:var(--card-2)}
.polter-details-grid dt{margin:0 0 5px;color:var(--muted);font-size:.78rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase}
.polter-details-grid dd{margin:0;color:var(--text);font-weight:650;overflow-wrap:anywhere}
.polter-details-grid dd small{display:block;margin-top:4px;color:var(--muted);font-size:.85rem;font-weight:500}
.polter-details-note{margin-top:14px;padding:13px 14px;border:1px solid var(--border);border-radius:10px;background:#fff}
.polter-details-note p{margin:5px 0 0;white-space:pre-wrap}
.polter-details-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:10px;padding:14px 20px;border-top:1px solid var(--border);background:var(--card)}
@media(max-width:800px){.polter-details-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.polter-details-grid{grid-template-columns:1fr}.polter-details-actions>*{flex:1;text-align:center}}

.firm-data-form{display:grid;gap:18px}
.firm-data-section{margin:0}
.firm-data-section .panel-header{margin-bottom:16px}
.firm-data-section .panel-header h3{margin:2px 0 4px}
.firm-data-address-toggle{width:fit-content;margin:0 0 16px;padding:11px 13px;border:1px solid var(--button-border);border-radius:9px;background:var(--card-2)}
.firm-data-fieldset{min-width:0;margin:0;padding:0;border:0;transition:opacity .18s ease}
.firm-data-fieldset.is-disabled{opacity:.5}
.firm-logo-editor{display:grid;grid-template-columns:minmax(220px,.75fr) minmax(280px,1.25fr);gap:20px;align-items:center}
.firm-logo-preview{min-height:150px;display:grid;place-items:center;padding:20px;border:1px dashed var(--button-border);border-radius:11px;background:linear-gradient(135deg,#f8fbf9,#eef4f0);color:var(--muted);text-align:center}
.firm-logo-preview img{display:block;max-width:100%;max-height:150px;object-fit:contain}
.firm-logo-fields{display:grid;gap:12px}
.firm-certificate-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.firm-certificate-card{display:grid;gap:14px;min-width:0;margin:0;padding:16px;border:1px solid var(--border);border-radius:11px;background:var(--card-2)}
.firm-certificate-card legend{padding:0 7px;font-weight:750;color:var(--text)}
.firm-data-actions{position:sticky;bottom:16px;z-index:20;justify-content:flex-end;padding:12px;border:1px solid var(--border);border-radius:11px;background:rgba(255,255,255,.95);box-shadow:0 8px 28px rgba(15,23,42,.12);backdrop-filter:blur(8px)}
@media(max-width:700px){
  .firm-data-header{align-items:stretch}
  .firm-data-header>.button{width:100%}
  .firm-logo-editor{grid-template-columns:1fr}
  .firm-certificate-grid{grid-template-columns:1fr}
  .firm-data-actions{bottom:8px}
  .firm-data-actions .button{width:100%}
}

.measurement-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  overflow: hidden;
}

.measurement-list {
  display: grid;
  gap: 10px;
}

.measurement-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: center;
}

.measurement-row.stem-row {
  grid-template-columns: 70px minmax(90px, 1fr) minmax(90px, 1fr) minmax(90px, 1fr) minmax(90px, 1fr) minmax(120px, 1fr) minmax(90px, 1fr) 88px auto;
}

.stem-live-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.stem-live-summary div {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.02);
}

.stem-live-summary span,
.stem-live-summary strong {
  display: block;
}

.stem-live-summary span {
  color: var(--muted);
  font-size: 0.86rem;
}

.stem-live-summary strong {
  color: var(--text);
  margin-top: 4px;
}

.stem-volume {
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .measurement-row,
  .measurement-row.stem-row {
    grid-template-columns: 1fr;
  }
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.button.disabled,
.button:disabled {
  opacity: 0.55;
  pointer-events: none;
}

.polter-location-check {
  display: grid;
  gap: 12px;
}

.polter-map-preview {
  width: 100%;
  height: clamp(320px, 48vh, 520px);
  min-height: 320px;
  border: 1px solid var(--button-border);
  border-radius: 12px;
  background:#dce8df;
  position: relative;
  overflow: hidden;
  color: var(--text);
}

.polter-map-preview.leaflet-container{font:inherit}
.polter-map-search{display:grid;gap:7px;padding:12px 14px;border:1px solid var(--border);border-radius:10px;background:#fff}
.polter-map-search>label{font-weight:700}
.polter-map-search-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px}
.polter-map-search-row input{min-width:0}
.polter-map-search-results{display:grid;gap:6px}
.polter-map-search-result{width:100%;padding:9px 11px;border:1px solid var(--button-border);border-radius:8px;background:#f7faf8;color:var(--text);font:inherit;text-align:left;cursor:pointer}
.polter-map-search-result:hover,.polter-map-search-result:focus-visible{border-color:var(--primary);background:#edf5ef}
.polter-map-preview .leaflet-control-layers{border:1px solid rgba(20,45,31,.45);border-radius:8px;box-shadow:0 2px 10px rgba(16,35,24,.2)}
.polter-map-status{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;border:1px solid var(--border);border-radius:10px;background:#fff}
.polter-map-status strong,.polter-map-status span{display:block}
.polter-map-status span{margin-top:4px;color:var(--muted);font-size:.86rem;font-variant-numeric:tabular-nums}
.polter-map-help{margin:0}
@media(max-width:650px){
  .polter-map-preview{height:360px;min-height:300px}
  .polter-map-status{align-items:stretch;flex-direction:column}
  .polter-map-search-row{grid-template-columns:1fr}
}

.check-row {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--text);
  font-weight: 600;
}

.check-row input {
  width: auto;
  min-width: 18px;
}

.polter-image-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.polter-image-strip img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
}

@media (max-width: 1100px) {
  .logistics-grid { grid-template-columns: 1fr 1fr; }
  .map-panel { grid-column: 1 / -1; }
}

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

.muted.small { font-size: 0.9rem; color: var(--muted); }

.table-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

/* Dense, clearly separated operational lists. */
.compact-overview-table,
.werksabrechnung-list-table {
  overflow-x: auto;
}

.compact-overview-table table,
.werksabrechnung-list-table table {
  font-size: 0.84rem;
  line-height: 1.22;
}

.compact-overview-table th,
.compact-overview-table td,
.werksabrechnung-list-table th,
.werksabrechnung-list-table td {
  padding: 7px 8px;
  vertical-align: top;
}

.compact-overview-table thead tr,
.werksabrechnung-list-table thead tr {
  border-bottom: 2px solid #aebdb4;
}

.compact-overview-table tbody tr,
.werksabrechnung-list-table tbody tr {
  border-bottom: 1px solid #cfd9d3;
}

.compact-overview-table tbody tr:last-child,
.werksabrechnung-list-table tbody tr:last-child {
  border-bottom: 0;
}

.compact-overview-table tbody tr:hover,
.werksabrechnung-list-table tbody tr:hover {
  background: #f6f9f7;
}

.compact-overview-table .muted.small,
.werksabrechnung-list-table .muted.small,
.werksabrechnung-list-table td p {
  margin: 2px 0 0;
  font-size: 0.74rem;
  line-height: 1.18;
}

.compact-overview-table .status-badge,
.werksabrechnung-list-table .status-badge {
  padding: 3px 7px;
  font-size: 0.72rem;
  white-space: nowrap;
}

.compact-overview-table .table-actions,
.compact-overview-table .row-actions,
.werksabrechnung-list-table .table-actions {
  gap: 4px;
}

.table-pagination p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.pagination-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-button {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.pagination-button:hover {
  border-color: #6eb886;
}

.pagination-button.active {
  border-color: #247a45;
  background: #247a45;
  color: #fff;
}

.pagination-button.disabled {
  opacity: 0.45;
}

.pagination-ellipsis {
  width: 24px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 680px) {
  .table-pagination { align-items: flex-start; flex-direction: column; }
  .pagination-links { max-width: 100%; overflow-x: auto; }
}

/* Automatische ELDAT-Zuordnung */
.auto-sync-button span {
  display: inline-block;
}

.auto-sync-button:disabled span {
  animation: auto-sync-spin 0.8s linear infinite;
}

@keyframes auto-sync-spin {
  to { transform: rotate(360deg); }
}

.auto-assignment-inbox {
  padding: 10px 12px;
  border-radius: 8px;
}

.auto-assignment-filter .filter-grid {
  grid-template-columns: minmax(260px, 1.6fr) minmax(170px, 0.8fr) minmax(170px, 0.8fr) auto;
  align-items: end;
}

.auto-filter-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  margin: 0;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}

.compact-overview-filter .auto-filter-checkbox input {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
}

.auto-assignment-polters {
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1050px) {
  .auto-assignment-filter .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .auto-assignment-filter .filter-grid {
    grid-template-columns: 1fr;
  }
}

/* Read-only KI help drawer */
.ki-assistant-overlay{position:fixed;inset:0;z-index:1090;border:0;background:rgba(13,31,23,.34);backdrop-filter:blur(1px);cursor:pointer}
.ki-assistant-panel{position:fixed;z-index:1100;top:0;right:0;width:min(430px,100vw);height:100dvh;background:#f7faf8;box-shadow:-12px 0 36px rgba(13,48,31,.22);display:flex;flex-direction:column;transform:translateX(105%);visibility:hidden;transition:transform .22s ease,visibility .22s ease}
.ki-assistant-open .ki-assistant-panel{transform:translateX(0);visibility:visible}
.ki-assistant-header{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;background:#174f38;color:#fff}
.ki-assistant-header div{display:flex;flex-direction:column;gap:2px}.ki-assistant-header strong{font-size:1.08rem}.ki-assistant-header span{font-size:.78rem;opacity:.78}
.ki-assistant-close{width:36px;height:36px;border:0;border-radius:50%;background:rgba(255,255,255,.13);color:#fff;font-size:1.6rem;line-height:1;cursor:pointer}
.ki-assistant-messages{flex:1;overflow-y:auto;padding:20px;display:flex;flex-direction:column;gap:11px}
.ki-message{max-width:88%;padding:11px 13px;border-radius:14px;white-space:pre-wrap;line-height:1.45;font-size:.92rem;box-shadow:0 2px 8px rgba(19,57,38,.06)}
.ki-message-assistant,.ki-message-pending{align-self:flex-start;background:#fff;border:1px solid #dce8e1;border-bottom-left-radius:4px}
.ki-message-user{align-self:flex-end;background:#176b45;color:#fff;border-bottom-right-radius:4px}
.ki-message-pending{color:#65736b;font-style:italic}.ki-message-notice{align-self:center;max-width:100%;padding:7px 10px;background:#eef3f0;color:#65736b;box-shadow:none;font-size:.76rem;text-align:center}
.ki-message-error{align-self:flex-start;background:#fff0f0;color:#9b2727;border:1px solid #f1cccc}
.ki-assistant-quick-questions{display:flex;flex-wrap:wrap;gap:7px;margin-top:2px}.ki-assistant-quick-questions button{border:1px solid #b9d5c5;border-radius:999px;background:#fff;color:#176b45;padding:7px 10px;font-size:.78rem;cursor:pointer}.ki-assistant-quick-questions button:hover{background:#e8f4ed}
.ki-assistant-actions{display:flex;flex-wrap:wrap;gap:7px}.ki-assistant-actions a{display:inline-flex;padding:7px 10px;border-radius:8px;background:#e2f2e8;color:#145c3c;text-decoration:none;font-size:.8rem;font-weight:600}.ki-assistant-actions a:hover{background:#cde8d7}
.ki-assistant-form{display:grid;grid-template-columns:1fr auto;gap:9px;padding:13px 16px;background:#fff;border-top:1px solid #dce8e1}.ki-assistant-form textarea{resize:none;min-height:46px;max-height:120px;border:1px solid #bfcec5;border-radius:10px;padding:10px 11px;font:inherit}.ki-assistant-form textarea:focus{outline:2px solid rgba(23,107,69,.19);border-color:#176b45}.ki-assistant-form button{align-self:stretch;border:0;border-radius:9px;background:#176b45;color:#fff;padding:0 15px;font-weight:600;cursor:pointer}.ki-assistant-form button:disabled{opacity:.55;cursor:wait}
.ki-assistant-privacy{margin:0;padding:0 16px 13px;background:#fff;color:#6c786f;font-size:.68rem;line-height:1.35}
@media (max-width:520px){.ki-assistant-panel{width:100vw}.ki-assistant-messages{padding:15px}.ki-message{max-width:94%}}

.auto-assignment-files {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-picker {
  position: relative;
}

.pdf-picker-toggle {
  white-space: nowrap;
}

.pdf-picker-backdrop {
  align-items: stretch;
}

.pdf-picker-panel {
  width: min(1180px, 100%);
  max-height: min(90vh, 980px);
}

.pdf-picker-header {
  align-items: flex-start;
}

.pdf-picker-header h3 {
  margin: 0 0 4px;
}

.pdf-picker-header .muted {
  margin: 0;
}

.pdf-picker-close {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 0;
  border-radius: 8px;
  background: var(--card-2);
  color: var(--muted);
  font-size: 1.35rem;
  cursor: pointer;
}

.pdf-picker-close:hover {
  background: rgba(34, 197, 94, 0.14);
  color: var(--text);
}

.pdf-picker-body {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  gap: 18px;
  min-height: 0;
}

.pdf-picker-list {
  display: grid;
  gap: 10px;
  overflow-y: auto;
  padding-right: 4px;
  min-height: 0;
}

.pdf-picker-file {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 12px 14px;
  appearance: none;
  font: inherit;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.pdf-picker-file strong {
  overflow-wrap: anywhere;
  font-size: 0.88rem;
  line-height: 1.35;
}

.pdf-picker-file span {
  color: var(--muted);
  font-size: 0.72rem;
}

.pdf-picker-file:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 197, 94, 0.35);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.pdf-picker-file.is-active {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(34, 197, 94, 0.08);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.1) inset;
}

.pdf-picker-preview-shell {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  gap: 14px;
}

.pdf-picker-preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), #fff);
}

.pdf-picker-preview-header h4 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.pdf-picker-preview-header .muted {
  margin: 0;
}

.pdf-picker-preview-frame {
  flex: 1;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-2);
}

.pdf-picker-preview-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

@media (max-width: 920px) {
  .pdf-picker-body {
    grid-template-columns: 1fr;
  }

  .pdf-picker-list {
    max-height: 220px;
    padding-right: 0;
  }

  .pdf-picker-preview-frame {
    min-height: 420px;
  }
}

@media (max-width: 700px) {
  .pdf-picker-panel {
    max-height: 100%;
    width: 100%;
    border-radius: 16px;
  }

  .pdf-picker-preview-header {
    flex-direction: column;
  }

  .pdf-picker-preview-frame {
    min-height: 320px;
  }
}

.auto-assignment-groups {
  display: grid;
  gap: 22px;
}

.auto-assignment-save-footer {
  display: flex;
  justify-content: flex-end;
  padding: 16px 0 4px;
}

.auto-assignment-save-footer form,
.page-actions form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}

.auto-email-preview-panel {
  width: min(760px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 48px));
  border-radius: 8px;
}

.auto-email-preview-panel .modal-header .auto-email-preview-close {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 1.2rem;
}

.auto-email-preview-body {
  display: grid;
  gap: 14px;
  overflow-y: auto;
}

.auto-email-preview-routing {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.auto-email-preview-routing div {
  min-width: 0;
}

.auto-email-preview-routing span,
.auto-email-preview-routing strong {
  display: block;
}

.auto-email-preview-routing span,
.auto-email-preview-attachments > span {
  color: var(--muted);
  font-size: 0.7rem;
}

.auto-email-preview-routing strong {
  margin-top: 2px;
  overflow-wrap: anywhere;
  font-size: 0.8rem;
}

.auto-email-preview-body pre {
  min-height: 180px;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  font-size: 0.84rem;
  line-height: 1.55;
}

.auto-email-preview-note {
  margin: 0;
  padding: 7px 9px;
  border-left: 3px solid #d59a2c;
  background: #fff8e8;
  color: #704600;
  font-size: 0.75rem;
}

.auto-email-preview-attachments {
  display: grid;
  gap: 5px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.auto-email-preview-attachments[hidden] {
  display: none;
}

.auto-email-preview-attachments div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.auto-email-preview-attachments strong {
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #f5f7f6;
  font-size: 0.72rem;
}

.auto-related-invoice-email {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.4fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0 28px 22px;
  padding: 11px 12px;
  border: 1px solid #b8dfc4;
  border-radius: 6px;
  background: #edf8f0;
}

.auto-related-invoice-email[hidden] {
  display: none;
}

.auto-related-invoice-email > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.auto-related-invoice-email span,
.auto-related-invoice-email small {
  color: var(--muted);
  font-size: 0.7rem;
}

.auto-related-invoice-email strong {
  overflow: hidden;
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auto-related-invoice-pdfs {
  display: flex;
  gap: 5px;
  min-width: 0;
  flex-wrap: wrap;
}

.auto-related-invoice-pdfs a {
  max-width: 100%;
  padding: 4px 7px;
  overflow: hidden;
  border: 1px solid #b8dfc4;
  border-radius: 4px;
  background: #fff;
  color: #176138;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .auto-related-invoice-email {
    grid-template-columns: 1fr;
    margin-right: 16px;
    margin-left: 16px;
  }
}

.auto-bundle-note {
  margin: 3px 0 0;
  color: #176b39;
  font-size: 0.72rem;
  font-weight: 700;
}

.auto-assignment-group {
  padding-bottom: 22px;
  scroll-margin-top: 14px;
  border-bottom: 1px solid var(--border);
}

.auto-assignment-group-summary,
.auto-candidate-heading,
.auto-candidate footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.auto-assignment-group-details > summary {
  list-style: none;
}

.auto-assignment-group-details > summary::-webkit-details-marker {
  display: none;
}

.auto-assignment-group-summary {
  cursor: pointer;
}

.auto-assignment-group-summary::after {
  content: "\2304";
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 1rem;
  transform: rotate(0deg);
  transition: transform 0.18s ease;
}

.auto-assignment-group-details:not([open]) .auto-assignment-group-summary::after {
  transform: rotate(-90deg);
}

.auto-assignment-group-body {
  padding-top: 2px;
}

.auto-group-bottom-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.auto-group-bottom-actions form {
  margin: 0;
}

.auto-work-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.auto-work-details-panel {
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  border-radius: 8px;
}

.auto-work-details-panel .modal-header {
  padding: 13px 16px;
}

.auto-work-details-panel .modal-header p,
.auto-work-details-panel .modal-header h3 {
  margin: 0;
}

.auto-work-details-close,
.auto-photo-counter-close:not(.button) {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.auto-work-detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--border);
}

.auto-work-detail-summary div {
  padding: 8px 10px;
  background: #fff;
}

.auto-work-detail-summary span,
.auto-work-detail-summary strong {
  display: block;
}

.auto-work-detail-summary span {
  color: var(--muted);
  font-size: 0.72rem;
}

.auto-work-detail-summary strong {
  margin-top: 2px;
  font-size: 0.88rem;
}

.auto-work-position-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 0.8rem;
  line-height: 1.2;
}

.auto-work-position-table th,
.auto-work-position-table td {
  padding: 7px 8px;
  border-bottom: 1px solid #cfd9d3;
  text-align: left;
  vertical-align: top;
}

.auto-work-position-table th {
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.auto-work-position-table td span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
}

.auto-assignment-group h3,
.auto-assignment-group p {
  margin-top: 0;
  margin-bottom: 3px;
}

.auto-candidate-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.auto-candidate {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
}

.auto-candidate.selected {
  border-color: #6eb886;
  box-shadow: inset 3px 0 0 #247a45;
}

.auto-candidate-heading > div:first-child span,
.auto-score span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.auto-score {
  flex: 0 0 auto;
  text-align: right;
}

.auto-score strong {
  color: #176b39;
  font-size: 1.2rem;
}

.auto-photo-counter-open {
  padding: 5px 8px;
  font-size: 0.72rem;
}

.auto-photo-counter-control {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 7px;
}

.auto-photo-count-value {
  color: #176138;
  font-size: 0.74rem;
  font-weight: 700;
}

.auto-photo-counter-panel .modal-actions strong {
  margin-left: 8px;
  color: #176138;
}

.auto-photo-counter-panel {
  width: min(1180px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: hidden;
  border-radius: 8px;
}

.auto-photo-counter-toolbar {
  display: flex;
  align-items: end;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: #f7f9f7;
}

.auto-photo-counter-toolbar label {
  display: grid;
  gap: 3px;
  min-width: 220px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.auto-photo-counter-toolbar select {
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
}

.auto-photo-counter-total {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  margin-right: auto;
  padding: 5px 10px;
  border: 1px solid #b8dfc4;
  border-radius: 6px;
  background: #edf8f0;
  color: #176138;
}

.auto-photo-counter-total span {
  font-size: 0.76rem;
  font-weight: 700;
}

.auto-photo-counter-total strong {
  min-width: 32px;
  font-size: 1.15rem;
  text-align: right;
}

.auto-photo-counter-zoom {
  display: grid;
  gap: 1px;
  min-width: 66px;
  color: var(--muted);
  font-size: 0.68rem;
}

.auto-photo-counter-zoom strong {
  color: var(--text);
  font-size: 0.82rem;
}

.auto-photo-counter-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 280px;
  height: calc(100vh - 210px);
  padding: 10px;
  overflow: auto;
  background: #e7ebe8;
}

.auto-photo-counter-stage canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  border: 1px solid #78857d;
  background: #fff;
  cursor: crosshair;
  touch-action: none;
  object-fit: contain;
}

.auto-photo-counter-stage canvas.is-dragging {
  cursor: grabbing;
}

.auto-photo-counter-stage p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.auto-photo-counter-panel .modal-actions {
  justify-content: space-between;
}

.auto-photo-counter-panel .modal-actions span {
  color: var(--muted);
  font-size: 0.76rem;
}

@media (max-width: 760px) {
  .auto-photo-counter-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .auto-photo-counter-toolbar label {
    width: 100%;
    min-width: 0;
  }

  .auto-photo-counter-total {
    flex: 1 1 auto;
  }

  .auto-photo-counter-stage {
    height: calc(100vh - 270px);
    min-height: 220px;
  }
}

.auto-score-bar {
  height: 7px;
  margin: 11px 0;
  overflow: hidden;
  border-radius: 4px;
  background: #e5e9e7;
}

.auto-score-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #247a45;
}

.auto-candidate-balance {
  display: grid;
  gap: 7px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.auto-candidate-reported,
.auto-candidate-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.8rem;
}

.auto-candidate-reported span,
.auto-candidate-current span {
  color: var(--muted);
}

.auto-assignment-progress-row {
  display: grid;
  grid-template-columns: 52px minmax(180px, 1fr);
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.auto-assignment-progress-row .eldat-progress {
  height: 22px;
}

.auto-candidate-assigned {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 1px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-size: 0.78rem;
}

.auto-candidate-assigned span {
  color: var(--muted);
}

.auto-candidate-assigned strong {
  flex: 0 0 auto;
  color: var(--text);
}

.auto-completion-state {
  display: grid;
  gap: 2px;
  margin-top: 2px;
  padding: 7px 9px;
  border-left: 3px solid #d59a2c;
  background: #fff8e8;
  color: #704600;
  font-size: 0.75rem;
}

.auto-completion-state.is-complete {
  border-left-color: #2f8a52;
  background: #edf8f0;
  color: #176138;
}

.auto-completion-state span {
  line-height: 1.35;
}

.auto-reasons {
  display: grid;
  gap: 5px;
  margin: 12px 0;
  padding: 0;
  list-style: none;
  color: #176b39;
  font-size: 0.84rem;
}

.auto-reasons li::before {
  content: "\2713";
  margin-right: 7px;
  font-weight: 800;
}

.auto-reasons li.warning {
  color: #9a4d12;
}

.auto-reasons li.warning::before {
  content: "!";
}

.auto-confirmed {
  color: #176b39;
  font-size: 0.86rem;
  font-weight: 800;
}

.auto-candidate-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.auto-candidate-actions form {
  margin: 0;
}

.auto-assigned-polter:disabled {
  border-color: #9bbca6;
  background: #edf7f0;
  color: #176b39;
  opacity: 1;
}

.auto-polter-closed {
  color: #176b39;
  font-size: 0.82rem;
  font-weight: 800;
}

.auto-close-polter {
  border-color: #6eb886;
  color: #176b39;
}

.auto-no-match {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 12px;
  padding: 14px;
  border-left: 3px solid #c77a28;
  background: #fff8ed;
}

.auto-no-match span {
  color: var(--muted);
  font-size: 0.86rem;
}

@media (max-width: 980px) {
  .auto-candidate-list { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .auto-assignment-group-summary,
  .auto-candidate-heading { align-items: flex-start; }
  .auto-work-actions { align-items: flex-end; flex-direction: column-reverse; }
  .auto-work-detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auto-candidate-assigned,
  .auto-candidate-reported,
  .auto-candidate-current { align-items: flex-start; flex-direction: column; }
  .auto-assignment-progress-row { grid-template-columns: 44px minmax(0, 1fr); }
  .auto-email-preview-routing { grid-template-columns: 1fr; }
}

/* Kundenpreislisten */
.customer-pricelist-overview .table-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
}

.pricelist-source-panel {
  margin-bottom: 10px;
  padding: 10px 12px;
}

.pricelist-source-form {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.pricelist-source-form .form-row,
.pricelist-source-panel > p {
  margin: 0;
}

.pricelist-source-panel > p {
  margin-top: 6px;
}

.pricelist-master-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pricelist-quick-editor {
  margin: 10px 0;
  padding: 10px 12px;
  border-left: 3px solid var(--green);
}

.pricelist-quick-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 9px;
}

.pricelist-quick-heading h3,
.pricelist-quick-heading p { margin: 0; }

.pricelist-quick-heading output {
  color: #176b39;
  font-size: .76rem;
  font-weight: 800;
  text-align: right;
}

.pricelist-quick-grid {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
}

.pricelist-quick-grid .form-row { margin: 0; }

.pricelist-quick-grid > .form-row:first-child {
  grid-row: span 2;
}

.pricelist-discount-rule {
  display: grid;
  grid-template-columns: 72px minmax(150px, 1fr) 22px minmax(150px, 1fr) minmax(130px, .7fr);
  align-items: end;
  gap: 7px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #f8faf9;
}

.pricelist-discount-rule > strong {
  align-self: center;
  font-size: .78rem;
}

.pricelist-discount-rule > span {
  align-self: center;
  color: var(--muted);
  text-align: center;
}

.pricelist-discount-rule select,
.pricelist-discount-rule input {
  height: 34px;
  min-height: 34px;
  font-size: .76rem;
}

.pricelist-discount-rule .input-with-unit span { height: 34px; }

.input-with-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.input-with-unit input {
  border-radius: 5px 0 0 5px;
}

.input-with-unit span {
  display: grid;
  place-items: center;
  height: 38px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-left: 0;
  border-radius: 0 5px 5px 0;
  background: #f1f4f2;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
}

.pricelist-quick-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.customer-pricelist-editor {
  margin-top: 10px;
}

.pricelist-table-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.pricelist-table-heading h3,
.pricelist-table-heading p {
  margin: 0;
}

.customer-pricelist-editor table {
  min-width: 1380px;
  table-layout: fixed;
}

.customer-pricelist-editor th:nth-child(1),
.customer-pricelist-editor th:nth-child(2) { width: 125px; }
.customer-pricelist-editor th:nth-child(3),
.customer-pricelist-editor th:nth-child(4) { width: 105px; }
.customer-pricelist-editor th:nth-child(5),
.customer-pricelist-editor th:nth-child(6) { width: 80px; }
.customer-pricelist-editor th:nth-child(7),
.customer-pricelist-editor th:nth-child(8) { width: 105px; }
.customer-pricelist-editor th:nth-child(9) { width: 115px; }
.customer-pricelist-editor th:nth-child(10) { width: 185px; }
.customer-pricelist-editor th:nth-child(11) { width: 48px; }

.customer-pricelist-editor td {
  padding: 5px 4px;
  border-bottom: 1px solid var(--border);
}

.customer-pricelist-editor input {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 4px 7px;
  font-size: .78rem;
}

.customer-pricelist-editor input[readonly] {
  background: #f1f4f2;
  color: #45544b;
}

.pricelist-difference {
  display: block;
  font-size: .76rem;
  font-weight: 800;
  white-space: nowrap;
}

.pricelist-difference.is-negative { color: #a33b2f; }
.pricelist-difference.is-positive { color: #176b39; }

.pricelist-remove-row {
  width: 30px;
  min-width: 30px;
  height: 30px;
  color: #a33b2f;
}

.pricelist-note {
  margin-bottom: 10px;
  padding: 10px 12px;
}

.pricelist-note p { margin: 4px 0 0; }
.pricelist-detail-actions { justify-content: flex-end; }
.pricelist-detail-actions form { margin: 0; }

@media (max-width: 900px) {
  .pricelist-master-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricelist-quick-grid { grid-template-columns: 1fr; }
  .pricelist-quick-grid > .form-row:first-child { grid-row: auto; }
  .pricelist-discount-rule { grid-template-columns: 72px minmax(130px, 1fr) 20px minmax(130px, 1fr) minmax(120px, .7fr); }
  .pricelist-quick-actions { white-space: normal; }
}

@media (max-width: 620px) {
  .pricelist-source-form,
  .pricelist-master-grid,
  .pricelist-quick-grid { grid-template-columns: 1fr; }
  .pricelist-discount-rule { grid-template-columns: 1fr; }
  .pricelist-discount-rule > span { display: none; }
  .pricelist-table-heading { align-items: flex-start; flex-direction: column; }
  .pricelist-quick-heading { align-items: flex-start; flex-direction: column; }
  .pricelist-quick-heading output { text-align: left; }
  .pricelist-quick-actions { align-items: stretch; flex-direction: column; }
}

/* Angebote */
.offer-overview .table-actions { display: flex; flex-wrap: nowrap; gap: 5px; }
.offer-source-panel { margin-bottom: 10px; padding: 10px 12px; }
.offer-source-form { display: grid; grid-template-columns: minmax(280px, 1fr) auto; align-items: end; gap: 10px; }
.offer-source-form .form-row { margin: 0; }
.offer-phase-details { padding: 0; overflow: hidden; }
.offer-phase-details > summary { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; cursor: pointer; list-style: none; }
.offer-phase-details > summary::-webkit-details-marker { display: none; }
.offer-phase-details > summary span { display: grid; gap: 3px; }
.offer-phase-details > summary small { color: var(--muted); font-weight: 400; }
.offer-phase-details > summary::after { content: '+'; color: var(--muted); font-size: 1.2rem; }
.offer-phase-details[open] > summary::after { content: '−'; }
.offer-phase-details > .details-content { padding: 14px 16px; border-top: 1px solid var(--border); }
.offer-step-heading h3,.offer-step-heading p { margin: 0; }
.offer-step-heading { margin-bottom: 10px; }
.offer-price-source-row { display: grid; grid-template-columns: minmax(280px,1fr) auto; align-items: end; gap: 8px; margin-bottom: 10px; }
.offer-price-source-row .form-row { margin: 0; }
.offer-phase-two[hidden] { display: none; }
.offer-phase-two { margin-top: 14px; }
.offer-phase-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.offer-phase-heading h3,.offer-phase-heading p { margin: 0; }
.offer-master-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.offer-text-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.offer-position-editor { margin-top: 10px; }
.offer-table-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.offer-table-heading h3,.offer-table-heading p { margin: 0; }
.offer-position-tools { display: flex; align-items: center; gap: 7px; }
.offer-position-tools input { width: 220px; height: 34px; }
.offer-position-editor table { min-width: 1080px; table-layout: fixed; }
.offer-position-editor th:nth-child(1) { width: 230px; }
.offer-position-editor th:nth-child(2) { width: 280px; }
.offer-position-editor th:nth-child(3),.offer-position-editor th:nth-child(4) { width: 90px; }
.offer-position-editor th:nth-child(5),.offer-position-editor th:nth-child(6) { width: 120px; }
.offer-position-editor th:nth-child(7) { width: 45px; }
.offer-position-editor td { padding: 5px 4px; border-bottom: 1px solid var(--border); }
.offer-position-editor td input { width: 100%; min-width: 0; height: 32px; padding: 4px 7px; font-size: .78rem; }
.offer-line-total { font-size: .78rem; font-weight: 800; white-space: nowrap; }
.offer-totals,.offer-detail-totals { display: flex; align-items: end; justify-content: flex-end; gap: 0; margin-top: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.offer-totals > div:not(.form-row),.offer-detail-totals > div { display: grid; gap: 2px; min-width: 145px; padding: 0 16px; border-left: 1px solid var(--border); }
.offer-totals span,.offer-detail-totals span { color: var(--muted); font-size: .72rem; }
.offer-totals strong,.offer-detail-totals strong { font-size: .92rem; }
.offer-totals .form-row { width: 150px; margin: 0 16px 0 0; }
.offer-detail-actions { justify-content: flex-end; }
.offer-detail-actions form { margin: 0; }
@media (max-width: 900px) { .offer-master-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .offer-totals,.offer-detail-totals { align-items: stretch; flex-direction: column; gap: 8px; } .offer-totals > div:not(.form-row),.offer-detail-totals > div { width: 100%; padding: 5px 0; border-left: 0; border-top: 1px solid var(--border); } }
@media (max-width: 620px) { .offer-source-form,.offer-price-source-row,.offer-master-grid,.offer-text-grid { grid-template-columns: 1fr; } .offer-phase-heading,.offer-table-heading,.offer-position-tools { align-items: stretch; flex-direction: column; } .offer-position-tools input { width: 100%; } }

/* Gemeinsamer Dokumenteditor für Angebot, Rechnung und Gutschrift */
.document-editor-header { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.document-editor-header .page-actions { flex-wrap: wrap; }
.document-pdf-preview-panel { width: min(1180px, 96vw); height: min(92vh, 960px); }
.document-pdf-preview-panel .modal-header { flex: 0 0 auto; }
.document-pdf-preview-panel .modal-header p { margin: 0 0 3px; }
.document-pdf-preview-actions { display: flex; align-items: center; gap: 8px; }
.document-pdf-preview-status { display: grid; min-height: 120px; place-items: center; padding: 20px; color: var(--muted); font-weight: 700; }
.document-pdf-preview-status[hidden] { display: none; }
.document-pdf-preview-panel iframe { width: 100%; min-height: 0; flex: 1 1 auto; border: 0; background: #eef2ef; }
.document-pdf-preview-panel iframe:not([src]) { display: none; }
.document-editor { max-width: 1280px; margin: 0 auto; padding: 0 8px 32px; }
.document-section { padding: 22px 0 24px; border-bottom: 1px solid #dfe6e2; }
.document-section h3 { margin: 0 0 14px; color: #183e2a; font-size: 1.05rem; }
.document-contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 42px; padding: 22px 20px 24px; border-block: 1px solid var(--border); background: #f8faf9; }
.document-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.document-field-wide { grid-column: 1 / -1; }
.document-editor .form-row { margin-bottom: 8px; }
.document-editor label { margin-bottom: 3px; font-size: .72rem; }
.document-editor input,.document-editor select,.document-editor textarea { border-color: #b8c5bd; border-radius: 5px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.document-editor input:focus,.document-editor select:focus,.document-editor textarea:focus { border-color: #397b52; box-shadow: 0 0 0 3px rgba(57,123,82,.12); outline: 0; }
.document-customer-picker { position: relative; }
.document-customer-search { margin-bottom: 0; }
.document-customer-results { position: absolute; z-index: 35; top: 100%; left: 0; right: 0; max-height: 300px; overflow-y: auto; border: 1px solid #aebdb4; border-radius: 5px; background: #fff; box-shadow: 0 12px 30px rgba(24,62,42,.16); }
.document-customer-result { display: grid; width: 100%; gap: 2px; padding: 9px 11px; border: 0; border-bottom: 1px solid var(--border); background: #fff; color: var(--text); text-align: left; cursor: pointer; }
.document-customer-result:last-child { border-bottom: 0; }
.document-customer-result:hover,.document-customer-result:focus { background: #edf6f0; outline: 0; }
.document-customer-result strong { font-size: .78rem; }
.document-customer-result small { color: var(--muted); font-size: .68rem; }
.document-text-section { display: block; }
.document-text-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.document-template-select { width: min(360px, 55vw); }
.document-template-intro { margin-top: 8px; max-width: 860px; }
.document-template-create { padding: 0; overflow: hidden; }
.document-template-create > summary { padding: 16px 18px; cursor: pointer; font-weight: 800; }
.document-template-create > .details-content { padding: 18px; border-top: 1px solid var(--border); }
.document-template-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.document-template-name,.document-template-text-field,.document-template-active { grid-column: 1/-1; }
.document-template-payment-fields { grid-column: 1/-1; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.document-template-active { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.document-template-list { display: grid; gap: 18px; margin-top: 18px; }
.document-template-group { max-width: none; }
.document-template-group-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.document-template-group-heading h3,.document-template-group-heading p { margin: 0; }
.document-template-cards { display: grid; gap: 10px; }
.document-template-card { border: 1px solid var(--border); border-radius: 10px; background: #fff; overflow: hidden; }
.document-template-card > summary { display: grid; grid-template-columns: minmax(220px,.8fr) minmax(260px,1.2fr); align-items: center; gap: 20px; padding: 14px 16px; cursor: pointer; list-style: none; background: linear-gradient(90deg,#fff,#f4f8f5); }
.document-template-card > summary span:first-child { display: grid; gap: 3px; }
.document-template-card > summary small,.document-template-summary-value { color: var(--muted); }
.document-template-card-body { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 14px; padding: 16px; border-top: 1px solid var(--border); }
@media (max-width: 760px) { .document-template-select { width: 100%; } .document-text-heading { align-items: stretch; flex-direction: column; } .document-template-form-grid,.document-template-payment-fields { grid-template-columns: 1fr; } .document-template-card > summary,.document-template-card-body { grid-template-columns: 1fr; } }
.document-text-section textarea { display: block; width: 100%; min-height: 104px; resize: vertical; }
.document-section-label { display: inline-block; margin: 0 0 10px; padding: 0; background: transparent; color: #183e2a; font-size: .88rem; font-weight: 800; line-height: 1.2; text-transform: none; }
.document-products-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.document-display-toolbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 7px 0 12px; padding: 10px 12px; border-block: 1px solid var(--border); background: #f4f7f5; }
.document-display-toolbar > div { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 9px; }
.document-display-toolbar label { margin: 0; color: var(--muted); white-space: nowrap; }
.document-display-toolbar select { height: 34px; }
.document-price-mode { display: inline-flex; border: 1px solid var(--border); border-radius: 5px; overflow: hidden; }
.document-price-mode label { margin: 0; cursor: pointer; }
.document-price-mode input { position: absolute; opacity: 0; pointer-events: none; }
.document-price-mode span { display: block; min-width: 58px; padding: 7px 10px; color: var(--muted); text-align: center; }
.document-price-mode input:checked + span { background: #e8f4ec; color: #176138; box-shadow: inset 0 0 0 1px #4c9b68; }
.document-product-tools { display: grid; grid-template-columns: minmax(230px, 1fr) auto 220px; align-items: end; gap: 8px; margin: 5px 0 10px; }
.document-product-tools .form-row { margin: 0; }
.document-product-tools > input { height: 34px; }
.document-product-tools-compact { display: flex; justify-content: flex-end; margin-top: 10px; }
.document-product-tools-compact > input { width: min(100%, 260px); }
.document-article-picker { display: flex; align-items: end; gap: 8px; margin: 10px 0; }
.document-article-picker > div { position: relative; width: min(100%, 560px); }
.document-article-picker input { width: 100%; height: 36px; }
.document-article-picker > .button { flex: 0 0 auto; }
.document-article-results { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; max-height: 280px; overflow-y: auto; border: 1px solid #aebdb4; border-radius: 5px; background: #fff; box-shadow: 0 12px 30px rgba(24,62,42,.16); }
.document-article-result { display: grid; width: 100%; gap: 2px; padding: 9px 11px; border: 0; border-bottom: 1px solid var(--border); background: #fff; color: var(--text); text-align: left; cursor: pointer; }
.document-article-result:last-child { border-bottom: 0; }
.document-article-result:hover,.document-article-result:focus { background: #edf6f0; outline: 0; }
.document-article-result strong { font-size: .78rem; }
.document-article-result small { color: var(--muted); font-size: .68rem; }
.document-position-article-results { position: fixed; z-index: 80; max-height: 310px; overflow-y: auto; border: 1px solid #aebdb4; border-radius: 5px; background: #fff; box-shadow: 0 14px 34px rgba(24,62,42,.2); }
.document-article-create { width: 100%; padding: 10px 11px; border: 0; border-top: 1px solid #aebdb4; background: #edf6f0; color: #176138; text-align: left; font-size: .76rem; font-weight: 800; cursor: pointer; }
.document-article-create:hover,.document-article-create:focus { background: #dfeee4; outline: 0; }
.document-modal { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; }
.document-modal[hidden] { display: none; }
.document-modal-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(17,31,23,.52); cursor: default; }
.document-modal-dialog { position: relative; z-index: 1; width: min(100%,760px); max-height: calc(100vh - 40px); overflow-y: auto; border: 1px solid var(--border); border-radius: 7px; background: #fff; box-shadow: 0 24px 70px rgba(8,30,17,.3); }
.document-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.document-modal-header h3,.document-modal-header p { margin: 0; }
.document-modal-dialog form { padding: 18px; }
.document-modal-dialog .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.document-modal-open { overflow: hidden; }
.document-polter-dropdown { margin: 7px 0 10px; border: 1px solid var(--border); border-radius: 5px; background: #fff; }
.document-polter-dropdown > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 38px; padding: 8px 10px; cursor: pointer; list-style: none; }
.document-polter-dropdown > summary::-webkit-details-marker { display: none; }
.document-polter-dropdown > summary::after { content: '⌄'; color: var(--muted); font-size: 1rem; }
.document-polter-dropdown[open] > summary::after { transform: rotate(180deg); }
.document-polter-dropdown > summary strong { font-size: .78rem; }
.document-polter-dropdown > summary span { margin-left: auto; color: var(--muted); font-size: .7rem; }
.document-polter-dropdown-body { border-top: 1px solid var(--border); }
.document-polter-dropdown-body > .billing-polter-search { width: calc(100% - 18px); height: 32px; margin: 8px 9px; }
.document-polter-dropdown-actions { display: flex; justify-content: flex-end; padding: 8px 9px; border-top: 1px solid var(--border); }
.document-polter-picker { margin: 7px 0 10px; border-block: 1px solid var(--border); }
.document-polter-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 2px; }
.document-polter-picker-head > div { display: grid; gap: 2px; }
.document-polter-picker-head strong { font-size: .8rem; }
.document-polter-picker-head span { color: var(--muted); font-size: .7rem; }
.document-polter-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); max-height: 180px; overflow: auto; border-top: 1px solid var(--border); }
.document-polter-list label { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 9px; border-right: 1px solid #e4e9e6; border-bottom: 1px solid #e4e9e6; cursor: pointer; }
.document-polter-list label:nth-child(3n) { border-right: 0; }
.document-polter-list label:has(input:disabled) { color: var(--muted); cursor: not-allowed; background: #f6f8f7; }
.document-polter-list input { width: 15px; height: 15px; flex: 0 0 auto; }
.document-polter-list span { display: grid; min-width: 0; }
.document-polter-list strong,.document-polter-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.document-polter-list strong { font-size: .75rem; }
.document-polter-list small { color: var(--muted); font-size: .66rem; }
.document-position-warning td { background: #fff9e8; }
.document-polter-headers { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; padding: 7px 8px; border: 1px solid var(--border); background: #f7faf8; }
.document-polter-headers > div { display: flex; align-items: baseline; gap: 7px; padding-right: 10px; border-right: 1px solid var(--border); }
.document-polter-headers strong { font-size: .74rem; }
.document-polter-headers span { color: var(--muted); font-size: .68rem; }
.document-tax-warning { display: flex; align-items: center; gap: 8px; margin: 8px 0; padding: 7px 9px; border: 1px solid #e6c96f; background: #fff9e8; color: #6b5100; font-size: .74rem; }
.document-tax-warning select { width: 120px; height: 32px; }
.document-tax-warning .button { min-height: 32px; padding-block: 4px; }
.document-position-table { width: 100%; min-width: 1080px; table-layout: fixed; }
.document-position-table th { padding: 8px 5px; border-bottom: 1px solid #cbd5cf; background: #f2f6f3; color: #4e5f55; font-size: .68rem; }
.document-position-table th:nth-child(1) { width: 330px; }
.document-position-table th:nth-child(2) { width: 82px; }
.document-position-table th:nth-child(3) { width: 68px; }
.document-position-table th:nth-child(4) { width: 75px; }
.document-position-table th:nth-child(5) { width: 100px; }
.document-position-table th:nth-child(6) { width: 85px; }
.document-position-table th:nth-child(7) { width: 90px; }
.document-position-table th:nth-child(8),.document-position-table th:nth-child(9) { width: 105px; text-align: right; }
.document-position-table th:nth-child(10) { width: 42px; }
.document-position-table td { padding: 6px 5px; border-bottom: 1px solid #dfe6e2; vertical-align: top; }
.document-position-table tbody tr:hover td { background: #f8fbf9; }
.document-position-table td input,.document-position-table td select { width: 100%; min-width: 0; height: 32px; padding: 4px 7px; font-size: .76rem; }
.document-position-table td:first-child input:not([type="hidden"]) { margin-bottom: 3px; }
.document-article-fields { display: grid; gap: 3px; }
.document-roundwood-fields { display: none; grid-template-columns: repeat(auto-fit,minmax(48px,62px)); align-items: end; gap: 4px; }
.document-row-roundwood .document-article-fields { display: none; }
.document-row-roundwood .document-roundwood-fields { display: grid; }
.document-roundwood-fields label { display: grid; gap: 2px; margin: 0; }
.document-roundwood-fields label[hidden] { display: none; }
.document-roundwood-fields label > span { overflow: hidden; color: var(--muted); font-size: .61rem; text-overflow: ellipsis; white-space: nowrap; }
.document-roundwood-fields input { margin: 0 !important; }
.document-roundwood-skonto { display: none !important; grid-column: 1 / -1; align-items: center; gap: 6px !important; width: max-content; padding-top: 3px; }
.document-row-roundwood-manual .document-roundwood-skonto { display: flex !important; }
.document-roundwood-skonto input { width: 15px !important; height: 15px !important; }
.document-roundwood-skonto span { color: #24573a !important; font-weight: 700; }
.document-row-roundwood td { background: #f7fbf8; }
.document-row-roundwood:hover td { background: #eef7f1 !important; }
.document-position-section-row th { padding: 7px 9px; border-block: 1px solid #cbd8d0; color: #244b34; font-size: .72rem; font-weight: 800; text-align: left; }
.document-position-section-roundwood th { background: #e7f2ea; }
.document-position-section-article th { background: #f1f3f2; color: #4d5d53; }
.document-piece-empty { display: inline-block; padding-top: 8px; color: var(--muted); }
.document-row-roundwood .document-piece-empty { display: none; }
.document-row-article .document-piece-count { display: none; }
.document-roundwood-summary-row th,.document-roundwood-summary-row td { padding: 9px 8px; background: #edf6f0; border-top: 1px solid #cfe2d4; vertical-align: middle; }
.document-roundwood-summary-row th { color: #24573a; font-size: .74rem; text-align: left; }
.document-roundwood-summary-row span,.document-roundwood-summary-row strong { display: block; font-size: .7rem; white-space: nowrap; }
.document-roundwood-summary-row span { color: var(--muted); }
.document-roundwood-summary-row strong { margin-top: 2px; color: #24573a; }
.document-position-details { color: var(--muted); font-size: .7rem !important; }
.document-position-table td:nth-child(8),.document-position-table td:nth-child(9) { padding-top: 12px; text-align: right; white-space: nowrap; }
.document-position-actions { display: flex; gap: 12px; padding: 9px 2px 0; }
.text-action { padding: 0; border: 0; background: transparent; color: #176b39; font: inherit; font-size: .76rem; font-weight: 700; cursor: pointer; }
.text-action:hover { text-decoration: underline; }
.document-options { padding-bottom: 16px; }
.document-options summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; }
.document-options summary::-webkit-details-marker { display: none; }
.document-options summary::after { content: '+'; color: var(--muted); }
.document-options[open] summary::after { content: '−'; }
.document-options-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; padding-top: 12px; }
.document-total-summary { display: grid; gap: 8px; margin-top: 14px; padding: 16px 18px; border-top: 2px solid #2d6f47; background: #f3f8f5; }
.document-total-summary > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.document-total-summary span { color: var(--text); font-size: .82rem; }
.document-total-summary strong { font-size: .88rem; }
.document-grand-total span,.document-grand-total strong { font-size: 1.14rem; font-weight: 800; }
.document-skonto-settings { display: grid !important; grid-template-columns: repeat(3,minmax(150px,220px)); justify-content: end !important; gap: 10px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.document-skonto-settings .form-row { margin: 0; }
.document-skonto-details { display: grid !important; gap: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
.document-skonto-details[hidden] { display: none !important; }
.document-skonto-details > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.document-skonto-details strong { color: #24573a; }
.document-transfer-total { margin-top: 4px; padding-top: 8px; border-top: 1px solid #9db9a6; }
.document-transfer-total span,.document-transfer-total strong { font-size: 1.02rem; font-weight: 800; }
.article-form { max-width: 920px; }
.article-form .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
@media (max-width: 760px) { .document-contact-grid,.document-info-grid,.document-options-grid,.document-display-toolbar,.article-form .form-grid,.document-modal-dialog .form-grid { grid-template-columns: 1fr; } .document-contact-grid { gap: 12px; padding-inline: 12px; } .document-display-toolbar > div { grid-template-columns: 1fr; } .document-display-toolbar label { white-space: normal; } .document-field-wide { grid-column: auto; } .document-product-tools { grid-template-columns: 1fr; } .document-article-picker { align-items: stretch; flex-direction: column; } .document-article-picker > div { width: 100%; } .document-polter-list { grid-template-columns: 1fr; } .document-polter-list label { border-right: 0; } .document-polter-picker-head,.document-tax-warning { align-items: stretch; flex-direction: column; } .document-tax-warning select { width: 100%; } .document-skonto-settings { grid-template-columns: 1fr; justify-content: stretch !important; } .document-skonto-details > div { align-items: flex-start; flex-direction: column; gap: 2px; } .document-modal { padding: 8px; } .document-modal-dialog { max-height: calc(100vh - 16px); } }
.polter-map-filter {
  margin-bottom: 12px !important;
}

.polter-map-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 360px);
  align-items: start;
  gap: 14px;
}

.polter-map-card {
  min-width: 0;
  margin: 0;
  padding: 10px 12px 12px;
}

.polter-map-heading {
  margin-bottom: 8px;
}

.polter-map-heading h3 {
  margin: 0;
}

.polter-map-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px 12px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 650;
}

.polter-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.polter-map-legend i {
  width: 10px;
  height: 10px;
  border: 2px solid #92400e;
  border-radius: 50%;
  background: #f59e0b;
}

.polter-map-legend i.is-ready { border-color: #14532d; background: #2f8550; }
.polter-map-legend i.is-transit { border-color: #075985; background: #0ea5e9; }
.polter-map-legend i.is-complete { border-color: #475569; background: #94a3b8; }

.polter-overview-map {
  width: 100%;
  height: min(68vh, 680px);
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #eaf0eb;
  z-index: 1;
}

.polter-number-label {
  padding: 3px 7px;
  border: 1px solid #14532d;
  border-radius: 5px;
  background: rgba(255, 255, 255, .96);
  color: #123c24;
  font-size: .72rem;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(15, 45, 28, .16);
}

.polter-number-label::before {
  border-top-color: #14532d !important;
}

.polter-map-empty {
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.polter-map-detail {
  position: sticky;
  top: 18px;
  max-width: none;
  max-height: calc(100vh - 36px);
  margin: 0;
  padding: 16px;
  overflow-y: auto;
}

.polter-map-detail-empty {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.polter-map-detail-empty h3,
.polter-map-detail-empty p {
  margin-top: 0;
}

.polter-map-detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.polter-map-detail-heading h3 {
  margin: 2px 0 0;
}

.polter-map-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 12px 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--border);
}

.polter-map-detail-grid > div {
  min-width: 0;
  padding: 8px 9px;
  background: var(--card);
}

.polter-map-detail-grid dt {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: .67rem;
  font-weight: 750;
  text-transform: uppercase;
}

.polter-map-detail-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: .8rem;
  font-weight: 650;
}

.polter-map-detail-note {
  margin: 12px 0;
  padding: 10px 12px;
  border-left: 3px solid #2f8550;
  background: #f2f8f4;
}

.polter-map-detail-note p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.45;
}

.polter-map-gallery-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 8px;
}

.polter-map-gallery-heading h4 {
  margin: 0;
}

.polter-map-gallery-heading span {
  color: var(--muted);
  font-size: .72rem;
}

.polter-map-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.polter-map-gallery a {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #edf2ee;
}

.polter-map-gallery img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .18s ease;
}

.polter-map-gallery a:hover img {
  transform: scale(1.035);
}

.polter-map-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

@media (max-width: 1050px) {
  .polter-map-workspace {
    grid-template-columns: 1fr;
  }

  .polter-map-detail {
    position: static;
    max-height: none;
  }
}

@media (max-width: 760px) {
  .polter-map-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .polter-map-legend {
    justify-content: flex-start;
  }

  .polter-overview-map {
    height: 58vh;
    min-height: 390px;
  }

  .polter-map-detail-grid {
    grid-template-columns: 1fr;
  }
}

.transport-selection-stats {
  margin-bottom: 18px;
}

.transport-selection-stats .info-card strong {
  display: inline-block;
  margin-right: 5px;
  font-size: 1.65rem;
}

.logistics-transport-card,
.transport-form .form-card {
  max-width: none;
  margin-bottom: 18px;
}

.logistics-transport-table {
  min-width: 1180px;
}

.logistics-polter-table {
  width: 100%;
  min-width: 1250px;
  border-collapse: collapse;
  table-layout: fixed;
}

.logistics-polter-table th,
.logistics-polter-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.logistics-polter-table th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.logistics-polter-table th:nth-child(1) { width: 170px; }
.logistics-polter-table th:nth-child(2) { width: 130px; }
.logistics-polter-table th:nth-child(3) { width: 150px; }
.logistics-polter-table th:nth-child(4) { width: 150px; }
.logistics-polter-table th:nth-child(5) { width: 110px; }
.logistics-polter-table th:nth-child(6) { width: 190px; }
.logistics-polter-table th:nth-child(7) { width: 130px; }
.logistics-polter-table th:nth-child(8) { width: 220px; }

.logistics-actions {
  min-width: 220px;
  align-items: center;
}

.logistics-actions form {
  display: inline-flex;
  margin: 0;
}

.transport-form-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.transport-form-heading strong {
  display: block;
  margin-top: 3px;
  font-size: 1.3rem;
}

.transport-polter-picker table {
  min-width: 880px;
}

.transport-polter-picker tr[hidden] {
  display: none;
}

.transport-status-angeliefert {
  background: #dcefe4;
  color: #245a38;
}

.transport-status-abgeholt {
  background: #dcebf1;
  color: #1d5368;
}

.transport-status-storniert {
  background: #ece8e1;
  color: #6f6558;
}

@media (max-width: 760px) {
  .transport-selection-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Tour planning */
.tour-planning-page{--tour-ink:#18352a;--tour-green:#17633f;--tour-mint:#eaf4ed;--tour-sand:#f5f1e7;--tour-line:#dfe7e1;width:100%;max-width:none;margin:0}
.tour-planning-header{align-items:center}
.tour-planning-header h2{color:var(--tour-ink);letter-spacing:-.035em}
.tour-planning-header .muted{max-width:680px;margin-bottom:0}
.tour-planning-header .page-actions{display:flex;align-items:center;flex-wrap:wrap;gap:9px}
.tour-planning-stage{display:inline-flex;align-items:center;gap:7px;min-height:42px;padding:9px 12px;border:1px solid #cfe2d5;border-radius:10px;background:#f1f8f3;color:#37654a;font-size:.78rem;font-weight:800}
.tour-planning-stage i{width:7px;height:7px;border-radius:50%;background:#4c9968;box-shadow:0 0 0 4px rgba(76,153,104,.12)}
.tour-planning-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:hidden;margin-bottom:16px;border:1px solid var(--tour-line);border-radius:14px;background:#fff;box-shadow:0 10px 30px rgba(20,57,41,.055)}
.tour-planning-stats article{position:relative;display:grid;gap:3px;min-width:0;padding:17px 20px 16px}
.tour-planning-stats article+article{border-left:1px solid var(--tour-line)}
.tour-planning-stats article::before{position:absolute;inset:0 auto 0 0;width:3px;background:#d29b45;content:"";opacity:0}
.tour-planning-stats article:nth-child(3)::before,.tour-planning-stats article:nth-child(4)::before{opacity:1}
.tour-planning-stats span,.tour-planning-stats small{color:#6c7c74;font-size:.74rem}
.tour-planning-stats span{text-transform:uppercase;letter-spacing:.08em;font-weight:800}
.tour-planning-stats strong{color:var(--tour-ink);font-size:1.55rem;line-height:1.1}
.tour-planning-stats em{font-size:.78rem;font-style:normal;font-weight:700}
.tour-planning-setup,.tour-planning-panel{border:1px solid var(--tour-line);border-radius:14px;background:#fff;box-shadow:0 10px 30px rgba(20,57,41,.055)}
.tour-planning-setup{display:grid;grid-template-columns:minmax(245px,.75fr) minmax(500px,1.65fr);gap:24px;align-items:center;margin-bottom:16px;padding:18px 20px}
.tour-planning-setup-intro,.tour-panel-heading,.tour-heading-with-step{display:flex;align-items:center;gap:12px}
.tour-planning-setup-intro h3,.tour-panel-heading h3{margin:0;color:var(--tour-ink);font-size:1.05rem}
.tour-planning-setup-intro p,.tour-panel-heading p{margin:0}
.tour-planning-setup-intro>div>p:last-child{margin-top:3px;color:#718078;font-size:.78rem}
.tour-step-number{display:grid;place-items:center;width:34px;height:34px;flex:0 0 34px;border-radius:50%;background:var(--tour-mint);color:var(--tour-green);font-size:.72rem;font-weight:900}
.tour-planning-fields{display:grid;grid-template-columns:minmax(135px,.65fr) minmax(220px,1.25fr) minmax(130px,.65fr) minmax(190px,1fr);gap:12px}
.tour-planning-fields label{display:grid;gap:6px;min-width:0}
.tour-planning-fields label>span{color:#64756c;font-size:.72rem;font-weight:800}
.tour-planning-fields input,.tour-planning-fields select,.tour-search input{width:100%;min-width:0;height:42px;padding:9px 11px;border:1px solid #d7e1da;border-radius:9px;background:#fbfcfb;color:var(--tour-ink);font:inherit}
.tour-time-settings{margin-bottom:16px;overflow:hidden;border:1px solid var(--tour-line);border-radius:14px;background:#fff;box-shadow:0 10px 30px rgba(20,57,41,.055)}
.tour-time-settings>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 18px;list-style:none;cursor:pointer;background:linear-gradient(90deg,#fff,#f4f8f5)}
.tour-time-settings>summary::-webkit-details-marker{display:none}
.tour-time-settings>summary>div{display:flex;align-items:center;gap:11px}
.tour-time-settings>summary h3,.tour-time-settings>summary p{margin:0}
.tour-time-settings>summary h3{color:var(--tour-ink);font-size:.94rem}
.tour-time-settings>summary>small{color:#60746a;font-size:.7rem;font-weight:800}
.tour-time-settings-body{display:grid;gap:13px;padding:15px 18px 17px;border-top:1px solid #e5ebe7}
.tour-startpoint{display:grid;grid-template-columns:minmax(280px,1fr) auto;gap:8px;align-items:end}
.tour-startpoint label,.tour-time-grid label{display:grid;gap:5px;min-width:0}
.tour-startpoint label>span,.tour-time-grid label>span{color:#64756c;font-size:.68rem;font-weight:800}
.tour-startpoint input,.tour-time-grid input{width:100%;height:39px;padding:8px 10px;border:1px solid #d7e1da;border-radius:8px;background:#fbfcfb;color:var(--tour-ink);font:inherit}
.tour-startpoint>small{grid-column:1/-1;color:#77877f;font-size:.65rem}
.tour-time-grid{display:grid;grid-template-columns:repeat(7,minmax(105px,1fr));gap:8px}
.tour-time-field{position:relative;display:grid;gap:5px;min-width:0}
.tour-field-label{display:flex;align-items:center;gap:5px;min-height:16px}
.tour-time-grid .tour-field-label label{display:block;color:#64756c;font-size:.68rem;font-weight:800}
.tour-info-button{display:inline-grid;width:17px;height:17px;padding:0;border:1px solid #9eb8a8;border-radius:50%;place-items:center;background:#edf5f0;color:#17633f;font:800 .68rem/1 Georgia,serif;cursor:pointer}
.tour-info-button:hover,.tour-info-button:focus-visible,.tour-info-button[aria-expanded="true"]{border-color:#17633f;background:#17633f;color:#fff;outline:none}
.tour-info-button:focus-visible{box-shadow:0 0 0 3px rgba(23,99,63,.18)}
.tour-info-popover{position:absolute;z-index:30;top:66px;right:0;width:290px;max-width:calc(100vw - 48px);padding:12px 13px;border:1px solid #bdd1c4;border-radius:11px;background:#fff;color:#40574b;box-shadow:0 14px 34px rgba(20,57,41,.18)}
.tour-info-popover::before{position:absolute;top:-6px;right:11px;width:10px;height:10px;border-top:1px solid #bdd1c4;border-left:1px solid #bdd1c4;background:#fff;content:"";transform:rotate(45deg)}
.tour-info-popover strong,.tour-info-popover small{display:block}
.tour-info-popover strong{color:#173f2d;font-size:.76rem}
.tour-info-popover p{margin:5px 0;color:#52695d;font-size:.7rem;line-height:1.45}
.tour-info-popover small{color:#72837a;font-size:.64rem;line-height:1.45}
.tour-unit-input{position:relative}
.tour-unit-input input{padding-right:44px}
.tour-unit-input i{position:absolute;top:50%;right:9px;color:#7c8a83;font-size:.61rem;font-style:normal;font-weight:800;transform:translateY(-50%)}
.tour-preload-option{display:flex;align-items:flex-start;gap:9px;padding:10px 11px;border:1px solid #cfe0d4;border-radius:10px;background:#f2f8f4;cursor:pointer}
.tour-preload-option input{width:17px;height:17px;margin-top:1px;accent-color:#17633f}
.tour-preload-option strong,.tour-preload-option small{display:block}
.tour-preload-option strong{color:#244b39;font-size:.75rem}
.tour-preload-option small{margin-top:2px;color:#668073;font-size:.65rem;line-height:1.4}
.tour-policy-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.tour-policy-option{display:flex;align-items:flex-start;gap:8px;min-width:0;padding:9px 10px;border:1px solid #dce5df;border-radius:9px;background:#fbfcfb;cursor:pointer}
.tour-policy-option:has(input:checked){border-color:#a9c7b3;background:#f1f8f3}
.tour-policy-option input{width:16px;height:16px;flex:0 0 16px;margin-top:1px;accent-color:#17633f}
.tour-policy-option strong,.tour-policy-option small{display:block}
.tour-policy-option strong{color:#294b3b;font-size:.69rem}
.tour-policy-option small{margin-top:2px;color:#73827a;font-size:.6rem;line-height:1.35}
.tour-time-disclaimer{margin:0;color:#7a8881;font-size:.62rem;line-height:1.45}
.tour-planning-workspace{display:grid;grid-template-columns:minmax(280px,.82fr) minmax(380px,1.18fr) minmax(290px,.82fr);gap:16px;align-items:start}
.tour-planning-panel{min-width:0;padding:18px}
.tour-panel-heading{padding-bottom:14px;border-bottom:1px solid #edf1ee}
.tour-panel-heading .eyebrow{margin-bottom:3px;font-size:.66rem}
.tour-panel-heading-split{justify-content:space-between}
.tour-panel-lead{margin:14px 0;color:#66766e;font-size:.82rem;line-height:1.5}
.tour-count-badge{min-width:29px;padding:5px 8px;border-radius:999px;background:var(--tour-mint);color:var(--tour-green);font-size:.76rem;font-weight:900;text-align:center}
.tour-objective-list{display:grid;gap:8px}
.tour-objective{position:relative;display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;align-items:center;padding:11px;border:1px solid #dfe7e1;border-radius:10px;background:#fff;cursor:pointer}
.tour-objective:has(input:checked){border-color:#72a887;background:#f1f8f3;box-shadow:inset 3px 0 var(--tour-green)}
.tour-objective input{position:absolute;opacity:0}
.tour-objective-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:#f0f4f1;color:var(--tour-green);font-weight:900}
.tour-objective strong,.tour-objective small{display:block}
.tour-objective strong{color:var(--tour-ink);font-size:.84rem}
.tour-objective small{margin-top:2px;color:#75847c;font-size:.69rem;line-height:1.35}
.tour-criteria-panel h4{margin:19px 0 9px;color:#53655b;font-size:.74rem;text-transform:uppercase;letter-spacing:.08em}
.tour-factor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.tour-factor-grid label{position:relative}
.tour-factor-grid input{position:absolute;opacity:0}
.tour-factor-grid span{display:flex;align-items:center;gap:7px;min-height:38px;padding:8px 9px;border:1px solid #e0e7e2;border-radius:9px;color:#53655b;font-size:.72rem;font-weight:800;cursor:pointer}
.tour-factor-grid input:checked+span{border-color:#a9c7b3;background:var(--tour-mint);color:var(--tour-green)}
.tour-factor-grid i{width:7px;height:7px;border-radius:50%;background:#8d9b94}
.tour-factor-grid input:checked+span i{background:#2a7a4e}
.tour-factor-grid .tour-factor-wide{grid-column:1/-1}
.tour-factor-grid label.is-disabled{opacity:.55}
.tour-factor-grid label.is-disabled span{cursor:not-allowed}
.tour-weather-note{display:flex;gap:10px;margin-top:14px;padding:11px;border-radius:10px;background:var(--tour-sand);color:#705d38}
.tour-weather-note>span{font-size:1.15rem}.tour-weather-note p{margin:0}
.tour-weather-note strong,.tour-weather-note small{display:block}
.tour-weather-note strong{font-size:.74rem}.tour-weather-note small{margin-top:3px;color:#8a7856;font-size:.67rem;line-height:1.35}
.tour-weather-note a,.tour-schedule-facts a{color:#17633f;font-weight:800}
.mobile-tour-weather-result{margin:10px 0;padding:9px 11px;border-radius:10px;background:var(--tour-sand);color:#705d38;font-size:.75rem;font-weight:700;line-height:1.4}
.tour-search{display:flex;align-items:center;gap:7px;margin:12px 0;padding-left:11px;border:1px solid #dfe7e1;border-radius:9px;color:#718078;background:#fbfcfb}
.tour-search input{height:39px;padding-left:0;border:0;background:transparent;outline:0;font-size:.78rem}
.tour-pool-hint{margin:-3px 0 11px;color:#718078;font-size:.67rem;line-height:1.4}
.tour-polter-list{display:grid;gap:8px;max-height:565px;overflow-y:auto;padding-right:3px;scrollbar-color:#b9c9bf transparent;scrollbar-width:thin}
.tour-polter-card{display:grid;grid-template-columns:23px minmax(0,1fr);gap:9px;padding:11px;border:1px solid #e0e7e2;border-radius:10px;background:#fff;transition:border-color .16s ease,background-color .16s ease,box-shadow .16s ease}
.tour-polter-card.is-preselected{border-color:#9bbfa7;background:#f5faf6}
.tour-polter-card.is-suggested{border-color:#4f966a;background:#edf7f0;box-shadow:inset 3px 0 #17633f}
.tour-polter-check{padding-top:2px}.tour-polter-check input{position:absolute;opacity:0}
.tour-polter-check span{display:grid;place-items:center;width:17px;height:17px;border:1.5px solid #b7c4bc;border-radius:5px;background:#f5f7f5;cursor:pointer}
.tour-polter-check input:checked+span{border-color:#17633f;background:#17633f}
.tour-polter-check input:checked+span::after{width:7px;height:4px;border-left:2px solid #fff;border-bottom:2px solid #fff;content:"";transform:translateY(-1px) rotate(-45deg)}
.tour-polter-title{display:flex;justify-content:space-between;gap:10px}
.tour-polter-title strong,.tour-polter-title small{display:block}
.tour-polter-title>div>strong{color:var(--tour-ink);font-size:.86rem}
.tour-polter-title>div>small{margin-top:2px;color:#7a8881;font-size:.68rem}
.tour-polter-title b{flex:0 0 auto;color:var(--tour-green);font-size:.95rem}.tour-polter-title b small{display:inline;font-size:.65rem}
.tour-polter-meta{display:flex;flex-wrap:wrap;gap:5px 12px;margin-top:8px;color:#5e7066;font-size:.69rem}
.tour-polter-tags{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}
.tour-tag{padding:3px 7px;border-radius:999px;background:#eff3f0;color:#66766e;font-size:.62rem;font-weight:800}
.tour-tag.is-priority{background:#fff0dd;color:#9a5a12}.tour-tag.is-warning{background:#fff0e9;color:#a34a2b}.tour-tag.is-location{background:#e9f4ed;color:#277049}
.tour-empty-pool{display:grid;justify-items:center;padding:40px 20px;color:#718078;text-align:center}
.tour-empty-pool>span{display:grid;place-items:center;width:42px;height:42px;margin-bottom:10px;border-radius:50%;background:var(--tour-mint);color:var(--tour-green)}
.tour-empty-pool p{max-width:260px;margin:5px 0 0;font-size:.76rem}
.tour-result-panel{position:sticky;top:92px;background:linear-gradient(180deg,#fff 0%,#fbfcfa 100%)}
.tour-capacity-card{margin:14px 0;padding:13px;border-radius:10px;background:var(--tour-mint)}
.tour-capacity-head,.tour-capacity-scale{display:flex;justify-content:space-between;gap:10px}
.tour-capacity-head{color:#496357;font-size:.74rem}.tour-capacity-head strong{color:var(--tour-green)}
.tour-capacity-track{height:8px;margin:10px 0 6px;overflow:hidden;border-radius:99px;background:#d6e5da}
.tour-capacity-track i{display:block;width:0;height:100%;background:var(--tour-green)}
.tour-capacity-scale{color:#7b8d83;font-size:.61rem}
.tour-route-preview{position:relative;display:grid;grid-template-columns:28px minmax(0,1fr);gap:12px;min-height:152px;padding:14px 4px}
.tour-route-line{position:absolute;top:29px;bottom:29px;left:17px;width:2px;border-left:2px dashed #b8c8be}
.tour-route-point{position:relative;z-index:1;display:grid;place-items:center;grid-column:1;width:28px;height:28px;border-radius:50%;background:var(--tour-green);color:#fff;font-size:.65rem;font-weight:900}
.tour-route-point.is-finish{align-self:end;background:#d7e8dc;color:var(--tour-green)}
.tour-route-empty{grid-column:2;grid-row:1/span 2;align-self:center;color:#6e7e76}
.tour-route-empty strong{color:var(--tour-ink);font-size:.86rem}.tour-route-empty p{margin:4px 0 0;font-size:.71rem;line-height:1.45}
.tour-route-stops{display:grid;gap:8px;margin:0;padding:0;list-style:none}
.tour-route-stops li{display:grid;grid-template-columns:23px minmax(0,1fr) auto;gap:8px;align-items:center}
.tour-route-stops li>span{display:grid;place-items:center;width:23px;height:23px;border-radius:50%;background:#e7f2ea;color:#17633f;font-size:.64rem;font-weight:900}
.tour-route-stops strong,.tour-route-stops small{display:block}
.tour-route-stops strong{color:var(--tour-ink);font-size:.76rem}
.tour-route-stops small{margin-top:1px;color:#77857e;font-size:.62rem}
.tour-route-stops b{color:#17633f;font-size:.7rem;white-space:nowrap}
.tour-route-stops b small{display:block;margin-top:1px;color:#72827a;font-size:.57rem;font-weight:700;text-align:right}
.tour-route-stops li.is-partial>span{background:#fff0dd;color:#9a5a12}
.tour-result-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;margin:2px 0 12px;overflow:hidden;border:1px solid #dfe7e1;border-radius:9px;background:#dfe7e1}
.tour-result-summary div{min-width:0;padding:8px;background:#fff}
.tour-result-summary span,.tour-result-summary strong{display:block;overflow:hidden;text-overflow:ellipsis}
.tour-result-summary span{color:#7b8982;font-size:.58rem;text-transform:uppercase;letter-spacing:.04em}
.tour-result-summary strong{margin-top:3px;color:#18352a;font-size:.69rem;white-space:nowrap}
.tour-result-messages{display:grid;gap:5px;margin-bottom:11px}
.tour-result-messages p{margin:0;padding:7px 8px;border-left:3px solid #d49a3c;border-radius:0 6px 6px 0;background:#fff7e8;color:#73521e;font-size:.66rem;line-height:1.35}
.tour-day-schedule{margin:12px 0;padding:12px;border:1px solid #dce6df;border-radius:11px;background:#fff}
.tour-day-schedule>header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-bottom:9px;border-bottom:1px solid #e9eeeb}
.tour-day-schedule>header h4,.tour-day-schedule>header p{margin:0}
.tour-day-schedule>header h4{color:#18352a;font-size:.82rem}
.tour-day-schedule>header>strong{color:#17633f;font-size:.78rem}
.tour-schedule-result{display:flex;align-items:center;gap:8px}
.tour-schedule-result>span{padding:4px 7px;border-radius:99px;background:#e6f2e9;color:#17633f;font-size:.58rem;font-weight:900;text-transform:uppercase;letter-spacing:.04em}
.tour-schedule-result>span.is-fallback{background:#fff1dc;color:#965c15}
.tour-schedule-result>strong{color:#17633f;font-size:.78rem}
.tour-schedule-facts{display:flex;flex-wrap:wrap;gap:5px;margin:9px 0}
.tour-schedule-facts span{padding:4px 6px;border-radius:99px;background:#edf4ef;color:#506b5d;font-size:.58rem;font-weight:800}
.tour-schedule-day+.tour-schedule-day{margin-top:12px;padding-top:10px;border-top:1px solid #e6ece8}
.tour-schedule-day-heading{display:flex;justify-content:space-between;gap:8px;margin-bottom:7px}
.tour-schedule-day-heading strong{color:#294b3b;font-size:.7rem}
.tour-schedule-day-heading small{color:#7a8881;font-size:.59rem}
.tour-schedule-day ol{display:grid;gap:0;margin:0;padding:0;list-style:none}
.tour-schedule-day li{display:grid;grid-template-columns:38px 12px minmax(0,1fr);gap:7px;min-height:44px}
.tour-schedule-day time{padding-top:2px;color:#64776d;font-size:.62rem;font-weight:850}
.tour-schedule-day li>span{position:relative;width:9px;height:9px;margin-top:3px;border:2px solid #fff;border-radius:50%;background:#438661;box-shadow:0 0 0 2px #b9d3c2}
.tour-schedule-day li:not(:last-child)>span::after{position:absolute;top:9px;bottom:-35px;left:2px;width:2px;background:#d7e3da;content:""}
.tour-schedule-day li>div{min-width:0;padding-bottom:8px}
.tour-schedule-day li strong,.tour-schedule-day li small,.tour-schedule-day li b{display:block}
.tour-schedule-day li strong{color:#18352a;font-size:.68rem}
.tour-schedule-day li small{margin-top:1px;color:#7b8982;font-size:.58rem;line-height:1.3}
.tour-schedule-day li b{margin-top:2px;color:#17633f;font-size:.6rem}
.tour-schedule-day li.is-home-loaded>span,.tour-schedule-day li.is-start-loaded>span{background:#d18c2e;box-shadow:0 0 0 2px #f0d4aa}
.tour-schedule-day li.is-delivery>span{background:#285d91;box-shadow:0 0 0 2px #bfd3e5}
.tour-legal-check{margin-top:12px;padding:11px;border:1px solid #cfe1d4;border-radius:10px;background:#f5faf6}
.tour-legal-check.is-warning{border-color:#edc99a;background:#fff9ef}
.tour-legal-check>header{display:flex;align-items:center;justify-content:space-between;gap:10px}
.tour-legal-check>header p,.tour-legal-check>header h5{margin:0}
.tour-legal-check>header h5{margin-top:2px;color:#244b39;font-size:.72rem}
.tour-legal-check>header>strong{padding:4px 7px;border-radius:99px;background:#dceee1;color:#17633f;font-size:.58rem;text-transform:uppercase}
.tour-legal-check.is-warning>header>strong{background:#ffe8c7;color:#95580e}
.tour-legal-rules{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:9px}
.tour-legal-rules article{display:grid;grid-template-columns:25px minmax(0,1fr);gap:7px;align-items:center;padding:7px;border-radius:8px;background:#fff}
.tour-legal-rules i{display:grid;place-items:center;width:25px;height:25px;border-radius:50%;background:#dceee1;color:#17633f;font-size:.55rem;font-style:normal;font-weight:900}
.tour-legal-rules article.is-warning i{background:#ffe4bd;color:#995a0c}
.tour-legal-rules article.is-open i{background:#e9ecea;color:#68766f}
.tour-legal-rules strong,.tour-legal-rules small{display:block}
.tour-legal-rules strong{color:#294b3b;font-size:.62rem}
.tour-legal-rules small{margin-top:1px;color:#74837b;font-size:.56rem;line-height:1.3}
.tour-legal-check>p{margin:9px 0 0;color:#78867f;font-size:.57rem;line-height:1.4}
.tour-example{margin:5px 0 14px;padding:12px;border:1px dashed #c8d5cd;border-radius:10px;background:#fff}
.tour-example>span{display:block;margin-bottom:8px;color:#7b8982;font-size:.64rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
.tour-example>div,.tour-example>p{display:flex;justify-content:space-between;margin:0;padding:6px 0;color:#4f6359;font-size:.73rem}
.tour-example>i{display:block;height:0;color:#9aa9a0;font-size:.7rem;font-style:normal;text-align:center}
.tour-example>p{margin-top:5px;padding-top:9px;border-top:1px solid #e4eae6;color:var(--tour-green)}
.tour-calculate-button{position:relative;width:100%}.tour-calculate-button:disabled{opacity:.5;cursor:not-allowed;transform:none}
.tour-calculate-button.is-loading{color:transparent;pointer-events:none}
.tour-calculate-button.is-loading::after{position:absolute;width:16px;height:16px;border:2px solid rgba(255,255,255,.45);border-top-color:#fff;border-radius:50%;content:"";animation:tour-button-spin .7s linear infinite}
.tour-navigation-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0 8px}
.tour-navigation-actions[hidden]{display:none}
.tour-map-open{overflow:hidden}
.tour-map-dialog{position:fixed;z-index:1300;inset:0;display:grid;place-items:center;padding:22px;background:rgba(18,38,29,.68);backdrop-filter:blur(5px)}
.tour-map-dialog[hidden]{display:none}
.tour-map-sheet{width:min(1120px,100%);max-height:calc(100vh - 44px);overflow:auto;border:1px solid #d8e4dc;border-radius:18px;background:#fff;box-shadow:0 30px 80px rgba(8,29,19,.28)}
.tour-map-sheet>header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 18px;border-bottom:1px solid #e4ebe6}
.tour-map-sheet>header p,.tour-map-sheet>header h3{margin:0}.tour-map-sheet>header h3{color:#18352a;font-size:1.05rem}
.tour-map-close{display:grid;place-items:center;width:38px;height:38px;border:1px solid #d8e2db;border-radius:50%;background:#f7faf8;color:#385648;font-size:1.5rem;cursor:pointer}
.tour-navigation-map{height:min(60vh,610px);min-height:420px;background:#edf2ee}
.tour-navigation-status{margin:0;padding:9px 18px;border-top:1px solid #e4ebe6;color:#687a70;font-size:.72rem}
.tour-location-help{margin:10px 18px;padding:11px 12px;border:1px solid #edc99a;border-radius:10px;background:#fff8eb;color:#72501f}
.tour-location-help strong{display:block;font-size:.72rem}.tour-location-help p{margin:4px 0 7px;font-size:.65rem;line-height:1.4}
.tour-location-help ol{display:grid;gap:3px;margin:0;padding-left:18px;font-size:.62rem;line-height:1.4}
.tour-navigation-next{display:grid;gap:2px;padding:12px 18px;border-bottom:1px solid #e4ebe6;background:linear-gradient(90deg,#edf7f0,#fafcfb)}
.tour-navigation-next span{color:#668073;font-size:.62rem;font-weight:900;text-transform:uppercase;letter-spacing:.07em}
.tour-navigation-next strong{color:#18352a;font-size:.9rem}.tour-navigation-next small{color:#718078;font-size:.68rem}
.tour-order-marker-shell{border:0;background:transparent}
.tour-order-marker{display:grid;place-items:center;width:34px;height:34px;border:3px solid #fff;border-radius:50%;background:#17633f;color:#fff;font-size:.78rem;font-weight:950;box-shadow:0 4px 13px rgba(14,49,31,.36)}
.tour-order-marker.is-delivery{background:#285d91}.tour-order-marker.is-home{background:#d18c2e}
.tour-map-legend{display:flex;flex-wrap:wrap;gap:6px;padding:7px 9px;border:1px solid rgba(34,63,48,.16);border-radius:9px;background:rgba(255,255,255,.94);box-shadow:0 5px 16px rgba(17,46,31,.15)}
.tour-map-legend span{display:flex;align-items:center;gap:4px;color:#385648;font-size:.58rem;font-weight:850}
.tour-map-legend i{width:9px;height:9px;border-radius:50%;background:#17633f}.tour-map-legend i.is-delivery{background:#285d91}.tour-map-legend i.is-home{background:#d18c2e}
.tour-navigation-stops{max-height:190px;overflow:auto;padding:10px 18px;border-top:1px solid #e4ebe6;background:#fbfcfb}
.tour-navigation-stops ol{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:0;padding:0;list-style:none}
.tour-navigation-stops li{display:grid;grid-template-columns:27px minmax(0,1fr);gap:8px;align-items:center;padding:7px;border:1px solid #e1e8e3;border-radius:8px;background:#fff}
.tour-navigation-stops li>b{display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:#17633f;color:#fff;font-size:.65rem}
.tour-navigation-stops li strong,.tour-navigation-stops li small{display:block}.tour-navigation-stops li strong{color:#18352a;font-size:.66rem}.tour-navigation-stops li small{margin-top:2px;color:#718078;font-size:.56rem;line-height:1.3}
.tour-google-sections{display:grid;gap:6px;padding:11px 18px;border-top:1px solid #e4ebe6;background:#f4f8f5}
.tour-google-sections[hidden]{display:none}
.tour-google-sections>strong{color:#18352a;font-size:.72rem}.tour-google-sections>small{color:#687a70;font-size:.62rem;line-height:1.4}
.tour-google-sections>div{display:flex;flex-wrap:wrap;gap:7px}.tour-google-sections .button{min-height:34px;padding:7px 10px;font-size:.64rem}
.tour-map-sheet>footer{display:flex;justify-content:flex-end;gap:9px;padding:13px 18px;border-top:1px solid #e4ebe6}
.tour-map-sheet>footer .is-active{background:#a9482c;border-color:#a9482c}
@keyframes tour-button-spin{to{transform:rotate(360deg)}}
.tour-coming-soon{display:block;margin-top:8px;color:#85928b;font-size:.66rem;text-align:center}
@media(max-width:1220px){.tour-planning-workspace{grid-template-columns:minmax(280px,.85fr) minmax(390px,1.15fr)}.tour-result-panel{position:static;grid-column:1/-1}}
@media(max-width:1100px){.tour-time-grid{grid-template-columns:repeat(4,minmax(110px,1fr))}.tour-policy-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.tour-planning-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.tour-planning-stats article:nth-child(3){border-left:0;border-top:1px solid var(--tour-line)}.tour-planning-stats article:nth-child(4){border-top:1px solid var(--tour-line)}.tour-planning-setup{grid-template-columns:1fr}.tour-planning-workspace{grid-template-columns:1fr}.tour-result-panel{grid-column:auto}.tour-time-grid{grid-template-columns:repeat(2,minmax(120px,1fr))}}
@media(max-width:680px){.tour-planning-header .page-actions,.tour-planning-header .page-actions>*{width:100%}.tour-planning-fields{grid-template-columns:1fr}.tour-planning-stats article{padding:14px}.tour-planning-stats strong{font-size:1.3rem}.tour-factor-grid,.tour-policy-grid,.tour-legal-rules,.tour-navigation-actions,.tour-navigation-stops ol{grid-template-columns:1fr}.tour-polter-list{max-height:none}.tour-startpoint{grid-template-columns:1fr}.tour-startpoint>small{grid-column:auto}.tour-time-grid{grid-template-columns:1fr}.tour-time-settings>summary{align-items:flex-start}.tour-time-settings>summary>small{display:none}.tour-map-dialog{padding:0}.tour-map-sheet{width:100%;height:100%;max-height:none;border:0;border-radius:0}.tour-navigation-map{height:calc(100vh - 360px);min-height:300px}.tour-google-sections>div{display:grid}.tour-map-sheet>footer{position:sticky;bottom:0;display:grid;grid-template-columns:1fr;background:#fff}.tour-map-sheet>footer .button{width:100%}}

/* Modern operational overview system */
.modern-overview {
  --modern-ink: #18352a;
  --modern-green: #17633f;
  --modern-line: #dfe7e1;
  --modern-muted: #6c7c74;
  width: 100%;
  max-width: none;
  margin: 0;
}

.modern-overview-header {
  align-items: center;
}

.modern-overview-header h2 {
  color: var(--modern-ink);
  letter-spacing: -.035em;
}

.modern-overview-header .muted {
  max-width: 720px;
  margin: 6px 0 0;
  line-height: 1.5;
}

.modern-overview-header .page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
}

.modern-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  margin: 0 0 16px;
  border: 1px solid var(--modern-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(20, 57, 41, .055);
}

.modern-kpi-grid-compact {
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  max-width: none;
}

.modern-kpi-card {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 76px;
  overflow: hidden;
  padding: 12px 17px;
  border: 0;
  border-right: 1px solid var(--modern-line);
  border-radius: 0;
  background: linear-gradient(145deg, #fff 15%, #f6faf7 100%);
  box-shadow: none;
}

.modern-kpi-card:last-child {
  border-right: 0;
}

.modern-kpi-card::after {
  position: absolute;
  top: -30px;
  right: -29px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(35, 119, 73, .055);
  content: "";
}

.modern-kpi-icon,
.modern-section-icon {
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #e8f4ec;
  color: #17633f;
  font-family: "Segoe UI Symbol", "Segoe UI", sans-serif;
  font-weight: 900;
}

.modern-kpi-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: .82rem;
}

.modern-kpi-card.is-blue {
  background: linear-gradient(145deg, #fff 15%, #f2f8fa 100%);
}

.modern-kpi-card.is-blue .modern-kpi-icon {
  background: #e4f1f5;
  color: #28677c;
}

.modern-kpi-card.is-sand {
  background: linear-gradient(145deg, #fff 15%, #faf7ef 100%);
}

.modern-kpi-card.is-sand .modern-kpi-icon {
  background: #f4ecd9;
  color: #8a672b;
}

.modern-kpi-card.is-alert {
  background: linear-gradient(145deg, #fff 15%, #fcf5f0 100%);
}

.modern-kpi-card.is-alert .modern-kpi-icon {
  background: #f8e7dc;
  color: #a4502d;
}

.modern-kpi-card h4,
.modern-kpi-card strong,
.modern-kpi-card small {
  display: block;
  margin: 0;
}

.modern-kpi-card h4 {
  color: var(--modern-muted);
  font-size: .69rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.modern-kpi-card strong {
  margin-top: 2px;
  color: var(--modern-ink);
  font-size: 1.2rem;
  line-height: 1.05;
}

.modern-kpi-card strong em {
  font-size: .74rem;
  font-style: normal;
}

.modern-kpi-card small {
  margin-top: 2px;
  color: #78877f;
  font-size: .65rem;
}

.form-card.filter-panel.compact-overview-filter.modern-filter-card {
  max-width: none;
  overflow: hidden;
  margin: 0 0 16px;
  padding: 0;
  border: 1px solid var(--modern-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(20, 57, 41, .055);
}

.modern-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 17px;
  border-bottom: 1px solid #e9efeb;
  background: linear-gradient(90deg, #fbfcfb, #f6faf7);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.modern-section-heading::-webkit-details-marker {
  display: none;
}

.modern-filter-card:not([open]) .modern-section-heading {
  border-bottom-color: transparent;
}

.modern-section-heading:hover {
  background: linear-gradient(90deg, #f8fbf9, #f0f7f3);
}

.modern-section-heading:focus-visible {
  outline: 3px solid rgba(23, 99, 63, .16);
  outline-offset: -3px;
}

.modern-section-heading > div {
  display: flex;
  align-items: center;
  gap: 11px;
}

.modern-section-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  font-size: .8rem;
}

.modern-section-heading h3,
.modern-section-heading p {
  margin: 0;
}

.modern-section-heading h3 {
  color: var(--modern-ink);
  font-size: .92rem;
}

.modern-section-heading p {
  margin-top: 2px;
  color: #74837b;
  font-size: .69rem;
}

.modern-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  min-width: 82px;
  padding: 6px 9px;
  border: 1px solid #d6e1da;
  border-radius: 8px;
  background: #fff;
  color: #53675c;
}

.modern-filter-toggle b {
  font-size: .69rem;
}

.modern-filter-toggle i {
  width: 7px;
  height: 7px;
  border-right: 2px solid #52715f;
  border-bottom: 2px solid #52715f;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .18s ease;
}

.modern-filter-card[open] .modern-filter-toggle i {
  transform: rotate(225deg) translate(-1px, -1px);
}

.modern-filter-card form {
  padding: 14px 16px 13px;
}

.modern-filter-card.compact-overview-filter .filter-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.modern-filter-card .bereitstellung-filter-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.modern-filter-card .modern-filter-search {
  grid-column: span 2;
}

.modern-filter-card.compact-overview-filter label {
  margin-bottom: 2px;
  color: #617169;
  font-size: .69rem;
  font-weight: 800;
}

.modern-filter-card.compact-overview-filter input,
.modern-filter-card.compact-overview-filter select {
  height: 40px;
  min-height: 40px;
  padding: 8px 10px;
  border-color: #d8e2dc;
  border-radius: 9px;
  background: #fbfcfb;
  font-size: .78rem;
}

.modern-filter-card.compact-overview-filter input:focus,
.modern-filter-card.compact-overview-filter select:focus {
  border-color: #6da184;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(23, 99, 63, .1);
}

.modern-filter-card.compact-overview-filter .filter-actions {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid #edf1ee;
}

.modern-filter-card.compact-overview-filter .button {
  height: 36px;
  min-height: 36px;
  border-radius: 8px;
}

.table-card.compact-overview-table.modern-table-card {
  max-width: none;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--modern-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(20, 57, 41, .055);
}

.modern-table-card .modern-table-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 17px;
  border-bottom: 1px solid #e7ede9;
  background: #fff;
}

.modern-table-heading h3,
.modern-table-heading p {
  margin: 0;
}

.modern-table-heading .eyebrow {
  margin-bottom: 3px;
  font-size: .63rem;
}

.modern-table-heading h3 {
  color: var(--modern-ink);
  font-size: 1rem;
}

.modern-table-heading .muted.small {
  margin-top: 3px;
  font-size: .69rem;
}

.modern-result-count {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  background: #e8f4ec;
  color: var(--modern-green);
  font-size: .72rem;
  font-weight: 900;
}

.modern-table-card .table-scroll {
  width: 100%;
  overflow-x: auto;
}

.modern-table-card table {
  margin: 0;
  background: #fff;
}

.modern-table-card table thead {
  background: #f4f7f5;
}

.modern-table-card.compact-overview-table thead tr {
  border-bottom: 1px solid #ccd8d0;
}

.modern-table-card.compact-overview-table th {
  padding: 10px 9px;
  color: #617169;
  font-size: .67rem;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.modern-table-card.compact-overview-table td {
  padding: 10px 9px;
  color: #253b31;
  vertical-align: middle;
}

.modern-table-card.compact-overview-table tbody tr {
  border-bottom-color: #e3e9e5;
  transition: background-color .14s ease;
}

.modern-table-card.compact-overview-table tbody tr:hover {
  background: #f7faf8;
}

.modern-table-card.compact-overview-table .muted.small {
  margin-top: 3px;
  color: #7a8881;
  font-size: .69rem;
  line-height: 1.25;
}

.modern-table-card .status-badge {
  border: 0;
  background: #e8f2eb;
  color: #315a42;
}

.modern-table-card .status-inprogress {
  background: #e2f2e7;
  color: #17633f;
}

.modern-table-card .status-planned {
  background: #e3f0f5;
  color: #28677c;
}

.modern-table-card .status-completed {
  background: #dff1e8;
  color: #176648;
}

.modern-table-card.compact-overview-table .button {
  height: 32px;
  min-height: 32px;
  border-radius: 8px;
  box-shadow: none;
  font-size: .72rem;
}

.modern-table-card .row-actions,
.modern-table-card .table-actions {
  flex-wrap: wrap;
  gap: 5px;
}

.modern-table-card .row-actions form,
.modern-table-card .table-actions form {
  margin: 0;
}

.modern-table-card-dense table {
  min-width: 1380px;
}

.modern-overview .table-pagination {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--modern-line);
  border-radius: 10px;
  background: #fff;
}

@media (max-width: 1180px) {
  .modern-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modern-kpi-card:nth-child(2) {
    border-right: 0;
  }

  .modern-kpi-card:nth-child(n+3) {
    border-top: 1px solid var(--modern-line);
  }

  .modern-kpi-grid-compact .modern-kpi-card {
    border-top: 0;
  }

  .modern-filter-card.compact-overview-filter .filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .modern-filter-card .bereitstellung-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  .modern-overview-header .page-actions,
  .modern-overview-header .page-actions > * {
    width: 100%;
  }

  .modern-kpi-grid,
  .modern-kpi-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }

  .modern-kpi-card {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    min-height: 72px;
    padding: 11px 13px;
  }

  .modern-kpi-icon {
    width: 34px;
    height: 34px;
  }

  .modern-kpi-card strong {
    font-size: 1.12rem;
  }

  .modern-filter-card.compact-overview-filter .filter-grid,
  .modern-filter-card .bereitstellung-filter-grid {
    grid-template-columns: 1fr !important;
  }

  .modern-filter-card .modern-filter-search {
    grid-column: auto;
  }

  .modern-filter-card.compact-overview-filter .filter-actions {
    flex-direction: row;
  }

  .modern-filter-card.compact-overview-filter .filter-actions > * {
    flex: 1;
  }
}

@media (max-width: 480px) {
  .modern-kpi-grid,
  .modern-kpi-grid-compact {
    grid-template-columns: 1fr;
  }

  .modern-kpi-card,
  .modern-kpi-card:nth-child(2),
  .modern-kpi-grid-compact .modern-kpi-card {
    border-right: 0;
    border-top: 1px solid var(--modern-line);
  }

  .modern-kpi-card:first-child {
    border-top: 0;
  }

  .modern-section-heading p {
    display: none;
  }

  .modern-filter-toggle {
    min-width: auto;
  }

  .modern-filter-toggle b {
    display: none;
  }
}

/* Shared desktop redesign layer */
.desktop-modern {
  background:
    radial-gradient(circle at 78% 8%, rgba(57, 126, 85, .055), transparent 28rem),
    #f4f7f5;
}

.desktop-modern .main-content {
  background: transparent;
}

.desktop-modern .topbar {
  background: rgba(244, 247, 245, .92);
  backdrop-filter: blur(12px);
}

.desktop-modern .search-input-wrap {
  border-color: #dce5df;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 5px 18px rgba(20, 57, 41, .055);
}

.desktop-modern .page-header:not(.tour-planning-header):not(.modern-overview-header) {
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 17px;
  border-bottom: 1px solid #dfe7e1;
}

.desktop-modern .page-header h2 {
  color: #18352a;
  letter-spacing: -.03em;
}

.desktop-modern .page-header .muted,
.desktop-modern .page-intro {
  max-width: 760px;
  line-height: 1.5;
}

.desktop-modern .page-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.desktop-modern :is(.form-card, .table-card, .panel, .info-card) {
  border-color: #dfe7e1;
  border-radius: 14px;
  background-color: #fff;
  box-shadow: 0 10px 30px rgba(20, 57, 41, .055);
}

.desktop-modern .form-card {
  max-width: none;
}

.desktop-modern .cards-grid,
.desktop-modern .tiles-grid:not(.compact-overview-stats) {
  gap: 14px;
}

.desktop-modern .info-card h3,
.desktop-modern .info-card h4 {
  color: #29483a;
}

.desktop-modern .info-card p {
  line-height: 1.5;
}

.desktop-modern :is(.form-row, .filter-field) label {
  color: #617169;
  font-size: .78rem;
  font-weight: 800;
}

.desktop-modern :is(.form-row, .filter-field) :is(input, select, textarea) {
  border-color: #d8e2dc;
  border-radius: 9px;
  background: #fbfcfb;
}

.desktop-modern :is(.form-row, .filter-field) :is(input, select, textarea):focus {
  border-color: #6da184;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(23, 99, 63, .1);
}

.desktop-modern .panel-header {
  border-bottom-color: #e4ebe6;
}

.desktop-modern .panel-header h3 {
  color: #18352a;
}

.desktop-modern .table-card {
  overflow: hidden;
}

.desktop-modern .table-card > .table-scroll {
  overflow-x: auto;
}

.desktop-modern .table-card table {
  background: #fff;
}

.desktop-modern .table-card thead {
  background: #f4f7f5;
}

.desktop-modern .table-card th {
  color: #617169;
  font-size: .72rem;
  letter-spacing: .025em;
}

.desktop-modern .table-card tbody tr {
  border-bottom-color: #e2e9e4;
  transition: background-color .14s ease;
}

.desktop-modern .table-card tbody tr:hover {
  background: #f7faf8;
}

.desktop-modern .status-badge:not(.status-error):not(.status-warning) {
  border-color: transparent;
}

.desktop-modern .accordion-section,
.desktop-modern details.form-card {
  border-color: #dfe7e1;
  background: #fff;
}

.desktop-modern .alert {
  border-radius: 10px;
  box-shadow: 0 5px 18px rgba(20, 57, 41, .04);
}

.desktop-modern .tiles-grid.compact-overview-stats {
  overflow: hidden;
  margin-bottom: 14px;
  padding: 0;
  border-color: #dfe7e1;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(20, 57, 41, .045);
}

.desktop-modern .compact-overview-stats .info-card {
  min-height: 58px;
  padding: 11px 17px;
  border-right-color: #dfe7e1;
  background: linear-gradient(145deg, #fff, #f7faf8);
}

.desktop-modern .compact-overview-stats .info-card:first-child {
  padding-left: 17px;
}

.desktop-modern .compact-overview-stats .info-card h4 {
  color: #687970;
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.desktop-modern .compact-overview-stats .info-card p {
  color: #18352a;
  font-size: 1.02rem;
}

.desktop-collapsible-filter {
  overflow: hidden;
  padding: 0 !important;
  border-color: #dfe7e1 !important;
  border-radius: 14px !important;
  background: #fff !important;
}

.desktop-collapsible-filter > .desktop-filter-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid #e6ece8;
  background: linear-gradient(90deg, #fbfcfb, #f5f9f6);
  color: #18352a;
  font: inherit;
  font-size: .82rem;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
}

.desktop-collapsible-filter > .desktop-filter-toggle::before {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-right: 10px;
  border-radius: 8px;
  background: #e8f4ec;
  color: #17633f;
  content: "\2630";
  font-family: "Segoe UI Symbol", "Segoe UI", sans-serif;
  font-size: .72rem;
}

.desktop-collapsible-filter > .desktop-filter-toggle::after {
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-right: 2px solid #52715f;
  border-bottom: 2px solid #52715f;
  content: "";
  transform: rotate(225deg);
  transition: transform .18s ease;
}

.desktop-collapsible-filter > .desktop-filter-toggle:hover {
  background: linear-gradient(90deg, #f8fbf9, #eef6f1);
}

.desktop-collapsible-filter > .desktop-filter-toggle:focus-visible {
  outline: 3px solid rgba(23, 99, 63, .16);
  outline-offset: -3px;
}

.desktop-collapsible-filter > form {
  padding: 14px 16px 13px;
}

.desktop-collapsible-filter.is-collapsed > .desktop-filter-toggle {
  border-bottom-color: transparent;
}

.desktop-collapsible-filter.is-collapsed > .desktop-filter-toggle::after {
  transform: rotate(45deg);
}

.desktop-collapsible-filter.is-collapsed > form {
  display: none;
}

.modern-kpi-grid-five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.modern-map-filter-body {
  padding: 14px 16px 13px;
}

.modern-map-filter-body .filter-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 0;
}

.modern-map-filter-body .modern-filter-search {
  grid-column: span 2;
}

.modern-map-filter-body .filter-actions {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid #edf1ee;
}

.modern-overview-map .polter-map-card {
  padding: 0 0 12px;
  border-color: #dfe7e1;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(20, 57, 41, .055);
}

.modern-overview-map .polter-map-heading {
  margin-bottom: 0;
  padding: 14px 16px;
}

.modern-overview-map .polter-overview-map {
  width: calc(100% - 24px);
  margin: 12px;
  border-color: #cfdcd3;
  border-radius: 10px;
}

.modern-map-detail {
  border-color: #dfe7e1;
  background: #fff;
}

@media (max-width: 1180px) {
  .modern-kpi-grid-five {
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    overflow-x: auto;
  }

  .modern-kpi-grid-five .modern-kpi-card {
    border-top: 0;
  }

  .modern-kpi-grid-five .modern-kpi-card:nth-child(2) {
    border-right: 1px solid var(--modern-line);
  }

  .modern-map-filter-body .filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .desktop-modern .page-header:not(.tour-planning-header):not(.modern-overview-header) {
    align-items: flex-start;
  }

  .desktop-modern .page-header .page-actions,
  .desktop-modern .page-header .page-actions > * {
    width: 100%;
  }

  .modern-kpi-grid-five {
    grid-template-columns: repeat(5, minmax(142px, 1fr));
  }

  .modern-map-filter-body .filter-grid {
    grid-template-columns: 1fr;
  }

  .modern-map-filter-body .modern-filter-search {
    grid-column: auto;
  }
}

/* Werksabrechnung and automatic assignment use the shared desktop surfaces. */
.desktop-modern .werksabrechnung-modern-filter .filter-grid {
  grid-template-columns: minmax(260px, 1.5fr) minmax(150px, .7fr) minmax(190px, .9fr) auto;
  align-items: end;
}

.desktop-modern .werksabrechnung-modern-filter .form-actions {
  margin: 0;
  flex-wrap: nowrap;
}

.desktop-modern .modern-kpi-status {
  overflow: hidden;
  font-size: .94rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desktop-modern .werksabrechnung-detail-meta.modern-meta-strip {
  margin-bottom: 16px;
  padding: 0;
  overflow: hidden;
  border-color: #dfe7e1;
  border-radius: 12px;
  background: linear-gradient(145deg, #fff, #f7faf8);
  box-shadow: 0 8px 24px rgba(20, 57, 41, .045);
}

.desktop-modern .werksabrechnung-detail-meta.modern-meta-strip div {
  padding: 11px 14px;
  border-right-color: #dfe7e1;
}

.desktop-modern .werksabrechnung-detail-meta.modern-meta-strip div:first-child {
  padding-left: 14px;
}

.desktop-modern .werksabrechnung-polter-table {
  margin-bottom: 16px;
  padding: 0;
  border-color: #dfe7e1;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(20, 57, 41, .055);
}

.desktop-modern .eldat-fixed-positions {
  padding: 0 14px 14px;
  overflow: hidden;
  border: 1px solid #dfe7e1;
  border-radius: 14px;
  background: #f7faf8;
  box-shadow: 0 10px 30px rgba(20, 57, 41, .045);
}

.desktop-modern .eldat-fixed-positions .modern-section-surface {
  margin: 0 -14px 14px;
  padding: 14px 16px;
  border-bottom: 1px solid #e3eae5;
  background: linear-gradient(90deg, #fff, #f4f8f5);
}

.desktop-modern .eldat-position-group {
  border: 1px solid #dfe7e1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(20, 57, 41, .035);
}

.desktop-modern .eldat-position-group summary {
  padding: 13px 15px;
  transition: background-color .15s ease;
}

.desktop-modern .eldat-position-group summary:hover {
  background: #f5f9f6;
}

.desktop-modern .eldat-position-group[open] summary {
  border-bottom: 1px solid #e3eae5;
  background: linear-gradient(90deg, #fbfcfb, #f4f8f5);
}

.desktop-modern .eldat-position-group .table-scroll {
  border-top: 0;
}

.desktop-modern .auto-assignment-filter .auto-filter-checkbox {
  min-height: 38px;
  border-color: #d8e2db;
  border-radius: 8px;
  background: #f8faf9;
}

.desktop-modern .auto-assignment-group {
  padding: 0;
  overflow: hidden;
  border: 1px solid #dfe7e1;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(20, 57, 41, .045);
}

.desktop-modern .auto-assignment-group-summary {
  min-height: 62px;
  padding: 13px 16px;
  background: linear-gradient(90deg, #fff, #f4f8f5);
  transition: background-color .15s ease;
}

.desktop-modern .auto-assignment-group-summary:hover {
  background: #eef6f1;
}

.desktop-modern .auto-assignment-group-details[open] .auto-assignment-group-summary {
  border-bottom: 1px solid #e3eae5;
}

.desktop-modern .auto-assignment-group-body {
  padding: 14px 16px 16px;
}

.desktop-modern .auto-candidate {
  padding: 15px;
  border-color: #dfe7e1;
  border-radius: 12px;
  background: linear-gradient(145deg, #fff, #fafcfb);
  box-shadow: 0 4px 14px rgba(20, 57, 41, .035);
}

.desktop-modern .auto-candidate.selected {
  border-color: #81b698;
  background: linear-gradient(145deg, #fff, #f0f8f3);
  box-shadow: inset 4px 0 0 #247a45, 0 7px 20px rgba(20, 57, 41, .07);
}

.desktop-modern .auto-candidate-assigned,
.desktop-modern .auto-work-detail-summary {
  border-color: #dfe7e1;
  border-radius: 9px;
}

.desktop-modern .auto-assignment-save-footer {
  position: sticky;
  bottom: 10px;
  z-index: 4;
  margin-top: 16px;
  padding: 11px 13px;
  border: 1px solid #d8e3db;
  border-radius: 12px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 10px 30px rgba(20, 57, 41, .11);
  backdrop-filter: blur(8px);
}

@media (max-width: 1050px) {
  .desktop-modern .werksabrechnung-modern-filter .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .desktop-modern .werksabrechnung-modern-filter .filter-grid {
    grid-template-columns: 1fr;
  }

  .desktop-modern .werksabrechnung-modern-filter .form-actions {
    flex-wrap: wrap;
  }

  .desktop-modern .auto-assignment-group-body {
    padding: 12px;
  }

  .desktop-modern .auto-assignment-save-footer {
    position: static;
  }
}
