:root{--ink:#172a36;--muted:#71818c;--accent:#117b69;--line:#e4eae9;--bg:#f5f7f6;--red:#b7443d;--amber:#916520}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.65 "Segoe UI","Microsoft YaHei",sans-serif}button,input,textarea,select{font:inherit}button{cursor:pointer;transition:background .15s}button:disabled{opacity:.5;cursor:not-allowed}[hidden]{display:none!important}header{height:92px;max-width:1220px;margin:auto;padding:0 32px;display:flex;justify-content:space-between;align-items:center}.brand{display:flex;align-items:center;gap:12px;font-size:18px;font-weight:700}.brand small{display:block;font-size:9px;letter-spacing:2px;color:var(--muted);font-weight:500}.logo{display:grid;place-items:center;width:44px;height:44px;border-radius:13px;background:var(--accent);color:white;font-size:21px;letter-spacing:-1px}.safe-pill{background:#e5f3eb;color:#286a4f;font-size:12px;padding:7px 12px;border-radius:20px}.safe-pill i{display:inline-block;width:6px;height:6px;border-radius:50%;background:#379866;margin-right:6px}main{max-width:1220px;margin:auto;padding:26px 32px 24px}.intro{display:flex;align-items:center;justify-content:space-between;gap:30px;margin-bottom:29px}.eyebrow{font-size:10px;color:var(--accent);letter-spacing:2px;margin:0 0 9px;font-weight:700}h1{font-size:34px;letter-spacing:-1px;line-height:1.4;margin:0 0 10px;font-weight:650}.lead{margin:0;color:var(--muted);font-size:13px}.safety-card{padding:14px 17px;border:1px solid #d6e5dd;border-radius:12px;background:#ecf4ef;flex-shrink:0}.safety-card b,.safety-card span{display:block}.safety-card b{font-size:13px;color:#31624b}.safety-card span{font-size:11px;color:#6b8674;margin-top:3px}.tabs{display:flex;gap:25px;border-bottom:1px solid var(--line);margin-bottom:25px}.tab{background:none;border:0;padding:14px 0;color:var(--muted);border-bottom:3px solid transparent;font-weight:600}.tab.active{color:var(--accent);border-bottom-color:var(--accent)}.layout{display:grid;grid-template-columns:1.06fr 1fr;gap:24px}.panel{background:#fff;border:1px solid var(--line);border-radius:18px;padding:26px;box-shadow:0 8px 24px #163a2510}.panel-head{display:flex;align-items:center;gap:12px;margin-bottom:24px}.step{width:36px;height:36px;border:1px solid #dbe9e2;color:var(--accent);border-radius:10px;display:grid;place-items:center;font-size:12px;background:#f6faf7;font-weight:700}h2{font-size:17px;margin:0;font-weight:650}.panel-head p{font-size:11px;color:var(--muted);margin:1px 0 0}.mode-switch{display:flex;padding:4px;background:#f1f4f2;border-radius:10px;margin-bottom:18px}.mode-switch button{border:0;background:none;color:var(--muted);flex:1;padding:8px;border-radius:7px;font-size:12px}.mode-switch .selected{background:white;color:var(--accent);box-shadow:0 2px 7px #263f2610;font-weight:650}.fixture-controls{display:flex;align-items:center;gap:8px;margin-bottom:16px;font-size:11px;flex-wrap:wrap}.fixture-controls label{color:var(--muted)}select{border:1px solid var(--line);background:white;border-radius:7px;padding:6px;font-size:11px;flex:1}.text-btn{border:0;background:none;color:var(--accent);padding:3px;font-size:11px}.field-label{display:block;color:#536970;font-size:12px;font-weight:600;margin:15px 0 8px}textarea{resize:vertical;width:100%;height:200px;border:1px solid #dce4e2;border-radius:10px;padding:13px;background:#fbfcfb;font:12px/1.7 Consolas,monospace;outline:none}textarea:focus,input:focus,select:focus{border-color:#4f9c88;box-shadow:0 0 0 3px #117b6910;outline:none}.hint{font-size:11px;color:var(--muted);margin:8px 0 16px}.primary{background:var(--accent);border:0;color:white;border-radius:9px;font-weight:600;padding:12px 18px;font-size:13px}.primary:hover{background:#0b6858}#quoteButton{width:100%;display:flex;justify-content:space-between;margin-top:19px}.notice{background:#f0f6fb;color:#42627f;border:1px solid #dce8f0;padding:11px 13px;border-radius:9px;font-size:12px;margin:15px 0;overflow-wrap:anywhere}.notice.error{background:#fff2ef;border-color:#f2d9d2;color:var(--red)}.notice.success{background:#edf8f1;border-color:#d7ebdf;color:#2d7952}.notice.warning{background:#fff8e9;border-color:#eee0c0;color:var(--amber)}.empty{text-align:center;padding:70px 20px 86px;color:#9aa9ad}.empty-icon{width:62px;height:62px;border:1px solid var(--line);border-radius:19px;margin:0 auto 18px;display:grid;place-items:center;font-size:29px;background:#f8faf9}.empty h3{font-size:15px;font-weight:500;margin-bottom:5px;color:#6e858c}.empty p{font-size:12px;margin:0}.quote-tags{display:flex;gap:8px}.quote-tags span{font-size:10px;background:#eef5f1;color:#457b63;padding:4px 9px;border-radius:5px}.email{font-size:15px;font-weight:600;overflow-wrap:anywhere}.amount-box{background:#f1f8f4;border:1px solid #dcebe1;border-radius:13px;margin:20px 0 12px;padding:20px}.amount-box span{font-size:12px;color:#5d7a6b}.amount-box strong{display:block;color:#167156;font-size:25px;line-height:1.4;margin:5px 0}.amount-box b{font-size:44px;font-weight:650;letter-spacing:-1px}.amount-box small{color:#91a096;font-size:10px}.quote-id{font:10px Consolas,monospace;color:#8d9c9d}.purchase-note{font-size:11px;color:#7b898b;border-top:1px solid var(--line);padding-top:16px;margin-top:17px}.purchase-note b{font-weight:500;color:#a17b43}.voucher-entry{display:flex;gap:9px}.voucher-entry input{min-width:0;flex:1;border:1px solid var(--line);border-radius:8px;padding:10px;font-size:12px}.voucher-entry button{white-space:nowrap;font-size:12px;padding:10px 13px}.admin-toolbar{display:flex;justify-content:space-between;align-items:center;gap:15px;margin:26px 0 20px}.admin-toolbar p{color:var(--muted);font-size:12px;margin:3px 0}.secondary{border:1px solid #d7e2dc;background:#fff;color:var(--accent);border-radius:8px;padding:8px 14px;font-size:12px}.admin-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:22px}.admin-stats div{background:white;padding:17px 20px;border:1px solid var(--line);border-radius:12px}.admin-stats span{display:block;color:var(--muted);font-size:11px}.admin-stats b{font-size:19px;display:block;margin-top:6px;font-weight:600}.green{color:var(--accent)}.admin-list{display:grid;gap:16px}.order-card{background:white;border:1px solid var(--line);border-radius:14px;padding:20px}.order-title{display:flex;justify-content:space-between;align-items:flex-start;gap:14px}.order-title h3{margin:0;font-size:15px}.order-title p{margin:3px 0 0;font:10px Consolas,monospace;color:var(--muted)}.badge{background:#f5edda;padding:4px 8px;color:#9a7432;border-radius:5px;font-size:10px;white-space:nowrap}.badge.live{background:#e9f0fa;color:#506fa0}.metrics{display:grid;grid-template-columns:repeat(4,1fr);margin:17px 0;gap:15px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:15px 0}.metrics span{display:block;font-size:10px;color:var(--muted)}.metrics b{font-size:17px;font-weight:600}.meta{color:var(--muted);font-size:11px;line-height:1.9;overflow-wrap:anywhere}.order-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:14px}.order-actions code{font-size:11px;background:#f4f7f5;padding:6px;border-radius:5px;overflow-wrap:anywhere}.disabled-note{font-size:11px;color:var(--muted)}footer{display:flex;justify-content:space-between;margin-top:30px;color:#96a3a6;font-size:10px;letter-spacing:.5px}.toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);background:#173c33;color:white;border-radius:9px;padding:11px 20px;box-shadow:0 8px 24px #0002;font-size:12px;z-index:5}@media(max-width:850px){.intro{display:block}.safety-card{margin-top:18px}.layout{grid-template-columns:1fr}.admin-stats{grid-template-columns:1fr 1fr}h1{font-size:28px}header,main{padding-left:18px;padding-right:18px}.metrics{grid-template-columns:1fr 1fr}.panel{padding:20px}.brand{font-size:15px}.safe-pill{font-size:10px}footer{display:block}}
:root #voucher{width:100%;border:1px solid var(--line);border-radius:8px;padding:10px;font-size:12px;margin-bottom:12px}#liveConsent{width:auto;vertical-align:middle}#confirmButton{display:block;margin-top:16px}.provider-panel{margin-bottom:20px}.provider-panel .admin-toolbar{margin-top:0;margin-bottom:10px}
.search-bar{display:flex;gap:10px;align-items:center;margin:20px 0;flex-wrap:wrap}.search-bar input{flex:2;min-width:150px;border:1px solid var(--line);padding:10px;border-radius:8px}.search-bar select{flex:1;min-width:170px;padding:10px}.order-progress{list-style:none;margin:22px 0;padding:0}.order-progress li{position:relative;border-left:2px solid var(--line);padding:0 0 20px 20px;margin-left:7px;color:var(--muted)}.order-progress li:before{content:'';position:absolute;width:9px;height:9px;border:2px solid var(--line);border-radius:50%;background:white;left:-7px;top:5px}.order-progress strong,.order-progress small{display:block}.order-progress small{font-size:11px;font-weight:400;margin-top:3px}.order-progress .completed,.order-progress .succeeded{color:var(--accent)}.order-progress .completed:before,.order-progress .succeeded:before{background:var(--accent);border-color:var(--accent)}.order-progress .current,.order-progress .running{color:#986800}.order-progress .failed{color:var(--red)}#downloadInvoice{display:inline-block;text-decoration:none;margin:8px 0}
.local-history{margin-top:24px}.history-row{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:14px 0;border-bottom:1px solid var(--line)}.history-row strong,.history-row small{display:block;overflow-wrap:anywhere}.history-row small{color:var(--muted);font-size:11px;margin-top:4px}.history-row .order-actions{margin:0;flex-shrink:0}@media(max-width:600px){.history-row{align-items:flex-start;flex-direction:column}}
.quote-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:18px}.quote-options button{min-height:52px;white-space:normal}.quote-options button:only-child{grid-column:1/-1}#quoteExpiry{display:block;white-space:pre-line;line-height:1.8;font-size:12px;color:#536970}@media(max-width:480px){.quote-options{grid-template-columns:1fr}.order-actions>button,.order-actions>a{min-height:44px}.order-title h3{overflow-wrap:anywhere}}
.workspace{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:24px;align-items:start}.quote-workspace{min-width:0}.workspace .layout{grid-template-columns:1fr;gap:18px}.order-sidebar{position:sticky;top:18px;max-height:calc(100vh - 36px);overflow:auto;padding:22px}.side-order{border-top:1px solid var(--line);padding:20px 0}.side-order-email,.side-order-meta{display:block;overflow-wrap:anywhere}.side-order-meta{color:var(--muted);font-size:10px;margin-top:5px}.side-order .notice{margin:12px 0}.side-order details summary{cursor:pointer;color:var(--accent);font-size:12px}.side-order .order-actions{margin-top:12px}.side-order a{text-decoration:none}.side-order .order-progress{margin-bottom:0}@media(min-width:1450px){main,header{max-width:1500px}.workspace{grid-template-columns:minmax(0,1fr) 350px}.workspace .layout{grid-template-columns:1fr 1fr}}@media(max-width:900px){.workspace{grid-template-columns:1fr}.order-sidebar{position:static;max-height:none}.workspace .layout{grid-template-columns:1fr}}
.order-timing,.order-sync-status{display:block;color:var(--muted);font-size:11px;margin:8px 0;overflow-wrap:anywhere}
.side-order:focus{outline:2px solid var(--accent);outline-offset:4px;border-radius:6px}
@media(max-width:900px){.order-sidebar{grid-row:1}.quote-workspace{grid-row:2}.order-sidebar:has(#ordersEmpty:not([hidden])){grid-row:2}.workspace:has(#ordersEmpty:not([hidden])) .quote-workspace{grid-row:1}}

/* Customer-only layout: one reading flow, explicit current order, no nested
   full-height scroll area. Admin reports and financial display stay unchanged. */
.customer-page main,.customer-page header{max-width:1280px}
.customer-page .workspace{grid-template-columns:minmax(0,1fr) minmax(340px,410px);gap:24px}
.customer-page .workspace .layout{grid-template-columns:minmax(0,1fr);gap:24px;align-items:start}
.customer-page .panel{min-width:0;padding:24px;border-radius:16px;box-shadow:0 4px 18px #163a2508}
.customer-page .panel-head{min-height:40px;margin-bottom:20px;align-items:flex-start}
.customer-page .step{flex:0 0 36px}
.customer-page .order-sidebar{position:static;max-height:none;overflow:visible}
.customer-page textarea{height:144px;min-height:120px}
.customer-page .intro{margin-bottom:20px}
.customer-page h1{font-size:30px}
.progress-navigation{display:flex;justify-content:space-between;align-items:center;gap:16px;background:#eaf3ef;border:1px solid #d6e7df;border-radius:12px;padding:12px 16px;margin-bottom:24px}
.progress-navigation p{margin:0;color:#47675d;font-size:12px}
.progress-navigation button{flex-shrink:0;min-height:44px}
.customer-page .side-order{padding:16px 0;scroll-margin-top:20px;min-width:0}
.customer-page .side-order.selected{background:#f7fbf9;border:1px solid #c3ded2;border-radius:12px;padding:18px;margin-bottom:12px}
.customer-page .side-order.selected .side-order-meta:before{content:'当前查看 · ';color:#117b69;font-weight:600}
.customer-page .side-order:not(.selected) .notice{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:8px 0}
.customer-page .side-order:not(.selected) .order-timing{display:none}
.customer-page .side-order .order-actions{gap:8px}
.customer-page .side-order .order-actions>*{min-height:40px}
.customer-page .side-order:not(.selected) .order-actions>button:nth-child(2){display:none}
.customer-page #moreOrders{width:100%;min-height:44px;margin-top:16px}
.customer-page #quoteProgress{width:100%;margin-top:18px;min-height:44px}
.customer-page #confirmButton{width:100%;min-height:46px}
.customer-page #restoreStatus{border-bottom:1px solid var(--line);padding-bottom:14px;margin-bottom:0}
.customer-page .amount-box{padding:18px 20px;margin-top:18px}
.customer-page .local-history .admin-toolbar{margin-top:0}
.customer-page .order-progress li:last-child{padding-bottom:4px}
.customer-page :focus-visible{outline:2px solid #117b69;outline-offset:3px}
@media(max-width:900px){
 .customer-page .workspace{grid-template-columns:minmax(0,1fr)}
 .customer-page .order-sidebar{grid-row:2}.customer-page .quote-workspace{display:contents}
 .customer-page .workspace .layout{grid-row:1}.customer-page .local-history{margin-top:0}
 .customer-page .progress-navigation{position:sticky;top:0;z-index:3;box-shadow:0 3px 12px #173c3310}
 .customer-page .side-order{scroll-margin-top:110px}
}
@media(max-width:540px){
 .customer-page header{height:76px}.customer-page main{padding-top:12px}
 .customer-page .panel{padding:18px}.customer-page .workspace{gap:18px}
 .customer-page h1{font-size:25px}.customer-page .lead{font-size:12px}
 .progress-navigation{padding:10px 12px;gap:8px;flex-wrap:wrap}
 .progress-navigation p{flex:1 1 160px}.progress-navigation button{flex:1 0 auto}
 .customer-page .side-order.selected{padding:14px}
 .customer-page .history-row .order-actions{flex-wrap:wrap}
}
@media(prefers-reduced-motion:reduce){.customer-page *{scroll-behavior:auto!important;transition:none!important}}
