:root{--bg:#0f172a;--panel:#111827;--panel2:#1f2937;--text:#e5e7eb;--muted:#94a3b8;--accent:#22c55e;--danger:#ef4444;--line:#334155}*{box-sizing:border-box}body{margin:0;background:#0b1220;color:var(--text);font-family:Arial,Helvetica,sans-serif}.layout{display:flex;min-height:100vh}aside{width:250px;background:#020617;border-right:1px solid var(--line);padding:22px;position:fixed;top:0;bottom:0}.brand{font-weight:900;font-size:24px;line-height:1.05;margin-bottom:30px;color:#fff}.brand span{color:var(--accent)}nav a{display:block;color:var(--text);text-decoration:none;padding:13px 12px;border-radius:12px;margin:4px 0}nav a:hover{background:var(--panel2)}main{margin-left:250px;padding:24px;width:calc(100% - 250px);min-height:100vh;display:flex;flex-direction:column}.shop-layout{display:block}.shop-main{margin-left:0;width:100%;padding:16px 18px 20px}.page-content{flex:1 0 auto}.app-footer{margin-top:24px;padding-top:16px;border-top:1px solid var(--line);color:#90a3b8;font-size:12px;text-align:center}.top{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}h1,h2{margin:0 0 16px}.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:18px}.card,.panel{background:linear-gradient(180deg,#111827,#0f172a);border:1px solid var(--line);border-radius:18px;padding:18px;box-shadow:0 8px 30px rgba(0,0,0,.25)}.card b{display:block;font-size:28px}.card span{color:var(--muted)}.danger b,.low td{color:var(--danger)}table{width:100%;border-collapse:collapse;margin-top:10px}th,td{text-align:left;border-bottom:1px solid var(--line);padding:11px;vertical-align:top}th{color:var(--muted);font-size:13px;text-transform:uppercase}.btn,button{background:var(--accent);color:#03120a;border:0;border-radius:12px;padding:11px 15px;font-weight:800;text-decoration:none;display:inline-block;cursor:pointer}input,select,textarea{width:100%;padding:12px;border-radius:10px;border:1px solid var(--line);background:#020617;color:var(--text);margin:6px 0 12px}textarea{min-height:110px}.form{max-width:760px}.badge{background:#1e293b;border:1px solid var(--line);border-radius:999px;padding:5px 10px}.alert{padding:12px;border-radius:12px;margin-bottom:14px}.success{background:#064e3b}.danger{background:#4c0519}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:16px}.login,.public{display:flex;align-items:center;justify-content:center;min-height:100vh;background:radial-gradient(circle at top,#1e293b,#020617)}.login-card{width:380px;background:#0f172a;border:1px solid var(--line);border-radius:24px;padding:28px;box-shadow:0 20px 60px rgba(0,0,0,.45)}.login-card h1{color:#fff}.login-card p,small{color:var(--muted)}.login-card button{width:100%;margin-top:8px}.wide{width:560px}@media(max-width:850px){aside{position:relative;width:100%;height:auto}.layout{display:block}main{margin-left:0;width:100%}.cards,.grid2{grid-template-columns:1fr}table{font-size:13px;display:block;overflow-x:auto}.wide,.login-card{width:92vw}}
.toolbar{display:flex;gap:10px;margin-bottom:16px;flex-wrap:wrap}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:16px}.btn.secondary{background:#334155;color:#e5e7eb}
.muted{color:var(--muted)}.wide-form{max-width:980px}.problem-box{margin:10px 0 14px}.problem-line{display:grid;grid-template-columns:42px 1fr 44px;gap:10px;align-items:center;margin-bottom:8px}.problem-line span{display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:10px;background:#1f2937;color:#e5e7eb;font-weight:800}.problem-line input{margin:0}.mini{padding:7px 9px;border-radius:8px;font-size:12px}.danger-mini{background:#7f1d1d!important;color:#fff!important}.inline-form{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;margin-top:14px}.inline-form input{margin:0}@media(max-width:850px){.inline-form,.grid{grid-template-columns:1fr}.problem-line{grid-template-columns:34px 1fr 44px}}
.green-mini{background:#22c55e!important;color:#03120a!important}
.searchbar{display:flex;gap:8px;align-items:center;min-width:420px;max-width:620px;flex:1;margin:0 18px}.searchbar input{margin:0}.searchbar button{padding:10px 14px}.done-row td{color:#86efac;background:rgba(34,197,94,.06)}button.secondary,.mini.secondary{background:#334155!important;color:#e5e7eb!important}.quickbar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:18px}.quickbar .btn{text-align:center}@media(max-width:1050px){.top{display:block}.searchbar{min-width:0;max-width:none;margin:10px 0}.quickbar{grid-template-columns:1fr 1fr}}@media(max-width:650px){.quickbar{grid-template-columns:1fr}}

.wizard-step{position:relative;margin-bottom:16px}.step-badge{position:absolute;right:18px;top:18px;background:#18c47c;color:#061d17;border-radius:999px;width:34px;height:34px;display:flex;align-items:center;justify-content:center;font-weight:800}.checkline{display:flex!important;align-items:center;gap:10px}.checkline input{width:auto}.tabs{display:flex;gap:8px;margin-bottom:12px}.tabs a{padding:8px 12px;border-radius:10px;background:#17212b;color:#dce7ef;text-decoration:none}.tabs a:hover{background:#213142}

.status-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.status-card{min-height:160px}.wo-chip{display:block;background:#0b1220;border:1px solid var(--line);border-radius:12px;padding:10px;margin:8px 0;text-decoration:none;color:var(--text)}.wo-chip b{color:#fff}.profile-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}.info-list p{margin:7px 0;color:var(--muted)}@media(max-width:1100px){.status-grid{grid-template-columns:1fr 1fr}}@media(max-width:750px){.status-grid{grid-template-columns:1fr}.profile-head{display:block}}
.status-board-wrap{display:flex;flex-direction:column;gap:16px}.status-board-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px}.status-board-head h2{margin:0}.status-board-kicker{margin:0 0 4px;color:#93c5fd;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.status-board-updated{color:var(--muted);font-size:13px;text-align:right}.status-card-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;align-items:stretch}.status-monitor-card{display:flex;flex-direction:column;gap:10px;min-height:205px;background:linear-gradient(180deg,#101a2b,#0a1220);border:1px solid #203046;border-radius:18px;padding:16px;text-decoration:none;color:var(--text);box-shadow:0 10px 28px rgba(0,0,0,.22)}.status-monitor-card:hover{border-color:#3b82f6}.status-monitor-card.open{border-color:rgba(34,197,94,.45)}.status-monitor-card.hold{border-color:rgba(96,165,250,.6)}.status-monitor-card.work{border-color:rgba(250,204,21,.45)}.status-monitor-card.done{border-color:rgba(226,232,240,.45)}.status-monitor-top{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.status-monitor-wo{font-size:12px;font-weight:800;color:#93c5fd;letter-spacing:.05em}.status-monitor-state{font-size:11px;font-weight:800;color:#dbeafe;background:#162234;border:1px solid #28415f;border-radius:999px;padding:5px 9px;white-space:nowrap}.status-monitor-truck{font-size:29px;line-height:1.02;font-weight:900;color:#fff;word-break:break-word}.status-monitor-company{font-size:15px;font-weight:700;color:#d7e4f3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.status-monitor-mechanic{font-size:14px;color:#facc15;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.status-monitor-times{display:grid;grid-template-columns:1fr 1fr;gap:8px}.status-monitor-timebox{background:#091321;border:1px solid #223449;border-radius:12px;padding:10px}.status-monitor-timebox span,.status-monitor-foot span{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:#8fa6bc;font-weight:800}.status-monitor-timebox strong{display:block;font-size:15px;color:#fff;margin-top:4px;line-height:1.2}.status-monitor-foot{margin-top:auto;padding-top:10px;border-top:1px solid #203046}.status-monitor-foot b{display:block;font-size:18px;color:#fff;margin-top:4px}.status-clock-card{grid-column:1 / -1;display:flex;align-items:center;justify-content:flex-start;min-height:120px;background:linear-gradient(180deg,#102038,#0d1728)}.status-clock-card h3{margin:0 0 8px;font-size:24px;color:#fff}.status-clock-card p{margin:0}.status-clock-card .muted{font-size:14px}@media(max-width:1400px){.status-card-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:1100px){.status-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.status-board-head{display:block}.status-board-updated{text-align:left}}@media(max-width:700px){.status-card-grid{grid-template-columns:1fr}.status-monitor-times{grid-template-columns:1fr}.status-monitor-company,.status-monitor-mechanic{white-space:normal}.status-clock-card{min-height:100px}}
.shop-board-wrap{display:flex;flex-direction:column;gap:14px}.shop-board-head{display:flex;justify-content:space-between;align-items:flex-end;gap:18px;padding:4px 2px 8px}.shop-board-title{font-size:34px;font-weight:900;color:#fff;line-height:1.05}.shop-board-sub{color:#93c5fd;font-size:14px;font-weight:700}.shop-order-jump{display:grid;grid-template-columns:auto minmax(180px,220px) auto auto;gap:10px;align-items:end}.shop-order-jump label{font-size:12px;text-transform:uppercase;color:#8fa6bc;font-weight:800;margin-bottom:6px}.shop-order-jump input{margin:0}.shop-order-jump button,.shop-order-jump a{margin:0}.shop-mode-grid{grid-template-columns:1fr!important;gap:8px}.shop-row-card{display:grid;grid-template-columns:minmax(170px,220px) minmax(110px,150px) minmax(0,1fr) minmax(220px,280px) minmax(420px,540px);gap:12px;align-items:center;min-height:0;padding:10px 14px}.shop-row-card.open{border-color:rgba(250,204,21,.45)}.shop-row-card.hold{border-color:rgba(96,165,250,.65)}.shop-row-card.work{border-color:rgba(74,222,128,.45)}.shop-row-card.done{border-color:rgba(248,250,252,.45)}.shop-row-card.hold .shop-row-status{color:#60a5fa}.shop-row-truck{font-size:42px;line-height:1;font-weight:900;letter-spacing:.02em;word-break:break-word}.shop-truck-high{color:#f87171}.shop-truck-done{color:#f8fafc}.shop-truck-hold{color:#60a5fa}.shop-truck-work{color:#4ade80}.shop-truck-line{color:#facc15}.shop-row-order{display:flex;flex-direction:column;gap:2px;min-width:0}.shop-row-wo{font-size:18px;font-weight:900;color:#dbeafe;line-height:1.1}.shop-row-company{font-size:12px;color:#cbd5e1;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.shop-row-problems{display:flex;flex-wrap:wrap;gap:10px 16px;align-items:center;min-width:0}.shop-problem-inline{display:inline-flex;gap:4px;align-items:baseline;color:#e5e7eb;font-size:15px;line-height:1.2}.shop-problem-inline b{color:#93c5fd;font-size:13px}.shop-row-meta{display:flex;flex-direction:column;gap:4px;min-width:0}.shop-row-status{font-size:16px;font-weight:900;color:#fff;line-height:1.1}.shop-row-mechanic{font-size:13px;color:#facc15;font-weight:800;line-height:1.25;white-space:normal;overflow:visible;text-overflow:clip}.shop-row-times{font-size:12px;color:#cbd5e1;line-height:1.2}.shop-card-actions{margin:0;padding:0;border-top:0;display:grid;grid-template-columns:minmax(190px,240px) repeat(3,minmax(0,1fr));gap:8px;align-items:center}.shop-card-actions select{margin:0;min-width:0;padding:10px 10px}.shop-action-bar{display:contents}.shop-hold-btn{background:#60a5fa!important;color:#08111f!important}.shop-work-btn{background:#facc15!important;color:#201300!important}.shop-action-bar .mini{text-align:center;width:100%;padding:10px 6px}.shop-card-focus{outline:3px solid rgba(147,197,253,.9);box-shadow:0 0 0 4px rgba(147,197,253,.18),0 10px 28px rgba(0,0,0,.22)}@media(max-width:1680px){.shop-row-card{grid-template-columns:minmax(160px,210px) minmax(100px,135px) minmax(0,1fr) minmax(210px,260px) minmax(360px,500px)}.shop-row-truck{font-size:38px}.shop-problem-inline{font-size:14px}}@media(max-width:1380px){.shop-row-card{grid-template-columns:minmax(160px,210px) minmax(100px,135px) minmax(0,1fr)}.shop-row-meta{grid-column:1}.shop-card-actions{grid-column:2 / span 2}}@media(max-width:1200px){.shop-order-jump{grid-template-columns:1fr 1fr}.shop-order-jump label{grid-column:1 / -1}.shop-row-card{grid-template-columns:1fr 1fr}.shop-row-problems,.shop-card-actions{grid-column:1 / -1}.shop-card-actions{grid-template-columns:1fr 1fr}.shop-card-actions select{grid-column:1 / -1}}@media(max-width:700px){.shop-board-head{display:block}.shop-board-title{font-size:28px}.shop-order-jump{grid-template-columns:1fr}.shop-row-card{grid-template-columns:1fr;align-items:start}.shop-row-truck{font-size:34px}.shop-row-problems,.shop-card-actions{grid-column:auto}.shop-card-actions{grid-template-columns:1fr}.shop-card-actions select{grid-column:1 / -1}}
@media print{aside,.top,.toolbar,.no-print,.app-footer{display:none!important}main{margin:0!important;width:100%!important;padding:0!important}.panel,.card{box-shadow:none!important;border:1px solid #999!important;background:white!important;color:#000!important}.layout{display:block}body{background:white!important;color:#000!important}.print-page{page-break-after:always}.print-page:last-child{page-break-after:auto}}

.grid4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.truck-small{padding:10px 14px}
.truck-small h2{font-size:16px;margin:0 0 8px}
.truck-small p{margin:2px 0;font-size:13px}
@media(max-width:900px){.grid4{grid-template-columns:1fr 1fr}}
/* v0.23 work order list colors */
.wo-link,.wo-link:visited,.wo-link:hover,.wo-link:active{color:#fff!important;text-decoration:none;font-weight:800}
.status-in-progress{color:#4ade80!important;border-color:#22c55e!important;background:rgba(34,197,94,.12)!important}
.mechanic-name{color:#facc15;font-weight:800}
.wo-inline-form select,.wo-mechanic-form input{min-width:120px;margin:0;padding:8px;border-radius:8px}.wo-mechanic-form{display:flex;gap:6px;align-items:center}.wo-mechanic-form input{min-width:140px}.wo-detail-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.status-button-row{display:flex;gap:8px;flex-wrap:wrap}.status-btn{border:1px solid var(--line);color:#111!important}.status-btn.active{outline:3px solid rgba(255,255,255,.35)}.status-open{background:#f8fafc!important}.status-hold{background:#60a5fa!important}.status-work{background:#facc15!important}.status-done{background:#22c55e!important}.wo-status-text{font-weight:800}.wo-status-done{color:#fff}.wo-status-hold{color:#60a5fa}.wo-status-work{color:#facc15}.wo-status-open{color:#22c55e}.click-row{cursor:pointer}.click-row:hover td{background:rgba(96,165,250,.08)}.wo-summary-cards .card{padding:9px 12px;border-radius:12px}.wo-summary-cards .card b{font-size:18px;line-height:1.15}.wo-summary-cards .card span{font-size:12px}.status-card{padding:0}.status-company-form{margin:0}.status-company-button{display:block;width:100%;min-height:100%;padding:16px;text-align:left;border:1px solid var(--line);border-radius:14px;color:#111!important;cursor:pointer}.status-company-button b{display:block;font-size:1.45rem;line-height:1.1}.status-company-button span{display:block;margin-top:8px;color:#111!important;opacity:.78}.work-entry-form{max-width:none}.work-entry-problem{display:block;width:100%;max-width:none}.work-entry-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:8px 0 12px}.work-entry-grid h3{margin:0 0 10px}@media(max-width:850px){.wo-detail-head,.wo-mechanic-form{display:block}.work-entry-grid{grid-template-columns:1fr}.wo-inline-form select,.wo-mechanic-form input{width:100%}}
.wo-status-form{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:0}.wo-status-form select{min-width:190px;max-width:260px;margin:0}.wo-status-form .mini{padding:10px 12px}
.match-list{margin:0 0 14px}.match-choice{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;border:1px solid var(--line);background:#0b1220;border-radius:10px;padding:10px;margin:8px 0}@media(max-width:650px){.match-choice{grid-template-columns:1fr}}
.invoice-part-grid{display:grid;grid-template-columns:minmax(220px,1fr) minmax(220px,1fr);gap:16px;align-items:start}.row-actions{display:flex;gap:8px;flex-wrap:wrap}@media(max-width:650px){.invoice-part-grid{grid-template-columns:1fr}}
.invoice-summary{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:start}.invoice-summary span,.invoice-summary small{display:block;color:var(--muted);font-size:12px;text-transform:uppercase;font-weight:800;margin-bottom:6px}.invoice-summary b{display:block;font-size:30px;color:#fff}.invoice-summary strong{display:block;font-size:18px;font-weight:900;color:#fff;margin-bottom:10px}.invoice-summary-right{text-align:right}.invoice-summary-right p{margin:4px 0 0;font-size:18px}.invoice-alert{font-size:13px;padding:8px 10px;margin-bottom:8px}.invoice-alert b{display:inline;font-size:13px}@media(max-width:650px){.invoice-summary{grid-template-columns:1fr}.invoice-summary-right{text-align:left}}
.print-only{display:none}.invoice-pdf-link{display:inline-block;margin-top:10px}
.invoice-parts-title{font-size:13px!important;text-transform:uppercase;font-weight:900;margin-bottom:8px}
.part-number-text{font-family:"Courier New",monospace;font-size:inherit;font-weight:800}
.pdf-preview{width:100%;height:72vh;border:1px solid var(--line);border-radius:10px;background:#020617}
.scan-progress-screen{position:fixed;inset:0;background:rgba(2,6,23,.88);display:none;align-items:center;justify-content:center;z-index:9999;padding:18px}.scan-progress-screen.show{display:flex}.scan-progress-card{width:min(560px,94vw);background:#0f172a;border:1px solid var(--line);border-radius:18px;padding:24px;box-shadow:0 20px 70px rgba(0,0,0,.55)}.scan-progress-bar{height:16px;background:#020617;border:1px solid var(--line);border-radius:999px;overflow:hidden;margin:18px 0}.scan-progress-bar div{height:100%;width:8%;background:linear-gradient(90deg,#22c55e,#38bdf8);border-radius:999px;transition:width .8s ease}.scan-progress-steps{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.scan-progress-steps span{font-size:12px;color:var(--muted);font-weight:800;text-align:center}.scan-progress-steps span.active{color:#86efac}
.core-part-field{grid-column:span 2}.wide-autofill{min-width:520px}.core-return-list td,.core-return-list th{white-space:nowrap}.core-return-list td:nth-child(10){white-space:normal;min-width:180px}@media(max-width:850px){.core-part-field{grid-column:span 1}.wide-autofill{min-width:0}}
.core-match-list{grid-column:span 2;max-width:980px}.core-match-choice{grid-template-columns:minmax(0,1fr) auto}.core-match-choice b{font-size:16px;word-break:break-all}.core-match-choice .muted{display:block;white-space:normal}@media(max-width:850px){.core-match-list{grid-column:span 1}}
@media print{.no-print{display:none!important}.print-area{display:block!important;border:0!important;padding:0!important}.print-area h2{color:#000!important}.core-return-list{display:table!important;font-size:11px}.core-return-list th,.core-return-list td{color:#000!important;border-bottom:1px solid #999!important;padding:6px!important}.cards{grid-template-columns:repeat(3,1fr)!important}.card b,.card span{color:#000!important}}
@media print{.print-only{display:block!important}.invoice-print-title{font-size:22px;font-weight:900;text-transform:uppercase;margin-bottom:14px;color:#000!important}.invoice-print-card{border:0!important;padding:0 0 16px!important;margin-bottom:14px!important}.invoice-summary{border-bottom:2px solid #000;padding-bottom:12px}.invoice-summary span,.invoice-summary small{color:#444!important;font-size:10px!important}.invoice-summary b{font-size:24px!important;color:#000!important}.invoice-summary strong,.invoice-summary-right p{font-size:14px!important;color:#000!important}.invoice-parts-title{font-size:13px!important;color:#000!important;margin:12px 0 6px!important}table{font-size:11px!important}th{color:#000!important;border-bottom:2px solid #000!important}td{color:#000!important}.invoice-alert{display:none!important}}
.estimate-cards{grid-template-columns:repeat(4,minmax(0,1fr))}
.estimate-line-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.estimate-summary-list p{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);padding:10px 0;margin:0}
.estimate-summary-list span{color:var(--muted)}
.estimate-summary-list b{color:#fff}
.estimate-header-bar{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:12px}
.estimate-header-panel{padding:12px 14px}
.estimate-header-bottom{margin-top:16px}
.estimate-header-plain{padding-top:0}
.estimate-header-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px 16px}
.estimate-header-grid p{margin:0;border-bottom:1px solid rgba(148,163,184,.18);padding:7px 0}
.estimate-header-grid span{display:block;color:var(--muted);font-size:12px;text-transform:uppercase;font-weight:800;margin-bottom:6px}
.estimate-header-grid b{display:block;color:#fff;font-size:15px}
.estimate-entry-grid{align-items:start}
.estimate-lines-grid{align-items:start;margin-top:0}
.estimate-mini-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.estimate-mini-grid-parts{grid-template-columns:repeat(3,minmax(0,1fr))}
.estimate-edit-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:12px;margin-bottom:10px}
.estimate-edit-grid-parts{grid-template-columns:1.2fr 2fr 1fr 1fr 1fr}
.estimate-inline-edit{margin:0}
.estimate-inline-edit input{margin-bottom:0}
.estimate-lines-table td .row-actions{justify-content:flex-end}
.estimate-part-number{font-family:"Courier New",monospace;font-weight:800}
.estimate-section-block{border-top:1px solid var(--line);padding-top:14px;margin-top:14px}
.estimate-section-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-end;margin-bottom:8px}.estimate-section-head h3{margin:0}
.estimate-lines-table{margin-top:0}
.estimate-labor-line{font-weight:800}
.estimate-part-line{padding-left:0}
.estimate-subtotal-row td{background:rgba(148,163,184,.08)}
.estimate-print-sheet{background:#fff!important;color:#000!important}
.estimate-print-topline{display:flex;justify-content:space-between;gap:12px;font-size:12px;color:#222;border-bottom:1px solid #cbd5e1;padding-bottom:10px;margin-bottom:16px}
.estimate-print-header{display:grid;grid-template-columns:1fr auto;gap:24px;align-items:start;margin-bottom:28px}
.estimate-print-header h2{font-size:28px;margin:0 0 6px;color:#000}
.estimate-print-date{font-size:18px;margin-bottom:6px}
.estimate-print-title{font-size:18px;text-transform:uppercase}
.estimate-print-brand b{font-size:28px;line-height:1.05;text-align:right;display:block;color:#000}
.estimate-party-grid{display:grid;grid-template-columns:1fr 1fr;gap:40px;margin-bottom:18px}
.estimate-party-grid h3,.estimate-shop-info h3{margin:0 0 10px;color:#000;font-size:22px}
.estimate-party-grid p{margin:4px 0;color:#111}
.estimate-shop-info{text-align:right}
.estimate-unit-row{display:grid;grid-template-columns:auto 1fr auto 2fr;gap:12px;align-items:end;border-top:1px solid #d1d5db;border-bottom:1px solid #d1d5db;padding:10px 0;margin-bottom:18px;color:#111}
.estimate-unit-label{text-align:right}
.estimate-print-block{margin-bottom:16px}
.estimate-print-block-title{font-size:16px;font-weight:900;color:#000;margin:0 0 8px}
.estimate-print-table{table-layout:fixed}
.estimate-print-table th,.estimate-print-table td{color:#000!important;border-bottom:1px solid #d1d5db!important}
.estimate-col-description{width:54%}
.estimate-col-qty{width:12%}
.estimate-col-rate{width:17%}
.estimate-col-amount{width:17%}
.estimate-num-head{text-align:right!important;white-space:nowrap}
.estimate-num{text-align:right;white-space:nowrap}
.estimate-print-section-row td{font-weight:900;font-size:17px;padding-top:18px;background:#fff}
.estimate-print-subtotal td,.estimate-print-total td{font-weight:900}
.estimate-print-total td{border-top:2px solid #111!important;font-size:16px}
.estimate-print-clean tr td{border-bottom:0!important}
.estimate-print-totals{width:360px;margin-left:auto;margin-top:12px;border-top:1px solid #111}
.estimate-print-totals td{color:#000!important;border-bottom:0!important;padding:8px 10px}
.estimate-print-totals td:last-child{text-align:right!important;white-space:nowrap}
.estimate-print-totals tr:last-child td{border-top:2px solid #111!important}
.estimate-print-sheet,.estimate-print-sheet *{color:#000!important}
@media(max-width:850px){.estimate-line-grid,.estimate-party-grid,.estimate-print-header,.estimate-unit-row,.estimate-header-grid,.estimate-mini-grid,.estimate-mini-grid-parts,.estimate-edit-grid,.estimate-edit-grid-parts{grid-template-columns:1fr}.estimate-print-brand b,.estimate-shop-info,.estimate-unit-label{text-align:left}.estimate-cards{grid-template-columns:1fr 1fr}}
.email-layout{display:grid;grid-template-columns:minmax(430px,1.1fr) minmax(0,1fr);gap:16px;align-items:start}.email-list-table td,.email-list-table th{white-space:nowrap}.email-list-table td:nth-child(2){white-space:normal;min-width:220px}.email-selected-row td{background:rgba(59,130,246,.10)}.email-detail-head{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 18px}.email-detail-head span{display:block;color:var(--muted);font-size:12px;text-transform:uppercase;font-weight:800;margin-bottom:6px}.email-detail-head strong{display:block;color:#fff;font-size:16px;line-height:1.35}.email-body-box{background:#091321;border:1px solid #223449;border-radius:12px;padding:14px;white-space:pre-wrap;line-height:1.45;min-height:220px}.email-attachment-list{display:flex;flex-direction:column;gap:10px}.email-attachment-item{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;background:#091321;border:1px solid #223449;border-radius:12px;padding:12px}@media(max-width:1100px){.email-layout{grid-template-columns:1fr}.email-detail-head{grid-template-columns:1fr}.email-attachment-item{display:block}}
.email-test-card{margin-top:16px;border:1px solid var(--line);border-radius:14px;padding:14px;background:#0b1321}.email-test-ok{border-color:rgba(34,197,94,.45)}.email-test-error{border-color:rgba(239,68,68,.55)}.email-test-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:10px}.email-test-head h3{margin:0;font-size:18px}.email-test-head span{color:var(--muted);font-size:12px}.email-test-block b{display:block;margin-bottom:6px}.email-test-block ul{margin:0 0 10px 18px;padding:0}.email-test-block li{margin:4px 0;line-height:1.35}
.email-stack{display:flex;flex-direction:column;gap:16px}.email-list-stack{display:flex;flex-direction:column;gap:8px}.email-list-card{display:grid;grid-template-columns:minmax(220px,300px) minmax(0,1fr) auto auto;gap:12px;align-items:center;text-decoration:none;color:var(--text);background:#091321;border:1px solid #223449;border-radius:10px;padding:8px 12px}.email-list-card:hover{border-color:#3b82f6}.email-list-card-selected{border-color:#60a5fa;background:#0d1930;box-shadow:0 0 0 1px rgba(96,165,250,.25)}.email-line-from{color:#fff;font-size:14px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.email-line-subject{color:#dbeafe;font-size:14px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.email-line-date{color:var(--muted);font-size:12px;white-space:nowrap}.email-line-unread{color:#93c5fd;font-size:12px;font-weight:800;white-space:nowrap}@media(max-width:850px){.email-list-card{grid-template-columns:minmax(0,1fr) auto}.email-line-subject{grid-column:1 / -1}.email-line-unread{justify-self:end}}
.shop-public-updated{color:#cbd5e1;font-size:14px;font-weight:700}.shop-public-row-card{grid-template-columns:minmax(170px,220px) minmax(110px,150px) minmax(0,1fr) minmax(190px,250px)}@media(max-width:1380px){.shop-public-row-card{grid-template-columns:minmax(160px,210px) minmax(100px,135px) minmax(0,1fr)}}@media(max-width:1200px){.shop-public-row-card{grid-template-columns:1fr 1fr}.shop-public-row-card .shop-row-problems{grid-column:1 / -1}.shop-public-row-card .shop-row-meta{grid-column:auto}}@media(max-width:700px){.shop-public-updated{margin-top:10px}.shop-public-row-card{grid-template-columns:1fr}}

/* Build 014: simple Parts scanner / PWA */
.parts-shell{max-width:820px;margin:0 auto;display:grid;gap:18px}.parts-card{background:#fff;border:1px solid #d9dee7;border-radius:14px;padding:18px;box-shadow:0 4px 18px rgba(0,0,0,.06)}.parts-card h2,.parts-card h3{margin-top:0}.scan-row{display:flex;gap:10px;align-items:center}.scan-row input{flex:1;min-width:0}.scan-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}.button{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}.secondary{background:#eef1f5!important;color:#1f2937!important}.muted{color:#667085;font-size:.9rem}.camera-box{width:100%;max-height:420px;margin-top:14px;border-radius:12px;background:#111;overflow:hidden}.parts-message{margin-top:14px;padding:12px;border-radius:10px}.parts-message.good{background:#e8f8ee;color:#176a37}.parts-message.bad{background:#feecec;color:#9c2424}.part-heading{display:flex;justify-content:space-between;gap:12px;align-items:start}.part-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.part-grid div{background:#f7f8fa;border-radius:10px;padding:12px}.part-grid span{display:block;color:#667085;font-size:.82rem;margin-bottom:5px}.part-grid strong{overflow-wrap:anywhere}.quick-section{margin-top:15px}.quick-section select{width:100%;margin-bottom:10px}
@media(max-width:700px){.parts-card{padding:14px}.part-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.scan-row{align-items:stretch}.scan-row button{white-space:nowrap}}
@media(max-width:420px){.part-grid{grid-template-columns:1fr}.scan-row{flex-direction:column}.scan-row button{width:100%}.part-heading{flex-direction:column}}

/* Build 015 PWA controls */
.pwa-tools{position:fixed;right:14px;bottom:14px;z-index:9999;display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.pwa-pill{border:0;border-radius:999px;padding:10px 14px;font-weight:800;box-shadow:0 8px 24px rgba(0,0,0,.28)}.pwa-update{background:#facc15!important;color:#201300!important}.pwa-install{background:#22c55e!important;color:#03120a!important}.pwa-modal{position:fixed;inset:0;z-index:10000;background:rgba(2,6,23,.82);display:flex;align-items:center;justify-content:center;padding:18px}.pwa-modal[hidden]{display:none}.pwa-modal-card{max-width:480px;width:100%;background:#fff;color:#111827;border-radius:18px;padding:22px;box-shadow:0 20px 60px rgba(0,0,0,.45)}.pwa-modal-card h2{margin:0 0 12px}.pwa-modal-card ol{padding-left:22px;line-height:1.55}.pwa-modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}@media(display-mode:standalone){.pwa-install{display:none!important}}@media(max-width:850px){body{padding-bottom:env(safe-area-inset-bottom)}.pwa-tools{bottom:calc(10px + env(safe-area-inset-bottom));right:10px;left:10px}.pwa-pill{flex:1}}

/* Build 017 Parts Mobile Scanner */
.parts-mobile-shell{max-width:880px;margin:0 auto;padding-bottom:90px}.parts-mobile-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.parts-mobile-header h1{margin:2px 0 0;font-size:clamp(1.6rem,5vw,2.25rem)}.parts-mobile-header small,.parts-result-card small{color:#667085;font-weight:800;letter-spacing:.09em}.parts-icon-button,.parts-link-button{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:0 16px;border-radius:12px;background:#eef2f7;color:#172033;text-decoration:none;font-weight:800}.parts-tabs{position:sticky;top:0;z-index:8;display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding:7px;background:rgba(245,247,250,.96);backdrop-filter:blur(8px);border-radius:14px;margin-bottom:12px}.parts-tab{min-height:46px;border:0;border-radius:10px;background:transparent;color:#475467;font-weight:800}.parts-tab.active{background:#fff;color:#111827;box-shadow:0 2px 10px rgba(0,0,0,.08)}.parts-panel{display:none;background:#fff;border:1px solid #dfe4ec;border-radius:16px;padding:16px;box-shadow:0 5px 22px rgba(15,23,42,.06);margin-bottom:14px}.parts-panel.active{display:block}.parts-primary-action,.parts-secondary-action{width:100%;min-height:54px;border:0;border-radius:14px;font-size:1rem;font-weight:900}.parts-primary-action{background:#1769e0;color:#fff}.parts-secondary-action{background:#e9edf3;color:#172033;margin-top:8px}.parts-camera{width:100%;max-height:65vh;margin-top:12px;border-radius:14px;background:#111;overflow:hidden}.parts-help{margin:10px 0 0;color:#667085;font-size:.9rem}.parts-label{display:block;font-weight:800;margin-bottom:7px}.parts-search-row,.parts-stepper-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px}.parts-search-row input,.parts-stepper-row input,.parts-action-box input,.parts-action-box select,.parts-new-form input{min-height:50px;border:1px solid #cfd6e1;border-radius:12px;padding:0 13px;font-size:16px}.parts-search-row button,.parts-stepper-row button{min-height:50px;border:0;border-radius:12px;padding:0 18px;background:#1769e0;color:#fff;font-weight:900}.parts-mobile-message{padding:13px 15px;border-radius:12px;margin:12px 0;font-weight:800}.parts-mobile-message.good{background:#e8f8ee;color:#176a37}.parts-mobile-message.bad{background:#feecec;color:#9c2424}.parts-result-card{background:#fff;border:1px solid #dfe4ec;border-radius:18px;padding:17px;box-shadow:0 8px 28px rgba(15,23,42,.08);margin-top:14px}.parts-result-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.parts-result-top h2{margin:3px 0}.parts-result-top p{margin:0;color:#667085;font-weight:800}.parts-stock-badge{white-space:nowrap;padding:9px 11px;border-radius:999px;background:#e8f8ee;color:#176a37;font-weight:900}.parts-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:16px 0}.parts-facts div{background:#f6f8fb;border-radius:12px;padding:11px}.parts-facts span{display:block;color:#667085;font-size:.78rem;margin-bottom:4px}.parts-facts strong{overflow-wrap:anywhere}.parts-action-box{border:1px solid #dfe4ec;border-radius:14px;padding:13px;margin-top:11px}.parts-action-box summary,.parts-action-box h3{font-weight:900;margin:0 0 10px}.parts-action-box summary{cursor:pointer}.parts-action-box select,.parts-action-box>input{width:100%;margin-bottom:9px}.parts-link-button{width:100%;margin-top:12px}.parts-recent-list{display:grid;gap:8px}.parts-recent-item{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:12px;border-radius:12px;background:#f7f8fa}.parts-recent-item span{display:block;color:#667085;font-size:.85rem}.parts-recent-meta{text-align:right}.parts-recent-meta b{display:block}.parts-new-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;margin-top:14px}.parts-new-form label{display:grid;gap:6px;font-weight:800}.parts-wide{grid-column:1/-1}.parts-empty{color:#667085;text-align:center;padding:18px}.parts-new-card{border-color:#f4c36b}
@media(max-width:700px){.main-content{padding-left:10px!important;padding-right:10px!important}.parts-mobile-shell{width:100%}.parts-mobile-header{padding:2px 2px}.parts-panel,.parts-result-card{border-radius:15px;padding:14px}.parts-facts{grid-template-columns:1fr 1fr}.parts-new-form{grid-template-columns:1fr}.parts-wide{grid-column:auto}.parts-result-top{flex-direction:column}.parts-stock-badge{align-self:flex-start}.parts-search-row,.parts-stepper-row{grid-template-columns:1fr}.parts-search-row button,.parts-stepper-row button{width:100%}}

/* Build 018: simple full-screen parts scanner */
.parts-simple-shell{max-width:680px;margin:0 auto;padding:12px 12px 80px}.parts-simple-title{text-align:center;margin:4px 0 18px}.parts-simple-title h1{margin:0;font-size:clamp(1.8rem,7vw,2.5rem)}.parts-simple-title p{margin:7px 0 0;color:#667085}.parts-manual-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin-top:12px}.parts-manual-row input{min-height:52px;border:1px solid #cfd6e1;border-radius:13px;padding:0 14px;font-size:16px}.parts-manual-row button{min-height:52px;border:0;border-radius:13px;padding:0 22px;background:#172033;color:#fff;font-weight:900}.parts-simple-shell .parts-camera{min-height:260px;max-height:72vh}.parts-simple-shell #reader video{object-fit:cover!important}.parts-simple-shell #reader__scan_region{min-height:250px}.parts-simple-shell #reader__dashboard_section_csr span,.parts-simple-shell #reader__dashboard_section_swaplink{display:none!important}
@media(max-width:700px){body.shop-role{background:#f5f7fa}.shop-layout,.shop-main{display:block!important;width:100%!important}.shop-main>.page-content{padding:0!important}.parts-simple-shell{padding:10px 10px 70px}.parts-manual-row{grid-template-columns:1fr}.parts-manual-row button{width:100%}.parts-simple-shell .parts-camera{min-height:300px;border-radius:12px}}
.parts-candidate-list{display:grid;gap:10px;margin-top:14px}.parts-candidate-list button{width:100%;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:18px;letter-spacing:.04em}


/* Build 022: CFR dark scanner theme and capture workflow */
body.shop-role{background:#0b1220!important;color:#e5e7eb!important}
.parts-simple-shell{max-width:720px}
.parts-simple-title h1{color:#fff}
.parts-simple-title p,.parts-help{color:#94a3b8}
.parts-primary-action{background:#22c55e!important;color:#03120a!important}
.parts-secondary-action{background:#1f2937!important;color:#e5e7eb!important;border:1px solid #334155!important}
.parts-capture-action{width:100%;min-height:58px;margin-top:10px;border:1px solid #4ade80!important;border-radius:14px;background:#064e3b!important;color:#dcfce7!important;font-size:1rem;font-weight:900}
.parts-camera{border:2px solid #22c55e!important;background:#020617!important;box-shadow:0 0 0 4px rgba(34,197,94,.10)}
.parts-scan-status{margin:10px 0 0;padding:11px 13px;border:1px solid #334155;border-radius:12px;background:#111827;color:#bbf7d0;text-align:center;font-weight:800}
.parts-manual-row input,.parts-new-form input,.parts-action-box input,.parts-action-box select{background:#020617!important;color:#e5e7eb!important;border-color:#334155!important}
.parts-manual-row button,.parts-stepper-row button{background:#22c55e!important;color:#03120a!important}
.parts-result-card{background:linear-gradient(180deg,#111827,#0f172a)!important;border-color:#334155!important;color:#e5e7eb!important;box-shadow:0 8px 28px rgba(0,0,0,.28)!important}
.parts-result-card small,.parts-result-top p,.parts-facts span{color:#94a3b8!important}
.parts-facts div{background:#020617!important;border:1px solid #253247}
.parts-action-box{border-color:#334155!important;background:#0b1220!important}
.parts-stock-badge{background:#064e3b!important;color:#bbf7d0!important}
.parts-new-card{border-color:#22c55e!important}
.parts-mobile-message.good{background:#064e3b!important;color:#bbf7d0!important}
.parts-mobile-message.bad{background:#4c0519!important;color:#fecdd3!important}
.parts-candidate-list .parts-primary-action{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
@media(max-width:700px){body.shop-role{background:#0b1220!important}.parts-simple-shell{padding-top:8px}}

/* Build 023 reports and backup/restore */
.report-filter-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:end}.report-filter-grid label{display:flex;flex-direction:column;gap:6px}.report-filter-grid input,.report-filter-grid select{width:100%}.report-toolbar{display:flex;gap:10px;justify-content:flex-end;margin-bottom:14px}.report-header{text-align:center;margin-bottom:16px}.report-header h1{margin:0}.report-header h2{margin:6px 0}.report-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:14px 0}.report-summary span{padding:12px;border:1px solid var(--border,#d8dee9);border-radius:10px;text-align:center}.report-table{font-size:13px}.report-footer{text-align:center;margin-top:18px;font-size:12px}.action-row{display:flex;gap:7px;flex-wrap:wrap}.action-row form{margin:0}.btn.small{padding:7px 10px;font-size:13px}.btn.danger{background:#a82a2a;color:#fff}.table-wrap{overflow-x:auto}
@media(max-width:700px){.report-filter-grid{grid-template-columns:1fr}.report-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.report-toolbar{justify-content:stretch;flex-wrap:wrap}.report-toolbar .btn{flex:1;text-align:center}}
@media print{.no-print,.sidebar,.topbar,.app-footer{display:none!important}.app-shell,.content,.main{display:block!important;margin:0!important;padding:0!important;width:100%!important}.report-page{color:#000;background:#fff}.report-table{font-size:9pt}.report-table th,.report-table td{padding:4px;border:1px solid #777}.report-summary span{border:1px solid #777}.report-footer{position:fixed;bottom:0;left:0;right:0}.report-header h1{font-size:18pt}.report-header h2{font-size:14pt}@page{size:landscape;margin:0.45in}}

/* Build 036 — one clean Samsara-style UI across CFR Shop */
:root{
  --bg:#0b1220;--panel:#111827;--panel2:#151d2a;--text:#e5e7eb;
  --muted:#94a3b8;--accent:#22c55e;--danger:#ef4444;--line:#263244;
}
body{background:var(--bg)}
.cfr-sidebar{width:230px;padding:18px 14px;background:#070d18;border-right:1px solid var(--line);overflow-y:auto}
.cfr-sidebar .brand{font-size:21px;margin:2px 8px 18px}
.cfr-sidebar+.main, .cfr-sidebar~main{margin-left:230px;width:calc(100% - 230px)}
.compact-nav{display:grid;gap:6px}
.nav-group{border:1px solid #202c3d;border-radius:10px;background:#0d1522;overflow:hidden}
.nav-group summary{list-style:none;cursor:pointer;padding:10px 11px;color:#b9c7d8;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.07em;display:flex;align-items:center;justify-content:space-between}
.nav-group summary::-webkit-details-marker{display:none}
.nav-group summary:after{content:'+';color:#6f849d;font-size:17px;line-height:1}
.nav-group[open] summary:after{content:'−'}
.nav-group[open] summary{border-bottom:1px solid #202c3d;background:#111b2a}
.nav-group-links{padding:5px}
.compact-nav .nav-group a,.compact-nav .nav-logout{display:block;margin:2px 0;padding:9px 10px;border-radius:8px;color:#dbe5f0;text-decoration:none;font-size:14px;font-weight:700}
.compact-nav .nav-group a:hover{background:#172234}
.compact-nav .nav-group a.active{background:#244a38;color:#eafff1;border:1px solid #3f7d5f}
.compact-nav .nav-logout{margin-top:4px;background:#151d2a;border:1px solid #263244;color:#fca5a5;text-align:center}
.side-version{font-size:10px;color:#64748b;margin:12px 7px 0;line-height:1.35}
main{padding:20px 22px}
.top{min-height:48px;margin-bottom:14px;padding-bottom:12px;border-bottom:1px solid #1d2938}
.top h1{font-size:25px;margin:0}.userbox{font-size:13px;text-align:right;color:#dbe5f0}.userbox small{font-size:11px}
.page-content{max-width:1500px;width:100%;margin:0 auto}
.panel,.card,.status-monitor-card,.parts-result-card{background:#151d2a;border:1px solid #263244;border-radius:10px;box-shadow:none}
.panel{padding:14px}.card{padding:14px}
.cards{gap:10px;margin-bottom:14px}.card b{font-size:24px}
.toolbar,.quickbar{gap:8px;margin-bottom:12px}
.btn,button{border-radius:9px;padding:9px 12px}.btn.secondary,button.secondary,.mini.secondary{background:#253247!important}
input,select,textarea{border-radius:8px;background:#0b1220;border-color:#2a394d;padding:10px}
table{margin-top:8px}th{font-size:11px;letter-spacing:.04em}th,td{padding:9px;border-color:#263244}
.alert{border-radius:9px;padding:10px 12px}
.tabs,.sa-nav{gap:6px}.tabs a,.sa-nav button{border-radius:8px!important;padding:8px 10px!important}
/* Service status: three clear states requested for shop use */
.pill.service-none{background:#dff7e7!important;color:#166534!important;border:1px solid #a7e4bb!important}
.pill.service-upcoming{background:#fff4bf!important;color:#854d0e!important;border:1px solid #f2d56c!important}
.pill.service-overdue{background:#dc2626!important;color:#fff!important;border:1px solid #ef4444!important}
/* Keep legacy status classes soft and consistent */
.pill.green{background:#dff7e7!important;color:#166534!important}.pill.amber{background:#fff4bf!important;color:#854d0e!important}.pill.red{background:#dc2626!important;color:#fff!important}.pill.gray{background:#253247!important;color:#cbd5e1!important}
@media(max-width:850px){
  .cfr-sidebar{position:relative;width:100%;height:auto;padding:12px}.cfr-sidebar+.main,.cfr-sidebar~main{margin-left:0;width:100%}
  .compact-nav{grid-template-columns:1fr 1fr}.nav-logout{grid-column:1/-1}.side-version{display:none}
  main{padding:12px}.top h1{font-size:22px}.page-content{max-width:none}
}
@media(max-width:560px){.compact-nav{grid-template-columns:1fr}.cards{grid-template-columns:1fr!important}}

/* Build 037: smart Work Order company / truck matching */
.wo-match-box{margin:2px 0 16px;border:1px solid #d9e1ea;background:#f8fbfd;border-radius:10px;padding:8px;display:grid;gap:6px}
.wo-match-box[hidden]{display:none!important}.wo-match-title{font-weight:700;padding:5px 7px;color:#334155}.wo-match-row{appearance:none;width:100%;border:1px solid #dbe3ea;background:#fff;border-radius:8px;padding:9px 11px;text-align:left;display:grid;grid-template-columns:minmax(80px,.7fr) minmax(130px,1.2fr) minmax(160px,1.6fr);gap:10px;align-items:center;cursor:pointer;color:inherit}.wo-match-row:hover{border-color:#9eb6c9;background:#f2f8fc}.wo-match-row span{font-weight:600}.wo-match-row small{color:#64748b}.wo-manual-note{font-size:12px;color:#64748b;padding:4px 7px}.wo-header-editor{border-left:4px solid #6e9bb8}.section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.section-head h2,.section-head h3{margin-top:0}.section-head p{margin-bottom:0}
@media(max-width:760px){.wo-match-row{grid-template-columns:1fr}.wo-smart-grid{grid-template-columns:1fr!important}}


/* Build 042 unified CFR theme — same visual system as Samsara */
:root{--cfr-bg:#0f1622;--cfr-surface:#151d2a;--cfr-surface2:#111827;--cfr-border:#2c3a4d;--cfr-text:#e7edf5;--cfr-muted:#94a3b8;--cfr-accent:#3f7d5f;--cfr-accent-soft:#244a38;--cfr-yellow:#f4cf63}
body{background:var(--cfr-bg)!important;color:var(--cfr-text)!important} main,.main,.page-content{color:var(--cfr-text)!important}
.panel,.card,.settings-card,.user-card,.dashboard-card,.stat-card{background:var(--cfr-surface)!important;border-color:var(--cfr-border)!important;box-shadow:none!important}
h1,h2,h3,h4,strong,label,th{color:var(--cfr-text)!important}.muted,small,.help,.subtle{color:var(--cfr-muted)!important}
input,select,textarea{background:var(--cfr-surface2)!important;color:var(--cfr-text)!important;border-color:var(--cfr-border)!important} input::placeholder,textarea::placeholder{color:#64748b!important}
table{background:var(--cfr-surface)!important} th{background:#182231!important;border-color:var(--cfr-border)!important} td{border-color:var(--cfr-border)!important} tbody tr:hover{background:#182231!important}
.btn:not(.secondary):not(.danger):not(.sync-yellow){background:var(--cfr-accent)!important;border-color:#4f9271!important;color:#fff!important}.btn.secondary,.mini.secondary{background:#1b2635!important;border-color:#3b4c61!important;color:var(--cfr-text)!important}.btn.secondary:hover,.mini.secondary:hover{background:#243246!important}.sync-yellow{background:var(--cfr-yellow)!important;color:#332600!important;border-color:#e7bd3d!important}
.btn.pm-service:not(.secondary):not(.danger):not(.sync-yellow){background:#7dd3fc!important;border-color:#38bdf8!important;color:#082f49!important}
.btn.pm-service:not(.secondary):not(.danger):not(.sync-yellow):hover{background:#38bdf8!important;color:#082f49!important}
.tabs a,.settings-nav a,.sa-nav button{background:var(--cfr-surface)!important;border-color:var(--cfr-border)!important;color:var(--cfr-text)!important}.tabs a.active,.settings-nav a.active,.sa-nav button.active{background:var(--cfr-accent-soft)!important;border-color:var(--cfr-accent)!important}
.alert.success{background:#163a2a!important;border-color:#2f6e50!important;color:#d9f7e6!important}.alert.warning{background:#45370f!important;border-color:#78601d!important;color:#fff3bf!important}.alert.danger{background:#481b1b!important;border-color:#7f1d1d!important;color:#fee2e2!important}
hr{border-color:var(--cfr-border)!important}


/* Build 046 tenant-selectable themes */
body[data-theme="dark"]{--cfr-bg:#0f1622;--cfr-surface:#151d2a;--cfr-surface2:#111827;--cfr-border:#2c3a4d;--cfr-text:#edf3fa;--cfr-muted:#a9b6c6;--cfr-accent:#3f7d5f;--cfr-accent-soft:#244a38;--cfr-yellow:#f4cf63}
body[data-theme="light"]{--cfr-bg:#eef2f6;--cfr-surface:#ffffff;--cfr-surface2:#f7f9fb;--cfr-border:#cbd5e1;--cfr-text:#172033;--cfr-muted:#56657a;--cfr-accent:#287a52;--cfr-accent-soft:#d9f1e4;--cfr-yellow:#f4cf63}
body[data-theme="slate"]{--cfr-bg:#1b2028;--cfr-surface:#252c36;--cfr-surface2:#1f2630;--cfr-border:#435061;--cfr-text:#f3f4f6;--cfr-muted:#b4becb;--cfr-accent:#6b8e7a;--cfr-accent-soft:#344a40;--cfr-yellow:#d9bd65}
body[data-theme="ocean"]{--cfr-bg:#09202a;--cfr-surface:#10303b;--cfr-surface2:#0b2731;--cfr-border:#285363;--cfr-text:#e8f7fb;--cfr-muted:#9fc2cc;--cfr-accent:#20a486;--cfr-accent-soft:#155f52;--cfr-yellow:#e8c85f}
body[data-theme]{background:var(--cfr-bg)!important;color:var(--cfr-text)!important}
body[data-theme] .panel,body[data-theme] .card,body[data-theme] .settings-card,body[data-theme] .user-card,body[data-theme] .maint-card{background:var(--cfr-surface)!important;border-color:var(--cfr-border)!important;color:var(--cfr-text)!important}
body[data-theme] input,body[data-theme] select,body[data-theme] textarea{background:var(--cfr-surface2)!important;color:var(--cfr-text)!important;border-color:var(--cfr-border)!important}
body[data-theme] h1,body[data-theme] h2,body[data-theme] h3,body[data-theme] h4,body[data-theme] label,body[data-theme] strong,body[data-theme] td,body[data-theme] th{color:var(--cfr-text)!important}
body[data-theme] .muted,body[data-theme] small,body[data-theme] .help,body[data-theme] .subtle{color:var(--cfr-muted)!important}
body[data-theme] table{background:var(--cfr-surface)!important}body[data-theme] th{background:var(--cfr-surface2)!important;border-color:var(--cfr-border)!important}body[data-theme] td{border-color:var(--cfr-border)!important}
body[data-theme="light"] .cfr-sidebar{background:#ffffff!important;color:#172033!important}body[data-theme="light"] .brand{color:#172033!important}body[data-theme="light"] .nav-group{background:#f7f9fb!important;border-color:#cbd5e1!important}body[data-theme="light"] .nav-group summary,body[data-theme="light"] .compact-nav .nav-group a{color:#253247!important}body[data-theme="light"] .nav-group[open] summary{background:#edf2f7!important;border-color:#cbd5e1!important}body[data-theme="light"] .compact-nav .nav-group a.active{background:#d9f1e4!important;color:#185b3b!important;border-color:#69aa89!important}


/* Build 047: appearance themes + readability */
body[data-theme="forest"]{--cfr-bg:#101b15;--cfr-surface:#1a2d22;--cfr-surface2:#14251c;--cfr-border:#365844;--cfr-text:#eef8f0;--cfr-muted:#b7cfbd;--cfr-accent:#55a574;--cfr-accent-soft:#294b35;--cfr-yellow:#e8cb63}
body[data-theme="contrast"]{--cfr-bg:#000000;--cfr-surface:#111111;--cfr-surface2:#191919;--cfr-border:#777777;--cfr-text:#ffffff;--cfr-muted:#e5e5e5;--cfr-accent:#ffd400;--cfr-accent-soft:#403700;--cfr-yellow:#ffd400}
body[data-theme="contrast"] .btn:not(.danger),body[data-theme="contrast"] .mini:not(.danger-mini){color:#000!important;border-color:#ffd400!important}
body[data-theme="contrast"] .btn.secondary,body[data-theme="contrast"] .mini.secondary{background:#222!important;color:#fff!important;border-color:#aaa!important}
/* Make lists, links and secondary text readable in every theme. */
body[data-theme] a{color:var(--cfr-text)}
body[data-theme] table a,body[data-theme] .list a,body[data-theme] .wo-list a,body[data-theme] .recent-list a{color:var(--cfr-text)!important;font-weight:650;text-decoration:none}
body[data-theme] table a:hover,body[data-theme] .list a:hover{color:var(--cfr-yellow)!important;text-decoration:underline}
body[data-theme] ul,body[data-theme] ol,body[data-theme] li,body[data-theme] .list-item,body[data-theme] .row,body[data-theme] .empty{color:var(--cfr-text)!important}
body[data-theme] .badge,body[data-theme] .pill{color:var(--cfr-text)}
body[data-theme] input::placeholder,body[data-theme] textarea::placeholder{color:var(--cfr-muted)!important;opacity:1}
body[data-theme] option{background:var(--cfr-surface2);color:var(--cfr-text)}
body[data-theme] .compact-nav a{color:var(--cfr-text)!important}
body[data-theme] .nav-group summary{color:var(--cfr-text)!important}
body[data-theme="light"] .btn.secondary,body[data-theme="light"] .mini.secondary{background:#eef2f7!important;color:#172033!important;border-color:#b6c2d1!important}
body[data-theme="light"] .alert.success{color:#123c27!important;background:#dff4e8!important}body[data-theme="light"] .alert.warning{color:#5a4300!important;background:#fff4c8!important}body[data-theme="light"] .alert.danger{color:#6c1717!important;background:#ffe3e3!important}


/* Build 048: complete theme bridge for legacy CFR CSS + high-contrast readable surfaces */
body[data-theme]{
  --bg:var(--cfr-bg);--panel:var(--cfr-surface);--panel2:var(--cfr-surface2);
  --text:var(--cfr-text);--muted:var(--cfr-muted);--accent:var(--cfr-accent);--line:var(--cfr-border);
  background:var(--cfr-bg)!important;color:var(--cfr-text)!important;
}
html[data-theme-preview="light"] body:not([data-theme]){background:#eef2f6;color:#172033}
body[data-theme] main,body[data-theme] .main,body[data-theme] .page-content{background:var(--cfr-bg)!important;color:var(--cfr-text)!important}
body[data-theme] aside,body[data-theme] .cfr-sidebar{background:var(--cfr-surface2)!important;border-color:var(--cfr-border)!important;color:var(--cfr-text)!important}
body[data-theme] .brand{color:var(--cfr-text)!important}
body[data-theme] .brand span{color:var(--cfr-accent)!important}
body[data-theme] .nav-group{background:var(--cfr-surface)!important;border-color:var(--cfr-border)!important}
body[data-theme] .nav-group summary{background:var(--cfr-surface2)!important;color:var(--cfr-text)!important;border-color:var(--cfr-border)!important}
body[data-theme] .nav-group[open] summary{background:var(--cfr-accent-soft)!important}
body[data-theme] nav a,body[data-theme] .compact-nav a{color:var(--cfr-text)!important}
body[data-theme] nav a:hover,body[data-theme] .compact-nav a:hover{background:var(--cfr-surface2)!important}
body[data-theme] nav a.active,body[data-theme] .compact-nav a.active{background:var(--cfr-accent-soft)!important;border-color:var(--cfr-accent)!important;color:var(--cfr-text)!important}
body[data-theme] .card,body[data-theme] .panel,body[data-theme] .settings-card,body[data-theme] .dashboard-card,body[data-theme] .stat-card,body[data-theme] .maint-card,body[data-theme] .user-card,body[data-theme] .login-card{background:var(--cfr-surface)!important;color:var(--cfr-text)!important;border-color:var(--cfr-border)!important}
body[data-theme] .card span,body[data-theme] .app-footer,body[data-theme] small,body[data-theme] .muted{color:var(--cfr-muted)!important}
body[data-theme] table,body[data-theme] tbody,body[data-theme] tr{background:var(--cfr-surface)!important;color:var(--cfr-text)!important}
body[data-theme] th{background:var(--cfr-surface2)!important;color:var(--cfr-text)!important}
body[data-theme] tbody tr:hover{background:var(--cfr-accent-soft)!important}
body[data-theme] input,body[data-theme] select,body[data-theme] textarea{background:var(--cfr-surface2)!important;color:var(--cfr-text)!important;border-color:var(--cfr-border)!important}
body[data-theme] .badge,body[data-theme] .pill{background:var(--cfr-surface2)!important;border-color:var(--cfr-border)!important;color:var(--cfr-text)!important}
body[data-theme] .settings-nav a,body[data-theme] .tabs a{background:var(--cfr-surface)!important;color:var(--cfr-text)!important;border-color:var(--cfr-border)!important}
body[data-theme] .settings-nav a.active,body[data-theme] .tabs a.active{background:var(--cfr-accent-soft)!important;border-color:var(--cfr-accent)!important}
body[data-theme="light"]{color-scheme:light}
body[data-theme="dark"],body[data-theme="slate"],body[data-theme="ocean"],body[data-theme="forest"],body[data-theme="contrast"]{color-scheme:dark}
body[data-theme="light"] .btn:not(.danger):not(.sync-yellow),body[data-theme="light"] button:not(.danger):not(.sync-yellow){color:#fff!important}
body[data-theme="contrast"] .btn:not(.danger):not(.secondary),body[data-theme="contrast"] button:not(.danger):not(.secondary){background:#ffd400!important;color:#000!important}

/* Build 049: theme polish + per-user appearance */
.top-right{display:flex;align-items:center;gap:10px;justify-content:flex-end}
.top-theme-link{white-space:nowrap}
@media(max-width:1050px){.top-right{justify-content:flex-start;margin-top:10px}}
body[data-theme] .estimate-summary-list b,
body[data-theme] .estimate-header-grid b,
body[data-theme] .estimate-header-bar b,
body[data-theme] .invoice-summary b,
body[data-theme] .invoice-summary strong,
body[data-theme] .invoice-summary-right p,
body[data-theme] .theme-current strong{color:var(--cfr-text)!important}
body[data-theme] .settings-help,
body[data-theme] .email-test-card,
body[data-theme] .email-body-box,
body[data-theme] .email-attachment-item,
body[data-theme] .email-list-card,
body[data-theme] .status-monitor-timebox{background:var(--cfr-surface2)!important;border-color:var(--cfr-border)!important;color:var(--cfr-text)!important}
body[data-theme] .email-line-from,
body[data-theme] .email-line-subject,
body[data-theme] .email-detail-head strong{color:var(--cfr-text)!important}
body[data-theme] .email-line-date,
body[data-theme] .email-test-head span{color:var(--cfr-muted)!important}
body[data-theme] .wo-match-box{background:var(--cfr-surface2)!important;border-color:var(--cfr-border)!important}
body[data-theme] .wo-match-title,
body[data-theme] .wo-match-row small,
body[data-theme] .wo-manual-note{color:var(--cfr-muted)!important}
body[data-theme] .wo-match-row{background:var(--cfr-surface)!important;border-color:var(--cfr-border)!important;color:var(--cfr-text)!important}
body[data-theme] .wo-match-row:hover{background:var(--cfr-accent-soft)!important;border-color:var(--cfr-accent)!important}
body[data-theme] .status-company-button{background:var(--cfr-surface2)!important;border-color:var(--cfr-border)!important;color:var(--cfr-text)!important}
body[data-theme] .status-company-button b,
body[data-theme] .status-company-button span{color:var(--cfr-text)!important}

/* Build 051 — Estimate readability + professional portrait print */
body[data-theme] .estimate-shell,
body[data-theme] .estimate-lines-grid .panel,
body[data-theme] .estimate-entry-grid .panel{background:var(--cfr-surface)!important;color:var(--cfr-text)!important;border-color:var(--cfr-border)!important}
body[data-theme] .estimate-lines-table,
body[data-theme] .estimate-lines-table tbody,
body[data-theme] .estimate-lines-table tr{background:var(--cfr-surface)!important;color:var(--cfr-text)!important}
body[data-theme] .estimate-lines-table th{background:var(--cfr-surface2)!important;color:var(--cfr-text)!important;border-color:var(--cfr-border)!important}
body[data-theme] .estimate-lines-table td{color:var(--cfr-text)!important;border-color:var(--cfr-border)!important}
body[data-theme] .estimate-lines-table td:first-child,
body[data-theme] .estimate-lines-table td:nth-child(2),
body[data-theme] .estimate-header-plain,
body[data-theme] .estimate-header-plain p,
body[data-theme] .estimate-header-grid p{color:var(--cfr-text)!important}
body[data-theme] .estimate-header-grid span{color:var(--cfr-muted)!important}
body[data-theme] .estimate-js-amount[readonly]{background:var(--cfr-surface)!important;color:var(--cfr-text)!important;font-weight:800}
body[data-theme] .estimate-entry-grid label,
body[data-theme] .estimate-inline-edit label{color:var(--cfr-text)!important}

.estimate-print-sheet{page:estimate;max-width:8.5in;margin:0 auto;background:#fff!important;color:#111827!important;border:1px solid #d6dbe2!important;border-radius:8px!important;padding:0.42in!important;box-shadow:0 10px 32px rgba(0,0,0,.18)!important;font-family:"Helvetica Neue",Arial,sans-serif!important;font-size:10.5pt;line-height:1.35}
.estimate-print-sheet *{box-sizing:border-box;color:#111827!important}
.estimate-print-watermark{display:block;align-self:center;justify-self:center;width:100%;max-width:2.25in;height:auto;opacity:.11;pointer-events:none;user-select:none}
.estimate-pro-header{display:grid;grid-template-columns:1fr 1fr 1.35fr;gap:20px;align-items:start}
.estimate-pro-left{text-align:left}.estimate-pro-center{text-align:center;padding-top:2px}.estimate-pro-right{text-align:right;font-size:9.2pt;line-height:1.45;color:#4b5563!important}
.estimate-pro-kicker{font-size:10pt;font-weight:800;letter-spacing:.16em;color:#6b7280!important}.estimate-pro-number{font-size:24pt;font-weight:900;line-height:1.05;margin:4px 0 5px}.estimate-pro-date{font-size:10pt;color:#4b5563!important}
.estimate-pro-center-mark{font-size:18pt;font-weight:900;letter-spacing:.08em}.estimate-pro-center-sub{font-size:8.5pt;font-weight:800;letter-spacing:.18em;color:#6b7280!important;margin-top:2px}
.estimate-pro-shop{font-size:15pt;font-weight:900;line-height:1.05;margin-bottom:6px;text-transform:uppercase}
.estimate-pro-rule{height:3px;background:#111827;margin:16px 0 18px}
.estimate-pro-customer{display:grid;grid-template-columns:1.05fr .9fr .75fr;gap:18px;align-items:center;margin-bottom:17px}.estimate-pro-label{font-size:8pt;font-weight:900;letter-spacing:.14em;color:#6b7280!important;margin-bottom:4px}.estimate-pro-prepared h2{font-size:16pt;margin:0 0 5px}.estimate-pro-prepared>div:not(.estimate-pro-label){font-size:9.5pt;color:#374151!important;margin:1px 0}.estimate-pro-meta{border-left:1px solid #d1d5db;padding-left:18px}.estimate-pro-meta>div{margin-bottom:8px}.estimate-pro-meta span{display:block;font-size:7.5pt;font-weight:900;letter-spacing:.08em;color:#6b7280!important;text-transform:uppercase}.estimate-pro-meta strong{display:block;font-size:9.5pt;margin-top:1px}
.estimate-vehicle-grid{display:grid;grid-template-columns:.65fr 1.45fr .75fr 1.35fr;gap:0;border:1px solid #cbd5e1;border-radius:6px;overflow:hidden;margin-bottom:20px}.estimate-vehicle-grid>div{min-width:0;padding:9px 11px;border-right:1px solid #cbd5e1;background:#f8fafc!important}.estimate-vehicle-grid>div:nth-child(4){border-right:0}.estimate-vehicle-grid .estimate-vin-cell{grid-column:auto;border-top:0;border-right:0}.estimate-vehicle-grid span{display:block;font-size:7.4pt;font-weight:900;letter-spacing:.09em;color:#6b7280!important}.estimate-vehicle-grid strong{display:block;font-size:9.7pt;margin-top:3px;overflow-wrap:anywhere}
.estimate-pro-section{margin-bottom:18px}.estimate-print-block-title{font-size:12.5pt!important;font-weight:900!important;text-transform:uppercase;letter-spacing:.08em;margin-bottom:5px!important;border-bottom:2px solid #111827;padding-bottom:5px}
.estimate-pro-table{width:100%;table-layout:fixed;border-collapse:collapse;margin:0!important;font-size:9.6pt}.estimate-pro-table thead th{background:#eef2f6!important;color:#374151!important;font-size:7.8pt!important;font-weight:900!important;letter-spacing:.06em;text-transform:uppercase;padding:7px 7px!important;border-bottom:1px solid #9ca3af!important}.estimate-pro-table tbody td{padding:7px 7px!important;border-bottom:1px solid #e5e7eb!important;vertical-align:top!important}.estimate-pro-table .estimate-labor-line,.estimate-pro-table .estimate-part-line{font-weight:600;line-height:1.35}.estimate-pro-table .estimate-part-number{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-weight:800;font-size:9pt}.estimate-pro-table .estimate-num,.estimate-pro-table .estimate-num-head{text-align:right!important;white-space:nowrap}.estimate-pro-table .estimate-amount-strong{font-weight:900}.estimate-empty-line{font-style:italic;color:#6b7280!important}
.estimate-pro-bottom{display:grid;grid-template-columns:1fr 2.8in;gap:24px;align-items:end;margin-top:14px}.estimate-pro-note{font-size:8pt;color:#6b7280!important;line-height:1.45;padding-right:10px}.estimate-print-totals{width:100%!important;margin:0!important;border-top:1px solid #9ca3af!important;font-size:9.5pt}.estimate-print-totals td{padding:5px 7px!important}.estimate-print-totals tr.estimate-print-total td{font-size:12pt!important;font-weight:900!important;border-top:2px solid #111827!important;padding-top:8px!important}
@page estimate{size:letter portrait;margin:.42in}
@media print{
  .estimate-print-sheet{width:100%!important;max-width:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:#fff!important;color:#111827!important}
  .estimate-print-sheet *{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}
  .estimate-pro-header{grid-template-columns:1fr 1fr 1.35fr!important}
  .estimate-pro-customer{grid-template-columns:1.05fr .9fr .75fr!important}
  .estimate-vehicle-grid{grid-template-columns:.65fr 1.45fr .75fr 1.35fr!important}
  .estimate-pro-bottom{grid-template-columns:1fr 2.8in!important}
  .estimate-pro-table{font-size:9.2pt!important}
}
@media(max-width:760px){.estimate-pro-header,.estimate-pro-customer,.estimate-pro-bottom{grid-template-columns:1fr}.estimate-pro-center,.estimate-pro-right{text-align:left}.estimate-pro-meta{border-left:0;border-top:1px solid #d1d5db;padding:12px 0 0}.estimate-vehicle-grid{grid-template-columns:1fr}.estimate-vehicle-grid>div{border-right:0;border-bottom:1px solid #cbd5e1}.estimate-vehicle-grid .estimate-vin-cell{grid-column:auto}.estimate-print-sheet{padding:18px!important}}


/* Build 052 — Estimate print contrast/alignment hardening.
   Keep printed estimate independent from UI theme. */
.estimate-labor-col-description{width:57%}
.estimate-labor-col-hours{width:11%}
.estimate-labor-col-rate{width:15%}
.estimate-part-col-number{width:16%}
.estimate-part-col-description{width:43%}
.estimate-part-col-price{width:14%}
.estimate-part-col-qty{width:10%}
.estimate-shared-col-amount{width:17%}

/* The estimate preview is a paper document even while the application uses a dark theme. */
body[data-theme] .estimate-print-sheet,
body[data-theme] .estimate-print-sheet section,
body[data-theme] .estimate-print-sheet header,
body[data-theme] .estimate-print-sheet table,
body[data-theme] .estimate-print-sheet thead,
body[data-theme] .estimate-print-sheet tbody,
body[data-theme] .estimate-print-sheet tr,
body[data-theme] .estimate-print-sheet td{
  background:#fff!important;
  color:#111!important;
}
body[data-theme] .estimate-print-sheet th{
  background:#f3f4f6!important;
  color:#111!important;
}
body[data-theme] .estimate-print-sheet .estimate-vehicle-grid>div{
  background:#fafafa!important;
  color:#111!important;
}
body[data-theme] .estimate-print-sheet .estimate-pro-kicker,
body[data-theme] .estimate-print-sheet .estimate-pro-date,
body[data-theme] .estimate-print-sheet .estimate-pro-center-sub,
body[data-theme] .estimate-print-sheet .estimate-pro-label,
body[data-theme] .estimate-print-sheet .estimate-pro-prepared,
body[data-theme] .estimate-print-sheet .estimate-pro-prepared h2,
body[data-theme] .estimate-print-sheet .estimate-pro-prepared>div,
body[data-theme] .estimate-print-sheet .estimate-pro-meta span,
body[data-theme] .estimate-print-sheet .estimate-pro-meta strong,
body[data-theme] .estimate-print-sheet .estimate-pro-right,
body[data-theme] .estimate-print-sheet .estimate-pro-right div,
body[data-theme] .estimate-print-sheet .estimate-vehicle-grid span,
body[data-theme] .estimate-print-sheet .estimate-vehicle-grid strong,
body[data-theme] .estimate-print-sheet .estimate-pro-note{
  color:#111!important;
  opacity:1!important;
}
.estimate-pro-prepared h2{
  color:#111!important;
  font-family:"Arial Narrow","Helvetica Neue",Arial,sans-serif!important;
  font-size:16.5pt!important;
  font-weight:800!important;
  letter-spacing:.015em!important;
}
.estimate-pro-prepared>div:not(.estimate-pro-label){
  color:#111!important;
  font-family:"Helvetica Neue",Arial,sans-serif!important;
  font-size:9.4pt!important;
  font-weight:500!important;
}
.estimate-pro-label,.estimate-pro-meta span,.estimate-vehicle-grid span{
  color:#111!important;
  font-weight:800!important;
}
.estimate-pro-table tbody tr,
.estimate-pro-table tbody td{
  background:#fff!important;
  color:#111!important;
}
.estimate-pro-table thead tr,
.estimate-pro-table thead th{
  background:#f3f4f6!important;
  color:#111!important;
}
.estimate-pro-table .estimate-labor-line,
.estimate-pro-table .estimate-part-line{
  color:#111!important;
  font-family:"Helvetica Neue",Arial,sans-serif!important;
  font-weight:600!important;
  letter-spacing:.005em;
}
.estimate-pro-table .estimate-part-number{
  color:#111!important;
}
.estimate-pro-table .estimate-num,
.estimate-pro-table .estimate-num-head,
.estimate-pro-table .estimate-amount-strong{
  color:#111!important;
  text-align:right!important;
  font-variant-numeric:tabular-nums;
}
.estimate-print-totals,
.estimate-print-totals tr,
.estimate-print-totals td{
  background:#fff!important;
  color:#111!important;
}

@media print{
  html,body{background:#fff!important;color:#000!important}
  /* Restore native table layout in print. The <=850px responsive rule sets
     tables to display:block, which breaks colgroup widths in print preview. */
  .estimate-pro-table{
    display:table!important;
    width:100%!important;
    table-layout:fixed!important;
    overflow:visible!important;
  }
  .estimate-pro-table thead{display:table-header-group!important}
  .estimate-pro-table tbody{display:table-row-group!important}
  .estimate-pro-table tr{display:table-row!important}
  .estimate-pro-table th,
  .estimate-pro-table td{display:table-cell!important}
  .estimate-print-totals{
    display:table!important;
    width:100%!important;
    table-layout:fixed!important;
    overflow:visible!important;
  }
  .estimate-print-totals tbody{display:table-row-group!important}
  .estimate-print-totals tr{display:table-row!important}
  .estimate-print-totals td{display:table-cell!important}
  .estimate-print-totals td:first-child{text-align:left!important}
  .estimate-print-totals td:last-child{
    width:38%!important;
    text-align:right!important;
    white-space:nowrap!important;
    font-variant-numeric:tabular-nums;
  }
  .estimate-print-sheet,
  .estimate-print-sheet *,
  body[data-theme] .estimate-print-sheet,
  body[data-theme] .estimate-print-sheet *{
    color:#000!important;
    text-shadow:none!important;
    box-shadow:none!important;
  }
  .estimate-print-sheet section,
  .estimate-print-sheet header,
  .estimate-print-sheet table,
  .estimate-print-sheet thead,
  .estimate-print-sheet tbody,
  .estimate-print-sheet tr,
  .estimate-print-sheet td,
  .estimate-print-totals,
  .estimate-print-totals tr,
  .estimate-print-totals td{
    background:#fff!important;
  }
  .estimate-pro-table thead th,
  .estimate-vehicle-grid>div{
    background:#f7f7f7!important;
  }
  .estimate-pro-table tbody tr,
  .estimate-pro-table tbody td{
    background:#fff!important;
  }
  .estimate-pro-prepared h2,
  .estimate-pro-prepared>div,
  .estimate-pro-label,
  .estimate-pro-meta span,
  .estimate-pro-meta strong,
  .estimate-pro-right,
  .estimate-pro-right div,
  .estimate-vehicle-grid span,
  .estimate-vehicle-grid strong,
  .estimate-pro-note{
    color:#000!important;
    opacity:1!important;
  }
  .estimate-pro-table .estimate-num,
  .estimate-pro-table .estimate-num-head,
  .estimate-pro-table .estimate-amount-strong{
    text-align:right!important;
    font-variant-numeric:tabular-nums;
  }
}


/* Build 053 — theme readability + e-mail cleanup */
body[data-theme="light"] .btn.secondary,body[data-theme="light"] button.secondary,body[data-theme="light"] .mini.secondary,body[data-theme="light"] .estimate-nav-btn{background:#e8edf3!important;color:#172033!important;border:1px solid #aebaca!important}
body[data-theme="light"] .btn.secondary:hover,body[data-theme="light"] button.secondary:hover,body[data-theme="light"] .mini.secondary:hover,body[data-theme="light"] .estimate-nav-btn:hover{background:#dbe4ed!important;color:#0f172a!important}
body[data-theme="light"] .wo-link,body[data-theme="light"] .wo-link:visited,body[data-theme="light"] .wo-link:hover,body[data-theme="light"] .wo-link:active,body[data-theme="light"] .estimate-list-panel a{color:#17324d!important}
body[data-theme="light"] .estimate-list-panel td,body[data-theme="light"] .estimate-list-panel th{color:#172033!important}
body[data-theme] .estimate-nav-btn{border:1px solid var(--cfr-border)!important}
body[data-theme] .email-body-box{white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;line-height:1.62;font-family:Arial,Helvetica,sans-serif;font-size:14px}
body[data-theme="light"] .email-body-box,body[data-theme="light"] .email-list-card,body[data-theme="light"] .email-attachment-item{background:#fff!important;color:#172033!important}
body[data-theme="light"] .email-line-from,body[data-theme="light"] .email-line-subject,body[data-theme="light"] .email-detail-head strong{color:#172033!important}
.email-compose-panel{max-width:900px;margin:0 auto}.email-compose-form{max-width:none}.email-compose-form textarea{min-height:280px;line-height:1.5}

/* Build 054 dashboard modules + consistent list selection */
.dashboard-modules{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:10px}.dashboard-module{display:flex;min-height:92px;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:16px;border:1px solid var(--cfr-border,#334155);border-radius:14px;background:var(--cfr-surface,#111827);color:var(--cfr-text,#fff)!important;text-decoration:none!important;box-shadow:0 8px 22px rgba(0,0,0,.12);transition:transform .12s ease,border-color .12s ease}.dashboard-module:hover{transform:translateY(-2px);border-color:var(--cfr-accent,#5fa77f)}.dashboard-module b{font-size:19px}.dashboard-module span{margin-top:5px;font-size:12px;color:var(--cfr-muted,#94a3b8)}.dashboard-createbar .btn{font-size:13px;padding:8px 10px}.selectable-row{cursor:pointer}.selectable-row.selected td{outline:0;background:rgba(59,130,246,.16)!important}.selectable-row:focus td{box-shadow:inset 0 0 0 1px rgba(96,165,250,.75)}.selection-open.disabled{pointer-events:none;opacity:.45}.toolbar h2{margin-top:0;margin-bottom:0}@media(max-width:900px){.dashboard-modules{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:520px){.dashboard-modules{grid-template-columns:1fr 1fr}.dashboard-module{min-height:78px;padding:10px}.dashboard-module b{font-size:16px}}

/* Build 056 - mobile Bluetooth barcode scanner description entry */
.parts-description-keyboard{margin-top:0!important;background:#1769e0!important;color:#fff!important}
.parts-description-help{margin:0;color:#667085;font-size:.9rem;line-height:1.35}
#newDescription:focus{outline:3px solid rgba(23,105,224,.25);border-color:#1769e0!important;box-shadow:0 0 0 3px rgba(23,105,224,.12)}
@media(max-width:700px){#newDescription{min-height:56px;font-size:17px}.parts-description-keyboard{min-height:54px}.parts-description-help{font-size:.88rem}}

/* Build 058: iPhone-safe touch keyboard for Parts Description */
.parts-touch-keyboard{margin-top:10px;padding:12px;border:1px solid rgba(127,127,127,.35);border-radius:14px;background:var(--panel,#fff)}
.parts-touch-keyboard-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.parts-touch-keyboard-head button,.parts-touch-actions button,.parts-touch-key-row button{min-height:44px;border-radius:10px;border:1px solid rgba(127,127,127,.35);font-weight:700;touch-action:manipulation}
.parts-touch-keys{display:flex;flex-direction:column;gap:6px}
.parts-touch-key-row{display:flex;justify-content:center;gap:4px}
.parts-touch-key-row button{flex:1;min-width:0;padding:8px 2px;font-size:16px}
.parts-touch-actions{display:grid;grid-template-columns:2fr 1fr 1fr;gap:6px;margin-top:8px}
.parts-touch-small{padding:6px 12px}
@media (max-width:600px){.parts-touch-keyboard{position:sticky;bottom:6px;z-index:20;box-shadow:0 8px 24px rgba(0,0,0,.18)}.parts-touch-key-row button{font-size:15px;min-height:46px}}

/* Build 060 — usable Parts Scan workflow: Add Stock first, Assign WO second, supplier dropdown, universal touch input */
.parts-scan-v060 .parts-action-box{margin-top:14px}
.parts-scan-v060 .parts-action-primary{border:2px solid rgba(23,105,224,.38)}
.parts-scan-v060 .parts-action-note{margin:4px 0 10px;color:var(--cfr-muted,#667085);font-size:.92rem}
.parts-scan-v060 .parts-mobile-stepper{display:grid;grid-template-columns:48px minmax(72px,100px) 48px minmax(150px,1fr);gap:8px;align-items:center}
.parts-scan-v060 .qty-step{height:48px;min-width:48px;font-size:24px;font-weight:800;border-radius:10px;touch-action:manipulation}
.parts-scan-v060 .parts-mobile-stepper input{height:48px;text-align:center;font-size:18px;font-weight:700}
.parts-scan-v060 .parts-primary-action{min-height:48px;font-weight:800}
.parts-scan-v060 select{min-height:48px;font-size:16px}
.parts-scan-v060 input[readonly]{opacity:.75;background:rgba(127,127,127,.08)}
.parts-global-keyboard .parts-touch-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
.parts-global-keyboard .parts-touch-actions button{min-height:46px}
@media(max-width:650px){
  .parts-scan-v060 .parts-mobile-stepper{grid-template-columns:48px 1fr 48px}
  .parts-scan-v060 .parts-mobile-stepper .parts-primary-action{grid-column:1/-1;width:100%}
  .parts-scan-v060 .parts-new-form{grid-template-columns:1fr}
  .parts-scan-v060 .parts-new-form .parts-wide{grid-column:1}
  .parts-global-keyboard{position:sticky;bottom:6px;z-index:40}
}


/* Build 061 — iPhone Parts touch keyboard layout + CFR color fix */
.parts-scan-v061 .parts-touch-keyboard{
  position:static!important;
  inset:auto!important;
  width:100%;
  margin:10px 0 14px!important;
  padding:12px;
  border:1px solid var(--cfr-border,#cbd5e1)!important;
  border-radius:14px;
  background:var(--cfr-surface,#ffffff)!important;
  color:var(--cfr-text,#172033)!important;
  box-shadow:0 8px 24px rgba(15,23,42,.12);
}
.parts-scan-v061 .parts-touch-keyboard-head{
  position:static!important;
  background:transparent!important;
  color:inherit!important;
}
.parts-scan-v061 .parts-touch-key-row button,
.parts-scan-v061 .parts-touch-actions button,
.parts-scan-v061 .parts-touch-small{
  background:#e8edf3!important;
  color:#172033!important;
  border:1px solid #aebaca!important;
  box-shadow:none!important;
}
.parts-scan-v061 .parts-touch-key-row button:active,
.parts-scan-v061 .parts-touch-actions button:active,
.parts-scan-v061 .parts-touch-small:active{
  background:#dbe4ed!important;
  transform:translateY(1px);
}
body[data-theme="dark"] .parts-scan-v061 .parts-touch-keyboard{
  background:#111827!important;
  color:#f8fafc!important;
  border-color:#334155!important;
}
body[data-theme="dark"] .parts-scan-v061 .parts-touch-key-row button,
body[data-theme="dark"] .parts-scan-v061 .parts-touch-actions button,
body[data-theme="dark"] .parts-scan-v061 .parts-touch-small{
  background:#1f2937!important;
  color:#f8fafc!important;
  border-color:#475569!important;
}
.parts-scan-v061 [data-touch]{scroll-margin-top:90px;scroll-margin-bottom:24px}
.parts-scan-v061 .parts-touch-keyboard-inline{scroll-margin-top:90px;scroll-margin-bottom:24px}
@media(max-width:650px){
  .parts-scan-v061 .parts-touch-keyboard,
  .parts-scan-v061 .parts-global-keyboard{
    position:static!important;
    bottom:auto!important;
    z-index:auto!important;
    max-height:none!important;
  }
  .parts-scan-v061 .parts-touch-key-row button{min-height:44px;font-size:15px}
  .parts-scan-v061 .parts-touch-actions button{min-height:44px}
}

/* Build 062 — Parts Scan only: simplified post-scan form, native iPhone inputs, all-theme readability */
.parts-scan-v062{--ps-bg:var(--cfr-surface,#fff);--ps-bg2:var(--cfr-surface2,#f7f9fb);--ps-text:var(--cfr-text,#172033);--ps-muted:var(--cfr-muted,#56657a);--ps-border:var(--cfr-border,#cbd5e1);--ps-primary:#1769e0;--ps-primary-text:#fff;--ps-secondary:#e8edf3;--ps-secondary-text:#172033}
.parts-scan-v062 .parts-result-card,.parts-scan-v062 .parts-action-box{background:var(--ps-bg)!important;color:var(--ps-text)!important;border-color:var(--ps-border)!important}
.parts-scan-v062 .parts-action-note,.parts-scan-v062 .parts-result-top p,.parts-scan-v062 .parts-facts span{color:var(--ps-muted)!important}
.parts-scan-v062 input,.parts-scan-v062 select{background:var(--ps-bg2)!important;color:var(--ps-text)!important;border:1px solid var(--ps-border)!important;min-height:50px;border-radius:12px;padding:0 13px;font-size:16px}
.parts-scan-v062 input::placeholder{color:var(--ps-muted)!important;opacity:.85}
.parts-scan-v062 select option{background:var(--ps-bg)!important;color:var(--ps-text)!important}
.parts-scan-v062 .parts-primary-action{background:var(--ps-primary)!important;color:var(--ps-primary-text)!important;border:1px solid transparent!important}
.parts-scan-v062 .parts-secondary-action{background:var(--ps-secondary)!important;color:var(--ps-secondary-text)!important;border:1px solid var(--ps-border)!important}
.parts-scan-v062 .parts-scan-edit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;margin-top:12px}
.parts-scan-v062 .parts-scan-edit-grid label,.parts-scan-v062 .parts-wo-picker label{display:grid;gap:6px;font-weight:800;color:var(--ps-text)!important}
.parts-scan-v062 .parts-action-buttons{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}
.parts-scan-v062 .parts-action-buttons .parts-secondary-action{margin-top:0}
.parts-scan-v062 .parts-wo-picker{margin-top:12px;padding-top:12px;border-top:1px solid var(--ps-border)}
.parts-scan-v062 .parts-wo-picker select,.parts-scan-v062 .parts-wo-picker input{width:100%;margin-bottom:10px}
.parts-scan-v062 .parts-saved-card{border:2px solid rgba(23,105,224,.35)!important}
.parts-scan-v062 input:focus,.parts-scan-v062 select:focus{outline:3px solid rgba(23,105,224,.25)!important;outline-offset:1px}
.parts-scan-v062 #newQty,.parts-scan-v062 #newCost,.parts-scan-v062 #actionQty,.parts-scan-v062 #actionCost,.parts-scan-v062 #savedUseQty{font-variant-numeric:tabular-nums}
body[data-theme="dark"] .parts-scan-v062,body[data-theme="slate"] .parts-scan-v062,body[data-theme="ocean"] .parts-scan-v062,body[data-theme="forest"] .parts-scan-v062{--ps-primary:#3b82f6;--ps-secondary:#263244;--ps-secondary-text:#f3f4f6}
body[data-theme="contrast"] .parts-scan-v062{--ps-primary:#ffd400;--ps-primary-text:#000;--ps-secondary:#222;--ps-secondary-text:#fff}
body[data-theme="contrast"] .parts-scan-v062 input:focus,body[data-theme="contrast"] .parts-scan-v062 select:focus{outline-color:#ffd400!important}
@media(max-width:650px){.parts-scan-v062 .parts-scan-edit-grid,.parts-scan-v062 .parts-action-buttons{grid-template-columns:1fr}.parts-scan-v062 .parts-wide{grid-column:1}.parts-scan-v062 input,.parts-scan-v062 select{font-size:16px}.parts-scan-v062{padding-bottom:max(24px,env(safe-area-inset-bottom))}}

/* Build 064 — portal-wide clickable Work Order references */
.wo-link{cursor:pointer;text-decoration:underline!important;text-decoration-thickness:1px!important;text-underline-offset:3px!important}
.wo-link:hover,.wo-link:focus-visible{text-decoration-thickness:2px!important;outline:none;filter:brightness(1.15)}
body[data-theme="light"] .wo-link,body[data-theme="light"] .wo-link:visited{color:#17324d!important}
body[data-theme="dark"] .wo-link,body[data-theme="dark"] .wo-link:visited{color:#e7f1fb!important}
body[data-theme="slate"] .wo-link,body[data-theme="slate"] .wo-link:visited{color:#e7f1fb!important}
body[data-theme="ocean"] .wo-link,body[data-theme="ocean"] .wo-link:visited{color:#e7f1fb!important}
body[data-theme="forest"] .wo-link,body[data-theme="forest"] .wo-link:visited{color:#eefbf2!important}
body[data-theme="high-contrast"] .wo-link,body[data-theme="high-contrast"] .wo-link:visited{color:#fff!important;text-decoration-thickness:2px!important}
@media print{.wo-link{text-decoration:none!important;color:inherit!important}}

/* Build 065: selected e-mail opens directly beneath its list row. */
.email-inline-detail{margin:-1px 0 10px 0;padding:16px;border:1px solid var(--border);border-top:0;border-radius:0 0 12px 12px;background:var(--panel);color:var(--text)}
.email-list-card-selected{border-radius:10px 10px 0 0}
body[data-theme="light"] .email-inline-detail{background:#fff;color:#172033}

/* Build 067 Standard Jobs */
.standard-job-picker{margin-bottom:14px}.standard-job-add-form{display:grid;grid-template-columns:minmax(280px,1fr) auto;gap:10px;align-items:end}.standard-job-add-form .standard-job-hint{grid-column:1/-1}.standard-job-hours-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}@media(max-width:800px){.standard-job-add-form,.standard-job-hours-grid{grid-template-columns:1fr}.standard-job-add-form .standard-job-hint{grid-column:auto}}

/* Build 068 Standard Jobs Library */
.standard-jobs-toolbar{align-items:center}.standard-jobs-toolbar h2{margin-right:auto}.standard-jobs-filter{display:grid;grid-template-columns:minmax(220px,2fr) minmax(180px,1fr) auto auto;gap:10px;align-items:end}.standard-job-hours-grid-two{grid-template-columns:repeat(2,minmax(0,1fr))}.standard-jobs-table td{vertical-align:middle}@media(max-width:800px){.standard-jobs-filter,.standard-job-hours-grid-two{grid-template-columns:1fr}.standard-jobs-toolbar{flex-wrap:wrap}.standard-jobs-toolbar h2{width:100%;order:-1}}

/* Build 069 Standard Jobs detail/library */
.standard-jobs-clickable .clickable-row{cursor:pointer}
.standard-jobs-clickable .clickable-row:hover{filter:brightness(.98)}
.standard-job-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:16px 0}
.standard-job-make-card{border:1px solid var(--line,#d8dee8);border-radius:12px;padding:16px;background:var(--panel,#fff)}
.standard-job-make-card h3{margin-top:0}
.standard-job-make-card label{display:block;margin:10px 0}
.standard-job-notes{margin-top:14px}
@media(max-width:700px){.standard-job-detail-grid{grid-template-columns:1fr}}

/* Build 074 — final all-theme readability bridge. Keep component layout/design unchanged. */
body[data-theme] .toolbar,
body[data-theme] .section-head,
body[data-theme] .profile-head,
body[data-theme] .top,
body[data-theme] .info-list,
body[data-theme] .problem-box,
body[data-theme] .inline-form,
body[data-theme] .grid,
body[data-theme] .grid2 { color:var(--cfr-text)!important; }

body[data-theme] p,
body[data-theme] div,
body[data-theme] span,
body[data-theme] dt,
body[data-theme] dd { border-color:var(--cfr-border); }

body[data-theme] label,
body[data-theme] legend,
body[data-theme] .section-head h2,
body[data-theme] .section-head h3,
body[data-theme] .form b,
body[data-theme] .form strong { color:var(--cfr-text)!important; }

body[data-theme] input,
body[data-theme] select,
body[data-theme] textarea {
  caret-color:var(--cfr-text)!important;
}
body[data-theme] input:disabled,
body[data-theme] select:disabled,
body[data-theme] textarea:disabled,
body[data-theme] input[readonly],
body[data-theme] textarea[readonly] {
  background:var(--cfr-surface)!important;
  color:var(--cfr-muted)!important;
  opacity:1!important;
}
body[data-theme] input:focus,
body[data-theme] select:focus,
body[data-theme] textarea:focus {
  outline:2px solid var(--cfr-accent)!important;
  outline-offset:1px;
}

/* Primary, secondary and small controls: explicit foreground for every theme. */
body[data-theme] .btn:not(.secondary):not(.danger):not(.danger-mini):not(.sync-yellow):not(.pm-service):not(.shop-hold-btn):not(.shop-work-btn):not(.green-mini),
body[data-theme] button:not(.secondary):not(.danger):not(.danger-mini):not(.sync-yellow):not(.pm-service):not(.shop-hold-btn):not(.shop-work-btn):not(.green-mini),
body[data-theme] .mini:not(.secondary):not(.danger-mini):not(.shop-hold-btn):not(.shop-work-btn):not(.green-mini) {
  background:var(--cfr-accent)!important;
  color:#fff!important;
  border:1px solid color-mix(in srgb, var(--cfr-accent) 72%, #000)!important;
}
body[data-theme="light"] .btn:not(.secondary):not(.danger):not(.danger-mini):not(.sync-yellow):not(.pm-service):not(.shop-hold-btn):not(.shop-work-btn):not(.green-mini),
body[data-theme="light"] button:not(.secondary):not(.danger):not(.danger-mini):not(.sync-yellow):not(.pm-service):not(.shop-hold-btn):not(.shop-work-btn):not(.green-mini),
body[data-theme="light"] .mini:not(.secondary):not(.danger-mini):not(.shop-hold-btn):not(.shop-work-btn):not(.green-mini) {
  background:#236b48!important;
  color:#fff!important;
  border-color:#185638!important;
}
body[data-theme="contrast"] .btn:not(.secondary):not(.danger):not(.danger-mini):not(.sync-yellow):not(.pm-service):not(.shop-hold-btn):not(.shop-work-btn):not(.green-mini),
body[data-theme="contrast"] button:not(.secondary):not(.danger):not(.danger-mini):not(.sync-yellow):not(.pm-service):not(.shop-hold-btn):not(.shop-work-btn):not(.green-mini),
body[data-theme="contrast"] .mini:not(.secondary):not(.danger-mini):not(.shop-hold-btn):not(.shop-work-btn):not(.green-mini) {
  background:#ffd400!important;
  color:#000!important;
  border-color:#ffd400!important;
}
body[data-theme] .btn.secondary,
body[data-theme] button.secondary,
body[data-theme] .mini.secondary {
  background:var(--cfr-surface2)!important;
  color:var(--cfr-text)!important;
  border:1px solid var(--cfr-border)!important;
}
body[data-theme="light"] .btn.secondary,
body[data-theme="light"] button.secondary,
body[data-theme="light"] .mini.secondary {
  background:#e7edf4!important;
  color:#172033!important;
  border-color:#aebdcd!important;
}
body[data-theme] .danger-mini,
body[data-theme] .btn.danger,
body[data-theme] button.danger {
  background:#991b1b!important;
  color:#fff!important;
  border:1px solid #7f1d1d!important;
}
body[data-theme] button:disabled,
body[data-theme] .btn.disabled,
body[data-theme] .selection-open.disabled {
  opacity:.58!important;
  cursor:not-allowed!important;
}

/* PM remains intentionally blue and readable in every theme. */
body[data-theme] .btn.pm-service,
body[data-theme] button.pm-service {
  background:#7dd3fc!important;
  color:#082f49!important;
  border:1px solid #0284c7!important;
}

/* Lists, tables and interactive rows. */
body[data-theme] table,
body[data-theme] thead,
body[data-theme] tbody,
body[data-theme] tr,
body[data-theme] td { color:var(--cfr-text)!important; }
body[data-theme] th { color:var(--cfr-text)!important; }
body[data-theme] tbody tr:hover td { background:var(--cfr-accent-soft)!important; }
body[data-theme] .selectable-row.selected td {
  background:var(--cfr-accent-soft)!important;
  color:var(--cfr-text)!important;
}
body[data-theme] .done-row td {
  color:var(--cfr-text)!important;
  background:color-mix(in srgb, var(--cfr-accent-soft) 65%, transparent)!important;
}

/* Badges, tabs, helper boxes and legacy dark-only boxes. */
body[data-theme] .badge,
body[data-theme] .pill,
body[data-theme] .wo-chip,
body[data-theme] .status-monitor-card,
body[data-theme] .status-monitor-timebox,
body[data-theme] .status-monitor-state,
body[data-theme] .parts-touch-keyboard,
body[data-theme] .settings-help,
body[data-theme] .email-test-card,
body[data-theme] .email-body-box,
body[data-theme] .email-attachment-item,
body[data-theme] .email-list-card,
body[data-theme] .wo-match-box,
body[data-theme] .wo-match-row {
  background:var(--cfr-surface2)!important;
  color:var(--cfr-text)!important;
  border-color:var(--cfr-border)!important;
}
body[data-theme="light"] .status-monitor-truck,
body[data-theme="light"] .status-monitor-company,
body[data-theme="light"] .status-monitor-timebox strong,
body[data-theme="light"] .status-monitor-foot b,
body[data-theme="light"] .status-clock-card h3,
body[data-theme="light"] .shop-board-title {
  color:#172033!important;
}
body[data-theme="light"] .status-monitor-wo,
body[data-theme="light"] .status-board-kicker,
body[data-theme="light"] .shop-board-sub {
  color:#24547a!important;
}
body[data-theme="light"] .status-monitor-mechanic { color:#785b00!important; }

/* Keep links visibly distinct, especially on white/light surfaces. */
body[data-theme] .panel a:not(.btn),
body[data-theme] table a,
body[data-theme] .wo-link {
  color:var(--cfr-text)!important;
  text-decoration-thickness:1px;
  text-underline-offset:2px;
}
body[data-theme="light"] .panel a:not(.btn),
body[data-theme="light"] table a,
body[data-theme="light"] .wo-link {
  color:#173f68!important;
}
body[data-theme] .panel a:not(.btn):hover,
body[data-theme] table a:hover,
body[data-theme] .wo-link:hover { text-decoration:underline!important; }

/* Alerts retain semantic color but guarantee readable text. */
body[data-theme="light"] .alert.success { color:#123c27!important; }
body[data-theme="light"] .alert.warning { color:#5a4300!important; }
body[data-theme="light"] .alert.danger { color:#6c1717!important; }


/* Build 075 — Status Board semantic action colors.
   These states must remain visually consistent in every UI theme. */
body[data-theme] .shop-card-actions .shop-hold-btn {
  background:#60a5fa!important;
  color:#08111f!important;
  border-color:#2563eb!important;
}
body[data-theme] .shop-card-actions .shop-work-btn {
  background:#facc15!important;
  color:#201300!important;
  border-color:#ca8a04!important;
}
body[data-theme] .shop-card-actions .green-mini {
  background:#22c55e!important;
  color:#052e16!important;
  border-color:#15803d!important;
}
body[data-theme] .shop-card-actions .shop-hold-btn:hover { background:#93c5fd!important; }
body[data-theme] .shop-card-actions .shop-work-btn:hover { background:#fde047!important; }
body[data-theme] .shop-card-actions .green-mini:hover { background:#4ade80!important; }

/* Build 076 — Black Hole temporary Office register. */
.black-hole-shell{display:grid;gap:16px}.black-hole-panel{border-color:#111827!important}.black-hole-head,.black-hole-list-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.black-hole-head h2,.black-hole-list-head h2{margin-bottom:5px}.black-hole-badge{display:inline-flex;align-items:center;background:#020617;color:#f8fafc;border:1px solid #475569;border-radius:999px;padding:6px 10px;font-size:11px;font-weight:900;letter-spacing:.08em;white-space:nowrap}.black-hole-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 14px;margin-top:16px}.black-hole-form label{font-weight:800}.black-hole-form input{margin-bottom:0}.black-hole-desc{grid-column:span 1}.black-hole-actions{grid-column:1 / -1;display:flex;justify-content:flex-end;padding-top:4px}.black-hole-table-wrap{overflow-x:auto}.black-hole-list-panel table{min-width:980px}.black-hole-list-panel .num{text-align:right}.black-hole-list-panel td strong{color:inherit!important}body[data-theme="light"] .black-hole-badge{background:#111827!important;color:#fff!important;border-color:#111827!important}@media(max-width:900px){.black-hole-form{grid-template-columns:1fr 1fr}.black-hole-actions{grid-column:1 / -1}}@media(max-width:620px){.black-hole-form{grid-template-columns:1fr}.black-hole-actions{grid-column:auto}.black-hole-head{display:block}.black-hole-badge{margin-top:8px}}

/* Build 077 — final semantic Status Board colors.
   Global theme button rules explicitly exclude these three classes above. */
body[data-theme] button.shop-hold-btn,
body[data-theme] .mini.shop-hold-btn {
  background:#60a5fa!important;color:#08111f!important;border:1px solid #2563eb!important;
}
body[data-theme] button.shop-work-btn,
body[data-theme] .mini.shop-work-btn {
  background:#facc15!important;color:#201300!important;border:1px solid #ca8a04!important;
}
body[data-theme] button.green-mini,
body[data-theme] .mini.green-mini {
  background:#22c55e!important;color:#052e16!important;border:1px solid #15803d!important;
}
body[data-theme] button.shop-hold-btn:hover,
body[data-theme] .mini.shop-hold-btn:hover {background:#93c5fd!important}
body[data-theme] button.shop-work-btn:hover,
body[data-theme] .mini.shop-work-btn:hover {background:#fde047!important}
body[data-theme] button.green-mini:hover,
body[data-theme] .mini.green-mini:hover {background:#4ade80!important}

/* Build 077 — Black Hole computed delta summary. */
.black-hole-total{margin-top:8px;font-size:16px;font-weight:800;color:var(--cfr-text)}
.black-hole-total strong{font-size:22px;color:var(--cfr-yellow)!important}
.black-hole-delta{font-weight:900}
body[data-theme="light"] .black-hole-total strong{color:#785b00!important}


/* ========================================================================
   Build 079 — Forest Light theme + complete light-surface readability audit
   Forest Light is a bright companion to Forest. It intentionally uses
   explicit high-contrast foregrounds on white/pale surfaces and preserves
   semantic Status Board colors in every theme.
   ======================================================================== */
body[data-theme="forest-light"]{
  --cfr-bg:#edf4ef;
  --cfr-surface:#ffffff;
  --cfr-surface2:#f5f9f6;
  --cfr-border:#b7cbbd;
  --cfr-text:#14251a;
  --cfr-muted:#566b5d;
  --cfr-accent:#287a4b;
  --cfr-accent-soft:#dceee2;
  --cfr-yellow:#8a6500;
  color-scheme:light;
}
html[data-theme-preview="forest-light"] body:not([data-theme]){background:#edf4ef;color:#14251a}

/* Navigation and general surfaces. */
body[data-theme="forest-light"] .cfr-sidebar{background:#fff!important;color:#14251a!important}
body[data-theme="forest-light"] .brand{color:#14251a!important}
body[data-theme="forest-light"] .nav-group{background:#f5f9f6!important;border-color:#b7cbbd!important}
body[data-theme="forest-light"] .nav-group summary,
body[data-theme="forest-light"] .compact-nav .nav-group a{color:#203c29!important}
body[data-theme="forest-light"] .nav-group[open] summary{background:#e8f2eb!important;border-color:#b7cbbd!important}
body[data-theme="forest-light"] .compact-nav .nav-group a.active{background:#dceee2!important;color:#185c36!important;border-color:#77a989!important}

/* Controls: explicit foregrounds prevent white-on-pale regressions. */
body[data-theme="forest-light"] .btn:not(.secondary):not(.danger):not(.danger-mini):not(.sync-yellow):not(.pm-service):not(.shop-hold-btn):not(.shop-work-btn):not(.green-mini),
body[data-theme="forest-light"] button:not(.secondary):not(.danger):not(.danger-mini):not(.sync-yellow):not(.pm-service):not(.shop-hold-btn):not(.shop-work-btn):not(.green-mini),
body[data-theme="forest-light"] .mini:not(.secondary):not(.danger-mini):not(.shop-hold-btn):not(.shop-work-btn):not(.green-mini){background:#236b48!important;color:#fff!important;border-color:#185638!important}
body[data-theme="forest-light"] .btn.secondary,
body[data-theme="forest-light"] button.secondary,
body[data-theme="forest-light"] .mini.secondary{background:#e8f0ea!important;color:#14251a!important;border-color:#a9bdaf!important}
body[data-theme="forest-light"] .btn.secondary:hover,
body[data-theme="forest-light"] button.secondary:hover,
body[data-theme="forest-light"] .mini.secondary:hover{background:#dce8df!important;color:#102016!important}
body[data-theme="forest-light"] input,
body[data-theme="forest-light"] select,
body[data-theme="forest-light"] textarea{background:#f8fbf9!important;color:#14251a!important;border-color:#aebfb3!important}
body[data-theme="forest-light"] input::placeholder,
body[data-theme="forest-light"] textarea::placeholder{color:#65786a!important;opacity:1}
body[data-theme="forest-light"] option{background:#fff!important;color:#14251a!important}
body[data-theme="forest-light"] input:disabled,
body[data-theme="forest-light"] select:disabled,
body[data-theme="forest-light"] textarea:disabled,
body[data-theme="forest-light"] input[readonly],
body[data-theme="forest-light"] textarea[readonly]{background:#edf3ef!important;color:#526458!important}

/* Tables, links, list rows and dashboard cards. */
body[data-theme="forest-light"] th{background:#edf4ef!important;color:#203c29!important}
body[data-theme="forest-light"] tbody tr:hover{background:#e3f0e7!important}
body[data-theme="forest-light"] .panel a:not(.btn),
body[data-theme="forest-light"] table a,
body[data-theme="forest-light"] .wo-link{color:#145f3d!important}
body[data-theme="forest-light"] .dashboard-module{background:#fff!important;color:#14251a!important;border-color:#b7cbbd!important}
body[data-theme="forest-light"] .dashboard-module span{color:#566b5d!important}
body[data-theme="forest-light"] .selectable-row.selected td{background:#dceee2!important;color:#14251a!important}

/* Alerts and badges remain semantic with readable text. */
body[data-theme="forest-light"] .alert.success{color:#123c27!important;background:#dff4e8!important}
body[data-theme="forest-light"] .alert.warning{color:#5a4300!important;background:#fff4c8!important}
body[data-theme="forest-light"] .alert.danger{color:#6c1717!important;background:#ffe3e3!important}
body[data-theme="forest-light"] .black-hole-badge{background:#183023!important;color:#fff!important;border-color:#183023!important}
body[data-theme="forest-light"] .black-hole-total strong{color:#785b00!important}

/* E-mail, scanner, settings and other legacy dark-coded surfaces. */
body[data-theme="forest-light"] .email-body-box,
body[data-theme="forest-light"] .email-list-card,
body[data-theme="forest-light"] .email-attachment-item,
body[data-theme="forest-light"] .email-test-card,
body[data-theme="forest-light"] .settings-help,
body[data-theme="forest-light"] .wo-match-box,
body[data-theme="forest-light"] .wo-match-row,
body[data-theme="forest-light"] .status-monitor-card,
body[data-theme="forest-light"] .status-monitor-timebox,
body[data-theme="forest-light"] .status-monitor-state{background:#f5f9f6!important;color:#14251a!important;border-color:#b7cbbd!important}
body[data-theme="forest-light"] .email-line-from,
body[data-theme="forest-light"] .email-line-subject,
body[data-theme="forest-light"] .email-detail-head strong{color:#14251a!important}

/* Existing Light theme Status Board readability fix (Build 079 audit). */
body[data-theme="light"] .shop-monitor-card,
body[data-theme="light"] .shop-row-card{color:#172033!important}
body[data-theme="light"] .shop-row-wo,
body[data-theme="light"] .shop-row-wo a,
body[data-theme="light"] .shop-row-wo .wo-link{color:#17324d!important}
body[data-theme="light"] .shop-row-company{color:#445268!important}
body[data-theme="light"] .shop-problem-inline{color:#172033!important}
body[data-theme="light"] .shop-problem-inline b{color:#245b85!important}
body[data-theme="light"] .shop-row-status{color:#172033!important}
body[data-theme="light"] .shop-row-times{color:#445268!important}
body[data-theme="light"] .shop-row-mechanic{color:#785b00!important}
body[data-theme="light"] .shop-truck-high{color:#b91c1c!important}
body[data-theme="light"] .shop-truck-done{color:#172033!important}
body[data-theme="light"] .shop-truck-hold{color:#1d4ed8!important}
body[data-theme="light"] .shop-truck-work{color:#15803d!important}
body[data-theme="light"] .shop-truck-line{color:#8a6500!important}

/* Forest Light Status Board: explicit text and semantic states. */
body[data-theme="forest-light"] .shop-monitor-card,
body[data-theme="forest-light"] .shop-row-card{background:#fff!important;color:#14251a!important;border-color:#b7cbbd!important}
body[data-theme="forest-light"] .shop-row-wo,
body[data-theme="forest-light"] .shop-row-wo a,
body[data-theme="forest-light"] .shop-row-wo .wo-link{color:#145f3d!important}
body[data-theme="forest-light"] .shop-row-company{color:#405648!important}
body[data-theme="forest-light"] .shop-problem-inline{color:#14251a!important}
body[data-theme="forest-light"] .shop-problem-inline b{color:#246044!important}
body[data-theme="forest-light"] .shop-row-status{color:#14251a!important}
body[data-theme="forest-light"] .shop-row-times{color:#405648!important}
body[data-theme="forest-light"] .shop-row-mechanic{color:#785b00!important}
body[data-theme="forest-light"] .shop-board-title{color:#14251a!important}
body[data-theme="forest-light"] .shop-board-sub,
body[data-theme="forest-light"] .status-board-kicker{color:#246044!important}
body[data-theme="forest-light"] .shop-truck-high{color:#b91c1c!important}
body[data-theme="forest-light"] .shop-truck-done{color:#14251a!important}
body[data-theme="forest-light"] .shop-truck-hold{color:#1d4ed8!important}
body[data-theme="forest-light"] .shop-truck-work{color:#15803d!important}
body[data-theme="forest-light"] .shop-truck-line{color:#7a5a00!important}

/* Semantic action buttons are fixed across all themes, including Forest Light. */
body[data-theme="forest-light"] button.shop-hold-btn,
body[data-theme="forest-light"] .mini.shop-hold-btn{background:#60a5fa!important;color:#08111f!important;border-color:#2563eb!important}
body[data-theme="forest-light"] button.shop-work-btn,
body[data-theme="forest-light"] .mini.shop-work-btn{background:#facc15!important;color:#201300!important;border-color:#ca8a04!important}
body[data-theme="forest-light"] button.green-mini,
body[data-theme="forest-light"] .mini.green-mini{background:#22c55e!important;color:#052e16!important;border-color:#15803d!important}

/* Old/card Status Board variant, still used by some display paths. */
body[data-theme="forest-light"] .status-monitor-truck,
body[data-theme="forest-light"] .status-monitor-company,
body[data-theme="forest-light"] .status-monitor-timebox strong,
body[data-theme="forest-light"] .status-monitor-foot b,
body[data-theme="forest-light"] .status-clock-card h3{color:#14251a!important}
body[data-theme="forest-light"] .status-monitor-wo,
body[data-theme="forest-light"] .status-board-kicker{color:#246044!important}
body[data-theme="forest-light"] .status-monitor-mechanic{color:#785b00!important}


/* ========================================================================
   Build 080 — Silver Light theme
   Neutral gray/white office theme. The interface is intentionally grayscale
   except for the three Status Board action buttons: Hold blue, In Work yellow,
   Done green. Font family and layout remain unchanged.
   ======================================================================== */
body[data-theme="silver-light"]{
  --cfr-bg:#eef0f2;
  --cfr-surface:#ffffff;
  --cfr-surface2:#f5f6f7;
  --cfr-border:#c4c8cc;
  --cfr-text:#202428;
  --cfr-muted:#5f666d;
  --cfr-accent:#6b737b;
  --cfr-accent-soft:#e1e4e7;
  --cfr-yellow:#50565c;
  color-scheme:light;
}
html[data-theme-preview="silver-light"] body:not([data-theme]){background:#eef0f2;color:#202428}

/* Main navigation and surfaces — gray / white only. */
body[data-theme="silver-light"] .cfr-sidebar{background:#fff!important;color:#202428!important;border-color:#c4c8cc!important}
body[data-theme="silver-light"] .brand{color:#202428!important}
body[data-theme="silver-light"] .nav-group{background:#f5f6f7!important;border-color:#c4c8cc!important}
body[data-theme="silver-light"] .nav-group summary,
body[data-theme="silver-light"] .compact-nav .nav-group a{color:#343a40!important}
body[data-theme="silver-light"] .nav-group[open] summary{background:#eceeef!important;border-color:#c4c8cc!important}
body[data-theme="silver-light"] .compact-nav .nav-group a.active{background:#dfe2e5!important;color:#202428!important;border-color:#aeb4ba!important}
body[data-theme="silver-light"] .panel,
body[data-theme="silver-light"] .card,
body[data-theme="silver-light"] .settings-card,
body[data-theme="silver-light"] .user-card,
body[data-theme="silver-light"] .maint-card,
body[data-theme="silver-light"] .dashboard-module{background:#fff!important;color:#202428!important;border-color:#c4c8cc!important}
body[data-theme="silver-light"] .dashboard-module span{color:#5f666d!important}

/* General buttons: grayscale. Only the three status buttons stay colored. */
body[data-theme="silver-light"] .btn:not(.shop-hold-btn):not(.shop-work-btn):not(.green-mini),
body[data-theme="silver-light"] button:not(.shop-hold-btn):not(.shop-work-btn):not(.green-mini),
body[data-theme="silver-light"] .mini:not(.shop-hold-btn):not(.shop-work-btn):not(.green-mini){background:#626970!important;color:#fff!important;border-color:#50565c!important}
body[data-theme="silver-light"] .btn:not(.shop-hold-btn):not(.shop-work-btn):not(.green-mini):hover,
body[data-theme="silver-light"] button:not(.shop-hold-btn):not(.shop-work-btn):not(.green-mini):hover,
body[data-theme="silver-light"] .mini:not(.shop-hold-btn):not(.shop-work-btn):not(.green-mini):hover{background:#50565c!important;color:#fff!important}
body[data-theme="silver-light"] .btn.secondary,
body[data-theme="silver-light"] button.secondary,
body[data-theme="silver-light"] .mini.secondary{background:#e7e9eb!important;color:#202428!important;border-color:#b8bdc2!important}
body[data-theme="silver-light"] .btn.secondary:hover,
body[data-theme="silver-light"] button.secondary:hover,
body[data-theme="silver-light"] .mini.secondary:hover{background:#d9dde0!important;color:#202428!important}
body[data-theme="silver-light"] .estimate-nav-btn{background:#e7e9eb!important;color:#202428!important;border:1px solid #b8bdc2!important}
body[data-theme="silver-light"] .estimate-nav-btn:hover{background:#d9dde0!important;color:#202428!important}
body[data-theme="silver-light"] .btn.danger,
body[data-theme="silver-light"] button.danger,
body[data-theme="silver-light"] .danger-mini,
body[data-theme="silver-light"] .sync-yellow,
body[data-theme="silver-light"] .btn.pm-service,
body[data-theme="silver-light"] button.pm-service{background:#626970!important;color:#fff!important;border-color:#50565c!important}
body[data-theme="silver-light"] button:disabled,
body[data-theme="silver-light"] .btn.disabled,
body[data-theme="silver-light"] .selection-open.disabled{background:#d7dade!important;color:#777d83!important;border-color:#c4c8cc!important;opacity:1}

/* Form controls and focus treatment. */
body[data-theme="silver-light"] input,
body[data-theme="silver-light"] select,
body[data-theme="silver-light"] textarea{background:#fafafa!important;color:#202428!important;border-color:#b9bec3!important}
body[data-theme="silver-light"] input::placeholder,
body[data-theme="silver-light"] textarea::placeholder{color:#6d7379!important;opacity:1}
body[data-theme="silver-light"] option{background:#fff!important;color:#202428!important}
body[data-theme="silver-light"] input:disabled,
body[data-theme="silver-light"] select:disabled,
body[data-theme="silver-light"] textarea:disabled,
body[data-theme="silver-light"] input[readonly],
body[data-theme="silver-light"] textarea[readonly]{background:#eceeef!important;color:#5f666d!important}
body[data-theme="silver-light"] input:focus,
body[data-theme="silver-light"] select:focus,
body[data-theme="silver-light"] textarea:focus{border-color:#747b82!important;box-shadow:0 0 0 3px rgba(107,115,123,.18)!important}

/* Tables, lists, links and selection states stay monochrome. */
body[data-theme="silver-light"] table{background:#fff!important}
body[data-theme="silver-light"] th{background:#eceeef!important;color:#2d3237!important;border-color:#c4c8cc!important}
body[data-theme="silver-light"] td{color:#202428!important;border-color:#d1d4d7!important}
body[data-theme="silver-light"] tbody tr:hover td{background:#f0f1f2!important;color:#202428!important}
body[data-theme="silver-light"] .panel a:not(.btn),
body[data-theme="silver-light"] table a,
body[data-theme="silver-light"] .wo-link,
body[data-theme="silver-light"] .list a,
body[data-theme="silver-light"] .recent-list a,
body[data-theme="silver-light"] .estimate-list-panel a{color:#3f474e!important}
body[data-theme="silver-light"] .estimate-list-panel td,
body[data-theme="silver-light"] .estimate-list-panel th{color:#202428!important}
body[data-theme="silver-light"] .panel a:not(.btn):hover,
body[data-theme="silver-light"] table a:hover,
body[data-theme="silver-light"] .wo-link:hover{color:#111418!important;text-decoration:underline}
body[data-theme="silver-light"] .selectable-row.selected td{background:#dfe2e5!important;color:#202428!important}
body[data-theme="silver-light"] .badge,
body[data-theme="silver-light"] .pill{background:#e4e6e8!important;color:#343a40!important;border-color:#b8bdc2!important}

/* Alerts and special labels: grayscale to preserve the Silver Light character. */
body[data-theme="silver-light"] .alert.success,
body[data-theme="silver-light"] .alert.warning,
body[data-theme="silver-light"] .alert.danger{background:#eceeef!important;color:#30363b!important;border-color:#b8bdc2!important}
body[data-theme="silver-light"] .black-hole-badge{background:#4e555b!important;color:#fff!important;border-color:#4e555b!important}
body[data-theme="silver-light"] .black-hole-total strong,
body[data-theme="silver-light"] .black-hole-delta{color:#343a40!important}

/* Legacy dark-coded panels audited for light-surface readability. */
body[data-theme="silver-light"] .email-body-box,
body[data-theme="silver-light"] .email-inline-detail,
body[data-theme="silver-light"] .email-list-card,
body[data-theme="silver-light"] .email-attachment-item,
body[data-theme="silver-light"] .email-test-card,
body[data-theme="silver-light"] .settings-help,
body[data-theme="silver-light"] .wo-match-box,
body[data-theme="silver-light"] .wo-match-row,
body[data-theme="silver-light"] .status-monitor-card,
body[data-theme="silver-light"] .status-monitor-timebox,
body[data-theme="silver-light"] .status-monitor-state{background:#f5f6f7!important;color:#202428!important;border-color:#c4c8cc!important}
body[data-theme="silver-light"] .email-line-from,
body[data-theme="silver-light"] .email-line-subject,
body[data-theme="silver-light"] .email-detail-head strong{color:#202428!important}

/* Status Board text is grayscale; only the action buttons retain color. */
body[data-theme="silver-light"] .shop-monitor-card,
body[data-theme="silver-light"] .shop-row-card{background:#fff!important;color:#202428!important;border-color:#c4c8cc!important}
body[data-theme="silver-light"] .shop-row-wo,
body[data-theme="silver-light"] .shop-row-wo a,
body[data-theme="silver-light"] .shop-row-wo .wo-link{color:#3f474e!important}
body[data-theme="silver-light"] .shop-row-company,
body[data-theme="silver-light"] .shop-row-times{color:#5f666d!important}
body[data-theme="silver-light"] .shop-problem-inline,
body[data-theme="silver-light"] .shop-problem-inline b,
body[data-theme="silver-light"] .shop-row-status,
body[data-theme="silver-light"] .shop-board-title{color:#202428!important}
body[data-theme="silver-light"] .shop-row-mechanic,
body[data-theme="silver-light"] .shop-board-sub,
body[data-theme="silver-light"] .status-board-kicker{color:#50565c!important}
body[data-theme="silver-light"] .shop-truck-high,
body[data-theme="silver-light"] .shop-truck-done,
body[data-theme="silver-light"] .shop-truck-hold,
body[data-theme="silver-light"] .shop-truck-work,
body[data-theme="silver-light"] .shop-truck-line{color:#343a40!important}
body[data-theme="silver-light"] .status-monitor-truck,
body[data-theme="silver-light"] .status-monitor-company,
body[data-theme="silver-light"] .status-monitor-timebox strong,
body[data-theme="silver-light"] .status-monitor-foot b,
body[data-theme="silver-light"] .status-clock-card h3,
body[data-theme="silver-light"] .status-monitor-wo,
body[data-theme="silver-light"] .status-monitor-mechanic{color:#202428!important}

/* The only intentionally colored controls in Silver Light. */
body[data-theme="silver-light"] button.shop-hold-btn,
body[data-theme="silver-light"] .mini.shop-hold-btn{background:#60a5fa!important;color:#08111f!important;border-color:#2563eb!important}
body[data-theme="silver-light"] button.shop-work-btn,
body[data-theme="silver-light"] .mini.shop-work-btn{background:#facc15!important;color:#201300!important;border-color:#ca8a04!important}
body[data-theme="silver-light"] button.green-mini,
body[data-theme="silver-light"] .mini.green-mini{background:#22c55e!important;color:#052e16!important;border-color:#15803d!important}

/* Build 082 — responsive inbox and safe formatted-message reader */
.email-page-toolbar{align-items:center;justify-content:space-between;gap:18px}.email-page-toolbar h2{margin:0}.email-page-subtitle{margin:4px 0 0}.email-workspace{display:grid;grid-template-columns:minmax(330px,420px) minmax(0,1fr);gap:18px;align-items:start}.email-inbox-panel,.email-reader-panel{min-width:0}.email-inbox-panel{padding:14px}.email-panel-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.email-panel-title h2{margin:0}.email-panel-title>div>span{display:block;color:var(--cfr-muted,var(--muted));font-size:12px;margin-top:3px}.email-server-status{display:inline-flex;align-items:center;white-space:nowrap;border:1px solid #6ca47c;border-radius:999px;background:#e9f7ed;color:#1e6332;font-size:11px;font-weight:900;padding:5px 9px}.email-list-stack{gap:7px}.email-list-card{display:grid;grid-template-columns:9px minmax(0,1fr) auto;gap:10px;align-items:center;min-height:68px;padding:10px 11px;border-radius:11px}.email-list-card-selected{border-radius:11px!important;border-color:var(--cfr-accent,#3b82f6)!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--cfr-accent,#3b82f6) 28%,transparent)}.email-unread-dot{width:8px;height:8px;border-radius:50%;background:transparent}.email-list-card-unread .email-unread-dot{background:#2878d0;box-shadow:0 0 0 3px rgba(40,120,208,.14)}.email-list-main{display:grid;gap:6px;min-width:0}.email-line-from,.email-line-subject{display:block;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.email-line-from{font-size:14px}.email-line-subject{font-size:13px}.email-list-card-unread .email-line-from,.email-list-card-unread .email-line-subject{font-weight:900}.email-list-side{display:grid;align-self:stretch;align-content:space-between;justify-items:end;gap:6px}.email-line-date{font-size:11px}.email-line-unread{border-radius:999px;background:rgba(40,120,208,.12);color:#2878d0;padding:2px 7px;font-size:10px}.email-empty-list,.email-reader-empty{display:grid;gap:8px;place-items:center;text-align:center;color:var(--cfr-muted,var(--muted))}.email-empty-list{padding:34px 14px}.email-settings-tip{margin:14px 4px 0}.email-reader-panel{padding:0;overflow:hidden}.email-reader-header{padding:20px 22px;border-bottom:1px solid var(--cfr-border,var(--border))}.email-reader-subject-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}.email-reader-subject-row h2{font-size:clamp(20px,2.1vw,28px);line-height:1.2;margin:4px 0 0;overflow-wrap:anywhere}.email-reader-label{color:var(--cfr-muted,var(--muted));font-size:11px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}.email-format-badge{white-space:nowrap;border-radius:999px;background:rgba(59,130,246,.12);color:#2f7aca;font-size:11px;font-weight:900;padding:6px 9px}.email-detail-head{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 20px}.email-detail-head>div{min-width:0}.email-detail-head span{margin-bottom:4px}.email-detail-head strong{font-size:14px;overflow-wrap:anywhere}.email-reader-section{padding:18px 22px;border-bottom:1px solid var(--cfr-border,var(--border))}.email-section-heading{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-bottom:12px}.email-section-heading h3{margin:0}.email-section-heading span{color:var(--cfr-muted,var(--muted));font-size:12px;text-align:right}.email-html-frame{display:block;width:100%;height:clamp(440px,62vh,760px);border:1px solid #cfd6df;border-radius:12px;background:#fff}.email-body-box{min-height:180px;max-height:650px;overflow:auto;padding:18px;font-size:15px;line-height:1.65}.email-plain-copy{margin-top:12px}.email-plain-copy summary,.email-forward-box summary{cursor:pointer;font-weight:900;color:var(--cfr-text,var(--text))}.email-plain-copy .email-body-box{margin-top:10px}.email-attachment-list{gap:9px}.email-attachment-item{align-items:center;padding:11px 13px}.email-attachment-info{display:flex;align-items:center;gap:11px;min-width:0}.email-attachment-info>div{min-width:0}.email-attachment-info b{display:block;overflow-wrap:anywhere}.email-attachment-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 43px;height:36px;border-radius:8px;background:rgba(59,130,246,.12);color:#2f7aca;font-size:10px;font-weight:900;letter-spacing:.05em}.email-no-attachments{margin:0}.email-forward-box{margin:18px 22px 22px;border:1px solid var(--cfr-border,var(--border));border-radius:12px;padding:13px 15px}.email-forward-form{display:grid;grid-template-columns:minmax(220px,1fr) auto;gap:12px;align-items:end;margin-top:13px}.email-forward-form label{display:grid;gap:6px;font-weight:800}.email-forward-form input{width:100%}.email-reader-empty{min-height:460px;padding:30px}.email-reader-empty h2{margin:0;color:var(--cfr-text,var(--text))}.email-reader-empty p{margin:0}.email-reader-empty-icon{display:flex;align-items:center;justify-content:center;width:74px;height:74px;border-radius:50%;background:rgba(59,130,246,.12);color:#2f7aca;font-size:12px;font-weight:900;letter-spacing:.08em}
body[data-theme="light"] .email-server-status,body[data-theme="forest-light"] .email-server-status,body[data-theme="silver-light"] .email-server-status{background:#e9f7ed!important;color:#1e6332!important;border-color:#84b892!important}body[data-theme="silver-light"] .email-list-card-selected{background:#e6e8ea!important;border-color:#777f86!important}body[data-theme="forest-light"] .email-list-card-selected{background:#e7f1e9!important;border-color:#5f8469!important}
@media(max-width:1100px){.email-workspace{grid-template-columns:1fr}.email-reader-panel{scroll-margin-top:12px}.email-reader-empty{min-height:240px}.email-html-frame{height:620px}}
@media(max-width:700px){.email-page-toolbar{align-items:stretch;flex-direction:column}.email-page-toolbar .row-actions{display:grid;grid-template-columns:1fr 1fr}.email-page-toolbar .row-actions .btn:first-child{grid-column:1/-1}.email-workspace{gap:12px}.email-inbox-panel{padding:10px}.email-list-card{grid-template-columns:8px minmax(0,1fr);min-height:74px}.email-list-side{grid-column:2;display:flex;align-items:center;justify-content:space-between}.email-reader-header,.email-reader-section{padding:16px 14px}.email-reader-subject-row{display:grid}.email-format-badge{justify-self:start}.email-detail-head{grid-template-columns:1fr}.email-html-frame{height:68vh;min-height:480px}.email-attachment-item{display:grid;gap:12px}.email-attachment-item .row-actions{display:grid;grid-template-columns:1fr 1fr}.email-attachment-item .mini{text-align:center}.email-forward-box{margin:14px}.email-forward-form{grid-template-columns:1fr}.email-forward-form .btn{width:100%}}
