/* AMICA — V12.5.22 CONTRAST + SIDEBAR
   Propaga a linguagem aprovada no piloto V12.5.18 (amica-pilot.css, tokens --ax-*) para todo o Portal POR COMPONENTE:
   cabeçalho de página, painel, tabela, formulário, botão, badge, KPI, aviso, abas, vazio, barra de filtros e largura por tipo de página.
   Somente apresentação. Carregado por último. Escopo: #content (todas as rotas).
   As telas piloto (.ax) já usam os componentes .ax-* e ficam fora deste arquivo via ":not(.ax *)".
   Os !important existentes só neutralizam regras legadas que já usam !important (systemic-ux.css, amica-ds.css, client-portal.css, <style> do index). */

/* ---------- 1. Tokens: legados remapeados para a escala aprovada (corrige microtipografia em todo o Portal) ---------- */
:root{
  --font-size-page-title:24px;--font-size-section-title:17px;--font-size-subsection:15px;--font-size-body:13.5px;
  --font-size-label:12px;--font-size-table:13.5px;--font-size-meta:12px;--font-size-value:20px;
  --font-weight-semibold:600;--font-weight-medium:500;
  --ax-w-list:1520px;--ax-w-detail:1240px;--ax-w-dash:1440px;--ax-w-narrow:980px;
  --ax-page-pad-y:28px;--ax-page-pad-x:32px;
}
@media(max-width:1366px){:root{--ax-page-pad-x:24px}}
@media(max-width:900px){:root{--ax-page-pad-y:14px;--ax-page-pad-x:14px}}
@media(max-width:520px){:root{--font-size-page-title:22px}}

