:root{--navy:#0b2438;--blue:#174a70;--blue2:#236a9a;--orange:#d86d2b;--bg:#e9eff3;--card:#fff;--card-soft:#f8fafc;--text:#142839;--muted:#617487;--line:#d9e2e8;--line-strong:#c8d5de;--focus:rgba(35,106,154,.22);--good:#176b3a;--bad:#9b2323;--warn:#8a5b08;--shadow:0 1px 2px rgba(11,36,56,.05),0 10px 28px rgba(11,36,56,.07);--shadow-soft:0 1px 2px rgba(11,36,56,.04),0 4px 14px rgba(11,36,56,.06);--radius:14px;--radius-sm:10px}
*{box-sizing:border-box}html{height:100%;background:var(--bg);scrollbar-gutter:stable}body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.55;cursor:not-allowed}a{color:var(--blue2);text-underline-offset:2px}button,a,input,select,textarea,summary{transition:border-color .16s ease,background-color .16s ease,color .16s ease,box-shadow .16s ease,transform .16s ease}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.topbar{position:sticky;top:0;z-index:50;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:58px;padding:8px 12px;background:var(--navy);color:#fff;box-shadow:0 4px 16px rgba(5,24,39,.16)}.brand{display:flex;align-items:center;gap:10px;min-width:0}.brand-logo{display:block;width:40px;height:40px;flex:0 0 40px;object-fit:contain;border-radius:10px;background:#fff;padding:2px}.brand-mark{display:grid;place-items:center;width:40px;height:40px;border-radius:10px;background:#fff;color:var(--navy);font-weight:950}.brand>div{min-width:0}.brand strong{display:block;font-size:.95rem;letter-spacing:.005em}.brand small{display:block;color:#d7e6ef;margin-top:1px;font-size:.74rem}.top-actions{display:flex;align-items:center;gap:6px;min-width:0}.icon-button,.ai-launcher{border:1px solid rgba(255,255,255,.28);background:rgba(255,255,255,.10);color:#fff}.icon-button{width:44px;height:44px;border-radius:10px;font-size:1.08rem}.icon-button:hover,.ai-launcher:hover{background:rgba(255,255,255,.18);border-color:rgba(255,255,255,.45)}.badge{display:inline-flex;align-items:center;min-height:28px;padding:4px 8px;border:1px solid transparent;border-radius:999px;font-size:.72rem;font-weight:850;line-height:1}.badge.online{background:#e4f4e9;color:var(--good);border-color:#cce8d5}.badge.offline{background:#fdeaea;color:var(--bad);border-color:#f5d3d3}.badge.neutral{background:#eaf1f6;color:#29465e;border-color:#d8e4ec}.badge.warn{background:#fff3ce;color:var(--warn);border-color:#f0dfaa}
.business-bar{position:sticky;top:58px;z-index:45;display:flex;gap:8px;align-items:center;min-height:46px;padding:6px 12px;background:rgba(255,255,255,.97);border-bottom:1px solid var(--line);box-shadow:0 2px 10px rgba(11,36,56,.03);backdrop-filter:blur(12px)}.business-bar select{min-width:220px;max-width:430px}.business-bar span{margin-left:auto;color:var(--muted);font-size:.8rem}.business-bar button{min-height:44px;padding:7px 13px;border:0;border-radius:9px;background:var(--blue);color:#fff;font-weight:850}.business-bar button:hover{background:var(--blue2)}.app-shell{display:grid;grid-template-columns:196px minmax(0,1fr);min-height:calc(100vh - 104px)}.main-nav{position:sticky;top:104px;align-self:start;height:calc(100vh - 104px);overflow:auto;padding:12px 8px;background:#fff;border-right:1px solid var(--line)}.main-nav button{display:flex;align-items:center;gap:9px;width:100%;min-height:46px;margin:2px 0;padding:9px 10px;border:1px solid transparent;border-radius:10px;background:transparent;color:#203d52;font-weight:780;text-align:left}.main-nav button:hover{background:#f2f6f9;border-color:#e5edf2}.main-nav button.active{background:var(--blue);border-color:var(--blue);color:#fff;box-shadow:0 5px 14px rgba(23,74,112,.18)}.nav-icon{width:22px;text-align:center;opacity:.92}main{min-width:0;padding:20px 22px 96px}.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin:0 0 15px}.page-head>div:first-child{min-width:0}.page-head h1{margin:0;color:var(--navy);font-size:clamp(1.5rem,2.5vw,2rem);line-height:1.08;letter-spacing:-.02em}.page-head p{margin:5px 0 0;color:var(--muted);max-width:760px;font-size:.92rem;line-height:1.45}.page-tools{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:12px}.card{grid-column:span 12;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:15px;box-shadow:var(--shadow)}.card h2,.card h3{margin:0 0 9px;color:var(--navy);line-height:1.22}.card h2{font-size:1.12rem}.card h3{font-size:1rem}.span12{grid-column:1/-1}.span3{grid-column:span 3}.span4{grid-column:span 4}.span5{grid-column:span 5}.span6{grid-column:span 6}.span7{grid-column:span 7}.span8{grid-column:span 8}.span9{grid-column:span 9}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.stat{padding:12px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--card-soft)}.stat strong{display:block;font-size:1.42rem;line-height:1.1;color:var(--navy);font-variant-numeric:tabular-nums}.stat span{display:block;margin-top:3px;font-size:.76rem;color:var(--muted);font-weight:800}button.stat{font:inherit;color:inherit;text-align:left;cursor:pointer}button.stat:hover{border-color:var(--line-strong)}.notice{padding:10px 12px;border:1px solid #dbe7ef;border-radius:10px;background:#eef5fa;color:var(--navy);line-height:1.4}.notice.good{background:#e8f6ec;border-color:#d1ead9;color:var(--good)}.notice.warn{background:#fff5d8;border-color:#f0e0af;color:var(--warn)}.notice.bad{background:#fdecec;border-color:#f3d4d4;color:var(--bad)}.muted{color:var(--muted);line-height:1.45}.small{font-size:.82rem}.empty{padding:22px;border:1px dashed var(--line-strong);border-radius:var(--radius-sm);background:#fbfcfd;text-align:center;color:var(--muted);line-height:1.45}
label{display:block;margin:9px 0 5px;font-size:.8rem;font-weight:850;color:var(--navy)}input,select,textarea{width:100%;min-height:44px;border:1px solid var(--line-strong);border-radius:10px;padding:9px 11px;background:#fff;color:var(--text);outline:0}input:hover,select:hover,textarea:hover{border-color:#aebfcb}input:focus,select:focus,textarea:focus{border-color:var(--blue2);box-shadow:0 0 0 3px var(--focus)}textarea{min-height:92px;resize:vertical}.two{display:grid;grid-template-columns:1fr 1fr;gap:9px}.three{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.four{display:grid;grid-template-columns:repeat(4,1fr);gap:9px}.actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px}.actions button,.primary,.secondary,.danger,.link-button{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:8px 13px;border-radius:10px;font-weight:850;text-decoration:none}.primary,.actions button{border:1px solid var(--blue);background:linear-gradient(180deg,var(--blue2),var(--blue));color:#fff;box-shadow:0 6px 16px rgba(23,74,112,.20)}.primary:hover,.actions button:hover{background:linear-gradient(180deg,#2a76ab,var(--blue2));border-color:var(--blue2);box-shadow:0 8px 20px rgba(23,74,112,.24)}.secondary{border:1px solid var(--line-strong)!important;background:#f4f7f9!important;color:var(--navy)!important}.secondary:hover{background:#e9f0f4!important;border-color:#b7c7d2!important}.danger{border:1px solid var(--bad);background:var(--bad);color:#fff}.success{border:1px solid var(--good)!important;background:var(--good)!important;color:#fff!important}.warning{border:1px solid #a56c08!important;background:#a56c08!important;color:#fff!important}
.list{display:grid;gap:7px}.row{padding:11px 12px;border:1px solid var(--line);border-radius:var(--radius-sm);background:#fcfdfe}.row:hover{border-color:#ccd9e1;background:#fff}.row-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.row strong{color:var(--navy)}.row small{display:block;margin-top:4px;color:var(--muted);line-height:1.4}.row-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:8px}.row-actions button{min-height:44px;padding:6px 9px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:#fff;color:var(--navy);font-size:.76rem;font-weight:820}.row-actions button:hover{background:#f2f6f9;border-color:#adbfcb}.pill{display:inline-flex;align-items:center;min-height:24px;padding:3px 8px;border:1px solid #d7e3eb;border-radius:999px;background:#edf3f7;color:#29465e;font-size:.68rem;font-weight:850;white-space:nowrap}.pill.pending{background:#fff3ce;border-color:#f0dfaa;color:var(--warn)}.pill.good{background:#e4f4e9;border-color:#cce8d5;color:var(--good)}.pill.bad{background:#fdeaea;border-color:#f5d3d3;color:var(--bad)}
.quick-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:8px}.quick-grid button{min-height:66px;border:1px solid #dce5eb;border-radius:var(--radius-sm);background:#fff;color:var(--navy);font-weight:850;box-shadow:var(--shadow-soft)}border-color:#b9cbd7;background:#fbfdfe;box-shadow:var(--shadow)}.thread-layout{display:grid;grid-template-columns:minmax(220px,.38fr) minmax(0,.62fr);gap:12px}.thread-list{max-height:620px;overflow:auto}.message-list{display:flex;flex-direction:column;gap:8px;max-height:470px;overflow:auto;padding:6px}.message{max-width:82%;padding:10px 12px;border-radius:var(--radius);background:#eaf1f6}.message.mine{align-self:flex-end;background:#dceefa}.message small{display:block;margin-top:5px;color:var(--muted)}.tabs{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px;padding-bottom:1px}.tabs button{white-space:nowrap;border:1px solid var(--line-strong);border-radius:var(--radius-sm);padding:7px 11px;background:#fff;color:var(--navy);font-weight:820;min-height:44px;flex:1 1 auto}.tabs button:hover{background:#f4f7f9}.tabs button.active{background:var(--blue);border-color:var(--blue);color:#fff}.quote-line{display:grid;grid-template-columns:minmax(0,2fr) .7fr .7fr .8fr auto;gap:7px;align-items:end}.quote-line>button{min-height:44px}.calendar-list .row{border-left:4px solid var(--blue)}.provider{display:flex;align-items:center;justify-content:space-between;gap:10px}.social-preview{white-space:pre-wrap;padding:13px;border-radius:var(--radius-sm);background:#f8fafc;border:1px solid var(--line)}.ai-chat{display:flex;flex-direction:column;gap:8px;min-height:260px;max-height:480px;overflow:auto}.ai-bubble,.message{padding:11px 13px;border-radius:var(--radius);background:#eef5fa}.ai-bubble.user{margin-left:12%;background:#e8f0f6}.ai-bubble.assistant{margin-right:8%;background:#fff;border:1px solid var(--line)}.recommendation{border-left:4px solid var(--orange)}.toast{position:fixed;right:16px;bottom:18px;z-index:100;max-width:430px;padding:11px 13px;border-radius:var(--radius-sm);background:var(--navy);color:#fff;box-shadow:0 12px 30px rgba(0,0,0,.22);pointer-events:none}.toast.bad{background:var(--bad)}.hidden{display:none!important}.bridge-frame{position:fixed;width:1px;height:1px;left:-9999px;border:0}dialog{max-width:650px;width:calc(100% - 28px);border:1px solid rgba(11,36,56,.08);border-radius:16px;padding:19px;background:#fff;box-shadow:0 22px 60px rgba(0,0,0,.30)}dialog::backdrop{background:rgba(4,18,30,.52);backdrop-filter:blur(2px)}.welcome{max-width:760px;margin:70px auto;text-align:center}.welcome::after{content:"";display:block;width:184px;height:4px;margin:26px auto 0;border-radius:999px;background:linear-gradient(90deg,rgba(23,74,112,.10) 0%,rgba(23,74,112,.10) 35%,var(--blue2) 50%,rgba(23,74,112,.10) 65%,rgba(23,74,112,.10) 100%);background-size:220% 100%;animation:h38SplashBar 1.5s ease-in-out infinite}@keyframes h38SplashBar{0%{background-position:120% 0}100%{background-position:-120% 0}}.voice-listening{animation:pulse 1.1s infinite}@keyframes pulse{50%{transform:scale(1.06);background:var(--orange)}}
body .h38-profit-card{border-color:var(--line);background:linear-gradient(180deg,#fff,#f9fbfc);box-shadow:var(--shadow)}body .h38-profit-kicker{font-size:.67rem;font-weight:900;letter-spacing:.09em;color:var(--blue);opacity:.85}body .h38-profit-grid{gap:8px;margin:10px 0}body .h38-profit-metric{padding:10px 11px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--card-soft)}body .h38-profit-metric strong{font-size:1rem;line-height:1.15;font-variant-numeric:tabular-nums}body .h38-profit-metric small{font-size:.72rem;color:var(--muted);opacity:1}body .h38-profit-note{font-size:.8rem;color:var(--muted);opacity:1;line-height:1.42}body .h38-profit-alert{padding:9px 10px;border:1px solid #f0e0af;border-radius:10px;background:#fff5d8;margin:8px 0}body .h38-profit-alert.h38-profit-ok{border-color:#d1ead9;background:#e8f6ec}body .h38-profit-controls{gap:8px;margin-top:9px}body .h38-profit-controls label{font-size:.75rem}body .h38-health-grid{gap:8px}body .h38-health-card{padding:10px 11px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--card-soft)}body .h38-health-score{font-size:1.18rem;line-height:1.15}body .h38-profit-list{gap:7px}body .h38-profit-row{padding:10px 11px;border:1px solid var(--line);border-radius:var(--radius-sm);background:#fcfdfe}body .h38-plan-grid{gap:8px}body .h38-plan-step{padding:10px 11px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--card-soft)}body .h38-plan-step h3{margin:5px 0 4px;font-size:1rem}body .h38-profit-mini{margin:10px 0;padding:10px 11px;border:1px solid #dbe6ec;border-radius:var(--radius-sm);background:#f4f8fa}
@media(max-width:1050px){.span3,.span4{grid-column:span 6}.span5,.span6,.span7,.span8,.span9{grid-column:span 12}.stats{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.topbar{padding:7px 8px}.brand{flex:1 1 auto;overflow:hidden}.brand>div{overflow:hidden}.brand strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.top-actions{flex:0 0 auto}.brand small{display:none}.badge{display:none}.business-bar{top:56px;padding:6px 9px;display:grid;grid-template-columns:1fr auto}.business-bar span{grid-column:1/-1;margin:0}.app-shell{display:block}.main-nav{position:fixed;left:0;right:0;bottom:0;top:auto;z-index:60;height:auto;display:flex;overflow-x:auto;padding:6px;background:#fff;border-top:1px solid var(--line);border-right:0;box-shadow:0 -5px 18px rgba(11,36,56,.10)}.main-nav button{flex:1 1 0;min-width:68px;display:grid;place-items:center;gap:1px;min-height:54px;margin:0;padding:8px 4px;font-size:.65rem;line-height:1.08;text-align:center;white-space:normal}.nav-icon{font-size:1.1rem}.main-nav button.active{background:#e8f0f6;border-color:#d9e5ed;color:var(--navy);box-shadow:none}main{padding:13px 10px 92px}.page-head{display:block;margin-bottom:11px}.page-head h1{font-size:1.4rem}.page-head p{font-size:.84rem}.page-tools{margin-top:8px;justify-content:flex-start}.grid{gap:9px}.card{padding:12px;border-radius:var(--radius);box-shadow:var(--shadow-soft)}.span3,.span4,.span5,.span6,.span7,.span8,.span9{grid-column:span 12}.two,.three,.four,.quote-line{grid-template-columns:1fr}.thread-layout{grid-template-columns:1fr}.thread-list{max-height:220px}.actions>*{flex:1 1 100%}.row-top{align-items:flex-start}.toast{left:10px;right:10px;bottom:78px;pointer-events:none}.stats{grid-template-columns:1fr 1fr}body .h38-profit-grid,body .h38-health-grid,body .h38-plan-grid,body .h38-profit-controls{grid-template-columns:1fr 1fr;gap:7px}body .h38-profit-card{box-shadow:var(--shadow-soft)}body .h38-profit-metric,body .h38-health-card,body .h38-plan-step{padding:9px 10px}}
@media(max-width:480px){body .h38-profit-grid,body .h38-health-grid,body .h38-plan-grid,body .h38-profit-controls{grid-template-columns:1fr}}
@media(max-width:420px){.brand strong{font-size:.82rem}.brand-logo{width:36px;height:36px;flex-basis:36px}.top-actions{gap:4px}.icon-button{width:44px;height:44px}.ai-launcher{min-height:36px;padding-left:8px;padding-right:8px}.main-nav button{min-width:64px;font-size:.62rem}.stats{grid-template-columns:1fr 1fr}.stat{padding:10px}.stat strong{font-size:1.3rem}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation-duration:.01ms!important;animation-iteration-count:1!important}.quick-grid button:hover{transform:none}}
/* v2.0 polish: tabular numbers for money/quantities (prevents layout shift) */
.money,.quote-total,#quoteTotal,.stat strong,.h38-ready-metrics strong{font-variant-numeric:tabular-nums}
/* v2.0 polish: required field indicator */
label:has(+ input[required])::after,label:has(+ select[required])::after,label:has(+ textarea[required])::after{content:" *";color:var(--bad);font-weight:800}

/* v2.0 polish: loading skeleton shimmer */
.skeleton{position:relative;overflow:hidden;background:#e8eef3;border-radius:var(--radius-sm);min-height:20px}
.skeleton::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent,rgba(255,255,255,.6),transparent);animation:shimmer 1.4s infinite}
@keyframes shimmer{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}
.skeleton-row{display:grid;gap:8px;padding:12px}
.skeleton-row .skeleton{height:16px}
.skeleton-row .skeleton:first-child{width:60%;height:20px}

/* === V2.0 VISUAL POLISH SWEEP (2026-10-05) === */
/* Fixes from audit: ~/workspace/goals/training-video-remake/hidden_files/visual-polish-issues.md */

/* Fix 14: Snap a receipt - button aligns with dropdown, not centered on label */
.h38-life-receipt-capture button{align-self:end}

/* Fix 15: Stat card consistency - ensure .h38-field3-metric matches .stat visual pattern */
/* Both now use number-on-top via DOM order (no CSS order hack needed for new code) */

/* Fix 16: Online badge - add padding so it doesn't jam against card edge */
.h38-field3-card > div:first-child{padding-right:8px}

/* Fix 23: Module Visibility - prevent label/toggle overlap */
.owner-controls-module-row .row-top strong{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.owner-controls-module-row .row-top{gap:12px;align-items:center}

/* Fix 18: Advanced upload button - style native button to match design system */
.h38-advanced-upload-btn,.h38-upload-advanced button[type="button"]{min-height:44px;padding:10px 18px;border:1px solid var(--line-strong);border-radius:999px;background:var(--navy);color:#fff;font-size:.85rem;font-weight:700;cursor:pointer}
.h38-advanced-upload-btn:hover,.h38-upload-advanced button[type="button"]:hover{background:#1a3a52}

/* Fix 21: File input buttons - style to match design system */
.h38-styled-file-input{position:relative;display:inline-block;min-height:44px}
.h38-styled-file-input input[type="file"]{position:absolute;opacity:0;width:100%;height:100%;cursor:pointer}
.h38-styled-file-input .file-input-label{display:inline-flex;align-items:center;min-height:44px;padding:10px 18px;border:1px solid var(--line-strong);border-radius:8px;background:#fff;color:var(--navy);font-size:.85rem;font-weight:600;cursor:pointer}
/* Fallback: style native file input button where supported */
input[type="file"]::file-selector-button{min-height:36px;padding:8px 14px;border:1px solid var(--line-strong);border-radius:8px;background:#f2f6f9;color:var(--navy);font-size:.82rem;font-weight:600;cursor:pointer;margin-right:10px}
input[type="file"]::file-selector-button:hover{background:#e8eef3}

/* Fix 17, 19: Card width consistency - ensure grid spans don't cause ragged edges */
.customer-360-details-card{grid-column:span 12}
.h38-release-center-card{grid-column:span 12}

/* General: Prevent flex item overflow in row-top layouts */
.row-top > strong{flex:1;min-width:0}
.row-top .switch{flex-shrink:0;margin-left:auto}

/* === H38 VOICE COMMANDS (v2.0) === */
/* Hands-free field actions: big mic, listening state, confirmation */
.h38-voice-bar{display:flex;gap:12px;align-items:center;padding:4px 0}
.h38-voice-mic{flex:0 0 auto;width:64px;height:64px;border-radius:50%;border:0;background:var(--navy);color:#fff;font-size:.8rem;font-weight:800;cursor:pointer;box-shadow:0 6px 18px rgba(11,36,56,.25)}
.h38-voice-mic:hover{background:#1a3a52}
.h38-voice-mic.h38-voice-listening{background:#c0392b;animation:pulse 1.1s infinite}
.h38-voice-main{flex:1;min-width:0}
.h38-voice-status{font-weight:700;font-size:.92rem}
.h38-voice-transcript{font-size:.85rem;color:var(--muted,#5b6b7a);margin-top:2px;min-height:1.2em}
.h38-voice-transcript.h38-voice-final{color:var(--navy);font-weight:600}
.h38-voice-type-row{display:flex;gap:8px;margin-top:10px}
.h38-voice-type-row input{flex:1;min-width:0;min-height:44px;padding:10px 12px;border:1px solid var(--line-strong);border-radius:8px;font-size:.9rem}
.h38-voice-confirm{margin-top:10px}
.h38-voice-confirm-card{border:1px solid var(--line-strong);border-radius:12px;padding:12px;background:#f7fafc}
.h38-voice-confirm-action{font-size:1.05rem;font-weight:800;margin:6px 0 10px}
.h38-voice-hint{margin-top:10px;margin-bottom:0}
.h38-driving-voice{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:8px}
@media(max-width:760px){
  .h38-voice-mic{width:72px;height:72px;font-size:.85rem}
  .h38-voice-type-row{flex-direction:column}
  .h38-voice-type-row button{min-height:44px}
}

/* Offline mode: conflict resolution + readiness panel */
.h38-offline-panel .h38-conflict-diffs{margin-top:8px;display:grid;gap:6px}
.h38-offline-panel .h38-conflict-diffs .row{border:1px solid var(--line-strong);border-radius:8px;padding:8px 10px;background:#fff}
.h38-offline-panel .h38-conflict-diffs .row small{display:block;margin-top:4px;color:var(--muted,#5b6b7a)}
.h38-conflict-merge{margin-top:8px;display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.h38-conflict-merge small{width:100%}

/* === V2.0 VERIFICATION FIXES (2026-10-05) === */
/* Daily Digest: own grid above the main Today grid so platform layers that
   prepend into .grid can never bury it, and the phone-first layer (which
   hides .grid) leaves it visible on mobile. */
.h38-digest-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:12px;margin-bottom:12px}
.h38-digest-grid:empty{display:none}
/* Mobile header: keep the sync/queue status visible — a field worker on a
   phone must see offline/unsynced state. (#networkBadge/#gatewayBadge stay
   hidden on mobile per the deliberate office-polish space decision; the
   sync badge already reports "Offline — saved locally".) */
@media(max-width:760px){
  #syncBadge{display:inline-flex!important;font-size:.68rem;min-height:26px;padding:2px 8px;max-width:46vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}

/* Visual sweep 2026-10-07: tablet header must not crush icon targets or clip Ask Kit. */
@media(min-width:761px) and (max-width:1100px){
  .topbar{gap:8px;padding-left:10px;padding-right:10px}
  .topbar .brand{flex:1 1 auto;min-width:0}
  .topbar .brand strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;max-width:250px;overflow:hidden;white-space:normal;line-height:1.12}
  .topbar .brand small{max-width:250px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .topbar .top-actions{flex:0 0 auto;justify-content:flex-end;min-width:0}
  .topbar .top-actions>*{flex-shrink:0}
  .topbar .top-actions .icon-button{flex:0 0 44px!important;width:44px!important;min-width:44px!important}
  .topbar .top-actions .badge{max-width:92px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .topbar #h38InstallOfficeButton{padding-left:9px;padding-right:9px;white-space:nowrap}
  .topbar #askKitButton{flex:0 0 auto;white-space:nowrap}
}
@media(min-width:761px) and (max-width:880px){
  .topbar .top-actions .badge{display:none}
}
/* Polish pass 2 (2026-10-12): at tablet widths the header actions overflowed
   their flex box and painted over the brand name. Keep the sync badge (the
   deliberate visibility decision) and drop the two status badges that the
   business bar below already repeats; drop Install in the tightest sub-band. */
@media(min-width:881px) and (max-width:1100px){
  .topbar .top-actions #networkBadge,.topbar .top-actions #gatewayBadge{display:none}
}
@media(min-width:761px) and (max-width:900px){
  .topbar #h38InstallOfficeButton{display:none}
}

/* Settings App views: actions get full-size tap targets (Visual Sweep Run 2, finding B). */
.app-view-open{display:inline-flex;align-items:center;min-height:44px;padding:8px 14px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:#fff;color:var(--navy);font-weight:820;font-size:.82rem;text-decoration:none;white-space:nowrap;flex:0 0 auto}
.app-view-open:hover{background:#f2f6f9;border-color:#adbfcb}

/* Polish pass 3 (2026-10-12): phone tap targets. Passes 1-2 raised the header,
   bottom nav and primary actions to 44px, but module content still rendered
   many controls just under: job status select 43px, schedule save 40px,
   creation actions 40px, hero actions 42px, install links 42px. On phones
   only (<=760px, the same breakpoint the rest of this sheet uses) give every
   button/select in the workspace a 44px minimum height. Tablet and desktop
   are untouched. Two sibling fixes live at their canonical owners:
   row-actions/tabs buttons (capped 42px !important) in
   mobile-runtime-stability.js, and the business switcher's 12.8px font
   (focus-zoom risk) in office-account-identity.js. */
@media(max-width:760px){
  body.h38-auth-authorized #mainContent button,
  body.h38-auth-authorized #mainContent select{min-height:44px}
  body.h38-auth-authorized .h38-install-platform-link{min-height:44px}
}

/* Brand-moment splash — Rick-approved 2026-10-13 (option mock, pop-pass evidence).
   Applies only to loading-state .welcome screens (welcome--brand). Dismissal is
   unchanged: the boot flow replaces #mainContent when records are ready, so the
   splash never adds dwell time. The progress bar reuses the .welcome::after
   sweep (h38SplashBar) with the mock's orange-on-navy treatment; the global
   prefers-reduced-motion rule in this file neutralizes the animation. */
.welcome--brand{position:fixed;inset:0;z-index:90;max-width:none;margin:0;padding:32px 20px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;text-align:center;color:#fff;background:radial-gradient(120% 90% at 50% 0%,#1d5a86 0%,#174a70 42%,#0b2438 78%)}
.welcome--brand .welcome-brand-logo{width:118px;height:118px;border-radius:26px;box-shadow:0 24px 48px rgba(0,0,0,.38),inset 0 1px 0 rgba(255,255,255,.25)}
.welcome--brand h1{font-size:2rem;line-height:1.15;letter-spacing:-.02em;font-weight:850;color:#fff}
.welcome--brand .welcome-brand-tagline{color:rgba(255,255,255,.78);font-size:1.02rem;font-weight:550}
.welcome--brand .welcome-brand-tagline strong{color:#f2a65a;font-weight:800}
.welcome--brand .welcome-brand-status{color:rgba(255,255,255,.88);font-size:.98rem}
.welcome--brand .notice{padding:0;border:0;background:transparent;box-shadow:none;color:rgba(255,255,255,.55);font-size:.8rem;line-height:1.5;max-width:420px}
.welcome--brand::after{width:210px;height:5px;margin:0 auto;background-image:linear-gradient(90deg,rgba(255,255,255,.16) 0%,rgba(255,255,255,.16) 35%,#f2a65a 50%,rgba(255,255,255,.16) 65%,rgba(255,255,255,.16) 100%);background-size:220% 100%}
.welcome--brand .welcome-actions{width:min(420px,100%);margin-top:2px}
.welcome--brand .welcome-actions .primary{background:linear-gradient(135deg,#f2a65a,#d86d2b);border-color:transparent;color:#231303}
.welcome--brand .welcome-actions .secondary{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.45);color:#fff}
/* Card-top band — treatment B (Rick-approved 2026-10-13 from the pop-pass card-top
   mock, paired with the deeper canvas tint in --bg above). Shared header band for
   .card: white icon chip + title + optional status pill on a tinted strip.
   Structure is added by office-polish.js (polishCardBands) inside the shared
   polish layer; this layer owns the base look, office-polish.css refines it for
   the authorized app. Static styling only — no animation, no extra requests. */
.card-band{display:flex;align-items:center;gap:10px;margin:-15px -15px 12px;padding:10px 14px;background:#edf4f9;border-bottom:1px solid var(--line);border-radius:calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0}
.card-band .card-chip{flex:0 0 34px;width:34px;height:34px;display:flex;align-items:center;justify-content:center;border-radius:10px;background:#fff;box-shadow:0 1px 3px rgba(11,36,56,.12);font-size:1.02rem;line-height:1}
.card-band .card-band-title{flex:1;min-width:0}
.card-band .card-band-kicker{display:block;font-size:.68rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;opacity:.62;margin:0 0 1px;line-height:1.25}
.card-band h2,.card-band h3{margin:0;font-size:1.02rem;line-height:1.25}
.card-band .pill{flex:0 0 auto}
.pill.info{background:#e3effc;border-color:#c9def5;color:#0f5cb8}
.h38-flow-view .card-band{margin:calc(var(--h38-pad-card,20px) * -1) calc(var(--h38-pad-card,20px) * -1) 12px;border-radius:calc(var(--h38-r-lg,18px) - 1px) calc(var(--h38-r-lg,18px) - 1px) 0 0}
@media(max-width:760px){.card-band{margin:-12px -12px 10px;padding:9px 12px}.card-band .card-chip{flex-basis:30px;width:30px;height:30px;font-size:.94rem}.card-band h2,.card-band h3{font-size:.98rem}.h38-flow-view .card-band{margin:calc(var(--h38-pad-card,20px) * -1) calc(var(--h38-pad-card,20px) * -1) 10px}}

/* === WS4 screen header + wide bands (2026-10-20) — spec-ws4-redesign §3.3/§6 ===
   One header look app-wide. Classes only; no new stylesheet, no gradient hero. */
.h38-screen-head{display:grid;gap:8px;margin:0 0 15px}
.h38-screen-head__titlerow{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.h38-screen-head h1{margin:0;color:var(--navy);font-size:clamp(1.5rem,2.5vw,2rem);line-height:1.08;letter-spacing:-.02em}
.h38-screen-head__purpose{margin:0;color:var(--muted);font-size:.95rem;line-height:1.45;max-width:760px}
.h38-screen-head__actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.h38-screen-head__actions .primary{min-height:44px}
.h38-screen-head__more summary{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 13px;border:1px solid var(--line-strong);border-radius:10px;background:#f4f7f9;color:var(--navy);font-weight:850;cursor:pointer;list-style:none}
.h38-screen-head__more summary::-webkit-details-marker{display:none}
.h38-screen-head__more-menu{display:grid;gap:8px;margin-top:8px;justify-items:start}
.h38-screen-head__more-menu button{min-height:44px}
.h38-addon-grid{display:grid;grid-template-columns:1fr;gap:12px}
.row.h38-unassigned-row{border-style:dashed;border-color:#d9a441;background:#fffaf0}
.h38-schedule-form-details>summary{min-height:44px;display:flex;align-items:center;font-weight:850;color:var(--navy);cursor:pointer}
@media(min-width:1200px){
.app-shell{grid-template-columns:230px minmax(0,1fr)}
main{padding:24px clamp(22px,3vw,48px) 96px}
.h38-wide-rail{position:sticky;top:120px;align-self:start}
.h38-wide-board{grid-column:1/-1}
.h38-wide-split>:first-child{max-height:calc(100vh - 220px);overflow:auto}
.thread-layout{grid-template-columns:360px minmax(0,1fr)}
.h38-addon-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
.h38-screen-head__actions .primary{width:100%;min-height:48px}
.h38-screen-head__actions .secondary{flex:1 1 auto}
.h38-screen-head__more{width:100%}
.h38-screen-head__more summary{width:100%}
.h38-screen-head__more-menu button{width:100%}
}
@media(min-width:761px){
.h38-pricebook-details>summary{display:none}
}
