:root{color-scheme:light;--bg:#f4f6f8;--card:#fff;--text:#17202a;--muted:#68717c;--line:#dfe4ea;--accent:#185abd;--dark:#101828;--loss:#b42318;--lossbg:#fff1f0;--gain:#067647;--gainbg:#ecfdf3}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;line-height:1.5}.topbar{background:var(--dark);color:#fff;display:flex;justify-content:space-between;align-items:center;padding:14px clamp(16px,4vw,48px);gap:20px}.topbar>div{display:flex;gap:12px;align-items:baseline}.topbar span{font-size:.85rem;color:#c8d0dc}.topbar nav{display:flex;gap:8px;flex-wrap:wrap}.topbar a{color:#dce6f5;text-decoration:none;padding:7px 10px;border-radius:7px}.topbar a[aria-current=page],.topbar a:hover{background:#263447;color:#fff}.container{width:min(1840px,calc(100% - 32px));margin:22px auto 42px}.card,.metric-card,.verdict{background:var(--card);border:1px solid var(--line);border-radius:14px;box-shadow:0 4px 18px rgba(16,24,40,.05)}.card{padding:24px}.section-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start}.eyebrow{margin:0 0 3px;color:var(--accent);font-size:.78rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em}h1{font-size:clamp(1.45rem,3vw,2.1rem);margin:0 0 18px}h2{font-size:1.05rem;margin:4px 0 16px}.badge{background:#edf4ff;color:#1849a9;border-radius:999px;padding:7px 10px;font-size:.78rem;font-weight:700;white-space:nowrap}.calc-form,.settings-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.calc-form .form-action{display:flex;align-items:end}label{display:flex;flex-direction:column;gap:6px;font-weight:650;font-size:.88rem}input,select{width:100%;border:1px solid #cfd6df;border-radius:9px;padding:11px 12px;background:#fff;color:#111827;font:inherit}input:focus,select:focus{outline:3px solid rgba(24,90,189,.16);border-color:var(--accent)}button{border:0;border-radius:9px;background:var(--accent);color:#fff;font-weight:750;padding:12px 18px;font:inherit;cursor:pointer}button:hover{filter:brightness(.94)}.hint{color:var(--muted);font-size:.84rem;margin:16px 0 0}.comparison-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:18px 0}.metric-card{padding:20px;border-top:4px solid var(--accent)}.metric-card span,.metric-card small{display:block;color:var(--muted)}.metric-card strong{display:block;font-size:clamp(1.35rem,3vw,2rem);margin:6px 0}.metric-card.loss{border-top-color:var(--loss);background:var(--lossbg)}.metric-card.gain{border-top-color:var(--gain);background:var(--gainbg)}.verdict{padding:20px 24px;margin-bottom:18px;display:flex;justify-content:space-between;gap:20px;align-items:center}.verdict strong{font-size:1.15rem}.verdict.loss{border-color:#f2b8b5;color:var(--loss);background:var(--lossbg)}.verdict.gain{border-color:#a6e3c6;color:var(--gain);background:var(--gainbg)}.details-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.breakdown{margin:0}.breakdown div{display:flex;justify-content:space-between;gap:20px;padding:9px 0;border-bottom:1px solid #edf0f3}.breakdown dt{color:var(--muted)}.breakdown dd{margin:0;text-align:right;font-variant-numeric:tabular-nums}.breakdown .total{font-weight:800;border-bottom:0;padding-top:15px}.breakdown .total dt,.breakdown .total dd{color:var(--text)}.alert{padding:12px 14px;border-radius:9px;margin:0 0 16px}.alert.error{background:#fff1f0;color:#912018;border:1px solid #f1b3ae}.alert.success{background:#ecfdf3;color:#05603a;border:1px solid #a6e3c6}.settings-form h2{margin-top:26px}.vehicle-settings{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.vehicle-settings fieldset{border:1px solid var(--line);border-radius:10px;padding:15px}.vehicle-settings legend{font-weight:800;padding:0 6px}.vehicle-settings label+label{margin-top:12px}.save-row{margin-top:24px}.auth-wrap{min-height:100vh;display:grid;place-items:center;padding:20px}.auth-card{width:min(480px,100%)}.auth-card form{display:grid;gap:15px}.auth-card a{color:var(--accent)}code{font-size:.82em}@media(max-width:900px){.calc-form,.settings-grid{grid-template-columns:repeat(2,1fr)}.details-grid{grid-template-columns:1fr}.vehicle-settings{grid-template-columns:1fr}.comparison-grid{grid-template-columns:1fr}.verdict{align-items:flex-start;flex-direction:column}.topbar{align-items:flex-start;flex-direction:column}}@media(max-width:540px){.calc-form,.settings-grid{grid-template-columns:1fr}.container{width:calc(100% - 18px);margin-top:12px}.card{padding:17px}.section-head{flex-direction:column}.topbar>div{flex-direction:column;gap:0}}
.button-secondary{display:inline-flex;align-items:center;justify-content:center;border:1px solid #cfd6df;border-radius:9px;background:#fff;color:var(--text);font-weight:750;padding:11px 16px;text-decoration:none}.button-secondary:hover{background:#f8fafc}.save-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.settings-intro{margin:-8px 0 16px}.container.wide{width:min(1840px,calc(100% - 32px))}.matrix-tabs{display:flex;gap:8px;margin:0 0 16px}.matrix-tabs a{padding:9px 13px;border:1px solid var(--line);border-radius:9px;color:var(--text);text-decoration:none;background:#fff;font-weight:700}.matrix-tabs a.active{background:var(--dark);border-color:var(--dark);color:#fff}.matrix-help{margin:0 0 15px}.matrix-wrap{overflow:auto;max-height:70vh;border:1px solid var(--line);border-radius:10px}.tariff-table{border-collapse:separate;border-spacing:0;width:max-content;min-width:100%;font-size:.78rem}.tariff-table th,.tariff-table td{border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:4px;background:#fff}.tariff-table thead th{position:sticky;top:0;z-index:3;background:#f1f4f8;padding:8px 6px;white-space:nowrap}.tariff-table .sticky-col{position:sticky;left:0;z-index:2;background:#f7f8fa;min-width:58px;text-align:center}.tariff-table thead .sticky-col{z-index:4;background:#e9edf3}.tariff-table input{width:86px;min-width:86px;padding:7px 6px;border-radius:6px;font-size:.78rem;text-align:right;font-variant-numeric:tabular-nums}.matrix-save{position:sticky;bottom:0;margin-top:14px;padding-top:10px;background:var(--card)}
.component-comparison{margin-bottom:18px}.comparison-table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:10px}.comparison-table{width:100%;border-collapse:collapse;min-width:760px;font-variant-numeric:tabular-nums}.comparison-table th,.comparison-table td{padding:11px 13px;border-bottom:1px solid var(--line);text-align:right}.comparison-table thead th{background:#f1f4f8;color:#344054;font-size:.8rem;text-transform:uppercase;letter-spacing:.03em;white-space:nowrap}.comparison-table th:first-child{text-align:left}.comparison-table tbody th{font-weight:650;color:#475467}.comparison-table tbody tr:nth-child(even){background:#fafbfc}.comparison-table tfoot th,.comparison-table tfoot td{font-weight:850;background:#eef2f6;border-bottom:0;border-top:2px solid #cfd6df}.comparison-table .row-diff.negative{color:var(--loss);font-weight:800}.comparison-table .row-diff.positive{color:var(--gain);font-weight:800}
.user-chip{display:inline-flex;align-items:center;padding:7px 10px;border:1px solid #44546a;border-radius:7px;color:#fff;font-size:.82rem}.user-create-form{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) auto;gap:14px;align-items:end}.users-heading{margin-top:30px}.users-list{display:grid;gap:10px}.user-row{display:grid;grid-template-columns:minmax(180px,1.3fr) minmax(140px,.8fr) 100px minmax(180px,1fr) auto;gap:12px;align-items:end;padding:14px;border:1px solid var(--line);border-radius:10px;background:#fafbfc}.user-name{display:flex;flex-direction:column;gap:4px}.user-name small{color:var(--muted);font-size:.76rem}.check-label{display:flex;flex-direction:row;align-items:center;gap:8px;padding-bottom:10px}.check-label input{width:auto}.user-row .form-action,.user-create-form .form-action{display:flex;align-items:end}@media(max-width:1000px){.user-create-form,.user-row{grid-template-columns:repeat(2,minmax(0,1fr))}.user-row .form-action,.user-create-form .form-action{align-self:end}}@media(max-width:620px){.user-create-form,.user-row{grid-template-columns:1fr}.check-label{padding-bottom:0}}
.calc-form label small{color:var(--muted);font-weight:500;font-size:.76rem;line-height:1.3}.calc-form{grid-template-columns:repeat(4,minmax(0,1fr))}.calc-form .form-action{min-height:74px}@media(max-width:900px){.calc-form{grid-template-columns:repeat(2,1fr)}}@media(max-width:540px){.calc-form{grid-template-columns:1fr}}

/* SPOT-Matrix */
.spot-matrix td:last-child{min-width:280px;white-space:normal;line-height:1.35}
.spot-matrix td[colspan] input{max-width:220px}
.spot-matrix .matrix-section th,.spot-matrix tr.matrix-section td{font-weight:700;background:rgba(127,127,127,.08)}
.card-subtle{margin-top:18px;padding:18px;border:1px solid var(--border,#d8dde5);border-radius:14px;background:rgba(127,127,127,.04)}
.card-subtle h2{margin-top:0}
.card-subtle p{margin:.55rem 0;line-height:1.5}

/* v9: SPOT-Bonusauswahl */
.bonus-choice{display:flex;gap:18px;align-items:center;flex-wrap:wrap;border:1px solid #d9e0e8;border-radius:10px;padding:10px 14px;min-width:0}
.bonus-choice legend{font-weight:700;padding:0 6px}
.bonus-choice label{display:flex;align-items:center;gap:7px;margin:0}
.bonus-choice input[type="radio"]{width:auto;margin:0}

/* v10: Rechenzuordnung BASIS / SPOT */
.calc-rules-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:12px;margin:16px 0 28px}.calc-rules{width:100%;min-width:920px;border-collapse:collapse;font-variant-numeric:tabular-nums}.calc-rules th,.calc-rules td{padding:11px 12px;border-bottom:1px solid var(--line);vertical-align:middle}.calc-rules thead th{background:#f1f4f8;color:#344054;font-size:.8rem;text-transform:uppercase;letter-spacing:.03em;text-align:left}.calc-rules tbody th{font-weight:750;text-align:left;white-space:nowrap}.calc-rules tbody tr:nth-child(even){background:#fafbfc}.calc-rules tbody tr:last-child th,.calc-rules tbody tr:last-child td{border-bottom:0}.calc-rules td:nth-child(2),.calc-rules td:nth-child(3),.calc-rules th:nth-child(2),.calc-rules th:nth-child(3){text-align:center;width:88px}.calc-rules input[type=checkbox]{width:22px;height:22px;accent-color:var(--accent);cursor:pointer}.calc-rules input[type=checkbox]:disabled{cursor:not-allowed;opacity:.4}.calc-rules td:nth-child(4){min-width:250px}.calc-rules td:nth-child(4) input:not([type=checkbox]){display:inline-block;width:145px;margin-right:7px}.calc-rules .unit{color:var(--muted);font-size:.8rem;white-space:nowrap}.muted-cell{color:var(--muted);font-size:.82rem}.table-link{color:var(--accent);font-weight:700;text-decoration:none}.table-link:hover{text-decoration:underline}


/* v12: Desktop-Fläche konsequent ausnutzen */
@media (min-width:1500px){
  .calc-form{grid-template-columns:repeat(5,minmax(0,1fr));gap:18px}
  .card{padding:26px 28px}
  .comparison-grid{gap:18px}
  .metric-card{padding:22px 24px}
  .details-grid{gap:20px}
  .comparison-table th,.comparison-table td{padding:12px 16px}
  .bonus-choice{min-height:82px}
  .calc-form .form-action{min-height:82px}
  .calc-form .form-action button{width:100%;min-height:46px}
}
@media (min-width:1800px){
  .container,.container.wide{width:calc(100% - 36px);max-width:1880px}
}

/* v13: hochwertige Routenberechnung */
.route-planner{grid-column:1/-1;border:1px solid #d6e0ee;border-radius:16px;background:linear-gradient(135deg,#f8fbff 0%,#fff 55%,#f7fbff 100%);padding:20px;box-shadow:inset 0 1px 0 rgba(255,255,255,.8)}
.route-planner-head{display:flex;align-items:flex-start;justify-content:space-between;gap:22px;margin-bottom:16px}.route-planner-head h2{font-size:1.2rem;margin:2px 0 5px}.route-planner-head p:not(.eyebrow){margin:0;color:var(--muted);font-size:.86rem;max-width:760px}
.route-mode{display:inline-flex;align-items:center;gap:4px;padding:4px;border:1px solid #d7dee8;border-radius:12px;background:#fff;box-shadow:0 2px 8px rgba(16,24,40,.04)}.route-mode label{display:block;font-size:.82rem}.route-mode input{position:absolute;opacity:0;pointer-events:none}.route-mode span{display:block;padding:8px 13px;border-radius:8px;color:#596579;cursor:pointer;white-space:nowrap}.route-mode input:checked+span{background:#e9f2ff;color:#174ea6;font-weight:800;box-shadow:inset 0 0 0 1px #bcd2f1}.route-mode input:focus-visible+span{outline:3px solid rgba(24,90,189,.18)}
.route-entry-grid{display:grid;grid-template-columns:minmax(0,1fr) 40px minmax(0,1fr) auto auto;gap:12px;align-items:end}.route-address>span{font-weight:750}.route-address input{background:#fff}.route-arrow{height:46px;display:grid;place-items:center;font-size:1.45rem;color:#7a8799;font-weight:800}.route-calc-button{height:46px;min-width:160px}.route-calc-button:disabled,.route-adopt-button:disabled{opacity:.55;cursor:wait}
.route-status{margin:11px 0 0;color:var(--muted);font-size:.82rem;min-height:1.3em}.route-status.is-loading{color:#185abd}.route-status.is-error{color:var(--loss);font-weight:650}.route-status.is-success{color:var(--gain);font-weight:650}
.route-result{display:grid;grid-template-columns:minmax(340px,.75fr) minmax(520px,1.25fr);gap:16px;margin-top:16px}.route-summary{display:flex;flex-direction:column;gap:18px;border:1px solid #dbe3ec;border-radius:14px;padding:18px;background:#fff;box-shadow:0 6px 20px rgba(16,24,40,.05)}.route-summary-path{display:grid;grid-template-columns:minmax(0,1fr) 28px minmax(0,1fr);align-items:center;gap:8px}.route-summary-path strong{font-size:.85rem;line-height:1.35;overflow-wrap:anywhere}.route-summary-path span{text-align:center;color:#8a96a8;font-size:1.2rem}.route-summary-metrics{display:grid;grid-template-columns:1fr 1fr;gap:12px}.route-summary-metrics>div{padding:12px 14px;border-radius:11px;background:#f4f7fb;border:1px solid #e1e7ef}.route-summary-metrics span{display:block;color:var(--muted);font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.03em}.route-summary-metrics strong{display:block;font-size:1.3rem;margin-top:3px;font-variant-numeric:tabular-nums}.route-adopt-button{margin-top:auto;width:100%;background:#067647}.route-adopt-button:hover{filter:brightness(.93)}
.route-map{position:relative;overflow:hidden;min-height:300px;border:1px solid #dbe3ec;border-radius:14px;background:#e9edf3;box-shadow:0 6px 20px rgba(16,24,40,.05)}.route-tile-layer,.route-overlay{position:absolute;inset:0}.route-tile-layer img{position:absolute;width:256px;height:256px;max-width:none;user-select:none}.route-overlay{width:100%;height:100%;pointer-events:none}.route-line-outline{fill:none;stroke:#fff;stroke-width:8;stroke-linejoin:round;stroke-linecap:round;opacity:.9}.route-line{fill:none;stroke:#185abd;stroke-width:4.5;stroke-linejoin:round;stroke-linecap:round}.route-marker{position:absolute;z-index:3;transform:translate(-50%,-50%);width:30px;height:30px;border-radius:50%;display:grid;place-items:center;color:#fff;font-weight:900;font-size:.78rem;border:3px solid #fff;box-shadow:0 3px 10px rgba(16,24,40,.28)}.route-marker.is-start{background:#185abd}.route-marker.is-end{background:#067647}.route-attribution{position:absolute;right:5px;bottom:4px;z-index:4;background:rgba(255,255,255,.88);padding:2px 5px;border-radius:4px;font-size:10px;color:#475467}.route-attribution a{color:inherit}.route-adopted{animation:routeAdoptPulse .75s ease}@keyframes routeAdoptPulse{0%{box-shadow:0 0 0 0 rgba(6,118,71,.35);border-color:#067647}100%{box-shadow:0 0 0 8px rgba(6,118,71,0)}}
@media(max-width:1250px){.route-result{grid-template-columns:1fr}.route-entry-grid{grid-template-columns:1fr 34px 1fr auto}.route-calc-button{grid-column:1/-1;width:100%}.route-mode{align-self:end}.route-map{min-height:280px}}
@media(max-width:720px){.route-planner{padding:15px}.route-planner-head{flex-direction:column}.route-mode{width:100%;display:grid;grid-template-columns:1fr 1fr}.route-mode span{text-align:center}.route-entry-grid{grid-template-columns:1fr}.route-arrow{height:24px;transform:rotate(90deg)}.route-result{grid-template-columns:1fr}.route-summary-path{grid-template-columns:1fr}.route-summary-path span{transform:rotate(90deg)}.route-summary-metrics{grid-template-columns:1fr 1fr}.route-map{min-height:250px}}

/* v15: Mehrteilige Routenplanung */
.route-legs{display:flex;flex-direction:column;gap:10px}.route-leg{display:grid;grid-template-columns:34px minmax(0,1fr) 36px minmax(0,1fr) auto 42px;gap:10px;align-items:end;padding:12px;border:1px solid #dbe4ef;border-radius:14px;background:#fff;box-shadow:0 4px 14px rgba(16,24,40,.035)}.route-leg-number{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;align-self:center;background:#eaf2ff;color:#185abd;font-weight:900;font-size:.82rem;border:1px solid #c8d9f2}.route-leg .route-arrow{height:46px}.route-remove-button{width:42px;height:46px;padding:0;border-radius:10px;background:#fff;color:#b42318;border:1px solid #f2c8c4;font-size:1.55rem;line-height:1;box-shadow:none}.route-remove-button:hover{background:#fff5f4;filter:none}.route-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:12px}.route-add-button{display:inline-flex;align-items:center;gap:8px;background:#fff;color:#185abd;border:1px solid #b9cee9;box-shadow:none}.route-add-button:hover{background:#f2f7ff;filter:none}.route-add-button span{font-size:1.35rem;line-height:1}.route-total-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.route-total-grid>div{padding:12px 14px;border-radius:11px;background:#f4f7fb;border:1px solid #e1e7ef}.route-total-grid span{display:block;color:var(--muted);font-size:.72rem;font-weight:750;text-transform:uppercase;letter-spacing:.035em}.route-total-grid strong{display:block;font-size:1.22rem;margin-top:3px;font-variant-numeric:tabular-nums}.route-segment-results{display:flex;flex-direction:column;gap:8px}.route-segment-result{display:grid;grid-template-columns:28px minmax(0,1fr) auto auto;gap:10px;align-items:center;padding:10px;border:1px solid #e2e8f0;border-left:4px solid #185abd;border-radius:10px;background:#fff}.route-segment-result.is-empty{border-left-color:#d97706}.route-segment-index{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:#eef4ff;color:#185abd;font-size:.72rem;font-weight:900}.route-segment-result.is-empty .route-segment-index{background:#fff4e5;color:#b45309}.route-segment-path{display:grid;grid-template-columns:minmax(0,1fr) 20px minmax(0,1fr);gap:5px;align-items:center;min-width:0}.route-segment-path strong{font-size:.78rem;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.route-segment-path span{text-align:center;color:#98a2b3}.route-segment-type{padding:5px 8px;border-radius:999px;background:#eaf2ff;color:#185abd;font-size:.7rem;font-weight:800;white-space:nowrap}.route-segment-result.is-empty .route-segment-type{background:#fff4e5;color:#b45309}.route-segment-km{font-size:.86rem;white-space:nowrap;font-variant-numeric:tabular-nums}.route-line.is-loaded{stroke:#185abd}.route-line.is-empty{stroke:#d97706}.route-marker{width:34px;height:34px;font-size:.65rem}.route-summary{gap:14px}
@media(max-width:1350px){.route-leg{grid-template-columns:30px minmax(0,1fr) 32px minmax(0,1fr) auto}.route-remove-button{grid-column:5;grid-row:1}.route-mode{grid-column:1/-1;justify-self:end}.route-actions{align-items:stretch}.route-actions>*{flex:1}}
@media(max-width:800px){.route-leg{grid-template-columns:30px 1fr}.route-leg-number{grid-column:1;grid-row:1}.route-address{grid-column:2}.route-leg .route-arrow{grid-column:2;height:20px;transform:rotate(90deg)}.route-mode{grid-column:2;width:100%;display:grid;grid-template-columns:1fr 1fr}.route-remove-button{grid-column:1;grid-row:4;align-self:center}.route-actions{flex-direction:column}.route-total-grid{grid-template-columns:1fr}.route-segment-result{grid-template-columns:26px 1fr auto}.route-segment-path{grid-column:2/-1;grid-template-columns:1fr}.route-segment-path span{transform:rotate(90deg);height:14px}.route-segment-type{grid-column:2}.route-segment-km{grid-column:3}.route-result{grid-template-columns:1fr}}

/* v16: Gewicht direkt je Teilstrecke */
.route-leg{grid-template-columns:34px minmax(0,1fr) 36px minmax(0,1fr) auto minmax(105px,130px) 42px}
.route-weight>span{font-weight:750;white-space:nowrap}.route-weight input{background:#fff;text-align:right;font-variant-numeric:tabular-nums}.route-weight.is-disabled{opacity:.48}.route-weight.is-disabled input{background:#f2f4f7;cursor:not-allowed}
.route-segment-result{grid-template-columns:28px minmax(0,1fr) auto minmax(68px,auto) auto}.route-segment-weight{font-size:.82rem;white-space:nowrap;font-variant-numeric:tabular-nums;color:#344054}
@media(max-width:1450px){.route-leg{grid-template-columns:30px minmax(0,1fr) 32px minmax(0,1fr) auto minmax(100px,120px)}.route-remove-button{grid-column:6;grid-row:1}.route-mode{grid-column:auto}.route-weight{grid-column:1/-1;justify-self:end;width:150px}.route-weight input{width:100%}}
@media(max-width:800px){.route-leg{grid-template-columns:30px 1fr}.route-leg-number{grid-column:1;grid-row:1}.route-address{grid-column:2}.route-leg .route-arrow{grid-column:2;height:20px;transform:rotate(90deg)}.route-mode{grid-column:2;width:100%;display:grid;grid-template-columns:1fr 1fr}.route-weight{grid-column:2;justify-self:stretch;width:auto}.route-remove-button{grid-column:1;grid-row:5;align-self:center}.route-segment-result{grid-template-columns:26px 1fr auto}.route-segment-path{grid-column:2/-1}.route-segment-type{grid-column:2}.route-segment-weight{grid-column:3}.route-segment-km{grid-column:2/-1;text-align:right}}


/* v17: Teilstrecken-Kalkulation und Auswertungsbericht */
.segment-calculation{margin-top:18px}.segment-table{min-width:1540px}.segment-table th:first-child{min-width:250px}.segment-table td,.segment-table th{vertical-align:middle}.segment-arrow{display:inline-block;margin:0 7px;color:#667085}.segment-tariff-detail td{padding-top:7px!important;padding-bottom:9px!important;background:#f8fafc;color:#667085;font-size:.78rem;border-top:0}.segment-calculation .route-segment-type{display:inline-flex}.segment-calculation .route-segment-type.is-empty{background:#fff4e5;color:#b45309}
.economic-report{margin-top:18px;border-top:4px solid #1d4ed8}.economic-report.report-loss{border-top-color:#b42318}.economic-report.report-gain{border-top-color:#067647}.report-lead{display:flex;flex-wrap:wrap;gap:10px 22px;align-items:baseline;padding:16px 18px;border:1px solid #dbe4ef;border-radius:13px;background:#f8fafc;margin-bottom:16px}.report-loss .report-lead{background:#fff6f5;border-color:#f3c7c2}.report-gain .report-lead{background:#ecfdf3;border-color:#abefc6}.report-lead strong{font-size:1.08rem}.report-lead span{font-variant-numeric:tabular-nums}.report-factors{margin-top:16px}.report-factors h3{font-size:.94rem;margin:0 0 9px}.report-factors ul{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:8px}.report-factors li{display:flex;justify-content:space-between;gap:18px;padding:10px 12px;border:1px solid #e4e7ec;border-radius:10px;background:#fff}.report-factors strong{white-space:nowrap;font-variant-numeric:tabular-nums}.report-factors .negative{color:#b42318}.report-factors .positive{color:#067647}
@media(max-width:900px){.report-factors ul{grid-template-columns:1fr}.segment-table{min-width:1320px}}

/* Ergebnis nach Kalkulation gezielt in den sichtbaren Bereich setzen. */
#calculation-result { scroll-margin-top: 18px; }


/* v20: Routenkarte in einem 50-%-Fenster vergrößern */
.route-map-column{min-width:0}.route-map-toolbar{display:flex;justify-content:flex-end;margin-bottom:8px}.route-map-expand-button{padding:8px 13px;border-radius:9px;background:#fff;color:#185abd;border:1px solid #b9cee9;box-shadow:none;font-size:.82rem;font-weight:800}.route-map-expand-button:hover{background:#f2f7ff;filter:none}.route-map-modal[hidden]{display:none}.route-map-modal{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:20px}.route-map-modal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.48);backdrop-filter:blur(2px)}.route-map-dialog{position:relative;z-index:1;width:50vw;height:50vh;min-width:640px;min-height:420px;max-width:1200px;max-height:780px;display:flex;flex-direction:column;background:#fff;border:1px solid #d7e0ea;border-radius:16px;box-shadow:0 24px 70px rgba(15,23,42,.28);overflow:hidden}.route-map-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 16px;border-bottom:1px solid #e4e7ec;background:#fff}.route-map-dialog-head h2{margin:2px 0 0;font-size:1.06rem}.route-map-close-button{width:38px;height:38px;padding:0;border-radius:10px;background:#fff;color:#344054;border:1px solid #d0d5dd;box-shadow:none;font-size:1.5rem;line-height:1}.route-map-close-button:hover{background:#f2f4f7;filter:none}.route-map-large{flex:1;min-height:0;border:0;border-radius:0;box-shadow:none}.route-map-modal-open{overflow:hidden}
@media(max-width:900px){.route-map-dialog{width:92vw;height:65vh;min-width:0;min-height:360px}.route-map-modal{padding:12px}}

/* Gespeicherte Kalkulationen */
.save-calculation-card{margin-top:20px;border-top:4px solid #1f63c6}
.save-calculation-form{display:grid;grid-template-columns:minmax(320px,1fr) auto auto;gap:14px;align-items:end}
.save-calculation-form label{display:grid;gap:7px;font-weight:700}
.save-calculation-form label span{font-size:.9rem;color:#334155}
.save-calculation-form input{width:100%}
.saved-loaded{border-color:#93c5fd;background:#eff6ff;color:#1e3a8a}
.saved-calculations-card .section-head{align-items:center}
.saved-table{min-width:1120px}
.saved-table td,.saved-table th{vertical-align:middle}
.saved-route{max-width:420px;white-space:normal;line-height:1.35}
.saved-table .row-diff small{display:block;margin-top:3px;font-size:.76rem;font-weight:600;color:#64748b}
.saved-actions{display:flex;gap:8px;align-items:center;white-space:nowrap}
.saved-actions form{margin:0}
.button-danger{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:0 15px;border:1px solid #fecaca;border-radius:9px;background:#fff;color:#b91c1c;font:inherit;font-weight:700;cursor:pointer}
.button-danger:hover{background:#fef2f2;border-color:#fca5a5}
.saved-empty{padding:34px;border:1px dashed #cbd5e1;border-radius:12px;text-align:center;background:#f8fafc}
.saved-empty p{color:#64748b}
.alert.success{border-color:#86efac;background:#f0fdf4;color:#166534}
@media(max-width:900px){.save-calculation-form{grid-template-columns:1fr}.save-calculation-form button,.save-calculation-form .button-secondary{width:100%}.saved-actions{flex-direction:column;align-items:stretch}.saved-actions .button-secondary,.saved-actions button{width:100%}}


/* v22: Archiv optisch aufgewertet – reine Darstellung */
.saved-archive{padding:0;overflow:hidden;border:1px solid #d9e2ec;box-shadow:0 12px 34px rgba(15,23,42,.07)}
.saved-archive>.section-head{padding:28px 30px 22px;background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);border-bottom:1px solid #e7edf4}
.saved-archive>.section-head h1{margin-bottom:10px;letter-spacing:-.025em}
.saved-archive>.section-head p:not(.eyebrow){max-width:980px;margin:0;color:#64748b}
.saved-archive>.alert{margin:18px 30px 0}
.saved-table-shell{padding:20px 24px 26px;background:#f8fafc}
.saved-table-shell .table-wrap{overflow:auto;border:1px solid #dbe3ec;border-radius:14px;background:#fff;box-shadow:0 4px 16px rgba(15,23,42,.04)}
.saved-table{width:100%;min-width:1120px;border-collapse:separate;border-spacing:0}
.saved-table thead th{position:sticky;top:0;z-index:1;padding:13px 16px;background:#eef3f8;color:#334155;font-size:.76rem;text-transform:uppercase;letter-spacing:.045em;font-weight:850;border-bottom:1px solid #d8e1ea;white-space:nowrap}
.saved-table tbody td{padding:15px 16px;border-bottom:1px solid #e8edf3;background:#fff;transition:background .14s ease}
.saved-table tbody tr:last-child td{border-bottom:0}
.saved-table tbody tr:hover td{background:#f8fbff}
.saved-title-cell{display:flex;align-items:center;gap:10px;min-width:210px}
.saved-title-cell strong{font-size:.94rem;color:#172033}
.saved-title-icon{width:29px;height:29px;display:grid;place-items:center;border-radius:9px;background:#eaf2ff;color:#185abd;font-weight:900;flex:0 0 auto}
.saved-route{color:#475569;font-weight:650}
.saved-money{display:inline-flex;align-items:center;justify-content:flex-end;min-width:94px;font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap}
.saved-money-base{color:#334155}.saved-money-spot{color:#185abd}
.saved-diff{font-weight:900;font-variant-numeric:tabular-nums;white-space:nowrap}
.saved-diff.negative{color:#b42318}.saved-diff.positive{color:#067647}
.saved-diff small{opacity:.8}
.saved-date{display:inline-block;white-space:nowrap;color:#64748b;font-size:.86rem}
.saved-actions .button-secondary,.saved-actions .button-danger{min-height:40px;padding:0 14px;border-radius:10px}
.saved-actions .button-secondary{border-color:#c8d7ea;color:#1849a9;background:#f8fbff}
.saved-actions .button-secondary:hover{background:#eef5ff}
.saved-actions .button-danger{background:#fff8f7}
.saved-archive .button-secondary{box-shadow:0 1px 2px rgba(15,23,42,.04)}
.saved-empty{margin:24px 30px 30px}
@media(max-width:900px){.saved-archive>.section-head{padding:22px 20px 18px}.saved-table-shell{padding:14px}.saved-archive>.alert{margin:14px 20px 0}.saved-empty{margin:18px 20px 22px}}
