:root{font-family:Inter,"Microsoft YaHei",sans-serif;color:#1e3541;background:#f3f6f8;font-size:15px;--blue:#166858;--line:#dce5e8}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer;min-height:44px;border:1px solid var(--line);border-radius:9px;padding:10px 16px;background:white;color:inherit}button:hover{border-color:#166858}button:disabled{opacity:.5;cursor:wait}button.primary{background:var(--blue);color:#fff;border-color:var(--blue)}input,select,textarea{width:100%;min-height:44px;padding:10px 12px;border:1px solid #cdd8de;border-radius:8px;background:white;color:#1e3541}textarea{min-height:85px}input:focus,select:focus,textarea:focus{outline:2px solid #82c4b6;outline-offset:2px}header{background:#fff;border-bottom:1px solid var(--line);padding:22px 5vw;display:flex;justify-content:space-between;align-items:center;gap:14px}header strong{font-size:22px}small,.muted{color:#6c8089;font-size:13px}nav{display:flex;gap:8px}nav button{border:0;background:transparent}nav .active{background:#e4f1ec;color:#166858;font-weight:bold}main{max-width:1200px;margin:32px auto;padding:0 24px 80px}h1{font-size:28px;margin:0 0 8px}h2{font-size:20px;margin:0 0 16px}h3{font-size:17px;margin:0}p{line-height:1.65}.heading,.row,.toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px}.heading{margin-bottom:24px}.toolbar{margin:20px 0;flex-wrap:wrap}.toolbar input{flex:2;min-width:180px}.toolbar select{flex:1;min-width:130px}.panel,.order{background:white;border:1px solid var(--line);border-radius:12px;padding:20px;margin:12px 0}.order .meta{display:flex;gap:16px;flex-wrap:wrap;color:#657c87;font-size:14px;margin:10px 0}.order .config{color:#58707c;font-size:14px;line-height:1.6;margin:12px 0;overflow-wrap:anywhere}.badge{display:inline-block;border-radius:6px;padding:5px 8px;font-size:12px;background:#edf1f4;color:#5a6f79}.badge.green{background:#e3f2e8;color:#247451}.badge.red{background:#fce6e6;color:#a32e2e}.badge.orange{background:#fff1ce;color:#946200}.order-footer{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #edf1f3;padding-top:12px;gap:10px}.notice{background:#e6efed;padding:14px 18px;border-radius:8px;color:#40635b;line-height:1.6;margin:18px 0}.table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:14px 10px;border-bottom:1px solid var(--line);overflow-wrap:anywhere}th{font-size:13px;color:#6c8089}.table-wrap{overflow-x:auto}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}label{display:block;font-size:13px;font-weight:600}label input,label select,label textarea{margin-top:7px;font-weight:400}.wide{grid-column:1/-1}.actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px;position:static;background:white;padding:14px 0}dialog{border:1px solid var(--line);border-radius:16px;width:760px;max-width:calc(100vw - 24px);max-height:90dvh;padding:24px;overflow:auto}dialog::backdrop{background:#132e3c70}.picker{border:1px solid var(--line);border-radius:10px;padding:14px;margin-top:16px}.result,.selected{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:11px 0;border-bottom:1px solid #eef2f4}.result p{margin:3px 0}.selected input{width:80px}.quantity{display:flex;gap:4px;align-items:center}.quantity button{padding:7px 10px}.error{color:#b23838;white-space:pre-wrap;line-height:1.6}.auth{max-width:430px;margin:10vh auto;background:white;padding:30px;border-radius:16px;border:1px solid var(--line)}.auth label{margin:15px 0}#toast{position:fixed;bottom:85px;left:50%;transform:translateX(-50%);background:#193b32;color:white;padding:14px 22px;border-radius:8px;display:none;z-index:20}.empty{text-align:center;padding:40px;color:#6c8089}.mobile-only{display:none}@media(max-width:700px){header{padding:18px 20px}header strong{font-size:18px}header nav{position:fixed;bottom:0;left:0;right:0;z-index:5;background:white;border-top:1px solid var(--line);padding:8px 10px calc(8px + env(safe-area-inset-bottom));justify-content:space-around}header .user{font-size:12px}main{margin-top:22px;padding:0 16px 110px}h1{font-size:24px}.heading{align-items:flex-start}.form-grid{grid-template-columns:1fr}.wide{grid-column:auto}dialog{max-width:100%;width:100%;height:100dvh;max-height:100dvh;margin:0;border-radius:0;padding:20px}.table-wrap{display:none}.mobile-only{display:block}.toolbar{gap:8px}.toolbar input{flex-basis:100%}.order{padding:16px}.row{flex-wrap:wrap}.auth{margin:8vh 16px}.actions{padding-bottom:calc(14px + env(safe-area-inset-bottom))}}
@media(max-width:700px){header nav button{white-space:nowrap;font-size:13px;padding:9px 10px;flex:1}.selected{flex-wrap:wrap}.selected>div:first-child{overflow-wrap:anywhere;min-width:0}.quantity{margin-left:auto}fieldset{min-width:0}}

.account-menu{position:relative}.account-menu summary{cursor:pointer;list-style:none;min-height:44px;display:flex;align-items:center;padding:10px 12px;border:1px solid var(--line);border-radius:9px;max-width:190px;overflow-wrap:anywhere}.account-menu summary::-webkit-details-marker{display:none}.account-options{position:absolute;right:0;top:calc(100% + 8px);min-width:160px;padding:8px;background:white;border:1px solid var(--line);border-radius:10px;box-shadow:0 8px 24px #183a321a;z-index:10;display:grid;gap:4px}.account-options button{text-align:left;border:0}.account-menu summary:focus-visible{outline:2px solid #166858}

.internal-back{margin:0 0 14px;min-height:44px}



.required-star{color:#bd2830}



.config-tools{display:flex;gap:12px;flex-wrap:wrap;margin-top:16px}.config-line{display:grid;grid-template-columns:minmax(0,1fr) auto 24px;gap:12px}.config-name{overflow-wrap:anywhere}.parts-dialog{width:680px}.parts-results{max-height:50dvh;overflow:auto;margin-top:12px}.parts-choice{display:grid;grid-template-columns:minmax(0,1fr) 24px;align-items:center;gap:20px;padding:16px 4px;border-bottom:1px solid var(--line);cursor:pointer;text-align:left}.parts-choice small{display:block;margin-top:4px;font-weight:400}.parts-choice input{width:24px;height:24px;min-height:24px;margin:0}.parts-count{margin-right:auto}.parts-error{color:#b23838}.parts-dialog .actions{align-items:center;flex-wrap:wrap}@media(max-width:700px){.config-line{grid-template-columns:minmax(0,1fr) 24px}.config-line .quantity{grid-column:1;grid-row:2;margin-left:0;justify-content:flex-start}.parts-dialog .parts-results{max-height:calc(100dvh - 260px)}}

.base-quick{display:inline-flex;align-items:center;gap:8px}.base-quick button{padding:4px 8px;min-width:40px;min-height:40px;color:#166858}

.modal-x{font-size:26px;line-height:1;min-width:44px;min-height:44px;padding:6px}.config-line{grid-template-columns:minmax(0,1fr) auto}@media(max-width:650px){.config-line .quantity{grid-column:1 / -1}}

/* Mobile layout: usable controls and independent dialog scrolling. */

@media(max-width:700px){
 header{padding:12px 14px;gap:8px}header strong{font-size:17px}header strong .muted{display:none}.account-menu summary{max-width:130px;font-size:14px;padding:8px}
 header nav{gap:0;padding:6px 4px calc(6px + env(safe-area-inset-bottom))}header nav button{font-size:13px;padding:9px 3px;min-width:0}
 main{padding:0 12px 100px;margin-top:16px}.heading{gap:8px;margin-bottom:16px}.heading h1{font-size:23px}.heading>button{padding:10px;white-space:nowrap}.toolbar{display:grid;grid-template-columns:1fr 1fr}.toolbar input{grid-column:1/-1;min-width:0}.toolbar select{min-width:0;width:100%}
 .panel,.order{padding:14px}.order .meta{gap:8px}.order-footer small{min-width:0;overflow-wrap:anywhere}.order-footer button{flex-shrink:0}
 dialog{padding:0 14px 14px;overscroll-behavior:contain}dialog input,dialog select,dialog textarea{font-size:16px}dialog form{margin:0}.form-grid{gap:16px}label{font-size:14px}.picker{padding:12px}.config-line{grid-template-columns:minmax(0,1fr) auto}.config-line .quantity{grid-column:1/-1;grid-row:auto;justify-content:flex-end;width:100%;margin:0}.quantity button{min-width:44px}.quantity input{width:80px;text-align:center}.config-tools button{width:100%}
 .actions{z-index:6;border-top:1px solid var(--line);gap:10px;padding:12px 0 calc(12px + env(safe-area-inset-bottom));margin-bottom:-14px}.actions>button{flex:1}.notice{font-size:13px;padding:12px}
 .parts-dialog[open]{display:flex;flex-direction:column;padding-top:12px;overflow:hidden}.parts-dialog>.heading{flex-shrink:0;align-items:center;margin-bottom:12px}.parts-dialog>.heading h2{margin:0}.parts-search{flex-shrink:0}.parts-dialog .parts-results{flex:1;min-height:0;max-height:none;overflow-y:auto;overscroll-behavior:contain}.parts-choice{gap:12px;padding:14px 2px}.parts-dialog .actions{position:static;flex-shrink:0;margin-top:0}.parts-count{flex-basis:100%;font-size:13px}.parts-error:empty{display:none}.parts-error{margin:6px 0}
}

/* Actions belong to the form flow and never cover its fields. */
.actions{position:static;bottom:auto;margin-bottom:0}.internal-back{margin:0}header>.internal-back{flex-shrink:0}
.dashboard-bottom{display:flex;align-items:center;justify-content:center;gap:8px}
.mobile-account-footer{display:none}
@media(max-width:700px){
 header{justify-content:flex-end;min-height:58px}header>strong{margin-left:auto;text-align:right}header>.internal-back{margin-right:auto}header>.account-menu{display:none}
 .mobile-account-footer{display:flex;justify-content:flex-start;margin:0;padding:0;border:0;min-width:0}.mobile-account-footer .account-menu{font-size:13px}.mobile-account-footer .account-menu summary{font-size:13px;min-height:40px;padding:6px 0;max-width:none;border:0;border-radius:0;background:transparent;color:#607b73}.mobile-account-footer .account-options{top:auto;bottom:calc(100% + 6px);left:0;right:auto;transform:none}
 .actions{position:static;flex-shrink:0;margin-bottom:0;padding-bottom:calc(14px + env(safe-area-inset-bottom))}.parts-dialog[open]{overflow:auto}.parts-dialog .parts-results{flex:none;max-height:none;overflow:visible}.parts-dialog .actions{margin-top:12px}
}

@media(max-width:700px){header{padding:0;min-height:0;border:0}header>strong,header>.internal-back,header>.account-menu{display:none}main{margin-top:18px}}

[hidden]{display:none!important}
.list-pager{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;padding:14px 0}.list-pager span{font-size:13px;color:var(--muted)}
.inline-base{display:flex;align-items:center;gap:4px;flex-wrap:wrap;margin:0}.inline-base input{width:76px!important;min-width:0;min-height:36px;padding:6px 8px;text-align:center;appearance:textfield;-moz-appearance:textfield}.inline-base input::-webkit-inner-spin-button,.inline-base input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.inline-base .error{flex-basis:100%;font-size:12px}.inline-base .error:empty{display:none}.inline-base[aria-busy=true] input{opacity:.65}
@media(max-width:700px){
 #productList .compact-stock{padding:9px 10px;margin:6px 0;border-radius:9px}
 .compact-stock h3{font-size:15px;margin:0;line-height:1.35;overflow-wrap:anywhere}.compact-stock .stock-heading{display:flex;align-items:baseline;flex-wrap:wrap;column-gap:8px;row-gap:1px;min-width:0;flex:1}
 .compact-stock .row{gap:8px;align-items:center;flex-wrap:nowrap;margin:0 0 5px}
 .compact-stock .stock-spec{font-size:13px;color:#6c8089;margin:0;line-height:1.35;overflow-wrap:anywhere}
 .stock-numbers{display:flex;align-items:center;justify-content:space-between;gap:6px;flex-wrap:wrap;font-size:13px}.stock-numbers b{font-size:17px}.stock-numbers .base-quick{display:inline-flex;align-items:center;gap:3px}.stock-numbers button{padding:3px 6px;min-width:32px;min-height:32px}.compact-stock .stock-numbers{flex-wrap:nowrap}.compact-stock .base-quick{white-space:nowrap}
 .compact-stock .badge{font-size:11px;padding:4px 7px;white-space:nowrap}
 
 .list-pager button{font-size:13px;padding:8px;min-height:40px}
}

.modal-heading,dialog.parts-dialog>.heading{position:static;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0;margin:0 0 14px;background:transparent}.modal-heading h2{margin:0}.modal-heading .modal-x,.parts-dialog .modal-x{position:static;flex:none;margin:0}
@media(max-width:700px){
 dialog{padding:12px;max-width:100%;box-sizing:border-box}.modal-heading,dialog.parts-dialog>.heading{padding:0 0 8px;margin-bottom:10px;border-bottom:1px solid var(--line)}.modal-heading h2,.parts-dialog h2{font-size:18px;margin:0}.modal-x{width:36px;min-width:36px;min-height:36px;height:36px;font-size:23px}
 dialog .picker{padding:9px;margin-top:10px}dialog .picker h3{font-size:15px;margin:0 0 5px}dialog .config-line{display:grid;grid-template-columns:minmax(0,1fr) 124px;gap:6px;padding:7px 0;align-items:center}dialog .config-line .config-name{font-size:14px;line-height:1.35}dialog .config-line .config-name small{font-size:12px}dialog .config-line .quantity{grid-column:2;grid-row:1;width:auto;justify-content:flex-end;gap:3px;margin:0}dialog .quantity button{min-width:36px;min-height:36px;width:36px;padding:3px;font-size:16px}dialog .quantity input{width:46px;min-width:0;min-height:36px;height:36px;padding:3px;text-align:center;font-size:16px}
 dialog .config-tools{margin-top:7px;gap:6px}dialog .config-tools button{width:auto;min-height:36px;padding:6px 10px;font-size:13px}.parts-choice{padding:9px 2px;gap:10px;font-size:14px}.parts-choice small{font-size:12px;margin-top:2px}.parts-dialog .heading{min-height:0}
}



.launch-cover{min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:36px 24px;background:radial-gradient(ellipse at 80% 12%,#dcefe6 0,transparent 48%),radial-gradient(ellipse at 8% 90%,#e5eeed 0,transparent 45%),#f6f9f7;text-align:center;color:#173d36}.launch-brand{margin:auto 0;transform:translateY(-10px)}.launch-icon{width:104px;height:104px;margin:0 auto 28px;padding:15px;border-radius:28px;background:linear-gradient(145deg,#1e7e69,#114e43);box-shadow:0 18px 40px #165b4320}.launch-icon svg{width:100%;height:100%}.launch-cover h1{font-size:30px;letter-spacing:3px;margin:0 0 12px}.launch-cover p{font-size:14px;color:#648078;letter-spacing:2px;margin:0 0 42px}.launch-progress{height:3px;width:132px;overflow:hidden;background:#d9e8e1;border-radius:4px;margin:0 auto 16px}.launch-progress span{display:block;width:45%;height:100%;background:#328775;border-radius:4px;animation:launch-slide 1.4s ease-in-out infinite}.launch-cover small{font-size:12px;color:#80978e}.launch-caption{font-size:11px;letter-spacing:1px;color:#8a9e95;padding-bottom:env(safe-area-inset-bottom)}@keyframes launch-slide{from{transform:translateX(-100%)}to{transform:translateX(325%)}}@media(prefers-reduced-motion:reduce){.launch-progress span{animation:none;margin:auto}}

/* Compact mobile choices; scoped to avoid changing order and parts dialogs. */
dialog.compact-choice{width:320px;max-width:calc(100vw - 40px);height:auto;max-height:65dvh;margin:auto;padding:14px;border-radius:16px;overflow:auto;box-shadow:0 16px 48px #12362b26}
.choice-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.choice-heading h2{font-size:16px;margin:0}.choice-heading button{font-size:22px;line-height:1;padding:4px;min-width:36px;min-height:36px;border:0;background:#f1f5f3}.choice-list{max-height:42dvh;overflow-y:auto;overscroll-behavior:contain}.choice-list button{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;min-height:42px;padding:10px 12px;border:0;border-radius:7px;text-align:left;font-size:14px;margin:2px 0}.choice-list button[aria-selected=true]{background:#e4f2ec;color:#166858;font-weight:600}.choice-list button span:first-child{overflow-wrap:anywhere}.choice-search{font-size:16px;min-height:38px;margin-bottom:8px;padding:8px 10px}
.shipping-status{border:0;padding:0;margin:16px 0 0;min-width:0}.shipping-status legend{font-size:14px;font-weight:600;margin-bottom:8px}.status-options{display:flex;gap:8px;flex-wrap:wrap}.status-options label{display:flex;align-items:center;gap:6px;cursor:pointer;border:1px solid var(--line);border-radius:8px;padding:9px 12px;font-size:14px;font-weight:400;min-height:42px}.status-options label:has(input:checked){background:#e4f2ec;border-color:#328775;color:#166858}.status-options input[type=radio]{appearance:auto;width:16px;height:16px;min-height:0;padding:0;margin:0;accent-color:#166858}.shipping-status:disabled{opacity:.65}.shipping-status:disabled label{cursor:default}
@media(max-width:700px){.toolbar select{font-size:14px;min-height:40px;padding:8px 10px}.status-options{gap:6px}.status-options label{flex:1;justify-content:center;padding:8px 5px;white-space:nowrap;font-size:13px}}

/* Explicit sizing prevents mobile dialog stretching between default insets. */
dialog.compact-choice{inset:auto;top:50%;left:50%;right:auto;bottom:auto;transform:translate(-50%,-50%);margin:0;min-height:0;height:fit-content;max-height:65dvh}.compact-choice .choice-list{height:auto;min-height:0;max-height:36dvh}.calendar-month{display:flex;align-items:center;justify-content:space-between;margin:4px 0 8px}.calendar-month button{min-height:32px;padding:2px 12px;font-size:22px;border:0}.calendar-month b{font-size:15px}.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;text-align:center}.calendar-grid small{padding:4px 0;font-size:12px}.calendar-grid button{min-height:32px;height:32px;padding:0;border:0;font-size:14px;border-radius:6px}.calendar-grid button.chosen{background:#166858;color:white}.calendar-footer{display:flex;justify-content:space-between;border-top:1px solid var(--line);margin-top:10px;padding-top:8px}.calendar-footer button{min-height:32px;padding:4px 12px;font-size:13px;color:#166858}

.config-group{margin-top:12px;padding:16px}.config-group h3{margin:0}.config-group p{margin:8px 0}.config-grid{display:grid;grid-template-columns:minmax(0,1fr) 70px;gap:12px;padding:10px 0;border-top:1px solid #e5eceb;align-items:center}.config-grid small{display:block;color:#73848b;margin-top:3px;overflow-wrap:anywhere}.config-grid>b,.config-grid>span:last-child{text-align:right}.config-grid-head{color:#73848b;font-size:13px}@media(max-width:700px){.config-group{padding:12px}.config-grid{padding:8px 0}}

.calendar-subtitle{display:block;margin:0 0 8px;overflow-wrap:anywhere}.calendar-selection{font-size:13px;margin:10px 0 0;color:#40635b}.calendar-error{font-size:13px;margin:6px 0 0}.calendar-error:empty{display:none}.calendar-footer{gap:6px}.calendar-footer button.primary{color:white}

/* Mobile tabs already identify the page: keep only compact action controls. */
@media(max-width:700px){
 .page-heading .page-intro{display:none}
 .page-heading{justify-content:flex-end;align-items:center;margin:0 0 8px;gap:8px}
 .page-heading:has(>.page-intro:only-child),.page-heading:has(>button[hidden]){display:none}
 .page-heading>button{min-height:36px;padding:7px 12px;font-size:13px}
 .page-heading+.toolbar{margin-top:0}
 #main[data-page="configs"]>.toolbar{margin-top:0}
 .toolbar-three{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
 .toolbar-three select{font-size:13px;min-height:40px;padding:8px 5px;min-width:0}
}
@media(max-width:360px){.toolbar-three{gap:5px}.toolbar-three select{font-size:12px;padding-left:4px;padding-right:3px}}

/* Keep create actions beside their related search or filter controls. */
.search-action{display:flex;align-items:stretch;gap:8px;flex:2;min-width:300px}
.search-action input{min-width:0;flex:2}
.toolbar-action{background:#e4f1ec;color:#166858;border:1px solid #c4ded5;font-weight:600;white-space:nowrap;padding:9px 14px;min-height:44px;border-radius:8px;flex-shrink:0}
.toolbar-action:hover{background:#d7eae2;border-color:#7eb5a3}
.toolbar-action:focus-visible{outline:2px solid #166858;outline-offset:2px}
@media(max-width:700px){
 .toolbar-three>.search-action{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);min-width:0;gap:8px}
 .toolbar-three>.search-action:has(>button[hidden]){grid-template-columns:1fr}
 .search-action>input{grid-column:auto;font-size:14px;padding:10px;min-height:42px}
 .toolbar-action{font-size:14px;min-height:42px;padding:8px 10px}
 .product-toolbar>.toolbar-action{min-height:40px;padding:8px 10px}
}

/* Keep the mobile account control aligned with the dashboard pagination. */
@media(max-width:700px){
 .dashboard-bottom{justify-content:space-between;gap:6px;padding:12px 0}
 .dashboard-bottom>.list-pager{padding:0;gap:5px;flex-wrap:nowrap;flex-shrink:0}
 .dashboard-bottom .list-pager span{font-size:12px;white-space:nowrap}
 .dashboard-bottom .list-pager button{font-size:12px;min-height:36px;padding:7px;white-space:nowrap}
 .dashboard-bottom .account-menu summary{min-height:36px;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:24px;max-width:100px}
}

/* Avoid WebView tap flashes while preserving keyboard focus feedback. */
html,button,a,summary,label,select,input,textarea{-webkit-tap-highlight-color:transparent}
button:focus:not(:focus-visible),summary:focus:not(:focus-visible){outline:none}
button:focus-visible,summary:focus-visible{outline:2px solid #166858;outline-offset:2px}
@media(hover:none){
 button:active:not(:disabled):not(.primary),summary:active{background-color:#e4f1ec}
 button.primary:active:not(:disabled){background-color:#125747}
}
@media(max-width:700px){
 /* Hide tabs only for text entry, never while opening or closing a popup. */
 body.mobile-input-active header nav{visibility:hidden;pointer-events:none}
 dialog:not(.compact-choice){inset:0;background:#fff;outline:none}
}
/* Read-only order references for the quantity already deducted from stock. */
/* Compact dashboard: one total, four time groups, and a single undated row. */
.shipping-overview{margin-bottom:26px}
.shipping-overview button{width:100%;text-align:left;min-width:0;font-variant-numeric:tabular-nums}
.overview-total{display:flex;align-items:center;gap:16px;padding:12px 22px;background:#eef5f2;color:#24594d;border:1px solid #d6e5df;border-radius:14px;margin-bottom:12px}
.overview-total-main{display:grid;gap:2px;min-width:0;flex:1}
.overview-total-label{font-size:14px;line-height:20px;color:#4d6e64}
.overview-number{display:inline-flex;align-items:baseline;gap:7px;white-space:nowrap}
.overview-number b{font-size:32px;line-height:1.1;font-weight:700;letter-spacing:-.5px}
.overview-number em{font-style:normal;font-size:14px;font-weight:400;color:#667d84}
.overview-total .overview-number b{font-size:34px}
.overview-total .overview-number em{color:#688177}
.overview-total-count{max-width:50%;font-size:14px;line-height:1.6;padding:6px 0 6px 24px;border-left:1px solid #d5e3dc;color:#4d6e64}
.overview-chevron{font-size:23px;line-height:1;font-weight:400;color:#82918f;flex:none}
.overview-total .overview-chevron{color:#759186}
.overview-breakdown{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden}
.overview-category{border:0;border-radius:0;padding:18px 22px;background:#fff;color:#1e3541;--overview-dot:#258369}
.overview-category:nth-child(2n){border-left:1px solid #e5ebed}
.overview-category:nth-child(n+3){border-top:1px solid #e5ebed}
.overview-label{display:flex;align-items:center;gap:8px;font-size:15px;line-height:1.4;white-space:nowrap}
.overview-label i{width:8px;height:8px;border-radius:50%;background:var(--overview-dot,#8c979f);flex:none}
.overview-category.overdue{--overview-dot:#bf4545}
.overview-category.urgent{--overview-dot:#df8080}
.overview-category.soon{--overview-dot:#dda025}
.overview-category-body{display:flex;align-items:baseline;gap:10px;margin-top:10px}
.overview-category-body small{margin-left:auto;font-size:13px;line-height:1.5;text-align:right}
.overview-category-body .overview-chevron{font-size:20px;align-self:center}
.overview-undated{grid-column:1/-1;display:flex;align-items:center;gap:12px;padding:14px 22px;border:0;border-top:1px solid #e5ebed;border-radius:0;background:#fff}
.overview-undated-count{margin-left:auto;text-align:right;font-size:14px;line-height:1.5;color:#667d84}
.overview-note{margin:8px 2px 0;color:#7b8c92;font-size:12px;line-height:1.6}
.shipping-overview button:focus-visible{outline:2px solid #166858;outline-offset:-3px}
.shipping-overview .overview-total:focus-visible{outline-color:#166858;outline-offset:-5px}
@media(hover:hover){.overview-total:hover{background:#e5efe9;border-color:#c8dcd2}.overview-category:hover,.overview-undated:hover{background:#f4f8f6}}
@media(hover:none){button.overview-total:active:not(:disabled):not(.primary){background-color:#e5efe9}}
@media(max-width:700px){
 .shipping-overview{margin-bottom:22px}
 .overview-total{padding:10px 14px;gap:12px;margin-bottom:10px;border-radius:12px}
 .overview-total-label{font-size:13px;line-height:17px}
 .overview-total .overview-number b{font-size:30px;line-height:30px}
 .overview-total .overview-number em{font-size:13px}
 .overview-total-count{font-size:13px;padding:4px 0 4px 16px}
 .overview-breakdown{border-radius:12px}
 .overview-category{padding:13px 12px}
 .overview-label{font-size:14px;gap:7px}
 .overview-category-body{gap:6px;margin-top:9px}
 .overview-category .overview-number{gap:5px}
 .overview-category .overview-number b{font-size:27px;line-height:30px}
 .overview-category .overview-number em{font-size:12px}
 .overview-category-body small{font-size:11px}
 .overview-category-body .overview-chevron{font-size:18px}
 .overview-undated{padding:12px;gap:8px}
 .overview-undated-count{font-size:12px}
 .overview-note{font-size:11px;margin-top:8px}
}
@media(max-width:360px){.overview-category{padding:12px 10px}.overview-category-body{gap:4px}.overview-category .overview-number b{font-size:25px}.overview-category-body small{font-size:10px}.overview-label{font-size:13px}}
button.deduction-link{border:0;background:transparent;color:#166858;padding:5px 0;min-width:44px;min-height:40px;text-align:left;text-decoration:underline;text-decoration-color:#9fc6b9;text-underline-offset:3px}
dialog.deduction-dialog{width:560px;max-width:calc(100vw - 32px)}
.deduction-product{font-size:13px;color:#6c8089;margin:0 0 12px;overflow-wrap:anywhere;line-height:1.5}
.deduction-list{max-height:44dvh;overflow:auto;overscroll-behavior:contain}
.deduction-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:14px}
.deduction-table th,.deduction-table td{padding:11px 7px;vertical-align:middle;overflow-wrap:anywhere}
.deduction-table th{background:#f3f7f5;font-size:12px;font-weight:500}
.deduction-table th:first-child{width:40%}.deduction-table th:nth-child(2){width:17%}.deduction-table th:nth-child(3){width:20%}.deduction-table th:last-child{width:23%}.deduction-table .deduction-qty{font-weight:600;white-space:nowrap}
.deduction-table .badge{font-size:12px;padding:4px 6px;white-space:nowrap}
.deduction-empty{margin:20px 0;text-align:center;color:#6c8089;font-size:14px}
@media(max-width:700px){.stock-numbers .deduction-link{padding:4px 0}.deduction-table{font-size:13px}.deduction-table th,.deduction-table td{padding:10px 5px}}

/* Configuration lookup lives inside orders; the three primary tabs stay visible. */
.order-list-tools{display:flex;align-items:center;justify-content:space-between;gap:12px}
.order-list-tools small{min-width:0}
.summary-entry{border:0;background:transparent;color:#166858;padding:5px 0 5px 12px;min-height:40px;white-space:nowrap;font-size:13px}
.summary-entry span{margin-left:3px}
.config-summary-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.config-summary-heading h2{font-size:20px;margin:0}
.config-summary-heading button{min-height:40px;min-width:40px;padding:4px;font-size:24px;line-height:1;background:transparent;border:0}
.config-summary-heading+.toolbar{margin-top:0}
@media(max-width:700px){.config-summary-heading h2{font-size:18px}.order-list-tools{gap:8px}}

.order-requirements{margin:10px 0 12px;padding:9px 11px;border-radius:7px;background:#f1f6f4;color:#435e56;font-size:13px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere}
.order-requirements>span{font-weight:600}

/* Keep the configuration section and delivery fields evenly spaced. */
.order-delivery-fields{margin-top:15px}
@media(max-width:700px){.order-delivery-fields{margin-top:16px}}

/* Allow normal scrolling without pinch/double-tap zoom on the mobile workbench. */
@media(max-width:700px){html,body{touch-action:pan-x pan-y}}

/* Mobile choices stay in the page layer: no native dialog or body scroll-lock toggle. */
.mobile-choice-trigger{display:none}
.choice-overlay{position:fixed;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;padding:20px;background:#132e3c70;overscroll-behavior:contain;touch-action:pan-y}
.choice-panel{width:320px;max-width:100%;max-height:65dvh;overflow:auto;padding:14px;border:1px solid var(--line);border-radius:16px;background:white;box-shadow:0 16px 48px #12362b26;color:#1e3541}
.choice-panel .choice-list{max-height:36dvh;min-height:0}
@media(max-width:700px){
 select.mobile-choice-source{display:none}
 button.mobile-choice-trigger{display:block;width:100%;min-width:0;min-height:40px;padding:8px 24px 8px 10px;border:1px solid #cdd8de;border-radius:8px;text-align:left;font-size:14px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:white;position:relative}
 button.mobile-choice-trigger:after{content:'';position:absolute;right:10px;top:calc(50% - 4px);width:6px;height:6px;border-right:1px solid currentColor;border-bottom:1px solid currentColor;transform:rotate(45deg);pointer-events:none}
 label>button.mobile-choice-trigger{margin-top:7px;font-size:16px;min-height:44px}
 .toolbar-three>button.mobile-choice-trigger{font-size:13px;padding-left:5px;padding-right:20px}
 header nav{gap:4px;padding:5px 6px calc(5px + env(safe-area-inset-bottom))}
 header nav button{background:transparent;min-height:42px;padding:4px 3px}
 header nav button.active,header nav button:active:not(:disabled):not(.primary){background:transparent}
 header nav .nav-label{display:block;width:max-content;max-width:100%;margin:auto;padding:8px 14px;line-height:18px;border-radius:8px}
 header nav button.active .nav-label{background:#e4f1ec}
}

/* Every popup shares the page layer. No native top-layer promotion or page scroll-lock. */
:root{background:#fff;color-scheme:light}
body{background:#fff;min-height:100vh;min-height:100dvh}
#app{background:#f3f6f8;min-height:100vh;min-height:100dvh;display:flow-root}
.modal-layer{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:#132e3c70;overscroll-behavior:contain;isolation:isolate}
.modal-layer>dialog[open]{display:block;position:relative;inset:auto;transform:none;margin:0;max-height:90dvh;overscroll-behavior:contain;color:inherit}
.modal-layer>dialog.compact-choice[open]{width:320px;max-width:calc(100vw - 40px);height:auto;min-height:0;max-height:75dvh;margin:0}
.modal-layer>dialog.deduction-dialog[open]{width:560px}
/* Full-page mobile forms have one document scroller and one opaque white surface. */
body.mobile-editor-page{background:#fff;overscroll-behavior-y:none}
.modal-layer.mobile-page-layer{position:relative;inset:auto;display:block;background:#fff;min-height:100vh;min-height:100dvh;isolation:auto;overscroll-behavior:auto}
.modal-layer.mobile-page-layer>dialog[open]:not(.compact-choice){position:static;inset:auto;display:block;transform:none;width:100%;max-width:none;height:auto;min-height:100vh;min-height:100dvh;max-height:none;margin:0;border:0;border-radius:0;overflow:visible;overscroll-behavior:auto;background:#fff;padding:12px 14px calc(96px + env(safe-area-inset-bottom,0px));box-shadow:none}
.mobile-page-layer .modal-heading{position:static;background:#fff}
.mobile-page-layer .parts-results{max-height:none;overflow:visible}
.sales-manager{max-width:100%}.sales-add{display:flex;align-items:center;gap:8px;margin:16px 0 8px}.sales-add input{flex:1;min-width:0}.sales-add button{flex:none;padding:9px 18px}
.sales-hint{font-size:12px;color:#6c8089;margin:8px 0 12px}.sales-error:empty{display:none}.sales-error{font-size:13px;margin:8px 0}
.sales-list{display:flex;flex-direction:column}.sales-entry{display:flex;align-items:center;gap:8px;border-top:1px solid #edf1f3;padding:8px 0;min-height:52px}
.sales-entry button{font-size:14px;min-height:36px;padding:6px 10px;white-space:nowrap}.sales-name{flex:1;min-width:0;text-align:left;border:0;font-weight:500;display:flex;align-items:center;gap:8px;background:transparent}.sales-name span{font-size:13px;color:#879b96}.sales-entry .sales-remove{border:0;color:#a43e3e;background:#fff5f3}.sales-entry .sales-save{color:#166858;background:#e4f1ec}.sales-entry input{flex:1;min-width:0;min-height:38px;padding:6px 10px}.sales-remove-label{flex:1;overflow-wrap:anywhere;font-size:14px}
@media(max-width:700px){
 .modal-layer>dialog[open]:not(.compact-choice){width:100%;max-width:100%;height:100%;max-height:100%;border:0;border-radius:0;background:#fff;padding-bottom:max(16px,env(safe-area-inset-bottom))}
 .modal-layer>dialog:has(.sales-manager)[open]{width:calc(100% - 32px);max-width:380px;height:auto;max-height:80dvh;border-radius:14px;padding:14px}
 .sales-manager .modal-heading{margin-bottom:12px}.sales-entry .sales-name{padding-left:0}.sales-add input{font-size:16px}
}

/* Mobile overlays keep the host surface unchanged while blocking background input. */
@media(max-width:700px){.modal-layer:not(.mobile-page-layer),.choice-overlay{background:transparent}.modal-layer>dialog.compact-choice[open],.choice-panel{box-shadow:0 6px 28px #183a3226;border:1px solid #cdd8de}}

.order-title-row{display:flex;justify-content:flex-start;gap:0;align-items:center}.order-title-row h3{overflow-wrap:anywhere}.order-title-row .order-sales{margin-left:28px;text-align:left;font-size:16px;font-weight:700;flex-shrink:0}.order-title-row>.badge{margin-left:auto}.order-title-row>h3:first-child{min-width:0}@media(max-width:700px){.order-title-row .order-sales{margin-left:16px}.order-title-row>.badge{margin-left:auto;flex-shrink:0}}

/* Shared popup edge treatment approved in the preview. */
.modal-layer>dialog[open],.modal-layer>dialog.compact-choice[open],.modal-layer>dialog:has(.sales-manager)[open],.modal-layer.mobile-page-layer>dialog[open]:not(.compact-choice),.choice-overlay>.choice-panel{border:2px solid #8daaa3;box-shadow:0 8px 26px rgba(28,67,57,.14)}
