/* The approved independent-page prototype. All overrides are local to customer details. */
body.customer-route{--customer-bg:#f5f6f7;--customer-paper:#fff;--customer-ink:#203229;--customer-sub:#596b5f;--customer-line:#dfe6df;--customer-soft:#edf2ec;--customer-brand:#305d3e;--customer-onbrand:#fff;--customer-warn:#fbf4e6;--customer-amber:#72511b;--customer-red:#ae3434}
body.customer-route[data-theme="dark"],html[data-theme="dark"] body.customer-route{--customer-bg:#141414;--customer-paper:#1e1e1e;--customer-ink:#efefef;--customer-sub:#b4b4b4;--customer-line:#363636;--customer-soft:#28352b;--customer-brand:#c3e1a4;--customer-onbrand:#1a2b18;--customer-warn:#373023;--customer-amber:#f0cd8b;--customer-red:#ffabab}
@media(prefers-color-scheme:dark){html:not([data-theme="light"]) body.customer-route{--customer-bg:#141414;--customer-paper:#1e1e1e;--customer-ink:#efefef;--customer-sub:#b4b4b4;--customer-line:#363636;--customer-soft:#28352b;--customer-brand:#c3e1a4;--customer-onbrand:#1a2b18;--customer-warn:#373023;--customer-amber:#f0cd8b;--customer-red:#ffabab}}
body.customer-route .main{padding:25px 28px;background:var(--customer-bg)}
#p-customer{--bg:var(--customer-bg);--panel:var(--customer-paper);--panel2:var(--customer-bg);--tx:var(--customer-ink);--tx2:var(--customer-sub);--tx3:var(--customer-sub);--line:var(--customer-line);--line2:var(--customer-line);--lime:var(--customer-brand);--on-accent:var(--customer-onbrand);--field:var(--customer-paper);min-width:0;gap:0;font:14px/1.6 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--tx)}
#p-customer *,body.customer-route .customer-dialog *{box-sizing:border-box}
#p-customer h1,#p-customer h2,#p-customer h3,#p-customer h4,#p-customer p{margin:0;letter-spacing:normal}
#p-customer h1{font-size:24px;font-weight:500;letter-spacing:-.5px;line-height:1.6}
#p-customer h2{font-size:17px;font-weight:500;line-height:1.6}
#p-customer h3,#p-customer .sec>h4{font-size:14px;font-weight:500;letter-spacing:normal;color:var(--tx);line-height:1.6}
#p-customer button,#p-customer input,#p-customer select,#p-customer textarea{font:inherit;letter-spacing:normal}
#p-customer .dim,#p-customer .customer-muted,#p-customer .customer-note{font-size:12px;color:var(--tx2);line-height:1.6;letter-spacing:normal}
#p-customer .mono{font-family:inherit}
#p-customer .btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:7px 12px;border:1px solid var(--line);border-radius:7px;background:var(--panel);color:var(--tx);font-size:14px;font-weight:400;line-height:1.6;white-space:nowrap}
#p-customer .btn.pri{background:var(--lime);border-color:var(--lime);color:var(--on-accent);font-weight:400}
#p-customer .lnk{border:0;background:none;color:var(--lime);font-size:14px;font-weight:400;padding:4px 6px;min-height:30px;line-height:1.6}
#p-customer .btn.danger{color:var(--customer-red)}
#p-customer .acts{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
#p-customer .customer-back{align-self:flex-start;margin-bottom:26px;padding:0;color:var(--tx2);font-size:12px}
#p-customer .customer-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:23px}
#p-customer .customer-person{display:flex;align-items:center;gap:13px;min-width:0}
#p-customer .customer-avatar{height:46px;width:46px;border-radius:12px;display:grid;place-items:center;flex:none;background:var(--customer-soft);color:var(--lime);font-size:20px;font-weight:500}
#p-customer .customer-titleline{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
#p-customer .customer-contact{font-size:12px;color:var(--tx2);margin-top:3px;overflow-wrap:anywhere}
#p-customer .pill{display:inline-flex;align-items:center;gap:5px;border-radius:5px;padding:2px 7px;font-size:12px;font-weight:400;line-height:1.6;letter-spacing:normal;background:var(--customer-soft);color:var(--lime)}
#p-customer .pill.warn,#p-customer .pill.bad{background:var(--customer-warn);color:var(--customer-amber)}
#p-customer .customer-metrics{display:grid;grid-template-columns:1fr 1.15fr 1fr;border:1px solid var(--line);border-radius:10px;background:var(--panel);margin-bottom:22px}
#p-customer .customer-metric{padding:16px 19px;min-width:0}
#p-customer .customer-metric+.customer-metric{border-left:1px solid var(--line)}
#p-customer .customer-label{display:block;margin-bottom:6px;color:var(--tx2);font-size:12px}
#p-customer .customer-number{font-size:27px;font-weight:500;line-height:1.6;font-variant-numeric:tabular-nums}
#p-customer .customer-number small{font-size:13px;font-weight:400;margin-left:5px;color:var(--tx2)}
#p-customer .customer-metric strong{display:block;font-size:16px;font-weight:500;margin-bottom:5px}
#p-customer .customer-tabs{display:flex;gap:19px;flex-wrap:wrap;border-bottom:1px solid var(--line);margin-bottom:23px}
#p-customer .customer-tabs .btn{border:0;border-radius:0;background:none;color:var(--tx2);min-height:0;padding:8px 0 12px;font-size:13px;font-weight:400;position:relative}
#p-customer .customer-tabs .on{color:var(--lime);font-weight:500}
#p-customer .customer-tabs .on:after{content:"";position:absolute;bottom:-1px;height:3px;left:0;right:0;background:var(--lime);border-radius:4px}
#p-customer .customer-pane{display:flex;flex-direction:column;gap:0;min-width:0;min-height:440px}
#p-customer .customer-sectionhead{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:17px}
#p-customer .customer-sectionhead p{margin-top:4px}
#p-customer .customer-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
#p-customer .customer-group,#p-customer .customer-pane>.sec,#p-customer .customer-legacy{background:var(--panel);border:1px solid var(--line);border-radius:9px;padding:18px;margin-bottom:17px;min-width:0}
#p-customer .customer-group h3,#p-customer .sec>h4{margin-bottom:13px}
#p-customer .sec{gap:0}
#p-customer .kv{display:flex;justify-content:space-between;gap:16px;padding:9px 0;border-bottom:1px solid var(--line);font-size:13px;line-height:1.6}
#p-customer .kv:last-child{border-bottom:0}
#p-customer .kv>span:first-child{color:var(--tx2)}
#p-customer .kv b{font-weight:400;color:var(--tx)}
#p-customer .customer-note{margin-top:12px}
#p-customer .customer-event{padding:12px 0;border-bottom:1px solid var(--line);font-size:14px}
#p-customer .customer-event:last-child{border-bottom:0}
#p-customer .customer-event p{font-size:12px;color:var(--tx2);margin-top:4px}
#p-customer .tw,#p-customer .customer-table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:9px;background:var(--panel);margin-bottom:0}
#p-customer table{width:100%;border-collapse:collapse;text-align:left;font-size:12px;line-height:1.6;min-width:580px}
#p-customer td,#p-customer th{padding:13px 12px;vertical-align:top;border-bottom:1px solid var(--line);max-width:340px;overflow-wrap:anywhere;font-size:12px;letter-spacing:normal;font-weight:400}
#p-customer th{color:var(--tx2);background:var(--bg);white-space:nowrap}
#p-customer tr:last-child td{border-bottom:0}
#p-customer table strong{font-size:13px;font-weight:500}
#p-customer table small{display:block;color:var(--tx2);font-size:11px;margin-top:3px}
#p-customer table .lnk{font-size:12px;min-height:0;padding:0}
#p-customer .row,#p-customer .customer-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px}
#p-customer label{display:flex;flex-direction:column;gap:6px;color:var(--tx2);font-size:12px;font-weight:400;margin-bottom:14px;min-width:0}
#p-customer input,#p-customer select,#p-customer textarea{width:100%;min-height:38px;padding:9px 10px;border:1px solid var(--line);border-radius:6px;background:var(--panel);color:var(--tx);font-size:14px;line-height:1.6;max-width:100%}
#p-customer input[type=checkbox]{width:16px;min-height:16px;padding:0}
#p-customer .customer-team-support .acts{margin-top:0}
#p-customer .customer-legacy>summary{cursor:pointer;color:var(--tx2);font-size:12px}
#p-customer .customer-legacy>.sec{margin-top:18px}
#p-customer .customer-dangerbox{border-top:1px solid var(--line);padding-top:17px;margin-top:5px}
#p-customer .customer-dangerbox p{font-size:12px;color:var(--tx2);margin:6px 0 12px}
#p-customer #allowancePanel{border:0;padding:0;background:none}
#p-customer #allowancePanel>p:first-child{display:none}
#p-customer #allowancePanel>nav{margin:2px 0 15px;gap:5px}
#p-customer #allowancePanel>nav .btn{min-height:0;font-size:14px;padding:5px 10px;border:0;background:none;color:var(--tx2);border-radius:6px}
#p-customer #allowancePanel>nav .btn.pri{background:var(--customer-soft);color:var(--lime)}
#p-customer [data-allowance-view]{border:0;margin:0;padding:0;gap:0}
#p-customer [data-allowance-view]>.acts{margin-top:15px}
#p-customer pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:420px;overflow:auto}
#p-customer .customer-foot{font-size:11px;color:var(--tx2);border-top:1px solid var(--line);padding-top:15px;margin-top:30px}
@media(max-width:900px){#p-customer .customer-grid{grid-template-columns:1fr}}
@media(max-width:600px){body.customer-route .main{padding:20px 16px}#p-customer .customer-metrics{grid-template-columns:1fr}#p-customer .customer-metric+.customer-metric{border-left:0;border-top:1px solid var(--line)}#p-customer .row,#p-customer .customer-fields{grid-template-columns:1fr}#p-customer .customer-heading{flex-wrap:wrap}#p-customer .customer-tabs{gap:14px}}
#p-customer .customer-kv{display:flex;justify-content:space-between;gap:16px;padding:9px 0;border-bottom:1px solid var(--line);font-size:13px}
#p-customer .customer-kv:last-child{border-bottom:0}
#p-customer .customer-kv>span:first-child{color:var(--tx2)}
#p-customer .customer-subheading{margin:21px 0 12px}
#p-customer .customer-link{border:0;background:none;color:var(--lime);padding:0;text-align:left;font-size:12px;line-height:1.6}
#p-customer .customer-empty-cell{color:var(--tx2);padding:26px 12px}
#p-customer .customer-jobs-table{border:0;padding:0;background:none}
#p-customer .customer-notice{background:var(--customer-warn);color:var(--customer-amber);border-radius:8px;padding:13px 15px;display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:17px}
#p-customer .customer-notice p{font-size:12px;margin-top:3px}
body.customer-route .customer-dialog{--bg:var(--customer-bg);--panel:var(--customer-paper);--tx:var(--customer-ink);--tx2:var(--customer-sub);--tx3:var(--customer-sub);--line:var(--customer-line);--lime:var(--customer-brand);--on-accent:var(--customer-onbrand);--field:var(--customer-paper);background:var(--panel);color:var(--tx);font:14px/1.6 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;border:1px solid var(--line);border-radius:13px;width:570px;max-width:calc(100vw - 36px);max-height:calc(100vh - 60px);padding:0;box-shadow:0 18px 50px #00000022;overflow:auto;margin:auto}
body.customer-route .customer-dialog::backdrop{background:rgba(0,0,0,.38)}
html[data-theme=dark] body.customer-route .customer-dialog::backdrop{background:rgba(0,0,0,.58)}
body.customer-route .customer-dialog h2,body.customer-route .customer-dialog .dlghead>b{font-size:17px;font-weight:500;letter-spacing:normal;line-height:1.6;margin:0}
body.customer-route .customer-dialog h3,body.customer-route .customer-dialog h4{font-size:14px;font-weight:500;letter-spacing:normal;line-height:1.6;color:var(--tx);margin:0 0 10px}
body.customer-route .customer-dialog p{margin:0 0 12px}
body.customer-route .customer-dialog label{display:flex;flex-direction:column;gap:6px;color:var(--tx2);font-size:12px;margin-bottom:14px}
body.customer-route .customer-dialog input,body.customer-route .customer-dialog select,body.customer-route .customer-dialog textarea{width:100%;min-height:38px;padding:9px 10px;border:1px solid var(--line);border-radius:6px;background:var(--panel);color:var(--tx);line-height:1.6;font-family:inherit;font-size:14px}
body.customer-route .customer-dialog input[type=checkbox]{width:16px;min-height:16px}
body.customer-route .customer-dialog .row{display:grid;grid-template-columns:1fr 1fr;gap:16px}
body.customer-route .customer-dialog .dim,body.customer-route .customer-dialog .customer-muted,body.customer-route .customer-dialog .customer-note{font-size:12px;color:var(--tx2);line-height:1.6}
body.customer-route .customer-dialog .customer-dialog-head,body.customer-route .customer-dialog .dlghead{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:19px 22px;border-bottom:1px solid var(--line)}
body.customer-route .customer-dialog .customer-dialog-body,body.customer-route .customer-dialog .cform{padding:20px 22px}
body.customer-route .customer-dialog .customer-dialog-foot,body.customer-route .customer-dialog .dlgfoot{display:flex;justify-content:flex-end;gap:9px;padding:15px 22px;background:var(--bg);border-top:1px solid var(--line)}
body.customer-route .customer-dialog .btn,body.customer-route .customer-dialog .ghost{line-height:1.6;font-family:inherit;font-size:14px;font-weight:400;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:7px;padding:7px 12px;min-height:36px;color:var(--tx);background:var(--panel)}
body.customer-route .customer-dialog .btn.pri{background:var(--lime);border-color:var(--lime);color:var(--on-accent)}
body.customer-route .customer-dialog .customer-dialog-close{border:0;background:none;color:var(--lime);padding:4px 6px;font-size:14px}
body.customer-route .customer-dialog .customer-operation-steps{display:flex;gap:8px;align-items:center;color:var(--tx2);font-size:12px;margin-bottom:20px}
body.customer-route .customer-dialog .customer-batch{background:var(--bg);border:1px solid var(--line);padding:12px 14px;border-radius:7px;margin-bottom:17px}
body.customer-route .customer-dialog .customer-beforeafter{display:grid;grid-template-columns:1fr 35px 1fr;gap:9px;align-items:center;margin:17px 0}
body.customer-route .customer-dialog .customer-beforeafter>div{background:var(--bg);padding:15px;border-radius:8px}
body.customer-route .customer-dialog .customer-beforeafter>span{text-align:center;color:var(--tx2)}
body.customer-route .customer-dialog .customer-beforeafter strong{font-size:24px;font-weight:500;display:block}
body.customer-route .customer-dialog .kv{font-size:13px;padding:9px 0;gap:16px;letter-spacing:normal}
body.customer-route .customer-dialog .kv b{font-weight:400}
body.customer-route .customer-dialog pre{font-size:11px;white-space:pre-wrap;overflow-wrap:anywhere;max-height:300px;overflow:auto}
@media(max-width:600px){body.customer-route .customer-dialog .row{grid-template-columns:1fr}}
body.customer-route .customer-dialog .customer-receipt-image{max-width:100%;height:auto;display:block}
body.customer-route .customer-dialog .customer-receipt-frame{height:420px;width:100%;border:0}
body.customer-route .customer-dialog .customer-dialog-head h3{font-size:17px;font-weight:500;margin:0;line-height:1.6}
body.customer-route .customer-dialog #allowanceOperation>.row{display:block}
body.customer-route .customer-dialog #allowanceOperation>.customer-dialog-foot{margin:20px -22px -20px;justify-content:flex-end}
body.customer-route .customer-dialog .customer-operation-steps b{color:var(--lime);font-weight:500}
body.customer-route .customer-dialog .customer-operation-error{color:var(--customer-red);font-size:12px;margin:16px 22px 0}
body.customer-route .customer-dialog .customer-kv{display:flex;justify-content:space-between;gap:16px;padding:9px 0;border-bottom:1px solid var(--line);font-size:13px}
body.customer-route .customer-dialog .customer-kv>span:first-child{color:var(--tx2)}
body.customer-route .customer-dialog .customer-kv strong{font-size:13px;font-weight:400}
body.customer-route .customer-dialog{position:fixed;top:66px;bottom:auto;left:0;right:0;margin:0 auto;max-height:calc(100vh - 96px)}
@media(max-width:600px){body.customer-route .customer-dialog{top:18px;max-height:calc(100vh - 36px)}}
body.customer-route .customer-dialog #allowancePreview>.customer-dialog-foot{margin:20px -22px -20px;justify-content:flex-end}
#p-customer .customer-empty{background:var(--panel);padding:30px 24px;border:1px solid var(--line);border-radius:9px}
#p-customer .customer-empty h3{margin:0}
#p-customer .customer-empty p{color:var(--tx2);margin:8px 0 20px;font-size:13px;max-width:520px}
#p-customer .customer-record-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:15px}
#p-customer .customer-more-operations{margin-top:17px;font-size:12px;color:var(--tx2)}
#p-customer .customer-more-operations .acts{margin-top:12px}
#p-customer .customer-bulk-selection{display:grid;gap:8px;margin-top:12px}
#p-customer .customer-bulk-selection label{display:flex;flex-direction:row;align-items:center;gap:8px;margin:0}
body.customer-route .customer-dialog .customer-choice-list{display:flex;flex-direction:column;gap:10px}
body.customer-route .customer-dialog .customer-choice-list .btn{justify-content:flex-start;text-align:left;white-space:normal;display:flex;flex-direction:column;align-items:flex-start}
#p-customer .customer-pane>.sec.customer-jobs-table{padding:0;border:0;background:none}

@media(prefers-color-scheme:dark){html:not([data-theme="light"]) body.customer-route .customer-dialog::backdrop{background:rgba(0,0,0,.58)}}

/* Complete task/order details open once, using the same customer typography. */
body.customer-route #drawer{--panel:var(--customer-paper);--tx:var(--customer-ink);--tx2:var(--customer-sub);--tx3:var(--customer-sub);--line:var(--customer-line);--line2:var(--customer-line);--field:var(--customer-paper);--backdrop:rgba(0,0,0,.5);font:14px/1.6 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--tx)}
body.customer-route #drawer h2{font-size:17px;font-weight:500;letter-spacing:normal}
body.customer-route #drawer h3,body.customer-route #drawer h4{font-size:14px;font-weight:500;letter-spacing:normal;color:var(--tx);margin:0}
body.customer-route #drawer .dim,body.customer-route #drawer th,body.customer-route #drawer td{font-size:12px;letter-spacing:normal}
body.customer-route #drawer .kv{font-size:13px;line-height:1.6}
body.customer-route #drawer .kv b{font-weight:400}
body.customer-route #drawer .customer-group{border:1px solid var(--line);border-radius:9px;padding:18px}
body.customer-route #drawer .customer-group h3{margin-bottom:13px}
body.customer-route #drawer .btn{font-size:14px;font-weight:400;min-height:36px;border-radius:7px}
body.customer-route #drawer input,body.customer-route #drawer select,body.customer-route #drawer textarea{font-size:14px}
