:root{--ink:#17202b;--muted:#728092;--line:#e6e9ef;--canvas:#f5f7fa;--nav:#111a27;--accent:#e06b42;--accent-dark:#bd4e28;--green:#168664;--radius:16px;--shadow:0 5px 18px rgba(22,31,44,.035);font-family:Inter,ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif;color:var(--ink);background:var(--canvas);font-synthesis:none}
*{box-sizing:border-box}body{margin:0;min-width:320px}a{color:inherit;text-decoration:none}button,input,textarea,select{font:inherit}button,a,input,select,summary{-webkit-tap-highlight-color:transparent}button,summary{cursor:pointer}button{color:inherit}button:disabled{opacity:.6;cursor:not-allowed}button[aria-busy=true]{cursor:wait}svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(27px,3vw,36px);letter-spacing:-1.1px;line-height:1.18;margin-bottom:10px}h2{font-size:17px;letter-spacing:-.25px;margin-bottom:12px}h3{font-size:17px;letter-spacing:-.3px;margin-bottom:6px}p{line-height:1.6}small{line-height:1.5}form{margin:0}[hidden]{display:none!important}:focus-visible{outline:3px solid #3683cd;outline-offset:4px}.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}.skip{position:fixed;top:-100px;left:20px;z-index:100;padding:15px;background:white}.skip:focus{top:15px}
.sidebar{width:244px;position:fixed;inset:0 auto 0 0;padding:32px 21px 22px;background:var(--nav);color:#fff;display:flex;flex-direction:column;z-index:20}.brand{display:flex;align-items:center;gap:12px;padding:0 7px}.brand-mark{width:43px;height:43px;display:grid;place-items:center;border-radius:13px;background:var(--accent);font-weight:850;font-size:27px;letter-spacing:-3px;padding-right:3px;box-shadow:0 6px 22px #e06b4228}.brand strong,.brand small{display:block}.brand strong{font-size:23px;letter-spacing:-.8px}.brand small{font-size:8px;letter-spacing:1.9px;color:#98a5b7;margin-top:3px}.main-nav{display:grid;gap:8px}.main-nav :is(a,:where(button[data-open-map])){display:flex;align-items:center;gap:13px;padding:15px 16px;border-radius:10px;font-size:14px;font-weight:600;color:#b1bdce;min-height:51px}.main-nav :is(a,:where(button[data-open-map])).active{background:#263040;color:white;box-shadow:inset 3px 0 var(--accent)}.main-nav :is(a,:where(button[data-open-map])).active svg{color:#f18e69}.main-nav :is(a,:where(button[data-open-map])):hover{background:#202b3b;color:white}.nav-arrow{margin-left:auto;color:#9eacbf;font-size:20px}.sidebar-footer{margin-top:auto;padding-top:26px}.account-link{display:block;color:#a9b6c7;font-size:12px;min-height:44px;padding:10px 8px;margin-bottom:16px;border-bottom:1px solid #2a3545}.user-chip{display:flex;align-items:center;gap:11px;padding:0 8px}.user-chip>span{width:34px;height:34px;display:grid;place-items:center;border-radius:50%;background:#39404a;color:#ffbc9f;font-weight:700}.user-chip strong,.user-chip small{display:block;overflow-wrap:anywhere}.user-chip strong{font-size:12px}.user-chip small{font-size:10px;color:#9caabd;margin-top:3px}.logout{background:none;border:0;color:#a4b0c1;font-size:11px;padding:14px 8px 6px 54px;min-height:44px}.logout:hover{color:white}.main-wrap{margin-left:244px;min-height:100vh;display:flex;flex-direction:column}.content{padding:36px 40px 48px;width:100%;max-width:1600px;margin:auto auto 0;margin-top:0;flex:1}.page-footer{display:flex;justify-content:space-between;margin:0 40px;padding:20px 0;border-top:1px solid var(--line);color:#84909f;font-size:10px}.page-footer span{color:#939eab}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:27px}.page-heading p{color:var(--muted);font-size:13px;margin-bottom:0}.eyebrow{font-size:9px;font-weight:750;letter-spacing:1.8px;color:var(--accent-dark);display:block;margin-bottom:10px}.button{display:inline-flex;justify-content:center;align-items:center;gap:8px;min-height:46px;border:1px solid transparent;border-radius:10px;padding:0 18px;font-size:12px;font-weight:700;line-height:1.3;white-space:nowrap;transition:background .15s,box-shadow .15s}.button:hover{box-shadow:0 4px 12px #17202b10}.primary{color:white;background:var(--accent)}.primary:hover{background:var(--accent-dark)}.secondary{background:var(--nav);color:white}.ghost{background:white;border-color:#dce1e8;color:#435065}.compact{min-height:42px;padding:0 13px}.full{width:100%}.danger{color:#ae3542;background:#fff;border-color:#e4b5bb}.danger:hover{background:#fff1f2}.actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.panel{background:white;border:1px solid var(--line);border-radius:var(--radius);padding:24px;box-shadow:var(--shadow)}.inline{display:flex;align-items:center;gap:14px}.small-label{display:block;font-size:9px;font-weight:750;letter-spacing:1px;color:var(--muted)}.badge{display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:6px 9px;border-radius:6px;font-size:10px;font-weight:700;white-space:nowrap}.badge.warm{color:#a95722;background:#fff2e9}.badge.success{color:#127453;background:#e8f5ef}.badge.neutral{color:#738094;background:#f0f3f6}.badge.big{font-size:12px;padding:13px 17px;border-radius:10px}.muted{color:var(--muted)}.small{font-size:11px}.green{color:var(--green)}.date-select{display:flex;gap:8px;align-items:center}.date-select select{min-height:40px;font-size:12px;width:auto}.date-select .button{font-size:11px;min-height:40px}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:17px}.section-heading h2{margin:0}.section-heading p{margin:6px 0 0}.count{display:inline-grid;place-items:center;font-size:10px;vertical-align:middle;margin-left:6px;padding:4px 7px;min-width:25px;min-height:24px;border-radius:6px;background:#e9edf2;color:#6b7789}progress{display:block;width:100%;height:6px;appearance:none;border:0;border-radius:20px;overflow:hidden;background:#edf0f4;accent-color:var(--green)}progress::-webkit-progress-bar{background:#edf0f4;border-radius:20px}progress::-webkit-progress-value{background:var(--green);border-radius:20px}progress::-moz-progress-bar{background:var(--green);border-radius:20px}.empty{padding:55px 24px;text-align:center}.empty h2{font-size:21px;margin-top:16px}.empty p{font-size:13px;color:var(--muted)}.empty-icon{display:grid;place-items:center;margin:auto;width:60px;height:60px;border-radius:18px;background:#fdf0e9;color:var(--accent);font-size:30px}.empty .button{margin-top:12px}
input,select,textarea{display:block;width:100%;border:1px solid #dce2e9;border-radius:9px;background:#fff;color:var(--ink);min-height:46px;padding:10px 13px;font-size:14px}input::placeholder,textarea::placeholder{color:#8a94a3}input[type=checkbox]{width:20px;min-height:20px;display:inline-block;vertical-align:middle;accent-color:var(--accent)}label{display:block;font-size:12px;font-weight:650;line-height:1.5}label input,label select,label textarea{margin-top:7px}label.sr-only+select{margin:0}textarea{resize:vertical;line-height:1.6}.stack{display:grid;gap:20px}.stack>div>input,.stack>div>textarea{margin-top:7px}.stack .helptext{font-size:11px;line-height:1.6;color:var(--muted);margin-top:7px}.stack .helptext ul{padding-left:19px}.stack .helptext li{margin-bottom:5px}.form-panel{max-width:730px}.errorlist{list-style:none;padding:0;margin:5px 0 9px;font-size:12px;color:#aa3040}.errorlist li{padding:7px 0}.messages{margin-bottom:20px}.flash{border:1px solid #b7dfd0;background:#ecf8f2;color:#146c4f;border-radius:10px;padding:13px 17px;margin-bottom:8px;font-size:13px}.flash.error{background:#fff0f1;border-color:#eec2c7;color:#ac3441}.flash.warning{background:#fff8e7;border-color:#efdbac;color:#95651d}.back-link{display:inline-flex;align-items:center;min-height:44px;color:#6a778b;font-size:12px;margin:-10px 0 10px}.back-link:hover{color:var(--accent-dark)}.filters{display:flex;gap:12px;align-items:end;flex-wrap:wrap}.filters.panel{padding:16px 20px;margin-bottom:25px}.grow{flex:1;min-width:160px}.client-list{display:grid;gap:12px}.client-row{display:flex;align-items:center;gap:18px;background:#fff;border:1px solid var(--line);border-radius:13px;padding:20px 23px;box-shadow:var(--shadow)}.client-row:hover{border-color:#e1b5a5}.avatar{display:grid;place-items:center;width:45px;height:45px;border-radius:13px;background:#f7ece6;color:#b96342;font-weight:750;flex-shrink:0}.client-main{flex:1;min-width:0}.client-main h3{font-size:15px;overflow-wrap:anywhere}.client-main p{font-size:11px;color:var(--muted);margin:0;overflow-wrap:anywhere}.client-progress{width:145px;flex-shrink:0}.client-progress strong{display:block;font-size:10px;color:#69788c;margin-bottom:9px}.chevron{font-size:21px;color:#9ca7b6}.danger-zone{margin-top:22px}.text-link{color:var(--accent-dark);font-size:12px;font-weight:650}.order-info{margin-bottom:28px}.order-content{font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere;margin:20px 0;color:#4f5c6e}.order-total{display:flex;align-items:center;gap:15px;padding-top:15px;border-top:1px solid var(--line)}.order-total strong{font-size:13px;color:var(--green)}.beds{display:grid;gap:22px}.bed{padding:0;overflow:hidden;scroll-margin-top:20px}.bed-heading{display:flex;justify-content:space-between;align-items:center;padding:22px 25px;background:#fcfcfd;border-bottom:1px solid var(--line);gap:14px}.bed-heading h2{margin:0 0 4px;font-size:18px;overflow-wrap:anywhere}.bed-heading p{margin:0;font-size:11px;color:var(--muted)}.bed-number{display:grid;place-items:center;flex-shrink:0;width:44px;height:44px;background:#f0f3f7;border-radius:10px;font-weight:750;color:#6a798f}.bed-complete .bed-heading{background:#f1faf6}.bed-complete{border-color:#c6e5d8}.bed-complete .bed-number{background:#def2e8;color:var(--green)}.stage-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 25px;border-bottom:1px solid #edf0f4;min-height:89px}.stage-row:last-child{border-bottom:0}.stage-title{display:flex;align-items:center;gap:16px}.stage-title strong{font-size:16px}.stage-title small{display:block;color:#8691a1;font-size:11px;margin-top:3px}.stage-check{display:grid;place-items:center;flex-shrink:0;width:31px;height:31px;border:1px solid #dbe1e9;border-radius:50%;color:#8893a2;font-size:12px}.stage-complete .stage-check{background:#168664;color:white;border-color:#168664;font-size:17px}.stage-complete .stage-title strong,.stage-complete .stage-title small{color:#167657}.stage-complete{background:#fcfefd}.stage-actions{display:flex;gap:9px;align-items:center}.stage-actions .button{min-width:110px;min-height:48px;font-size:13px}.done-button{background:#e9f5ef;border-color:#b6dacc;color:#176e51}.done-button:hover{background:#d4edde}.stock-button{background:#fff;border-color:#d8dee6;color:#55687d}.stock-button:hover{background:#f2f5f8}.undo-button{background:transparent;border-color:transparent;color:#788797;font-weight:500;font-size:12px!important}.undo-button:hover{background:#f0f3f6}.bed-remove{padding:0 25px 14px}.text-button{background:none;border:0;padding:9px 0;font-size:12px;min-height:44px}.danger-text{color:#a63d48}details.panel{margin-top:20px;padding:0 23px}summary{padding:21px 0;font-size:13px;font-weight:650;min-height:52px}details>.filters{padding:0 0 23px}details>.danger-zone{padding-bottom:22px;margin:0}details.add-bed>summary{color:var(--accent-dark);font-size:15px}.history ol{list-style:none;margin:0;padding:0 0 15px}.history li{border-top:1px solid var(--line);padding:14px 0}.history li>div{display:flex;gap:16px;justify-content:space-between;font-size:11px}.history time{color:var(--muted)}.history p{font-size:12px;color:#6a7688;margin:7px 0 0}table{width:100%;border-collapse:collapse;text-align:left}th{background:#fafbfc;padding:12px 23px;font-size:9px;text-transform:uppercase;letter-spacing:.8px;color:#8b95a4;font-weight:600;white-space:nowrap}td{border-top:1px solid var(--line);padding:17px 23px;font-size:12px;color:#536176}td small{display:block;font-size:10px;color:#8b96a5;margin-top:4px}.small-empty{padding:40px 20px;text-align:center;color:var(--muted);font-size:12px}
.login-wrap{min-height:100vh;min-height:100dvh;display:grid;place-items:center;padding:24px}.login-card{width:min(100%,400px);padding:32px;background:white;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}.login-card h1{font-size:26px;letter-spacing:-.7px;margin:0 0 26px}.login-card .stack{gap:20px}

@media(max-width:1200px){.sidebar{width:220px;padding-inline:16px}.main-wrap{margin-left:220px}.content{padding:30px 25px 40px}.page-footer{margin-inline:25px}.client-row{gap:13px;padding:18px}.client-progress{width:110px}.client-main p{max-width:350px}}
@media(max-width:800px){.sidebar{position:sticky;top:0;width:100%;height:auto;flex-direction:row;align-items:center;padding:12px 18px;gap:18px}.brand{padding:0;gap:8px}.brand-mark{width:34px;height:34px;border-radius:10px;font-size:23px}.brand strong{font-size:19px}.brand small{display:none}.main-nav{display:flex;margin-left:auto;gap:6px}.main-nav :is(a,:where(button[data-open-map])){padding:10px 14px;min-height:43px;gap:8px;font-size:12px}.main-nav svg{width:17px}.nav-arrow{display:none}.sidebar-footer{display:none}.main-wrap{margin-left:0}.content{padding:25px 20px 35px}.page-heading{gap:17px}.page-heading .actions{justify-content:flex-end}.page-heading h1{font-size:29px}.page-heading p{font-size:12px}.page-footer{margin-inline:20px}.client-row{display:grid;grid-template-columns:40px 1fr auto;gap:12px}.avatar{width:40px;height:40px}.client-main{grid-column:2/4}.client-progress{grid-column:2;grid-row:2;width:100%}.client-row>.badge{grid-column:3;grid-row:2}.chevron{display:none}.account-link{display:none}}
@media(max-width:520px){.sidebar{padding:11px 12px;gap:8px}.brand strong{font-size:16px}.brand-mark{width:29px;height:29px;font-size:20px}.main-nav :is(a,:where(button[data-open-map])){padding:10px;font-size:11px;gap:5px}.main-nav svg{width:15px}.content{padding:23px 15px 30px}.page-heading{align-items:flex-start;flex-direction:column;margin-bottom:22px}.page-heading h1{font-size:28px}.page-heading .button{min-height:44px}.eyebrow{font-size:8px;letter-spacing:1.4px}.date-select{width:100%}.date-select select{flex:1}.section-heading{gap:10px}.section-heading h2{font-size:15px}.section-heading>.small{font-size:9px}.filters.panel{padding:13px}.filters{gap:9px}.filters .grow{flex-basis:100%}.client-row{padding:15px 13px}.client-main h3{font-size:15px}.client-main p{font-size:10px}.client-row>.badge{font-size:9px}.client-progress strong{font-size:9px}.panel{padding:18px}.order-info .section-heading{align-items:flex-start}.order-content{font-size:13px}.text-link{font-size:10px}.bed.panel{padding:0}.bed-heading{padding:17px 14px;gap:9px}.bed-number{width:35px;height:35px;font-size:14px}.bed-heading .inline{gap:10px}.bed-heading h2{font-size:15px}.bed-heading p{font-size:10px}.bed-heading .badge{font-size:9px}.stage-row{padding:16px 13px;gap:8px;min-height:93px}.stage-title{gap:9px}.stage-title strong{font-size:14px}.stage-title small{font-size:10px}.stage-check{width:26px;height:26px;font-size:11px}.stage-actions{gap:6px}.stage-actions .button{min-width:65px;padding:0 10px;min-height:46px;font-size:11px}.undo-button{font-size:10px!important;min-width:0!important}.stage-actions .stock-button{min-width:64px}details.panel{padding:0 17px}.history li>div{font-size:10px}.history p{font-size:11px}td,th{padding:13px 15px;font-size:10px}.login-wrap{padding:18px}.login-card{padding:26px}.page-footer{margin-inline:15px;font-size:9px}}.mobile-account{display:none;position:relative}.mobile-account summary{padding:5px 0;min-height:34px;display:flex;align-items:center;font-size:11px;color:#536176}.mobile-account>div{position:absolute;right:0;top:36px;z-index:25;width:210px;background:white;border:1px solid var(--line);border-radius:12px;padding:15px;box-shadow:0 12px 28px #17202b20}.mobile-account strong{font-size:12px;display:block;margin-bottom:8px}.mobile-account a,.mobile-account button{display:block;padding:12px 0;min-height:44px;font-size:12px;border:0;background:none;width:100%;text-align:left;color:#526079}.mobile-account a:hover,.mobile-account button:hover{color:var(--accent-dark)}
body{min-width:0}
@media(max-width:360px){.stage-row{flex-wrap:wrap}.stage-actions{margin-left:auto}}
@media(max-width:800px){.mobile-account{display:block}.bed{scroll-margin-top:80px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* Compact route and order lists. */
.main-nav{margin-top:30px}
.content{padding:24px 32px 32px}
.routes-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.routes-heading h1{font-size:27px;line-height:1.2;margin:0;white-space:nowrap}
.routes-heading .button{min-height:40px;padding:0 14px}
.route-toolbar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:16px}
.week-picker{position:relative}
.week-picker summary{display:flex;align-items:center;gap:10px;min-height:38px;padding:6px 10px;border:1px solid var(--line);border-radius:8px;font-size:11px;font-weight:600;color:#677487;background:white;list-style:none}
.week-picker summary::-webkit-details-marker{display:none}
.week-picker summary span{color:#8792a0;font-size:10px}
.week-options{position:absolute;top:calc(100% + 6px);left:0;width:300px;max-width:calc(100vw - 30px);padding:14px;background:white;border:1px solid var(--line);border-radius:12px;box-shadow:0 10px 30px #17202b18;z-index:10}
.week-options .date-select{display:flex;gap:6px;width:100%}
.week-options select{flex:1;min-width:0;font-size:11px;padding:8px;min-height:38px}
.week-options .button{min-height:38px;padding:0 10px}
.week-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:10px}
.week-links a{display:grid;place-items:center;min-height:42px;border-radius:8px;font-size:12px;background:#f5f7fa;color:#647084}
.week-links a[aria-current],.week-links a:hover{background:#fff0e8;color:var(--accent-dark)}
.current-week-link{font-size:11px;color:var(--accent-dark)}
.route-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,var(--route-width,165px)),1fr));gap:10px;margin-bottom:56px}
.route-card{display:flex;flex-direction:column;min-height:112px;padding:14px;background:white;border:1px solid #dfe4eb;border-radius:11px;box-shadow:var(--shadow);transition:border-color .15s}
.route-card:hover{border-color:var(--accent)}
#workflow .route-overview .route-card.route-in-delivery{background-color:#EAF4FF;border-color:#B7D7FF}
#workflow .route-card.route-upholstery-ready{background:#E2E5E9}
#workflow .route-card.route-logistics-complete{background:#E2E5E9}
#workflow .route-card.route-money-received{background:#DCFCE7}
.route-card h2{font-size:17px;margin:0 0 6px;letter-spacing:-.2px}
.route-card p{font-size:12px;color:#738093;margin:10px 0;line-height:1.3}
.route-card progress{height:6px}
.route-card.route-complete{background:#e5f5ec;border-color:#9cd3b2;box-shadow:none}
.route-complete h2{color:#146c4f}
.route-complete p{color:#237652}
.route-complete progress{accent-color:var(--green)}
.route-complete progress::-webkit-progress-value{background:var(--green)}
.route-complete progress::-moz-progress-bar{background:var(--green)}
.route-complete:hover{border-color:#168664}
.route-breadcrumb{display:flex;align-items:center;gap:14px;margin:-6px 0 8px;font-size:11px;color:#7a8796;min-height:30px}
.route-breadcrumb a{display:flex;align-items:center;min-height:34px;color:#677487}
.order-filters{display:flex;gap:8px;align-items:center;margin-bottom:14px}
.order-filters input,.order-filters select{margin:0;min-height:38px;font-size:12px;padding:8px 10px}
.order-filters .button{min-height:38px;padding:0 13px}
.order-filters .grow{min-width:0}
.compact-orders{gap:8px}
.compact-orders .client-row{display:flex;padding:12px 16px;gap:18px;border-radius:10px}
.compact-orders h2{font-size:15px;margin:0 0 4px;overflow-wrap:anywhere}
.compact-orders .client-main p{font-size:11px;margin:0;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:none}
.compact-orders .client-progress{width:120px}
.compact-orders .client-progress strong{margin-bottom:7px;font-size:11px}
.compact-orders .badge{min-width:68px}
.compact-orders .order-complete{background:#eceff2;box-shadow:none;color:#7c8793}
.order-complete progress::-webkit-progress-value{background:#a9b1ba}
.order-complete progress::-moz-progress-bar{background:#a9b1ba}
@media(max-width:800px){.main-nav{margin-top:0}.content{padding:18px 20px 28px}.mobile-account summary{color:#c4cedc;padding:0 5px;min-width:30px;min-height:40px;font-size:24px;justify-content:center}.sidebar{gap:8px}.mobile-account>div{top:44px}.main-nav :is(a,:where(button[data-open-map])){padding:10px}}
@media(max-width:520px){.content{padding:16px 14px 24px}.routes-heading h1{font-size:24px}.routes-heading .button{font-size:11px;padding:0 10px}.routes-heading .actions{gap:6px;flex-wrap:nowrap}.route-grid{--route-width:145px}.route-card{padding:14px}.route-card h2{font-size:17px}.route-card p{font-size:11px;margin-bottom:10px}.week-picker summary{font-size:10px}.order-filters{flex-wrap:wrap}.order-filters>.grow{flex-basis:100%}.order-filters>label:not(.grow){flex:1}.compact-orders .client-row{display:grid;grid-template-columns:1fr auto;padding:12px;gap:9px}.compact-orders .client-main{grid-column:1 / -1}.compact-orders .client-progress{grid-column:1;grid-row:2;width:100%}.compact-orders .badge{grid-column:2;grid-row:2}.route-breadcrumb{font-size:10px}.main-nav :is(a,:where(button[data-open-map])){font-size:10px;padding:9px 7px}.main-nav svg{width:14px}.brand{gap:5px}}

/* Compact production dashboard. */
.report-toolbar{display:flex;align-items:center;gap:6px 12px;flex-wrap:wrap;margin-bottom:14px}
.period-tabs{display:flex;gap:4px;flex-wrap:wrap}
.period{display:flex;align-items:center;min-height:44px;padding:10px 14px;border-radius:8px;font-size:13px;font-weight:600;color:#677487;list-style:none}
.period:hover{background:#eceff3}
.period.selected{background:#fcebe3;color:var(--accent-dark)}
.report-custom{position:relative}
.report-custom summary::-webkit-details-marker{display:none}
.report-dates{position:absolute;top:calc(100% + 6px);left:0;z-index:10;width:290px;max-width:calc(100vw - 28px);display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:14px;background:white;border:1px solid var(--line);border-radius:12px;box-shadow:0 10px 30px #17202b18}
.report-dates label{min-width:0;font-size:11px}
.report-dates input{min-height:38px;font-size:12px;padding:7px;min-width:0}
.report-dates .button{grid-column:1 / -1;min-height:38px}
.report-range{font-size:11px;color:var(--muted);white-space:nowrap}
.metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px}
.metric{padding:14px 16px;background:white;border:1px solid var(--line);border-radius:11px;box-shadow:var(--shadow)}
.metric>span{font-size:11px;font-weight:600;color:#728092;display:block}
.metric>strong{display:block;font-size:30px;line-height:1.2;letter-spacing:-.7px;margin-top:8px}
.metric.dark{background:var(--nav);border-color:var(--nav);color:white}
.metric.dark>span{color:#b6c1d0}
.daily-panel{padding:16px}
.daily-panel h2{font-size:15px;margin:0 0 10px}
.daily-panel .section-heading{margin-bottom:4px}
.daily-panel .section-heading h2{margin:0}
.daily-chart{overflow-x:auto;padding-bottom:6px}
.chart-columns{display:flex;gap:12px;min-width:100%;width:max-content;background:repeating-linear-gradient(to top,transparent 0,transparent 39px,#edf0f4 39px,#edf0f4 40px);background-size:100% 160px;background-position:0 30px;background-repeat:no-repeat}
.chart-column{flex:1;min-width:64px;text-align:center}
svg.chart-bar{display:block;width:80px;height:210px;margin:auto;fill:var(--accent);stroke:none}
.chart-bar rect{fill:var(--accent)}
.chart-bar text{fill:var(--ink);font-family:inherit;font-size:14px;font-weight:700}
.chart-column:hover .chart-bar rect{fill:var(--accent-dark)}
.chart-column time{display:block;font-size:11px;color:#677487;margin-top:-12px}
.chart-column time span{display:block;font-size:11px;color:#728092;margin-top:3px}
.chart-dense{gap:2px}
.chart-dense .chart-column{min-width:30px}
.chart-dense svg.chart-bar{width:30px}
.chart-dense time,.chart-dense time span{font-size:9px}
.chart-monthly{gap:6px}
.chart-monthly svg.chart-bar{width:64px}
.daily-empty{font-size:12px;color:var(--muted);margin:12px 0 4px}
@media(max-width:520px){.report-toolbar{gap:4px;margin-bottom:12px}.period{font-size:12px;padding:10px 12px}.report-range{width:100%;padding:6px 8px}.metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.metric.dark{grid-column:1 / -1}.metric{padding:12px}.metric>span{font-size:10px}.metric>strong{font-size:27px;margin-top:6px}.daily-panel{padding:14px}}

/* Compact order detail, with full-size stage actions. */
.order-heading h1{white-space:normal;overflow-wrap:anywhere;min-width:0}
.order-heading .badge{flex-shrink:0}
.order-page .order-info{padding:12px 16px;margin-bottom:12px;border-radius:10px}
.order-page .order-info .section-heading{margin-bottom:6px}
.order-page .order-info h2{font-size:12px;color:var(--muted)}
.order-page .order-content{font-size:13px;line-height:1.5;margin:0 0 10px}
.order-page .beds{grid-template-columns:minmax(0,1fr);gap:12px;align-items:start}
.order-page .bed{border-radius:11px}
.order-page .bed-heading{padding:12px 14px;gap:10px}
.order-page .bed-heading h2{font-size:16px;margin-bottom:3px}
.order-page .bed-heading p{font-size:10px}
.order-page .stage-row{padding:7px 14px;gap:10px;min-height:60px}
.order-page .stage-title{gap:9px;min-width:0}
.order-page .stage-title strong{font-size:14px}
.order-page .stage-title small{font-size:10px;margin-top:1px}
.order-page .stage-check{width:24px;height:24px;font-size:11px}
.order-page .stage-actions{gap:6px;flex-shrink:0}
.order-page .stage-actions .button{min-width:72px;min-height:44px;padding:0 10px;font-size:12px}
.order-page .stage-actions .undo-button{min-width:0;font-size:11px!important}
.order-page .bed-remove{padding:0 14px 4px}
.order-page details.panel{margin-top:10px;padding:0 14px;border-radius:10px}
.order-page details>summary{padding:12px 0;min-height:44px;font-size:12px}
.order-page details>.filters{padding-bottom:14px;gap:10px}
@media(max-width:520px){.order-heading{align-items:flex-start}.order-heading h1{font-size:22px}.order-heading .badge{font-size:9px;padding:6px}.order-page .stage-row{padding-inline:10px}.order-page .stage-title strong{font-size:13px}.order-page .stage-actions .button{min-width:62px;padding-inline:8px;font-size:11px}.order-page .stage-check{width:22px;height:22px}.order-page .order-info{padding:12px}}

.route-title{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.routes-heading:has(.route-title){flex-wrap:wrap}
.route-order-count{font-size:18px;font-weight:400;line-height:1.3;color:var(--muted);white-space:nowrap}
@media(max-width:520px){.route-title{gap:6px}.route-order-count{font-size:16px}}

.order-name{display:flex;align-items:center;gap:12px;flex-wrap:wrap;min-width:0}
.order-name h1{flex:1}
@media(max-width:520px){.order-heading{flex-wrap:wrap}.order-name{width:100%;gap:8px}.order-page .bed-heading{flex-wrap:wrap}}

.route-title{min-width:0}.route-title h1{white-space:normal;overflow-wrap:anywhere}.route-card h2{overflow-wrap:anywhere}

.route-meta{display:flex;align-items:center;justify-content:space-between;gap:6px;flex-wrap:wrap;font-size:11px;color:#84909f;margin-bottom:auto}
.route-finished{color:#146c4f;font-weight:700;white-space:nowrap}
@media(max-width:520px){.route-meta{font-size:10px}}

.route-grid[data-route-size="1"]{--route-width:205px;gap:12px}
.route-grid[data-route-size="1"] .route-card{min-height:142px;padding:18px}
.route-grid[data-route-size="1"] h2{font-size:19px}
.route-grid[data-route-size="2"]{--route-width:260px;gap:14px}
.route-grid[data-route-size="2"] .route-card{min-height:174px;padding:22px}
.route-grid[data-route-size="2"] h2{font-size:22px}
.route-grid[data-route-size="2"] p{font-size:14px}
.route-size-controls{position:fixed;right:20px;bottom:20px;z-index:30;display:flex;background:white;border:1px solid #dce1e8;border-radius:12px;box-shadow:0 4px 18px #17202b18;overflow:hidden}
.route-size-controls button{width:46px;height:44px;border:0;background:white;font-size:24px;line-height:1;color:#435065}
.route-size-controls button+button{border-left:1px solid var(--line)}
.route-size-controls button:hover:not(:disabled){background:#fff0e8;color:var(--accent-dark)}
.route-size-controls button:disabled{opacity:.35;cursor:default}
.route-size-controls button:focus-visible{outline-offset:-4px}
@media(max-width:520px){.route-size-controls{right:14px;bottom:14px}}

.comparison-form.form-panel{max-width:760px}
.extraction-feedback{white-space:pre-wrap;overflow-wrap:anywhere;color:#965218;font-size:13px;line-height:1.6}
.extraction-feedback:empty{display:none}
.extraction-notes{margin:0 0 14px;padding:10px 14px;background:#fff5e8;border-radius:8px;font-size:13px;overflow-wrap:anywhere}
.extraction-notes summary{cursor:pointer;font-weight:700}
.extraction-notes li+li{margin-top:6px}
.route-bed-list p{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere;margin:5px 0}
.route-bed-list p+p{border-top:1px solid var(--line);padding-top:5px}
.client-main{min-width:0}


.order-progress{margin-bottom:14px}
.order-editor{width:min(760px,calc(100% - 32px));max-height:calc(100dvh - 32px);padding:24px;border:1px solid var(--line);border-radius:16px;background:white;color:var(--ink);box-shadow:0 24px 80px #111a2740;overflow:auto}
.order-editor::backdrop{background:#111a2780}
.order-editor .section-heading h2{font-size:20px}
body:has(.order-editor[open]){overflow:hidden}
@media(max-width:520px){.order-editor{width:calc(100% - 16px);max-height:calc(100dvh - 16px);padding:16px}.order-name h1{flex-basis:100%}}

/* Clear navigation and one editable list on phone and desktop. */
.button.back-button,.route-breadcrumb a.back-button{min-height:44px;padding:8px 14px;background:var(--accent);border:1px solid var(--accent);color:white;font-size:14px;font-weight:600;white-space:normal;line-height:1.4;max-width:100%;overflow-wrap:anywhere}
.button.back-button:hover{background:var(--accent-dark);border-color:var(--accent-dark)}
.route-breadcrumb{margin:0 0 16px}
.content>.back-button{margin-bottom:16px}
.order-kind{margin:0;padding:0;border:0;min-width:0}
.order-kind legend,.content-field>label{font-size:15px;font-weight:700;margin-bottom:9px}
.order-kind-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.order-kind-options label{display:flex;align-items:center;gap:10px;min-height:54px;padding:12px;border:2px solid #dce2e9;border-radius:10px;cursor:pointer;font-size:16px}
.order-kind-options label:has(input:checked){border-color:#1769aa;background:#eaf4fc;color:#125487}
.order-kind-options input{width:20px;height:20px;min-height:0;margin:0;flex-shrink:0;accent-color:#1769aa}
.numbered-content{position:relative;overflow:hidden;border-radius:9px}
.numbered-content textarea,.content-measure{font:inherit;font-size:15px;line-height:24px;letter-spacing:normal;tab-size:8;white-space:pre-wrap;overflow-wrap:break-word;padding:12px 13px 12px 46px}
.numbered-content textarea{display:block;width:100%;min-height:180px;margin:0;resize:vertical}
.numbered-content:focus-within{outline:3px solid #3683cd;outline-offset:3px}
.content-measure{position:absolute;top:1px;left:1px;visibility:hidden;pointer-events:none}
.content-measure>div{min-height:24px}
.content-numbers{position:absolute;inset:1px auto 1px 1px;width:35px;overflow:hidden;pointer-events:none;user-select:none;background:#f3f6f9;border-right:1px solid #dce2e9;color:#647084}
.content-numbers>span{position:absolute;left:0;width:100%;padding-right:8px;text-align:right;font-size:13px;line-height:24px}
@media(max-width:520px){.order-page .stage-row{flex-wrap:wrap}.order-page .stage-actions{margin-left:auto}.order-kind-options label{font-size:15px;padding:10px}.route-breadcrumb{width:100%}.order-page .beds{min-width:0}.order-page .bed{min-width:0}}

/* Full workflow: phone first, shared with the printable route. */
#workflow {min-width:0;overflow-wrap:anywhere} #workflow h1 {min-width:0;white-space:normal;overflow-wrap:anywhere} #workflow h1 small {font-size:16px;font-weight:400}
.driver-vehicle {display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:10px;font-size:12px;color:var(--muted)}
#workflow .panel {padding:16px;margin:14px 0} #workflow .point-title {white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.45}
#workflow .client-row {align-items:center;gap:12px} #workflow .client-main {min-width:0;flex:1} #workflow .client-main h2 {font-size:15px;margin:0 0 4px}
#workflow .client-main p {white-space:normal;overflow-wrap:anywhere} .stop-number {font-size:18px;min-width:20px}
#workflow .client-row.depot-loaded,#workflow .route-search-client.client-readonly{background:#eceff2}
#workflow .client-row.upholstery-complete{background:#f0f1f3;border-color:#dfe2e6;box-shadow:none;color:#626b77}
#workflow .client-row.upholstery-complete:hover{background:#e8eaed}
#workflow .upholstery-complete .client-main h2,#workflow .upholstery-complete .client-progress strong{color:#626b77}
#workflow .upholstery-complete progress::-webkit-progress-value{background:#929aa5}
#workflow .upholstery-complete progress::-moz-progress-bar{background:#929aa5}
#workflow .client-row.upholstery-problem{background:#fff2f2;border-color:#e4b5bb}
#workflow .upholstery-problem .client-main h2,#workflow .upholstery-problem .client-progress strong{color:#a32f2f}
#workflow .upholstery-problem progress::-webkit-progress-value{background:#bf3939}
#workflow .upholstery-problem progress::-moz-progress-bar{background:#bf3939}
#workflow details.bed > summary {display:flex;gap:10px;align-items:center;justify-content:space-between;cursor:pointer;min-height:44px;padding:12px 14px;white-space:normal}
#workflow details.bed > summary strong {min-width:0;overflow-wrap:anywhere} #workflow .stage-title {flex-wrap:wrap}
#workflow .delivery-done {border-left:5px solid #218958;background:#f0faf4} #workflow .delivery-partial {border-left:5px solid #e28b20;background:#fff6e8} #workflow .delivery-failed {border-left:5px solid #bf3939;background:#fff2f2}
#workflow .actions,.workflow-editor .actions {display:flex;flex-wrap:wrap;gap:8px;margin:10px 0} #workflow button,#workflow select,#workflow input,.workflow-editor button,.workflow-editor input,.workflow-editor select {min-height:44px}
#workflow input,#workflow select,.workflow-editor input,.workflow-editor textarea,.workflow-editor select {max-width:100%;width:100%;font-size:16px;box-sizing:border-box}
.workflow-editor {width:min(680px,calc(100vw - 20px));max-height:calc(100dvh - 24px);padding:20px;border:1px solid #ccd7df;border-radius:14px;overflow:auto}
.workflow-editor::backdrop {background:#172c3866}.workflow-editor label {display:grid;gap:6px}.workflow-editor input[type=checkbox] {width:24px;min-height:24px}.workflow-editor .stack {gap:14px}
.product-edit-row {padding:12px;border:1px solid #dae1e7;border-radius:8px;margin:8px 0}.editor-error {color:#a62222}.prewrap {white-space:pre-wrap}
.reorder-list {list-style:none;padding:0}.reorder-list li {display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:8px;border:1px solid #ddd}.reorder-list strong {flex:1;min-width:100px}.drag-handle {cursor:grab;font-size:24px;min-width:44px;min-height:44px;display:grid;place-items:center}
.reorder-list li.is-dragging {background:#fff1e9;border-color:var(--accent);opacity:.65}.reorder-list li.is-dragging .drag-handle {cursor:grabbing}
.user-switch .button {width:100%;min-height:44px;margin:3px 0;white-space:normal}.user-switch summary {cursor:pointer;font-size:12px}.user-switch form {display:grid;gap:4px}
.route-print {background:white;color:#111;max-width:1000px;padding:24px;margin:auto}.route-print h1 {font-size:24px}.route-print h2 {font-size:18px}.route-print h3 {font-size:16px;white-space:pre-wrap}.print-stop {border-bottom:1px solid #ccc;padding:12px 0;overflow-wrap:anywhere}.print-stop p,.print-stop li {white-space:pre-wrap}.print-actions {display:flex;gap:10px}
@media(max-width:600px){#workflow .beds {display:block}#workflow .stage-row {flex-wrap:wrap;gap:8px}#workflow .stage-actions {margin-left:auto;justify-content:flex-end}#workflow .client-row {padding:10px}#workflow .button {white-space:normal}#workflow .routes-heading {flex-wrap:wrap}.workflow-editor {padding:12px}.route-print {padding:12px}}
@media print {@page{size:A4;margin:14mm}.print-actions{display:none!important}.route-print{padding:0;max-width:none;font-size:11pt}.print-stop{break-inside:avoid}.print-stop h2{break-after:avoid}a{color:inherit;text-decoration:none}}

#workflow details.bed > summary::after{content:"▾";font-size:20px}#workflow details.bed[open] > summary::after{content:"▴"}.mobile-account>summary{min-width:44px;min-height:44px;justify-content:center}.user-switch>summary{background:#253346;color:white}

.settings-page{display:grid;gap:24px;max-width:1000px}.settings-table{width:100%;table-layout:fixed}.settings-table th,.settings-table td{overflow-wrap:anywhere;text-align:left}.settings-table th:first-child{width:45%}.settings-table th:last-child{width:30%}.settings-table td:last-child,.settings-table thead th:last-child{text-align:right}.settings-accounts{list-style:none;padding:0;margin:0}.settings-accounts li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 0;border-top:1px solid var(--line)}.settings-accounts small{display:block;color:var(--muted);margin-top:4px}.settings-accounts li>div{min-width:0;overflow-wrap:anywhere}.settings-page .button{white-space:normal;min-height:44px}.settings-page .section-heading{flex-wrap:wrap}.form-panel:has(#id_plate) label[for=id_active]{display:inline-flex;align-items:center;min-height:44px}.form-panel:has(#id_plate) input[type=checkbox]{width:22px;height:22px;vertical-align:middle}.form-panel .helptext{overflow-wrap:anywhere}
@media(max-width:520px){.settings-page .panel{padding:14px}.settings-table th,.settings-table td{padding:12px 4px;font-size:11px}.settings-table .button{padding:0 8px;font-size:11px}.settings-table th:first-child{width:40%}.settings-table th:last-child{width:34%}.settings-accounts .button{padding:0 10px;max-width:50%}.settings-accounts strong{font-size:13px}.form-panel{min-width:0;overflow-wrap:anywhere}}

.settings-table th,.settings-table td{padding:8px 10px;white-space:normal}.settings-table tbody th{font-size:13px;font-weight:650;letter-spacing:0;text-transform:none;color:var(--ink);background:white;border-bottom:1px solid var(--line)}
.form-panel:has(#id_username) label[for=id_active],.form-panel:has(#id_username) label[for=id_account_active]{display:flex;align-items:center;min-height:44px;cursor:pointer}
.user-switch select{min-width:0;width:100%;min-height:44px}
.switch-role-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px;position:relative}
.switch-role-row>button,.commissioner-switch>summary{height:44px;padding:6px;font-size:12px}
.commissioner-switch{min-width:0}
.user-switch .commissioner-switch>summary{background:#fff;color:#253346}
.commissioner-options{position:absolute;left:0;right:0;top:100%;z-index:30;padding:8px;background:#fff;border-radius:8px;box-shadow:0 4px 12px #0004;max-height:240px;overflow:auto}
.commissioner-options p{color:#253346}
.client-row.client-readonly,.route-search-client.client-readonly{cursor:default}
#workflow .client-readonly .client-summary p{white-space:normal;overflow:visible}
.driver-settings li>div:first-child{flex:1}.driver-settings .actions{flex-shrink:0}
@media(max-width:520px){.driver-settings li{display:block}.driver-settings .actions{margin-top:12px}.driver-settings .actions .button{flex:1;max-width:none;min-width:100px}}
@media(max-width:520px){.settings-table th,.settings-table td{padding:8px 4px}.settings-table tbody th{font-size:12px}.settings-table thead th{font-size:9px;letter-spacing:0}}

/* Four-column dispatch sheet. Long lists continue with repeated headings. */
.compact-print{max-width:210mm}.dispatch-sheet{background:white;padding:8mm;color:#111}.dispatch-sheet h1{font-size:16pt;line-height:1.15;margin:0 0 3mm;overflow-wrap:anywhere}.dispatch-sheet header p{font-size:10pt;line-height:1.2;margin:0 0 4mm}
.dispatch-table{table-layout:fixed;margin-bottom:3mm}.dispatch-number{width:7%}.dispatch-code{width:10%}.dispatch-customer{width:20%}.dispatch-amount{width:17%}.dispatch-signature{width:23%}.dispatch-table th,.dispatch-table td{color:#111;text-align:left;padding:.65mm 1.5mm;font-size:9pt;line-height:1.15;white-space:normal;overflow-wrap:anywhere;letter-spacing:0;text-transform:none}.dispatch-table th{font-weight:700;border-block:1px solid #777;background:#f3f3f3}.dispatch-table td{border-top:1px solid #ddd;height:11mm}.dispatch-table td:nth-child(5){border-inline:1px solid #ddd}.dispatch-table tr{break-inside:avoid}.dispatch-table thead{display:table-header-group}
.dispatch-table .dispatch-client-location{display:block;font-size:.8em;line-height:1.05;color:#444}
.dispatch-sheet footer{border-top:1px solid #444;padding-top:2mm;font-size:10pt;line-height:1.3;break-inside:avoid}.dispatch-mattress-total{margin-top:2mm}.dispatch-mattress-total p{font-size:9pt;margin:1mm 0 0;line-height:1.35}.compact-print .print-actions{margin-bottom:5mm}
@media print{@page{size:A4 portrait;margin:10mm}:root{background:white}.compact-print{width:190mm;max-width:190mm;padding:0;margin:0;background:white}.dispatch-sheet{padding:0}.dispatch-sheet header{break-after:avoid}}

/* Keep the original compact routes, calendar and production cards. */
#workflow .plain-product{grid-column:1 / -1;display:flex;align-items:center;flex-wrap:wrap;gap:6px 14px;border-bottom:1px solid var(--line);border-radius:0;padding:6px 0;margin:0;background:transparent;box-shadow:none}
#workflow .plain-product .bed-heading{flex:1;min-width:180px;padding:4px 0;border:0;background:none}
#workflow .plain-product .bed-heading h2{font-size:14px;margin:0}
#workflow .plain-product .stages:empty{display:none}
#workflow .plain-product .product-actions{padding:0;border:0;min-height:44px}
@media(max-width:520px){.main-nav :is(a,:where(button[data-open-map])){min-height:44px}}
#workflow .route-grid{grid-template-columns:repeat(auto-fill,minmax(0,var(--route-width,165px)));align-items:start}
#workflow .week-picker summary,#workflow .week-links a{min-height:44px}
#workflow .week-options select{width:auto;font-size:12px}
#workflow .route-breadcrumb{margin:0 0 14px;min-height:44px}
#workflow .order-name{gap:8px}
#workflow .order-name h1{flex:initial}
#workflow .route-totals{max-width:840px;padding:14px;border-radius:12px;overflow-wrap:anywhere}
#workflow .route-trip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;align-items:center;padding:0 0 16px;margin-bottom:14px;border-bottom:1px solid var(--line);color:var(--ink)}
#workflow .route-trip small{display:block;color:var(--muted);margin:3px 0;font-size:12px}
@media(max-width:700px){#workflow .route-trip{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}}
@media(max-width:380px){#workflow .route-trip{grid-template-columns:minmax(0,1fr)}}
#workflow .financial-selector{display:flex;gap:6px;margin-bottom:12px}
#workflow .financial-selector .button{flex:1;min-width:0;min-height:44px;padding:8px;font-size:12px}
#workflow .route-money{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);align-items:center;gap:14px}
#workflow .route-total{min-width:0;display:grid;gap:4px}
#workflow .route-total>span{color:#626e80;font-size:12px}
#workflow .route-total>strong{font-size:24px;line-height:1.2;font-weight:800;font-variant-numeric:tabular-nums}
#workflow .payment-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
#workflow .payment-total{min-width:0;display:flex;flex-direction:column;gap:4px;padding:10px;border-radius:9px;background:#f1f3f6}
#workflow .payment-total>span{color:#626e80;font-size:12px}
#workflow .payment-total>strong{font-size:17px;line-height:1.3;font-weight:750;font-variant-numeric:tabular-nums}
#workflow .payment-ramburs{background:#fff0e7}
#workflow .route-total-meta{display:flex;flex-wrap:wrap;gap:6px 12px;margin-top:10px;font-size:12px;color:#626e80}
#workflow .route-mattresses{border-top:1px solid var(--line);margin-top:12px;padding-top:10px}
#workflow .route-mattress-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
#workflow .route-mattress-heading h2{margin:0;font-size:15px}
#workflow .route-mattress-heading>span{flex-shrink:0;padding:4px 9px;border-radius:999px;background:#f1f3f6;color:#626e80;font-weight:650;font-size:13px}
#workflow .route-mattress-details{list-style:none;margin:8px 0 0;padding:0;font-size:14px}
#workflow .route-mattress-details li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0;border-top:1px solid var(--line)}
#workflow .route-mattress-details li:last-child{padding-bottom:0}
#workflow .route-mattress-details li>div{min-width:0}
#workflow .route-mattress-details small{display:block;margin-top:1px;font-size:12px;color:var(--muted)}
#workflow .route-mattress-details strong{white-space:nowrap}
.dispatch-actions,.customer-fields,.vehicle-assignment{display:flex;align-items:center;flex-wrap:wrap;gap:8px 18px}
.dispatch-actions:empty{display:none}.dispatch-actions{margin-top:10px}
#workflow .route-totals .dispatch-actions:not(:empty){margin-top:12px}
#workflow .route-print-actions{border-top:1px solid var(--line);padding-top:12px;justify-content:flex-end}
#workflow .money-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;width:100%;align-items:start}
#workflow .money-actions>.button{justify-self:end;max-width:100%;white-space:normal}
#workflow .money-receipt{min-width:0;display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px}
#workflow .money-receipt .button{max-width:100%;white-space:normal}
#workflow .money-receipt small{color:var(--muted);overflow-wrap:anywhere}
@media(max-width:520px){#workflow .route-print-actions>.button{width:100%}}
@media(max-width:1000px){#workflow .route-money{grid-template-columns:minmax(0,1fr);gap:12px}}
@media(max-width:520px){#workflow .route-totals{padding:12px}#workflow .route-total>strong{font-size:22px}#workflow .payment-totals{gap:6px}#workflow .payment-total{padding:8px}#workflow .payment-total>strong{font-size:14px}}
#workflow .vehicle-assignment{gap:8px}#workflow .vehicle-assignment select{width:185px;font-size:13px;margin:0}
#workflow .panel:has(>summary):not(.bed){padding:0 14px;margin:10px 0;border-radius:10px}
#workflow details>summary{min-height:44px;font-size:12px;cursor:pointer}
#workflow .order-point-title{font-size:12px;color:var(--muted);margin:0 0 10px}
#workflow .order-page .bed.panel{padding:0;margin:0 0 12px;overflow:hidden}
#workflow .bed-heading>div{min-width:0;flex:1}#workflow .bed-heading h2{font-size:16px;line-height:1.4;overflow-wrap:anywhere;margin:0 0 3px}
#workflow .bed-heading p{margin:0;color:var(--muted);font-size:10px}
#workflow .product-actions{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:7px 14px;border-top:1px solid var(--line);font-size:12px;min-height:54px}
#workflow .product-actions p,#workflow .product-actions .actions{margin:0}
#workflow .iaika-status{padding:10px 12px;border-radius:10px;background:#e8f5ef;color:#127453;font-size:13px;overflow-wrap:anywhere}
#workflow .iaika-button{background:#127453;color:#fff;border:1px solid #0d6346;font-size:13px;font-weight:750;min-height:46px}
#workflow .iaika-button:hover{background:#0d6346}
#workflow .stage-title>div{min-width:0;overflow-wrap:anywhere}
#workflow .customer-info{border:1px solid var(--line);background:white;border-radius:10px;margin:10px 0}
#workflow .customer-info summary{padding:10px 0}.customer-fields{font-size:12px;padding-bottom:10px}.order-note{font-size:12px;margin:6px 0}
@media(max-width:520px){#workflow .compact-orders .client-progress{width:calc(100% - 32px);min-width:0}#workflow .client-progress progress{min-width:0}}
@media(max-width:520px){#workflow .route-grid{--route-width:calc((100% - 10px)/2)}#workflow .route-grid[data-route-size="1"],#workflow .route-grid[data-route-size="2"]{grid-template-columns:1fr}#workflow .compact-orders .client-row{display:flex;flex-wrap:wrap}#workflow .client-progress{width:100%;margin-left:32px;display:flex;align-items:center;gap:10px}#workflow .client-progress progress{flex:1}#workflow .client-progress strong{margin:0}#workflow .main-nav{min-width:0}#workflow .vehicle-assignment select{width:100%}#workflow .dispatch-actions,#workflow .vehicle-assignment{width:100%}.workflow-editor .section-heading{flex-wrap:wrap}}

/* Shared three-step roadmap; the active stage has a visible ring. */
#workflow .admin-toolbar{display:flex;justify-content:flex-start;flex-wrap:wrap;gap:8px;margin:0 0 14px}
#workflow .routes-heading>.admin-toolbar{margin:0 0 0 auto;flex-shrink:0;justify-content:flex-end}
#workflow .route-roadmap{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));list-style:none;padding:0;margin:10px 0 0;width:360px;max-width:100%;flex-shrink:0}
#workflow .route-roadmap li{position:relative;display:flex;flex-direction:column;align-items:center;text-align:center;gap:7px;min-width:0;font-size:11px;line-height:1.3;color:#78869a;font-weight:600}
#workflow .route-roadmap li:not(:first-child)::before{content:'';position:absolute;top:9px;right:50%;width:100%;height:3px;background:#e0e6ed}
#workflow .roadmap-dot{position:relative;z-index:1;display:grid;place-items:center;width:21px;height:21px;border:2px solid #d3dce7;border-radius:50%;background:white;font-size:12px;line-height:1;color:white}
#workflow .roadmap-label{padding:0 3px;overflow-wrap:normal}#workflow .route-roadmap small{font-size:10px;font-weight:700;line-height:1.2;overflow-wrap:anywhere;color:#435065}
#workflow .route-roadmap .status-done .roadmap-dot{background:var(--green);border-color:var(--green)}#workflow .route-roadmap li.status-done::before{background:var(--green)}
#workflow .route-roadmap .status-active .roadmap-dot{background:var(--accent);border-color:var(--accent);box-shadow:0 0 0 5px #fce9e1}#workflow .route-roadmap .status-active{color:var(--accent-dark)}#workflow .route-roadmap li.status-active::before{background:var(--accent)}
#workflow .route-roadmap .status-partial .roadmap-dot{background:#dd951d;border-color:#dd951d}#workflow .route-roadmap .status-partial{color:#98600d}#workflow .route-roadmap .status-failed .roadmap-dot{background:#bf3939;border-color:#bf3939}#workflow .route-roadmap .status-failed{color:#a32f2f}
#workflow .route-logistics-complete .route-roadmap li:not(:first-child):is(.status-pending,.status-partial,.status-failed)::before{background:#778395}
#workflow .route-grid{align-items:stretch;grid-auto-rows:1fr}#workflow .route-card{min-width:0;height:100%}#workflow .route-card h2{overflow-wrap:anywhere}#workflow .route-card>progress{margin-top:auto}
#workflow .route-grid.route-overview{grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr))}#workflow .route-overview[data-route-size="1"]{grid-template-columns:repeat(auto-fill,minmax(min(100%,380px),1fr))}#workflow .route-overview[data-route-size="2"]{grid-template-columns:repeat(auto-fill,minmax(min(100%,480px),1fr))}
#workflow .route-overview .route-card{padding:18px 12px;min-height:178px}#workflow .route-overview .route-roadmap{width:100%;margin-top:auto;padding-top:18px}#workflow .route-count{font-size:11px;color:var(--muted);margin-bottom:8px}
#workflow .admin-product{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;padding:14px 0;border-bottom:1px solid var(--line);min-width:0}#workflow .admin-product h2{flex:1;min-width:180px;font-size:16px;line-height:1.4;margin:0}#workflow .admin-reason{flex-basis:100%;margin:0;font-size:12px;color:#a32f2f;white-space:pre-wrap}
#workflow .customer-info{padding:14px 16px;margin:14px 0 20px}#workflow .customer-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 20px;margin:0}#workflow .customer-grid dt{font-size:10px;color:var(--muted);margin-bottom:3px}#workflow .customer-grid dd{margin:0;font-size:13px;font-weight:550;white-space:pre-wrap;overflow-wrap:anywhere}#workflow .customer-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}#workflow .customer-actions:empty{display:none}
#workflow .order-heading h1{font-size:clamp(21px,2.1vw,29px);line-height:1.35;letter-spacing:-.4px}#workflow .workflow-message{padding:12px;border:1px solid #e4b5bb;background:#fff2f2;color:#a32f2f;border-radius:8px;margin-bottom:12px}
@media(max-width:1050px){#workflow .admin-client{flex-wrap:wrap}#workflow .admin-client .client-main{flex-basis:calc(100% - 40px)}#workflow .admin-client>.route-roadmap{margin-left:32px}}
@media(max-width:600px){#workflow .customer-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#workflow .customer-info{padding:12px}#workflow .admin-client>.route-roadmap{margin-left:0;width:100%}#workflow .admin-product>.route-roadmap{width:100%}#workflow .admin-product h2{flex-basis:100%}#workflow .route-roadmap li{font-size:10px}#workflow .route-grid.route-overview{grid-template-columns:1fr}}

#workflow .loading-help{padding:10px 12px;border:1px solid #e5d9bb;border-radius:8px;background:#fff9ed;color:#77571a;font-size:12px;line-height:1.5;margin:0 0 12px;width:100%}#workflow .loading-help:empty{display:none}#workflow .product-actions:has(>button:only-child){justify-content:flex-end}

/* Keep each product and its progress/actions in one visible card. */
#workflow .order-page .beds{display:grid;gap:12px}
#workflow .order-page .beds>section,#workflow .order-page .bed.panel{border:1px solid #dce2e9;border-left:3px solid #d6b5a6;border-radius:10px;background:#fff;box-shadow:0 2px 5px #24324706;margin:0;min-width:0}
#workflow .order-page .plain-product,#workflow .order-page .admin-product{padding:12px 14px}
#workflow .order-page .bed-complete{border-color:#c6e5d8;border-left-color:var(--green)}
#workflow .direct-delivery{margin:0;font-size:12px;color:var(--muted);overflow-wrap:anywhere}

/* Delivery colors must take precedence over the shared white product card. */
#workflow .order-page .beds>section.delivery-failed{background:#fff2f2;border-color:#e4b5bb;border-left:4px solid #bf3939}
#workflow .order-page .beds>section.delivery-failed .delivery-result{color:#a32f2f;font-weight:700}
#workflow .order-page .beds>section.delivery-done{background:#f0faf4;border-color:#c6e5d8;border-left:4px solid var(--green)}
#workflow .delivery-status{display:grid;gap:4px;min-width:0}
#workflow .delivery-status .delivery-result{margin:0}
#workflow .delivery-timestamp{display:block;font-size:11px;color:#657386;line-height:1.4}
#workflow .admin-product>.delivery-status{flex-basis:100%;border-top:1px solid var(--line);padding-top:8px;font-size:12px}

/* Keep navigation and actions on one row above the page title. */
@media(min-width:601px){
  #workflow .admin-page-header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:start;margin-bottom:14px}
  #workflow .admin-page-header .route-breadcrumb{grid-column:1;grid-row:1;margin:0}
  #workflow .admin-page-header .admin-toolbar{grid-column:2;grid-row:1;margin:0;justify-content:flex-end}
  #workflow .admin-page-header .routes-heading{display:contents}
  #workflow .admin-page-header .order-name{grid-column:1 / -1;grid-row:2;min-width:0}
}
@media(max-width:600px){
  #workflow .mobile-page-header:is(.admin-page-header,.driver-page-header){display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px 8px;margin-bottom:14px;align-items:start}
  #workflow .mobile-page-header:is(.admin-page-header,.driver-page-header) .routes-heading{display:contents}
  #workflow .mobile-page-header:is(.admin-page-header,.driver-page-header) .route-breadcrumb{grid-column:1;grid-row:1;margin:0;min-width:0}
  #workflow .mobile-page-header:is(.admin-page-header,.driver-page-header) .order-name{grid-column:1 / -1;grid-row:2;min-width:0}
  #workflow .mobile-page-header .admin-toolbar{grid-column:2;grid-row:1;flex-wrap:nowrap;gap:6px;margin:0;align-self:start;min-width:0;justify-content:flex-end}
  #workflow .mobile-page-header:is(.admin-page-header,.driver-page-header) .button{font-size:12px;padding:8px;min-height:44px;min-width:0;line-height:1.3}
  #workflow .driver-page-header .driver-vehicle{display:contents}
  #workflow .driver-page-header .driver-vehicle>.button{grid-column:2;grid-row:1;justify-self:end}
  #workflow .driver-page-header .driver-vehicle>strong{grid-column:1 / -1;grid-row:3;font-size:12px;color:var(--muted);margin-top:-6px}
  #workflow .driver-page-header .order-heading>.badge{grid-column:1 / -1;grid-row:4;justify-self:start}
}
@media(max-width:380px){
  #workflow .mobile-page-header:is(.admin-page-header,.driver-page-header){column-gap:4px}
  #workflow .mobile-page-header .admin-toolbar{gap:4px}
  #workflow .mobile-page-header:is(.admin-page-header,.driver-page-header) .button{font-size:11px;padding-inline:6px}
}
#workflow .client-summary{display:flex;align-items:flex-start;gap:8px;min-width:0}
#workflow .client-summary p{flex:1;min-width:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
#workflow .order-flairs{display:flex;flex-direction:column;align-items:flex-end;gap:3px;flex-shrink:0}
#workflow .order-flair{display:inline-block;white-space:nowrap;font-size:9px;line-height:15px;padding:0 5px;border-radius:4px;background:#edf1f6;color:#42516a}
#workflow .invoice-flair{background:#eaf5ef;color:#246647}
#workflow .payment-flair{background:#fff2e8;color:#94552e}
#workflow .client-amount{white-space:nowrap;font-weight:600;font-size:.9em}
#workflow .customer-actions{align-items:center}
#call-customer{background:#e4f6ed;border-color:#79aa95;color:#145c42;padding-inline:8px;gap:4px}
#workflow #call-customer .route-detail-icon{width:16px;height:16px;flex:0 0 16px;align-self:center;margin:0}
.contact-dialog {
  width:min(380px,calc(100vw - 24px));max-height:calc(100dvh - 32px);padding:20px;
  border:1px solid var(--line);border-radius:18px;color:var(--ink);background:white;box-shadow:0 20px 64px #111a2733;
}
.contact-dialog::backdrop{background:#111a2780}
.contact-dialog header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.contact-dialog h2{margin:0;font-size:21px;line-height:1.25}
.contact-dialog header p{margin:4px 0 0;color:#526175;font-size:14px;overflow-wrap:anywhere}
.contact-dialog .contact-close{width:44px;height:44px;padding:0;border:0;border-radius:50%;background:#f1f4f7;color:#435367;font-size:24px}
.contact-dialog ul{display:grid;gap:10px;list-style:none;padding:0;margin:18px 0 0}
.contact-dialog li{padding:12px;border:1px solid var(--line);border-radius:12px;background:#f8fafb}
.contact-dialog li strong{display:block;font-size:17px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.contact-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}
.contact-actions .button{gap:7px;min-height:44px;padding:0 6px;font-size:13px}
.contact-actions .contact-mobile{background:#24384d;color:white;border:1px solid #24384d}
.contact-actions .contact-whatsapp{background:#e4f6ed;color:#116442;border:1px solid #bbdfcd}
#workflow .contact-actions svg.route-detail-icon{width:18px;height:18px;flex:0 0 18px;align-self:center;margin:0}
#workflow .tracking-entry{min-height:46px;gap:7px;background:#fff;color:#243345;border:1px solid #cbd5df;font-size:12px;font-weight:600}
#workflow .commercial-select{width:auto;max-width:100%;min-height:46px;font-size:12px;font-weight:600;cursor:pointer}
#workflow .commercial-select:disabled{opacity:.6;cursor:wait}
#workflow .package-panel{display:flex;align-items:center;gap:15px;flex-wrap:wrap;margin-top:20px}
#workflow .package-panel small{flex-basis:100%}

#workflow .invoice-fd{background:#e5f4eb;color:#21633d}
#workflow .invoice-distribution{background:#ece9ff;color:#55409b}
#workflow .invoice-none{background:#edf1f6;color:#64748b}
#workflow .company-full{display:none}
#workflow .payment-flair{font-weight:750;font-size:11px;line-height:18px;padding:0 6px}
@media(min-width:801px){
  #workflow .order-flair{font-size:12px;line-height:24px;padding:1px 9px;border-radius:6px}
  #workflow .payment-flair{font-size:13px}
  #workflow .company-short{display:none}
  #workflow .company-full{display:inline}
  #workflow .order-flairs{flex-direction:row;gap:6px}
}

/* Reserve the payment column so company badges align across every order. */
#workflow .admin-client .order-flairs{width:80px;align-items:stretch}
#workflow .admin-client .invoice-flair{text-align:center}
#workflow .admin-client .payment-flair{align-self:flex-end}
@media(min-width:801px){
  #workflow .admin-client .order-flairs{display:grid;grid-template-columns:185px 50px;width:241px;align-items:center}
  #workflow .admin-client .invoice-flair{grid-column:1}
  #workflow .admin-client .payment-flair{grid-column:2;text-align:center;align-self:center}
}

.dispatch-payment-total{margin-top:2mm;font-size:10pt;line-height:1.4}

/* Upholstery uses the shared route card and the existing snapshot refresh. */
#workflow .upholstery-made{--upholstery-color:#FFF3CD}
#workflow .upholstery-pallet{--upholstery-color:#DCEEFF}
#workflow .upholstery-wrapped{--upholstery-color:#ECEFF2}
#workflow .client-row.upholstery-made,#workflow .client-row.upholstery-pallet,#workflow .client-row.upholstery-wrapped{background:var(--upholstery-color)}
#workflow .upholstery-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;margin-top:auto;padding-top:18px;gap:12px}
#workflow .upholstery-summary>div{display:flex;flex-direction:column;align-items:center;gap:7px;min-width:0;text-align:center;font-size:12px;line-height:1.3;color:#000;font-weight:400}
#workflow .upholstery-summary strong{display:flex;align-items:center;justify-content:center;width:100%;min-height:40px;border-radius:999px;background:var(--upholstery-color);color:#000;font-size:20px;line-height:1.2;font-weight:800}
#workflow .upholstery-summary.upholstery-empty{display:flex;align-items:center;justify-content:center;min-height:81px;text-align:center;color:var(--muted);font-size:14px;font-weight:600}
/* Reserve two lines for roadmap labels without changing the other roles. */
#workflow .route-overview .roadmap-label{min-height:2.6em}
#workflow .route-count,#workflow .route-days,#workflow .route-author{font-size:13px;line-height:1.35;color:var(--muted);overflow-wrap:anywhere}
#workflow .route-count{margin-bottom:4px}
#workflow .route-author{margin-bottom:4px}
#workflow .route-grid:not(.route-overview)[data-route-size="0"] .route-card{padding-inline:8px}
#workflow .route-grid:not(.route-overview)[data-route-size="1"] .route-card{padding-inline:10px}
#workflow .route-grid:not(.route-overview)[data-route-size="2"] .route-card{padding-inline:12px}
.route-days-editor{min-width:0;margin:0;padding:12px;border:1px solid var(--line);border-radius:10px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.route-days-editor p{grid-column:1/-1;margin:0;color:var(--muted);font-size:12px}
.route-days-editor label,.route-days-editor select{min-width:0;width:100%}
@media(max-width:520px){.route-days-editor{grid-template-columns:1fr}}

/* Depot preparation is informative; loading and Iaika stay outside the fold. */
#workflow .depot-preparation{flex-basis:100%;min-width:0}
#workflow .depot-preparation summary{display:flex;align-items:center;gap:10px;width:fit-content;min-height:44px;padding:8px 12px;border:1px solid var(--line);border-radius:8px;background:#f7f8fa;font-size:12px;list-style:none}
#workflow .depot-preparation summary::-webkit-details-marker{display:none}
#workflow .depot-preparation[open] summary span{transform:rotate(180deg)}
#workflow .depot-preparation .stage-row{min-height:52px;padding:9px 0;gap:8px}
#workflow .depot-preparation .stage-title{flex-wrap:nowrap;gap:10px;min-width:0}
#workflow .depot-preparation .stage-title strong{font-size:13px}
#workflow .iaika-undo-help{flex-basis:100%;margin:0;font-size:12px;color:var(--muted);overflow-wrap:anywhere}

/* Print-only fitting: normal 8 mm signing rows, compact only if needed. */
.compact-print{--print-row:8mm;--print-font:9pt;--print-pad:.6mm;--print-line:1.12}
.compact-print[data-print-density="1"]{--print-row:7mm;--print-pad:.4mm}
.compact-print[data-print-density="2"]{--print-row:6mm;--print-pad:.3mm}
.compact-print[data-print-density="3"]{--print-row:5.5mm;--print-font:8.5pt;--print-pad:.25mm;--print-line:1.08}
.compact-print.print-measure{width:196mm;max-width:196mm;padding:0;margin:0}
.print-measure .dispatch-sheet{padding:0}
.print-measure .dispatch-sheet h1{font-size:14pt;margin-bottom:1mm}
.print-measure .dispatch-sheet header p{margin-bottom:2mm}
.print-measure .dispatch-table{margin-bottom:2mm}
.print-measure .dispatch-table th,.print-measure .dispatch-table td{font-size:var(--print-font);line-height:var(--print-line);padding:var(--print-pad) 1mm}
.print-measure .dispatch-table td{height:var(--print-row)}
.print-measure .dispatch-sheet footer{padding-top:1mm;font-size:9pt}
.print-measure .dispatch-payment-total,.print-measure .dispatch-mattress-total{margin-top:1mm;font-size:9pt;line-height:1.2}
.print-measure .dispatch-mattress-total p{margin-top:.5mm;font-size:8.5pt;line-height:1.15}
@media print{
  @page{size:A4 portrait;margin:7mm}
  .compact-print{width:196mm;max-width:196mm;padding:0;margin:0}
  .dispatch-sheet h1{font-size:14pt;margin-bottom:1mm}
  .dispatch-sheet header p{margin-bottom:2mm}
  .dispatch-table{margin-bottom:2mm}
  .dispatch-table th,.dispatch-table td{font-size:var(--print-font);line-height:var(--print-line);padding:var(--print-pad) 1mm}
  .dispatch-table td{height:var(--print-row)}
  .dispatch-sheet footer{padding-top:1mm;font-size:9pt}
  .dispatch-payment-total,.dispatch-mattress-total{margin-top:1mm;font-size:9pt;line-height:1.2}
  .dispatch-mattress-total p{margin-top:.5mm;font-size:8.5pt;line-height:1.15}
}

/* Delivery outcome remains separate from closing the trip. */
#workflow .route-closed{display:inline-block;max-width:100%;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere;font-size:12px;font-weight:600;color:#526174;background:#edf0f4;border-radius:6px;padding:3px 6px;margin-bottom:5px}
#workflow .route-result{font-weight:700;border:1px solid;white-space:nowrap}
#workflow .route-result.delivery-done{color:#146c4f;background:#e8f5ee;border-color:#c6e5d8}
#workflow .route-result.delivery-failed{color:#b02929;background:#fff2f2;border-color:#f0cdcd}
#workflow .route-result.delivery-partial{color:#a65b00;background:#fff6e8;border-color:#f1d6ae}
#workflow .route-result.delivery-pending{color:#526174;background:#edf0f4;border-color:#dce2e9}
#workflow .route-meta{display:flex;flex-direction:column;gap:5px;overflow-wrap:anywhere}
#workflow .route-map-symbol{display:inline-block;vertical-align:middle;width:1.35em;height:1.35em;object-fit:contain;max-width:100%}
#workflow .route-outcome{display:flex;align-items:stretch;flex-wrap:wrap;gap:8px;max-width:840px;margin:12px 0 16px}
#workflow .route-outcome>span{display:flex;align-items:center;box-sizing:border-box;max-width:100%;margin:0;padding:8px 12px;border-radius:10px;font-size:13px;line-height:1.5}
#workflow .route-outcome .route-closed{border:1px solid #dce2e9}
#workflow .route-outcome .route-money-done{color:#146c4f;background:#e8f5ee;border-color:#c6e5d8}
#workflow .vehicle-assignment{flex:1;min-width:0}
#workflow .vehicle-assignment select{flex:1 1 185px;min-width:0;max-width:100%}
.driver-settings li>div{min-width:0;overflow-wrap:anywhere}.driver-settings li>a{flex-shrink:0}
.print-assignment{display:inline-block;max-width:100%;overflow-wrap:anywhere}
@media(max-width:600px){#workflow .vehicle-assignment{flex:1 0 100%}#workflow .vehicle-assignment select{flex:1 0 100%;width:100%}#workflow .dispatch-actions>a{width:100%;text-align:center}}
/* Compact shared route cards. Long content grows only its own grid row. */
#workflow .route-grid{grid-auto-rows:auto}
#workflow .route-overview .route-card{padding:12px;min-height:178px;container-type:inline-size}
#workflow .route-card h2{margin-bottom:3px}
#workflow .route-card-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;margin-bottom:3px}
#workflow .route-card-heading h2{flex:1;min-width:0;margin:0}
#workflow .commissioner-order-count{flex-shrink:0;padding:3px 8px;border-radius:999px;color:var(--muted);font-size:12px;font-weight:400;line-height:1.4;white-space:nowrap}
#workflow .commissioner-order-count.has-orders{background:#6d28d9;color:#fff;font-weight:750}
#workflow .route-uninvoiced{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:4px;flex-shrink:0;min-width:26px;min-height:26px;padding:0 6px;box-sizing:border-box;border-radius:999px;background:#6d28d9;color:#fff;font-size:16px;line-height:1.4}
#workflow .route-uninvoiced-tooltip{display:none;position:absolute;right:0;top:100%;z-index:5;width:max-content;max-width:100cqw;box-sizing:border-box;padding:6px 8px;border-radius:6px;background:#6d28d9;color:#fff;font-size:12px;font-weight:600;white-space:normal}
#workflow .route-uninvoiced:hover .route-uninvoiced-tooltip,#workflow .route-card:focus-visible .route-uninvoiced-tooltip{display:block}
#workflow .route-uninvoiced-mobile{display:none;font-size:12px;font-weight:750}
@media(hover:none){#workflow .route-uninvoiced-mobile{display:inline}}
#workflow .route-count,#workflow .route-author{margin-bottom:1px}
#workflow .route-overview .route-roadmap{padding-top:10px}
#workflow .route-overview .roadmap-label{min-height:1.3em}
#workflow .route-driver-line,#workflow .route-area-line{display:flex;align-items:flex-start;justify-content:space-between;gap:6px;margin-top:2px;font-size:12px;line-height:1.35;color:var(--muted)}
#workflow .route-detail-part{display:flex;align-items:baseline;gap:4px;min-width:0}
#workflow .route-detail-part>span{min-width:0;overflow-wrap:anywhere}
#workflow .route-detail-icon{width:13px;height:13px;flex:0 0 13px;align-self:flex-start;margin-top:1px}
#workflow .route-driver-name,#workflow .route-area{flex:1}
#workflow .route-driver-phone{flex-shrink:0;max-width:48%;white-space:normal}
#workflow .route-car{margin-left:auto;max-width:48%;text-align:right}
#workflow .route-car>span{overflow-wrap:anywhere}
#workflow .route-overview .upholstery-summary{padding-top:10px}
@container (max-width:290px){#workflow .route-driver-line,#workflow .route-area-line{font-size:11px;gap:4px}#workflow .route-detail-part{gap:3px}#workflow .route-detail-icon{width:12px;height:12px;flex-basis:12px}}
@media(max-width:520px){#workflow .customer-grid{grid-template-columns:1fr}}
/* Return inspection uses the existing buttons and financial selector. */
.return-panel { min-width: 0; }
.return-panel p, .return-entry h3 { overflow-wrap: anywhere; }
.return-entry { border: 1px solid #d5dce5; border-radius: 12px; padding: 16px; margin: 12px 0; }
.return-entry h3 { margin: 0 0 8px; white-space: pre-line; }
.return-entry p { margin: 8px 0; white-space: pre-line; }
.return-entry .actions, .other-client-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.return-entry .button, .other-client-actions .button { min-height: 44px; }
#workflow .return-entry .button[aria-pressed="false"] { background: white; color: #344256; border: 1px solid #cbd5e1; }
#workflow .return-entry .button[aria-pressed="true"] { background: #15803d; color: white; border: 2px solid #166534; }
#workflow .return-entry .button[aria-pressed="true"][data-value="missing"] { background: #b91c1c; border-color: #991b1b; }
.return-missing { background: #fff1f2; border-color: #dc2626; }
.return-verified { border-color: #15803d; }
.return-state { display: block; }
.return-missing .return-state { color: #b91c1c; }
.return-progress, .return-verifier { font-weight: 600; }
.other-client-note { color: #24567a; overflow-wrap: anywhere; }
.financial-selector { flex-wrap: wrap; }
@media (max-width: 480px) {
  .return-entry { padding: 12px; }
  .return-entry .actions .button { flex: 1; }
  .financial-selector .button { min-width: 0; white-space: normal; }
}
.mobile-staff-account{display:none}
@media(max-width:800px){
  .sidebar.staff-sidebar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 10px}
  .sidebar.staff-sidebar>.main-nav{display:flex;grid-column:1/-1;grid-row:2;margin:0;gap:8px}
  .staff-sidebar>.main-nav :is(a,:where(button[data-open-map])){flex:1;justify-content:center;min-height:44px;padding:10px;font-size:14px;white-space:normal}
  .staff-sidebar>.main-nav svg{width:18px;height:18px}
  .mobile-staff-account{display:flex;align-items:center;gap:6px;grid-row:1;grid-column:2}
  .mobile-staff-account button{display:flex;align-items:center;min-height:44px;padding:8px 10px;border:1px solid #394556;border-radius:9px;background:transparent;color:white;font-size:12px}
  .mobile-staff-account .user-switch{margin:0}
}
/* Administrative trip report: the same table becomes labelled cards on phones. */
.driver-report{min-width:0;overflow-wrap:anywhere}.driver-report .page-heading{margin-top:16px}.driver-report h1{overflow-wrap:anywhere}.driver-report .actions{flex-wrap:wrap}.driver-report .button{min-height:44px;white-space:normal}.driver-report .metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.driver-report .metric>strong{font-size:24px}.trip-table{table-layout:fixed;background:white;border:1px solid var(--line)}.trip-table th,.trip-table td{padding:10px 12px;white-space:normal;overflow-wrap:anywhere}.trip-table th:first-child{width:29%}.trip-table td{vertical-align:top}.trip-table small{font-size:11px}.report-link{display:flex;align-items:center;min-height:44px;font-weight:650;color:var(--accent-dark)}.report-pagination{margin-top:18px;align-items:center}
.fuel-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}.fuel-card{display:flex;align-items:center;min-height:80px;font-size:22px}.fleet-page>.panel,.fleet-page>h2{margin-bottom:18px}.fuel-fields{border:0;padding:0;margin:0;min-width:0}.fuel-fields input,.fuel-fields select{min-width:0;max-width:100%}.fuel-menu summary{padding:10px;min-width:44px;min-height:44px;cursor:pointer}.fuel-audit{margin-top:24px}.fuel-audit-states{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.fuel-audit dd{margin:4px 0 12px}.fuel-audit dt{font-size:12px;color:var(--muted)}.fleet-page [hidden]{display:none!important}.form-panel:has(#id_plate) label[for=id_is_owned]{display:flex;align-items:center;min-height:44px}
.fuel-fields>label,.fuel-fields>details,.fuel-fields details label{min-width:0}#fuel-status:empty{display:none}
@media(max-width:600px){.fuel-cards,.fuel-audit-states{grid-template-columns:minmax(0,1fr)}.fleet-page .panel{padding:16px}.fuel-fields input{font-size:16px}}
@media(max-width:600px){.driver-report .metrics{grid-template-columns:1fr}.trip-table,.trip-table tbody,.trip-table tr,.trip-table td{display:block;width:100%}.trip-table{border:0;background:transparent}.trip-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.trip-table tr{background:white;border:1px solid var(--line);border-radius:12px;margin-bottom:12px;padding:8px}.trip-table td{border:0;padding:6px;font-size:13px}.trip-table td::before{content:attr(data-label);display:block;font-size:11px;color:var(--muted);margin-bottom:3px}.trip-table td:first-child::before{display:none}.driver-report .section-heading{flex-wrap:wrap}.driver-report .page-heading .actions{justify-content:flex-start}}
.maintenance-terms{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.maintenance-terms dd{margin:4px 0 12px;font-weight:600}.service-description,.fuel-audit dd{overflow-wrap:anywhere}.fuel-audit summary{min-height:44px;cursor:pointer;padding:10px 0}

/* Fleet analysis stays within the existing report layout. */
.fleet-list th:first-child{width:20%}#fleet-live>.panel,#fleet-live>h2{margin-bottom:18px}#fleet-live .section-heading{flex-wrap:wrap;gap:12px}

@media(min-width:801px){
  .sidebar{overflow-y:auto}
  .sidebar>*{flex-shrink:0}
}
@media(max-width:800px){
  .sidebar{padding:8px 14px;min-height:60px;flex-wrap:nowrap}
  .sidebar>.main-nav{display:none}
  .sidebar .brand{min-height:44px;gap:9px}
  .sidebar .brand strong{font-size:19px}
  .mobile-account{margin-left:auto}
  .mobile-account>summary{gap:8px;padding:0 12px;min-height:44px;font-size:14px;font-weight:700;color:white;border:1px solid #394556;border-radius:10px;cursor:pointer;list-style:none}
  .mobile-account>summary::-webkit-details-marker{display:none}
  .mobile-account>summary>span{font-size:20px}
  .mobile-account[open]>summary{background:#263040}
  .mobile-account>div{top:calc(100% + 8px);width:min(360px,calc(100vw - 28px));padding:12px;max-height:calc(100dvh - 80px);overflow-y:auto;overscroll-behavior:contain}
  .mobile-account .main-nav{display:grid;margin:0;gap:4px}
  .mobile-account .main-nav :is(a,:where(button[data-open-map])){display:flex;align-items:center;gap:12px;min-height:48px;padding:12px;font-size:15px;color:#435065;border-radius:8px}
  .mobile-account .main-nav svg{width:20px;height:20px;flex-shrink:0}
  .mobile-account .main-nav :is(a,:where(button[data-open-map])).active{background:#e4f4f3;color:#007f83;box-shadow:none}
  .mobile-account .main-nav :is(a,:where(button[data-open-map])).active svg{color:inherit}
  .mobile-account .main-nav :is(a,:where(button[data-open-map])):hover{background:#edf5f5;color:#00676b}
  .mobile-menu-account{margin-top:12px;padding:12px 4px 0;border-top:1px solid var(--line)}
  .mobile-menu-account .user-switch>summary{font-size:13px;min-height:44px}
  .mobile-menu-account .user-switch .button.ghost{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 12px;background:#fff;color:#253346;border:1px solid #dce1e8;border-radius:10px;text-align:center;font-size:12px;font-weight:700}
  .sidebar.staff-compact{display:flex;gap:6px;padding:11px 12px}
  .staff-compact .brand{gap:6px;padding:0}
  .staff-compact .brand strong{font-size:16px}
  .sidebar.staff-compact>.main-nav{margin-left:auto;gap:4px}
  .staff-compact>.main-nav :is(a,:where(button[data-open-map])){flex:none;gap:5px;padding:8px;font-size:11px;white-space:nowrap}
  .staff-compact>.main-nav svg{width:15px;height:15px}
  .staff-compact>.main-nav :is(a,:where(button[data-open-map]))[href="/alimentari/"]:not(.active){background:#263040;color:#fff;box-shadow:inset 0 0 0 1px #526078}
  .staff-account{margin-left:0;flex-shrink:0}
  .staff-account>summary{padding:0;width:44px;font-size:24px;font-weight:400;color:#c4cedc;border:0}
}
@media(max-width:360px){.sidebar.staff-compact:not(.inventory-access){gap:2px}.staff-compact:not(.inventory-access) .brand{gap:4px}.staff-compact:not(.inventory-access)>.main-nav{gap:2px}.staff-compact:not(.inventory-access)>.main-nav a{padding-inline:4px}}

#workflow .client-amount-collected{white-space:normal}

#workflow .money-actions>.route-statement-link{justify-self:center;text-align:center}
@media(max-width:600px){#workflow .money-actions{grid-template-columns:1fr}#workflow .money-actions>.button,#workflow .money-receipt .button{width:100%}}
.route-statement .dispatch-number{width:5%}.route-statement .dispatch-code{width:8%}.route-statement .dispatch-customer{width:17%}.route-statement .dispatch-amount{width:14%}.route-statement .dispatch-signature{width:12%}.route-statement col.dispatch-observations{width:28%}
.route-statement td.dispatch-observations{white-space:pre-line}.route-statement .dispatch-observations div+div{margin-top:1mm}
.route-statement .dispatch-table th{border-block:1.5pt solid #000}.route-statement .dispatch-table td{border-block:1.5pt solid #000}.route-statement .dispatch-table td:nth-child(5){border-inline:1.5pt solid #000}
/* Keep the extra stock destination readable on the staff's smallest phones. */
@media(max-width:800px){
  .sidebar.inventory-access{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 10px}
  .inventory-access>.brand{grid-column:1;grid-row:1}
  .inventory-access>.staff-account{grid-column:2;grid-row:1}
  .sidebar.inventory-access>.main-nav{grid-column:1/-1;grid-row:2;margin:0;width:100%;gap:6px}
  .inventory-access>.main-nav a{flex:1;justify-content:center;font-size:12px;min-height:44px;padding:8px 6px}
}
/* Search belongs only to the route toolbar; route cards and navigation keep their styles. */
#workflow .route-search-toolbar{display:flex;flex-wrap:nowrap;align-items:stretch;gap:10px;margin-bottom:12px}
#workflow .route-search-toolbar .week-picker{flex:0 1 auto;min-width:0}
#workflow .route-search-toolbar .week-picker summary{height:44px;min-height:44px;white-space:nowrap;gap:6px}
#workflow .route-search-toolbar .week-title{font-size:12px;color:inherit}
#workflow .route-search-field{position:relative;display:block;flex:1;min-width:0;max-width:420px;margin:0}
#workflow .route-search-field svg{position:absolute;width:17px;height:17px;left:11px;top:14px;color:var(--muted);pointer-events:none}
#workflow .route-search-field input{width:100%;height:44px;min-height:44px;margin:0;padding:8px 8px 8px 34px;border:1px solid var(--line);border-radius:8px;background:white;font-size:16px}
#workflow .route-heading-title{display:flex;align-items:center;gap:10px;min-width:0;flex-wrap:wrap}
#workflow .route-money-filter{display:flex;align-items:center;gap:8px;min-height:44px;margin:0;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:white;font-size:12px;white-space:nowrap;cursor:pointer}
#workflow .route-money-filter input{width:18px;height:18px;min-height:0;margin:0;padding:0;accent-color:var(--accent)}
#workflow .route-money-filter:has(:checked){border-color:var(--accent);background:#fff0e8}
@media(max-width:800px){#workflow .routes-list-heading{flex-wrap:wrap}#workflow .routes-list-heading>.button{margin-left:auto;min-height:44px}}
#workflow .route-search-status:empty{display:none}
#workflow .route-search-status,#workflow .route-search-results>p{font-size:12px;color:var(--muted);margin:0 0 12px}
#workflow .route-search-results{margin-bottom:16px}
#workflow .route-search-client{display:flex;flex-direction:column;gap:4px;min-height:44px;padding:10px 12px;margin-bottom:6px;border:1px solid var(--line);border-radius:8px;background:white;font-size:13px;overflow-wrap:anywhere}
#workflow .route-search-client span{font-size:12px;color:var(--muted)}
#workflow .route-search-client:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
#workflow .week-options{width:340px}
#workflow .week-options .date-select{gap:4px}
#workflow .week-options select{min-height:44px;padding:6px 2px}
#workflow .week-options [name=month]{flex:1.3}
#workflow .week-options [data-month-step]{flex:0 0 44px;width:44px;height:44px;padding:0;font-size:22px}
/* Raised controls only in the route summary; icons are decorative CSS masks. */
#workflow .route-totals .financial-selector{padding:6px;gap:8px;border-radius:12px;background:#f0f2f5;box-shadow:inset 0 1px 2px #17202b08}
#workflow .route-totals :is(.financial-selector,.money-actions) .button{min-height:50px;border:1px solid #cbd2dc;border-bottom-width:3px;border-radius:10px;gap:9px;white-space:normal;box-shadow:0 3px 5px #17202b1c;padding:10px 14px}
#workflow .route-totals .financial-selector .button[aria-pressed=false]{background:white;color:var(--nav)}
#workflow .route-totals :is(.financial-selector,.money-actions) .button.primary{background:var(--accent);border-color:var(--accent-dark);border-top-color:#ed9a7d;color:white}
#workflow .route-totals :is(.financial-selector,.money-actions) .button::before,#workflow .route-totals .dispatch-actions>a:is([href$="/print/"],[href$="/print/?situatie=1"])::before,#workflow .package-panel [data-action=print_labels]::before{content:"";width:20px;height:20px;flex:0 0 20px;background:currentColor;mask:var(--route-control-icon) center/contain no-repeat;pointer-events:none}
#workflow .route-totals .financial-selector [data-mode=planned]{--route-control-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M9 6h12M9 12h12M9 18h12M3 6h1M3 12h1M3 18h1'/%3E%3C/svg%3E")}
#workflow .route-totals .financial-selector [data-mode=collected],#workflow .money-actions [data-action=money_receive]{--route-control-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M20 8V5H5a2 2 0 0 0 0 4h16v11H5a2 2 0 0 1-2-2V7M21 12h-5v5h5M5 5l12-3 1 3'/%3E%3C/svg%3E")}
#workflow .route-totals .financial-selector [data-mode=returns],#workflow .money-actions :is([data-action=money_receive_cancel],[data-action=money_cancel]){--route-control-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 4-6 6 6 6M3 10h11a6 6 0 0 1 0 12' transform='translate(0 -1)'/%3E%3C/svg%3E")}
#workflow .money-actions .route-statement-link,#workflow .route-totals .dispatch-actions>a:is([href$="/print/"],[href$="/print/?situatie=1"]),#workflow .package-panel [data-action=print_labels]{--route-control-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M6 9V3h12v6M6 17H3V9h18v8h-3M6 14h12v7H6zM17 12h1'/%3E%3C/svg%3E")}
#workflow .money-actions [data-action=money_confirm]{--route-control-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 12 5 5L20 6'/%3E%3C/svg%3E")}
#workflow .route-totals :is(.financial-selector,.money-actions) .button:active:not(:disabled){transform:translateY(2px);box-shadow:0 1px 2px #17202b18}
#workflow .route-totals :is(.financial-selector,.money-actions) .button:disabled{box-shadow:none}
@media(hover:hover){#workflow .route-totals :is(.financial-selector,.money-actions) .button:hover:not(:disabled){box-shadow:0 4px 8px #17202b29}#workflow .route-totals :is(.financial-selector,.money-actions) .button.primary:hover:not(:disabled){background:var(--accent-dark)}#workflow .route-totals .financial-selector .button[aria-pressed=false]:hover{background:#f8fafc}}
@media(max-width:520px){#workflow .route-totals .financial-selector{gap:6px;padding:5px}#workflow .route-totals .financial-selector .button{flex-direction:column;gap:5px;padding:9px 4px}}
@media(max-width:520px){#workflow .route-search-toolbar{gap:6px}#workflow .route-search-toolbar .week-picker{flex:0 0 55%}#workflow .route-search-toolbar .week-picker summary{padding:6px;justify-content:space-between}#workflow .route-search-toolbar .week-title{font-size:11px}#workflow .route-search-toolbar .week-extra{display:none}#workflow .route-search-field{max-width:none}#workflow .route-search-field svg{left:8px}#workflow .route-search-field input{padding-left:30px}}

.main-nav [data-open-map]{width:100%;border:0;background:transparent;text-align:left}
.map-dialog{width:min(400px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:24px;border:1px solid var(--line);border-radius:var(--radius);color:var(--ink);box-shadow:0 24px 80px #111a2733;overflow:auto}
.map-dialog::backdrop{background:#111a2780}
.map-dialog .section-heading{margin-bottom:8px;gap:12px}
.map-dialog .section-heading h2{font-size:22px}
.map-dialog [data-close-map]{width:44px;min-height:44px;padding:0;font-size:24px;flex-shrink:0}
.map-options{display:grid;gap:10px}
.map-options a{display:flex;align-items:center;gap:14px;min-height:60px;padding:14px 16px;border:1px solid var(--line);border-radius:10px;background:var(--canvas);font-size:15px;font-weight:650;overflow-wrap:anywhere}
.map-options a:hover{background:#fff2e9;border-color:#e1b5a5}
.map-options svg{color:var(--accent-dark);flex-shrink:0}
.map-options a>span:first-of-type{flex:1;min-width:0}
.map-options a>span:last-child{color:var(--muted)}

/* Customer after-sales inbox. */
[data-customer-requests-count],[data-missed-calls-count]{display:inline-flex;align-items:center;justify-content:center;min-width:23px;height:23px;padding:0 6px;border-radius:20px;background:#b83934;color:white;font-size:12px;font-weight:750}
[data-customer-requests-count][hidden],[data-missed-calls-count][hidden]{display:none}
.main-nav :is([data-customer-requests-count],[data-missed-calls-count]){margin-left:auto;flex-shrink:0}