/* ---------- 2. Canvas e contêiner de página ---------- */
html body #appView>.amica-main{background:var(--ax-bg)!important}
html body.ui-unified #appView #content.amica-content{--page-w:var(--ax-w-list);position:relative;box-sizing:border-box;width:100%;max-width:calc(var(--page-w) + 2 * var(--ax-page-pad-x))!important;margin:0 auto!important;padding:var(--ax-page-pad-y) var(--ax-page-pad-x) 32px!important;font-family:var(--ax-font);color:var(--ax-ink);-webkit-font-smoothing:antialiased}
/* Telas piloto (.ax): o gutter próprio é compensado para manter a margem aprovada no piloto */
html body.ui-unified #content>.ax{padding:6px 16px 8px!important}
@media(max-width:900px){html body.ui-unified #content>.ax{padding:0 4px 8px!important}}
@media(max-width:680px){html body.ui-unified #content>.ax{padding:0 0 8px!important}}
/* Tipos de página por rota explícita */
html body.ui-unified:is([data-route="dash"],[data-route="home"],[data-route="sellerDash"],[data-route="employeeDash"]) #appView #content.amica-content{--page-w:var(--ax-w-dash)}
html body.ui-unified:is([data-route="settings"],[data-route="integrations"],[data-route="profile"],[data-route="wallet"],[data-route="history"],[data-route="mymachines"],[data-route="clientMaintenance"],[data-route="poSettings"]) #appView #content.amica-content{--page-w:var(--ax-w-detail)}
/* Fichas/detalhes dentro de rotas de lista: marcador explícito no 1º elemento + irmãos seguintes */
html body.ui-unified #content>:is(.client-detail-heading,.machine-editor-shell,.ax-w-detail),
html body.ui-unified #content>:is(.client-detail-heading,.ax-w-detail)~*{max-width:var(--ax-w-detail);margin-left:auto!important;margin-right:auto!important}
html body.ui-unified[data-route="prices"] #appView #content.amica-content{--page-w:var(--ax-w-narrow)}
/* Larguras fixas legadas de cartões dão lugar à largura da página (evita bordas desalinhadas) */
html body.ui-unified #content :is(.settings-section,.wallet-action-card,.ds-price-panel,.wallet-owner-grid):not(.ax *){max-width:none!important}
html body.ui-unified #content>.ax-w-narrow,html body.ui-unified #content>.ax-w-narrow~*{max-width:var(--ax-w-narrow);margin-left:auto!important;margin-right:auto!important}
/* Rolagem termina com o conteúdo: #content é o bloco de contenção de elementos absolutos (rótulos acessíveis .ax-sr,
   inputs de arquivo) — antes eles eram ancorados ao documento e criavam rolagem vertical extra fora do main (ex.: 160 px em Modelo).
   Nenhum elemento de rota força altura de viewport dentro do main. */
html body.ui-unified #content :is(.wallet-page,.machine-editor-shell,.contract-body,.client-detail-panel):not(.ax *){min-height:0!important}
html body.ui-unified #content>:last-child{margin-bottom:0!important}
/* o último cartão aninhado também não deixa margem sobrando abaixo do conteúdo */
html body.ui-unified #content :is(.card,.v4-panel,.ds-panel,.client-panel,.wallet-section,.wallet-action-card,.wallet-balance-card,.settings-section,.po-section,.model-section,.machine-hero-card,.ds-note,.notice,.ds-kpis,.ds-metrics,.v4-metrics,.wallet-owner-grid):not(.ax *):last-child{margin-bottom:0!important}
html body.ui-unified #content>:last-child :is(.ds-panel,.ax-card):last-child{margin-bottom:0!important}

/* ---------- 3. Cabeçalho de página (todas as famílias) ---------- */
html body.ui-unified #content :is(.v4-page-head,.standard-page-head,.model-page-head,.client-page-head,.wallet-page-head,.ds-page-head,.contract-toolbar,.service-toolbar):not(.ax *){display:flex!important;align-items:center!important;justify-content:space-between!important;flex-wrap:wrap!important;gap:10px 20px!important;margin:0 0 18px!important;padding:0!important;min-height:38px!important;background:none!important;border:0!important;box-shadow:none!important}
html body.ui-unified #content :is(.v4-page-head,.standard-page-head,.model-page-head,.client-page-head,.wallet-page-head,.ds-page-head,.contract-toolbar,.service-toolbar):not(.ax *) :is(h1,h2),
html body.ui-unified #content>h2:not(.ax *){margin:0!important;font-size:var(--ax-fs-title)!important;line-height:1.25!important;font-weight:600!important;letter-spacing:-.02em!important;color:var(--ax-ink)!important;overflow-wrap:anywhere}
html body.ui-unified #content>h2:not(.ax *){margin:0 0 6px!important}
html body.ui-unified #content :is(.v4-page-head,.standard-page-head,.model-page-head,.client-page-head,.wallet-page-head,.ds-page-head,.contract-toolbar,.service-toolbar):not(.ax *) p,
html body.ui-unified #content>h2+p.sub:not(.ax *){margin:4px 0 0!important;font-size:13px!important;line-height:1.45!important;color:var(--ax-soft)!important;flex-basis:100%;max-width:820px}
html body.ui-unified #content>h2+p.sub:not(.ax *){margin:0 0 18px!important}
html body.ui-unified #content :is(.v4-page-head,.standard-page-head,.model-page-head,.client-page-head,.wallet-page-head,.ds-page-head):not(.ax *)>div:first-child{display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:6px 12px!important;min-width:0;flex:1 1 320px}
html body.ui-unified #content :is(.v460-page-meta,.page-meta):not(.ax *){display:flex!important;flex-wrap:wrap;gap:6px!important;margin:0!important}
html body.ui-unified #content :is(.v460-pill,.client-count):not(.ax *){display:inline-flex!important;align-items:center;gap:4px;min-height:22px;max-width:100%;padding:0 9px!important;border-radius:99px!important;background:#dfe1e6!important;border:0!important;color:var(--ax-soft)!important;font-size:12px!important;font-weight:500!important;white-space:normal;line-height:1.35!important}
html body.ui-unified #content :is(.v460-pill,.client-count):not(.ax *) strong{font-weight:600!important;color:var(--ax-ink)}
html body.ui-unified #content .v460-pill.pending:not(.ax *){background:var(--ax-red-tint)!important;color:var(--ax-red)!important}
html body.ui-unified #content :is(.page-head-actions,.client-page-actions,.ds-head-actions,.model-head-actions):not(.ax *){display:flex;align-items:center;flex-wrap:wrap;gap:8px}

/* ---------- 4. Painéis / cartões ---------- */
html body.ui-unified #content :is(.card,.v4-panel,.ds-panel,.client-panel,.wallet-section,.wallet-action-card,.wallet-balance-card,.settings-section,.po-section,.model-section,.machine-hero-card,.machine-summary-card,.v461-panel,.report-section,.security-panel):not(.ax *){background:var(--ax-surface)!important;border:1px solid var(--ax-card-line)!important;border-radius:var(--ax-r-card)!important;box-shadow:var(--ax-shadow)!important;margin:0 0 14px!important}
html body.ui-unified #content :is(.card,.settings-section,.wallet-action-card,.wallet-balance-card):not(.ax *){padding:16px 18px!important}
html body.ui-unified #content :is(.v4-panel,.ds-panel,.client-panel,.wallet-section,.po-section,.model-section):not(.ax *){padding:0!important;overflow:hidden}
/* Sem caixa dentro de caixa */
html body.ui-unified #content :is(.card,.v4-panel,.ds-panel,.client-panel,.wallet-section,.settings-section) :is(.card,.v4-panel,.ds-panel,.client-panel):not(.ax *){border:0!important;border-radius:0!important;box-shadow:none!important;margin:0!important;background:transparent!important}
html body.ui-unified #content :is(.v4-panel-accent,.ds-panel.accent):not(.ax *){border-top:1px solid var(--ax-card-line)!important}
html body.ui-unified #content :is(.v4-panel-accent,.ds-panel.accent,.ds-kpi,.v4-kpi):not(.ax *)::before{content:none!important;display:none!important}
html body.ui-unified #content :is(.v4-panel-head,.ds-panel-head,.client-panel-head,.wallet-section-head,.po-section-head,.model-section-title):not(.ax *){display:flex!important;align-items:center!important;justify-content:space-between!important;flex-wrap:wrap;gap:8px 12px!important;min-height:52px!important;padding:10px 18px!important;margin:0!important;border:0!important;border-bottom:1px solid var(--ax-line-2)!important;background:transparent!important}
html body.ui-unified #content :is(.v4-panel-head,.ds-panel-head,.client-panel-head,.wallet-section-head,.po-section-head,.model-section-title):not(.ax *) :is(h2,h3,h4),
html body.ui-unified #content :is(.card,.settings-section,.wallet-action-card):not(.ax *)>h3{margin:0!important;font-size:var(--ax-fs-section)!important;font-weight:600!important;letter-spacing:-.01em!important;line-height:1.3!important;color:var(--ax-ink)!important}
html body.ui-unified #content :is(.card,.settings-section,.wallet-action-card):not(.ax *)>h3{margin:0 0 4px!important}
html body.ui-unified #content :is(.v4-panel-head,.ds-panel-head,.client-panel-head,.wallet-section-head,.po-section-head):not(.ax *) p{margin:2px 0 0!important;font-size:12.5px!important;color:var(--ax-mute)!important}
html body.ui-unified #content :is(.v4-panel-icon):not(.ax *){display:none!important}
html body.ui-unified #content :is(.ds-panel-body,.v461-tab-body,.po-section-body,.report-section-body):not(.ax *){padding:14px 18px!important}
html body.ui-unified #content :is(.card,.settings-section):not(.ax *)>p.sub{margin:0 0 12px!important;font-size:12.5px!important;color:var(--ax-mute)!important}

/* ---------- 5. Tabelas ---------- */
html body.ui-unified #content :is(.v4-table-wrap,.ds-table-wrap,.table,.wallet-ledger-table):not(.ax *){position:relative;border:0!important;border-radius:0!important;box-shadow:none!important;margin:0!important;max-width:100%;overflow-x:auto!important}
html body.ui-unified #content table:not(.ax-table):not(.ax *){width:100%;border-collapse:collapse!important;border-spacing:0;font-size:13.5px!important;background:transparent}
html body.ui-unified #content table:not(.ax-table):not(.ax *) th{height:38px!important;padding:0 14px!important;background:var(--ax-surface-2)!important;color:var(--ax-mute)!important;font-size:11.5px!important;font-weight:600!important;letter-spacing:.05em!important;text-transform:uppercase!important;text-align:left;vertical-align:middle!important;white-space:nowrap;border:0!important;border-bottom:1px solid var(--ax-line-2)!important;line-height:1.3!important}
html body.ui-unified #content table:not(.ax-table):not(.ax *) td{height:52px!important;padding:9px 14px!important;vertical-align:middle!important;border:0!important;border-top:1px solid var(--ax-line-2)!important;font-size:13.5px!important;line-height:1.4!important;overflow-wrap:normal!important;word-break:normal!important;hyphens:none;background:transparent}
html body.ui-unified #content table:not(.ax-table):not(.ax *) tbody tr:first-child td{border-top:0!important}
html body.ui-unified #content table:not(.ax-table):not(.ax *) tbody tr{background:transparent!important;transition:background-color .15s}
html body.ui-unified #content table:not(.ax-table):not(.ax *) tbody tr:hover{background:var(--ax-red-tint-2)!important}
html body.ui-unified #content table:not(.ax-table):not(.ax *) :is(th,td):first-child{padding-left:18px!important}
html body.ui-unified #content table:not(.ax-table):not(.ax *) :is(th,td):last-child{padding-right:18px!important}
html body.ui-unified #content table:not(.ax-table):not(.ax *) td :is(b,strong){font-weight:600!important}
html body.ui-unified #content table:not(.ax-table):not(.ax *) td :is(.v4-sub,.muted,small,.ds-sub){display:block;margin-top:2px;font-size:12px!important;color:var(--ax-mute)!important;line-height:1.35}
/* Coluna Ação: mesmo eixo no cabeçalho e nas linhas */
html body.ui-unified #content table:not(.ax-table):not(.ax *) :is(th,td):is(.col-action,.v4-action){width:1%!important;white-space:nowrap!important;text-align:center!important;padding-left:14px!important;padding-right:18px!important}
html body.ui-unified #content table:not(.ax-table):not(.ax *) :is(th,td):is(.col-num,.right,.num){text-align:right!important;font-variant-numeric:tabular-nums}
html body.ui-unified #content table:not(.ax-table):not(.ax *) td:is(.col-action,.v4-action)>:is(.btn,.ds-btn){margin:0 auto!important}
html body.ui-unified #content table:not(.ax-table):not(.ax *) .empty,
html body.ui-unified #content table:not(.ax-table):not(.ax *) .ds-table-empty td{height:auto!important;padding:28px 18px!important;text-align:center!important;color:var(--ax-mute)!important}
/* Lista de pedidos (grid do Design System) no mesmo padrão */
html body.ui-unified #content .ds-order-list:not(.ax *){border:0}
html body.ui-unified #content .ds-order-list-head:not(.ax *){min-height:38px;background:var(--ax-surface-2)!important;color:var(--ax-mute)!important;font-size:11.5px!important;font-weight:600!important;letter-spacing:.05em!important;text-transform:uppercase!important;border-bottom:1px solid var(--ax-line-2)!important}
html body.ui-unified #content .ds-order-list-head:not(.ax *) span{font-size:11.5px!important}
html body.ui-unified #content .ds-order-list-row:not(.ax *){min-height:52px!important;border-bottom:1px solid var(--ax-line-2)!important;font-size:13.5px!important;transition:background-color .15s}
html body.ui-unified #content .ds-order-list-row:not(.ax *):hover{background:var(--ax-red-tint-2)!important}
html body.ui-unified #content .ds-order-list-row:not(.ax *):focus-visible{outline:2px solid var(--ax-red)!important;outline-offset:-2px!important}

/* ---------- 6. Formulários ---------- */
html body.ui-unified #content :is(.field,.v4-field,.ds-field):not(.ax *){margin:0!important;min-width:0}
html body.ui-unified #content :is(.field,.v4-field,.ds-field):not(.ax *)>label,html body.ui-unified #content .ds-label:not(.ax *){display:block!important;margin:0 0 6px!important;font-size:12px!important;font-weight:600!important;color:var(--ax-soft)!important;text-transform:none!important;letter-spacing:0!important;line-height:1.35!important}
html body.ui-unified #content :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]),select):not(.ax *){height:40px!important;min-height:40px!important;box-sizing:border-box;padding:0 12px!important;border:1px solid var(--ax-ctl-line)!important;border-radius:var(--ax-r-ctl)!important;background-color:#fcfcfd!important;color:var(--ax-ink)!important;font-family:inherit;font-size:13.5px!important;box-shadow:none!important;transition:border-color .15s,box-shadow .15s,background-color .15s!important}
html body.ui-unified #content select:not(.ax *){appearance:none;-webkit-appearance:none;padding-right:34px!important;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23868c97' stroke-width='2'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E")!important;background-repeat:no-repeat!important;background-position:right 12px center!important}
html body.ui-unified #content textarea:not(.ax *){min-height:72px;box-sizing:border-box;padding:10px 12px!important;border:1px solid var(--ax-ctl-line)!important;border-radius:var(--ax-r-ctl)!important;background:#fcfcfd!important;color:var(--ax-ink)!important;font-family:inherit;font-size:13.5px!important;line-height:1.45;box-shadow:none!important}
html body.ui-unified #content :is(input,select,textarea):not(.ax *):hover:not(:disabled){border-color:#b9bdc6!important}
html body.ui-unified #content :is(input,select,textarea):not(.ax *):focus-visible{border-color:var(--ax-red)!important;box-shadow:0 0 0 4px var(--ax-red-ring)!important;outline:0!important}
html body.ui-unified #content :is(input,select,textarea):not(.ax *):disabled{background-color:var(--ax-surface-2)!important;color:var(--ax-mute)!important}
html body.ui-unified #content :is(input[type=checkbox],input[type=radio]):not(.ax *){accent-color:var(--ax-red);width:16px;height:16px}
html body.ui-unified #content :is(.formgrid,.ds-form-grid,.machine-form-grid):not(.ax *){display:grid!important;grid-template-columns:repeat(auto-fill,minmax(240px,1fr))!important;gap:14px 18px!important;align-items:start}
html body.ui-unified #content :is(.formgrid,.ds-form-grid,.machine-form-grid):not(.ax *)>:is(.span2){grid-column:span 2!important}
html body.ui-unified #content :is(.formgrid,.ds-form-grid,.machine-form-grid):not(.ax *)>:is(.span4,.wide){grid-column:1/-1!important}
html body.ui-unified #content :is(.field,.v4-field,.ds-field):not(.ax *) :is(.muted,small,.ds-hint){display:block;margin-top:5px;font-size:12px!important;color:var(--ax-mute)!important;line-height:1.4}
/* V12.5.20 — campos compartilham a altura natural de label/controle/ajuda
   por linha. Não reserva uma altura fixa para labels curtas nem usa hints
   para empurrar o input vizinho. Só grades compostas integralmente por fields. */
@supports(grid-template-rows:subgrid){
 html body.ui-unified #content .formgrid:not(.ax *):not(:has(>:not(.field))){row-gap:14px!important}
 html body.ui-unified #content .formgrid:not(.ax *):not(:has(>:not(.field)))>.field{display:grid;grid-template-rows:subgrid;grid-row:span 3;row-gap:0;align-content:start}
 html body.ui-unified #content .formgrid:not(.ax *):not(:has(>:not(.field)))>.field>label{grid-row:1;align-self:end}
 html body.ui-unified #content .formgrid:not(.ax *):not(:has(>:not(.field)))>.field>:is(input,select,textarea){grid-row:2;align-self:start}
 html body.ui-unified #content .formgrid:not(.ax *):not(:has(>:not(.field)))>.field>:is(.muted,small,.ds-hint){grid-row:3;align-self:start}
}
html body.ui-unified #content :is(.sticky-actions,.ds-actionbar,[data-context-save],.ds-actions,.wallet-actions,.section-actionbar):not(.ax *){display:flex!important;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px!important;margin-top:16px!important;padding:14px 0 0!important;border-top:1px solid var(--ax-line-2)!important;background:transparent!important;box-shadow:none!important}
/* barra que já era fixa (sticky) no rodapé de formulários longos: mantém o comportamento, com fundo sólido */
html body.ui-unified #content .sticky-actions:not(.ax *){background:#fff!important;padding-bottom:12px!important;z-index:4}
html body.ui-unified #content :is(.settings-section,.card):not(.ax *)>:is(.formgrid)+:is(.btn,button){margin-top:16px!important}

/* ---------- 7. Botões ---------- */
html body.ui-unified #content :is(.btn,.ds-btn):not(.ax *):not(.ax-btn){display:inline-flex!important;align-items:center;justify-content:center;gap:6px;height:36px!important;min-height:36px!important;padding:0 14px!important;border:1px solid #d3d6dc!important;border-radius:var(--ax-r-ctl)!important;background:#fff!important;color:var(--ax-ink)!important;font-family:inherit;font-size:13px!important;font-weight:600!important;line-height:1!important;white-space:nowrap;box-shadow:none!important;transform:none!important;transition:background-color .15s,border-color .15s,color .15s!important;text-decoration:none}
html body.ui-unified #content :is(.btn,.ds-btn):not(.ax *):not(.ax-btn):hover:not(:disabled){border-color:#b9bdc6!important;background:var(--ax-surface-3)!important}
html body.ui-unified #content :is(.btn.primary,.ds-btn.primary):not(.ax *){background:var(--ax-red)!important;border-color:var(--ax-red)!important;color:#fff!important}
html body.ui-unified #content :is(.btn.primary,.ds-btn.primary):not(.ax *):hover:not(:disabled){background:var(--ax-red-2)!important;border-color:var(--ax-red-2)!important}
html body.ui-unified #content :is(.btn.danger,.ds-btn.danger,.danger-soft):not(.ax *){background:#fff!important;border-color:#f1c9c5!important;color:var(--ax-red)!important}
html body.ui-unified #content :is(.btn.danger,.ds-btn.danger,.danger-soft):not(.ax *):hover:not(:disabled){background:var(--ax-red-tint)!important}
html body.ui-unified #content :is(.btn.small,.ds-btn.small,.action-open):not(.ax *){height:32px!important;min-height:32px!important;padding:0 12px!important;font-size:12.5px!important;border-radius:9px!important}
html body.ui-unified #content :is(.btn,.ds-btn):not(.ax *):disabled{opacity:.55;cursor:not-allowed}
html body.ui-unified #content :is(.btn,.ds-btn,button):not(.ax *):focus-visible{outline:2px solid var(--ax-red)!important;outline-offset:2px!important}

/* ---------- 8. Badges / status ---------- */
html body.ui-unified #content :is(.status,.v4-status,.ds-badge,.maintenance-status,.status-badge,.client-badge,.contact-badge,.legacy-badge,.machine-status-pill,.source-pill,.v4-type,.contract-status):not(.ax *){display:inline-flex!important;align-items:center;gap:5px;height:22px!important;min-height:0!important;padding:0 9px!important;border:0!important;border-radius:99px!important;background:#f1f2f4!important;color:var(--ax-soft)!important;font-size:12px!important;font-weight:600!important;line-height:1!important;white-space:nowrap;box-shadow:none!important;width:auto!important}
html body.ui-unified #content :is(.status,.v4-status,.ds-badge,.maintenance-status,.status-badge,.client-badge,.contact-badge,.v4-type,.contract-status):not(.ax *):is(.green,.ok,.active,.pass){background:var(--ax-ok-tint)!important;color:var(--ax-ok-ink)!important}
html body.ui-unified #content :is(.status,.v4-status,.ds-badge,.maintenance-status,.status-badge,.client-badge,.contact-badge,.v4-type,.contract-status):not(.ax *):is(.red,.danger,.err,.error,.fail,.overdue){background:var(--ax-red-tint)!important;color:var(--ax-red)!important}
html body.ui-unified #content :is(.status,.v4-status,.ds-badge,.maintenance-status,.status-badge,.client-badge,.contact-badge,.v4-type,.contract-status):not(.ax *):is(.amber,.warn,.pending,.yellow){background:var(--ax-warn-tint)!important;color:var(--ax-warn-ink)!important}
html body.ui-unified #content .machine-status-pill.inactive:not(.ax *){background:#f1f2f4!important;color:var(--ax-mute)!important}

/* ---------- 9. KPIs / métricas ---------- */
html body.ui-unified #content :is(.v4-metrics,.ds-kpis,.ds-metrics,.security-kpis,.kpi-row):not(.ax *){display:grid!important;grid-template-columns:repeat(auto-fit,minmax(200px,1fr))!important;gap:12px!important;margin:0 0 14px!important}
html body.ui-unified #content :is(.v4-kpi,.ds-kpi,.ds-metric,.client-kpi,.stat,.kpi-mini,.dashboard-kpi):not(.ax *){position:relative;display:flex!important;align-items:center;justify-content:space-between;gap:12px;min-height:84px!important;padding:14px 16px!important;margin:0!important;background:#fff!important;border:1px solid var(--ax-card-line)!important;border-radius:var(--ax-r-card)!important;box-shadow:var(--ax-shadow)!important;text-align:left;font-family:inherit;color:var(--ax-ink)}
html body.ui-unified #content :is(.ds-metric,.stat,.kpi-mini,.client-kpi,.security-kpis .v4-kpi):not(.ax *){flex-direction:column;align-items:flex-start;justify-content:center;gap:2px}
html body.ui-unified #content button:is(.v4-kpi,.ds-kpi):not(.ax *){cursor:pointer;transition:border-color .15s,background-color .15s!important}
html body.ui-unified #content button:is(.v4-kpi,.ds-kpi):not(.ax *):hover{border-color:#e8a9a3!important;background:var(--ax-red-tint-2)!important}
html body.ui-unified #content :is(.v4-kpi-copy>span,.ds-kpi .k-label,.ds-metric>span,.stat>small,.kpi-mini>span,.kpi-mini>small,.client-kpi>span,.v4-kpi>span):not(.ax *){display:block;font-size:12px!important;font-weight:500!important;color:var(--ax-mute)!important;text-transform:none!important;letter-spacing:0!important}
html body.ui-unified #content :is(.v4-kpi b,.ds-kpi .k-value,.ds-metric>b,.stat>b,.kpi-mini>b,.client-kpi>b):not(.ax *){display:block;margin-top:4px!important;font-size:20px!important;font-weight:600!important;line-height:1.15!important;letter-spacing:-.01em;color:var(--ax-ink)!important;font-variant-numeric:tabular-nums}
html body.ui-unified #content :is(.ds-kpi .k-sub,.ds-metric>small,.v4-kpi>small):not(.ax *){display:block;margin-top:3px!important;font-size:12px!important;color:var(--ax-mute)!important}
html body.ui-unified #content :is(.v4-kpi-icon,.ds-kpi .k-icon):not(.ax *){flex:none;width:36px!important;height:36px!important;border-radius:10px!important;display:grid!important;place-items:center;background:#f1f2f4!important;color:var(--ax-soft)!important;font-size:17px}
html body.ui-unified #content :is(.v4-kpi-icon,.ds-kpi .k-icon):not(.ax *) svg{width:18px!important;height:18px!important;stroke:currentColor;fill:none;stroke-width:1.8}
html body.ui-unified #content button:is(.v4-kpi,.ds-kpi):not(.ax *):hover :is(.v4-kpi-icon,.k-icon){background:var(--ax-red-tint)!important;color:var(--ax-red)!important}
html body.ui-unified #content .v4-summary-strip:not(.ax *){display:flex;flex-wrap:wrap;gap:8px!important;padding:12px 18px!important;border-bottom:1px solid var(--ax-line-2)!important;background:transparent!important}
html body.ui-unified #content .v4-summary-strip:not(.ax *)>div{display:inline-flex!important;align-items:baseline;gap:6px;padding:6px 12px!important;border-radius:99px!important;background:#f1f2f4!important;border:0!important;min-width:0!important;min-height:0!important}
html body.ui-unified #content .v4-summary-strip:not(.ax *)>div b{font-size:15px!important;font-weight:600!important}
html body.ui-unified #content .v4-summary-strip:not(.ax *)>div span{font-size:12px!important;color:var(--ax-soft)!important}
html body.ui-unified #content .v4-summary-strip:not(.ax *)>div.red{background:var(--ax-red-tint)!important;color:var(--ax-red)}
html body.ui-unified #content .v4-summary-strip:not(.ax *)>div.green{background:var(--ax-ok-tint)!important;color:var(--ax-ok-ink)}

/* V12.5.20 — alinhamento da família KPI: conteúdo começa no mesmo eixo,
   mesmo quando a descrição de um indicador ocupa mais linhas. */
html body.ui-unified #content .ds-kpi:not(.ax *){align-items:flex-start!important}
html body.ui-unified #content .ds-kpi:not(.ax *)>div:first-child{min-width:0;flex:1}
html body.ui-unified #content .ds-kpi:not(.ax *) .k-label{line-height:1.4!important}
html body.ui-unified #content .ds-kpi:not(.ax *) .k-sub{line-height:1.45!important;overflow-wrap:normal;word-break:normal}
html body.ui-unified #content .ds-kpi:not(.ax *) .k-icon{align-self:center}

/* ---------- 10. Avisos ---------- */
html body.ui-unified #content :is(.notice,.v4-notice,.ds-note):not(.ax *){margin:0 0 14px!important;padding:10px 14px!important;border:1px solid #d9e3f2!important;border-left-width:1px!important;border-radius:var(--ax-r-ctl)!important;background:#f3f6fb!important;color:#2a4166!important;font-size:13px!important;line-height:1.45!important;box-shadow:none!important}
html body.ui-unified #content :is(.notice.warn,.ds-note:not(.info),.v4-notice.warn):not(.ax *){border-color:var(--ax-warn-line)!important;background:var(--ax-warn-tint)!important;color:var(--ax-warn-ink)!important}
html body.ui-unified #content :is(.notice.error,.notice.err,.v4-notice.error):not(.ax *){border-color:#f1c9c5!important;background:#fdf2f1!important;color:#8f1d14!important}
html body.ui-unified #content :is(.notice.success,.notice.ok):not(.ax *){border-color:#bfe6d4!important;background:var(--ax-ok-tint)!important;color:var(--ax-ok-ink)!important}

/* ---------- 11. Abas ---------- */
html body.ui-unified #content :is(.client-tabs,.settings-tabs,.ds-segmented,.client-detail-tabs):not(.ax *){display:flex!important;flex-wrap:wrap;gap:4px!important;margin:0 0 14px!important;padding:6px!important;border:1px solid var(--ax-card-line)!important;border-radius:12px!important;background:#fff!important;box-shadow:var(--ax-shadow)!important}
html body.ui-unified #content .client-detail-panel>.client-tabs:not(.ax *){margin:0!important;border:0!important;border-bottom:1px solid var(--ax-line-2)!important;border-radius:0!important;box-shadow:none!important;padding:8px 12px!important}
html body.ui-unified #content :is(.client-tabs,.settings-tabs,.ds-segmented,.client-detail-tabs):not(.ax *)>button{height:34px!important;min-height:34px!important;padding:0 14px!important;border:0!important;border-radius:9px!important;background:transparent!important;color:var(--ax-soft)!important;font-family:inherit;font-size:13px!important;font-weight:500!important;box-shadow:none!important;white-space:nowrap;cursor:pointer;transition:background-color .15s,color .15s!important}
html body.ui-unified #content :is(.client-tabs,.settings-tabs,.ds-segmented,.client-detail-tabs):not(.ax *)>button:hover{background:var(--ax-surface-2)!important;color:var(--ax-ink)!important}
html body.ui-unified #content :is(.client-tabs,.settings-tabs,.ds-segmented,.client-detail-tabs):not(.ax *)>button:is(.active,[aria-selected="true"],.is-active){background:#fbeceb!important;color:var(--ax-red)!important;font-weight:600!important}
html body.ui-unified #content :is(.client-tabs,.settings-tabs,.ds-segmented,.client-detail-tabs):not(.ax *)>button::after{content:none!important}

/* ---------- 12. Vazio ---------- */
html body.ui-unified #content :is(.empty,.v4-empty,.v460-empty,.ds-empty):not(.ax *){display:grid!important;justify-items:center;gap:4px;padding:30px 20px!important;min-height:0!important;text-align:center;color:var(--ax-soft)!important;font-size:13px!important;background:transparent!important;border:0!important}
html body.ui-unified #content :is(.empty,.v4-empty,.v460-empty,.ds-empty):not(.ax *) b{font-size:15px!important;font-weight:600!important;color:var(--ax-ink)!important}
html body.ui-unified #content :is(.empty,.v4-empty,.v460-empty,.ds-empty):not(.ax *) :is(span,p){margin:0!important;font-size:13px!important;color:var(--ax-soft)!important}

/* ---------- 13. Barras de filtros / toolbars ---------- */
html body.ui-unified #content :is(.v460-toolbar,.v4-filterbar,.ds-toolbar,.installed-filter-grid,.event-filterbar,.contract-filter-grid):not(.ax *){display:grid!important;grid-template-columns:repeat(auto-fill,minmax(180px,1fr))!important;align-items:end!important;gap:12px 14px!important;margin:0!important;padding:14px 18px!important;min-height:0!important;border:0!important;border-bottom:1px solid var(--ax-line-2)!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
html body.ui-unified #content :is(.v460-toolbar,.v4-filterbar,.ds-toolbar,.installed-filter-grid):not(.ax *)>:is(.grow,.filter-search,.v4-searchbox){grid-column:span 2}
html body.ui-unified #content :is(.v460-toolbar,.v4-filterbar,.ds-toolbar,.installed-filter-grid):not(.ax *) :is(.btn,.ds-btn){align-self:end}
/* filtros avançados: no desktop entram na mesma grade (o <details> some da caixa) */
@media(min-width:701px){html body.ui-unified #content :is(.ds-filter-disclosure,.ds-filter-disclosure-body):not(.ax *){display:contents!important}html body.ui-unified #content .ds-filter-disclosure:not(.ax *)::details-content{display:contents!important}html body.ui-unified #content .ds-filter-disclosure:not(.ax *)>summary{display:none!important}}
html body.ui-unified #content .v4-searchbox:not(.ax *){position:relative;display:flex;align-items:center;min-width:0}
html body.ui-unified #content .v4-searchbox:not(.ax *)>span{position:absolute;left:12px;color:var(--ax-mute);pointer-events:none}
html body.ui-unified #content .v4-searchbox:not(.ax *)>input{width:100%;padding-left:34px!important}

/* ---------- 14. Drawer / modal ---------- */
html body .ds-drawer{font-family:var(--ax-font)}
html body .ds-drawer :is(.ds-drawer-head) h2{font-size:20px!important;font-weight:600!important}
html body .ds-drawer .ds-drawer-grid span{font-size:12px!important;color:var(--ax-mute)!important}
html body #modalRoot .modal{font-family:var(--ax-font);border-radius:var(--ax-r-card)!important}
html body #modalRoot .modal h3{font-size:var(--ax-fs-section)!important;font-weight:600!important}

/* ---------- 15. Dashboard (composição própria: estilos de formulário/tabela não reorganizam o layout) ---------- */
html body.ui-unified[data-route="dash"] #content .v4-agenda-head:not(.ax *){display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center}
html body.ui-unified[data-route="dash"] #content .v4-monthbar:not(.ax *){display:flex!important;align-items:center;gap:10px;margin:0!important;min-width:0!important}
html body.ui-unified[data-route="dash"] #content .v4-monthbar button:not(.ax *){width:32px!important;height:32px!important;min-height:32px!important;border:1px solid #d3d6dc!important;border-radius:9px!important;background:#fff!important;color:var(--ax-soft)!important;font-size:16px!important;box-shadow:none!important}
html body.ui-unified[data-route="dash"] #content .v4-monthlabel:not(.ax *){min-width:130px;text-align:center;font-size:14px!important;font-weight:600!important}
html body.ui-unified[data-route="home"] #content .ds-campaign:not(.ax *){border:1px dashed var(--ax-line)!important;border-radius:var(--ax-r-card)!important;background:transparent!important}

/* ---------- 16. Microtipografia residual de módulos legados (mínimo 12 px em conteúdo operacional) ---------- */
html body.ui-unified #content :is(.v4-sub,.muted,.ds-sub,.sub,.machine-pending-reason,.machine-pending-badge,.v470-intake-range-note,.v460-inline-note,.k-sub,.client-tab,.legend-dot,.section-copy,.pdf-status,.readonly-value small):not(.ax *){font-size:12px!important}
html body.ui-unified #content :is(small,.ds-hint):not(.ax *){font-size:12px!important}
html body.ui-unified #content :is(.machine-pending-badge,.machine-pending-reason):not(.ax *){display:inline-flex;align-items:center;height:22px;padding:0 9px!important;border-radius:99px!important}

/* ---------- 17. Responsivo ---------- */
@media(max-width:1100px){
 html body.ui-unified #content :is(.v460-toolbar,.v4-filterbar,.ds-toolbar,.installed-filter-grid):not(.ax *)>:is(.grow,.filter-search,.v4-searchbox){grid-column:1/-1}
}
@media(max-width:900px){
 html body.ui-unified #content :is(.v4-page-head,.standard-page-head,.model-page-head,.client-page-head,.wallet-page-head,.ds-page-head,.contract-toolbar,.service-toolbar):not(.ax *),
 html body.ui-unified #content>h2:first-child:not(.ax *){padding-left:50px!important;min-height:38px!important}
 html body.ui-unified #content>h2+p.sub:not(.ax *){padding-left:50px}
 html body.ui-unified #content :is(.v4-panel-head,.ds-panel-head,.client-panel-head,.wallet-section-head):not(.ax *){padding:10px 14px!important}
 html body.ui-unified #content :is(.card,.settings-section,.wallet-action-card,.wallet-balance-card):not(.ax *){padding:14px!important}
 html body.ui-unified #content :is(.client-tabs,.settings-tabs,.ds-segmented,.client-detail-tabs):not(.ax *){flex-wrap:nowrap!important;overflow-x:auto!important;scrollbar-width:none}
 html body.ui-unified #content table:not(.ax-table):not(.ax *) :is(th,td):first-child{padding-left:14px!important}
 html body.ui-unified #content table:not(.ax-table):not(.ax *) :is(th,td):last-child{padding-right:14px!important}
}
@media(max-width:700px){
 html body.ui-unified #content :is(.formgrid,.ds-form-grid,.machine-form-grid):not(.ax *){grid-template-columns:minmax(0,1fr)!important}
 html body.ui-unified #content :is(.formgrid,.ds-form-grid,.machine-form-grid):not(.ax *)>:is(.span2){grid-column:1/-1!important}
 html body.ui-unified #content :is(.v460-toolbar,.v4-filterbar,.ds-toolbar,.installed-filter-grid,.event-filterbar):not(.ax *){grid-template-columns:repeat(2,minmax(0,1fr))!important;padding:12px 14px!important}
 html body.ui-unified #content :is(.v460-toolbar,.v4-filterbar,.ds-toolbar,.installed-filter-grid):not(.ax *)>:is(.grow,.filter-search,.v4-searchbox,.ds-filter-disclosure){grid-column:1/-1}
 html body.ui-unified #content :is(.v4-metrics,.ds-kpis,.ds-metrics,.security-kpis,.kpi-row):not(.ax *){grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
 html body.ui-unified #content :is(.v4-kpi,.ds-kpi,.ds-metric):not(.ax *){min-height:76px!important;padding:12px!important}
 html body.ui-unified #content :is(.v4-kpi b,.ds-kpi .k-value,.ds-metric>b):not(.ax *){font-size:17px!important}
 html body.ui-unified #content :is(.v4-kpi-icon,.ds-kpi .k-icon):not(.ax *){display:none!important}
}
@media(prefers-reduced-motion:reduce){html body.ui-unified #content *{transition:none!important;animation:none!important}}

/* ---------- 18. Etapas da ficha de equipamento: abas de duas linhas (mesmo padrão de abas) ---------- */
html body.ui-unified #content .machine-editor-tabs:not(.ax *){display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:4px!important;margin:0 0 14px!important;padding:6px!important;border:1px solid var(--ax-card-line)!important;border-radius:12px!important;background:#fff!important;box-shadow:var(--ax-shadow)!important}
html body.ui-unified #content .machine-editor-tab:not(.ax *){display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center!important;gap:2px!important;min-height:52px!important;padding:8px 14px!important;border:0!important;border-radius:9px!important;background:transparent!important;box-shadow:none!important;text-align:left;color:var(--ax-soft)!important;font-family:inherit;transition:background-color .15s,color .15s!important}
html body.ui-unified #content .machine-editor-tab:not(.ax *) b{font-size:13.5px!important;font-weight:600!important;line-height:1.25!important;color:inherit!important}
html body.ui-unified #content .machine-editor-tab:not(.ax *) small{margin:0!important;font-size:12px!important;color:var(--ax-mute)!important}
html body.ui-unified #content .machine-editor-tab:not(.ax *):hover{background:var(--ax-surface-2)!important;color:var(--ax-ink)!important}
html body.ui-unified #content .machine-editor-tab.active:not(.ax *){background:#fbeceb!important;color:var(--ax-red)!important}
html body.ui-unified #content .machine-editor-tab.active:not(.ax *)::after{content:none!important}
/* Barra de ações da ficha (contexto + Cancelar/Salvar), contextual e sem flutuar */
html body.ui-unified #content .sticky-actions.machine-editor-actions:not(.ax *){justify-content:space-between!important;padding:12px 18px!important;margin-top:4px!important;border:1px solid var(--ax-card-line)!important;border-radius:var(--ax-r-card)!important;background:#fff!important;box-shadow:var(--ax-shadow)!important}
html body.ui-unified #content .machine-action-context:not(.ax *) b{display:block;font-size:14px!important;font-weight:600!important}
html body.ui-unified #content .machine-action-context:not(.ax *) span{display:block;font-size:12px!important;color:var(--ax-mute)!important}
html body.ui-unified #content .machine-action-buttons:not(.ax *){display:flex;gap:8px}
@media(max-width:900px){html body.ui-unified #content .machine-editor-tabs:not(.ax *){grid-template-columns:repeat(2,minmax(0,1fr))!important}}
/* ---------- 19. Título de seção dentro de cartão (sem recuo duplo) ---------- */
html body.ui-unified #content .v461-section-head:not(.ax *){display:flex!important;align-items:flex-start;justify-content:space-between;gap:8px 12px;margin:0 0 12px!important;padding:0 0 10px!important;min-height:0!important;border:0!important;border-bottom:1px solid var(--ax-line-2)!important;background:none!important}
html body.ui-unified #content .v461-section-head:not(.ax *) :is(h2,h3){margin:0!important;font-size:var(--ax-fs-section)!important;font-weight:600!important;line-height:1.3!important}
html body.ui-unified #content .v461-section-head:not(.ax *) p{margin:2px 0 0!important;font-size:12.5px!important;color:var(--ax-mute)!important}
html body.ui-unified #content .v461-info-card:not(.ax *){padding:16px 18px!important;border:1px solid var(--ax-card-line)!important;border-radius:var(--ax-r-card)!important;background:#fff!important;box-shadow:none!important}

/* ---------- 20. Exceções de mobile documentadas ---------- */
/* Pedidos do Dashboard Owner: no ≤700 a tabela já vira cartões (grid legado); o padrão de célula não pode reintroduzir recuo/altura */
@media(max-width:700px){
 html body.ui-unified #content .dashboard-orders table:not(.ax *) td,html body.ui-unified #content .dashboard-orders table:not(.ax *) td:first-child,html body.ui-unified #content .dashboard-orders table:not(.ax *) td:last-child{height:auto!important;padding:0!important;border:0!important}
 html body.ui-unified #content .dashboard-orders table:not(.ax *) tr{padding:12px 14px!important;border-top:1px solid var(--ax-line-2)!important}
 html body.ui-unified #content .dashboard-orders table:not(.ax *) td:last-child{display:flex!important;align-items:center;justify-content:flex-end}
}
/* Linhas de lista do Design System (pedidos/avisos do Cliente): ação desce para a 2ª linha no telefone */
@media(max-width:520px){
 html body.ui-unified #content .ds-ledger-row:not(.ax *){grid-template-columns:minmax(0,1fr)!important;gap:8px!important}
 html body.ui-unified #content .ds-ledger-row:not(.ax *)>div:last-child{justify-content:flex-start!important;flex-wrap:wrap}
}
/* Carteira (Owner): painéis de abas — apenas um visível; nenhum deixa margem abaixo */
html body.ui-unified #content .wallet-owner-grid:not(.ax *)>.wallet-action-card{margin-bottom:0!important}

/* ---------- 21. Equipe e acessos: composição própria no tablet/mobile (mesmo padrão de Clientes do piloto) ---------- */
/* Linhas viram blocos; o filtro existente continua usando style.display na <tr> (sem !important em display de tr). */
@media(max-width:900px){
 html body.ui-unified #content #employeeTable:not(.ax *),html body.ui-unified #content #employeeTable:not(.ax *) tbody{display:block;min-width:0!important}
 html body.ui-unified #content #employeeTable:not(.ax *) thead{display:none}
 html body.ui-unified #content #employeeTable:not(.ax *) tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;align-items:center;padding:12px 4px;border-top:1px solid var(--ax-line-2)}
 html body.ui-unified #content #employeeTable:not(.ax *) tbody tr:first-child{border-top:0}
 html body.ui-unified #content #employeeTable:not(.ax *) td,html body.ui-unified #content #employeeTable:not(.ax *) td:first-child,html body.ui-unified #content #employeeTable:not(.ax *) td:last-child{display:block;height:auto!important;padding:0!important;border:0!important;width:auto!important;text-align:left!important}
 html body.ui-unified #content #employeeTable:not(.ax *) td:nth-child(1){grid-column:1;grid-row:1}
 html body.ui-unified #content #employeeTable:not(.ax *) td:nth-child(4){grid-column:2;grid-row:1;justify-self:end}
 html body.ui-unified #content #employeeTable:not(.ax *) td:nth-child(2),html body.ui-unified #content #employeeTable:not(.ax *) td:nth-child(3){grid-column:1;font-size:12.5px!important;color:var(--ax-soft)}
 html body.ui-unified #content #employeeTable:not(.ax *) td:nth-child(5){grid-column:2;grid-row:2;justify-self:end;font-size:12.5px!important;color:var(--ax-soft)}
 html body.ui-unified #content #employeeTable:not(.ax *) td:last-child{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px;margin-top:6px;white-space:normal!important}
 html body.ui-unified #content #employeeTable:not(.ax *) td:last-child>.btn{margin:0!important}
}


/* ---------- V12.5.21: correções visuais estritamente limitadas aos 7 itens reportados após V12.5.20 ---------- */
/* 1/2/3/4/6 — KPIs: contraste, alinhamento interno, ícones visíveis e mesma linguagem Owner/Cliente. */
html body.ui-unified #content :is(.ds-kpis,.ds-metrics,.v4-metrics,.kpi-row):not(.ax *){
  background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;overflow:visible!important;
}
html body.ui-unified #content :is(.ds-kpi,.v4-kpi,.ds-metric,.kpi-mini):not(.ax *){
  border-color:var(--ax-card-line)!important;background:#fff!important;
}
html body.ui-unified #content .ds-kpi:not(.ax *){align-items:flex-start!important}
html body.ui-unified #content .ds-kpi:not(.ax *)>div:first-child{
  display:grid!important;grid-template-rows:minmax(17px,auto) minmax(24px,auto) minmax(17px,auto);align-content:start;gap:2px;min-width:0;
}
html body.ui-unified #content .ds-metric:not(.ax *){
  display:grid!important;grid-template-rows:minmax(17px,auto) minmax(24px,auto) minmax(17px,auto);align-content:start!important;gap:2px!important;
}
html body.ui-unified #content .kpi-mini:not(.ax *){
  display:grid!important;grid-template-rows:minmax(17px,auto) minmax(24px,auto) minmax(17px,auto);align-content:start!important;gap:2px!important;
}
html body.ui-unified #content :is(.v4-kpi-icon,.ds-kpi .k-icon):not(.ax *){
  background:var(--ax-red-tint)!important;color:var(--ax-red)!important;border:1px solid #f2d2cf!important;
}
html body.ui-unified #content :is(.v4-kpi-icon,.ds-kpi .k-icon):not(.ax *) svg{
  display:block!important;width:18px!important;height:18px!important;stroke:currentColor!important;fill:none!important;stroke-width:1.8!important;stroke-linecap:round;stroke-linejoin:round;opacity:1!important;
}
html body.ui-unified #content .ds-kpi .k-icon:not(.ax *){font-size:0!important}

