*{box-sizing:border-box}body{margin:0;font:14px/1.4 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;color:#1d2430;background:#f3f5f8}
.banner{background:#b45309;color:#fff;text-align:center;font-weight:700;font-size:12px;padding:4px 8px;letter-spacing:.3px;position:sticky;top:0;z-index:20}
header{display:flex;align-items:center;gap:16px;background:#14213d;color:#fff;padding:8px 16px;flex-wrap:wrap;position:sticky;top:22px;z-index:19}
.brand{font-weight:800;font-size:16px}.brand span{font-weight:400;opacity:.7}
nav{display:flex;gap:4px;flex-wrap:wrap;flex:1}nav a{color:#cfd8ea;text-decoration:none;padding:6px 10px;border-radius:6px}nav a.on,nav a:hover{background:#2b3d66;color:#fff}
.who{font-size:12px;opacity:.9}button.link{background:none;border:0;color:#9ecbff;cursor:pointer;padding:0}
main{padding:16px;max-width:1400px;margin:0 auto}
h1{font-size:20px;margin:4px 0 12px}h2{font-size:16px;margin:18px 0 8px}h3{font-size:14px;margin:12px 0 6px}
.card{background:#fff;border:1px solid #dde3ec;border-radius:10px;padding:12px;margin-bottom:12px}
.row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.grow{flex:1}
input,select,textarea{font:inherit;padding:7px 9px;border:1px solid #c6cfdb;border-radius:7px;background:#fff;max-width:100%}textarea{width:100%;min-height:70px}
button,.btn{font:inherit;padding:7px 12px;border-radius:7px;border:1px solid #2f5bd3;background:#2f5bd3;color:#fff;cursor:pointer}
button.sec{background:#fff;color:#2f5bd3}button.sm{padding:3px 8px;font-size:12px}button:disabled{opacity:.5}
table{border-collapse:collapse;width:100%}th,td{text-align:left;padding:6px 8px;border-bottom:1px solid #eef1f5;vertical-align:top}th{font-size:12px;color:#5b6576;font-weight:600;background:#f8fafc;position:sticky;top:0}
tr.click{cursor:pointer}tr.click:hover{background:#f3f7ff}.tablewrap{overflow:auto;max-height:70vh}
.pill{display:inline-block;padding:1px 8px;border-radius:999px;font-size:12px;background:#eef1f5;white-space:nowrap}
.st-new{background:#fee2e2;color:#991b1b}.st-contacted{background:#e0f2fe;color:#075985}.st-appointment{background:#ede9fe;color:#5b21b6}.st-shown{background:#fef3c7;color:#92400e}.st-sold{background:#dcfce7;color:#166534}.st-lost{background:#e5e7eb;color:#4b5563}
.loc{font-weight:700;font-size:11px;padding:1px 6px;border-radius:4px;color:#fff}.loc-FM{background:#c8102e}.loc-WC{background:#7c3aed}.loc-HL{background:#0f766e}.loc-LC{background:#1d4ed8}
.timer{font-variant-numeric:tabular-nums;font-weight:700}.late{color:#b91c1c}.ok{color:#15803d}.muted{color:#6b7280;font-size:12px}
.kpis{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}.kpi{background:#fff;border:1px solid #dde3ec;border-radius:10px;padding:10px}.kpi b{display:block;font-size:22px}.kpi span{font-size:12px;color:#5b6576}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}@media(max-width:900px){.grid2{grid-template-columns:1fr}}
.bars{display:flex;align-items:flex-end;gap:3px;height:160px;padding-top:10px;overflow-x:auto}.bar{display:flex;flex-direction:column-reverse;min-width:18px;flex:1}.bar div{width:100%}.bar small{font-size:9px;color:#6b7280;text-align:center;writing-mode:vertical-rl;transform:rotate(180deg);height:34px}
.legend{display:flex;gap:10px;font-size:12px;flex-wrap:wrap}.legend i{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:4px;vertical-align:middle}
.hbar{height:10px;background:#2f5bd3;border-radius:3px}
.timeline{list-style:none;padding:0;margin:0}.timeline li{border-left:3px solid #dde3ec;padding:4px 10px;margin-left:4px}.timeline li.t-call_in_answered,.timeline li.t-call_out_connected{border-color:#16a34a}.timeline li.t-call_in_missed,.timeline li.t-call_out_attempt{border-color:#dc2626}.timeline li.t-stage{border-color:#7c3aed}.timeline li.t-duplicate{border-color:#f59e0b}
.stagebar{display:flex;gap:4px;flex-wrap:wrap}.stagebar button{background:#fff;color:#1d2430;border-color:#c6cfdb}.stagebar button.on{background:#14213d;color:#fff}
.login{max-width:360px;margin:60px auto}.login input{width:100%;margin-bottom:8px}
pre{background:#0f172a;color:#e2e8f0;padding:10px;border-radius:8px;overflow:auto;font-size:12px;max-height:340px}
.err{color:#b91c1c}.toast{position:fixed;bottom:16px;right:16px;background:#14213d;color:#fff;padding:10px 14px;border-radius:8px;z-index:50}
@media(max-width:700px){main{padding:10px}header{top:22px;gap:6px}.hide-m{display:none}td,th{padding:5px}nav a{padding:5px 7px}}
.tabs{display:flex;gap:4px;flex-wrap:wrap;margin:10px 0 8px;border-bottom:2px solid #dde3ec}.tabs a{padding:6px 10px;text-decoration:none;color:#2f5bd3;border-radius:6px 6px 0 0}.tabs a.on{background:#14213d;color:#fff}
.sheet{max-height:72vh}table.grid{font-size:12.5px;width:max-content;min-width:100%}table.grid td,table.grid th{border:1px solid #e3e8ef;padding:3px 6px;white-space:nowrap;max-width:240px;overflow:hidden;text-overflow:ellipsis}
table.grid th{position:sticky;top:0;z-index:2;background:#eef2f7}table.grid th.pend{background:#fff7ed;color:#9a3412}table.grid th small{color:#7c3aed;font-weight:400}
table.grid td.ed{cursor:cell}table.grid td.ed:hover{outline:2px solid #93c5fd;outline-offset:-2px}table.grid td.rd{color:#4b5563}table.grid td.t-money,table.grid td.t-num{text-align:right;font-variant-numeric:tabular-nums}
table.grid td input,table.grid td select{padding:2px 4px;font-size:12px;width:100%;min-width:90px}table.grid .cc{position:sticky;left:0;background:inherit;z-index:1;min-width:70px}table.grid th.cc{z-index:3}
.csel{width:58px;font-size:11px;padding:1px 2px}.cdot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-left:3px;border:1px solid #9ca3af}
.pill.tag{background:#e0e7ff;color:#3730a3;font-size:11px}a.lk{color:#2f5bd3}a.btn{text-decoration:none;display:inline-block}label.btn{display:inline-block}
.kpi.good{border-left:4px solid #16a34a}.kpi.warn{border-left:4px solid #f59e0b}.kpi.bad{border-left:4px solid #dc2626}.kpi small{color:#6b7280;font-size:11px}
.formgrid{display:grid;grid-template-columns:1fr 1fr;gap:6px 10px}.formgrid label{font-size:12px;color:#5b6576;display:flex;flex-direction:column;gap:2px}.formgrid .span2{grid-column:span 2}
@media(max-width:700px){.formgrid{grid-template-columns:1fr}.formgrid .span2{grid-column:span 1}.kpis{grid-template-columns:repeat(2,1fr)}.kpi b{font-size:18px}}
.timer.warn{color:#b26a00;font-weight:600}.grid-asst{display:grid;grid-template-columns:1fr 280px;gap:12px}.asst{min-height:200px;border:2px dashed #ccd}.headline .kpi .v{font-size:28px}
@media(max-width:800px){.grid-asst{grid-template-columns:1fr}}#bell{text-decoration:none}tr.b td{font-weight:600}
#va-banner{position:sticky;top:0;z-index:99;background:#ffb300;color:#111;padding:8px 14px;font-size:15px;display:flex;gap:12px;align-items:center;justify-content:center}#va-banner button{background:#111;color:#fff}#va-pick{margin-right:8px;max-width:170px}
/* P234 (2026-11-01): month switcher, Links menu, phone cards, totals, test mode */
#hdr-x{gap:6px;flex-wrap:nowrap}#hdr-x select{padding:4px 6px;border-radius:6px;max-width:170px}#lk-btn{background:#f59e0b;border-color:#f59e0b;color:#111;font-weight:600}
#perbar{background:#fef3c7;color:#713f12;border-bottom:1px solid #f59e0b;padding:6px 16px;font-size:13px}#perbar button.link{color:#1d4ed8}
.pill.closed{background:#fee2e2;color:#991b1b}.pill.smp{background:#ede9fe;color:#5b21b6;font-size:10px;margin-left:3px}.pill.testmode{background:#b45309;color:#fff;font-weight:700}
.blank{color:#9ca3af}th.srt{cursor:pointer;white-space:nowrap}th.srt.on{background:#e0e7ff}th small.gst{color:#b45309;font-weight:600}tr.tot td{font-weight:700;background:#f1f5f9;border-top:2px solid #94a3b8}tfoot tr.tot td{position:sticky;bottom:0}
tr.is-smp td{opacity:.8}.lcard.is-smp{background:#faf5ff}.pill.ds-tubed{background:#fee2e2;color:#991b1b}.pill.ds-funded{background:#dcfce7;color:#166534}.pill.ds-delivered{background:#dbeafe;color:#1e40af}
.tabs-m{display:none}.lcards{display:flex;flex-direction:column;gap:8px}.lcard{background:#fff;border:1px solid #dde3ec;border-left:5px solid #c6cfdb;border-radius:10px;padding:10px;cursor:pointer}
.lcard.tot{background:#f1f5f9;cursor:default;margin-bottom:8px}.lc-h{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-bottom:4px}.lcard dl{display:grid;grid-template-columns:auto 1fr;gap:2px 10px;margin:0;font-size:13px}.lcard dt{color:#6b7280}.lcard dd{margin:0;text-align:right}.lc-f{font-size:11px;text-align:right;margin-top:4px}
.lk-modal{position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:60;display:flex;align-items:flex-start;justify-content:center;overflow:auto;padding:30px 10px}.lk-box{background:#fff;border-radius:12px;padding:14px;width:min(720px,100%);box-shadow:0 10px 30px rgba(0,0,0,.25)}
.lk-box label{display:block;margin:6px 0}.lk-box label>span{display:block;font-size:12px;color:#6b7280}.lk-box input:not([type=radio]):not([type=checkbox]),.lk-box select,.lk-box textarea{width:100%;box-sizing:border-box}.sheet-f{display:grid;grid-template-columns:1fr 1fr;gap:4px 12px}.rdv{padding:4px 0;border-bottom:1px solid #eef2f7;min-height:20px}
#lk-menu{position:absolute;z-index:61;background:#fff;border:1px solid #c6cfdb;border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.2);padding:10px;width:330px;color:#1d2430}.lk-g{font-size:11px;text-transform:uppercase;color:#6b7280;margin:8px 0 2px}
button.lk-i{display:block;width:100%;text-align:left;background:#fff;color:#1d2430;border:0;border-bottom:1px solid #eef2f7;border-radius:0;padding:9px 4px}button.lk-i:hover{background:#eef2ff}
.test-note{background:#fff7ed;border:1px solid #fdba74;border-radius:8px;padding:6px 8px;font-size:12px}.card.testres{background:#fff7ed;border-color:#fdba74}pre.lk-msg{white-space:pre-wrap;font-size:12px;background:#f8fafc;padding:6px;border-radius:6px}
.kpi small.good,td.good{color:#166534}.kpi small.warn,td.warn{color:#92400e}.kpi small.bad,td.bad{color:#991b1b}input.num{width:80px}.closed-note{background:#fee2e2;color:#991b1b}
@media(max-width:700px){.tabs-d{display:none}.tabs-m{display:flex;margin:6px 0}.lfilters{display:none}.lfilters.open{display:flex}.lfilters>*{flex:1 1 100%}#perbar{top:auto;position:static}
 #hdr-x{order:3;width:100%}#hdr-x select{flex:1;max-width:none}#lk-btn{flex:0 0 auto}#lk-menu{position:fixed;left:0;right:0;bottom:0;top:auto;width:auto;border-radius:14px 14px 0 0;max-height:80vh;overflow:auto}
 .lk-modal{padding:0;align-items:stretch}.lk-box{border-radius:0;min-height:100%}.sheet-f{grid-template-columns:1fr}.lk-act button{flex:1}}
#perbar{flex:1 1 100%;margin:0 -16px -8px;box-sizing:content-box}.kpi small{display:block}.kpi small a{display:inline-block}
@media(max-width:700px){#perbar{order:4}}

/* MONTH_TOGGLE_V1 */
.per-tg{display:inline-flex;align-items:center;gap:2px;background:#fff;border:1px solid #f59e0b;border-radius:8px;padding:1px}.per-tg button{padding:3px 9px;font-size:16px;line-height:1;min-width:0;border:0;background:transparent;color:#111}.per-tg button:disabled{opacity:.3;cursor:default}
#hdr-x .per-tg select{border:0;font-weight:600;max-width:240px;background:transparent}
tr.is-closed td{background:#eef1f5!important;color:#6b7280}tr.is-closed td.rd{cursor:not-allowed}.lcard.is-closed{background:#eef1f5;opacity:.85}.pill.closed{background:#e5e7eb;color:#374151}
@media(max-width:700px){#hdr-x .per-tg{flex:1}#hdr-x .per-tg select{flex:1;max-width:none}}

/* SERVICE_APPTS_V1 */
.pill.sv-wx{background:#fef3c7;color:#92400e;font-weight:600;margin-left:4px}.pill.sv-wo{background:#fee2e2;color:#991b1b;font-weight:600;margin-left:4px}.pill.sv-s2s{background:#dbeafe;color:#1e3a8a;font-weight:600;margin-left:4px}
.pill.svst-booked{background:#e0e7ff;color:#3730a3}.pill.svst-confirmed{background:#dcfce7;color:#166534}.pill.svst-arrived,.pill.svst-in_progress{background:#cffafe;color:#155e75}.pill.svst-done{background:#d1fae5;color:#065f46}.pill.svst-no_show{background:#fee2e2;color:#991b1b}.pill.svst-cancelled{background:#f3f4f6;color:#6b7280;text-decoration:line-through}
.sv-tabs a.btn{margin-right:2px}.sv-qt{flex-wrap:wrap;gap:4px;margin-bottom:8px}
.sv-cal{display:grid;gap:1px;background:#e5e7eb;border:1px solid #e5e7eb;font-size:12px}.sv-cal>div{background:#fff;padding:3px;min-height:34px}.sv-ch{font-weight:600;text-align:center;background:#f8fafc!important}.sv-ch.today{background:#eef4ff!important}.sv-hr{color:#6b7280;text-align:right}
.sv-ev{border-left:3px solid #6366f1;background:#eef2ff;border-radius:4px;padding:2px 4px;margin-bottom:2px;cursor:pointer}.sv-ev.svst-confirmed{border-color:#16a34a;background:#f0fdf4}.sv-ev.svst-no_show{border-color:#dc2626;background:#fef2f2}.sv-ev.svst-cancelled{opacity:.5}.sv-ev.svst-done,.sv-ev.svst-arrived,.sv-ev.svst-in_progress{border-color:#0891b2;background:#ecfeff}
.sv-pick{padding:4px;border-bottom:1px solid #eee;cursor:pointer}.sv-pick:hover{background:#f3f7ff}.sv-s2sbox{background:#eff6ff;border:1px solid #bfdbfe;border-radius:6px;padding:6px;margin:6px 0}
/* keep short headers and dates on one line in the customer Service card */
#x-svc th, #x-svc td:first-child { white-space: nowrap; }

/* BATCH2_V1 deliveries + lost leads */
.pill.dv-miss{background:#fee2e2;color:#b91c1c;border:1px solid #fca5a5;white-space:normal}
.lp-tabs{display:flex;gap:6px;flex-wrap:wrap;align-items:center}.lp-tabs a{padding:6px 12px;border-radius:999px;border:1px solid #cbd5e1;text-decoration:none;color:inherit}.lp-tabs a.on{background:#1e3a8a;color:#fff;border-color:#1e3a8a}
.btn.sm.lp-claim{padding:2px 10px}

/* DASH_ALL_V1: modular KPI cards, full width, no horizontal scroll at 1440 */
.dsec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 12px; margin: 12px 0; max-width: 100%; }
.dsec-grid > .card { margin: 0; min-width: 0; }
.dsec-wide { grid-column: 1 / -1; }
.dsec h3 { margin: 0 0 6px; }
.dkpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.dkpis .kpi { min-width: 0; margin: 0; }
.dkpis .kpi b { font-size: 1.25rem; overflow-wrap: anywhere; }
.dkpis .kpi span { overflow-wrap: anywhere; }
.dlist { margin-top: 10px; border-top: 1px solid #e5e7eb; padding-top: 6px; }
.dlist h4 { margin: 0 0 4px; font-size: .85rem; }
.dlist .row { padding: 2px 0; font-size: .9rem; gap: 8px; }
.dtable { width: 100%; table-layout: auto; font-size: .88rem; }
.dtable td, .dtable th { white-space: nowrap; }
#lead-tabs .cnt { opacity: .7; font-size: .85em; }
@media (max-width: 700px) { .dsec-grid { grid-template-columns: 1fr; } .dkpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* DASH_ALL_V1 mobile: contain wide tables on the dashboard */
#dash-svc, #dash .tablewrap { overflow-x: auto; max-width: 100%; min-width: 0; }
/* PBS_STOCK_V1 */ .pill.pbs-ok{background:#e3f4e8;color:#17663a;font-size:10px;padding:0 5px} .pill.pbs-no{background:#fff1dc;color:#9a5b00;font-size:10px;padding:0 5px}

/* NOTE_STAMPS_V1: notes hover + add-note dialog */
.nh-pop{position:fixed;z-index:9999;background:#fff;border:1px solid #c6cfdb;border-radius:8px;box-shadow:0 6px 24px rgba(0,0,0,.18);padding:8px 10px;max-height:60vh;overflow:auto;font-size:13px;pointer-events:none}
.nh-h{font-size:11px;color:#667;margin-bottom:4px;text-transform:uppercase;letter-spacing:.03em}
.nh-e{padding:5px 0;border-top:1px solid #eef1f5}.nh-e:first-of-type{border-top:0}
.nh-m{font-size:11.5px;color:#556}.nh-b{white-space:pre-wrap;word-break:break-word;color:#111}
.nh-old .nh-m{font-style:italic}
.nh-cell .nh-t{color:#667}.nh-n{background:#eef1f5;border-radius:8px;padding:0 5px;color:#445}
.nh-dlg-bg{position:fixed;inset:0;z-index:9998;background:rgba(0,0,0,.35);display:flex;align-items:flex-start;justify-content:center;padding-top:8vh}
.nh-dlg{background:#fff;width:min(520px,94vw);max-height:80vh;overflow:auto;padding:14px;border-radius:10px}
.nh-dlg textarea{width:100%;box-sizing:border-box;font:inherit}
.nh-list{border-top:1px solid #e3e8ef;margin-top:6px;padding-top:6px;font-size:13px}
.nh-chip{display:inline-block;margin-left:4px;padding:0 5px;border-radius:9px;background:#eef3fb;border:1px solid #c9d6ea;font-size:11.5px;cursor:pointer;white-space:nowrap}.nh-chip.nh-0{opacity:.55}table.grid td.cc .nh-chip{display:block;width:max-content;margin:2px 0 0}

/* ===== LAYOUT4_V1 (batch 4): icon-tile menu (inline SVG) + full-width Blue Book / Gross logs ===== */
#icnav{display:grid;grid-template-columns:repeat(auto-fit,minmax(96px,1fr));gap:8px;max-width:1400px;margin:12px auto 0;padding:0 16px;box-sizing:border-box}
#icnav a.ict{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:62px;padding:8px 6px;border:1px solid #d9e0ea;border-radius:12px;background:#fff;color:#334155;text-decoration:none;font-size:12.5px;font-weight:600;line-height:1.15;text-align:center;transition:background .15s,color .15s,border-color .15s,box-shadow .15s,transform .15s;-webkit-tap-highlight-color:transparent}
#icnav a.ict svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.8;flex:0 0 auto}
#icnav a.ict:hover{border-color:#2b3d66;color:#1e3a8a;background:#f3f6fd;box-shadow:0 3px 10px rgba(30,58,138,.12);transform:translateY(-1px)}
#icnav a.ict:focus-visible{outline:3px solid #60a5fa;outline-offset:2px}
#icnav a.ict.on{background:#2b3d66;border-color:#2b3d66;color:#fff;box-shadow:inset 0 -3px 0 #c9a24a}
#icnav a.ict.on:hover{transform:none}
body.fullw main,body.fullw #icnav{max-width:none}
body.fullw main{padding-left:12px;padding-right:12px}
body.fullw #l-grid{padding:8px}
body.fullw #l-grid table.grid{width:100%;min-width:0;table-layout:auto}
body.fullw #l-grid table.grid td,body.fullw #l-grid table.grid th{white-space:normal;overflow-wrap:anywhere;max-width:none;padding:4px 5px;vertical-align:top}
body.fullw #l-grid table.grid td[data-k=notes]{min-width:120px;max-width:260px;display:table-cell}
body.fullw #l-grid table.grid td[data-k=notes]{overflow:hidden;text-overflow:ellipsis}
body.fullw #l-grid table.grid td.t-money,body.fullw #l-grid table.grid td.t-num,body.fullw #l-grid table.grid td.t-date{white-space:nowrap}
body.fullw #l-grid table.grid .cc{min-width:0}
body.fullw #l-grid table.grid .mbtn{padding:0 5px;margin-left:3px}
@media(max-width:700px){
 #icnav{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;margin-top:8px;padding:0 8px}
 #icnav a.ict{min-height:52px;padding:6px 2px;gap:3px;font-size:10.5px;border-radius:10px}
 #icnav a.ict svg{width:21px;height:21px}
 #icnav a.ict:hover{transform:none;box-shadow:none}
 body.fullw main{padding:10px}
}
#icnav a.ict:hover{background:#f3f6fd!important;color:#1e3a8a!important}#icnav a.ict.on,#icnav a.ict.on:hover{background:#2b3d66!important;color:#fff!important;box-shadow:inset 0 -3px 0 #c9a24a!important} /* LAYOUT4_V1: beat warm.css nav a.on/hover !important */
body.fullw #l-grid td[data-k=location] .chip,body.fullw #l-grid td[data-k=location] span{white-space:nowrap} /* LAYOUT4_V1 store badge */

/* DASH_OUTCOMES_WIDE_V1: Lead outcomes spans the whole dashboard, tiles spread evenly in one row on desktop */
.dsec-grid > .dsec[data-sec="outcomes"] { grid-column: 1 / -1; }
.dsec[data-sec="outcomes"] .dkpis { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
@media (max-width: 700px) { .dsec[data-sec="outcomes"] .dkpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* LOG_POPOUT_V1: log pop-out windows (no main nav, slim tab bar, fullscreen toggle) */
.po-btn { margin-left: 10px; font-size: .8rem; padding: 3px 10px; vertical-align: middle; }
body.popout .banner, body.popout #top { display: none !important; }
body.popout #app { max-width: none; margin: 0; padding: 8px 14px 14px; }
body.popout .tabs-d, body.popout .tabs-m, body.popout .po-btn, body.popout .legend { display: none !important; }
body.popout h1 { font-size: 1.05rem; margin: 4px 0 6px; }
#po-bar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 6px; padding: 5px 10px; background: #1f3a24; color: #fff; font-size: .82rem; overflow-x: auto; white-space: nowrap; }
#po-bar b { margin-right: 6px; }
#po-bar nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; }
#po-bar nav a { color: #e8efe6; text-decoration: none; padding: 3px 9px; border-radius: 4px; }
#po-bar nav a:hover { background: rgba(255,255,255,.12); }
#po-bar nav a.on { background: #f5c242; color: #1b1b1b; font-weight: 600; }
#po-bar button { font-size: .78rem; padding: 2px 9px; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.45); border-radius: 4px; cursor: pointer; }
#po-bar .po-ar { color: #cfe0cc; font-size: .75rem; }

/* LOG_POPOUT_V1b: pop-out window hides the greeting, icon tiles and decorative rails */
body.popout #warm-hello, body.popout #icnav, body.popout #warm-under, body.popout .warm-rail, body.popout .warm-empty { display: none !important; }
body.popout #app { padding-top: 6px; }

/* VIEWAS_NAV_V1: rep switcher inside the view-as banner; banner wraps neatly */
#va-banner{flex-wrap:wrap;row-gap:6px;line-height:1.3}#va-banner select#va-pick{margin:0;max-width:220px;height:30px;padding:2px 6px;border-radius:6px;border:1px solid #111;background:#fff;color:#111;font-size:13px}

/* MYLOGS_NOKPI_V1: no KPIs on My logs */
#my-o, #my-k, #my-h { display: none !important; }
/* NAV_DEDUP_V1: one button per destination (icon tile wins over the text link / sub-tab) */
/* LOGS_NAV_V1: #nav Logs + log sub-tabs are shown again (log tiles removed instead) */
/* HDR2_V1: icon tiles gone, so the Dashboard / Trades / Lost / Staff links are back; Trade Dashboard, Dispatch and Service live under Logs */
body.l4-on #nav a.tdnav { display: none !important; } /* SVC_NAV_V1: Service is a standalone top-nav tile again (Seann); sales-side still hidden below */
/* SALES_NO_SVC_V1: no Service for sales-side roles */
body.sales-side #nav a[href="#/service"], body.sales-side #dash-svc, body.sales-side #x-svc, body.sales-side .dsec[data-sec="fixed"], body.sales-side .dsec[data-sec="combined"] { display: none !important; }

/* NAV_DEDUP_V2: one "+ New customer" (global nav link wins; it still opens this form) */
body:has(#nav-newc) #f-new { display: none !important; }

/* LOGS_NAV_V1: clearly visible Pop out button on every log page */
.po-btn { margin-left: 12px; font-size: .9rem; font-weight: 600; padding: 5px 14px; vertical-align: middle; }
#nav-vastop { font-weight: 600; }

/* ===== HDR2_V1: all nav + page-level buttons in the sticky header (2nd row = logs tabs, sub-tabs, page actions) ===== */
#icnav { display: none !important; }
header#top { top: 0; z-index: 60; }
body:has(> .banner) header#top { top: 22px; }
#hdr2 { flex-basis: 100%; display: flex; flex-direction: column; gap: 4px; margin: 0 -16px -8px; padding: 6px 16px 6px; background: #1d2b4f; border-top: 1px solid rgba(255,255,255,.12); }
#hdr2:not(:has(.h2row:not([hidden]))) { display: none; }
#hdr2 .h2row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
#hdr2 .h2row[hidden] { display: none; }
#hdr2 .grow { flex: 1; }
#hdr2 a.h2tab, #hdr2 a.h2sub { color: #e5ecff; text-decoration: none; padding: 5px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.06); font-size: .88rem; white-space: nowrap; }
#hdr2 a.h2tab:hover, #hdr2 a.h2sub:hover { background: rgba(255,255,255,.16); }
#hdr2 a.h2tab.on { background: #fff; color: #14213d; font-weight: 700; border-color: #fff; }
#hdr2 a.h2sub { font-size: .8rem; padding: 3px 10px; }
#hdr2 a.h2sub.on { background: #c7d2fe; color: #14213d; font-weight: 600; }
#hdr2 .po-btn { margin-left: 0; }
#h2page { color: #111; }
#h2page > * { margin: 0 !important; }
#h2page .card { padding: 6px 8px; box-shadow: none; }
#h2page .tabs { background: rgba(255,255,255,.95); border-radius: 8px; padding: 3px 6px; }
.nav-pop { background: transparent; border: 1px solid rgba(255,255,255,.3); color: #fff; padding: 0 5px; margin-left: -6px; font-size: .75rem; line-height: 1.4; border-radius: 6px; cursor: pointer; }
.nav-pop:hover { background: rgba(255,255,255,.18); }
/* tables scroll inside their own box, so their sticky column headers sit under the sticky header, never under it */
.tablewrap { max-height: calc(100vh - var(--hdrb, 160px) - 24px); }
@media (max-width: 700px) {
  #hdr2 .h2row#lgbar, #hdr2 .h2row#lgsub { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #h2page .lfilters { display: flex; }
  header#top { position: sticky; }
}
.pill.wsd-rn { background: #fee2e2; color: #991b1b; font-weight: 700; }

/* HDR2_MOB_V1: phones - header scrolls away (not sticky), page rows are one swipeable line, no sideways page scroll */
@media (max-width: 700px) {
  header#top { position: static !important; }
  #hdr2, #hdr2 .h2row, #h2page { max-width: 100vw; box-sizing: border-box; }
  #h2page, #h2page > *, #h2page .lfilters, #h2page #l-filt { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto; gap: 6px; -webkit-overflow-scrolling: touch; }
  #h2page > * { flex: 0 0 auto; max-width: none; }
  #h2page select, #h2page input, #h2page button, #h2page a { flex: 0 0 auto; width: auto !important; min-width: 0; }
  #h2page input[type=search], #h2page input[type=text] { width: 140px !important; }
  #h2page #l-filt > * { flex: 0 0 auto; }
  .tablewrap { max-height: none; }
  html, body { overflow-x: hidden; }
}

/* EXEC_FULL_V1: chip kept; ro-exec no longer applied (was EXEC_ROLE_V1 read-only greying) */
#exec-chip{display:inline-block;margin-left:8px;padding:2px 8px;border-radius:10px;background:#ede9fe;color:#5b21b6;font-size:12px;font-weight:600;vertical-align:middle}
/* MSG_INBOX_V1 */
#nav a[href="#/messages"] .pill,#msgn{margin-left:4px}
tr.b td{font-weight:600}
/* SAVE_ERR_V1: visible save-failure banner */
#save-err{position:fixed;top:12px;left:50%;transform:translateX(-50%);z-index:100000;background:#b91c1c;color:#fff;padding:12px 16px;border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.35);display:flex;gap:10px;align-items:center;max-width:min(92vw,760px);font-weight:600}
#save-err[hidden]{display:none}#save-err button{background:#fff;color:#b91c1c;border:0;padding:6px 10px;border-radius:6px;font-weight:700;cursor:pointer}
/* DLV2_V1 */
.dv-off{display:inline-flex;gap:6px;align-items:center;flex-wrap:wrap;flex:1 1 320px}.dv-off input[name=address]{min-width:260px}
.pill.warn{background:#fff3cd;color:#7a4b00;border:1px solid #f0c36d}.pill.ok{background:#e6f4ea;color:#14532d;border:1px solid #9fd5ad}
.dv-apr{margin:8px 0;padding:10px 12px}.dv-t{width:100%;border-collapse:collapse;font-size:13px}.dv-t th,.dv-t td{padding:6px 8px;border-bottom:1px solid #e5e1d6;text-align:left;vertical-align:top}
.dsp-off td{background:#fff8e6}.dsp-badge{background:#b45309;color:#fff;font-weight:700}
/* CUSTFILE_BC_V1 (sandbox): B = stepper + tabs (desktop), C = card stack (<700px) */
.cf .cf-head{padding:14px 16px}.cf .cf-title{margin:0 0 4px}.cf .cf-title h1{font-size:22px;margin:0}.cf .cf-contact{border:0;box-shadow:none;padding:0;margin:0 0 6px;background:none}
.cf-stepper{display:flex;margin-top:12px}.cf-step{flex:1;text-align:center;position:relative;font-size:12px}.cf-step:before{content:'';position:absolute;top:13px;left:-50%;right:50%;height:3px;background:#dde3ec}.cf-step:first-child:before{display:none}.cf-step.done:before,.cf-step.req:before{background:#16a34a}
.cf-step b{display:block;font-size:12px}.cf-step small{color:#6b7280}.cf-ck{display:inline-flex;width:24px;height:24px;border-radius:50%;align-items:center;justify-content:center;font-weight:700;font-size:13px;color:#fff;flex:none;position:relative;z-index:1;margin:0 auto 4px}
.cf-ck.done{background:#16a34a}.cf-ck.req{background:#f59e0b}.cf-ck.miss{background:#fff;color:#dc2626;border:2px solid #dc2626}
.cf-hero-c{display:none}.cf-tabs{display:flex;gap:4px;border-bottom:2px solid #dde3ec;margin:10px 0 12px;overflow-x:auto}.cf-tabs a{padding:8px 14px;color:#5b6576;font-weight:600;white-space:nowrap;cursor:pointer;text-decoration:none}.cf-tabs a.on{color:#2f5bd3;border-bottom:3px solid #2f5bd3;margin-bottom:-2px}
.cf-p>summary{display:none}.cf-p:not(.on){display:none}.cf-p{display:block}
.cf-jacket{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:12px}.cf-jk{background:#fff;border:1px solid #dde3ec;border-radius:10px;padding:12px}.cf-jk h4,.cf-tcard h4{margin:0 0 6px;font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:#5b6576}.cf-jk .big{font-weight:700;margin-bottom:4px}
.cf .kv{display:grid;grid-template-columns:auto 1fr;gap:2px 12px;font-size:13px}.cf .kv span{color:#6b7280}.cf-prog{height:6px;background:#e5e7eb;border-radius:4px;overflow:hidden;margin:6px 0}.cf-prog>div{height:100%;background:#16a34a}
.cf-chk ul{list-style:none;margin:0;padding:0}.cf-chk li{display:flex;gap:10px;align-items:center;padding:7px 0;border-bottom:1px solid #eef1f5}.cf-chk li .cf-ck{margin:0}.cf-chk small{display:block;color:#6b7280}
.pill.s-done{background:#dcfce7;color:#166534}.pill.s-miss{background:#fee2e2;color:#991b1b}.pill.s-req{background:#fef3c7;color:#92400e}.pill.s-lock{background:#e5e7eb;color:#374151}
.cf-doc{border:1px solid #dde3ec;border-left:4px solid #dde3ec;border-radius:8px;margin-bottom:6px;background:#fff}.cf-doc.ok{border-left-color:#16a34a}.cf-doc.req{border-left-color:#f59e0b}.cf-doc.missing{border-left-color:#dc2626}.cf-doc>summary{display:flex;gap:8px;align-items:center;padding:8px 10px;cursor:pointer}.cf-docb{padding:0 12px 10px 34px;font-size:13px;color:#4b5563}
.cf-tcard .cf-kv{margin:6px 0 8px}.cf #cf-ov>.grid2{margin-top:0}
@media(max-width:700px){.cf-stepper,.cf-tabs{display:none}.cf-hero-c{display:block;margin-top:6px}.cf .cf-head{background:#14213d;color:#fff;border-radius:12px}.cf .cf-head .muted,.cf .cf-head a:not(.btn){color:#cfd8ea}.cf .cf-head h1{color:#fff;font-size:19px}.cf .cf-head .cf-prog{background:#2b3d66}
 .cf-qa{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-top:10px}.cf-qa .btn{padding:9px 4px;font-size:12px;background:#2b3d66;border-color:#2b3d66;color:#fff;text-align:center}
 .cf-p,.cf-p:not(.on){display:block;background:#fff;border:1px solid #dde3ec;border-radius:10px;margin-bottom:10px}.cf-p>summary{display:flex;gap:8px;align-items:center;padding:12px;font-weight:700;list-style:none;cursor:pointer}.cf-p>summary::-webkit-details-marker{display:none}.cf-p>summary:after{content:'▾';margin-left:auto;color:#6b7280}.cf-p:not([open])>summary:after{content:'▸'}.cf-in{padding:0 8px 8px}
 .cf-jacket{grid-template-columns:1fr}}
/* GRID_NOWRAP_V1 (Seann 3:26 PM, sandbox): full-screen logs broke words mid-letter ("Schedule|d" spilling into the next column). Break only between words; status/date/money/short cells never wrap. */
body.sbx.fullw #l-grid table.grid td,body.sbx.fullw #l-grid table.grid th{overflow-wrap:normal;word-break:normal;hyphens:none}
body.sbx #l-grid table.grid td[data-k=status],body.sbx #l-grid table.grid td[data-k=address_check],body.sbx #l-grid table.grid td[data-k$=_date],body.sbx #l-grid table.grid td[data-k$=_at],body.sbx #l-grid table.grid td[data-k=stock_no],body.sbx #l-grid table.grid td[data-k=new_used],body.sbx #l-grid table.grid td[data-k=trade],body.sbx #l-grid table.grid td[data-k=fi]{white-space:nowrap}
body.sbx #l-grid table.grid td[data-k=status] select{min-width:9.5em}
.dv-t td:last-child,.dv-t th,.dsp-t td:last-child{white-space:nowrap} /* GRID_NOWRAP_V1 */
/* DLV_LAYOUT_V1 (Seann 3:27 PM, sandbox): Deliveries grid */
body.sbx.repdeliv #l-grid tr.is-smp td:first-child,body.sbx #l-grid tr.is-smp td[data-k=scheduled_at]{box-shadow:inset 4px 0 #a78bfa}
body.sbx #l-grid table.grid td[data-k=scheduled_at]{white-space:nowrap;min-width:150px}body.sbx #l-grid table.grid td[data-k=scheduled_at] .mbtn{margin-right:4px}
body.sbx #l-grid table.grid td[data-k=customer]{min-width:150px}body.sbx #l-grid table.grid td[data-k=contact]{min-width:130px;white-space:nowrap}body.sbx #l-grid table.grid td[data-k=vehicle]{min-width:170px}
body.sbx #l-grid table.grid td[data-k=deal_no],body.sbx #l-grid table.grid th[data-s=deal_no]{width:44px;max-width:56px;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.sbx #l-grid table.grid td[data-k=sales_user_id]{white-space:nowrap}
body.sbx.repdeliv #l-grid table.grid td[data-k=missing]{min-width:240px}body.sbx.repdeliv #l-grid table.grid td[data-k=trade]{text-align:center}
/* LINKS_CF_V1: dealer-site shortcuts stay out of the top bar. The Links ▾ button stays visible so "Start a new file" remains reachable (FEATURES_LIVE had applied body.sbx in production and hid that path). */
body.sbx #hdr-x #dlr,body.sbx .cf-title [data-links]{display:none!important}
.cf-links .lk-stack{display:flex;flex-direction:column;gap:4px}.cf-links .lk-row{display:flex;align-items:center;gap:6px;padding:5px 8px;border:1px solid #e3e8ef;border-radius:8px;background:#fff}.cf-links .lk-row b{flex:1;font-weight:600;font-size:13px}.cf-links .lk-row .dlr-s{font-size:10px;font-weight:800;background:#fbbf24;border-radius:4px;padding:1px 4px}.cf-links h4{margin:10px 0 4px;font-size:11px;text-transform:uppercase;color:#5b6576;letter-spacing:.05em}
.cf-links .cf-open{font-size:12px;padding:3px 8px;border:1px solid #c9d2de;border-radius:6px;text-decoration:none;color:#1f3b63;background:#fff}
.cf-links .lk-row button,.cf-links .cf-open{white-space:nowrap}
/* AI_APPR_V1 */
.cf-aibox{border-left:4px solid #7c3aed}.cf-aibox .ai-v{display:flex;gap:24px;flex-wrap:wrap;margin:8px 0}.cf-aibox .ai-v>div{display:flex;flex-direction:column}.cf-aibox .ai-v b{font-size:20px}.cf-aibox .ai-w{margin:8px 0;line-height:1.45}.cf-aibox .ai-t{width:100%;border-collapse:collapse;font-size:13px}.cf-aibox .ai-t td,.cf-aibox .ai-t th{padding:4px 6px;border-bottom:1px solid #eef1f5;text-align:left}.cf-aibox .nw{white-space:nowrap}.cf-aibox .ai-l{font-size:12px;margin:6px 0 0}.cf-tcard .cf-aibox{box-shadow:none;margin:8px 0}

/* WIP_V1: shared 'Not ready' treatment (driven by CFG.wip, see lib/config.js WIP) */
.is-wip { position: relative; opacity: .62; filter: grayscale(.85); outline: 1.5px solid rgba(200, 40, 40, .55); outline-offset: -1px; background-color: rgba(200, 40, 40, .05) !important; border-radius: 6px; cursor: not-allowed; }
.is-wip :is(button, input, select, textarea), button.is-wip, input.is-wip, select.is-wip { pointer-events: none; cursor: not-allowed; }
.wip-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; line-height: 1.4; color: #8a1c1c; background: #fff4d6; border: 1px solid #e3a3a3; border-radius: 10px; padding: 0 7px; margin: 0 6px; white-space: nowrap; vertical-align: middle; filter: none; cursor: help; }
.is-wip > .wip-badge { opacity: 1; }
/* TEST_ACCOUNT_V1 */
#test-banner { position: sticky; top: 0; z-index: 9999; background: #fde7e7; color: #7a1010; border-bottom: 2px solid #d94b4b; padding: 6px 14px; font-size: 13px; text-align: center; }
#test-banner button { margin-left: 10px; }

/* INV_POLISH_V1 (Seann 4:04): inventory log - full width, no clipping, collapsed notes, tighter spacing, full-screen mode */
body.invlog main{max-width:none;padding-left:12px;padding-right:12px}
body.invlog main>h1{margin:2px 0 8px}
.inv-card{padding:8px 10px}
.inv-bar{gap:8px;align-items:center;margin:0 0 6px;flex-wrap:wrap}.inv-bar select{padding:3px 6px;font-size:13px}
#inv-g .g-sum{margin:0 0 4px}
#inv-g .tablewrap{max-width:100%;overflow:auto;max-height:calc(100vh - var(--hdrb,160px) - 96px)}
#inv-g table.grid td,#inv-g table.grid th{padding:3px 7px;line-height:1.3;vertical-align:middle}
#inv-g table.grid td[data-k=notes]{max-width:220px;min-width:90px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
#inv-g table.grid td[data-k=notes] *{display:inline;white-space:nowrap}
body.inv-notes #inv-g table.grid td[data-k=notes]{white-space:normal;max-width:420px;min-width:260px;overflow:visible}
body.inv-notes #inv-g table.grid td[data-k=notes] *{white-space:normal}
body.inv-fs{overflow:hidden}
body.inv-fs #inv-c{position:fixed;inset:0;z-index:45;margin:0;border-radius:0;display:flex;flex-direction:column;background:#fff;padding:8px 12px;box-sizing:border-box}
body.inv-fs #inv-g{flex:1;min-height:0;display:flex;flex-direction:column}
body.inv-fs #inv-g .tablewrap{flex:1;min-height:0;max-height:none}
#inv-g .tablewrap{overflow-x:scroll;overflow-y:auto;scrollbar-width:auto}
#inv-g table.grid th{white-space:normal;min-width:44px;max-width:104px;vertical-align:bottom;line-height:1.2}
#inv-g table.grid td[data-k=stock_no],#inv-g table.grid th[data-s=stock_no]{position:sticky;left:0;z-index:1;background:#fff;box-shadow:1px 0 0 #c6cfdb}
#inv-g table.grid th[data-s=stock_no]{z-index:3;background:#eef2f7}
#inv-g table.grid tr.is-smp td[data-k=stock_no]{background:#f6f3ff}
body.inv-fs #app{z-index:70}body.inv-fs .lk-modal,body.inv-fs .toast{z-index:80}

/* CUSTOMER_ROW_NAV_1108 */
.customer-record-row{cursor:pointer}.customer-record-row:hover,.customer-record-row:focus-visible{background:#eaf2ff!important;outline:2px solid #3576c8;outline-offset:-2px}.customer-record-link{display:block;padding:8px 0;text-decoration:underline}

#global-customer-search{position:relative;flex:1;min-width:220px;max-width:520px;margin:5px 10px}#global-customer-search label{display:block;font-size:11px}#global-customer-q{width:100%;min-height:40px}#global-customer-results{position:absolute;top:100%;left:0;right:0;z-index:120;background:white;color:#17243b;box-shadow:0 5px 18px #0005;max-height:60vh;overflow:auto}#global-customer-results a{display:block;padding:12px;color:inherit;text-decoration:none;border-bottom:1px solid #ddd}#global-customer-results span{display:block;font-size:12px}#global-customer-results a:hover,#global-customer-results a:focus-visible{background:#eaf2ff;outline:2px solid #3576c8}

/* DAILY1110: staff portfolio links, customer code, EMV beside ACV, no top-nav redesign */
a.staff-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.pill.cust-code { font-family: ui-monospace, Menlo, monospace; letter-spacing: .04em; }
.hud-emv-acv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; align-items: end; }
@media (max-width: 640px) { .hud-emv-acv { grid-template-columns: 1fr; } }
.veh-fs { position: fixed; inset: 0; z-index: 80; background: rgba(12,18,28,.55); display: flex; flex-direction: column; overflow: auto; }
.veh-fs-inner { background: #fff; margin: 0; min-height: 100%; width: 100%; max-width: none; box-sizing: border-box; padding: 16px 20px 32px; }
@media (min-width: 900px) { .veh-fs-inner { padding: 20px 32px 40px; } }
body.veh-fs-lock { overflow: hidden; }
