/* Shared visual system: compact forms, clear actions, generous touch targets. */
:root{--line:#eae3e5;--muted:#79727a;--surface-soft:#f8f4f5;--control-height:44px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}
button,a,input,textarea,select{transition:background .16s,border-color .16s,box-shadow .16s,color .16s}
button:disabled{cursor:not-allowed;opacity:.48}
button[aria-busy=true]{cursor:wait}
.primary,.text-button,.secondary-link,.help-link{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:var(--control-height);border:1px solid transparent;border-radius:10px;font-size:13px;font-weight:600;line-height:1.4;padding:10px 16px;text-decoration:none;text-align:center;white-space:normal}
.primary{background:var(--wine);box-shadow:0 2px 3px #5815290d}
.primary:hover:not(:disabled){background:#712039;box-shadow:0 3px 9px #5815291c}
.text-button,.secondary-link{background:#fff;border-color:#e6dce0;color:#754454}
.text-button:hover:not(:disabled),.secondary-link:hover{border-color:#c8a9b5;background:#fcf6f8}
.help-link{background:transparent;box-shadow:none;color:#8a6975;font-size:12px;min-height:40px;padding:8px 10px}
.help-link:hover{background:var(--surface-soft);color:var(--wine)}
button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #c58f9f;outline-offset:3px}
input,select,textarea{font:inherit;font-size:14px;line-height:1.5;border:1px solid #e2d9dd;border-radius:9px;background:#fff;box-shadow:0 1px 2px #32202a03;padding:10px 12px;min-width:0}
input,select{min-height:var(--control-height)}
select{margin-top:0;padding-right:25px}
textarea{min-height:96px}
input:hover,textarea:hover,select:hover{border-color:#c6b5bd}
input:focus,textarea:focus,select:focus{outline:0;border-color:#a66278;box-shadow:0 0 0 3px #85223d10}
label{gap:7px;margin:14px 0;color:#665760;font-size:12px;font-weight:500}
.card{border-radius:16px;box-shadow:0 3px 16px #43233003}
.app-layout{grid-template-columns:216px minmax(0,1fr)}
main{align-self:start;max-width:1440px;margin:0 auto;padding:28px 32px 20px}
h1{font-size:36px;letter-spacing:-1.25px;margin:10px 0 8px}
h2{font-size:23px;letter-spacing:-.65px}
.page-header{min-height:102px;margin-bottom:22px}
.page-header p{font-size:14px;line-height:1.5}
.header-art{right:-15px;top:-26px;opacity:.65}
.header-art img{width:185px;height:150px}
.header-art span{font-size:16px}
.main-footer{margin-top:24px}
/* Sidebar: dimensional SVG illustrations stay crisp at every display scale. */
.sidebar{padding:25px 12px 16px;background:linear-gradient(160deg,#fffcfa,#fff 70%)}
.brand-logo{width:58px;height:58px}
.brand strong{font-size:20px;margin:7px 0}
.brand span{font-size:12px}
.sidebar nav{gap:8px;margin-top:36px}
.sidebar nav button{position:relative;gap:12px;min-height:64px;padding:10px 14px;border:1px solid transparent;border-radius:13px;font-size:14px;font-weight:500;color:#766972;transition:background .16s,border-color .16s}
.nav-icon{width:42px;height:42px;flex-shrink:0;filter:saturate(.72);transition:transform .18s,filter .18s}
.sidebar nav button:hover{background:#faf4f6;border-color:#f0e2e7}
.sidebar nav button:hover .nav-icon{transform:translateY(-2px);filter:saturate(1)}
.sidebar nav button.active{background:linear-gradient(115deg,#f5e7ec,#faf1f4);border-color:#ead4de;color:#792c46;box-shadow:0 2px 6px #85223d05;font-weight:650}
.sidebar nav button.active:before{content:"";position:absolute;left:0;top:20px;bottom:20px;width:3px;border-radius:0 3px 3px 0;background:#a6526e}
.sidebar nav button.active .nav-icon{filter:saturate(1)}
.sidebar-bottom{padding:14px 10px 0}
.profile{gap:10px;padding-bottom:16px}
.profile .icon-button{width:36px;height:36px;padding:6px;border-radius:10px}
.profile .icon-button:hover{background:var(--blush)}
/* Greeting: field rhythm and action spacing are explicit, not incidental. */
.reply-grid{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:18px;align-items:stretch}
.editor-card,.preview-card{padding:24px}
.editor-card h2{font-size:22px;margin:12px 0 20px}
#reply-form>label{margin:16px 0 8px}
#reply-form>label:first-child{margin-top:0}
#reply-text{display:block;min-height:116px;line-height:1.6}
#reply-link{display:block;font-size:13px}
.editor-footer{margin-top:18px;padding-top:16px;border-top:1px solid #f0eaed;gap:12px}
.editor-footer .primary{min-width:146px}
.editor-footer span{font-size:11px;color:#94858d}
.preview-card{background:linear-gradient(135deg,#fffeff,#fcf8f9)}
.chat-preview{margin-top:18px;padding:16px;background:#f4edef;border:1px solid #f0e5e9;border-radius:14px}
.chat-name{padding-bottom:8px}
.chat-message{font-size:12px;padding:11px 13px;line-height:1.6}
.chat-message.outgoing{background:#e9d7df;color:#51313d}
.auto-card{display:grid;grid-template-columns:minmax(210px,260px) minmax(0,1fr);align-items:center;gap:24px;padding:22px 24px;margin-top:18px}
.auto-intro h2{font-size:20px;margin:8px 0}
.auto-intro p{font-size:12px;color:var(--muted);margin-bottom:0;max-width:260px}
#auto-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px 20px;align-items:center}
#auto-form>.actions{grid-column:2;grid-row:1;display:flex;flex-direction:column;align-items:stretch;gap:8px}
#auto-form .text-button{margin:0}
.auto-feedback{grid-column:1;grid-row:1}
#auto-status{font-size:12px;margin:0;color:#70626c}
#auto-events{font-size:11px;margin:6px 0 0}
#auto-events:empty{display:none}
/* Connections */
.max-card{min-height:0;padding:24px;gap:24px;grid-template-columns:minmax(0,1fr) 250px}
.max-card h2{font-size:28px}
.service-icon{width:60px;height:60px}
.service-heading{gap:16px}
.service-heading p{font-size:13px;line-height:1.5}
.steps{gap:10px;font-size:14px;margin:20px 0}
.steps li span{width:28px;height:28px;font-size:12px}
.auth-tabs{margin-top:18px}
.auth-tabs button{min-height:36px;padding:8px 14px;font-weight:500}
.qr-side{padding-left:24px;gap:10px}
.qr-side .primary{min-height:44px;font-size:13px;padding:10px 14px}
.qr-side .text-button{width:100%;margin:0}
.connection-message{margin:0;max-width:100%;font-size:12px}
.quiet-note{padding-top:14px;font-size:12px}
.carrier-grid{gap:18px;margin-top:18px}
.carrier-card{padding:22px;gap:10px}
.carrier-card .service-icon{width:50px;height:50px}
.carrier-card h2{font-size:22px}
.carrier-card .service-heading{gap:14px}
.carrier-card .carrier-message{margin:4px 0;min-height:0;line-height:1.6;font-size:12px}
.carrier-card .primary{margin-top:auto}
.carrier-card .help-link{order:5;padding:8px}
.carrier-card .recheck{order:4;width:100%;padding:10px 12px}
/* Compact, aligned order controls */
.orders-toolbar{gap:10px;margin-bottom:18px}
.orders-toolbar>#orders-count{margin-left:auto;font-size:12px}
.shop-settings,.order-card{padding:22px}
.shop-settings summary{font-size:16px}
.shop-settings>p{font-size:13px;max-width:820px;margin:16px 0}
.shop-settings form{max-width:none}
.form-grid{gap:16px}
.city-picker{padding:2px 16px 14px;margin:14px 0;background:#faf6f8;border:1px solid #f0e7eb}
.search-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end;margin:12px 0}
.search-row label{margin:0}
.search-row button{margin:0;white-space:nowrap;min-height:44px}
.package-fields{gap:12px}
#shop-form h3,.order-card h3{font-size:16px;margin:22px 0 8px}
#shop-form>.primary{margin-top:12px}
#add-package,#add-item{margin:10px 0}
.extra-package{padding-top:16px;gap:12px}
.extra-package>.text-button{margin-top:2px}
.order-row{padding:18px 20px;border-radius:13px;gap:16px}
.order-row>div:first-child strong{font-size:14px}
.order-row>div:last-child strong{font-size:14px}
.order-card .title-row .text-button{min-height:36px;padding:7px 12px}
.order-card .title-row h2{font-size:20px}
.order-summary{font-size:13px;margin:14px 0 20px}
.item-row{gap:10px;grid-template-columns:minmax(150px,2fr) repeat(3,minmax(75px,1fr)) auto}
.item-row .text-button{margin:0;font-size:12px;min-height:44px;padding:10px 12px;color:#9c405b}
#review-fields>.primary{margin-top:12px}
.order-actions{gap:10px;margin-top:20px;padding-top:20px}
.order-actions .secondary-link{font-size:12px}
.pagination{justify-content:flex-end}
.pagination .text-button{min-height:36px;font-size:12px;padding:7px 14px}
.empty-orders{padding:32px 24px;font-size:14px}
/***** Dialogs: content determines height; no nested scrolling. *****/
dialog{padding:28px;border-radius:18px;max-height:calc(100dvh - 32px)}
.dialog-close{width:36px;height:36px;top:12px;right:12px;color:#785562}
dialog h2{font-size:23px;margin:14px 25px 12px 0}
dialog .primary{margin-top:12px}
.help-steps{gap:10px;font-size:13px}
.help-links{gap:12px;margin:16px 0}
#carrier-form label{margin:16px 0}
/* Customer form and login use the same controls. */
.customer-main{max-width:680px;margin:0 auto;padding:28px 20px}
.customer-header{margin-bottom:24px}
.customer-header span{font-size:23px}
.customer-card{padding:28px}
.customer-card h1{font-size:30px}
.customer-card h2{font-size:20px;margin-top:24px}
.customer-card .primary{margin-top:10px;min-height:46px}
.customer-card .search-row button{font-size:12px}
.customer-card .consent{font-weight:400;align-items:flex-start}
.consent input{min-height:18px}
.login-card .primary{margin-top:20px;min-height:46px}
/* Medium width keeps the editor and preview side by side where usable. */
@media(max-width:1180px){
 .app-layout{grid-template-columns:196px minmax(0,1fr)}
 main{padding:24px}
 .sidebar nav button{padding:9px 10px;gap:9px;font-size:13px}
 .nav-icon{width:38px;height:38px}
 .header-art span{display:none}
 .reply-grid{grid-template-columns:minmax(0,1fr) minmax(0,.9fr);gap:16px}
 .editor-card,.preview-card{padding:20px}
 .editor-card h2{font-size:20px}
 .auto-card{grid-template-columns:1fr;gap:16px;padding:20px}
 .auto-intro{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
 .auto-intro>.eyebrow{display:none}
 .auto-intro h2{margin:0}
 .auto-intro p{max-width:none}
 #auto-form>.actions{flex-direction:row;align-items:center}
 .max-card{grid-template-columns:minmax(0,1fr) 220px;gap:18px;padding:20px}
 .qr-side{padding-left:18px}
 .carrier-card{padding:20px}
 .carrier-grid{grid-template-columns:1fr 1fr}
 .carrier-card .title-row{gap:8px}
 .item-row{grid-template-columns:repeat(3,minmax(0,1fr))}
 .item-row label:first-child{grid-column:1/-1}
 .item-row .text-button{grid-column:1/-1;justify-self:end}
}
@media(max-width:940px){
 .header-art{display:none}
 .reply-grid{grid-template-columns:1fr}
 .preview-card .chat-preview{max-width:480px;margin:14px auto 0}
 #auto-form{grid-template-columns:1fr}
 #auto-form>.actions{grid-column:1;grid-row:2;justify-content:flex-start}
 .max-card{grid-template-columns:1fr}
 .qr-side{border-left:0;border-top:1px solid var(--line);padding:18px 0 0}
 .qr-side>.primary,.qr-side>.text-button,.qr-side form{max-width:320px}
 .carrier-grid{grid-template-columns:1fr}
 .form-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:680px){
 :root{--control-height:46px}
 .app-layout{display:block}
 .sidebar{position:relative;padding:12px 12px 10px;height:auto}
 .brand{gap:8px;padding-right:66px;min-height:38px}
 .brand-logo{width:38px;height:38px}
 .brand strong{font-size:18px;margin:0}
 .sidebar-bottom{top:13px;right:12px;padding:0}
 .profile{padding:0;gap:2px}
 .profile .avatar{width:27px;height:27px;font-size:11px}
 .profile .icon-button{width:30px;height:30px;font-size:17px}
 .sidebar nav{gap:6px;margin-top:12px;display:grid;grid-template-columns:1fr 1fr 1fr}
 .sidebar nav button{flex-direction:column;gap:2px;padding:7px 3px;min-height:70px;border-radius:12px;font-size:11px}
 .nav-icon{width:32px;height:32px}
 .sidebar nav button.active:before{left:30%;right:30%;top:auto;bottom:0;height:2px;width:auto;border-radius:2px 2px 0 0}
 main{padding:20px 14px 16px}
 h1{font-size:29px;letter-spacing:-.9px;margin:8px 0}
 .page-header{min-height:0;margin-bottom:18px}
 .page-header p{font-size:12px}
 .eyebrow{font-size:9px}
 .card{border-radius:14px}
 .editor-card,.preview-card,.auto-card,.shop-settings,.order-card{padding:18px}
 .editor-card h2{font-size:20px;margin:10px 0 18px}
 input,select,textarea{font-size:16px}
 #reply-link{font-size:16px}
 #reply-text{min-height:118px}
 .editor-footer{margin-top:16px;padding-top:14px}
 .editor-footer .primary{padding:10px 14px;min-width:0;font-size:13px}
 .auto-intro{display:block}
 .auto-intro h2{font-size:19px;margin-bottom:6px}
 #auto-form>.actions{display:grid;grid-template-columns:1fr;width:100%;gap:8px}
 #auto-form .text-button,#auto-form .primary{width:100%;margin:0}
 .auto-card{margin-top:16px}
 .preview-card .chat-preview{margin-top:12px}
 .carrier-card,.max-card{padding:18px}
 .service-heading p{font-size:12px}
 .steps{font-size:12px}
 .carrier-card .service-icon{width:46px;height:46px}
 .carrier-card h2{font-size:21px}
 .carrier-card .badge{font-size:10px}
 .help-link{font-size:12px}
 .orders-toolbar .primary{width:auto;flex:1}
 .orders-toolbar .text-button{font-size:12px}
 .orders-toolbar>#orders-count{margin:0;width:100%}
 .form-grid{grid-template-columns:1fr;gap:0}
 .package-fields,.extra-package{grid-template-columns:1fr 1fr;gap:12px}
 .city-picker{padding:2px 12px 12px}
 .search-row{gap:8px;grid-template-columns:minmax(0,1fr) auto}
 .search-row .text-button{padding:10px;font-size:12px;min-height:46px}
 .package-picker{grid-template-columns:1fr}
 .package-picker .text-button{justify-self:start}
 .order-row{padding:16px;gap:10px;grid-template-columns:1fr}
 .order-excerpt{grid-row:auto;grid-column:1}
 .order-row>div:last-child{display:flex;align-items:center;justify-content:space-between;gap:8px}
 .order-actions{align-items:stretch}
 .order-actions>*{width:100%}
 .order-card h3{margin-top:20px}
 .item-row{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
 .item-row input{padding:10px 8px}
 .item-row label{font-size:10px}
 #shop-form>.primary,#review-fields>.primary{width:100%}
 .customer-main{padding:22px 14px}
 .customer-card{padding:20px}
 .customer-header{margin-bottom:20px}
 .customer-card h1{font-size:28px}
 dialog{padding:22px;width:calc(100% - 24px);max-height:calc(100dvh - 24px)}
 dialog h2{font-size:21px}
 .help-steps{font-size:12px;padding-left:20px}
 .help-links{padding:12px;font-size:12px}
 .main-footer{margin-top:20px;font-size:9px}
}
@media(prefers-reduced-motion:reduce){.nav-icon{transition:none}.sidebar nav button:hover .nav-icon{transform:none}}
/* Delivery fields share a row on wide screens; the address gets more room. */
.city-picker{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr);gap:0 14px}
.city-picker>.search-row,.city-picker>p{grid-column:1/-1}
.city-picker>.search-row{margin-bottom:0}
.payment-fields{grid-template-columns:minmax(150px,.6fr) minmax(0,1.4fr)}
.primary[aria-busy=true]:before,.text-button[aria-busy=true]:before{content:"";width:13px;height:13px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;flex-shrink:0;animation:button-spin .8s linear infinite}
@keyframes button-spin{to{transform:rotate(360deg)}}
@media(max-width:680px){
 .sidebar nav button{font-size:12px}
 #page-reply{display:flex;flex-direction:column}
 #page-reply>.reply-grid{display:contents}
 #page-reply .editor-card{order:1}
 #page-reply>.auto-card{order:2}
 #page-reply .preview-card{order:3;margin-top:16px}
 .city-picker,.payment-fields{grid-template-columns:minmax(0,1fr)}
}
@media(prefers-reduced-motion:reduce){.primary[aria-busy=true]:before,.text-button[aria-busy=true]:before{animation:none}}
@media(max-width:680px){.pagination .text-button,.auth-tabs button{min-height:44px}.dialog-close{width:40px;height:40px}}
/* Once connected, onboarding instructions no longer consume the main card. */
.max-card.is-connected .auth-tabs,.max-card.is-connected .steps,.max-card.is-connected .qr-placeholder{display:none}
.max-card.is-connected .quiet-note{margin-top:18px}
.carrier-card>[data-carrier]{width:100%;margin-top:auto}
/* Delivery ledger and postal setup */
.delivery-toolbar{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:16px 0}
.delivery-totals{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:20px 0}
.metric{padding:20px;display:flex;flex-direction:column;gap:12px}.metric span{color:var(--muted,#756c71);font-size:13px}.metric strong{font-size:24px;overflow-wrap:anywhere}
.delivery-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;align-items:end;margin-bottom:18px}.delivery-filters label{margin:0}.delivery-search{grid-column:span 2}.delivery-filters .consent{align-self:center}.delivery-filters .primary{justify-self:end}
.import-panel{margin:18px 0}.import-panel summary,.postal-settings summary{font-weight:650;cursor:pointer}.import-panel textarea{margin-top:12px}
.delivery-row{display:grid;width:100%;grid-template-columns:1fr 1.2fr 1fr;gap:20px;text-align:left;margin-bottom:12px;padding:20px;border:1px solid #eadfe3;background:white;cursor:pointer;color:inherit;font:inherit}.delivery-row:hover{border-color:#b76c82;box-shadow:0 4px 18px #85223d0a}.delivery-row>div{display:flex;flex-direction:column;gap:9px;min-width:0;overflow-wrap:anywhere}.delivery-row>div:last-child{align-items:flex-end;text-align:right}.delivery-row .badge{white-space:normal}
.delivery-events{padding-left:22px;display:grid;gap:14px}.delivery-events li{padding-left:8px;color:#62535a}
.postal-address{border:1px solid #e9dce1;background:#fcfafb;border-radius:14px;padding:18px;margin:18px 0}.postal-address .consent{margin-top:12px}.postal-settings{margin:18px 0}.postal-settings form{margin-top:20px}.postal-settings select{max-width:100%}
#delivery-details{display:grid;grid-template-columns:1fr 1fr;gap:0 24px}#delivery-card{margin-top:20px}#delivery-details p{overflow-wrap:anywhere}
@media(max-width:1000px){.delivery-totals{grid-template-columns:repeat(3,minmax(0,1fr))}.delivery-filters{grid-template-columns:1fr 1fr}.delivery-filters .consent{grid-column:span 2}}
@media(max-width:700px){.sidebar nav{grid-template-columns:repeat(2,minmax(0,1fr))!important}.delivery-totals{grid-template-columns:1fr 1fr}.metric{padding:14px}.metric strong{font-size:22px}.delivery-row{grid-template-columns:1fr;padding:18px;gap:12px}.delivery-row>div:last-child{align-items:flex-start;text-align:left}.delivery-filters{padding:16px;gap:12px}.delivery-filters .primary{grid-column:span 2;width:100%}.delivery-toolbar{gap:10px}.delivery-toolbar>*{flex:1 1 170px}.postal-address{padding:14px}#delivery-details{grid-template-columns:1fr}.delivery-row .eyebrow{font-size:11px}}
.delivery-filters{padding:22px}.import-panel,.postal-settings,#delivery-card{padding:22px}.delivery-filters .consent{display:flex;align-items:center;gap:9px}.delivery-filters .consent input{width:18px;min-width:18px;height:18px;margin:0}.delivery-row .badge.success{background:#eaf5ed;color:#2c714c}.delivery-row .badge.pending{background:#fff4df;color:#8c6822}.delivery-row .badge.error{background:#fae8ec;color:#922342}
@media(max-width:700px){.delivery-filters,.import-panel,.postal-settings,#delivery-card{padding:16px}.metric:last-child{grid-column:span 2}}
/* Compact delivery workspace: automatic filters, occasional actions in one menu. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#page-deliveries .delivery-totals{gap:0;margin:4px 0 26px;background:#fff;border:1px solid #e9e2e5;border-radius:16px;overflow:hidden}
#page-deliveries .metric{padding:18px 20px;border:0;border-radius:0;box-shadow:none;background:transparent;gap:8px;border-right:1px solid #eee7ea}
#page-deliveries .metric:last-child{border:0;background:#faf4f6}
#page-deliveries .metric strong{font-size:25px;letter-spacing:-.6px}
.delivery-list-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}.delivery-list-head h2{margin:0;font-size:20px;letter-spacing:-.4px}.delivery-list-head h2 span{display:inline-flex;margin-left:8px;padding:3px 9px;background:#efe7eb;border-radius:7px;font-size:13px;vertical-align:middle}.delivery-list-head p{margin:7px 0 0;font-size:12px}
.delivery-more{position:relative;flex-shrink:0}.delivery-more>summary{list-style:none;cursor:pointer;font-size:13px;font-weight:650;padding:9px 13px;border-radius:9px;border:1px solid #e5dce0;background:white;display:flex;align-items:center;gap:12px}.delivery-more>summary::-webkit-details-marker{display:none}.delivery-more>summary span{font-size:20px;line-height:16px}.delivery-menu{position:absolute;right:0;top:calc(100% + 7px);z-index:5;min-width:248px;background:white;padding:6px;border:1px solid #e5dce0;border-radius:12px;box-shadow:0 12px 36px #40202d16}.delivery-menu button{display:block;width:100%;border:0;background:none;text-align:left;padding:12px;border-radius:7px;color:#4b3741;font:inherit;font-size:13px;cursor:pointer}.delivery-menu button:hover{background:#faf1f4}.delivery-menu button:disabled{opacity:.5}
#page-deliveries .delivery-filters{padding:0;grid-template-columns:minmax(220px,1.6fr) minmax(170px,1fr) minmax(125px,.8fr) minmax(155px,1fr);gap:10px;margin-bottom:18px}#page-deliveries .delivery-search{grid-column:auto}#page-deliveries .delivery-filters input,#page-deliveries .delivery-filters select{height:42px;font-size:13px}#delivery-custom-dates{grid-column:1/-1;display:flex;gap:12px;justify-content:flex-end}#delivery-custom-dates label{max-width:200px;font-size:12px}
#page-deliveries .delivery-row{padding:16px 18px;margin-bottom:8px;gap:16px;box-shadow:none}#page-deliveries .delivery-row>div{gap:6px}#page-deliveries .delivery-row .eyebrow{letter-spacing:1px;font-size:10px}#page-deliveries .delivery-row strong{font-size:15px}#page-deliveries .delivery-row .small{font-size:12px}
.delivery-empty{min-height:240px;padding:32px;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;border:1px dashed #dfd0d7!important;background:linear-gradient(145deg,#fff,#fcf8fa);box-shadow:none!important}.delivery-empty img{width:62px;height:62px;margin-bottom:12px}.delivery-empty h3{font-size:19px;margin:0 0 8px}.delivery-empty p{font-size:13px;line-height:1.65;max-width:390px;margin:0}#delivery-error:empty{display:none}#delivery-import-panel h3{margin:0}#delivery-import-panel{margin:0 0 18px}
@media(max-width:1150px){#page-deliveries .delivery-filters{grid-template-columns:1fr 1fr}#page-deliveries .delivery-search{grid-column:1/-1}#page-deliveries .delivery-filters label:last-of-type{grid-column:1/-1}}
@media(max-width:1000px){#page-deliveries .delivery-totals{grid-template-columns:repeat(4,minmax(0,1fr))}#page-deliveries .metric:last-child{grid-column:1/-1;flex-direction:row;align-items:center;justify-content:space-between;border-top:1px solid #eee7ea}}
@media(max-width:700px){#page-deliveries .delivery-totals{grid-template-columns:1fr 1fr;margin:0 0 22px}#page-deliveries .metric{padding:14px 16px;border-bottom:1px solid #eee7ea}#page-deliveries .metric:nth-child(2n){border-right:0}#page-deliveries .metric span{font-size:12px}#page-deliveries .metric:last-child{border:0}#page-deliveries .metric strong{font-size:23px}.delivery-list-head{align-items:flex-start}.delivery-list-head h2{font-size:18px}.delivery-list-head p{line-height:1.5;max-width:235px}.delivery-more>summary{min-height:42px}.delivery-menu{min-width:235px}.delivery-empty{padding:26px 18px;min-height:230px}#page-deliveries .delivery-filters{gap:9px}#delivery-custom-dates{justify-content:stretch}#delivery-custom-dates label{flex:1;min-width:0}.delivery-row>div:last-child{display:grid!important;grid-template-columns:1fr auto;align-items:center!important;width:100%}.delivery-row>div:last-child .small{grid-column:1/-1}}
#page-deliveries .delivery-row .form-error{margin:0;font-size:12px}
/* Cherry identity, soft raised controls and owner workspace. */
.sidebar .brand{min-height:126px;padding:0 12px 18px;margin:0;display:flex;justify-content:center;align-items:center}.sidebar .brand-logo{width:112px;height:112px;filter:drop-shadow(0 5px 9px #7e284812)}
.sidebar-bottom{padding:0;margin-top:auto;border:0}.sidebar-bottom>p{display:none}.profile-launch{width:100%;display:flex;align-items:center;gap:10px;padding:13px 10px;border-radius:15px;border:1px solid #e7dbe1;background:linear-gradient(145deg,#fff,#f7edf2);box-shadow:inset 0 1px 0 #fff,0 4px 10px #64334a09;color:#633b4c;text-align:left;cursor:pointer}.profile-launch:hover,.profile-launch.active{border-color:#cfa4b5;background:linear-gradient(145deg,#fff7fa,#f0dfe7)}.profile-caption{display:flex;flex:1;min-width:0;flex-direction:column;gap:4px}.profile-caption strong{font-size:14px;overflow:hidden;text-overflow:ellipsis}.profile-caption small{font-size:10px;color:#9c7b8a}.avatar{flex:none;background:radial-gradient(circle at 30% 20%,#ce7795,#a0375b 60%,#6d203d);box-shadow:inset 0 1px 2px #ffffff60,0 3px 7px #6b1c3620;border:1px solid #a6577133}.profile-launch>svg{flex:none;opacity:.65}
.primary{background:linear-gradient(155deg,#aa4265 0%,#922b4e 48%,#79203f 100%);border-color:#852641;box-shadow:inset 0 1px 0 #ffffff35,0 3px 0 #621c3330,0 5px 12px #73223e14}.primary:hover:not(:disabled){background:linear-gradient(155deg,#b65375,#8c284a);box-shadow:inset 0 1px 0 #ffffff40,0 3px 0 #621c3330,0 7px 15px #73223e20}.text-button,.secondary-link,.delivery-more>summary{background:linear-gradient(160deg,#fff,#f9f2f5);box-shadow:inset 0 1px 0 white,0 2px 0 #7142570c,0 3px 7px #71425707}.primary:active:not(:disabled),.text-button:active:not(:disabled){transform:translateY(1px);box-shadow:inset 0 1px 3px #5b203518}.primary:disabled,.text-button:disabled{box-shadow:none}
.carrier-tabs{display:flex;gap:8px;border-bottom:1px solid #e5dbe0;margin:0 0 12px;padding-bottom:12px}.carrier-tabs button{display:flex;align-items:center;justify-content:center;gap:12px;min-height:56px;padding:10px 25px;min-width:180px;border:1px solid transparent;border-radius:13px;background:transparent;font:inherit;font-weight:650;color:#8a7b83;cursor:pointer}.carrier-tabs button[aria-selected=true]{background:linear-gradient(140deg,#fff,#f7edf2);border-color:#e1c5d1;box-shadow:inset 0 1px white,0 3px 8px #6f30400a;color:#71354d}.carrier-dot{display:inline-flex;width:32px;height:32px;align-items:center;justify-content:center;border-radius:10px;color:white;font-size:20px;box-shadow:inset 0 1px 1px #ffffff55,0 3px 6px #49203218;flex:none}.cdek-dot{background:linear-gradient(145deg,#75ce6b,#238942)}.pochta-dot{background:linear-gradient(145deg,#6199fc,#1646c6)}
#orders-carrier-description{margin:8px 0 18px}.orders-toolbar{align-items:center;gap:10px}#orders-count{margin-left:auto;font-size:12px}.shop-settings,.postal-settings{background:linear-gradient(130deg,#fff,#fcf9fa);margin:16px 0 22px!important}.shop-settings summary,.postal-settings summary{padding:2px 0;font-size:14px}.shop-settings form,.postal-settings form{border-top:1px solid #eee5e9;padding-top:14px}.picker-feedback{grid-column:1/-1!important;margin:2px 0 12px!important;font-size:12px;line-height:1.6;min-height:20px}.city-picker{padding:16px;background:#faf7f9;border:1px solid #eee4e9;border-radius:12px}.city-picker .search-row{grid-column:1/-1}.city-picker select{width:100%;text-overflow:ellipsis}.city-picker input:disabled,.city-picker select:disabled{background:#f0edef;color:#9d9198}
.settings-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,1fr);gap:24px;align-items:start}.owner-settings,.settings-links,.settings-access{padding:26px}.settings-heading{display:flex;align-items:center;gap:16px;margin-bottom:24px}.settings-heading .avatar{width:56px;height:56px;font-size:22px}.settings-heading h2,.settings-links h2,.settings-access h2{font-size:20px;margin:0 0 6px}.settings-heading p{margin:0}.settings-side{display:grid;gap:18px}.settings-links>button,.settings-links>a{display:flex;align-items:center;gap:12px;width:100%;padding:16px 0;border:0;border-bottom:1px solid #eee5ea;background:none;text-decoration:none;text-align:left;color:#65404f;cursor:pointer;font:inherit;font-size:13px}.settings-links button>span:nth-child(2){flex:1;display:flex;flex-direction:column;gap:5px}.settings-links small{font-size:11px;color:#99808c}.settings-links a{justify-content:space-between}.settings-links>:last-child{border-bottom:0}.settings-access p{margin:14px 0}.settings-access .text-button{margin-top:8px}.owner-settings .form-grid{gap:4px 18px}
@media(max-width:900px){.settings-layout{grid-template-columns:1fr}.settings-side{grid-template-columns:1fr 1fr}.carrier-tabs button{flex:1;min-width:0}}
@media(max-width:700px){.sidebar .brand{min-height:64px;padding:0;justify-content:flex-start}.sidebar .brand-logo{width:65px;height:65px}.sidebar .sidebar-bottom{top:15px;right:16px;width:auto}.profile-launch{width:54px;height:50px;padding:6px;justify-content:center;border-radius:13px}.profile-caption,.profile-launch>svg{display:none}.profile-launch .avatar{width:34px;height:34px}.carrier-tabs{gap:6px}.carrier-tabs button{padding:10px;font-size:14px;gap:8px}.carrier-dot{width:28px;height:28px}.settings-side{grid-template-columns:1fr}.owner-settings,.settings-links,.settings-access{padding:20px}.settings-heading{gap:12px}.orders-toolbar .primary,.orders-toolbar .text-button{flex:1}#orders-count{width:100%;margin-left:0}.city-picker{padding:12px}.city-picker .search-row{display:flex;flex-wrap:wrap;align-items:end}.city-picker .search-row label{flex:1;min-width:170px}.city-picker .city-search{margin-bottom:14px}}

#customer-cdek{border:0;padding:0;margin:0;min-width:0}
fieldset.city-picker{border:0;padding:0;margin:0;min-width:0}

/* Original carrier wordmarks; preserve proportions and corporate colors. */
.carrier-brand{display:inline-flex;width:112px;height:32px;align-items:center;justify-content:center;flex:none}.carrier-brand img{display:block;max-width:100%;max-height:32px;object-fit:contain}.carrier-brand img[src$="cdek.svg"]{width:78px}.carrier-brand img[src$="pochta.svg"]{width:112px}.service-icon.carrier-brand-icon{width:120px;min-width:120px;height:54px;background:transparent;border-radius:0;box-shadow:none;transform:none}.carrier-brand-icon img{width:100%;height:100%;object-fit:contain}.carrier-brand-icon img[src$="cdek.svg"]{max-width:99px}.profile-launch .avatar svg{width:27px;height:27px;filter:drop-shadow(0 1px 1px #57233744)}.settings-heading .avatar svg{width:40px;height:40px}.settings-links>button{gap:14px}.settings-links .carrier-brand{width:88px}.settings-links .carrier-brand img{max-width:88px}.carrier-tabs button{min-height:56px}.carrier-tabs .carrier-brand{width:120px}
@media(max-width:700px){.service-icon.carrier-brand-icon{width:88px;min-width:88px;height:44px}.carrier-tabs .carrier-brand{width:112px}.profile-launch .avatar svg{width:24px;height:24px}}
/* Open information and choices: no dropdowns or hidden settings. */
.open-section-heading{font-size:18px;display:flex;justify-content:space-between;gap:12px;align-items:center;margin:0 0 16px}.open-section-heading #readiness-count{font-size:12px;font-weight:500;color:#82717a}.stage-details .stage-body{padding:0 22px 22px}.stage-details>.open-section-heading{padding:22px 22px 0}.visible-choices{border:0;min-width:0;padding:0;margin:0 0 18px;grid-column:1/-1}.visible-choices legend{font-size:13px;font-weight:550;color:#6d5c65;margin:0 0 9px;padding:0}.choice-options{display:flex;gap:8px;flex-wrap:wrap}.choice-card{display:flex!important;align-items:center;gap:9px;margin:0!important;padding:11px 14px;border:1px solid #e8dde2;border-radius:11px;background:#fff;cursor:pointer;min-width:0;max-width:100%;font-size:13px!important;color:#51434b!important;line-height:1.45}.choice-card:hover{border-color:#caa1b2;background:#fdf8fa}.choice-card:has(input:checked){background:#f8edf2;border-color:#a34768;box-shadow:inset 0 0 0 1px #a3476820;color:#762b47!important}.choice-card:focus-within{outline:2px solid #ca92a8;outline-offset:2px}.choice-card:has(input:disabled){opacity:.55;cursor:default}.choice-card input{appearance:auto!important;accent-color:#933657;width:15px!important;height:15px!important;min-width:15px;padding:0!important;margin:0!important;box-shadow:none!important;flex:none}.choice-content{display:flex;flex-direction:column;gap:5px;overflow-wrap:anywhere}.choice-content small{font-size:12px;color:#95838c}.choice-feedback:empty{display:none}.choice-feedback{margin:9px 0 0}.city-picker>.visible-choices .choice-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}.city-picker>.visible-choices .choice-card{align-items:flex-start}.city-picker>.visible-choices input{margin-top:3px!important}.city-picker{display:block}.city-picker .search-row{margin-bottom:6px}.delivery-more .delivery-menu{position:static;display:flex;flex-wrap:wrap;gap:7px;min-width:0;padding:0;border:0;border-radius:0;box-shadow:none;background:transparent}.delivery-menu button{width:auto;white-space:normal;border:1px solid #eadfe4;background:#fff;font-size:12px;padding:9px 12px}.delivery-list-head{flex-wrap:wrap}.delivery-more{max-width:100%}#page-deliveries .delivery-filters{display:block}#delivery-filters>.visible-choices{margin:16px 0}#delivery-filters .choice-card{padding:8px 11px;font-size:12px!important}.package-picker{display:block}.package-picker .visible-choices{margin-bottom:10px}.shop-settings h3,.postal-settings h3{margin-top:24px}.brand-logo{object-fit:contain}
@media(max-width:700px){.open-section-heading{font-size:16px}.visible-choices .choice-card{flex-grow:1}.city-picker>.visible-choices .choice-options{grid-template-columns:1fr}.delivery-more .delivery-menu{min-width:0}.delivery-list-head .delivery-more{width:100%}.stage-details .stage-body{padding:0 16px 16px}.stage-details>.open-section-heading{padding:16px 16px 0}}
.choice-card{flex-direction:row!important;width:auto!important}.choice-content{min-width:0}.choice-card input{align-self:center}.city-picker .choice-card input{align-self:flex-start}
.choice-card input{min-height:15px!important;max-height:15px!important}.choice-card{min-height:0!important}

/* Compact signature beneath the selected cherry mark. */
.sidebar{padding-top:16px}.sidebar .brand{min-height:0;padding:0;gap:0;flex-direction:column;justify-content:flex-start;align-items:center}.sidebar .brand-logo{width:104px;height:104px}.sidebar .brand strong{font-size:18px;font-weight:650;letter-spacing:-.45px;line-height:1.25;margin:0;max-width:100%;overflow-wrap:anywhere;color:#4d2636}.sidebar nav{margin-top:12px}
@media(max-width:700px){.sidebar{padding-top:10px}.sidebar .brand{width:160px;max-width:calc(100% - 66px);padding:0;gap:0;align-items:center}.sidebar .brand-logo{width:62px;height:62px}.sidebar .brand strong{font-size:15px;letter-spacing:-.3px;margin:0}.sidebar nav{margin-top:9px;gap:5px}.sidebar nav button{min-height:62px}}

/* Customer reference photos remain visible alongside the order. */
.photo-upload{border:1px dashed #d6bdc6;border-radius:16px;padding:16px;margin:16px 0;background:#fdf9fa}.photo-upload input[type=file]{padding:10px;max-width:100%;font-size:13px}.order-photos{display:flex;flex-wrap:wrap;gap:12px;margin:12px 0 20px}.photo-preview{display:flex;flex-direction:column;gap:8px;width:160px;padding:8px;border:1px solid #e5d8dd;border-radius:14px;background:#fff;color:#862840;text-align:center;font-size:13px;text-decoration:none}.photo-preview img{width:100%;height:160px;object-fit:contain;border-radius:8px;background:#f8f5f6}.photo-preview button{padding:7px;font-size:12px;min-height:36px}.photo-preview:hover{border-color:#a65670}#order-photo-section{margin-bottom:20px}@media(max-width:700px){.photo-preview{width:calc(50% - 6px);min-width:110px}.photo-preview img{height:130px}}

.order-photos:empty{display:none}.photo-upload input::file-selector-button{border:0;border-radius:8px;padding:9px 12px;margin-right:8px;background:linear-gradient(145deg,#a4516b,#80223f);color:#fff;font:inherit;font-weight:600;cursor:pointer;box-shadow:0 2px 4px #80223f22}.photo-upload input:disabled::file-selector-button{opacity:.55}
.test-mode-card{display:grid;grid-template-columns:minmax(190px,.7fr) minmax(320px,1.3fr);align-items:center;gap:24px;padding:22px 24px;margin-top:14px}.test-mode-card h2{font-size:20px;margin:8px 0}.test-mode-card p{margin:8px 0 0;line-height:1.55}.test-mode-card label{margin:0}.test-mode-card input{display:block;width:100%;margin-top:8px}.test-mode-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.test-mode-actions button{margin:0}.test-mode-card #test-chat-status{min-height:1.4em}
@media(max-width:700px){.test-mode-card{grid-template-columns:1fr;gap:12px;padding:18px}.test-mode-actions{display:grid;grid-template-columns:1fr}.test-mode-actions button{width:100%}}