/* 1 — Dashboard Cliente: os dois cards irmãos terminam no mesmo eixo de base. */
html body.ui-unified[data-route="home"] #content .ds-dash-row{align-items:stretch!important}
html body.ui-unified[data-route="home"] #content .ds-dash-row>.ds-panel{height:100%!important;box-sizing:border-box!important}

/* 5 — remover o 'box branco fantasma' atrás/abaixo das faixas de KPIs (Meus Pedidos e Pedidos Recebidos). */
html body.ui-unified[data-route="history"] #content .ds-metrics,
html body.ui-unified[data-route="orders"] #content .ds-metrics{
  border:0!important;background:transparent!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important;
}

/* 7 — colunas financeiras: cabeçalho e valores compartilham o mesmo eixo à direita, com numerais tabulares. */
html body.ui-unified #content .owner-order-list .ds-order-list-head>span:nth-child(4),
html body.ui-unified #content .owner-order-list .ds-order-list-head>span:nth-child(5),
html body.ui-unified #content .owner-order-list .ds-order-list-row>div:nth-child(4),
html body.ui-unified #content .owner-order-list .ds-order-list-row>div:nth-child(5){
  text-align:right!important;font-variant-numeric:tabular-nums!important;
}
html body.ui-unified #content .customer-order-list .ds-order-list-head>span:nth-child(3),
html body.ui-unified #content .customer-order-list .ds-order-list-head>span:nth-child(4),
html body.ui-unified #content .customer-order-list .ds-order-list-row>div:nth-child(3),
html body.ui-unified #content .customer-order-list .ds-order-list-row>div:nth-child(4){
  text-align:right!important;font-variant-numeric:tabular-nums!important;
}

