/* MotoPed 0.1.69 - primeira etapa da padronização visual aprovada.
   Cabeçalho compartilhado + Representadas (lista, cadastro, edição).
   Mantém intactos sidebar, dados, formulários legados, permissões e offline. */
.mp-visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
/* Bloco do cabeçalho: independente da sidebar e da área de conteúdo. */
.mp-body .mp-topbar{
  display:flex;flex-wrap:nowrap;align-items:center;gap:12px;min-width:0;
  min-height:71px;padding:10px clamp(13px,1.8vw,24px);
  border-radius:19px;
  background:linear-gradient(115deg,#102b50,#091c38)!important;
  color:#fff!important;
  box-shadow:0 12px 27px rgba(17,47,71,.11),0 2px 5px rgba(17,47,71,.035);
  -webkit-backdrop-filter:none;backdrop-filter:none;
}
.mp-body .mp-topbar-start{display:flex;align-items:center;flex:1 1 auto;min-width:0;width:auto;gap:12px;order:0}
.mp-topbar-wordmark{display:inline-flex;align-items:center;flex:none;gap:0;font-size:20px;font-weight:700!important;letter-spacing:-.65px;color:white!important;white-space:nowrap;text-decoration:none!important;line-height:1.1}
.mp-topbar-wordmark>span{color:#fa7a2a}
.mp-topbar-wordmark small{font-size:12px;color:#b6c6d9;letter-spacing:0;font-weight:400;border-left:1px solid #395572;padding-left:11px;margin-left:11px}
.mp-body .mp-topbar .wb-global-search{width:min(100%,360px);flex:0 1 360px;margin-left:auto;min-width:0;position:relative;order:5}
.mp-body .mp-topbar .wb-search-field{min-height:39px;padding:0 12px;gap:8px;border-radius:12px;background:#1c3b5b!important;color:#c6dceb!important;box-shadow:inset 0 0 0 1px rgba(176,213,243,.17)!important}
.mp-body .mp-topbar .wb-search-field input{background:transparent!important;color:#fff!important;font-size:12px!important;box-shadow:none!important;min-height:38px;padding:0!important}
.mp-body .mp-topbar .wb-search-field input::placeholder{color:#c8d8e5!important}
.mp-body .mp-topbar .wb-search-field .mp-icon{width:17px;height:17px}
.mp-body .mp-topbar .wb-search-field:focus-within{box-shadow:inset 0 0 0 1px #7dbce0!important}
.mp-topbar-search-toggle{display:none;align-items:center;justify-content:center;width:36px;height:36px;flex:0 0 36px;border:0;border-radius:10px;background:rgba(255,255,255,.08);color:#eef8ff;padding:0}
.mp-topbar-search-toggle .mp-icon{width:18px;height:18px}
.mp-body .mp-topbar .wb-top-shortcuts{flex:none;min-width:0;width:auto;order:1;margin:0;display:flex;align-items:center}
.mp-body .mp-topbar .wb-quick-actions>summary.mp-quick-icon{display:grid!important;place-items:center!important;min-width:39px;width:39px;height:39px;min-height:39px;padding:0!important;border:0!important;border-radius:11px;background:#f8782a!important;color:#fff!important;box-shadow:0 3px 10px rgba(0,0,0,.12)}
.mp-body .mp-topbar .wb-quick-actions>summary.mp-quick-icon:hover{background:#ff8a37!important}
.mp-body .mp-topbar .wb-quick-menu{right:0;left:auto;top:calc(100% + 10px);width:min(260px,calc(100vw - 25px));background:var(--mp-surface);color:var(--mp-ink);box-shadow:0 19px 40px rgba(5,30,58,.23);border-radius:14px;padding:7px;z-index:90}
.mp-body .mp-topbar .wb-quick-menu a,.mp-body .mp-topbar .wb-quick-menu button{font-size:12px;min-height:41px;display:flex;gap:9px;align-items:center;width:100%;text-align:left;background:transparent;color:var(--mp-ink);border:0;border-radius:9px;padding:9px 11px;cursor:pointer;text-decoration:none}
.mp-body .mp-topbar .wb-quick-menu :is(a,button):hover{background:var(--mp-raised-hover)}
.mp-body .mp-topbar .mp-topbar-actions{display:flex;order:2;min-width:0;flex:none;width:auto;gap:0;margin:0}
.mp-body .mp-topbar .wb-profile-dropdown>summary{color:#fff;padding:3px 5px;min-height:39px;gap:7px}
.mp-body .mp-topbar .wb-profile-dropdown>summary .mp-top-avatar{display:grid!important;width:34px;height:34px;border-radius:50%;flex:0 0 34px;background:#547bc0;color:#fff;overflow:hidden}
.mp-body .mp-topbar .wb-profile-dropdown>summary .mp-top-avatar img{width:100%;height:100%;object-fit:cover}
.mp-body .mp-topbar .wb-profile-dropdown>summary>.mp-icon{width:12px;height:12px;color:#b2c9df;display:block}
.mp-body .mp-topbar .wb-profile-popup{width:238px;right:0;top:calc(100% + 10px);max-height:min(75dvh,510px);overflow:auto;border-radius:15px;padding:10px;box-shadow:0 19px 43px rgba(3,20,45,.24);z-index:92}
.mp-body .mp-profile-theme-row{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;color:var(--mp-ink);padding:7px 9px;border-radius:10px;background:var(--mp-raised)}
.mp-body .mp-profile-theme-row .mp-theme-selector{display:flex;align-items:center;gap:4px;transform:none!important;min-width:0}
.mp-body .mp-profile-theme-row .mp-theme-action{width:24px;height:25px;padding:4px;display:grid;place-items:center;min-width:24px}
.mp-body .mp-profile-theme-row .mp-toggle-track{width:33px;flex:0 0 33px}
.mp-body .mp-topbar .wb-profile-popup .mp-icon{width:16px;height:16px}
.mp-body .mp-topbar .wb-quick-actions:not([open])>.wb-quick-menu,
.mp-body .mp-topbar .wb-profile-dropdown:not([open])>.wb-profile-popup{display:none!important}
.mp-quick-mobile-back,.mp-quick-mobile-home{display:none!important}
/* Primeira rodada: campos e controles menores, sem remover funções de pesquisa. */
.mp-content-companies .mp-title-row{margin-bottom:16px}
.mp-content-companies .mp-title-row h1{font-size:clamp(24px,2.2vw,30px);font-weight:700;margin:1px 0 5px}
.mp-content-companies .mp-title-row .mp-eyebrow{font-size:12px;letter-spacing:1.4px;font-weight:700}
.mp-content-companies .mp-title-row p:not(.mp-eyebrow){font-size:12px;color:var(--mp-muted)}
.mp-content-companies .mp-company-toolbar{background:transparent;box-shadow:none;border:0;padding:0;margin:0 0 13px}
.mp-content-companies .mp-company-toolbar .mp-sectionhead{margin:0 0 10px;gap:12px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between}
.mp-content-companies .mp-company-count{display:inline-flex;align-items:center;white-space:nowrap;border-radius:9px;font-size:12px;font-weight:600;padding:6px 10px;color:var(--mp-accent-strong);background:var(--mp-raised-hover)}
.mp-content-companies .mp-record-create.mp-company-add{width:auto!important;min-width:0!important;min-height:39px!important;max-width:100%;padding:8px 12px!important;gap:7px;flex:0 0 auto;background:#f8782a!important;color:#fff!important;border-radius:11px;font-weight:600;font-size:12px;white-space:normal}
.mp-content-companies .mp-company-add>span:first-child{font-size:20px;line-height:1}
.mp-content-companies .mp-company-filter{display:flex;align-items:center;gap:9px;flex-wrap:nowrap;margin:0!important;min-width:0}
.mp-content-companies .mp-company-filter .mp-company-search-field{display:flex!important;flex-direction:row;align-items:center;gap:10px;flex:1 1 auto;min-width:0;margin:0!important;position:relative;padding:0 14px;min-height:43px;background:var(--mp-input);border-radius:12px;color:var(--mp-accent-strong);box-shadow:inset 0 0 0 1px var(--mp-line)}
.mp-content-companies .mp-company-search-field svg{flex:0 0 18px}
.mp-content-companies .mp-company-search-field input{width:100%;flex:1 1 auto;min-width:0;min-height:41px!important;padding:5px 0!important;border:0!important;outline:none!important;box-shadow:none!important;background:transparent!important;font-size:13px!important;color:var(--mp-ink)}
.mp-content-companies .mp-company-search-field input:focus{background:transparent!important;box-shadow:none!important}
.mp-content-companies .mp-company-search-field input::placeholder{color:var(--mp-muted)}
.mp-content-companies .mp-company-search-submit{flex:0 0 42px;width:42px;height:42px;border:0;border-radius:11px;background:var(--mp-raised-hover);color:var(--mp-accent-strong);display:grid;place-items:center;padding:0;cursor:pointer;box-shadow:var(--mp-card-shadow)}
.mp-content-companies .mp-company-clear{display:grid;place-items:center;text-decoration:none;color:var(--mp-ink);background:var(--mp-raised);border-radius:10px;min-width:35px;height:42px;font-size:19px}
.mp-content-companies .mp-company-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;margin-top:14px}
.mp-content-companies .mp-company-mini{position:relative;min-width:0;background:linear-gradient(130deg,var(--mp-surface),var(--mp-raised));border-radius:16px;border:0;box-shadow:var(--mp-card-shadow);overflow:visible;min-height:108px;display:flex;align-items:center}
.mp-content-companies .mp-company-mini .mp-company-summary{padding:14px 96px 14px 15px;min-height:103px;display:flex;align-items:center;gap:12px;width:100%;border-radius:16px;text-align:left}
.mp-content-companies .mp-company-mini .mp-company-summary:hover{background:var(--mp-raised-hover)}
.mp-content-companies .mp-company-letter{width:46px;height:46px;flex:0 0 46px;display:grid;place-items:center;border-radius:14px;background:linear-gradient(145deg,#ff9957,#f26438);color:#fff!important;font-size:15px;font-weight:700;box-shadow:0 5px 12px rgba(245,120,55,.23)}
.mp-content-companies .mp-company-mini:nth-child(even) .mp-company-letter{background:linear-gradient(145deg,#36aee3,#426bdc);box-shadow:0 5px 12px rgba(55,126,205,.20)}
.mp-content-companies .mp-company-summary-text{min-width:0;flex:1;display:grid;gap:4px;align-items:start}
.mp-content-companies .mp-company-summary-text strong{font-size:13px;line-height:1.3;color:var(--mp-strong);overflow-wrap:anywhere}
.mp-content-companies .mp-company-summary-text small{font-size:12px;line-height:1.45;color:var(--mp-muted);overflow-wrap:anywhere;max-height:3em;overflow:hidden}
.mp-content-companies .mp-company-extra{position:relative;display:flex;align-self:center;flex-shrink:0}
.mp-content-companies .mp-company-extra .mp-tag{font-size:12px;line-height:1.25;padding:5px 7px;white-space:nowrap}
.mp-content-companies .mp-company-mini>.wb-record-actions{position:absolute;right:10px;top:10px;transform:none;gap:4px;margin:0!important;padding:0!important}
.mp-content-companies .mp-company-mini .wb-record-actions .wb-icon-action{width:31px;height:31px;min-width:31px;min-height:31px;border-radius:9px}
.mp-content-companies .mp-company-mini .wb-record-actions .wb-action-svg{width:16px;height:16px}
.mp-content-companies .mp-company-modal .mp-modal-head h2{font-size:18px;font-weight:600}
.mp-content-companies .mp-company-modal .mp-record-actions .mp-btn{width:auto!important;min-width:0;min-height:40px;padding:9px 15px;border-radius:11px;font-size:12px}
.mp-content-companies .mp-company-modal .mp-company-modal-fields{min-width:0}
.mp-content-companies .mp-company-modal .mp-form-section{border-radius:13px}
.mp-content-companies .mp-company-modal input,
.mp-content-companies .mp-company-modal select,
.mp-content-companies .mp-company-modal textarea{max-width:100%;min-width:0}
/* A ordem visual no mobile prioriza título, busca e cards, mantendo as ações. */
@media(max-width:1100px){
  .mp-topbar-wordmark small{display:none}
  .mp-body .mp-topbar .wb-global-search{flex-basis:280px}
}
@media(max-width:980px){
  .mp-body .mp-topbar{min-height:61px;border-radius:16px}
  .mp-body .mp-topbar .wb-global-search{flex-basis:190px}
}
@media(max-width:760px){
  .mp-body .mp-topbar{display:flex!important;flex-wrap:wrap!important;gap:0 7px!important;min-height:57px;padding:8px 10px!important;align-items:center}
  .mp-body .mp-topbar .mp-topbar-start{display:flex!important;align-items:center;gap:7px;flex:1 1 auto;width:auto;order:0;min-width:0}
  .mp-body .mp-topbar .mp-mobile-menu{order:0;display:grid!important;place-items:center;width:35px;height:36px;min-width:35px;flex:0 0 35px;background:transparent;color:#fff;padding:0}
  .mp-body .mp-topbar .mp-mobile-navigation{display:none!important}
  .mp-body .mp-topbar .mp-topbar-wordmark{order:1;font-size:19px;flex:none}
  .mp-body .mp-topbar .mp-topbar-wordmark small{display:none}
  .mp-body .mp-topbar .mp-topbar-search-toggle{order:2;display:grid;margin-left:auto;background:transparent;width:33px;height:36px;flex:0 0 33px}
  .mp-body .mp-topbar .wb-global-search{display:none!important;order:5;flex:1 0 100%!important;width:100%!important;margin:7px 0 2px!important}
  .mp-body .mp-topbar.mp-search-open .wb-global-search{display:block!important}
  .mp-body .mp-topbar .wb-search-field{min-height:39px}
  .mp-body .mp-topbar .wb-search-field input{font-size:16px!important}
  .mp-body .mp-topbar .wb-top-shortcuts{display:flex;align-items:center;order:1;grid-row:auto;grid-column:auto;flex:0 0 auto;min-width:0}
  .mp-body .mp-topbar .wb-quick-actions>summary.mp-quick-icon{width:34px;min-width:34px;height:35px;min-height:35px}
  .mp-body .mp-topbar .wb-quick-menu{right:-43px;left:auto;max-width:calc(100vw - 23px)}
  .mp-body .mp-topbar .wb-topbar-actions,.mp-body .mp-topbar .mp-topbar-actions{order:2;grid-row:auto;grid-column:auto;margin:0!important;display:flex;align-items:center;flex:0 0 37px;justify-self:auto}
  .mp-body .mp-topbar .wb-profile-dropdown>summary{padding:1px 0;min-height:36px}
  .mp-body .mp-topbar .wb-profile-dropdown>summary .mp-top-avatar{width:32px;height:32px;flex-basis:32px}
  .mp-body .mp-topbar .wb-profile-dropdown>summary>.mp-icon{display:none}
  .mp-body .mp-topbar .wb-quick-menu .mp-quick-mobile-back,
  .mp-body .mp-topbar .wb-quick-menu .mp-quick-mobile-home{display:flex!important}
  .mp-content-companies .mp-company-grid{grid-template-columns:1fr;gap:10px}
  .mp-content-companies .mp-company-mini{min-height:91px}
  .mp-content-companies .mp-company-mini .mp-company-summary{min-height:91px;padding:12px 82px 12px 12px}
  .mp-content-companies .mp-company-mini>.wb-record-actions{right:7px;top:8px}
  .mp-content-companies .mp-company-letter{width:42px;height:42px;flex-basis:42px}
  .mp-content-companies .mp-company-toolbar .mp-sectionhead{gap:8px}
  .mp-content-companies .mp-company-toolbar .mp-record-create{font-size:12px!important}
  .mp-content-companies .mp-company-modal .mp-record-actions .mp-btn{width:100%!important}
}
@media(max-width:380px){
  .mp-body .mp-topbar{gap:0 4px!important}
  .mp-body .mp-topbar .mp-topbar-start{gap:3px}
  .mp-body .mp-topbar .mp-topbar-wordmark{font-size:17px}
  .mp-body .mp-topbar .mp-topbar-search-toggle{width:30px;flex-basis:30px}
  .mp-body .mp-topbar .wb-quick-actions>summary.mp-quick-icon{width:32px;min-width:32px}
  .mp-body .mp-topbar .wb-profile-dropdown>summary .mp-top-avatar{width:30px;height:30px;flex-basis:30px}
  .mp-content-companies .mp-company-toolbar .mp-record-create{padding-inline:9px!important}
  .mp-content-companies .mp-company-mini .mp-company-summary{padding-right:83px}
}
@media(prefers-reduced-motion:reduce){.mp-body .mp-topbar .mp-quick-icon{transition:none!important}}
/* Ajustes verificados em Chromium nas larguras 320–1440 px. */
.mp-body .mp-content-companies .mp-workspace{max-width:100%!important}
.mp-body .mp-content-companies .mp-title-row .mp-eyebrow{display:block!important}
.mp-body .mp-content-companies .mp-company-filter{
  display:grid!important;grid-template-columns:minmax(0,1fr) 42px auto!important;
  flex-wrap:nowrap!important;align-items:center!important;justify-content:stretch!important;
}
.mp-body .mp-content-companies .mp-company-filter .mp-company-search-field{
  width:100%!important;max-width:none!important;min-width:0!important;
  flex:1 1 auto!important;
}
.mp-body .mp-content-companies .mp-company-filter .mp-company-search-field input[type=search]{
  background:transparent!important;box-shadow:none!important;max-width:none!important;width:100%!important;
  border:0!important;outline:none!important;min-height:40px!important;
}
.mp-body .mp-content-companies .mp-company-search-submit{margin:0!important;justify-self:stretch}
@media(max-width:760px){
 .mp-body .mp-content-companies .mp-company-filter{grid-template-columns:minmax(0,1fr) 42px auto!important;gap:7px!important}
 .mp-body .mp-content-companies .mp-company-filter .mp-company-search-field{min-width:0!important;max-width:none!important;flex:1 1 auto!important}
}
/* Formato do pedido claramente identificado dentro do cartão, inclusive no celular. */
.mp-content-companies .mp-company-summary-text .mp-company-format{
  display:inline-flex;align-items:center;justify-self:start;
  font-size:12px;font-weight:600;line-height:1.15;
  padding:4px 7px;border-radius:8px;max-width:100%;white-space:normal;
}
.mp-content-companies .mp-company-mini .mp-company-summary{min-height:108px}
@media(max-width:760px){.mp-content-companies .mp-company-mini .mp-company-summary{min-height:101px}}
/* Ação principal fica ao lado do título como na referência aprovada. */
.mp-body .mp-content-companies .mp-title-row{display:flex;justify-content:space-between;align-items:center;gap:12px}
.mp-body .mp-content-companies .mp-title-row .mp-record-create.mp-company-add{
 flex:0 0 auto;min-width:0!important;width:auto!important;max-width:100%;
 display:inline-flex;align-items:center;gap:8px;margin:0;padding:9px 13px!important;
 min-height:40px!important;white-space:nowrap;
 background:#f8782a!important;border-radius:11px;
 color:#fff!important;font-size:12px;font-weight:600;
}
.mp-body .mp-content-companies .mp-title-row .mp-company-add-plus{font-size:19px;font-weight:400;line-height:1}
.mp-content-companies .mp-company-toolbar .mp-sectionhead{margin-bottom:9px}
/* Menu de ações por representada: detalhe ⋮ do mockup, mas edição e lixeira
   continuam executando os mecanismos existentes de modal/confirmação. */
.mp-body .mp-content-companies .mp-company-mini .mp-company-summary{padding-right:59px!important}
.mp-content-companies .mp-company-actions-menu{position:absolute;right:12px;top:50%;transform:translateY(-50%);z-index:5}
.mp-content-companies .mp-company-actions-menu>summary{
 display:grid;place-items:center;list-style:none;width:35px;height:35px;
 border-radius:10px;background:var(--mp-raised-hover);color:var(--mp-accent-strong);
 cursor:pointer;box-shadow:var(--mp-card-shadow)
}
.mp-content-companies .mp-company-actions-menu>summary::-webkit-details-marker{display:none}
.mp-content-companies .mp-company-actions-menu[open]>summary{background:var(--mp-accent);color:#fff}
.mp-content-companies .mp-company-actions-menu>.wb-record-actions{
 position:absolute;top:calc(100% + 7px);right:0;transform:none!important;
 margin:0!important;padding:8px!important;
 min-width:100px;display:flex;gap:8px;align-items:center;justify-content:center;
 background:var(--mp-surface);border-radius:12px;
 box-shadow:0 10px 25px rgba(0,25,50,.23);z-index:6;
}
.mp-content-companies .mp-company-actions-menu:not([open])>.wb-record-actions{display:none!important}
.mp-content-companies .mp-company-actions-menu>.wb-record-actions .wb-icon-action{width:37px;height:37px;min-width:37px;min-height:37px}
@media(max-width:760px){
 .mp-body .mp-content-companies .mp-title-row .mp-record-create.mp-company-add{
  width:38px!important;min-width:38px!important;height:38px;min-height:38px!important;
  padding:0!important;justify-content:center;align-self:start;
 }
 .mp-body .mp-content-companies .mp-title-row .mp-company-add-label{display:none}
 .mp-content-companies .mp-company-actions-menu{right:10px}
}
/* Nomes extensos permanecem legíveis sem aumentar a largura do celular. */
.mp-body .mp-content-companies .mp-company-summary-text strong{
 white-space:normal!important;overflow:hidden;display:-webkit-box;
 -webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;
 text-overflow:ellipsis;max-width:100%;
}
.mp-body .mp-content-companies .mp-company-summary-text small{
 white-space:normal!important;overflow:hidden;display:-webkit-box;
 -webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;
}
