/* Scoped to company administrators. Delivery screens keep their existing layout. */
body.ey-company .ew-date{display:flex;gap:6px;align-items:center;margin:4px 0 14px;flex-wrap:wrap}
body.ey-company .ew-date label{display:flex;flex:1;align-items:center;gap:8px;margin:0;font-size:15px;font-weight:700}
body.ey-company .ew-date input{flex:1;min-width:132px;max-width:180px;font-size:16px;min-height:44px;padding:8px;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:10px}
body.ey-company .ew-date .rbtn{min-width:44px;min-height:44px;padding:8px}
body.ey-company .ew-main-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
body.ey-company .ew-main-actions .btn{font-size:15px;min-height:48px;padding:10px 8px}
body.ey-company .ew-hint{font-size:13px;line-height:1.45;color:var(--muted);margin:8px 0 12px}
body.ey-company .ew-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:16px 0}
body.ey-company .ew-stats button{min-height:72px;display:flex;flex-direction:column;gap:5px;justify-content:center;align-items:center;background:var(--surface);border:1px solid var(--line);border-radius:12px;color:var(--ink);font:inherit;padding:8px 3px}
body.ey-company .ew-stats b{font-size:22px}body.ey-company .ew-stats span{font-size:12px;line-height:1.3}
body.ey-company .ew-section-title{font-size:19px;line-height:1.3;margin:18px 0 10px}
body.ey-company .ew-route-card{border:1px solid var(--line);background:var(--surface);border-radius:14px;padding:12px;margin-bottom:10px}
body.ey-company .ew-route-open{display:grid;gap:5px;text-align:left;width:100%;border:0;padding:0 0 10px;background:none;color:var(--ink);font:inherit;cursor:pointer}
body.ey-company .ew-route-open strong{font-size:18px;overflow-wrap:anywhere}
body.ey-company .ew-route-open span{font-size:14px}
body.ey-company .ew-route-open small{font-size:13px;color:var(--muted);line-height:1.4}
body.ey-company .ew-route-open>b{font-size:14px;color:var(--action,var(--blue));padding-top:5px}
body.ey-company .ew-route-foot,body.ey-company .ew-route-tools{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}
body.ey-company .ew-route-foot .rbtn,body.ey-company .ew-route-tools .rbtn,body.ey-company .ew-route-tools .btn{font-size:14px;min-height:44px;padding:9px 6px;white-space:normal;overflow-wrap:anywhere;justify-content:center;text-align:center}
body.ey-company .ew-whatsapp{background:var(--ok-soft,var(--surface));color:var(--ink);border-color:var(--line)}
body.ey-company .ew-cash-link{display:block;width:100%;min-height:44px;margin:14px 0;text-align:center}
body.ey-company .ew-empty{padding:20px 12px;border:1px dashed var(--line);border-radius:12px;line-height:1.5;color:var(--muted)}
body.ey-company .ew-finance{margin:20px 0;border-top:1px solid var(--line);padding-top:10px}
body.ey-company .ew-finance>summary{min-height:44px;cursor:pointer;font-size:14px;font-weight:650;padding:10px 0}
body.ey-company .ew-filter{padding:12px;border:1px solid var(--line);border-radius:12px;margin-bottom:16px;background:var(--surface)}
body.ey-company .ew-filter-row{display:grid;gap:5px;width:100%;text-align:left;border:0;border-top:1px solid var(--line);background:transparent;color:var(--ink);padding:12px 0;font:inherit}
body.ey-company .ew-filter-row span,body.ey-company .ew-filter-row small{font-size:13px}
body.ey-company.ey-company-index #v-ruta>:not(#ey-company-routes){display:none!important}
body.ey-company #ey-company-home[hidden],body.ey-company #ey-company-routes[hidden],body.ey-company #ey-company-route-head[hidden],body.ey-company #ey-company-cash[hidden]{display:none!important}
body.ey-company.ey-company-route #r-top,body.ey-company.ey-company-route #r-chips,body.ey-company.ey-company-route #ey-admin-tools,body.ey-company.ey-company-route #r-admin-nav,body.ey-company.ey-company-route #r-admin-cab:not(.ew-show-management),body.ey-company.ey-company-route #ruta .acc2{display:none!important}
body.ey-company .ew-route-heading{display:flex;align-items:center;gap:8px;margin:4px 0 12px}
body.ey-company .ew-route-heading>div{flex:1;min-width:0}
body.ey-company .ew-route-heading h2{margin:0 0 3px;font-size:19px;line-height:1.3;overflow-wrap:anywhere}
body.ey-company .ew-route-heading small{color:var(--muted);font-size:12px}
body.ey-company .ew-route-heading>.rbtn{min-width:44px;min-height:44px;padding:8px;font-size:14px}
body.ey-company .ew-route-tools{margin-bottom:8px}
body.ey-company.ey-company-route #r-mapa-wrap .mapa-caja:not(.full){height:clamp(180px,28dvh,260px)!important;min-height:180px}
body.ey-company.ey-company-route #r-mapa-wrap .gm-pro-tabs,body.ey-company.ey-company-route #r-mapa-wrap .gm-pro-state,body.ey-company.ey-company-route #r-mapa-wrap .gm-route-legend{display:none!important}
body.ey-company.ey-company-route #r-mapa-wrap>.gm-pro-summary{position:static!important;max-width:none!important;width:auto!important;margin:0!important;transform:none!important;border:0!important;border-radius:0!important;padding:8px!important}
body.ey-company.ey-company-route #r-mapa-wrap .gm-driver-card{display:none!important}
body.ey-company.ey-company-route #ruta .ruta-hoja>h3{font-size:17px;margin-bottom:5px}
body.ey-company.ey-company-route #ruta .ruta-hoja>.note{font-size:12px}
body.ey-company #ruta .ew-order-description{margin:7px 0;color:var(--muted);font-size:14px;line-height:1.4}
body.ey-company #ruta .ew-order-actions{display:flex;gap:6px}
body.ey-company #ruta .ew-order-actions .rbtn{flex:1;min-width:0;min-height:44px;padding:8px 4px;font-size:13px;justify-content:center;text-align:center}
body.ey-company #ruta .ew-order-extra{margin-top:8px;border-top:1px solid var(--line)}
body.ey-company #ruta .ew-order-extra>summary{min-height:44px;display:flex;align-items:center;font-size:13px;cursor:pointer;color:var(--muted)}
.ew-sheet{z-index:160}.ew-sheet .panel{max-height:90dvh;overflow-y:auto;padding-bottom:calc(20px + env(safe-area-inset-bottom,0px))}
.ew-sheet label{display:block;margin:14px 0 6px;font-size:14px;font-weight:650}.ew-sheet input,.ew-sheet select{width:100%;font-size:16px;min-height:48px;background:var(--field,var(--surface));color:var(--ink);border:1px solid var(--line);border-radius:10px;padding:10px}
.ew-sheet .panel>button.btn.pri{width:100%;margin-top:16px;min-height:48px}
.ew-sheet .ew-load-choices{display:grid;gap:10px;margin-top:18px}.ew-sheet .ew-load-choices button{font-size:16px;min-height:48px}
.ew-sheet .ew-route-choice{display:grid;gap:6px;text-align:left;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:12px;padding:14px;width:100%;margin:8px 0;font:inherit;min-height:64px}
.ew-sheet .ew-route-choice small{font-size:13px;color:var(--muted)}