/* ---------- V12.5.22: ajuste básico e restrito — contraste + sidebar aprovada ---------- */
/* Sem mudança de layout, dimensões, grids, fluxos ou componentes. */
html body.ui-unified #appView>.amica-main{background:var(--ax-bg)!important}
html body.ui-unified #content :is(.card,.v4-panel,.ds-panel,.client-panel,.wallet-section,.wallet-action-card,.wallet-balance-card,.settings-section,.po-section,.model-section,.machine-hero-card,.machine-summary-card,.v461-panel,.report-section,.security-panel):not(.ax *){border-color:var(--ax-card-line)!important}
html body.ui-unified #content table:not(.ax-table):not(.ax *) th,
html body.ui-unified #content .ds-order-list-head:not(.ax *){background:#eef1f4!important;color:#566176!important;border-color:var(--ax-line)!important}
html body.ui-unified #content :is(.v4-kpi-copy>span,.ds-kpi .k-label,.ds-metric>span,.stat>small,.kpi-mini>span,.kpi-mini>small,.client-kpi>span,.v4-kpi>span):not(.ax *){color:#596579!important}
html body.ui-unified #content :is(.ds-kpi .k-sub,.ds-metric>small,.v4-kpi>small):not(.ax *){color:#667085!important}

/* ---------- V12.5.23: unificação KPI + Meu Cadastro — sem alteração funcional ---------- */
/* Owner e Cliente compartilham anatomia visual de KPI: label → valor → descrição + tile de ícone. */
html body.ui-unified #content :is(.ds-kpis,.v4-metrics,.dashboard-kpis):not(.ax *){
  align-items:stretch!important;
}
html body.ui-unified #content :is(.ds-kpi,.v4-kpi,.dashboard-kpi):not(.ax *){
  min-height:96px!important;height:auto!important;padding:14px 16px!important;align-items:center!important;
}
html body.ui-unified #content :is(.ds-kpi,.v4-kpi,.dashboard-kpi):not(.ax *)>div:first-child{
  display:grid!important;grid-template-rows:auto auto auto;align-content:center;gap:3px;min-width:0!important;
}
html body.ui-unified #content :is(.ds-kpi .k-label,.v4-kpi-copy>span,.dashboard-kpi-top):not(.ax *){
  font-size:12px!important;font-weight:500!important;line-height:1.3!important;color:#536174!important;text-transform:none!important;letter-spacing:0!important;
}
html body.ui-unified #content :is(.ds-kpi .k-value,.v4-kpi b,.dashboard-kpi-value):not(.ax *){
  margin:0!important;font-size:20px!important;font-weight:600!important;line-height:1.15!important;color:var(--ax-ink)!important;
}
html body.ui-unified #content :is(.ds-kpi .k-sub,.v4-kpi small):not(.ax *){
  margin:0!important;font-size:12px!important;line-height:1.35!important;color:#667085!important;
}
html body.ui-unified #content :is(.v4-kpi-icon,.ds-kpi .k-icon,.dashboard-kpi-icon):not(.ax *){
  flex:none!important;width:36px!important;height:36px!important;border-radius:10px!important;display:grid!important;place-items:center!important;
  background:var(--ax-red-tint)!important;color:var(--ax-red)!important;border:1px solid #f0c9c5!important;
}
html body.ui-unified #content :is(.v4-kpi-icon,.ds-kpi .k-icon,.dashboard-kpi-icon):not(.ax *) svg{
  width:18px!important;height:18px!important;display:block!important;stroke:currentColor!important;fill:none!important;stroke-width:1.8!important;stroke-linecap:round!important;stroke-linejoin:round!important;opacity:1!important;
}

