/* STEP474: Employee Car Deals. Uses the ld166 palette in the payroll shell and the ld384 dialog variables in dialogs (day + night). */
#main-app .ld403-payroll-shell .ld474-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px}
#main-app .ld403-payroll-shell .ld474-tools{display:flex;align-items:center;flex-wrap:wrap;gap:8px;justify-content:flex-end}
#main-app .ld403-payroll-shell .ld474-chips{display:flex;flex-wrap:wrap;gap:6px}
#main-app .ld403-payroll-shell .ld474-chip{min-height:34px;padding:6px 12px;border-radius:99px;border:1px solid var(--ld166-border);background:transparent;color:var(--ld166-text);font-size:12px;font-weight:750;cursor:pointer}
#main-app .ld403-payroll-shell .ld474-chip b{margin-left:4px;color:var(--ld166-muted);font-weight:800}
#main-app .ld403-payroll-shell .ld474-chip.active{background:var(--ld166-soft);border-color:var(--ld166-highlight);color:var(--ld166-highlight);box-shadow:inset 0 -2px var(--ld166-highlight)}
#main-app .ld403-payroll-shell .ld474-search{min-height:36px;width:min(260px,100%);padding:6px 10px;border-radius:8px;border:1px solid var(--ld166-border);background:var(--ld166-input);color:var(--ld166-text)}
#main-app .ld403-payroll-shell .ld474-table td small{color:var(--ld166-muted)}
#main-app .ld403-payroll-shell .ld474-actions{white-space:nowrap}
#main-app .ld403-payroll-shell .ld474-link-chip{display:inline-block;margin-top:3px;padding:1px 8px;border-radius:99px;border:1px solid var(--ld166-border);background:var(--ld166-soft);color:var(--ld166-highlight)!important;font-weight:750}
#main-app .ld474-pill,.ld474-sheet-bar .ld474-pill,.ld474-paper .ld474-pill{display:inline-block;padding:3px 11px;border-radius:99px;font-size:11.5px;font-weight:800;border:1px solid;white-space:nowrap}
#main-app .ld474-pill.is-active,.ld474-sheet-bar .ld474-pill.is-active{background:#0f3d2a;color:#7ff0b0;border-color:#2c8a5c}
#main-app .ld474-pill.is-paid,.ld474-sheet-bar .ld474-pill.is-paid{background:#0c3556;color:#8fd2ff;border-color:#2a74ad}
#main-app .ld474-pill.is-canceled,.ld474-sheet-bar .ld474-pill.is-canceled{background:#46232b;color:#ffb6b6;border-color:#a54a55}
#main-app .ld403-payroll-shell[data-ld166-theme=day] .ld474-pill.is-active{background:#e4f6ec;color:#136a2a;border-color:#89cfa1}
#main-app .ld403-payroll-shell[data-ld166-theme=day] .ld474-pill.is-paid{background:#e3f0fb;color:#0b5b94;border-color:#8fc0e6}
#main-app .ld403-payroll-shell[data-ld166-theme=day] .ld474-pill.is-canceled{background:#fdeaea;color:#a12c2c;border-color:#e3a3a3}
.ld474-sheet-overlay[data-theme=day] .ld474-pill.is-active{background:#e4f6ec;color:#136a2a;border-color:#89cfa1}
.ld474-sheet-overlay[data-theme=day] .ld474-pill.is-paid{background:#e3f0fb;color:#0b5b94;border-color:#8fd2ff}
.ld474-sheet-overlay[data-theme=day] .ld474-pill.is-canceled{background:#fdeaea;color:#a12c2c;border-color:#e3a3a3}
/* deal form */
body .ld384-labor-overlay .ld384-labor-dialog .ld474-fsec{grid-column:1/-1;margin:8px 0 0;padding:6px 0 4px;border-bottom:1px solid var(--ld384-line);font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--ld384-label)}
body .ld384-labor-overlay .ld384-labor-dialog:has(#ev-pick-results){width:min(780px,100%)}
body .ld384-labor-overlay .ld474-pick{padding:12px;border:1px solid var(--ld384-line);border-radius:10px;background:var(--ld384-secondary)}
.ld474-pick-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:8px}
.ld474-pick-results[hidden],.ld474-linked[hidden]{display:none}
.ld474-pick-empty{grid-column:1/-1;margin:4px 0;font-size:12.5px;color:var(--ld384-label)}
.ld474-pick-card{display:grid;grid-template-columns:88px minmax(0,1fr);align-items:center;gap:4px 10px;padding:8px;border:1px solid var(--ld384-line);border-radius:10px;background:var(--ld384-bg);cursor:pointer;min-width:0}
.ld474-pick-card:hover,.ld474-pick-card:focus-visible{outline:2px solid #0999e9;outline-offset:1px}
.ld474-pick-photo{height:64px;display:block;grid-row:1/3}
.ld474-pick-photo .inventory-photo{width:88px;height:64px;cursor:pointer;border-radius:8px}
.ld474-pick-info{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.ld474-pick-info strong{font-size:13px;color:var(--ld384-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ld474-pick-info small{font-size:11px;color:var(--ld384-label);overflow-wrap:anywhere}
.ld474-pick-use{grid-column:2;font-size:11px;font-weight:800;color:#0999e9;white-space:nowrap}
.ld474-linked{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:8px;padding:10px 12px;border-radius:9px;border:1px solid #0999e9;background:var(--ld384-bg);font-size:12.5px;color:var(--ld384-text)}
.ld474-linked small{color:var(--ld384-label)}
.ld474-linked button{min-height:34px;padding:6px 12px;border-radius:8px;border:1px solid var(--ld384-line);background:var(--ld384-secondary);color:var(--ld384-text);font-weight:750;cursor:pointer}
body .ld384-labor-overlay .field input[readonly]{opacity:.85!important}
.ld474-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:10px;border:1px solid var(--ld384-line);border-radius:10px;background:var(--ld384-secondary)}
.ld474-summary div{min-width:0}.ld474-summary small{display:block;font-size:11px;color:var(--ld384-label)}.ld474-summary strong{font-size:15px;color:var(--ld384-text);font-variant-numeric:tabular-nums}
/* deal sheet overlay */
body .ld384-labor-overlay .ld384-labor-dialog.ld474-sheet{width:min(1100px,100%);padding:0;display:flex;flex-direction:column;max-height:94vh;overflow:hidden}
.ld474-sheet-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:14px 20px;border-bottom:1px solid var(--ld384-line)}
.ld474-sheet-bar small{display:block;font-size:11px;letter-spacing:.07em;font-weight:800;color:var(--ld384-label)}
body .ld384-labor-overlay .ld474-sheet-bar h2{margin:2px 0 0;font-size:18px!important}
.ld474-sheet-bar>div:first-child{flex:1;min-width:200px}
.ld474-sheet-tools{display:flex;gap:8px;flex-wrap:wrap}
.ld474-sheet-tools button,.ld474-sheet-actions button{min-height:40px;padding:8px 14px;border-radius:8px;font-weight:750;cursor:pointer;border:1px solid var(--ld384-line);background:var(--ld384-secondary);color:var(--ld384-text)}
.ld474-sheet-tools .primary,.ld474-sheet-actions .primary{background:linear-gradient(180deg,#06c6f6,#0862e8)!important;border-color:#27dfff!important;color:#fff!important}
.ld474-sheet-actions .danger{background:var(--ld384-danger-bg)!important;color:var(--ld384-danger)!important;border-color:var(--ld384-danger)!important}
.ld474-sheet-scroll{overflow:auto;padding:16px 20px;min-height:0;background:#d9e3ec}
.ld474-sheet-overlay[data-theme=night] .ld474-sheet-scroll{background:#0a1a2b}
body .ld384-labor-overlay .ld474-sheet-actions{margin:0;padding:12px 20px;border-top:1px solid var(--ld384-line)}
.ld474-paper :is(div,span,strong,b,small,p,li,td,th,section,header){opacity:1!important}
.ld474-paper td,.ld474-paper th,.ld474-paper div,.ld474-paper span,.ld474-paper b,.ld474-paper strong{color:#182b42!important}
.ld474-paper small{color:#53657a!important}
.ld474-paper .ld474-sec h3{background:#152e45!important;color:#fff!important}
.ld474-paper .ld474-pill.is-active{color:#136a2a!important}.ld474-paper .ld474-pill.is-paid{color:#0b5b94!important}.ld474-paper .ld474-pill.is-canceled{color:#a12c2c!important}
@media(max-width:700px){
 .ld474-pick-results{grid-template-columns:1fr}
 .ld474-summary{grid-template-columns:1fr 1fr}
 .ld474-sheet-bar{padding:12px}.ld474-sheet-scroll{padding:10px}.ld474-sheet-actions{padding:10px 12px}
 .ld474-sheet-tools{width:100%}.ld474-sheet-tools button{flex:1}
 #main-app .ld403-payroll-shell .ld474-tools{justify-content:flex-start;width:100%}
 #main-app .ld403-payroll-shell .ld474-search{width:100%}
}
@media print{.ld474-sheet-overlay{position:static!important;background:#fff!important}.ld474-sheet-bar,.ld474-sheet-actions{display:none!important}}
/* the sheet is a light paper in either theme: the app-wide table hover/stripe colors must not darken its rows */
.ld474-paper tbody tr,.ld474-paper tbody tr:hover,.ld474-paper tbody tr:nth-child(even),.ld474-paper tbody tr:nth-child(odd){background:#fff!important}
.ld474-paper tbody tr:hover td,.ld474-paper tbody td{background:#fff!important;color:#182b42!important}
.ld474-paper tbody tr.tot,.ld474-paper tbody tr.tot td,.ld474-paper tbody tr.tot:hover td{background:#f3f7fa!important}
.ld474-paper thead th{background:#e7eef5!important;color:#182b42!important}
