/* ST CRM shares the storefront palette and typography. */
.crm-customer-card.is-selected{border-color:#081f80;background:#f1f5ff}
.crm-customer-card [data-customer-map-focus]{margin-top:6px}
.crm-order-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:16px}
.crm-section-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}
.crm-section-heading p{margin:10px 0 0}
.crm-visit-choice{display:flex;border:1px solid #e3e9f3;cursor:pointer}
.crm-visit-choice:has(input:checked){border-color:#bbc9ee;background:#f2f6ff}
.crm-visit-choice input{width:18px;height:18px;accent-color:var(--blue,#081f80);flex-shrink:0}
.crm-visit-choice span{display:grid;gap:4px}
.crm-visit-choice small{color:var(--muted)}
.crm-visit-stop{display:flex;align-items:start;border-bottom:1px solid #e3e9f3;}
.crm-visit-stop>div:nth-child(2){flex:1}
.crm-visit-stop p{color:var(--muted);}
.crm-stop-number{display:grid;place-items:center;background:#eef3ff;color:var(--blue,#081f80);width:28px;height:28px;flex-shrink:0;border-radius:9px;font-weight:600}
.crm-visit-stop .crm-order-controls{display:grid;gap:4px}
.crm-visit-stop .crm-order-controls button{padding:4px 10px;min-height:32px}
.crm-visit-plan .crm-map{margin-top:18px}
.crm-empty{padding:28px 12px;text-align:center;color:var(--muted)}
@media(max-width:800px){.crm-visit-choice{padding:12px}}
.crm-page,.crm-checkout{--crm-blue:var(--blue,#081f80);--crm-orange:var(--orange,#f47700);--crm-ink:var(--ink,#162446);color:var(--crm-ink);font-family:'Noto Sans SC','Microsoft YaHei',sans-serif;font-size:14px;line-height:1.6}
.crm-page{display:grid;gap:24px;max-width:1200px;margin:0 auto;padding:12px 0 40px}
.crm-page *,.crm-checkout *{box-sizing:border-box;min-width:0}
.crm-page h2{font-size:26px;line-height:1.3;color:var(--crm-blue);margin:0;letter-spacing:-.6px}
.crm-page h3,.crm-checkout h3{font-size:17px;line-height:1.5;margin:0 0 10px;color:var(--crm-ink)}
.crm-page p{margin:0 0 12px;overflow-wrap:anywhere}
.crm-page :is(button,input,select,textarea),.crm-checkout :is(button,input,select,textarea){font:inherit}
.crm-page button,.crm-checkout button{min-height:44px;border:1px solid #dce3f1;border-radius:12px;padding:10px 18px;background:#fff;color:var(--crm-blue);font-weight:600;cursor:pointer;transition:background .18s cubic-bezier(.22,.8,.25,1),transform .18s cubic-bezier(.22,.8,.25,1)}
.crm-page button:hover,.crm-checkout button:hover{background:#f1f5ff;border-color:#bac9ea}
.crm-page button:active,.crm-checkout button:active{transform:translateY(1px)}
.crm-page button[type=submit],.crm-checkout [data-save-checkout-address]{background:var(--crm-blue);border-color:var(--crm-blue);color:#fff}
.crm-page button:disabled,.crm-checkout button:disabled{opacity:.5;cursor:default}
.crm-page :is(button,a,summary):focus-visible,.crm-checkout :is(button,summary):focus-visible{outline:3px solid var(--crm-orange);outline-offset:3px}
.crm-page :is(input,select,textarea):focus-visible,.crm-checkout :is(input,select,textarea):focus-visible{outline:2px solid var(--crm-blue);outline-offset:2px}
.crm-toolbar,.crm-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.crm-card,.crm-notice,.crm-form{border:1px solid #e3e9f3;border-radius:20px;padding:24px;background:#fff}
.crm-card{box-shadow:0 5px 24px #10265a05}
.crm-card p{line-height:1.7}
.crm-notice{background:#f2f6ff;border-color:#e1e9fc;color:#52627e;font-size:13px;padding:16px 20px;line-height:1.7}
.crm-error{color:#b53131;white-space:pre-line}
.crm-error:empty{display:none}
.crm-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:16px}
.crm-form{display:grid;gap:18px}
.crm-page .crm-form label,.crm-checkout label,.crm-page .crm-toolbar label{display:grid;gap:8px;font-size:13px;font-weight:500;color:#52627e}
.crm-form :is(input,select,textarea),.crm-toolbar :is(input,select),.crm-checkout :is(input,select,textarea){width:100%;border:1px solid #dce3f1;border-radius:12px;padding:12px 14px;background:#fff;color:var(--crm-ink);min-height:46px}
.crm-form textarea,.crm-checkout textarea{min-height:82px;resize:vertical}
.crm-form :is(input,textarea)::placeholder,.crm-checkout :is(input,textarea)::placeholder{color:var(--muted);opacity:1;font-size:13px}
.crm-page label.crm-check,.crm-checkout label.crm-check{display:flex;align-items:center;gap:10px;color:var(--crm-ink);font-weight:400;min-height:40px}
.crm-check input[type=checkbox]{width:18px;height:18px;min-height:18px;padding:0;accent-color:var(--crm-blue);flex-shrink:0}
.crm-form fieldset{border:1px solid #e3e9f3;border-radius:14px;padding:16px}
.crm-badge{display:inline-flex;align-items:center;padding:5px 10px;border-radius:8px;background:#eef3ff;color:var(--crm-blue);font-size:12px;font-weight:500;line-height:1.4}
.crm-card a{color:var(--crm-blue);font-weight:500;text-decoration:underline;text-underline-offset:3px}
.crm-map{height:460px;min-height:340px;border-radius:16px;background:#edf2f8;width:100%;overflow:hidden}
.crm-location-panel{border-radius:16px;background:#f5f7fc;padding:16px}
.crm-map-controls{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.crm-map-controls [data-map-open]{background:var(--crm-blue);color:#fff;border-color:var(--crm-blue)}
.crm-location-panel gmp-place-autocomplete{display:block;width:100%;margin:12px 0}
.crm-muted{font-size:13px;color:var(--muted);line-height:1.65}
.crm-eyebrow{display:block;font-size:10px;letter-spacing:1.8px;color:var(--orange-ink);font-weight:700;margin-bottom:10px}
.crm-details{border:1px solid #e3e9f3;border-radius:14px;padding:14px 16px;background:#fafbfd}
.crm-details summary{cursor:pointer;color:var(--crm-blue);font-size:14px;font-weight:600;min-height:28px}
.crm-details summary small{font-size:12px;font-weight:400;color:var(--muted);margin-left:10px}
.crm-details[open]>.crm-grid,.crm-details[open]>label,.crm-details[open]>form{margin-top:18px}
.crm-details>label{display:grid;gap:8px;margin-top:16px}
.crm-window{display:grid;gap:12px;border-radius:14px;background:#f5f7fc;padding:18px}
.crm-window .crm-flexible{align-self:end}
.crm-window p{margin:0}
.crm-checkout{display:grid;gap:16px;padding:20px 0}
.crm-checkout .crm-form{margin-top:16px}
.crm-checkout .crm-window{border:1px solid #e3e9f3}
.crm-stop{padding:14px 0;border-top:1px solid #e3e9f3}
.crm-history{max-height:240px;overflow:auto;white-space:pre-wrap;font-size:12px;background:#f5f7fc;border-radius:10px;padding:14px}
.crm-toolbar{padding:18px;border:1px solid #e3e9f3;border-radius:16px;background:#fff}
.crm-toolbar input{max-width:320px}
.crm-toolbar h2{margin-right:auto}
.crm-appointment-summary{margin-top:16px;padding:18px;background:#f2f6ff;border-radius:14px}
.crm-task-picker{display:grid;gap:8px}
.crm-task-choice{display:flex;align-items:center;gap:12px;border:1px solid #e3e9f3;padding:12px;border-radius:12px;background:#fff}
.crm-task-choice input{width:18px;min-height:18px;accent-color:var(--crm-blue)}
.crm-task-choice>label{flex:1}
.crm-task-choice .crm-order-controls{display:flex;gap:4px}
.crm-task-choice button{padding:6px 10px;min-height:38px}
.crm-checkout [hidden],.crm-page [hidden]{display:none!important}
@media(min-width:900px){.crm-page:has([data-address-editor]) .crm-form{max-width:850px}.crm-page:has([data-customer-map]) .crm-map{height:560px}.crm-surface.commerce-page .dialog-body:has(.crm-page){background:#f6f8fc}}
@media(max-width:600px){.crm-page{gap:18px;padding:4px 0 28px}.crm-page h2{font-size:23px}.crm-card,.crm-form{padding:18px;border-radius:18px}.crm-notice{padding:14px 16px}.crm-map{height:380px;min-height:320px}.crm-toolbar{padding:14px}.crm-toolbar>label{flex:1;min-width:180px}.crm-toolbar input{max-width:none}.crm-grid{grid-template-columns:1fr}.crm-form>.crm-grid:has([name=contact_name]){grid-template-columns:1fr 1fr;gap:10px}.crm-details summary small{display:block;margin:3px 0 0}.crm-map-controls button{flex:1;padding:10px}}
@media(prefers-reduced-motion:reduce){.crm-page button,.crm-checkout button{transition:none}}

/* Orders: one reading path, aligned controls, linked map and list. */
.crm-page select.st-select-native,.crm-checkout select.st-select-native{width:1px;height:1px;min-height:0;padding:0;border:0}
.crm-order-card{padding:20px;border-radius:16px;transition:border-color .15s,box-shadow .15s}
.crm-order-card.is-selected{border-color:var(--crm-blue);box-shadow:0 0 0 2px #081f8018}
.crm-order-card-top{display:flex;align-items:center;gap:10px;margin-bottom:16px}
.crm-order-card-top>div{flex:1}
.crm-order-number{width:30px;height:36px;display:grid;place-items:center;border-radius:10px;background:#eef3ff;color:var(--crm-blue);font-weight:700;font-size:15px;flex-shrink:0}
.is-pending .crm-order-number{background:#fff2e6;color:#a24e0d}
.crm-order-ref{font-size:10px;color:#7c889e;letter-spacing:.3px;overflow-wrap:anywhere}
.crm-order-card-top h3{font-size:16px;margin:3px 0 0;line-height:1.45}
.crm-status-pill{display:inline-flex;align-items:center;background:#edf2ff;color:var(--crm-blue);border-radius:7px;padding:5px 9px;font-size:11px;font-weight:600;white-space:nowrap;flex-shrink:0}
.crm-status-pill.pending{background:#fff2e6;color:#a24e0d}
.crm-field-caption{font-size:11px;color:var(--muted)}
.crm-order-owner{display:grid;gap:3px;font-size:11px;color:var(--muted);margin:12px 0}
.crm-order-products{list-style:none;padding:0;margin:12px 0 0;font-size:12px}
.crm-order-products li{display:flex;justify-content:space-between;gap:12px;padding:6px 0}
.crm-order-products strong{white-space:nowrap;color:#52627e;font-size:11px}
.crm-page .crm-order-alert{font-size:12px;line-height:1.6;color:#a24e0d;background:#fff7ef;border-radius:8px;padding:9px 12px;margin:10px 0}
.crm-map-popup{font-family:'Noto Sans SC','Microsoft YaHei',sans-serif;color:#162446;font-size:13px;max-width:280px;max-height:260px;overflow-y:auto;padding:2px 0 6px;line-height:1.6}
.crm-popup-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:5px 0 14px}
.crm-map-popup .crm-popup-heading h3{font-size:16px;margin:0}
.crm-map-popup p{font-size:12px;margin-bottom:7px}
.crm-map-popup small{font-size:11px;color:var(--muted)}
.crm-map-popup .crm-actions{margin-top:14px;gap:8px 12px}
.crm-map-popup button{padding:7px 10px;font-size:12px;min-height:34px;border-radius:8px}
.crm-map-popup button:first-child{background:#081f80;color:#fff;border-color:#081f80}
.crm-map-popup a{font-size:12px;color:#081f80;display:inline-block;min-height:28px;line-height:28px;text-decoration:none}
.crm-order-popover{position:absolute;left:30px;right:30px;bottom:80px;max-width:320px;z-index:2;border-radius:16px;border:1px solid #dce3f1;background:#fff;padding:18px;box-shadow:0 12px 36px #16244633}
.crm-order-popover .crm-map-popup{max-width:none;max-height:260px}
.crm-order-popover .crm-order-ref{display:block;padding-right:22px;font-size:10px}
.crm-order-popover [data-map-popup-close]{position:absolute;right:8px;top:8px;width:28px;height:28px;min-height:28px;padding:0;border:0;font-size:21px;color:var(--muted);background:#fff}
.crm-order-popover .crm-popup-heading h3{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.crm-order-popover .crm-popup-heading{margin:5px 0 10px}
.crm-order-popover .crm-map-popup p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.crm-order-popover .crm-map-popup small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crm-order-popover .crm-actions{gap:6px 12px;margin-top:10px}
.crm-order-address-form{max-width:850px;width:100%}
.crm-order-address-form [data-order-address-fields]{display:grid;gap:18px}
@media(max-width:600px){.crm-order-card{padding:18px}.crm-popup-heading{gap:8px}.crm-map-popup{max-width:245px}}
.crm-address-contact>summary small{margin-left:0;display:block;margin-top:3px}
.crm-address-contact>.crm-grid{margin-top:14px}
body:has(.commerce-dialog[open] .crm-page) :is(.st-contact-dock,.st-back-to-top){display:none!important}
@media(max-width:360px){.commerce-dialog:has(.crm-page) .st-page-heading-copy small{display:none}.commerce-dialog:has(.crm-page) .st-page-heading-copy{min-width:0}}
.crm-page .crm-order-card{padding:14px;border-radius:14px;display:grid;gap:8px;align-content:start}
.crm-order-card .crm-order-card-top{margin:0;gap:10px}
.crm-order-card-top>div{min-width:0}
.crm-order-card .crm-order-card-top h3{font-size:17px;line-height:1.4;margin:0 0 2px;font-weight:700;overflow-wrap:anywhere}
.crm-order-card .crm-order-number{width:28px;height:30px;border-radius:8px;font-size:14px}
.crm-order-card .crm-status-pill{font-size:10px;padding:5px 7px}
.crm-order-card .crm-order-ref{display:block;font-size:10px;line-height:1.5;letter-spacing:0}
.crm-order-card .crm-order-recipient{font-size:11px;color:var(--muted);display:flex;gap:10px;flex-wrap:wrap}
.crm-order-main-actions{display:grid;gap:8px;grid-template-columns:repeat(2,minmax(0,1fr))}
.crm-order-card :is(.crm-order-main-actions)>:is(a,button){display:flex;align-items:center;justify-content:center;box-sizing:border-box;height:40px;min-height:40px;margin:0;padding:0 6px;border:1px solid #dce4f4;border-radius:9px;background:#fff;color:var(--crm-blue);font-family:inherit;font-size:12px;font-weight:600;line-height:1.3;text-decoration:none;white-space:nowrap;cursor:pointer}
.crm-order-card .crm-order-main-actions>a:first-child{background:var(--crm-blue);border-color:var(--crm-blue);color:#fff}
.crm-order-card :is(.crm-order-main-actions)>:is(a,button):hover{filter:brightness(.96)}
.crm-order-card :is(.crm-order-main-actions)>:is(a,button):focus-visible{outline:2px solid var(--crm-blue);outline-offset:2px}
.crm-order-card .crm-order-alert{margin:0}
@media(max-width:360px){.crm-page .crm-order-card{padding:12px;gap:8px}.crm-order-card .crm-order-card-top h3{font-size:15px}}
/* Keep working content near the top on every CRM page. */
.crm-surface .crm-page{padding-top:6px}
.crm-page .crm-section-heading{gap:8px;align-items:center}
.crm-page .crm-section-heading .crm-eyebrow{display:none}
.crm-page .crm-section-heading h2{font-size:16px;letter-spacing:0}
.crm-page .crm-section-heading p{font-size:11px;line-height:1.5;margin:3px 0 0}
.crm-page>.crm-section-heading>div{display:flex;gap:10px;align-items:baseline;flex-wrap:wrap}
.crm-page>h2{font-size:17px;letter-spacing:0}
.crm-page .crm-toolbar{padding:10px;gap:8px;border-radius:12px}
.crm-page .crm-toolbar label{gap:4px;font-size:11px}
.crm-page .crm-toolbar :is(input,select,.st-select-trigger){height:40px;min-height:40px;padding:8px 10px;font-size:12px;border-radius:9px}
.crm-page .crm-toolbar>button{height:40px;min-height:40px;padding:7px 12px;font-size:12px;border-radius:9px}
@media(max-width:600px){
  .crm-surface .crm-page{gap:10px;padding-top:4px}
  .crm-page .crm-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end}
  .crm-page .crm-toolbar>label{min-width:0}
  .crm-page .crm-toolbar input{max-width:none}
  .crm-page>.crm-section-heading>div{gap:3px 8px}
}
@media(max-width:600px){
  .crm-surface .crm-page{padding:4px 12px 28px;gap:10px}
  .crm-surface .crm-order-address-form{padding:16px;gap:14px;border-radius:16px}
  .crm-order-address-form [data-order-address-fields]{gap:14px}
  .crm-order-address-form .crm-location-panel{padding:12px}
  .crm-order-address-form .crm-details{padding:11px 12px}
  .crm-order-address-form textarea{min-height:68px}
  .crm-order-popover{left:24px;right:24px;bottom:80px;padding:14px}
}
.crm-route-plan-heading h3{margin:0;font-size:15px}
.crm-route-plan-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.crm-page .crm-route-plan-heading button{min-height:30px;padding:4px 9px;font-size:11px;border-radius:8px}
.crm-route-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.crm-route-options label{display:grid;gap:4px;font-size:11px;color:var(--muted)}
.crm-route-options :is(select,.st-select-trigger){width:100%;min-height:40px;height:40px;padding:8px 9px;font-size:12px;border:1px solid #dce3f1;border-radius:9px;background:#fff;color:var(--crm-ink)}
.crm-page .crm-route-hint{font-size:11px;line-height:1.5;color:var(--muted);margin:6px 0}
.crm-visit-plan .crm-empty{padding:12px 0;font-size:12px}
.crm-visit-stop{padding:10px 0;gap:8px}
.crm-visit-stop strong{font-size:13px}
.crm-visit-stop p{margin:3px 0;font-size:11px}
.crm-visit-choice{padding:10px;gap:8px;border-radius:10px}
.crm-visit-choice strong{font-size:13px}
.crm-visit-choice small{font-size:11px}
.crm-page .crm-visit-plan>[data-visit-order]+.crm-actions button{width:100%;min-height:40px;padding:8px 12px;font-size:12px;border-radius:9px;background:var(--crm-blue);color:#fff;border-color:var(--crm-blue)}
.crm-page .crm-visit-plan>p:last-child{font-size:11px;line-height:1.5;margin:8px 0 0}
.crm-route-help{margin-top:8px;font-size:11px;color:var(--muted)}
.crm-route-help summary{cursor:pointer}
.crm-page .crm-route-help p{font-size:11px;line-height:1.5;margin:6px 0 0}
.crm-route-result{margin-top:12px;border:1px solid #dce4f4;border-radius:14px;overflow:hidden;background:#f4f7ff}
.crm-route-result[hidden]{display:none}
.crm-route-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:16px 16px 10px}
.crm-route-metrics>div{display:grid;gap:4px}
.crm-route-metrics>div+div{border-left:1px solid #dce4f4;padding-left:16px}
.crm-route-metrics span{font-size:11px;color:var(--muted)}
.crm-route-metrics strong{font-size:30px;line-height:1.2;letter-spacing:-1px;color:var(--crm-blue);white-space:nowrap}
.crm-route-metrics strong small{font-size:12px;font-weight:500;margin-left:5px;letter-spacing:0}
.crm-route-meta{font-size:10px;color:var(--muted);padding:0 16px 12px}
.crm-route-summary-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:0 12px 12px}
.crm-route-summary-actions>a,.crm-page .crm-route-summary-actions>button,.crm-route-nav-segments summary{display:flex;align-items:center;justify-content:center;height:40px;min-height:40px;padding:8px 10px;border-radius:9px;border:1px solid #dce4f4;background:#fff;color:var(--crm-blue);text-decoration:none;font-size:12px;font-weight:600;cursor:pointer}
.crm-route-summary-actions>a{background:var(--crm-blue);border-color:var(--crm-blue);color:#fff}
.crm-route-result [data-route-details]{border-top:1px solid #dce4f4;background:#fff;padding:12px}
.crm-route-detail-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.crm-route-detail-options label{display:grid;gap:4px;font-size:11px;color:var(--muted)}
.crm-route-detail-options :is(input,select){width:100%;height:40px;min-height:40px;border:1px solid #dce4f4;border-radius:8px;padding:6px;font-size:12px;background:#fff;color:var(--crm-ink)}
.crm-route-timeline{list-style:none;padding:0;margin:12px 0}
.crm-route-timeline li{display:grid;grid-template-columns:22px minmax(0,1fr) auto;gap:8px;align-items:center;padding:10px 0;border-bottom:1px solid #edf1f7}
.crm-route-stage{display:grid;place-items:center;width:22px;height:22px;border-radius:7px;background:#edf2ff;color:var(--crm-blue);font-size:11px}
.crm-route-timeline strong{display:block;font-size:12px}
.crm-route-timeline small{display:block;font-size:10px;color:var(--muted)}
.crm-route-timeline time{font-size:11px;color:var(--crm-blue);font-weight:600;text-align:right}
.crm-route-return{display:grid;gap:4px;padding:10px 12px;background:#f5f7fc;border-radius:10px;margin-bottom:12px}
.crm-route-return span,.crm-route-return small{font-size:11px;color:var(--muted)}
.crm-route-return strong{font-size:13px;color:var(--crm-blue)}
.crm-route-fuel{margin:10px 0;font-size:11px;color:var(--muted)}
.crm-route-fuel>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:6px}
.crm-route-fuel>div>span{display:grid;gap:3px;border:1px solid #edf1f7;padding:8px 5px;border-radius:8px;font-size:10px}
.crm-route-fuel>div>span.is-selected{background:#f1f5ff;border-color:#cad7f7}
.crm-route-fuel strong{font-size:13px;color:var(--crm-blue)}
.crm-route-fuel small{font-size:9px}
.crm-page .crm-route-footnote{font-size:10px;line-height:1.6;color:var(--muted);margin:8px 0}
.crm-route-return-nav,.crm-route-nav-segments a{display:block;font-size:12px;color:var(--crm-blue);padding:6px 0;text-decoration:none}
.crm-route-nav-segments p{font-size:11px;margin:8px 0}
@media(max-width:360px){.crm-route-metrics{padding:12px;gap:8px}.crm-route-metrics strong{font-size:25px}.crm-route-metrics>div+div{padding-left:10px}.crm-route-detail-options{grid-template-columns:1fr}.crm-route-timeline li{grid-template-columns:22px minmax(0,1fr)}.crm-route-timeline time{grid-column:2;text-align:left}}
body .commerce-dialog.crm-surface:has(.crm-address-page) .dialog-head{display:grid;grid-template-columns:40px minmax(0,1fr) auto;align-items:center;gap:8px}
body .commerce-dialog.crm-surface:has(.crm-address-page) .dialog-head>[data-close]{grid-column:1;grid-row:1}
body .commerce-dialog.crm-surface:has(.crm-address-page) .dialog-head>.st-page-heading-copy{grid-column:2;grid-row:1;justify-self:start;margin:0;min-width:0;text-align:left}
body .commerce-dialog.crm-surface:has(.crm-address-page) .dialog-head>.dialog-head-actions{grid-column:3;grid-row:1;justify-self:end;margin:0}
body .commerce-dialog:has(.crm-page)>.dialog-head{display:grid;grid-template-columns:40px minmax(0,1fr) auto;align-items:center;gap:8px}
body .commerce-dialog:has(.crm-page)>.dialog-head>[data-close]{grid-column:1;grid-row:1}
body .commerce-dialog:has(.crm-page)>.dialog-head>.st-page-heading-copy{grid-column:2;grid-row:1;justify-self:start;text-align:left;margin:0;min-width:0}
body .commerce-dialog:has(.crm-page)>.dialog-head>.dialog-head-actions{grid-column:3;grid-row:1;justify-self:end;margin:0}
.crm-order-card .crm-order-owner{display:block;margin:0;font-size:11px;color:var(--muted)}
.crm-page .crm-inline-edit{min-height:28px;padding:2px 6px;border:0;background:transparent;font-size:12px;border-radius:6px}
.crm-address-preview span{font-size:20px;color:#081f80}
.crm-overlay{box-sizing:border-box;width:min(560px,calc(100vw - 24px));max-height:calc(100dvh - 32px);padding:0;border:1px solid #dce3f1;border-radius:18px;background:#fff;color:#162446;overflow-y:auto;box-shadow:0 16px 56px #16244633}
.crm-overlay::backdrop{background:#16244666}
.crm-overlay-head{position:sticky;top:0;z-index:3;display:grid;grid-template-columns:36px minmax(0,1fr) 36px;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid #eef1f6;background:#fff}
.crm-overlay-head h2{font-size:17px;margin:0;text-align:left}
.crm-overlay-head button{width:36px;height:36px;padding:0;border:0;border-radius:9px;background:#f4f6fc;color:#081f80;font-size:22px;cursor:pointer}

.crm-overlay .crm-form{gap:12px}

.crm-overlay .crm-map{height:320px;min-height:260px}
.crm-overlay .crm-muted{margin:0;font-size:12px}
body .commerce-dialog.commerce-page.page-workbench .dialog-head>.st-page-heading-copy{margin-left:0}
body .commerce-dialog.crm-surface:has(.crm-page)>.dialog-head>.st-page-heading-copy{margin:0;justify-self:start;text-align:left}
body .commerce-dialog.commerce-page.page-workbench>.dialog-head{display:grid;grid-template-columns:40px minmax(0,1fr) auto;gap:8px;align-items:center}
body .commerce-dialog.commerce-page.page-workbench>.dialog-head>[data-close]{grid-column:1;grid-row:1}
body .commerce-dialog.commerce-page.page-workbench>.dialog-head>.st-page-heading-copy{grid-column:2;grid-row:1;margin:0;justify-self:start}
body .commerce-dialog.commerce-page.page-workbench>.dialog-head>.dialog-head-actions{grid-column:3;grid-row:1;justify-self:end}
.crm-address-page{display:grid;}
.crm-address-page-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}
.crm-page .crm-address-page-heading h2{font-size:17px;letter-spacing:0}
.crm-address-page-heading small{font-size:11px;color:var(--muted)}
.crm-page .crm-address-page-heading button{min-height:38px;padding:7px 12px;border-radius:9px;font-size:12px;background:var(--crm-blue);border-color:var(--crm-blue);color:#fff}
.crm-address-order-help{padding:10px 12px;border-radius:10px;background:#f3f6fc;font-size:12px;color:#52627e;line-height:1.6}
.crm-page .crm-address-order-help p{margin:0 0 5px}
.crm-page .crm-address-order-help p:first-child{margin-bottom:12px}
.crm-page .crm-address-order-help p:last-child{margin:0}
.crm-page .crm-address-page .crm-address-order-help button{padding:0;min-height:30px;border:0;border-radius:0;background:transparent;font-size:12px}
.crm-saved-addresses .crm-card{display:grid;gap:6px;padding:14px;border-radius:12px}
.crm-saved-addresses .crm-card>header{display:flex;justify-content:space-between;gap:8px;align-items:center}
.crm-saved-addresses .crm-card h3{font-size:14px;margin:0}
.crm-saved-addresses .crm-card p{font-size:12px;margin:0;line-height:1.6}
.crm-saved-addresses .crm-card small{font-size:11px;color:var(--muted)}
.crm-page .crm-saved-addresses .crm-card button{justify-self:end;min-height:34px;padding:5px 10px;font-size:12px;border-radius:8px}
.crm-address-page [data-address-editor]:empty{display:none}
/* Compact rhythm shared by the customer and order workspace. Keep touch controls usable. */
.crm-order-meta{display:flex;gap:3px 10px;flex-wrap:wrap;align-items:baseline}
.crm-order-meta .crm-order-owner{font-size:10px;line-height:1.5}
.crm-order-card .crm-order-recipient{line-height:1.5}
.crm-surface .crm-page{gap:8px}
.crm-page .crm-grid{gap:10px}
.crm-page .crm-card:not(.crm-order-card),.crm-page .crm-form{padding:var(--st-space-3,12px);border-radius:var(--st-radius-card,12px)}
.crm-page .crm-card p{margin:4px 0;line-height:1.5}
.crm-page .crm-form{gap:var(--st-space-2,8px)}
.crm-page .crm-form label{gap:4px}
.crm-page .crm-details{padding:10px 12px;border-radius:10px}
.crm-page .crm-visit-choice{padding:10px;gap:8px;border-radius:10px}
.crm-page .crm-visit-stop{padding:10px 0;gap:8px}
.crm-page .crm-location-panel{padding:10px;border-radius:10px}
.crm-page .crm-map-controls{gap:8px;margin-bottom:4px}
.crm-page .crm-map-controls+p{margin:4px 0;font-size:11px}
.crm-overlay>.crm-page{gap:8px;padding:12px}
.crm-overlay .crm-form{padding:0;border:0}
.crm-overlay [data-order-address-fields]{gap:10px}
.crm-address-page{gap:8px}
.crm-page .crm-saved-addresses .crm-card{padding:12px;gap:4px}

/* One fixed action column for the status pill and field edit buttons. */
.crm-order-card .crm-order-card-top{display:grid;grid-template-columns:28px minmax(0,1fr) 56px;align-items:start}
.crm-order-card .crm-order-card-top>.crm-status-pill{width:56px;box-sizing:border-box;text-align:center;justify-content:center;justify-self:end;margin:0}
.crm-order-card .crm-order-main-actions:has(>:only-child){grid-template-columns:1fr}


/* Drivers and carriers: compact task cards, large primary actions. */
.crm-driver{display:grid;gap:12px}.crm-driver-heading,.crm-driver-card>header{display:flex;align-items:center;justify-content:space-between;gap:12px}
.crm-driver-heading h2{font-size:22px}.crm-driver-heading p{margin:2px 0 0}.crm-driver-heading button{padding:8px 12px}
.crm-driver-list{display:grid;gap:12px;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
.crm-driver-card{display:grid;gap:10px;padding:16px;border:1px solid #dce3f1;border-radius:16px;background:#fff}
.crm-driver-card h3,.crm-driver-card p{margin:0}.crm-driver-card h3{font-size:18px}.crm-driver-card header small,.crm-driver-detail small{font-size:12px;color:var(--muted)}
.crm-driver-time{display:grid;gap:2px;background:#f3f6fc;border-radius:10px;padding:8px 12px}.crm-driver-time small{font-size:12px;color:var(--muted)}.crm-driver-time strong{font-size:17px;color:var(--crm-blue)}
.crm-driver-address{font-size:14px;line-height:1.5}.crm-driver-card .crm-driver-warning{padding:8px;border-radius:8px;background:#fff4df;color:#8d4500;font-size:12px}
.crm-driver-links,.crm-driver-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.crm-driver-links a,.crm-driver-links button,.crm-driver-actions button{display:flex;align-items:center;justify-content:center;min-height:46px;border:1px solid #dce3f1;border-radius:10px;padding:10px 8px;text-decoration:none;font-weight:600;font-size:15px;color:var(--crm-blue)}
.crm-driver-actions button.crm-driver-primary{background:var(--crm-blue);border-color:var(--crm-blue);color:#fff}.crm-driver-actions button:only-child{grid-column:1/-1}
.crm-driver-detail{border-top:1px solid #e3e9f3;padding-top:8px}.crm-driver-detail summary{display:flex;justify-content:space-between;cursor:pointer;color:var(--muted);font-size:13px}.crm-driver-detail ul{padding:0;list-style:none;margin:8px 0}.crm-driver-detail li{display:flex;justify-content:space-between;gap:8px;padding:4px 0}.crm-driver-detail>button{margin-top:8px}.crm-driver-feedback{padding:12px;display:grid;gap:10px}.crm-driver-feedback textarea{min-height:80px}
@media(max-width:700px){.crm-driver-list{grid-template-columns:1fr}.crm-driver-card{padding:12px}.crm-driver-heading h2{font-size:20px}}

.crm-order-card button.crm-order-title-link{display:inline-flex;align-items:center;gap:6px;min-height:28px;padding:0;border:0;background:none;border-radius:4px;font:inherit;font-weight:inherit;text-align:left;color:inherit}.crm-order-title-link span{font-size:16px;color:var(--muted)}

/* Customer actions share one compact row at every viewport width. */
.crm-customer-card .crm-customer-actions{display:flex;gap:8px;margin-top:8px}
.crm-customer-card .crm-customer-actions>button{flex:1 1 0;min-width:0;width:auto;margin:0;padding:9px 8px}
.crm-customer-card .crm-customer-actions>button[aria-busy="true"]{cursor:progress;opacity:.65}

/* 待补定位：与「地图定位」同一按钮位给一枚橙色轻提醒；点开客户资料补地址。
   颜色沿用全站「橙=待补」口径（.crm-locate-dot.is-missing / .crm-order-alert 同为 #db6500）。 */
.crm-customer-card .crm-customer-actions>button.crm-customer-locate{display:inline-flex;align-items:center;justify-content:center;gap:6px;background:#fff7ef;border-color:#f0cfa8;color:#b05a00;font-weight:600}
.crm-customer-card .crm-customer-actions>button.crm-customer-locate svg{width:16px;height:16px;flex:none}

/* 订单地图里的同一枚「待补定位」：订单卡第一格（状态动作位）沿用客户列表完全相同的橙色轻提醒。
   特异度取 (0,4,1)，压过 st-operations 的 `.st-operations .crm-order-card .crm-order-main-actions :is(a,button)`(0,3,1)，
   不依赖两个样式表的加载顺序。 */
.st-operations .crm-order-card .crm-order-main-actions>button.crm-customer-locate{display:inline-flex;align-items:center;justify-content:center;gap:6px;background:#fff7ef;border-color:#f0cfa8;color:#b05a00;font-weight:600}
.st-operations .crm-order-card .crm-order-main-actions>button.crm-customer-locate svg{width:16px;height:16px;flex:none}