/* Meu Cadastro: cards irmãos compartilham mesma anatomia, header e início do conteúdo. */
html body.ui-unified[data-route="profile"] #content .ds-profile-grid{align-items:stretch!important}
html body.ui-unified[data-route="profile"] #content .ds-profile-grid>.ds-panel{height:100%!important;display:flex!important;flex-direction:column!important}
html body.ui-unified[data-route="profile"] #content .ds-profile-grid>.ds-panel>.ds-panel-head{min-height:56px!important;box-sizing:border-box!important;align-items:center!important}
html body.ui-unified[data-route="profile"] #content .ds-profile-grid>.ds-panel>.ds-panel-body{flex:1 1 auto!important;padding-top:10px!important}
html body.ui-unified[data-route="profile"] #content .ds-data-list>div{min-height:40px!important;box-sizing:border-box!important}
html body.ui-unified[data-route="profile"] #content .ds-data-list dd{overflow-wrap:anywhere!important;word-break:normal!important}

/* ---------- V12.5.25: acabamento curto aprovado ---------- */
/* 1. Hierarquia: títulos em negrito em todos os perfis. Somente títulos; labels/corpo permanecem leves. */
html body.ui-unified #content :is(h1,h2,h3,h4):not(.ax *){font-weight:700!important}
html body #modalRoot .modal :is(h2,h3,h4){font-weight:700!important}
html body .ds-drawer :is(h2,h3,h4){font-weight:700!important}

/* 2. Fichas/formulários internos: centralização real dentro da área útil após a sidebar. */
html body.ui-unified #content>:is(.client-detail-heading,.ax-w-detail),
html body.ui-unified #content>:is(.client-detail-heading,.ax-w-detail)~*{
  width:min(100%,var(--ax-w-detail))!important;
  max-width:var(--ax-w-detail)!important;
  margin-left:auto!important;
  margin-right:auto!important;
  box-sizing:border-box!important;
}
/* O cabeçalho e o painel da ficha do cliente compartilham exatamente o mesmo eixo. */
html body.ui-unified #content>.client-detail-heading+ .client-detail-panel{
  width:min(100%,var(--ax-w-detail))!important;
  max-width:var(--ax-w-detail)!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
