/* RUTA 2.3 — role workspaces, operational lists and touch navigation. */
:root{--nav:#14243b;--blue:#245bb7;--blue-soft:#edf3fc;--ink:#1e3049;--muted:#60718a;--line:#dde5ef;--bg:#f2f5f9;--radius:10px;--sidebar-width:246px}
html{scroll-padding-top:90px}body{font-size:1rem;line-height:1.6}.btn{border-radius:7px;font-size:.875rem;min-height:42px}.btn:disabled{cursor:not-allowed}.btn.small{min-height:38px}.panel{border-radius:10px;box-shadow:none}h1{font-size:1.75rem;letter-spacing:-.03em;line-height:1.35}.help,.scope-badge,.badge,.subline,.route-goods,.route-metrics span{font-size:.875rem}input,select,textarea{border-radius:7px}.field{gap:7px}.field>span{font-size:.875rem}.field em{color:#b63835}input[readonly]{background:#f4f7fb}button,a,summary{touch-action:manipulation}.btn,.tab,summary{white-space:normal}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #eeac52;outline-offset:3px}
.erp-shell{display:block;min-height:100dvh}.erp-shell .sidebar{position:fixed;inset:0 auto 0 0;width:var(--sidebar-width);height:100dvh;display:flex;flex-direction:column;padding:22px 14px 12px;gap:12px;background:var(--nav);z-index:50;overflow:hidden}.sidebar-brand{display:flex;align-items:center;justify-content:space-between;padding:0 8px}.erp-shell .brand{padding:0;gap:10px;color:white}.erp-shell .brand img{width:34px;height:34px}.erp-shell .brand b{font-size:22px;line-height:1.2;letter-spacing:1px}.erp-shell .brand small{display:block;font-size:12px;color:#c0cddd;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-role{margin:4px 8px 0;color:#ffd08b;font-size:.875rem;padding-bottom:14px;border-bottom:1px solid #ffffff1f}.erp-shell .nav-links{display:block;flex:1;overflow-x:hidden;overflow-y:auto;min-height:0;overscroll-behavior:contain}.nav-group{margin-bottom:18px}.nav-group h2{font-size:12px;color:#a5b8cf;font-weight:500;letter-spacing:.02em;padding:0 12px 6px}.erp-shell .nav-link{display:flex;align-items:center;gap:12px;white-space:normal;padding:10px 12px;margin:2px 0;border-radius:7px;font-size:.875rem;line-height:1.5;min-height:43px;color:#d6e0ef;border:1px solid transparent}.erp-shell .nav-link .icon{display:block;width:19px;height:19px;color:#9dafc7}.erp-shell .nav-link:hover{background:#ffffff0b;color:white}.erp-shell .nav-link.active{background:#294565;border-color:#4e6581;color:white;box-shadow:inset 3px 0 #ffb45d;font-weight:650}.erp-shell .nav-link.active .icon{color:#ffd08b}.erp-shell .side-bottom{display:block;margin:0;padding:12px 0 0;border-top:1px solid #ffffff1f}.erp-shell .user-card{padding:0 4px;display:flex;gap:10px;align-items:center;color:white;background:transparent}.user-card>div{flex:1;min-width:0;font-size:.875rem}.user-card strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-card small{color:#bccbdc;font-size:12px}.user-card .avatar{width:34px;height:34px;font-size:.875rem;background:#365570;border-radius:8px}.user-card .btn.ghost{color:#cbd8e8}.sidebar-close,.menu-toggle,.nav-scrim,.erp-mobile-bottom{display:none!important}
.erp-shell .main-area{margin-left:var(--sidebar-width);min-width:0}.erp-shell .topbar{position:sticky;top:0;z-index:30;min-height:76px;height:auto;padding:15px 30px;display:flex;align-items:center;justify-content:space-between;gap:16px;background:#ffffffee;backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}.topbar-title,.topbar-tools{display:flex;align-items:center;gap:14px;min-width:0}.topbar-title>div{display:flex;align-items:center;gap:14px}.topbar-brand{font-size:12px;font-weight:750;letter-spacing:1px;color:#667d98;padding-right:14px;border-right:1px solid var(--line)}.erp-shell .breadcrumb{display:block;font-size:.875rem;color:#253c59;font-weight:600}.context-chip{display:flex;align-items:center;gap:7px;padding:5px 10px;border:1px solid var(--line);border-radius:20px;font-size:.875rem;color:#52647a;max-width:250px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.context-chip .icon{width:15px;height:15px}.erp-shell .language{color:var(--ink);background:#fff;border:1px solid var(--line);min-height:40px;font-size:.875rem;max-width:142px;padding:8px}.erp-shell .workspace{padding:28px 30px 110px;max-width:1800px;margin:auto;min-width:0}.workspace:focus{outline:none}.skip-link{position:fixed;top:-100px;left:260px;z-index:200;background:white;color:var(--ink);padding:12px}.skip-link:focus{top:6px}.erp-shell .customer-tabs{display:none}.workspace>.public-title{margin:0 0 22px}.workspace>.public-title h1{font-size:1.75rem}.workspace>.public-title p{font-size:.875rem;color:var(--muted)}
.page-head{margin-bottom:24px;gap:18px;align-items:center}.page-head .help{margin-top:7px;max-width:760px}.page-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.home-head .eyebrow{font-size:12px;margin:0 0 5px;text-transform:uppercase;letter-spacing:.07em;color:#61788f}.section-head{align-items:center;gap:12px}.section-head h2{font-size:1.0625rem}.home-head{margin-bottom:24px}.metrics-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:26px}.metric{display:flex;flex-direction:column;gap:10px;padding:20px 22px;background:#fff;border:1px solid var(--line);border-radius:10px;color:var(--ink);min-width:0}.metric:hover{border-color:#839fbd}.metric-label{font-size:.875rem;font-weight:550;color:#52657e}.metric strong{font-size:2.125rem;line-height:1.2;font-variant-numeric:tabular-nums}.metric-link{font-size:.875rem;color:#496b94;display:flex;align-items:center;justify-content:space-between;gap:8px}.metric-link .icon{width:18px;height:18px}.metric.attention{border-top:3px solid #db9b48;padding-top:18px}.metric.attention strong{color:#a56c18}.home-columns{display:grid;grid-template-columns:minmax(0,1.85fr) minmax(265px,1fr);gap:22px;align-items:start}.home-columns>div,.home-columns>section{min-width:0}.task-panel{display:grid;gap:0;align-self:start}.task-panel h2{font-size:1.0625rem;margin-bottom:12px}.task-link{display:flex;align-items:center;gap:12px;border-bottom:1px solid #e9eef5;padding:17px 0;color:var(--ink)}.task-link:last-child{border:0;padding-bottom:0}.task-link>span{display:grid;gap:4px;flex:1;min-width:0}.task-link strong{font-size:.9375rem}.task-link small{font-size:.875rem;color:var(--muted)}.task-link>.icon:first-child{color:#537399;background:#eef3fa;box-sizing:content-box;padding:10px;border-radius:8px}.task-link>.icon:last-child{width:16px;color:#8c9cb0}.task-link:hover strong{color:var(--blue)}.work-list{display:grid}.work-row{display:flex;align-items:center;gap:14px;padding:17px 0;border-bottom:1px solid var(--line)}.work-row:last-child{border:0;padding-bottom:0}.work-row-icon{background:#eef3fa;border-radius:8px;padding:9px;color:#557395}.work-row-main{flex:1;min-width:0}.work-row-main .mono{font-size:.875rem;overflow-wrap:anywhere}.work-row-main p{font-size:.875rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:440px}.work-row-main small{font-size:12px}.overview-values{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:0}.overview-values>div{display:grid;gap:8px}.overview-values dt{font-size:.875rem;color:var(--muted)}.overview-values dd{margin:0;font-size:1.4rem;line-height:1.35;font-weight:650;overflow-wrap:anywhere}.empty.compact{padding:26px 12px}.recent-panel>.section-head{margin-bottom:4px}
.erp-shell .stats{gap:14px;margin-bottom:22px}.erp-shell .stat{padding:18px;border-radius:9px;border:1px solid var(--line);min-width:0}.stat>div{min-width:0}.stat span{font-size:.875rem}.stat strong{font-size:1.9rem}.stat .stat-icon{border-radius:8px}.warehouse-context{margin:0 0 22px}.warehouse-overview-card dl>div{padding-bottom:7px;border-bottom:1px solid #edf1f6}.warehouse-overview-card dl>div:last-child{border:0}.warehouse-overview-card{border-radius:8px}.warehouse-overview-card .scope-badge{font-size:.875rem}.erp-shortcuts{grid-template-columns:repeat(auto-fit,minmax(145px,1fr))}.erp-shortcuts .btn{justify-content:flex-start;padding:15px;min-height:56px}.fleet-strip{gap:24px}.fleet-strip>div{min-width:120px}.pool-group .section-head h2{font-size:1rem}.pool-order{background:#fff;border-radius:8px;padding:18px}.pool-order:has(input:checked){border-color:#326bbe;background:#f2f6fd}.pool-order input[type=checkbox]{width:22px;height:22px}.pool-order .volume-card{background:#f4f7fb;border-color:#e2eaf4}.pool-order .volume-card strong{font-size:1.25rem}.pool-order .btn{min-height:44px}.pool-group>.section-head{padding-bottom:15px;border-bottom:1px solid var(--line)}
.list-panel{overflow:visible}.list-toolbar{padding:18px;gap:12px}.list-toolbar .search-box{max-width:500px}.search-box input{min-height:44px}.table-wrap{border-radius:7px}.data-table th,.order-table th{font-size:.875rem;color:#435b76;font-weight:600;background:#f2f5fa}.data-table td,.order-table td{font-size:.875rem}.data-table tbody tr:hover td,.order-table tbody tr:hover td{background:#f8fafd}.data-table td:last-child{min-width:110px}.tabs{display:flex;flex-wrap:wrap;overflow:visible;padding:4px 16px;gap:4px;border-block:1px solid var(--line);background:#fafbfd}.tab{border:0;border-radius:6px;min-height:42px;padding:9px 11px;font-size:.875rem;margin:4px 0;display:inline-flex;align-items:center;gap:6px}.tab.active{background:#e4edf9;box-shadow:none;color:#174982;border:0;font-weight:650}.tab small{font-size:12px;color:inherit;background:#ffffffb3;border-radius:4px;padding:1px 6px}.pager{padding:16px;gap:16px}.data-table .scope-badge{font-size:.875rem}.data-table .row{gap:7px}.badge{white-space:normal;line-height:1.35;max-width:100%;padding:5px 9px}.btn.danger{background:white}.action-menu{font-size:.875rem;max-width:100%;min-width:75px;position:relative}.action-menu summary{cursor:pointer;display:flex;align-items:center;justify-content:center;gap:5px;min-height:38px;padding:8px 11px;border:1px solid var(--line);border-radius:7px;background:#fff;list-style:none;color:#53667e;font-weight:550}.action-menu summary::-webkit-details-marker{display:none}.action-menu-items{display:grid;gap:7px;margin-top:7px;padding:9px;border:1px solid var(--line);border-radius:7px;background:#f7f9fc;min-width:100px}.action-menu-items .btn{justify-content:flex-start;font-size:.875rem;width:100%}.action-menu[open]{min-width:145px}.record-actions{display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap}.record-actions>.btn{flex-shrink:0}.operation-panel{order:-1;border-left:3px solid #3569ab}.operation-panel .row{align-items:flex-start}.detail-layout{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr)}.detail-list .row{gap:8px}.order-progress{display:flex;gap:8px;flex-wrap:wrap;padding:16px 18px;border:1px solid var(--line);border-radius:8px;background:#f7f9fc;margin-bottom:18px}.order-progress span{font-size:.875rem;padding:5px 8px;color:#71849b}.order-progress span.current{background:#dfebfb;color:#224f88;border-radius:6px;font-weight:650}.order-progress span.done{color:#357563}.detail-layout .panel h2{font-size:1.0625rem}.detail-layout .stack{align-content:start}.detail-layout .panel:has(.timeline){order:5}.detail-list .btn.primary{background:#f0f5fd;color:#245bb7;border-color:#ccdaf0}
.form-section{min-width:0;margin:0;border:1px solid var(--line);border-radius:8px;padding:20px}.form-section legend{padding:0 8px;font-size:1rem;font-weight:650;color:#2b4564}.form-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;padding:16px 0 0;border-top:1px solid var(--line)}.form-actions .btn{min-width:110px}.order-form{display:grid;gap:20px}.order-form>.panel{margin:0}.order-form .section-number{width:28px;height:28px;font-size:14px;background:#edf3fc;border:1px solid #dce7f5;color:#355c8e;border-radius:6px}.order-form .submit-row{position:sticky;bottom:14px;z-index:20;margin:0;background:#fff;border:1px solid var(--line);border-radius:9px;padding:16px;box-shadow:0 8px 25px #22375413;display:flex;justify-content:space-between;gap:16px}.order-form .submit-row .btn{min-width:170px;flex-shrink:0}.order-form .submit-row p{margin:0}.order-form .location-bar .row{flex-wrap:wrap}.order-form .form-grid{gap:18px 24px}.saved-address{border-left:3px solid #3c6ea9}.customer-item{padding:20px 0}.settings-layout{max-width:1050px}.settings-jumps{display:flex;flex-wrap:wrap;gap:9px;margin-bottom:24px}.settings-jumps a{padding:8px 13px;border:1px solid var(--line);border-radius:6px;background:#fff;font-size:.875rem}.settings-layout .panel{scroll-margin-top:100px}.settings-save{position:sticky;bottom:14px;background:white;padding:16px;border:1px solid var(--line);border-radius:8px;display:flex;justify-content:flex-end;z-index:20;box-shadow:0 8px 25px #22375413}.settings-save .btn{min-width:150px}.staff-toolbar{display:flex;flex-wrap:wrap;gap:12px;padding:18px;background:#fff;border:1px solid var(--line);border-radius:9px;margin-bottom:22px}.staff-toolbar input{flex:1;min-width:180px}.staff-toolbar select{width:auto;min-width:160px}.staff-toolbar .btn{min-width:80px}.driver-grid .panel{gap:16px}.driver-grid .panel h2{font-size:1.125rem}.driver-avatar{border-radius:8px;width:42px;height:42px}.route-card .route-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.route-metrics strong{font-size:1.2rem}.route-stop{gap:12px}.route-stop p{font-size:.875rem}.route-map{border-radius:8px}.status-summary{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:18px}.status-summary>strong{font-size:1rem}
dialog{border-radius:12px;width:min(1080px,calc(100vw - 64px));max-height:calc(100dvh - 64px)}dialog.narrow{width:min(620px,calc(100vw - 48px))}dialog[open]{display:flex;flex-direction:column;overflow:hidden}.modal-head{flex:none;background:white;border-bottom:1px solid var(--line);padding:18px 24px;min-height:72px}.modal-body{overflow-y:auto;overscroll-behavior:contain;min-height:0;padding:24px}.modal-body>.stack,.modal-body form{min-width:0}.modal-body .panel{padding:20px}.modal-body form>.btn:last-child{justify-self:end;min-width:120px}.modal-body .form-actions,.modal-body form>.btn:last-child{position:sticky;bottom:0;z-index:10}.modal-body form>.btn:last-child{box-shadow:0 0 0 6px white}.modal-body .translation-panel{padding:18px}.modal-body .translation-panel h3{font-size:1rem}.batch-bar{left:calc(var(--sidebar-width) + 30px);right:30px;bottom:18px;border-radius:10px;padding:15px 20px;flex-wrap:wrap;z-index:25}#toast{bottom:28px}.public-header .inner{max-width:1300px}.login-wrap .panel{border-top:4px solid #edaf58}.public-main{max-width:1300px}.public-title{margin-bottom:24px}
@media(min-width:1600px){:root{--sidebar-width:260px}.erp-shell .workspace{padding:32px 38px 110px}.erp-shell .topbar{padding-inline:38px}}
@media(max-width:1250px){.home-columns{grid-template-columns:1fr}.home-columns>.task-panel{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:24px}.home-columns>.task-panel h2{grid-column:1/-1}.metrics-grid{gap:12px}.metric{padding:18px}.context-chip{display:none}.detail-layout{grid-template-columns:1fr}.pool-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1000px){
  .erp-shell .main-area{margin:0}.erp-shell .sidebar{width:min(315px,86vw);z-index:100;transform:translateX(-100%);visibility:hidden;transition:transform .18s ease,visibility .18s;box-shadow:8px 0 30px #0d223344;padding-top:24px}.erp-shell.menu-open .sidebar{transform:translateX(0);visibility:visible}.erp-shell .sidebar-close,.erp-shell .menu-toggle{display:inline-flex!important}.erp-shell .sidebar-close{color:#d1dfef;background:transparent;border-color:transparent}.erp-shell.menu-open .nav-scrim{display:block!important;position:fixed;inset:0;background:#13253e88;z-index:90;border:0;border-radius:0;width:100%;height:100dvh}.navigation-open{overflow:hidden}.erp-shell .side-bottom{display:block}.erp-shell .nav-link .icon{display:block}.erp-shell .nav-links{display:block;overflow-y:auto;overflow-x:hidden}.erp-shell .topbar{padding:12px 20px;min-height:68px;flex-wrap:nowrap}.topbar-title>div{gap:8px;display:grid}.topbar-brand{display:none}.erp-shell .breadcrumb{display:block;font-size:.9375rem}.topbar-title{gap:8px}.topbar-tools{gap:6px}.erp-shell .workspace{padding:24px 22px calc(114px + env(safe-area-inset-bottom))}.erp-shell .language{max-width:145px;font-size:16px}.erp-shell .erp-mobile-bottom{position:fixed;display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));inset:auto 0 0;min-height:72px;padding:6px 8px calc(6px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--line);z-index:40;box-shadow:0 -6px 20px #263c5510;gap:4px}.mobile-link{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px;font-size:.875rem;font-weight:500;line-height:1.25;min-width:0;padding:6px 3px;border:0;border-radius:7px;background:transparent;color:#566b85;overflow-wrap:anywhere;text-align:center}.mobile-link .icon{width:21px;height:21px}.mobile-link.active{color:#235aa5;background:#edf3fb;font-weight:650}.mobile-link span{max-width:100%}.batch-bar{left:20px;right:20px;bottom:calc(86px + env(safe-area-inset-bottom))}#toast{bottom:calc(88px + env(safe-area-inset-bottom))}.order-form .submit-row,.settings-save{bottom:calc(86px + env(safe-area-inset-bottom))}.skip-link{left:10px}.topbar .btn.icon-only{min-width:40px;min-height:44px}
}
@media(max-width:760px){
  .erp-shell .topbar{padding:10px 12px;gap:7px}.topbar-title{flex:1}.topbar-tools>.btn{display:none}.erp-shell .language{max-width:122px;padding:8px 6px}.erp-shell .workspace{padding:20px 14px calc(125px + env(safe-area-inset-bottom))}.page-head{align-items:flex-start;margin-bottom:20px;gap:14px}.page-head>div:not(.page-actions){min-width:0}.page-head>.page-actions{width:100%;display:flex;gap:10px}.page-actions>.btn{flex:1}.page-head h1,.workspace>.public-title h1{font-size:1.5rem}.page-head .help{font-size:.875rem}.metrics-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:20px}.metric{padding:16px 14px;gap:9px}.metric.attention{padding-top:14px}.metric strong{font-size:1.85rem}.metric-label,.metric-link{font-size:.875rem}.metric-link .icon{width:16px}.home-columns{gap:18px}.home-columns>.task-panel{display:grid;grid-template-columns:1fr}.panel{padding:17px}.home-columns .panel{min-width:0}.home-columns>.task-panel h2{grid-column:auto}.work-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 12px;padding:17px 0}.work-row-icon{display:none}.work-row-main{grid-column:1;grid-row:1/3}.work-row>.badge{grid-column:2;max-width:125px;justify-self:end}.work-row>.btn{grid-column:2;justify-self:end}.work-row-main p{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.work-row-main small{font-size:12px}.recent-panel .section-head{flex-wrap:wrap}.recent-panel .section-head .btn{min-height:38px}.overview-values{gap:16px}.overview-values dd{font-size:1.25rem}.task-link{padding:15px 0}.task-link>.icon:first-child{padding:9px}.stats .stat strong{font-size:1.75rem}.stats .stat span{font-size:.875rem}.erp-shell .stat{padding:14px;min-width:0}.stat .stat-icon{display:none}.warehouse-overview-card{padding:16px}.warehouse-overview-card dt{font-size:.875rem}.scope-badge{font-size:.875rem}.erp-shortcuts{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.erp-shortcuts .btn{min-height:55px;padding:12px;gap:8px}.pool-grid{grid-template-columns:1fr}.fleet-strip{gap:18px}.fleet-strip>div{min-width:110px}.fleet-strip strong{font-size:1.1rem}.fleet-strip span{font-size:.875rem}.pool-order{padding:16px}.pool-group{padding:16px}.data-table th,.data-table td{font-size:.875rem}.responsive-table td::before{font-size:.875rem}.responsive-table td{grid-template-columns:minmax(85px,.8fr) minmax(0,1.5fr);gap:12px}.responsive-table tr{margin:12px 0;padding:8px 12px}.responsive-table td:last-child{min-width:0}.responsive-table td:has(.record-actions){grid-template-columns:1fr}.responsive-table td:has(.record-actions)::before{display:none}.responsive-table td:has(.record-actions) .record-actions{justify-content:flex-end}.order-table tr{grid-template-columns:24px minmax(0,1fr) minmax(65px,auto);padding:17px 12px}.order-table .mono,.order-table .badge,.order-table .btn.small{font-size:.875rem}.order-table .mono{display:block}.order-table td:nth-child(3),.order-table td:nth-child(4){grid-column:2/-1}.order-table td:nth-child(5){max-width:115px}.order-table .goods-summary{gap:9px}.order-table .address-col{min-width:0}.order-table .subline{font-size:.875rem}.tabs{padding:5px 9px;gap:4px}.tab{padding:8px 10px;min-height:40px;flex:0 1 auto;font-size:.875rem}.tab small{font-size:12px}.list-toolbar{padding:14px}.list-toolbar .filter-select{min-width:0;flex:1}.list-toolbar .search-box{max-width:none}.pager{padding:14px 4px}.btn,.btn.small,input,select{min-height:44px}.action-menu summary{min-height:44px}.action-menu[open]{min-width:0;width:100%}.record-actions{gap:8px}.record-actions>.btn{flex:1}.record-actions>.action-menu{flex:1}.action-menu-items{min-width:0}.driver-grid{grid-template-columns:1fr}.staff-toolbar{padding:14px}.staff-toolbar input{min-width:100%;flex-basis:100%}.staff-toolbar select{min-width:0;flex:1}.form-grid{grid-template-columns:1fr;gap:18px}.form-section{padding:16px}.order-form{gap:16px}.order-form .section-head{flex-wrap:wrap}.order-form .section-head h2{font-size:1rem}.order-form .submit-row{padding:12px;gap:10px;display:grid;grid-template-columns:1fr}.order-form .submit-row .btn{min-width:0;width:100%;min-height:48px}.order-form .submit-row p{font-size:.875rem}.form-actions{justify-content:stretch}.form-actions .btn{min-width:0;flex:1}.settings-save{padding:12px}.settings-save .btn{width:100%}.settings-jumps{gap:7px}.settings-jumps a{min-height:42px;padding:8px 10px}.settings-layout .form-grid{grid-template-columns:1fr}.location-bar .row{gap:8px}.location-bar .btn{flex:1}.saved-address{gap:12px;padding:16px}.route-card .route-metrics{gap:14px}.route-metrics strong{font-size:1.125rem}.route-metrics span{font-size:.875rem}.batch-bar{left:12px;right:12px;padding:14px;gap:10px}.batch-bar>.row{flex-wrap:wrap;width:100%}.batch-bar .row>.btn{flex:1}.batch-bar .btn,.batch-bar .count-label{font-size:.875rem}.detail-layout{grid-template-columns:1fr}.order-progress{gap:4px;padding:12px}.order-progress span{padding:5px 6px}.detail-list .row{flex-wrap:wrap}.operation-panel .row>.btn{flex:1}.operation-panel .row>.action-menu{flex:1 1 100%}.modal-body .form-grid{grid-template-columns:1fr}dialog,dialog.narrow{width:100%;height:100dvh;max-width:100%;max-height:100dvh;margin:0;border-radius:0}dialog[open]{display:flex}.modal-head{padding:14px 16px;min-height:65px}.modal-head h2{font-size:1.125rem}.modal-body{padding:17px 15px calc(22px + env(safe-area-inset-bottom));flex:1;min-height:0}.modal-body .panel{padding:16px}.modal-body form>.btn:last-child{width:100%;min-width:0;min-height:48px}.modal-body .order-form .submit-row{bottom:0}.public-header .inner{align-items:center}.public-header .public-links{gap:10px!important;justify-content:flex-start}.public-header .public-links a{font-size:.875rem}.public-main{padding:24px 15px 40px}.registration-wrap .page-head .btn{width:100%}.register-steps li{font-size:.875rem}
}
@media(max-width:380px){.topbar-title .breadcrumb{font-size:.875rem}.erp-shell .topbar{padding-inline:8px}.topbar-title{gap:4px}.erp-shell .language{max-width:111px}.erp-mobile-bottom{gap:0!important;padding-inline:3px!important}.metric{padding:14px 12px}.metric strong{font-size:1.7rem}.metrics-grid{gap:8px}.erp-shell .workspace{padding-inline:11px}.order-table tr{grid-template-columns:22px minmax(0,1fr) auto;gap:8px}.order-table td:nth-child(2){grid-column:2/-1;padding-right:0}.order-table td:nth-child(5){grid-column:3;grid-row:4}.order-table td:nth-child(7){grid-column:2/-1;grid-row:5;justify-self:end}}
@media(prefers-reduced-motion:reduce){.erp-shell .sidebar{transition:none}}
@media print{.erp-mobile-bottom,.nav-scrim,.skip-link{display:none!important}.erp-shell .main-area{margin:0}.erp-shell .topbar,.erp-shell .sidebar{display:none!important}.modal-body .form-actions,.settings-save{display:none!important}body.printing-public .workspace{display:block!important}body.printing-public .workspace>*{display:none!important}body.printing-public .workspace #tracking-result{display:block!important}.modal-body{overflow:visible;max-height:none}dialog[open]{display:block;height:auto;max-height:none;overflow:visible}.order-progress{break-inside:avoid}}

/* Local delivery grouping controls, shared by the admin and driver workspace. */
.erp-shell .pool-filters{display:grid;gap:16px;margin-bottom:20px;padding:20px}
.erp-shell .pool-modes{display:flex;gap:8px;flex-wrap:wrap}
.erp-shell .pool-modes .btn{min-height:44px;white-space:normal}
.erp-shell .pool-filter-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr));gap:14px}
.erp-shell .pool-filter-fields .field{min-width:0}
.erp-shell .pool-filter-fields select{width:100%;min-width:0}
.erp-shell .pool-summary{margin:0 0 18px;line-height:1.8;color:var(--muted,#64748b);overflow-wrap:anywhere}
.erp-shell .pool-place{padding:12px;border-radius:10px;background:#f1f6fb;margin:10px 0;overflow-wrap:anywhere}
.erp-shell .pool-place p{margin:4px 0 0;font-size:13px;color:#425975}
.erp-shell .pool-group>.section-head{gap:12px;flex-wrap:wrap}
.erp-shell .pool-group h2{overflow-wrap:anywhere}
@media(max-width:600px){.erp-shell .pool-modes .btn{flex:1 1 100px}.erp-shell .pool-filters{padding:16px}.erp-shell .pool-filter-fields{grid-template-columns:1fr}}
/* V2.4: mobile dispatch, reference prices and responsive feedback */
[hidden]{display:none!important}
.btn.is-busy{position:relative;cursor:progress;opacity:.8}
.btn.is-busy:before{content:'';display:inline-block;width:1em;height:1em;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:ruta-spin .7s linear infinite;flex-shrink:0}
@keyframes ruta-spin{to{transform:rotate(360deg)}}
.page-loading:before{content:'';position:fixed;inset:0 auto auto 0;height:3px;width:100%;background:linear-gradient(90deg,#ffb13d,#fff,#ffb13d);background-size:200%;animation:ruta-progress 1s linear infinite;z-index:9999}
@keyframes ruta-progress{to{background-position:-200% 0}}
.reference-price{display:flex;flex-direction:column;gap:4px;margin:10px 0;color:#263d55;font-size:.9rem;line-height:1.5;overflow-wrap:anywhere}
.reference-price strong{font-variant-numeric:tabular-nums;font-size:1.08em;color:#10243b}
.settlement-rule{font-size:.78rem;color:#6a5262;line-height:1.5}
.item-editor>.item-price{grid-column:1/-1}
#draft-price{padding:12px 16px;background:#f7f9fc;border:1px solid #dce4ee;border-radius:10px}
.deployment-notice{max-width:680px;margin:12px auto;overflow-wrap:anywhere;line-height:1.6}
.deployment-notice p{margin:8px 0}
#toast{max-width:min(520px,calc(100vw - 32px));font-size:1rem;line-height:1.5;overflow-wrap:anywhere;bottom:max(22px,env(safe-area-inset-bottom))}
.market-tabs{display:flex;align-items:center;gap:4px;border-bottom:1px solid #d9e2ef;margin:20px 0;position:relative}
.market-tabs .btn{border:0;background:transparent;border-radius:0;min-height:52px;color:#5d7085;font-weight:650}
.market-tabs .active{color:#a14d00;border-bottom:3px solid #f29724}
.market-tab-count{font-size:.8rem;background:#fff0da;color:#975007;padding:2px 7px;border-radius:12px}
.market-success{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px;background:#eaf8f0;color:#176a40}
.market-group{padding:0;background:none;border:0;box-shadow:none}
.market-group>.section-head h2{font-size:1.02rem;margin:0}
.market-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:18px;align-items:start}
.market-card{min-width:0;border:1px solid #dce5ef;background:#fff;border-radius:16px;overflow:hidden;box-shadow:0 4px 14px #19395708;padding:20px}
.market-card.suggested{border-color:#f3c888}
.market-meta{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:.73rem;color:#60768d;margin-bottom:20px}
.market-meta>span:first-child{font-weight:650;color:#324c65;margin-right:auto}
.market-select{padding:10px;margin:-10px -8px -10px 0;display:flex;align-items:center;min-width:44px;min-height:44px}
.market-select input{width:21px;height:21px;accent-color:#df7709}
.market-journey{display:grid;gap:24px;margin-bottom:18px}
.market-stop{display:grid;grid-template-columns:40px 1fr;position:relative;column-gap:10px;min-width:0}
.market-stop:before{content:'';position:absolute;left:18px;top:30px;bottom:-25px;border-left:1px dashed #c0ccd7}
.market-stop:last-child:before{display:none}
.market-stop>span{font-size:.65rem;background:#edf3fc;color:#345b89;align-self:start;text-align:center;border-radius:7px;padding:5px 2px;line-height:1.5}
.market-stop.dropoff>span{color:#9f5100;background:#fff1db}
.market-stop>strong{font-size:1.15rem;overflow-wrap:anywhere;align-self:center}
.market-stop>small{grid-column:2;color:#60758c;font-size:.78rem;line-height:1.5;margin-top:5px}
.market-spec{display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:.8rem;padding:12px 0;border-block:1px solid #edf1f6}
.market-spec>strong{color:#163451;font-size:1.12rem;margin-right:4px}
.market-spec>span{color:#52667c;padding:4px 8px;background:#f3f6fa;border-radius:6px}
.market-goods{padding:10px 0}
.market-goods p{display:grid;grid-template-columns:auto 1fr auto;gap:8px;font-size:.82rem;align-items:start;padding:6px 0;margin:0;overflow-wrap:anywhere}
.market-goods p strong{max-width:100px}
.market-goods p b{white-space:nowrap;font-weight:500}
.market-goods details summary{cursor:pointer;padding:10px 0;color:#40668a;font-size:.8rem}
.market-card footer{border-top:1px solid #edf1f6;padding-top:14px;display:flex;align-items:center;gap:14px;margin-top:12px}
.market-card footer>small{color:#6a7a8a;font-size:.72rem;line-height:1.5;flex:1}
.market-card .market-claim{min-width:124px;min-height:50px;font-size:1.03rem;border-radius:11px;background:#f7941d;color:#211506;border-color:#f7941d;font-weight:750}
.market-value-note{font-size:.7rem;margin:0}
.market-reason{display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:#fff4e4;color:#884500;font-size:.76rem;margin:-20px -20px 16px;padding:12px 20px}
.market-reason small{width:100%;font-size:.72rem}
.business-preview{border-top:1px solid #e2e8f0;margin-top:20px;padding-top:12px;grid-column:1/-1}
.business-preview summary{cursor:pointer;color:#456588;padding:10px 0;font-size:.87rem}
.business-preview .help{margin:10px 0}
.business-preview select{max-width:180px}
.translation-preview-item{border:1px solid #e1e8f0;padding:12px;border-radius:8px;margin:12px 0;overflow-wrap:anywhere}
.translation-preview-item p:first-child{font-size:.85rem;color:#66778a}
.translation-preview-item p{margin-bottom:8px}
@media(max-width:600px){
 .market-grid{grid-template-columns:1fr;gap:14px}
 .market-card{padding:16px;border-radius:13px}
 .market-reason{margin:-16px -16px 14px;padding:10px 16px}
 .market-tabs .btn{padding:10px 12px;font-size:.96rem}
 .market-group>.section-head{align-items:flex-start;gap:10px}
 .market-group>.section-head h2{font-size:.9rem;line-height:1.5}
 .market-meta{font-size:.67rem;margin-bottom:16px}
 .market-card .market-claim{min-width:108px}
 .market-stop>strong{font-size:1.07rem}
 .reference-price{font-size:.85rem}
 .settlement-rule{font-size:.74rem}
 .login-wrap .panel{padding:24px}
 .login-wrap h1{font-size:1.8rem}
 .login-wrap input{font-size:16px;min-height:48px}
 .login-wrap .help{font-size:.95rem;line-height:1.65}
 #toast{bottom:calc(82px + env(safe-area-inset-bottom))}
}
@media(prefers-reduced-motion:reduce){.btn.is-busy:before,.page-loading:before{animation:none}}

/* V2.5.1: shared layout corrections for every role and dialog. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scrollbar-gutter:stable}
body.modal-open{overflow:hidden}
.workspace,.modal-body{overflow-wrap:anywhere}
h1,h2,h3,.mono,.route-stop p,.detail-list p{overflow-wrap:anywhere}
input,select,textarea{min-width:0}
.btn .icon,.field .icon{flex-shrink:0}
.filter-form{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap}
.filter-form>.field{flex:1 1 180px}
.filter-form>input{flex:1 1 180px}
.filter-form>.btn{flex:0 0 auto;min-height:44px}
.search-box{min-width:0;flex:1 1 230px}
.search-box input{min-width:0;width:100%}
.search-box .btn{flex:0 0 auto;white-space:nowrap;min-height:44px}
.page-head>.row{flex-wrap:wrap}
.page-head h1{min-width:0}
.fixed-warehouse{display:grid;gap:4px;font-size:14px;max-width:100%}
.fixed-warehouse>span{color:var(--muted);font-size:12px}
.fixed-warehouse strong{font-weight:600;overflow-wrap:anywhere}
.address-location{border-top:1px solid var(--line);padding-top:8px}
.address-location summary{cursor:pointer;min-height:44px;display:flex;align-items:center;gap:8px;font-size:14px;color:#526985}
.address-location summary::before{content:'+';font-size:18px}
.address-location[open] summary::before{content:'−'}
.account-back{margin-bottom:12px}
.account-back .btn{min-height:44px;padding:7px 12px;font-size:14px}
.modal-head{gap:12px;flex:0 0 auto;padding-top:max(14px,env(safe-area-inset-top))}
.modal-head h2{min-width:0;line-height:1.35;overflow-wrap:anywhere}
.modal-head>.btn{flex-shrink:0;min-width:44px;min-height:44px}
.modal-body{overscroll-behavior:contain}
.modal-body .form-grid{min-width:0}
.detail-item .item-content{min-width:0;overflow-wrap:anywhere}
.detail-item .qty{overflow-wrap:anywhere;white-space:normal}
.check-label{min-height:44px;align-items:center;line-height:1.5}
.check-label input{flex-shrink:0}
.pager>.row{flex-wrap:wrap;justify-content:flex-end}
#toast{top:calc(12px + env(safe-area-inset-top));bottom:auto;z-index:10000;pointer-events:none}
@media(max-width:1000px){
 .erp-shell:not(.consumer-shell) .workspace{padding-bottom:calc(var(--bottom-bar-height,80px) + max(80px,var(--batch-bar-height,0px)) + 24px)}
 .erp-mobile-bottom .mobile-link{font-size:12px;line-height:1.3;min-height:48px}
 .erp-shell .erp-mobile-bottom{min-height:calc(64px + env(safe-area-inset-bottom));padding-block:4px calc(4px + env(safe-area-inset-bottom));box-shadow:none}
 .batch-bar,.order-form .submit-row,.settings-save{bottom:calc(var(--bottom-bar-height,80px) + 8px)}
 .modal-body .order-form .submit-row{bottom:0}
 .topbar-title{flex:1;min-width:0}
 .topbar-title>div{min-width:0}
 .topbar-tools{flex:0 0 auto}
 .topbar-tools .context-chip{display:none}
 .home-columns{grid-template-columns:minmax(0,1fr)}
 .route-card .route-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:760px){
 .page-head{gap:12px;margin-bottom:16px}
 .page-head>h1{flex:1 1 160px}
 .page-head>.row{gap:8px}
 .row.between{flex-wrap:wrap;gap:8px}
 .panel.stack{gap:14px}
 .list-toolbar{flex-wrap:wrap;gap:8px}
 .list-toolbar .search-box{flex-basis:100%}
 .tabs{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin}
 .tabs .tab{flex:0 0 auto;white-space:nowrap;min-height:44px}
 .table-wrap{max-width:100%;overflow-x:auto}
 .responsive-table td{overflow-wrap:anywhere}
 .responsive-table td[colspan]{display:block;min-width:0}
 .responsive-table td[colspan]::before{content:none}
 .responsive-table .cell-value{max-width:100%;overflow-wrap:anywhere}
 .responsive-table td .row{flex-wrap:wrap}
 .filter-form{gap:10px}
 #customer-order-search>.field:first-child{flex-basis:100%}
 #customer-order-search>.field:nth-child(2){flex:1 1 120px}
 #customer-search>.field{flex:1 1 150px}
 .field select,.field input{font-size:16px}
 .form-actions{flex-wrap:wrap}
 .form-actions .btn{flex:1 1 100px}
 .detail-item{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px}
 .detail-item>input[type=checkbox]{grid-column:1;grid-row:1;align-self:center;width:22px;height:22px;min-height:22px}
 .detail-item>.thumb{display:none}
 .detail-item .item-content{grid-column:2;grid-row:1}
 .detail-item .qty{grid-column:3;grid-row:1;font-size:16px;max-width:85px}
 .route-metrics{min-width:0}
 .route-metrics strong{overflow-wrap:anywhere;font-size:1.05rem}
 .route-stop .row{flex-wrap:wrap;gap:8px}
 .route-stop .btn{min-width:44px;min-height:44px}
 .public-header .inner{padding:12px 14px;gap:12px}
 .public-header .brand img{width:30px;height:30px}
 .public-header .brand b{font-size:22px}
 .public-header .brand small{font-size:12px}
 .public-links a{display:inline-flex;align-items:center;min-height:44px}
 .public-footer{flex-wrap:wrap;gap:8px}
 .register-steps{gap:8px;margin-bottom:16px}
 .register-steps li{font-size:13px;line-height:1.4;min-width:0;overflow-wrap:anywhere}
 .login-wrap .panel{padding:20px}
 dialog.narrow{height:auto;max-height:calc(100dvh - 16px);width:calc(100% - 16px);max-width:620px;margin:auto;border-radius:14px}
 dialog.narrow .modal-body{flex:0 1 auto}
 .batch-bar{position:fixed;border-radius:10px;max-height:40dvh;overflow-y:auto}
 .settings-jumps{position:static;flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding-bottom:4px}
 .settings-jumps a{flex:0 0 auto;min-height:44px}
 #toast{top:calc(8px + env(safe-area-inset-top));bottom:auto;font-size:14px}
}
@media(max-width:370px){
 .filter-form>input{flex-basis:140px}
 .detail-item{grid-template-columns:22px minmax(0,1fr);gap:8px}
 .detail-item .qty{grid-column:2;grid-row:2;max-width:none}
 .route-card .route-metrics{gap:10px}
 .erp-shell .breadcrumb{font-size:13px}
 .topbar-title{gap:4px}
 .erp-shell .language{max-width:106px}
 .modal-body{padding-inline:12px}
}
@media print{body.modal-open{overflow:visible}.account-back{display:none}.detail-item>.thumb{display:flex}.tabs{overflow:visible;flex-wrap:wrap}}

@media(max-width:760px){
 .detail-item{grid-template-columns:48px minmax(0,1fr);gap:6px 10px;align-items:start}
 .detail-item>.thumb,.detail-item>.thumb.large{display:flex;grid-column:1;grid-row:1/3;width:48px;height:56px;min-width:0;border-radius:7px;object-fit:cover}
 .detail-item .item-content{grid-column:2;grid-row:1}
 .detail-item .qty{grid-column:2;grid-row:2;max-width:none;font-size:16px}
 .detail-item.with-check{grid-template-columns:22px 48px minmax(0,1fr)}
 .detail-item.with-check>input[type=checkbox]{grid-column:1;grid-row:1/3;align-self:center}
 .detail-item.with-check>.thumb{grid-column:2;grid-row:1/3}
 .detail-item.with-check .item-content{grid-column:3;grid-row:1}
 .detail-item.with-check .qty{grid-column:3;grid-row:2}
}

#modal-toast{position:sticky;top:0;z-index:30;padding:12px 14px;margin:0 0 14px;border:1px solid #b8d8c5;border-radius:8px;background:#ecf8f0;color:#215d3c;font-size:14px;line-height:1.5;overflow-wrap:anywhere}
#modal-toast.error{border-color:#edb7b7;background:#fff0f0;color:#a52f2f}
#modal-toast:empty{display:none}