/* La cuadrícula antigua no debe dividir los nuevos encabezados. */
body.ey-company #ey-company-routes,body.ey-company #ey-company-route-head,body.ey-company #ey-company-cash{grid-column:1 / -1;min-width:0;width:100%}
body.ey-company header.top{display:flex!important;align-items:center;gap:8px;margin:0 0 10px}
body.ey-company header.top .cab-fila{flex:1;min-width:0;display:flex;gap:8px;align-items:center}
body.ey-company header.top .cab-titulo{flex:1;min-width:0;padding-right:0}
body.ey-company header.top h1{font-size:24px}
body.ey-company header.top .emp-nombre{font-size:13px;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.ey-company header.top .cab-pills{position:static;display:flex;gap:5px;flex:none;margin:0}
body.ey-company header.top .cab-pills .rbtn{min-width:44px;min-height:44px;height:44px;padding:0 8px}
body.ey-company.ey-company-route header.top h1,body.ey-company.ey-company-route #app-volver,body.ey-company.ey-company-route #inst-aviso,body.ey-company.ey-company-route #ey-admin-route-actions{display:none!important}
.ew-sheet .panel>button.btn.sec:not(:first-child){width:100%;margin-top:10px;min-height:48px}
/* Override the older admin map sizing, including its important minimum. */
body.ey-company.ey-company-route.ruta-admin:not(.indep):not(.del-activa):has(#v-ruta:not([hidden])) #r-mapa-wrap .mapa-caja:not(.full){height:clamp(180px,28dvh,260px)!important;min-height:180px!important;max-height:260px!important}

body.ey-company .ew-route-delete{display:block;min-height:44px;padding:10px 0;margin-top:4px;color:var(--muted);font-size:13px}

/* Caja muestra controles contables, sin la barra de despacho de Rutas. */
body.ey-company.ruta-admin.modo-caja:not(.indep):not(.del-activa):has(#v-ruta:not([hidden])) #ey-admin-tools{display:none!important}
body.ey-company.modo-caja #ey-company-cash{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 8px}
body.ey-company.modo-caja .ew-cash-note{font-size:13px;line-height:1.45;color:var(--muted);margin:4px 0}
body.ey-company.modo-caja #ey-company-cash .rbtn{min-height:44px;font-size:14px}
body.ey-company.modo-caja #r-optim,body.ey-company.modo-caja #r-nueva{display:none!important}
body.ey-company.modo-caja #p2-nr-btn,body.ey-company.modo-caja #r-gps-aviso,body.ey-company.modo-caja #r-plan-aviso,body.ey-company.modo-caja #jornada{display:none!important}
