/* MotoPed 0.1.77 — Home compacta, cabeçalho com data e Pedidos.
   Os 3 blocos continuam: sidebar, cabeçalho e única superfície de trabalho.
   Scroll vertical SOMENTE dentro de .mp-content-scroll. */
html,body.mp-body{height:100%;overflow:hidden!important}
.mp-app{height:100dvh;max-height:100dvh;overflow:hidden}
body.admin-bar.mp-body .mp-app{height:calc(100dvh - var(--mp-admin-offset));max-height:calc(100dvh - var(--mp-admin-offset))}
.mp-main,.mp-content,.mp-content-scroll,.mp-workspace{min-height:0;min-width:0}
.mp-content-scroll{overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}
.mp-live-date{display:flex;align-items:center;gap:7px;flex:0 0 auto;margin-left:auto;white-space:nowrap;color:#d5e4f5;font-size:12px}
.mp-live-date>svg{flex:none;color:#9cc6e8}.mp-live-date strong{font-size:12px;color:#fff;font-weight:600}.mp-date-short{display:none}
.mp-body .mp-topbar-start{flex:1 1 auto}.mp-body .mp-topbar .wb-global-search{width:min(100%,310px);flex-basis:310px}
/* Dashboard: não há quarto bloco, estes cards pertencem à área de trabalho. */
.mp-content-dashboard .mp-content-scroll{padding:clamp(12px,1.25vw,18px)!important;margin:4px!important}
.mp-content-dashboard .mp-workspace{max-width:100%!important;width:100%;display:block!important}
.mp-home-compact{width:100%;display:flex;flex-direction:column;gap:10px;color:var(--mp-strong);font-size:12px}
.mp-home-compact *{min-width:0}
.mp-home-hello{display:flex;align-items:center;gap:12px;padding:1px 5px 3px}
.mp-home-greeting-icon{width:35px;height:35px;flex:none;display:grid;place-items:center}
.mp-home-greeting-icon svg{width:29px;height:29px;stroke-width:1.75}
.mp-home-greeting-icon.is-sun{color:#ff990f}.mp-home-greeting-icon.is-moon{color:#7575e6}
.mp-home-hello h1{font-size:clamp(18px,1.65vw,23px);line-height:1.25;font-weight:700;letter-spacing:-.5px;margin:0;color:var(--mp-strong)}
.mp-home-hello p{margin:3px 0 0;color:var(--mp-muted);font-size:12px;line-height:1.3}
.mp-home-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.mp-home-metric{min-width:0;display:flex;align-items:center;gap:9px;padding:11px 12px;border-radius:13px;background:var(--mp-raised);box-shadow:var(--mp-card-shadow);color:var(--mp-strong);text-decoration:none!important;min-height:70px}
.mp-home-metric:hover,.mp-home-shortcut-grid a:hover,.mp-home-company:hover,.mp-home-order:hover{background:var(--mp-raised-hover)}
.mp-home-metric-icon{flex:none;display:grid;place-items:center;width:35px;height:35px;border-radius:10px;color:#078dce;background:#dceefa}
.mp-home-metric-icon svg{width:19px;height:19px}
.mp-home-metric-1 .mp-home-metric-icon{background:#fff0df;color:#fa8220}
.mp-home-metric-2 .mp-home-metric-icon{background:#e8e4ff;color:#675cd6}
.mp-home-metric-3 .mp-home-metric-icon{background:#dbf9ef;color:#16a78a}
.mp-home-metric-copy{display:flex;flex-direction:column;gap:1px;overflow:hidden}
.mp-home-metric-copy small{color:var(--mp-muted);font-size:12px;line-height:1.25;overflow-wrap:anywhere}
.mp-home-metric-copy strong{font-size:clamp(17px,1.65vw,23px);font-weight:700;letter-spacing:-.4px;color:var(--mp-strong);line-height:1.3;white-space:nowrap}
.mp-home-metric-3 strong{font-size:clamp(15px,1.5vw,21px)}
.mp-home-arrow{font-size:23px;margin-left:auto;flex:none;color:var(--mp-muted);line-height:1}
.mp-home-grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(265px,.85fr);gap:10px;align-items:start}
.mp-home-col{display:flex;flex-direction:column;gap:10px}
.mp-home-card{background:var(--mp-raised);color:var(--mp-strong);box-shadow:var(--mp-card-shadow);border-radius:14px;padding:12px 13px;margin:0}
.mp-home-card-head{display:flex;align-items:center;justify-content:space-between;gap:7px;margin-bottom:9px}
.mp-home-card-head h2{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:700;margin:0;color:var(--mp-strong)}
.mp-home-card-head h2 svg{width:18px;height:18px;flex:none;color:#049cc7}
.mp-home-card-head a{font-size:12px;color:var(--mp-accent-strong);white-space:nowrap}
.mp-home-period{font-size:12px;color:var(--mp-muted);padding:3px 8px;border-radius:8px;background:var(--mp-surface)}
.mp-home-table{min-width:0}.mp-home-table-head,.mp-home-order{display:grid;grid-template-columns:100px minmax(0,1fr) 72px 83px 88px;align-items:center;gap:8px;min-width:0;padding:7px 9px}
.mp-home-table-head{background:var(--mp-surface);border-radius:9px;font-size:12px;color:var(--mp-muted)}
.mp-home-order{min-height:37px;font-size:12px;line-height:1.3;color:var(--mp-strong);border-bottom:1px solid var(--mp-line)}
.mp-home-order:last-child{border-bottom:0}.mp-home-order>*{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mp-home-order strong,.mp-home-order b{font-size:12px;font-weight:700}.mp-home-order b{text-align:right}
.mp-home-pill{justify-self:start;padding:4px 7px;border-radius:20px;font-size:12px;background:#e4ecf9;color:#1477be;font-weight:600}
.mp-home-pill.status-draft{background:#fff1db;color:#a96910}.mp-home-pill.status-sent{background:#def7eb;color:#06785a}
.mp-home-commercial-grid{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:9px}
.mp-home-day-amount{display:flex;flex-direction:column;justify-content:center;gap:4px;background:var(--mp-surface);border-radius:11px;padding:12px}
.mp-home-day-amount small{font-size:12px;color:var(--mp-muted)}.mp-home-day-amount strong{font-size:clamp(18px,1.75vw,25px);line-height:1.22;color:var(--mp-strong)}
.mp-home-statuses{background:var(--mp-surface);border-radius:11px;padding:6px 12px}
.mp-home-statuses>div{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 0;border-bottom:1px solid var(--mp-line);font-size:12px}
.mp-home-statuses>div:last-child{border-bottom:0}.mp-home-statuses span{color:var(--mp-muted)}.mp-home-statuses b{font-size:12px}
.mp-home-yesterday{margin-top:9px;border-radius:9px;background:var(--mp-surface);padding:7px 10px;display:flex;align-items:center;gap:8px;color:var(--mp-muted);font-size:12px}
.mp-home-yesterday svg{width:16px;height:16px;color:#449cce}.mp-home-yesterday strong{margin-left:auto;color:var(--mp-strong)}
.mp-home-shortcut-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.mp-home-shortcut-grid a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;text-align:center;padding:11px 4px;min-height:67px;background:var(--mp-surface);box-shadow:0 1px 5px rgba(12,43,68,.035);border-radius:10px;color:var(--mp-strong);font-size:12px;font-weight:600;line-height:1.25}
.mp-home-shortcut-grid svg{width:19px;height:19px;color:#0093cb}
.mp-home-company{display:flex;align-items:center;gap:9px;padding:6px 2px;color:var(--mp-strong);border-bottom:1px solid var(--mp-line)}
.mp-home-company:last-child{border:0}.mp-home-company-avatar{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:linear-gradient(135deg,#fc7a31,#fa4f32);color:white;font-size:12px;font-weight:700;flex:none}
.mp-home-company:nth-child(3) .mp-home-company-avatar{background:linear-gradient(135deg,#02b8de,#5360f7)}
.mp-home-company>span:nth-child(2){display:flex;flex-direction:column;flex:1;gap:2px}
.mp-home-company strong{font-size:12px;font-weight:700}.mp-home-company small{font-size:12px;color:var(--mp-muted)}.mp-home-company>b{font-size:12px;white-space:nowrap}.mp-home-company>span:last-child{font-size:17px;color:var(--mp-muted)}
.mp-home-empty{color:var(--mp-muted);font-size:12px;margin:8px 0}
/* Pedidos: manter id/atributos nativos, sem substituir regras comerciais ou offline. */
.mp-content-orders .mp-title-row{margin-bottom:12px}.mp-content-orders .mp-title-row h1{font-size:24px}
.mp-content-orders .mp-workspace{max-width:100%!important}
.mp-content-orders .wb-orders-current{padding:14px}
.mp-content-orders .mp-local-ordercontrols .mp-btn{min-height:36px;width:auto;flex:0 1 auto;padding:7px 11px;font-size:12px}
.wb-order-dialog{width:min(1160px,calc(100vw - 18px));max-height:calc(100dvh - 24px);border-radius:17px}
.wb-order-dialog .wb-order-workflow{padding:14px 17px}
.wb-order-dialog .mp-order-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(210px,.33fr);gap:12px;align-items:start}
.wb-order-dialog .mp-order-main,.wb-order-dialog .mp-order-aside{min-width:0}
.wb-order-dialog .mp-order-main>.wb-step-content{min-width:0}
.wb-order-dialog .wb-order-steps{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin:8px 0 13px;align-items:start}
.wb-order-dialog .wb-order-step{position:relative;isolation:isolate;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:6px;min-height:72px;max-width:100%;padding:3px 3px 0!important;background:transparent;color:var(--mp-muted);box-shadow:none;border:0;border-radius:11px;font-size:12px;overflow-wrap:anywhere}
.wb-order-dialog .wb-order-step::after,.wb-order-dialog .wb-order-step::before{content:'';position:absolute;left:calc(50% + 18px);width:calc(100% - 36px);height:3px;border-radius:999px;pointer-events:none}
.wb-order-dialog .wb-order-step::after{top:18px;background:#d8e4ef;z-index:0}
.wb-order-dialog .wb-order-step::before{top:18px;background:linear-gradient(90deg,#f8782a,#ff9b43);transform:scaleX(0);transform-origin:left center;transition:transform .95s cubic-bezier(.22,.61,.36,1);z-index:1}
.wb-order-dialog .wb-order-step:last-child::after,.wb-order-dialog .wb-order-step:last-child::before{display:none}
.wb-order-dialog .wb-order-step .mp-icon{position:relative;z-index:2;width:27px;height:27px;padding:5px;box-sizing:content-box;border-radius:50%;background:var(--mp-raised);box-shadow:var(--mp-card-shadow);transition:background .35s ease,color .35s ease,transform .45s ease}
.wb-order-dialog .wb-order-step.is-active{background:transparent;color:var(--mp-accent-strong)}
.wb-order-dialog .wb-order-step.is-active .mp-icon{background:#f8782a;color:#fff;transform:scale(1.02)}
.wb-order-dialog .wb-order-step.is-complete{color:var(--mp-accent-strong)}
.wb-order-dialog .wb-order-step.is-complete .mp-icon{background:#f8782a;color:#fff}
.wb-order-dialog .wb-order-step.is-complete::before{transform:scaleX(1)}
.wb-order-dialog .wb-order-step span{line-height:1.2;text-align:center}
.wb-order-dialog .mp-order-aside{display:flex;flex-direction:column;gap:9px}
.wb-order-dialog .mp-order-summary-card,.wb-order-dialog .mp-order-help{padding:12px;background:var(--mp-raised);border-radius:13px;box-shadow:var(--mp-card-shadow)}
.wb-order-dialog .mp-order-aside h3{display:flex;align-items:center;gap:7px;font-size:12px;margin:0 0 9px;color:var(--mp-strong)}
.wb-order-dialog .mp-order-aside h3 svg{width:17px;height:17px;color:var(--mp-accent-strong)}
.wb-order-dialog .mp-order-aside dl{margin:0}
.wb-order-dialog .mp-order-aside dl>div{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding:8px 0;border-top:1px solid var(--mp-line)}
.wb-order-dialog .mp-order-aside dt{font-size:12px;color:var(--mp-muted)}.wb-order-dialog .mp-order-aside dd{font-size:12px;font-weight:700;margin:0;text-align:right;max-width:60%;overflow-wrap:anywhere}
.wb-order-dialog .mp-order-help p{font-size:12px;color:var(--mp-muted);line-height:1.55;margin:0}
.wb-order-dialog .mp-local-orderbar{padding:10px 12px;margin:7px 0}
.wb-order-dialog .mp-local-ordercontrols button{font-size:12px!important;min-height:37px!important;padding:7px 10px!important;flex:0 1 auto;width:auto}
.wb-order-dialog .wb-order-actions .mp-btn{font-size:12px!important;min-height:38px!important;padding:8px 13px!important;width:auto;flex:0 1 auto}
.wb-order-dialog .wb-order-actions #wb-order-next{background:#f8782a!important;color:#fff!important}
@media(max-width:1250px){
 .mp-live-date .mp-date-long{display:none}.mp-live-date .mp-date-short{display:inline}
 .mp-body .mp-topbar .wb-global-search{flex-basis:265px}
 .mp-home-table-head,.mp-home-order{grid-template-columns:82px minmax(0,1fr) 62px 76px 80px;gap:6px}
}
@media(max-width:1040px){
 .mp-home-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
 .mp-home-grid{grid-template-columns:1fr}
 .mp-home-col{display:contents}
 .mp-home-shortcuts{order:1}.mp-home-recent{order:2}.mp-home-commerce{order:3}.mp-home-companies{order:4}
 .wb-order-dialog .mp-order-layout{grid-template-columns:minmax(0,1fr)}
 .wb-order-dialog .mp-order-aside{display:grid;grid-template-columns:1fr 1fr;gap:8px}
}
@media(max-width:750px){
 .mp-live-date{gap:4px;margin-left:auto;font-size:12px}.mp-live-date>svg{display:none}
 .mp-body .mp-topbar{gap:6px}
 .mp-live-date .mp-date-short{display:inline}
 .mp-body .mp-topbar .wb-global-search{flex-basis:0}
 .mp-content-dashboard .mp-content-scroll{padding:12px 10px!important}
 .mp-home-hello{gap:9px}.mp-home-greeting-icon{width:29px;height:29px}.mp-home-greeting-icon svg{width:26px;height:26px}
 .mp-home-hello h1{font-size:19px}
 .mp-home-compact{gap:9px}
 .mp-home-metric{min-height:67px;padding:10px 8px;gap:7px}
 .mp-home-metric-icon{width:28px;height:28px}.mp-home-metric-icon svg{width:17px;height:17px}
 .mp-home-metric-copy strong{font-size:17px}.mp-home-metric-3 strong{font-size:15px}
 .mp-home-arrow{display:none}
 .wb-order-dialog{width:calc(100vw - 12px);max-height:calc(100dvh - 12px)}
 .wb-order-dialog .wb-order-workflow{padding:10px}
 .wb-order-dialog .wb-order-steps{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
 .wb-order-dialog .wb-order-step{min-width:0!important;flex:none!important;min-height:58px;padding-top:1px!important}
 .wb-order-dialog .wb-order-step::after,.wb-order-dialog .wb-order-step::before{top:13px;left:calc(50% + 15px);width:calc(100% - 30px)}
 .wb-order-dialog .wb-order-step:nth-child(3n)::after,.wb-order-dialog .wb-order-step:nth-child(3n)::before{display:none}
 .wb-order-dialog .wb-order-step .mp-icon{width:20px;height:20px}
 .wb-order-dialog .mp-order-aside{grid-template-columns:1fr}
 .wb-order-dialog .mp-order-help{display:none}
 .wb-order-dialog .wb-order-actions{gap:7px}
 .wb-order-dialog .wb-order-actions .mp-btn{min-width:0!important}
}
@media(max-width:430px){
 .mp-live-date .mp-date-short{font-size:12px}.mp-live-date strong{font-size:12px}
 .mp-home-metrics{gap:7px}.mp-home-metric-copy small{font-size:12px}.mp-home-metric-copy strong{font-size:16px}.mp-home-metric-3 strong{font-size:14px}
 .mp-home-metric-icon{display:none}
 .mp-home-card{padding:11px 9px}.mp-home-table-head{display:none}
 .mp-home-order{grid-template-columns:84px minmax(0,1fr) 68px;gap:5px;font-size:12px}
 .mp-home-order>span:nth-child(3),.mp-home-order>span:nth-child(4){display:none}
 .mp-home-order b{font-size:12px}
 .mp-home-commercial-grid{grid-template-columns:1fr}
 .mp-home-day-amount strong{font-size:20px}
 .mp-home-shortcut-grid a{min-height:58px;padding:8px 2px}
 .mp-home-hello p{font-size:12px}
 .mp-home-yesterday{flex-wrap:wrap}.mp-home-yesterday strong{margin-left:auto}
}
/* Em telas estreitas a data fica na segunda linha DO MESMO cabeçalho,
   sem espremer/ocultar pesquisa, ações rápidas ou perfil. */
@media(max-width:760px){
 .mp-body .mp-topbar{align-content:center;row-gap:0!important}
 .mp-body .mp-topbar .mp-live-date{order:5;flex:0 0 100%;width:100%;height:21px;min-height:21px;justify-content:flex-end;margin-left:0;padding:0 4px;line-height:1.2}
 .mp-body .mp-topbar .mp-live-date>svg{display:block;width:13px;height:13px}
 .mp-body .mp-topbar .mp-live-date .mp-date-long{display:none}
 .mp-body .mp-topbar .mp-live-date .mp-date-short{display:inline}
}
/* O editor de pedidos usa agora a própria terceira superfície do MotoPed:
   a sidebar e o cabeçalho nunca desaparecem atrás de um modal. */
.mp-content-orders .mp-workspace:has(.wb-order-inline){max-width:100%!important}
.mp-content-orders .wb-order-dialog.wb-order-inline{
 position:relative!important;inset:auto!important;display:block!important;
 width:100%!important;max-width:100%!important;max-height:none!important;
 margin:0!important;overflow:visible!important;box-shadow:none!important;
 border:0!important;border-radius:0!important;background:transparent!important;
}
.mp-content-orders .wb-order-inline .wb-order-workflow{padding:8px 2px!important;margin:0!important;background:transparent!important}
.mp-content-orders .wb-order-inline .wb-order-workflow>.mp-sectionhead{position:relative!important;top:auto!important;z-index:1;background:transparent!important}
.mp-content-orders .wb-order-inline .mp-order-main{background:var(--mp-raised);padding:14px;border-radius:15px;box-shadow:var(--mp-card-shadow);min-height:290px}
.mp-content-orders .wb-order-inline .mp-order-main>.wb-step-content{min-height:220px}
.mp-content-orders .wb-order-inline .mp-local-orderbar{background:var(--mp-raised)}
.mp-content-orders .wb-order-inline .wb-order-actions{margin-top:22px}
@media(max-width:750px){.mp-content-orders .wb-order-inline .mp-order-main{padding:12px;min-height:210px}}

/* v0.1.94 — pedidos finalizados priorizam os documentos, sem reiniciar o assistente. */
.mp-content-orders .wb-order-is-final .wb-order-steps,
.mp-content-orders .wb-order-is-final .mp-order-layout{display:none!important}
.mp-content-orders .wb-order-is-final .wb-order-export{margin-top:0!important}
.mp-content-orders .wb-order-final-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.mp-content-orders .wb-order-header-trash{margin-left:auto;display:flex;align-items:center}
.mp-content-orders .wb-final-trash{display:flex;align-items:center;justify-content:flex-end}
.mp-content-orders :is(.wb-order-header-trash,.wb-final-trash) .mp-btn{min-height:32px!important}

.mp-content-orders .wb-final-top-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
