/* v2.39.3 – Gehaltszusammensetzung: breit, scrollbar, Kacheln */
:root:root:root dialog.payroll-breakdown-dialog{width:min(64rem,calc(100vw - 1.5rem))!important;max-width:none!important;max-height:calc(100dvh - 1.5rem)!important;overflow-y:auto!important;box-sizing:border-box;padding:1.4rem 1.5rem 1.6rem!important}
#payrollBreakdownSubtitle{margin:.25rem 0 0;color:var(--ui-muted)}
#payrollBreakdownContent{display:grid;gap:1.25rem;margin-top:1rem}
.pb-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(10.5rem,1fr));gap:.75rem}
.pb-tile{display:grid;gap:.15rem;padding:.85rem 1rem;border:1px solid var(--ui-border);border-radius:12px;background:var(--ui-surface)}
.pb-tile strong{font-size:1.25rem;font-variant-numeric:tabular-nums;color:var(--ui-text)}
.pb-tile-label{font-size:.78rem;text-transform:uppercase;letter-spacing:.04em;color:var(--ui-muted)}
.pb-tile small{color:var(--ui-muted)}
.pb-tile-main{border-color:var(--ui-accent);box-shadow:inset 0 3px 0 var(--ui-accent)}
.pb-tile-main strong{font-size:1.5rem;color:var(--ui-accent)}
.pb-section{display:grid;gap:.5rem}
.pb-section-head h3{margin:0;font-size:1rem}
.pb-hint{margin:.15rem 0 0;font-size:.82rem;color:var(--ui-muted)}
.pb-empty{margin:0;padding:.75rem 1rem;border:1px dashed var(--ui-border);border-radius:10px;color:var(--ui-muted)}
.pb-table{overflow-x:auto;border:1px solid var(--ui-border);border-radius:12px;max-height:22rem;overflow-y:auto}
.pb-table table{width:100%;min-width:640px;border-collapse:collapse}
.pb-table th{position:sticky;top:0;background:var(--ui-surface-soft);text-align:left;font-size:.8rem;padding:.55rem .75rem;white-space:nowrap}
.pb-table td{padding:.5rem .75rem;border-top:1px solid var(--ui-border);white-space:nowrap}
.pb-table td:nth-child(3){white-space:normal;min-width:10rem}
.pb-table .num{text-align:right;font-variant-numeric:tabular-nums}
.pb-table td.num:last-child{font-weight:700}
.pb-table td span[title]{cursor:help;border-bottom:1px dotted var(--ui-muted)}
.pb-badge{display:inline-block;padding:.1rem .5rem;border-radius:999px;font-size:.75rem;background:var(--ui-surface-soft);color:var(--ui-text)}
.pb-badge-gov{background:#1d4ed8;color:#fff}
@media (max-width:760px){.pb-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}}
.special-payment-users{display:grid;grid-template-columns:repeat(auto-fill,minmax(14rem,1fr));gap:.25rem .75rem;max-height:16rem;overflow:auto;padding:.5rem;border:1px solid var(--ui-border);border-radius:10px;margin-bottom:.75rem}
.special-payment-mode{display:flex;gap:1rem;flex-wrap:wrap;border:0;padding:0;margin:0 0 .5rem}
/* v2.40.0 – Kalender Zu-/Absagen */
.calendar-rsvp{display:grid;gap:.6rem;margin-top:.9rem;padding-top:.8rem;border-top:1px solid var(--ui-border)}
.calendar-rsvp-summary{margin:0;font-weight:600}
.calendar-rsvp-actions{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}
.calendar-rsvp-lists{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem}
.calendar-rsvp-lists ul{margin:.25rem 0 0;padding-left:1.1rem}
@media (max-width:640px){.calendar-rsvp-lists{grid-template-columns:1fr}}
.payroll-payout-extras{display:grid;gap:.35rem;margin:.6rem 0;padding:.6rem .75rem;border:1px solid var(--ui-border);border-radius:10px}
/* v2.42.1 – Sonderzahlung: Empfänger-Umschalter */
.special-payment-mode{border:0;padding:0;margin:0 0 .75rem}
.special-payment-mode legend{font-weight:600;margin-bottom:.35rem}
.segmented-control{display:inline-flex;padding:.25rem;gap:.25rem;border-radius:999px;background:var(--ui-surface-soft);border:1px solid var(--ui-border)}
.segmented-option{position:relative;cursor:pointer}
.segmented-option input{position:absolute;opacity:0;pointer-events:none}
.segmented-option span{display:inline-block;padding:.45rem 1rem;border-radius:999px;font-weight:600;color:var(--ui-muted);transition:background .15s,color .15s}
.segmented-option input:checked+span{background:var(--ui-accent);color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.2)}
.segmented-option input:focus-visible+span{outline:2px solid var(--ui-focus);outline-offset:2px}
.special-payment-toolbar{display:flex;gap:.5rem;align-items:center;margin-bottom:.4rem;flex-wrap:wrap}
.special-payment-toolbar input{flex:1;min-width:12rem}
/* v2.45.0 – Fahrzeug-Notiz und Tuning-Verbote */
.restriction-rows{display:grid;gap:.4rem;margin:.6rem 0}
.restriction-row{display:grid;grid-template-columns:minmax(10rem,1fr) 2fr auto;gap:.5rem;align-items:center}
.vehicle-row-info{color:var(--ui-muted)}
.order-vehicle-hints{display:grid;gap:.4rem;margin:.4rem 0 .6rem}
.order-vehicle-note{margin:0;padding:.5rem .75rem;border-radius:8px;background:var(--ui-surface-soft);border-left:4px solid #0ea5e9;white-space:pre-wrap}
.order-vehicle-restrictions{padding:.5rem .75rem;border-radius:8px;border:1px solid #dc2626;background:rgba(220,38,38,.08)}
.order-vehicle-restrictions ul{margin:.25rem 0 0;padding-left:1.1rem}
.order-vehicle-restrictions .restriction-hit{color:#dc2626;font-weight:700}
@media (max-width:640px){.restriction-row{grid-template-columns:1fr}}
.link-button{background:none;border:0;padding:0;color:var(--ui-accent);font:inherit;font-weight:700;cursor:pointer;text-decoration:underline dotted}
.clickable-row{cursor:pointer}
.clickable-row:hover td{background:var(--ui-surface-soft)}
.fuel-toolbar{display:flex;gap:1rem;align-items:end;flex-wrap:wrap;margin-bottom:.6rem}
.order-vehicle-hints{grid-column:1/-1;width:100%;display:grid;gap:.35rem;margin:.2rem 0 .7rem}
.order-vehicle-note{margin:0;padding:.55rem .8rem;border-radius:10px;background:var(--ui-surface-soft);border-left:4px solid var(--ui-accent);white-space:pre-wrap;line-height:1.4}
.order-vehicle-info{border-left-color:#dc2626}
.restriction-hit{margin:0;padding:.55rem .8rem;border-radius:10px;background:rgba(220,38,38,.1);border-left:4px solid #dc2626}
.smart-search-option.is-blocked{opacity:.6;cursor:not-allowed}
.smart-search-blocked{color:#dc2626;font-weight:600}
#traineeOrdersList{display:grid;gap:1rem}
.to-tile-value{font-size:1.5rem;line-height:1.1}
.to-months{display:grid;gap:1rem;max-height:60vh;overflow-y:auto;padding-right:.2rem}
.to-month{display:grid;gap:.4rem}
.to-month-head{display:flex;align-items:center;justify-content:space-between;gap:.5rem;position:sticky;top:0;background:var(--ui-surface);padding:.25rem 0;z-index:1}
.to-month-head h3{margin:0;font-size:1rem}
.to-card{display:grid;grid-template-columns:6.5rem minmax(0,1fr) auto auto;align-items:center;gap:.75rem;width:100%;padding:.7rem .9rem;border:1px solid var(--ui-border);border-radius:12px;background:var(--ui-surface);color:var(--ui-text);font:inherit;text-align:left}
.to-card-open{cursor:pointer;transition:border-color .15s,box-shadow .15s}
.to-card-open:hover,.to-card-open:focus-visible{border-color:var(--ui-accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--ui-accent) 25%,transparent)}
.to-date{font-variant-numeric:tabular-nums;color:var(--ui-muted);font-size:.88rem}
.to-main{display:grid;gap:.1rem;min-width:0}.to-main strong,.to-main small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.to-main small{color:var(--ui-muted)}
.to-tags{display:flex;flex-wrap:wrap;gap:.3rem;justify-content:flex-end}
.to-tag{padding:.12rem .55rem;border-radius:999px;font-size:.74rem;font-weight:600;background:var(--ui-surface-soft)}
.to-tag-workshop{background:rgba(37,99,235,.14);color:#2563eb}.to-tag-tuning{background:rgba(147,51,234,.14);color:#9333ea}.to-tag-towing{background:rgba(234,88,12,.14);color:#ea580c}
.to-chevron{color:var(--ui-muted);font-size:1.2rem}
@media (max-width:640px){.to-card{grid-template-columns:1fr auto}.to-date{grid-column:1/-1}.to-tags{justify-content:flex-start}}
/* v2.46.1: Trainee-Auftragsfenster nicht abschneiden */
#traineeOrdersDialog{width:min(860px,calc(100% - 2rem));max-width:calc(100% - 2rem);box-sizing:border-box;overflow-x:hidden}
#traineeOrdersList{grid-column:1/-1;min-width:0;width:100%;box-sizing:border-box}
#traineeOrdersList .to-tiles{grid-template-columns:repeat(4,minmax(0,1fr))}
#traineeOrdersList .pb-tile{min-width:0;box-sizing:border-box}
#traineeOrdersList .pb-tile-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (max-width:640px){#traineeOrdersList .to-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* v2.46.2: Innenabstand – Inhalt klebte am Rand */
#traineeOrdersDialog{padding:1.4rem 1.5rem 1.5rem!important;overflow-y:auto}
#traineeOrdersDialog .dialog-head{margin-bottom:.9rem}
#traineeOrdersList .to-months{padding-right:.4rem}
/* v2.47.0 Sammelobjekte */
.collectible-stats{display:flex;flex-wrap:wrap;gap:.35rem;margin-top:.35rem}
.collectible-empty{background:rgba(220,38,38,.15);color:#dc2626}
.collectible-actions{display:flex;gap:.3rem;justify-content:flex-end}
.collectible-campaign.is-archived{opacity:.75}
.collectible-archive-toggle{margin-left:auto;margin-right:.6rem;font-size:.9rem}
#collectibleDetailDialog{width:min(980px,calc(100% - 2rem));padding:1.4rem 1.5rem 1.5rem!important;overflow-y:auto}
.collectible-detail{display:grid;gap:1rem;min-width:0}
.collectible-detail .pb-tiles{grid-template-columns:repeat(4,minmax(0,1fr))}
.collectible-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}
.collectible-inline-form{display:grid;gap:.45rem;padding:.8rem;border:1px solid var(--ui-border);border-radius:12px;background:var(--ui-surface)}
.collectible-detail table{width:100%}
@media (max-width:700px){.collectible-tools,.collectible-detail .pb-tiles{grid-template-columns:1fr 1fr}.collectible-tools{grid-template-columns:1fr}}
/* v2.48.0 Warenwirtschaft */
.inventory-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:.8rem;margin-bottom:1rem}
.inventory-card{display:grid;gap:.4rem;padding:1rem;border:1px solid var(--ui-border);border-radius:14px;background:var(--ui-surface)}
.inventory-name{font-size:.8rem;text-transform:uppercase;letter-spacing:.05em;color:var(--ui-muted)}
.inventory-qty{font-size:2rem;line-height:1.1;font-variant-numeric:tabular-nums}
.inventory-card.is-negative .inventory-qty,.inventory-zero{color:#dc2626;font-weight:700}
.inventory-card.is-empty .inventory-qty{color:#d97706}
.inventory-possible{border-style:dashed}
.inventory-add{display:grid;grid-template-columns:5.5rem minmax(0,1fr) auto;gap:.35rem}
/* v2.48.0 Vollbild-Nachricht */
.urgent-overlay{position:fixed;inset:0;z-index:2147483000;display:grid;place-items:center;padding:1.5rem;background:rgba(10,10,12,.88);backdrop-filter:blur(6px)}
.urgent-overlay.hidden{display:none}
body.urgent-active{overflow:hidden}
.urgent-box{width:min(760px,100%);max-height:90vh;overflow:auto;padding:2rem 2.2rem;border-radius:20px;background:var(--ui-surface);border:3px solid #dc2626;box-shadow:0 0 0 8px rgba(220,38,38,.2),0 30px 80px rgba(0,0,0,.5);text-align:center;animation:urgent-pulse 1.6s ease-in-out 3}
.urgent-eyebrow{margin:0 0 .4rem;color:#dc2626;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.urgent-box h2{margin:0 0 1rem;font-size:1.8rem}
.urgent-message{font-size:1.25rem;line-height:1.5;white-space:pre-wrap;margin:0 0 1rem}
.urgent-meta{color:var(--ui-muted);margin:0 0 1.4rem}
.urgent-button{font-size:1.1rem;padding:.8rem 2.4rem}
@keyframes urgent-pulse{50%{box-shadow:0 0 0 18px rgba(220,38,38,.08),0 30px 80px rgba(0,0,0,.5)}}
.urgent-history{display:grid;gap:.4rem}.urgent-history details{padding:.5rem .7rem;border:1px solid var(--ui-border);border-radius:10px}.urgent-history ul{margin:.3rem 0 0;padding-left:1.2rem}
/* v2.48.1: Auftragslog-Knopf wie „+ Dispatch“ in der Kopfzeile */
:root:root:root .section-actions .tow-create-action{display:inline-flex;align-items:center;justify-content:center;width:auto;height:2.55rem;min-height:2.55rem;padding:.4rem .78rem;border-radius:9px;font-size:.8rem;font-weight:850;letter-spacing:.025em;background:#f5c518;border-color:#f5c518;color:#1f1a00;box-shadow:none;white-space:nowrap}
:root:root:root .section-actions .tow-create-action:hover:not(:disabled){background:#d9ab00;border-color:#d9ab00;color:#1f1a00}
:root:root:root[data-theme="DARK"] .section-actions .tow-create-action{background:#e0b400;border-color:#e0b400;color:#1a1600}
:root:root:root[data-theme="DARK"] .section-actions .tow-create-action:hover:not(:disabled){background:#f5c518;border-color:#f5c518;color:#1a1600}
