:root{--ink:#242428;--muted:#626267;--accent:#c71925;--pale:#fff1f2;--line:#e1e1e4;--ground:#f5f5f6;--amber:#8a5310;--red:#ad3838;font-family:'Segoe UI',Tahoma,sans-serif;color:var(--ink);font-size:14px;font-variant-numeric:tabular-nums}*{box-sizing:border-box}body{margin:0;background:var(--ground)}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}a{color:var(--accent);text-underline-offset:3px}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #176eac;outline-offset:3px}::selection{background:#ffd0d4;color:#67131b}input,textarea{caret-color:var(--accent)}svg.icon{height:18px;width:18px;stroke:currentColor;stroke-width:1.7;fill:none;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle;flex-shrink:0}
.shell{display:flex;min-height:100vh}.sidebar{width:218px;flex-shrink:0;background:#242426;color:#eef7f4;padding:29px 16px 20px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.brand{color:#fff;display:flex;gap:10px;align-items:center;text-decoration:none;padding:0 10px;font-size:25px;font-weight:700;line-height:1}.brand svg{width:37px;height:37px;color:#fff}.brand-sub{display:block;font-weight:400;font-size:12px;letter-spacing:.4px;margin-top:7px}.workspace-name{margin:29px 12px 17px;color:#d5d5d8;font-size:12px}.nav{border:0;background:transparent;color:#eeeeef;display:flex;align-items:center;text-align:left;width:100%;gap:11px;padding:12px;border-radius:6px;margin:3px 0;font-weight:500}.nav.active{background:#493033;color:#fff}.nav:hover{background:#393033}.nav span{display:flex}.sidebar-caption{font-size:10px;letter-spacing:1.1px;color:#c4c4c9;margin:35px 12px 12px}.recent{display:block;border:0;background:transparent;color:#ebebed;text-align:left;width:100%;padding:10px 12px;border-radius:5px;font-size:12px}.recent.selected{background:#3e2c2f}.recent strong{display:block;font-weight:600;margin-bottom:4px}.recent small{display:block;color:#d4d4d7;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.recent:hover{background:#493033}.sidebar-bottom{display:flex;align-items:center;gap:10px;margin-top:auto;padding:25px 8px 0;font-size:12px}.sidebar-bottom small{display:block;color:#d5d5d8;font-size:10px;margin-top:4px}.avatar{display:grid;place-items:center;border:1px solid #77777d;border-radius:50%;width:31px;height:31px;font-size:11px}.workspace{min-width:0;flex:1}.topbar{height:67px;border-bottom:1px solid var(--line);background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 32px}.crumb{font-size:12px;color:var(--muted)}.crumb strong{color:var(--ink);font-weight:600}.crumb span{margin:0 11px;color:#84848b}.top-right{display:flex;align-items:center;gap:15px;font-size:11px;color:var(--muted)}.mock-label{display:flex;gap:6px;align-items:center;color:#515158}.dot{height:6px;width:6px;border-radius:50%;background:#c71925}.top-divider{height:15px;border-right:1px solid var(--line)}main{padding:27px 32px 40px;min-height:calc(100vh - 110px)}h1{font-size:27px;font-weight:650;letter-spacing:-.7px;line-height:1.25;margin:0}h2{font-size:18px;font-weight:600;letter-spacing:-.2px;margin:0 0 6px}h3{font-size:14px;margin:0;font-weight:650}p{line-height:1.55}.sub{color:var(--muted);font-size:12px;margin:7px 0 0;max-width:74ch}.heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:23px}.actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid #d4d4d9;background:white;color:var(--ink);border-radius:5px;min-height:36px;padding:8px 13px;font-size:12px;font-weight:600;text-decoration:none}.btn:hover{background:#f7f2f3;border-color:#bfbfc5}.btn.primary{background:var(--accent);color:white;border-color:var(--accent)}.btn.primary:hover{background:#a5101b}.btn.ghost{background:transparent;border-color:transparent;color:var(--accent);padding-left:0}.btn.small{min-height:29px;padding:5px 9px;font-size:11px}.btn.danger{color:var(--red)}.toolbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;gap:12px}.search{position:relative;max-width:370px;flex:1}.search svg{position:absolute;top:10px;left:11px;color:#73737a}.search input{padding-left:36px;background:#fff}.panel{border:1px solid var(--line);border-radius:7px;background:#fff;overflow:hidden}.panel-header{padding:19px 21px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:15px}.panel-body{padding:21px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:12px}th{background:#f8f8fa;color:#626269;font-weight:600;font-size:11px;padding:12px 14px;border-bottom:1px solid var(--line);white-space:nowrap}td{padding:15px 14px;border-bottom:1px solid #ececef;vertical-align:middle}tr:last-child td{border-bottom:0}.click-row{cursor:pointer}.click-row:hover{background:#fff7f7}.cell-title{font-weight:600;color:#303035}.cell-sub{font-size:11px;color:var(--muted);display:block;margin-top:4px}.tag{font-size:10px;padding:4px 8px;border-radius:4px;display:inline-block;white-space:nowrap;background:#f0f0f2;color:#5b5b62;font-weight:600}.tag.green{background:#ededf0;color:#38383f}.tag.amber{background:#fff4df;color:var(--amber)}.tag.blue{background:#eaf1f8;color:#355e86}.tag.red{background:#fbeaea;color:var(--red)}.muted{color:var(--muted)}.tiny{font-size:11px}.notice{border:1px solid #ead5ad;background:#fff9ed;border-radius:5px;color:#76501f;padding:12px 15px;font-size:12px;line-height:1.6;margin-bottom:17px;display:flex;align-items:flex-start;gap:9px}.notice.neutral{background:#f5f5f7;border-color:#e0e0e5;color:#57575f}.notice svg{margin-top:1px}.notice p{margin:0}.notice button{margin-left:auto;flex-shrink:0}.job-title{display:flex;align-items:center;gap:12px}.part-title{font-size:16px;font-weight:400;color:#626269;margin-left:8px}.meta-strip{display:grid;grid-template-columns:1.5fr 1.3fr .9fr 1fr 1fr;gap:24px;background:#fff;border:1px solid var(--line);border-radius:7px;padding:19px 22px;margin-bottom:23px}.meta-strip label{font-size:10px;color:var(--muted);display:block;margin-bottom:7px}.meta-strip .value{font-size:13px;font-weight:600}.meta-strip input{min-height:30px;width:100%;max-width:130px}.tabs{display:flex;gap:23px;border-bottom:1px solid #dedee3;overflow:auto;margin-bottom:24px;white-space:nowrap}.tab{border:0;border-bottom:2px solid transparent;background:none;padding:0 1px 13px;font-size:12px;color:#626269;flex-shrink:0}.tab:hover{color:var(--accent)}.tab.active{color:var(--accent);font-weight:650;border-color:var(--accent)}.two-col{display:grid;grid-template-columns:minmax(0,1fr) 275px;gap:22px;align-items:start}.section{margin-top:24px}.section:first-child{margin-top:0}.section-title{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:13px}.field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px 20px}.field{display:flex;flex-direction:column;gap:6px;font-size:11px;font-weight:600;color:#626269}.field input,.field select,.field textarea{font-weight:400}.field.full{grid-column:1/-1}input,select,textarea{width:100%;min-height:35px;padding:7px 10px;border:1px solid #d4d4d9;border-radius:4px;color:var(--ink);background:white;font-size:12px}input::placeholder,textarea::placeholder{color:#73737a}textarea{resize:vertical;min-height:80px;line-height:1.6}input[readonly]{background:#f7f7f9}td input,td select{min-width:72px;min-height:31px;padding:5px 7px}td .wide{min-width:155px}td .short{width:75px;min-width:65px}input[type=checkbox]{width:15px;min-height:15px;accent-color:var(--accent)}.table-edit td{padding:9px 11px}.table-edit th{padding:11px}.table-edit .num{min-width:78px}.summary-row{display:flex;justify-content:space-between;gap:15px;padding:12px 0;border-bottom:1px solid #e9e9ed;font-size:12px}.summary-row:last-child{border:0}.summary-row.total{font-weight:650}.check-row{display:flex;align-items:flex-start;gap:10px;font-size:12px;line-height:1.6;padding:10px 0}.check-row svg{width:16px;height:16px;flex-shrink:0;margin-top:2px;color:#8d5c17}.check-row.good svg{color:var(--accent)}.check-row small{color:var(--muted);display:block;font-size:11px}.check-label{display:flex;gap:8px;align-items:center;font-size:12px;margin:12px 0}.aside-note{font-size:11px;color:var(--muted);line-height:1.7;max-width:65ch}.rule{border:0;border-top:1px solid var(--line);margin:19px 0}.small-note{padding:12px 20px;background:#fbfbfc;border-top:1px solid var(--line);font-size:11px;color:var(--muted);line-height:1.65}.empty{padding:36px 24px;text-align:center;color:var(--muted)}.empty h3{color:var(--ink);margin-bottom:8px}.empty p{font-size:12px;margin:0 auto 18px;max-width:55ch}.standard-note{font-size:11px;color:#66666e;display:flex;gap:7px;align-items:center;margin-top:15px}.app-footer{display:flex;justify-content:space-between;gap:15px;padding:14px 32px;font-size:10px;color:var(--muted);border-top:1px solid var(--line)}dialog{width:min(660px,calc(100vw - 32px));border:1px solid #cbd9d1;border-radius:9px;padding:0;box-shadow:0 16px 65px #00000029;color:var(--ink)}dialog::backdrop{background:#17171c55}.dialog-header{padding:23px 25px 18px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line)}.dialog-content{padding:23px 25px}.dialog-footer{padding:17px 25px;display:flex;justify-content:flex-end;gap:10px;border-top:1px solid var(--line);background:#fafafb}.icon-btn{border:0;background:transparent;padding:5px;color:var(--muted);display:inline-flex;border-radius:4px}.icon-btn:hover{background:#f4f4f6}.choice{display:flex;gap:8px;margin-bottom:20px}.choice button{flex:1}.choice .chosen{border-color:var(--accent);background:var(--pale);color:var(--accent)}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#29292e;color:white;padding:12px 20px;border-radius:6px;box-shadow:0 7px 22px #00000024;font-size:12px;opacity:0;pointer-events:none;transition:opacity .16s ease-out;z-index:10;max-width:90vw}#toast.visible{opacity:1}.preview-page{max-width:850px;margin:0 auto 26px;background:#fff;border:1px solid var(--line);padding:45px 48px;min-height:700px}.print-heading{display:flex;justify-content:space-between;border-bottom:2px solid var(--accent);padding-bottom:18px;margin-bottom:22px}.print-heading strong{font-size:21px}.print-meta{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;font-size:12px;margin-bottom:25px}.print-meta small{display:block;color:var(--muted);margin-bottom:5px}.print-section{margin-top:28px}.signatures{display:flex;justify-content:space-between;gap:30px;margin-top:50px;font-size:11px}.signatures span{flex:1;border-top:1px solid #aaaab2;padding-top:7px}.history-total{display:flex;flex-wrap:wrap;gap:35px;margin:0 0 23px}.history-total span{font-size:12px;color:var(--muted)}.history-total strong{color:var(--ink);margin-left:8px;font-size:15px}.metric-list{display:grid;grid-template-columns:repeat(3,1fr);gap:0;border-top:1px solid var(--line);margin-top:20px}.metric-list>div{padding:16px 0;font-size:12px}.metric-list strong{display:block;font-size:20px;margin-top:7px}.customer-list{display:grid;grid-template-columns:220px minmax(0,1fr);gap:22px}.customer-item{display:flex;justify-content:space-between;text-align:left;border:0;border-bottom:1px solid var(--line);background:white;padding:17px;width:100%;font-size:12px}.customer-item.active{background:var(--pale);font-weight:600;color:var(--accent)}.customer-item:hover{background:#f7f2f3}.error{color:var(--red);font-size:12px;margin:10px 0;line-height:1.6}.closeout-success{padding:23px;background:var(--pale);border:1px solid #e4c7ca;border-radius:7px;margin-bottom:22px}.nowrap{white-space:nowrap}#print-root{display:none}.print-check{display:inline-block;width:12px;height:12px;border:1px solid #8a8a92;margin-right:5px;vertical-align:middle}
@media(min-width:1600px){main{max-width:1600px;margin:0 auto}}@media(max-width:1200px){.sidebar{width:190px;padding-left:10px;padding-right:10px}.two-col{grid-template-columns:minmax(0,1fr) 235px}main{padding:24px}.topbar{padding:0 24px}.tabs{gap:20px}.meta-strip{gap:15px}.part-title{display:block;margin-left:0;margin-top:5px;font-size:14px}.job-title{align-items:flex-start}.actions{gap:6px}.heading{align-items:flex-start}}@media(max-width:950px){.two-col{grid-template-columns:1fr}.two-col>aside{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.two-col>aside .section{margin:0}.sidebar{width:175px}.meta-strip{grid-template-columns:repeat(3,1fr);row-gap:16px}.top-right #save-state,.top-divider{display:none}.heading{flex-wrap:wrap}.customer-list{grid-template-columns:180px minmax(0,1fr)}}@media(max-width:700px){.shell{display:block}.sidebar{position:relative;top:0;width:100%;height:auto;padding:15px 16px;display:block}.brand{font-size:20px;padding:0}.brand svg{width:30px;height:30px}.brand-sub{display:inline;font-size:12px;margin-left:8px}.workspace-name,.sidebar-caption,#recent,.sidebar-bottom{display:none}.sidebar nav{display:flex;gap:4px;margin-top:15px;overflow:auto}.nav{width:auto;white-space:nowrap;font-size:11px;padding:9px 10px;gap:7px}.nav svg{width:16px;height:16px}.topbar{height:49px;padding:0 16px}.top-right{font-size:10px}.crumb{font-size:10px}main{padding:21px 16px 28px}h1{font-size:24px}.heading{gap:14px;margin-bottom:18px}.meta-strip{grid-template-columns:repeat(2,minmax(0,1fr));padding:15px}.tabs{gap:22px;margin-bottom:20px}.two-col>aside{grid-template-columns:1fr}.field-grid{gap:14px}.toolbar{flex-wrap:wrap}.search{max-width:none;min-width:180px}.panel-body{padding:17px}.panel-header{padding:16px}.app-footer{padding:12px 16px;display:block;line-height:1.7}.app-footer span{display:block}.customer-list{grid-template-columns:1fr}.customer-list>div:first-child{display:flex;overflow:auto}.customer-item{min-width:150px}.preview-page{padding:25px 20px;min-height:600px}.print-meta{grid-template-columns:repeat(2,1fr)}.metric-list{grid-template-columns:repeat(2,1fr)}.history-total{gap:14px}.dialog-content{padding:20px}.dialog-header{padding:20px}.dialog-footer{padding:15px 20px}.choice{flex-direction:column}}
.two-col>*,.field-grid>*,.customer-list>*,.panel{min-width:0}input,select,textarea{min-width:0}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}@media print{@page{size:letter;margin:.45in}.shell,dialog,#toast{display:none!important}#print-root{display:block}.preview-page{padding:0;border:0;margin:0;max-width:none;min-height:0;break-after:page}.preview-page:last-child{break-after:auto}.print-section,tr{break-inside:avoid}body{background:white;font-size:11px}th,td{padding:8px;font-size:10px}.print-heading{margin-top:10px}h2{font-size:16px}}
/* Functional text remains readable on compact and high-DPI screens. */
.sidebar-caption,.sidebar-bottom small,.meta-strip label,.tag,.app-footer,.top-right,.crumb{font-size:11px}
.sidebar-bottom small{color:#e1e1e5}
dialog{box-shadow:0 16px 65px #00000029}#toast{box-shadow:0 7px 22px #00000024}
@media(max-width:700px){.crumb,.top-right{font-size:11px}.brand-sub{font-size:12px}}

/* Shar-Craft logo palette: red, black and white. */
.brand{display:block;padding:0 4px}.brand .company-logo{display:block;width:172px;max-width:100%;height:auto;background:#fff;border-radius:3px;padding:6px}.workspace-name{margin-top:22px}.nav.active{box-shadow:inset 2px 0 #e51c23}.recent.selected{box-shadow:inset 2px 0 #e51c23}.tag.green{background:#ededf0;color:#38383f}.check-row.good svg{color:#3c3c44}
@media(max-width:700px){.brand .company-logo{width:140px;padding:5px}.workspace-name{display:none}}
/* Original QC form: landscape grid, dimension columns and handwriting rows. */
.packet-preview{overflow-x:auto}.qc-page{width:1056px;max-width:none;min-height:740px;padding:24px;color:#111;font-family:Arial,sans-serif}.qc-title{text-align:center;font-size:20px;font-weight:700;margin:0 0 20px}.qc-meta,.qc-grid{table-layout:fixed;width:100%;border-collapse:collapse}.qc-meta th,.qc-meta td{border:1px solid #444;text-align:center;padding:6px 3px;font-size:10px;overflow-wrap:anywhere}.qc-meta th{height:37px;background:#eee;color:#111}.qc-meta td{height:34px}.qc-people{display:flex;gap:80px;margin:17px 0;font-size:12px}.qc-people strong,.qc-signature strong{font-weight:400}.qc-first{display:flex;gap:38px;align-items:center;font-size:12px;margin-bottom:10px}.qc-box{display:inline-block;border:1px solid #222;width:13px;height:13px;text-align:center;line-height:12px;font-size:11px;vertical-align:middle}.qc-band{background:#dedee1;border:1px solid #444;text-align:center;font-weight:700;font-size:12px;padding:6px}.qc-grid th,.qc-grid td{border:1px solid #444;text-align:center;padding:3px;font-size:10px}.qc-grid th{height:48px;white-space:normal;background:#f3f3f3;color:#111}.qc-grid td{height:27px}.qc-grid tr:last-child td{border-bottom:1px solid #444}.qc-final{display:flex;gap:32px;margin-top:13px;font-size:12px}.qc-signature{display:flex;justify-content:space-between;font-size:12px;margin-top:18px}.qc-foot{font-size:9px;color:#555;margin-top:12px;text-align:right}
@page qc-landscape{size:letter landscape;margin:.25in}
@media print{.qc-page{page:qc-landscape;width:auto;max-width:none;min-height:0;padding:0}.qc-title{font-size:17px;margin-bottom:12px}.qc-meta th,.qc-meta td{font-size:8px;padding:4px 2px}.qc-meta th{height:30px}.qc-meta td{height:29px}.qc-grid th{height:43px;font-size:8px}.qc-grid td{height:24px;font-size:9px}.qc-people{margin:12px 0;font-size:10px}.qc-first,.qc-final,.qc-signature{font-size:10px}.qc-band{padding:4px;font-size:11px}.qc-signature{margin-top:14px}.qc-foot{margin-top:8px}.qc-grid,.qc-meta{break-inside:avoid}}
.qc-meta th{white-space:normal}.qc-meta tr:last-child td{border-bottom:1px solid #444}
.toolbar .search{min-width:220px;flex-basis:280px}#job-filter{width:190px;flex:0 0 190px}#job-scope{width:150px;flex:0 0 150px}
@media(max-width:700px){#job-filter,#job-scope{width:100%;flex:auto}.toolbar .search{flex-basis:auto;min-width:0}}
@media(max-width:950px){.topbar{height:auto;min-height:67px;flex-wrap:wrap;gap:8px;padding-top:12px;padding-bottom:12px}.top-right{flex-wrap:wrap;justify-content:flex-end;row-gap:6px}.top-right #save-state{display:block}}
@media(max-width:700px){.top-right{width:100%;justify-content:space-between}.top-right #save-state{max-width:100%;overflow-wrap:anywhere}}
@media print{.print-meta{gap:14px;margin-bottom:20px}.signatures{margin-top:26px}.print-section{margin-top:22px}}

.auth-screen .sidebar,.auth-screen .topbar,.auth-screen .app-footer{display:none}
.auth-screen .shell{display:block}.auth-screen .workspace{margin-left:0}.auth-screen #main{padding:48px 20px;min-height:100vh;display:grid;place-items:center}
.auth-card{width:min(100%,430px);background:#fff;border:1px solid #d9dce1;border-radius:12px;padding:36px;box-shadow:0 12px 40px #00000008}
.auth-logo{max-width:215px;max-height:80px;object-fit:contain;margin-bottom:28px}.auth-card h1{font-size:25px;margin-bottom:28px}
.auth-card label{display:grid;gap:8px;font-size:13px;font-weight:600;margin-bottom:18px}.auth-card input{min-height:44px;width:100%;border:1px solid #cbd0d7;border-radius:5px;padding:10px}
.auth-card .btn{width:100%;justify-content:center;margin-top:10px;min-height:42px}.auth-card #auth-message{font-size:13px;line-height:1.5;color:#a4161a;min-height:20px}

.companion-links{display:flex;gap:14px;flex-wrap:wrap;padding:0 22px 20px;font-size:12px}.companion-links a{color:#59636f;text-decoration:none}.companion-links a:hover{text-decoration:underline}
.back-to-sci{display:block;text-align:center;margin-top:24px;font-size:13px;color:#59636f}

/* Entry surfaces use a light paper tint; calculated outputs have no edit affordance. */
#main input:not([type=checkbox]):not([readonly]):not(:disabled),#main select:not(:disabled),#main textarea:not(:disabled){background:#fff9ef;border-color:#b8a98e;color:#20242a}
#main input:focus-visible,#main select:focus-visible,#main textarea:focus-visible{outline:2px solid #a51c30;outline-offset:2px}
#main input:invalid{border-color:#a51c30}
output{font-variant-numeric:tabular-nums;color:#242830}
.entry-legend{display:flex;gap:20px;flex-wrap:wrap;font-size:12px;color:#4b5260;margin:12px 0}
.input-key{background:#fff9ef;border:1px solid #b8a98e;border-radius:3px;padding:2px 7px}
.results-strip{border:1px solid #d6d9de;border-radius:6px;background:#fff;padding:14px 18px;margin:0 0 18px}
.results-strip h2{font-size:13px;margin:0 0 12px}.results-strip h2 small{font-weight:400;color:#5b616b;margin-left:8px}
.results-strip>div{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}.results-strip>div>div{display:flex;flex-direction:column;gap:5px}.results-strip span{font-size:12px;color:#545b65}.results-strip output{font-size:15px;font-weight:600}
.rfq-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:24px;align-items:start}.rfq-editor{min-width:0}.rfq-layout aside{position:sticky;top:20px}.rfq-gaps{margin:18px 0;font-size:12px}.rfq-gaps ul{padding-left:18px;line-height:1.65}.quote-revisions{display:flex;flex-direction:column;gap:8px;margin-top:16px}.rfq-layout .table-wrap input{min-width:92px}.rfq-layout .table-wrap select{min-width:120px}.rfq-layout .table-wrap th{white-space:normal;min-width:90px}.quote-logo{width:180px;height:auto}.quote-total{display:flex;justify-content:flex-end;gap:24px;margin:24px 0;font-size:16px}.quote-terms{margin-top:35px;max-width:65ch;line-height:1.6}.quote-thanks{margin-top:40px}.customer-quote table{table-layout:fixed}.customer-quote td,.customer-quote .print-meta>div{overflow-wrap:anywhere}.customer-quote .print-heading{align-items:flex-start}
@media(max-width:1100px){.rfq-layout{grid-template-columns:minmax(0,1fr)}.rfq-layout aside{position:static;grid-row:auto}.results-strip>div{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:600px){.results-strip>div{grid-template-columns:repeat(2,minmax(0,1fr))}.entry-legend{gap:8px}.results-strip{padding:12px}.heading .actions{flex-wrap:wrap}.quote-logo{width:135px}}
@media print{.customer-quote{page:portrait-document}.customer-quote .table-wrap{overflow:visible}.customer-quote th,.customer-quote td{white-space:normal}.quote-total,.quote-terms{break-inside:avoid}.quote-logo{width:155px}.print-heading{break-inside:avoid}thead{display:table-header-group}@page portrait-document{size:Letter portrait;margin:.45in}}

.sidebar .workspace-name,.sidebar .sidebar-label,.sidebar .muted,.sidebar .tiny,.sidebar .user-info{color:#c1c7d0}.sidebar small{font-size:12px}.entry-legend{font-size:12px}
@media(max-width:600px){.rfq-editor .field-grid{grid-template-columns:minmax(0,1fr)}.rfq-editor .field.full{grid-column:1}}

/* SCI shop-office workbench. Screen-only: original printed forms retain their rules. */
@media screen {
 :root{--mfg-surface:#fff;--mfg-control-border:#838892;--mfg-nav-hover:#343437;--mfg-space-1:4px;--mfg-space-2:8px;--mfg-space-3:16px;--mfg-space-4:24px;--mfg-space-5:32px;--mfg-control:44px;--mfg-body:15px}
 .mobile-customer-field{display:none}
 .sidebar{width:236px;padding:var(--mfg-space-5) var(--mfg-space-3);background:#242426}
 .sidebar .nav{min-height:var(--mfg-control);font-size:14px;padding:12px}
 .sidebar .sidebar-caption{font-size:12px;letter-spacing:.04em;margin-top:var(--mfg-space-5)}
 .sidebar .recent{padding:12px;font-size:14px;line-height:1.45}
 .sidebar .recent small{font-size:12px;white-space:normal;line-height:1.5}
 .sidebar .recent:hover{background:var(--mfg-nav-hover)}.sidebar .recent.selected{background:#493033}
 .sidebar .sidebar-bottom{font-size:13px}.sidebar .sidebar-bottom small{font-size:12px}
 .topbar .crumb{font-size:13px}.topbar .top-right{font-size:12px}
 #main[data-surface="customers"],#main[data-surface="part"]{font-size:var(--mfg-body);padding:var(--mfg-space-5)}
 #main[data-surface] .heading{gap:var(--mfg-space-4);margin-bottom:var(--mfg-space-4)}
 #main[data-surface] h1{font-size:30px;line-height:1.25;letter-spacing:-.5px}
 #main[data-surface] .sub{font-size:14px;line-height:1.5;margin-top:var(--mfg-space-2)}
 #main[data-surface] .part-title{font-size:18px;color:var(--muted);line-height:1.45}
 #main[data-surface] .btn{min-height:var(--mfg-control);font-size:14px;padding:10px 16px}
 #main[data-surface] .btn.small{min-height:40px;font-size:13px;padding:9px 12px}
 #main[data-surface] .btn.ghost{font-size:15px;font-weight:650;padding-left:0}
 #main[data-surface] .panel-header{padding:18px 24px}
 #main[data-surface] h3{font-size:16px;font-weight:650;line-height:1.4}
 #main[data-surface] table{font-size:14px;line-height:1.5}
 #main[data-surface] th{font-size:12px;padding:12px 18px;color:var(--muted);letter-spacing:0}
 #main[data-surface] td{padding:14px 18px}
 #main[data-surface] .section{margin-top:var(--mfg-space-4)}
 #main[data-surface] .small-note{font-size:13px;line-height:1.6;padding:16px 24px}
 #main[data-surface] .notice{font-size:13px;line-height:1.6;padding:14px 16px;margin-bottom:var(--mfg-space-4)}
 #main[data-surface] .customer-list{grid-template-columns:224px minmax(0,1fr);gap:var(--mfg-space-4);align-items:start}
 .file-search-label{display:block;font-size:13px;font-weight:600;margin-bottom:var(--mfg-space-2)}
 #main #customer-file-search{min-height:var(--mfg-control);max-width:720px;background:var(--mfg-surface);border-color:var(--mfg-control-border);font-size:15px;padding:12px 14px}
 #main[data-surface] .toolbar{justify-content:flex-start;margin-bottom:var(--mfg-space-4)}
 #main[data-surface] .customer-picker{padding:var(--mfg-space-2)}
 #main[data-surface] .customer-item{font-size:14px;line-height:1.5;border-radius:4px;min-height:48px;padding:12px}
 #main[data-surface] .customer-item.active{background:var(--pale);color:#96131d;font-weight:650}
 #main[data-surface] .customer-file-table .file-part{min-width:105px}
 #main[data-surface] .customer-file-table .file-description{min-width:180px}
 #main[data-surface] .customer-file-table .file-count{font-variant-numeric:tabular-nums}
 #main[data-surface] .customer-file-table .file-action{white-space:nowrap}
 #main[data-surface] button:focus-visible,#main[data-surface] a:focus-visible,.sidebar button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
 #main[data-surface] .btn:active{background:var(--pale)}#main[data-surface] .btn.primary:active{background:#96131d}
}
@media screen and (max-width:1100px){
 .sidebar{width:206px}
 #main[data-surface="customers"],#main[data-surface="part"]{padding:var(--mfg-space-4)}
 #main[data-surface] .customer-list{grid-template-columns:190px minmax(0,1fr);gap:var(--mfg-space-3)}
 #main[data-surface] .heading{flex-wrap:wrap}
}
@media screen and (max-width:700px){
 .sidebar{width:100%;padding:var(--mfg-space-3)}.sidebar nav{margin-top:var(--mfg-space-3);gap:var(--mfg-space-2);overflow:visible}
 .sidebar .nav{font-size:13px;padding:10px 12px;min-height:var(--mfg-control)}
 #main[data-surface="customers"],#main[data-surface="part"]{padding:var(--mfg-space-4) var(--mfg-space-3)}
 #main[data-surface] h1{font-size:27px}.topbar .crumb{font-size:12px}
 #main[data-surface] .heading{gap:var(--mfg-space-3)}
 #main[data-surface] .heading>.actions{gap:var(--mfg-space-2)}
 #main[data-surface] .btn,#main[data-surface] .btn.small{min-height:var(--mfg-control)}
 #main[data-surface] .panel-header{padding:var(--mfg-space-3)}
 #main[data-surface] .small-note{padding:var(--mfg-space-3)}
}
@media screen and (max-width:1000px){
 #main[data-surface] .customer-list{display:block}
 #main[data-surface] .customer-list>.customer-picker{display:none}
 .mobile-customer-field{display:flex;margin-bottom:var(--mfg-space-4);font-size:13px}
 #main .mobile-customer-field select{min-height:var(--mfg-control);font-size:15px;background:var(--mfg-surface);border-color:var(--mfg-control-border)}
 #main[data-surface] #customer-files-results .table-wrap{overflow:visible}
 #main[data-surface] .customer-file-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 #main[data-surface] .customer-file-table,#main[data-surface] .customer-file-table tbody{display:block;width:100%}
 #main[data-surface] .customer-file-table tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 16px;padding:20px 16px;border-bottom:1px solid var(--line)}
 #main[data-surface] .customer-file-table tr:last-child{border-bottom:0}
 #main[data-surface] .customer-file-table td{display:block;min-width:0;border:0;padding:0;overflow-wrap:anywhere}
 #main[data-surface] .customer-file-table .file-part,#main[data-surface] .customer-file-table .file-description,#main[data-surface] .customer-file-table .file-action,#main[data-surface] .customer-file-table .file-customer{grid-column:1/-1;min-width:0}
 #main[data-surface] .customer-file-table .file-part .btn{min-height:44px;font-size:17px;padding:0;justify-content:flex-start}
 #main[data-surface] .customer-file-table .file-description{font-size:14px;line-height:1.5;color:var(--ink);margin-top:-6px}
 #main[data-surface] .customer-file-table .file-count::before,#main[data-surface] .customer-file-table .file-customer::before{content:attr(data-label);display:block;font-size:12px;font-weight:400;color:var(--muted);margin-bottom:4px}
 #main[data-surface] .customer-file-table .file-count{font-size:16px;font-weight:600}
 #main[data-surface] .customer-file-table .file-action .btn{min-height:44px;width:100%;justify-content:center}
}
@media (prefers-reduced-motion:reduce){#main[data-surface] *, .sidebar *{scroll-behavior:auto;transition:none;animation:none}}

/* Persistent customer part/job identity sits outside individual orders and RFQs. */
.identity-output{display:block;padding:10px 0;font-size:14px;font-weight:600;overflow-wrap:anywhere}.part-standard-summary{font-size:13px;line-height:1.6}.customer-picker .customer-item{min-height:44px}.customer-list>div{min-width:0}.part-title{overflow-wrap:anywhere}
@media(max-width:700px){.customer-list{grid-template-columns:minmax(0,1fr)}.customer-picker{display:flex;overflow:auto;gap:4px}.customer-picker .customer-item{flex:0 0 auto;width:auto;white-space:nowrap}.heading h1{overflow-wrap:anywhere}.heading .part-title{display:block;margin:8px 0 0}}

@media screen{.labor-inputs table{min-width:880px}.labor-inputs th,.labor-inputs td{padding:12px}.labor-inputs [data-path$=".actual"]{width:80px;min-width:70px}.labor-inputs [data-path$=".operator"]{width:100px;min-width:90px}.labor-inputs select[data-path$=".timeType"]{min-width:130px}.labor-inputs select[data-path$=".opIndex"]{min-width:140px}.labor-inputs output{white-space:nowrap}}

/* Operational entry uses the same SCI workbench scale as customer files. */
@media screen{
 #main[data-surface="job"] input:not([type="checkbox"]),#main[data-surface="job"] select,#main[data-surface="job"] textarea,#main[data-surface="rfq"] input:not([type="checkbox"]),#main[data-surface="rfq"] select{min-height:var(--mfg-control);font-size:14px;font-family:inherit}
 #main[data-surface="job"] .field{font-size:13px;line-height:1.5}#main[data-surface="job"] .aside-note{font-size:13px;line-height:1.6}
 #main[data-surface="job"] .meta-strip input{width:100%;max-width:150px}#main[data-surface="job"] .tab{min-height:44px;font-size:14px}
 #main[data-surface="job"] .tabs{gap:16px;flex-wrap:wrap}#main[data-surface="job"] .icon-btn{min-width:44px;min-height:44px}
 .completion-checklist{border:1px solid var(--line);border-radius:6px;background:var(--mfg-surface);margin:16px 0}
 .completion-checklist>summary,.more-tasks>summary{cursor:pointer;min-height:44px;padding:12px 16px;font-size:14px;font-weight:650;color:var(--ink)}
 .completion-checklist summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
 .completion-checklist ol{margin:0;padding:0 16px 12px;list-style:none}.completion-checklist li+li{border-top:1px solid var(--line)}
 .completion-checklist li button{display:flex;justify-content:space-between;align-items:center;gap:16px;min-height:44px;width:100%;padding:10px 0;text-align:left;font:inherit;font-size:14px;line-height:1.5;color:var(--ink);background:transparent;border:0;cursor:pointer}
 .completion-checklist li button:hover{text-decoration:underline;text-underline-offset:3px}.completion-checklist li button span{font-size:12px;color:var(--accent);white-space:nowrap}
 .completion-checklist>p{padding:0 16px 16px;font-size:14px}.more-tasks{border-top:1px solid var(--line)}
 .mobile-job-section{display:none}.material-groups{display:grid;grid-template-columns:minmax(0,1fr);gap:24px;margin-bottom:24px}
 .material-groups fieldset{border:0;border-top:1px solid var(--line);padding:16px 0 0;min-width:0;margin:0}.material-groups legend{font-size:16px;font-weight:650;padding:0 12px 0 0;color:var(--ink)}
 .material-groups .field-grid{align-items:start}.material-length-help{max-width:72ch}.table-edit select[data-path^="extras."]{min-width:140px}
 #job-section-content{scroll-margin-top:20px}#main[data-surface="job"] .btn:disabled{cursor:not-allowed;opacity:.55}
}
@media screen and (min-width:1500px){.material-groups{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media screen and (max-width:700px){
 #main[data-surface="job"] .tabs{display:none}.mobile-job-section{display:flex;flex-direction:column;gap:8px;font-size:14px;font-weight:600;margin:16px 0 24px}.mobile-job-section select{width:100%}
 .completion-checklist li button{gap:8px;align-items:flex-start}.completion-checklist li button span{font-size:12px}.material-groups .field-grid{grid-template-columns:minmax(0,1fr)}
 #main[data-surface="job"] .meta-strip{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}#main[data-surface="job"] .two-col{grid-template-columns:minmax(0,1fr)}
}
@media print{.completion-checklist,.mobile-job-section{display:none!important}}

@media screen{#main[data-surface="job"] .btn.small{min-height:44px}}

@media screen and (max-width:700px){#main[data-surface="job"] .field-grid{grid-template-columns:minmax(0,1fr)}}

/* Preserve the original QC form branding and safely wrap long print identifiers. */
.qc-heading{display:flex;align-items:center;gap:20px;margin-bottom:12px}.qc-heading img{width:115px;height:auto}.qc-heading .qc-title{flex:1;margin:0;text-align:center}
@media print{.preview-page td,.preview-page .print-meta>div{overflow-wrap:anywhere}.preview-page:not(.qc-page) table{table-layout:fixed}.qc-heading{margin-bottom:8px}.qc-heading img{width:90px}.qc-heading .qc-title{font-size:15px}.quote-terms{break-inside:auto}.quote-terms h3{break-after:avoid}}

.page-back{margin:0 0 14px}.page-back .btn{min-height:38px}@media print{.page-back{display:none!important}}

/* SCI name-and-PIN sign-in: one clear task, comfortable controls at every width. */
.auth-card .auth-intro{margin:-12px 0 28px;color:var(--muted);font-size:14px;line-height:1.5}
.auth-name-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.auth-name-fields label{min-width:0}.auth-card input{font:inherit;font-size:16px;min-width:0}
.auth-card input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.auth-card .btn{min-height:44px;font-size:15px}.auth-card .btn:disabled{cursor:wait;opacity:.65}
.auth-card .back-to-sci{display:flex;align-items:center;justify-content:center;min-height:44px;margin-top:16px;font-size:14px}
.auth-card #auth-message:empty{display:none}.auth-card #auth-message{margin:8px 0 16px}
@media(max-width:480px){.auth-screen #main{padding:24px 16px}.auth-card{padding:28px 24px}.auth-name-fields{grid-template-columns:minmax(0,1fr);gap:0}.auth-card h1{font-size:24px}.auth-logo{max-width:180px}}

/* SCI app shell match: the same frame, type, color and dark mode as SCI
   Operations and CNC (root styles.css "App shell v2"). Screen only, so printed
   job cards, QC forms and quotes keep their original styling. */
@font-face{font-family:'Inter';font-style:normal;font-weight:400 700;font-display:swap;src:url(assets/inter-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@media screen{
 :root{
  --ink:#1D1D1F;--muted:#6E6E73;--accent:#C00000;--accent-ink:#C00000;--accent-hover:#A30000;--pale:rgba(192,0,0,.08);
  --line:rgba(0,0,0,.08);--line-strong:rgba(0,0,0,.14);--ground:#F5F5F7;--surface:#FFFFFF;--surface-2:#F8F8FA;--hover:rgba(120,120,128,.09);
  --control-border:#8A8A90;--entry:#FFF9EF;--entry-border:#A89878;--tag-bg:rgba(120,120,128,.14);
  --amber:#9A4A07;--amber-bg:rgba(180,83,9,.09);--amber-line:rgba(180,83,9,.32);--red:#C00000;--red-bg:rgba(192,0,0,.08);--blue:#1D5FB8;--blue-bg:rgba(0,113,227,.09);--green-ink:#1A7F4B;--green-bg:rgba(26,127,75,.1);
  --toast:#1D1D1F;--tab-h:64px;--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px);
  --mfg-surface:var(--surface);--mfg-control-border:var(--control-border);--mfg-nav-hover:var(--hover);
  font-variant-numeric:normal;
  font-family:-apple-system,"SF Pro Text","Inter",BlinkMacSystemFont,"Segoe UI","Helvetica Neue",sans-serif;
 }
 :root[data-theme="dark"]{
  color-scheme:dark;
  --ink:#F5F5F7;--muted:#AEB3BC;--accent-ink:#FF8A8A;--pale:rgba(255,69,58,.14);
  --line:rgba(255,255,255,.13);--line-strong:rgba(255,255,255,.24);--ground:#1C1C1E;--surface:#21242B;--surface-2:#2A2D35;--hover:rgba(255,255,255,.07);
  --control-border:#7D838E;--entry:#2C2922;--entry-border:#8F7F60;--tag-bg:rgba(255,255,255,.1);
  --amber:#FBBF24;--amber-bg:rgba(255,159,10,.14);--amber-line:rgba(255,159,10,.4);--red:#FF8A8A;--red-bg:rgba(255,69,58,.14);--blue:#93C5FD;--blue-bg:rgba(10,132,255,.16);--green-ink:#4ADE80;--green-bg:rgba(48,209,88,.14);
  --toast:#3A3D45;
 }
 body{background:var(--ground);color:var(--ink)}
 /* Inter spaces hyphens under tabular figures, so only number columns use them. */
 table,output,.meta-strip .value,.history-total strong,.metric-list strong{font-variant-numeric:tabular-nums}
 ::selection{background:rgba(192,0,0,.18);color:var(--ink)}
 a{color:var(--accent-ink)}
 svg.icon{stroke-width:1.8}

 /* Frame on a computer: slim menu on the left, title bar on top. */
 .shell .sidebar{width:232px;padding:14px 12px;gap:4px;background:var(--surface);color:var(--ink);border-right:1px solid var(--line)}
 .shell .brand{display:flex;align-items:baseline;gap:10px;padding:6px 12px 18px;text-decoration:none;color:var(--ink)}
 .brand-logo,.topbar-logo{font-family:Georgia,serif;font-style:italic;font-weight:700;letter-spacing:.08em;color:var(--accent-ink);line-height:1}
 .brand-logo{font-size:24px}.brand-name{color:var(--muted);font-size:14px;font-weight:500}
 .topbar-logo{display:none;font-size:20px;flex:none}
 .shell .sidebar nav{display:grid;gap:2px}
 .shell .sidebar .nav{min-height:42px;margin:0;padding:0 12px;gap:12px;border-radius:10px;color:var(--ink);font-size:15px;font-weight:500;text-decoration:none;box-shadow:none}
 .shell .sidebar .nav svg{width:20px;height:20px}
 .shell .sidebar .nav:hover{background:var(--hover)}
 .shell .sidebar .nav.active{background:var(--pale);color:var(--accent-ink);box-shadow:none}
 .shell .sidebar .nav-app{display:none}
 .shell .sidebar .sidebar-caption{margin:24px 12px 6px;color:var(--muted);font-size:14px;font-weight:600;letter-spacing:0}
 .shell .sidebar .recent{padding:9px 12px;border-radius:10px;color:var(--ink);font-size:14px;box-shadow:none}
 .shell .sidebar .recent small{color:var(--muted);font-size:13px}
 .shell .sidebar .recent:hover{background:var(--hover)}
 .shell .sidebar .recent.selected{background:var(--pale);box-shadow:none}
 .shell .sidebar .recent.selected strong{color:var(--accent-ink)}
 .shell .companion-links{display:grid;gap:2px;margin-top:auto;padding:16px 0 0}
 .shell .companion-links a{display:flex;align-items:center;min-height:40px;padding:0 12px;border-radius:10px;color:var(--muted);font-size:14px;text-decoration:none}
 .shell .companion-links a:hover{background:var(--hover);color:var(--ink);text-decoration:none}
 .shell .sidebar-bottom{margin-top:8px;padding:12px 12px 0;border-top:1px solid var(--line);color:var(--ink);font-size:14px}
 .shell .sidebar-bottom small{color:var(--muted);font-size:12px}
 .shell .avatar{width:38px;height:38px;border:0;background:rgba(192,0,0,.1);color:var(--accent-ink);font-size:13px;font-weight:700;flex:none}
 :root[data-theme="dark"] .shell .avatar{background:rgba(255,90,90,.16)}

 .shell .topbar{position:sticky;top:0;z-index:50;height:60px;padding:0 24px;gap:12px;background:var(--surface);border-bottom:1px solid var(--line)}
 .shell .topbar .crumb{min-width:0;color:var(--ink);font-size:18px;font-weight:700;letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .shell .topbar .crumb:has(a){color:var(--muted);font-size:15px;font-weight:500;letter-spacing:0}
 .shell .topbar .crumb a{color:var(--muted);text-decoration:none}.shell .topbar .crumb a:hover{color:var(--ink);text-decoration:underline}
 .shell .topbar .crumb span{margin:0 8px;color:var(--muted)}
 .shell .topbar .crumb strong{color:var(--ink);font-size:18px;font-weight:700}
 .shell .topbar .top-right{gap:12px;color:var(--muted);font-size:13px;flex:none}
 .shell .mock-label{color:var(--muted)}.shell .dot{background:var(--muted)}
 .shell .top-divider{border-color:var(--line-strong)}
 .theme-toggle,#cloud-signout{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:0 14px;border:1px solid var(--line-strong);border-radius:999px;background:var(--surface);color:var(--ink);font-size:13px;font-weight:600;cursor:pointer}
 .theme-toggle svg{width:16px;height:16px}
 .theme-toggle:hover,#cloud-signout:hover{background:var(--hover)}
 .shell .app-footer{color:var(--muted);border-top:1px solid var(--line)}

 /* Content: one plain card level, 14px corners, flat red primary. */
 .panel,.meta-strip,.results-strip,.completion-checklist{background:var(--surface);border:1px solid var(--line);border-radius:14px}
 .panel-header,.dialog-header{border-bottom-color:var(--line)}
 .btn{border-radius:10px;border-color:var(--line-strong);background:var(--surface);color:var(--ink)}
 .btn:hover{background:var(--hover);border-color:var(--line-strong)}
 .btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}
 .btn.primary:hover{background:var(--accent-hover);border-color:var(--accent-hover)}
 #main[data-surface] .btn.primary:active{background:var(--accent-hover)}
 .btn.ghost,.btn.ghost:hover{background:transparent;border-color:transparent;color:var(--accent-ink)}
 .btn.ghost:hover{text-decoration:underline;text-underline-offset:3px}
 .btn.danger{color:var(--red)}
 .icon-btn{color:var(--muted);border-radius:10px}.icon-btn:hover{background:var(--hover);color:var(--ink)}
 th,#main[data-surface] th{background:var(--surface-2);color:var(--muted);border-bottom-color:var(--line)}
 td{border-bottom-color:var(--line)}
 .click-row:hover{background:var(--hover)}
 .cell-title{color:var(--ink)}.cell-sub,.sub,.part-title,.aside-note,.muted,.standard-note,.empty{color:var(--muted)}
 #main[data-surface] .part-title{color:var(--muted)}
 .empty h3{color:var(--ink)}
 .tag{border-radius:999px;padding:4px 10px;background:var(--tag-bg);color:var(--ink)}
 .tag.green{background:var(--green-bg);color:var(--green-ink)}.tag.amber{background:var(--amber-bg);color:var(--amber)}
 .tag.blue{background:var(--blue-bg);color:var(--blue)}.tag.red{background:var(--red-bg);color:var(--red)}
 .notice{border-radius:10px;border-color:var(--amber-line);background:var(--amber-bg);color:var(--ink)}
 .notice svg{color:var(--amber)}
 .notice.neutral{border-color:var(--line);background:var(--surface-2);color:var(--ink)}.notice.neutral svg{color:var(--muted)}
 .check-row svg{color:var(--amber)}.check-row.good svg{color:var(--green-ink)}.check-row small{color:var(--muted)}
 .closeout-success{background:var(--pale);border-color:rgba(192,0,0,.25);border-radius:14px}
 .tabs{border-bottom-color:var(--line)}.tab{color:var(--muted)}.tab:hover{color:var(--ink)}
 .tab.active{color:var(--accent-ink);border-color:var(--accent)}
 .field,#main[data-surface="job"] .field{color:var(--ink)}
 .meta-strip label,.results-strip span,.results-strip h2 small,.entry-legend,.history-total span{color:var(--muted)}
 .meta-strip .value,.history-total strong,.results-strip output,output{color:var(--ink)}
 .summary-row{border-bottom-color:var(--line)}.rule,.metric-list{border-color:var(--line)}
 .small-note,#main[data-surface] .small-note{background:var(--surface-2);border-top-color:var(--line);color:var(--muted)}
 .material-groups fieldset{border-top-color:var(--line)}.material-groups legend{color:var(--ink)}
 .completion-checklist>summary,.more-tasks>summary,.completion-checklist li button{color:var(--ink)}
 .completion-checklist li+li,.more-tasks{border-color:var(--line)}
 .completion-checklist li button span{color:var(--accent-ink)}

 /* Fields: entries keep their warm "enter here" tint; calculated values stay plain. */
 input,select,textarea{border-radius:10px;border-color:var(--control-border);background:var(--surface);color:var(--ink)}
 input::placeholder,textarea::placeholder{color:var(--muted)}
 input[readonly]{background:var(--surface-2)}
 #main input:not([type=checkbox]):not([readonly]):not(:disabled),#main select:not(:disabled),#main textarea:not(:disabled){background:var(--entry);border-color:var(--entry-border);color:var(--ink)}
 #main #customer-file-search,#main .mobile-customer-field select{background:var(--surface);border-color:var(--control-border)}
 .input-key{background:var(--entry);border-color:var(--entry-border);border-radius:6px;color:var(--ink)}
 #main input:focus-visible,#main select:focus-visible,#main textarea:focus-visible,button:focus-visible,a:focus-visible{outline:2px solid var(--accent-ink);outline-offset:2px}
 #main input:invalid{border-color:var(--red)}
 .search svg{color:var(--muted)}
 .error{color:var(--red)}

 .customer-item,#main[data-surface] .customer-item{background:var(--surface);color:var(--ink);border-bottom-color:var(--line);border-radius:10px}
 .customer-item:hover{background:var(--hover)}
 .customer-item.active,#main[data-surface] .customer-item.active{background:var(--pale);color:var(--accent-ink)}
 .choice .chosen{border-color:var(--accent);background:var(--pale);color:var(--accent-ink)}

 dialog{background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:18px;box-shadow:0 24px 60px rgba(0,0,0,.18)}
 dialog::backdrop{background:rgba(0,0,0,.4)}
 .dialog-footer{background:var(--surface-2);border-top-color:var(--line);border-radius:0 0 18px 18px}
 #toast{background:var(--toast);color:#fff;border-radius:12px}

 .auth-card{background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:0 12px 40px rgba(0,0,0,.06)}
 .auth-card label{color:var(--ink)}
 .auth-card input,#main .auth-card input:not([type=checkbox]):not([readonly]):not(:disabled){border-radius:10px;border-color:var(--control-border);background:var(--surface);color:var(--ink)}
 .auth-card #auth-message{color:var(--red)}
 .auth-logo{background:#fff;border-radius:10px;padding:6px}
 .back-to-sci,.auth-card .back-to-sci{color:var(--muted)}

 /* On-screen previews of printed forms stay on white paper in both themes. */
 .preview-page{--ink:#1D1D1F;--muted:#5F5F66;--line:#E1E1E4;--line-strong:#CFCFD4;--surface:#fff;--surface-2:#F8F8FA;--hover:transparent;--tag-bg:#F0F0F2;
  background:#fff;color:#1D1D1F;border-color:var(--line);color-scheme:light}
}

/* Phones and tablets: title bar on top, tabs along the bottom (as in SCI Operations). */
@media screen and (max-width:1024px){
 .shell{display:block}
 .shell .sidebar{position:fixed;top:auto;right:0;bottom:0;left:0;z-index:60;display:block;width:100%;height:calc(var(--tab-h) + var(--safe-bottom));padding:6px 4px var(--safe-bottom);border-right:0;border-top:1px solid var(--line)}
 .shell .sidebar .brand,.shell .sidebar .sidebar-caption,.shell .sidebar #recent,.shell .sidebar .sci-apps,.shell .sidebar .sidebar-bottom,.shell .sidebar .workspace-name{display:none}
 .shell .sidebar nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;margin:0;height:100%;overflow:visible}
 .shell .sidebar .nav,.shell .sidebar .nav-app{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;width:100%;min-height:52px;padding:0 4px;border-radius:12px;background:none;color:var(--muted);font-size:12px;font-weight:600;line-height:1.15;text-align:center;white-space:normal}
 .shell .sidebar .nav svg{width:22px;height:22px}
 .shell .sidebar .nav.active{background:none;color:var(--accent-ink)}
 .shell .workspace{padding-bottom:calc(var(--tab-h) + var(--safe-bottom))}
 .shell .topbar{height:auto;min-height:calc(56px + var(--safe-top));padding:calc(var(--safe-top) + 8px) 16px 8px;flex-wrap:wrap;row-gap:4px}
 .shell .topbar-logo{display:block}
 .shell .topbar .crumb{flex:1;font-size:17px}
 .shell .topbar .crumb strong{font-size:17px}
 .shell .topbar .mock-label,.shell .topbar .top-divider{display:none}
 #toast{bottom:calc(var(--tab-h) + var(--safe-bottom) + 16px)}
}
@media screen and (max-width:700px){

 .shell .topbar .top-right{width:100%;justify-content:space-between;font-size:13px}
 /* Phones show just the current screen; the page has its own Back. */
 .shell .topbar .crumb:has(a){font-size:0}
 .shell .topbar .crumb:has(a)>a,.shell .topbar .crumb:has(a)>span{display:none}
}
/* Sign-in: no menu, no title bar. */
.auth-screen .shell .sidebar,.auth-screen .shell .topbar,.auth-screen .shell .app-footer{display:none}
.auth-screen .shell .workspace{padding-bottom:0}

/* SCI apps: one switcher, the same in Operations, CNC and Manufacturing
   (styles.css, cnc/styles.css and manufacturing/style.css carry this block).
   Kept quiet on purpose: plain rows under a hairline, like the menu above it. */
.sci-apps{--apps-ink:var(--text,var(--ink,#1D1D1F));--apps-muted:var(--muted,#6E6E73);--apps-line:var(--border,var(--line,rgba(0,0,0,.08)));--apps-red:#C00000;--apps-hover:rgba(120,120,128,.1);
 display:grid;gap:1px;margin-top:auto;padding-top:10px;border-top:1px solid var(--apps-line)}
:root[data-theme="dark"] .sci-apps{--apps-red:#FF6961;--apps-hover:rgba(255,255,255,.07)}
.sci-apps .sci-apps-title{margin:0;padding:2px 12px 6px;color:var(--apps-muted);font-size:12px;font-weight:500;line-height:1.3;letter-spacing:0;text-transform:none}
.sci-apps .sci-app{position:relative;min-width:0;display:flex;align-items:center;gap:12px;min-height:38px;padding:0 12px;border-radius:10px;color:var(--apps-muted);font-size:14px;font-weight:500;line-height:1.3;text-decoration:none}
.sci-apps a.sci-app:hover{background:var(--apps-hover);color:var(--apps-ink);text-decoration:none}
.sci-apps a.sci-app:focus-visible{outline:2px solid var(--apps-red);outline-offset:2px}
.sci-apps .sci-app-mark{display:grid;place-items:center;flex:none}
.sci-apps svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.sci-apps .sci-app.is-current{color:var(--apps-ink);font-weight:600}
.sci-apps .is-current .sci-app-mark{color:var(--apps-red)}
/* The red icon and darker name mark the open app; the words are for screen readers. */
.sci-apps .sci-app-here{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
/* Jobs home and Parts & customers: the work list first, one link per row,
   red kept for the main button and for late jobs. Screen only. */
@media screen{
 .shell .sidebar .nav .nav-short{display:none}
 .theme-toggle,#cloud-signout{min-height:44px}
 .panel-header h2{margin:0;font-size:16px;font-weight:700;letter-spacing:-.005em;color:var(--ink)}
 #main[data-surface="jobs"],#main[data-surface="customers"]{--chip-h:36px}

 .heading>h1{margin:0}
 .more-menu{position:relative}
 .more-menu>summary{list-style:none;display:inline-flex;align-items:center;gap:6px;cursor:pointer;user-select:none}
 .more-menu>summary::-webkit-details-marker{display:none}
 .more-menu>summary svg{width:16px;height:16px;transition:transform .16s cubic-bezier(.2,.8,.2,1)}
 .more-menu[open]>summary svg{transform:rotate(180deg)}
 .more-menu .menu{position:absolute;top:calc(100% + 6px);right:0;z-index:40;display:grid;min-width:210px;padding:6px;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 32px rgba(0,0,0,.12)}
 .more-menu .menu button{display:flex;align-items:center;gap:10px;min-height:44px;padding:0 12px;border:0;border-radius:8px;background:none;color:var(--ink);font:inherit;font-size:15px;text-align:left;cursor:pointer}
 .more-menu .menu button:hover{background:var(--hover)}
 .more-menu .menu svg{width:18px;height:18px;color:var(--muted)}

 .home-search{max-width:720px;margin-bottom:20px}
 .home-search label{display:block;margin-bottom:8px;color:var(--ink);font-size:14px;font-weight:600}
 .home-search .search{max-width:none}
 .home-search .search svg{top:50%;left:14px;width:18px;height:18px;transform:translateY(-50%);color:var(--muted)}
 #main #home-search{width:100%;min-height:48px;padding:0 14px 0 42px;font-size:16px;background:var(--surface);border-color:var(--control-border)}
 .search-hint{margin:6px 0 0;color:var(--muted);font-size:13px}

 .home-grid{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:24px;align-items:start}
 .home-filters{display:flex;flex-wrap:wrap;align-items:end;justify-content:space-between;gap:12px;margin-bottom:12px}
 .chips{display:flex;flex-wrap:wrap;gap:8px}
 .chip{display:inline-flex;align-items:center;gap:8px;min-height:var(--chip-h);padding:0 14px;border:1px solid var(--line-strong);border-radius:999px;background:var(--surface);color:var(--ink);font:inherit;font-size:14px;font-weight:500;cursor:pointer}
 .chip:hover{background:var(--hover)}
 .chip[aria-pressed="true"]{background:var(--ink);border-color:var(--ink);color:var(--surface)}
 .chip-count{color:var(--muted);font-size:13px;font-weight:600;font-variant-numeric:tabular-nums}
 .chip[aria-pressed="true"] .chip-count{color:inherit;opacity:.75}
 .home-customer{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:14px;font-weight:500}
 #main #home-customer{min-height:var(--chip-h);width:auto;min-width:180px;background:var(--surface);border-color:var(--line-strong)}

 [data-row-link]{cursor:pointer}
 [data-row-link]:hover{background:var(--hover)}
 .row-link{display:inline-flex;align-items:center;min-height:40px;padding:0;border:0;background:none;color:var(--ink);font:inherit;font-size:15px;font-weight:650;font-variant-numeric:tabular-nums;white-space:nowrap;text-align:left;cursor:pointer}
 .row-link:hover{text-decoration:underline;text-underline-offset:3px}

 table.home-jobs{width:100%}
 #main table.home-jobs th,#main table.home-jobs td{padding:12px 16px;vertical-align:middle}
 #main table.home-jobs th:first-child,#main table.home-jobs td:first-child{padding-left:20px}
 .job-customer{white-space:nowrap}
 table.home-jobs .num{text-align:right}
 table.home-jobs .cell-title,table.home-jobs .cell-sub,table.home-jobs .next-step{display:block}
 table.home-jobs .cell-sub{font-size:13px}
 .job-part{min-width:180px}
 .job-opened{white-space:nowrap;color:var(--muted);font-size:14px}
 .next-step{max-width:30ch;color:var(--ink);font-size:14px;line-height:1.35}

 .search-summary{margin:0 0 12px;color:var(--muted);font-size:14px}
 .search-group+.search-group{margin-top:16px}
 .search-group h2 .chip-count{margin-left:6px}
 .link-list{margin:0;padding:0;list-style:none}
 .link-list li{display:grid;grid-template-columns:minmax(96px,auto) minmax(0,1fr) auto;align-items:center;gap:4px 16px;padding:6px 20px;border-top:1px solid var(--line);font-size:14px}
 .link-list li:first-child{border-top:0}
 .link-list .cell-sub{font-size:13px;text-align:right}
 .link-list.compact li{grid-template-columns:minmax(0,1fr) auto;padding:8px 16px}
 .link-list.compact li>span:not(.tag):not(.cell-sub){grid-column:1/-1;grid-row:2;margin-top:-8px;padding-bottom:4px;color:var(--muted);font-size:13px}
 .side-panel+.side-panel{margin-top:16px}
 .side-panel .panel-header{padding:14px 16px}
 .side-panel .panel-header h2{font-size:15px}
 .side-empty{margin:0;padding:16px;color:var(--muted);font-size:14px}

 .customer-item{align-items:center;gap:8px}
 .customer-open{min-width:24px;padding:1px 8px;border-radius:999px;background:var(--tag-bg);color:var(--ink);font-size:12px;font-weight:600;text-align:center;font-variant-numeric:tabular-nums}
 .customer-item.active .customer-open{background:var(--surface);color:var(--accent-ink)}
 #main .customer-file-table .file-count.has-open{color:var(--ink);font-weight:700}
 #main .customer-file-table .file-count{color:var(--muted)}
}
@media screen and (max-width:1200px){
 .home-grid{grid-template-columns:minmax(0,1fr)}
 .home-side{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
 .side-panel+.side-panel{margin-top:0}
}
@media screen and (max-width:1024px){
 #main[data-surface="jobs"],#main[data-surface="customers"]{--chip-h:44px}
 .shell .sidebar nav{grid-template-columns:repeat(6,minmax(0,1fr))}
 .shell .sidebar .nav,.shell .sidebar .nav-app{font-size:11px}
 .shell .sidebar .nav .nav-long{display:none}.shell .sidebar .nav .nav-short{display:inline}
 .row-link{min-height:44px}
 .search-hint{display:none}
}
@media screen and (max-width:700px){
 .home-side{grid-template-columns:minmax(0,1fr)}
 .home-filters{flex-direction:column;align-items:stretch}
 .chips{flex-wrap:nowrap;overflow-x:auto;margin:0 -16px;padding:0 16px 2px;scrollbar-width:none}
 .chips::-webkit-scrollbar{display:none}
 .chip{flex:none}
 .home-customer{justify-content:space-between}
 #main #home-customer{flex:1;min-width:0}
 table.home-jobs thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 table.home-jobs,table.home-jobs tbody{display:block;width:100%}
 table.home-jobs tr{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"jc opened" "part part" "cust qty" "next next";gap:2px 12px;padding:12px 16px;border-bottom:1px solid var(--line)}
 table.home-jobs tr:last-child{border-bottom:0}
 #main table.home-jobs td,#main table.home-jobs td:first-child{display:block;padding:0;border:0;min-width:0;min-height:0}
 .job-jc{grid-area:jc}.job-opened{grid-area:opened;text-align:right;font-size:13px}.job-part{grid-area:part;min-width:0}
 .job-customer{grid-area:cust;color:var(--muted);font-size:13px}
 table.home-jobs .job-qty{grid-area:qty;color:var(--muted);font-size:13px;text-align:right}
 .job-qty::before{content:"Qty "}
 .job-opened:not(.is-closed)::before{content:"Opened "}
 .job-next{grid-area:next;margin-top:6px}
 .next-step{max-width:none}
 .link-list li{grid-template-columns:minmax(0,1fr) auto;padding:6px 16px}
 .link-list li>span:not(.tag):not(.cell-sub){grid-column:1/-1;grid-row:2;margin-top:-8px;padding-bottom:4px;color:var(--muted);font-size:13px}
 #main[data-surface="jobs"]{padding:24px 16px}
 #main .customer-file-table .file-part .row-link{font-size:17px}
 .heading .actions{width:100%}
 .heading .actions>.btn.primary{flex:1;justify-content:center}
}

/* Release to shop: status strip on the job card, release preview and confirmation. */
@media screen{
 .shop-strip{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 20px;margin:0 0 16px;padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}
 .shop-strip-main{display:flex;align-items:flex-start;gap:12px;min-width:0;flex:1 1 320px}
 .shop-strip-main>svg{flex:none;width:20px;height:20px;margin-top:1px}
 .shop-strip-main div{display:grid;gap:2px;min-width:0}.shop-strip-main strong{font-size:15px}.shop-strip-main span{color:var(--muted);font-size:14px}
 .shop-strip-main span:empty{display:none}
 .shop-strip-actions{display:flex;flex-wrap:wrap;gap:8px}
 .shop-strip.is-new>.shop-strip-main>svg{color:var(--muted)}
 .shop-strip.is-released>.shop-strip-main>svg{color:var(--green-ink)}
 .shop-strip.is-changed{border-color:var(--amber-line);background:var(--amber-bg)}.shop-strip.is-changed>.shop-strip-main>svg{color:var(--amber)}.shop-strip.is-changed .shop-strip-main span{color:var(--ink)}
 .shop-strip.is-failed{border-color:var(--red);background:var(--red-bg)}.shop-strip.is-failed>.shop-strip-main>svg{color:var(--red)}.shop-strip.is-failed .shop-strip-main span{color:var(--ink)}
 .shop-strip-main .shop-confirmed{color:var(--green-ink);font-size:13px;font-weight:600}
 .link-btn{margin-left:6px;padding:0;border:0;background:none;color:var(--ink);font:inherit;font-weight:600;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
 .shop-live{margin-left:8px;padding:2px 8px;border-radius:999px;background:var(--green-bg);color:var(--green-ink);font-size:12px;font-weight:600;vertical-align:middle}
 .release-checks{display:grid;gap:6px;margin:0 0 16px;padding:0;list-style:none}
 .release-checks li{display:flex;align-items:flex-start;gap:8px;font-size:14px}.release-checks svg{flex:none;width:18px;height:18px}
 .release-checks .ok svg{color:var(--green-ink)}.release-checks .warn svg{color:var(--amber)}
 .release-group{margin:0 0 12px;border:1px solid var(--line);border-radius:12px;overflow:hidden}
 .release-group header{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 12px;align-items:baseline;padding:10px 14px;background:var(--surface-2);border-bottom:1px solid var(--line)}
 .release-group h3{margin:0;font-size:15px}.release-group header span{color:var(--muted);font-size:13px}
 .release-group table{width:100%}.release-group th,.release-group td{padding:8px 14px}
 .release-group .cell-sub{display:block}
 .release-line{margin:0;padding:12px 14px;font-size:14px;line-height:1.5}.release-line .cell-sub{margin-top:2px}
 .confirm-lead{margin:0 0 14px;font-size:15px;line-height:1.5}
 .confirm-list{display:grid;gap:10px;margin:0 0 14px;padding:0;list-style:none}
 .confirm-list li{display:grid;grid-template-columns:22px minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--line);border-radius:12px}
 .confirm-list li>svg{width:20px;height:20px}.confirm-list .ok>svg{color:var(--green-ink)}
 .confirm-list .bad{border-color:var(--red);background:var(--red-bg)}.confirm-list .bad>svg{color:var(--red)}
 .confirm-list div{display:grid;gap:2px;min-width:0}.confirm-list strong{font-size:15px}
 .confirm-list div span{color:var(--muted);font-size:13px}.confirm-list .confirm-found{color:var(--ink);font-size:14px}
 .labor-only{display:flex;align-items:flex-start;gap:10px;margin:10px 0 6px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface);font-size:14px;font-weight:600;cursor:pointer}.labor-only input{margin-top:2px;width:18px;height:18px;accent-color:var(--accent)}
 .material-groups .no-charge .field-grid{display:none}
 .price-next strong{font-size:18px;font-variant-numeric:tabular-nums}.price-next.is-low strong{color:var(--red)}
 aside .price-next{flex-direction:column;align-items:flex-start;gap:2px}aside .price-next strong{white-space:nowrap}
 .price-check-lead{margin:0 0 6px;font-size:14px;line-height:1.5}
 .fill-notes{margin:6px 0 0;padding-left:18px;font-size:13px}.fill-notes li+li{margin-top:2px}
 .notice.from-cnc{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-bottom:12px}.notice.from-cnc>svg{color:var(--green-ink)}.notice.from-cnc>div{flex:1 1 280px}
 .shop-strip.is-linked{border-color:var(--blue-bg);background:var(--blue-bg)}.shop-strip.is-linked>.shop-strip-main>svg{color:var(--blue)}.shop-strip.is-linked .shop-strip-main span{color:var(--ink)}
 .release-problems{margin:0 0 14px;padding:12px 14px;border:1px solid var(--red);border-radius:12px;background:var(--red-bg);color:var(--ink);font-size:14px}
 .release-problems ul{margin:6px 0 0;padding-left:18px}.release-problems li+li{margin-top:4px}
 .release-plant{display:grid;gap:6px;margin:0 0 14px;font-weight:600}.release-plant select{max-width:320px}
 #dialog:has(.release-group),#dialog:has(.confirm-list){width:min(820px,calc(100vw - 32px))}
 td.num,th.num{text-align:right}
 .amend-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}.amend-row h2{margin:0}.amend-row .aside-note{margin:4px 0 0}
 .amend-banner{display:flex;flex-wrap:wrap;align-items:flex-start;gap:10px;margin-bottom:16px}.amend-banner>div:first-of-type{flex:1 1 320px}.amend-banner .cell-sub{display:block;margin-top:4px}
}
