/* Apenas apresentação do administrador; controles e estados hidden preservados. */
html body #crmApp.crm-admin-ui .hierarchy-summary-cards { gap:14px!important; }
html body #crmApp.crm-admin-ui .hierarchy-summary-cards .metric {
  padding:20px!important;min-height:110px!important;height:auto!important;
  border-radius:16px!important;box-shadow:none!important;
}
html body #crmApp.crm-admin-ui .hierarchy-summary-cards .metric-copy span { font-size:12px!important;line-height:1.5; }
html body #crmApp.crm-admin-ui .hierarchy-summary-cards .metric-copy strong { font-size:30px!important;line-height:1.2;margin-top:10px; }
html body #crmApp.crm-admin-ui #portfolioControlBar {
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;
  gap:18px!important;padding:20px 24px!important;min-height:0!important;
  border-radius:18px!important;box-shadow:none!important;
}
html body #crmApp.crm-admin-ui #portfolioControlBar #hierarchyToolbar {
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:16px!important;grid-row:1;width:100%!important;margin:0!important;
}
html body #crmApp.crm-admin-ui #portfolioControlBar .main-client-actions {
  display:flex!important;flex-wrap:wrap!important;align-items:center!important;
  gap:10px!important;grid-row:2;margin:0!important;padding:0!important;width:100%!important;
}
html body #crmApp.crm-admin-ui #portfolioControlBar .field {
  width:100%!important;max-width:100%!important;min-width:0!important;
  margin:0!important;font-size:12px!important;font-weight:600;line-height:1.5;
}
html body #crmApp.crm-admin-ui #portfolioControlBar .select {
  height:42px!important;min-height:42px!important;max-width:100%!important;
  width:100%!important;margin-top:6px;font-size:13px!important;border-radius:10px!important;
}
html body #crmApp.crm-admin-ui #portfolioControlBar .main-client-actions > .btn {
  height:auto!important;min-height:42px!important;padding:10px 14px!important;
  font-size:13px!important;line-height:1.4!important;border-radius:10px!important;
  box-shadow:none!important;transform:none!important;white-space:normal!important;
  word-break:normal!important;overflow-wrap:normal!important;
}
html body #crmApp.crm-admin-ui #portfolioControlBar .main-client-actions > .btn svg { width:16px!important;height:16px!important;flex-shrink:0!important; }
html body #crmApp.crm-admin-ui #portfolioControlBar .main-client-actions > .btn:not(#newCustomerBtn) {
  background:var(--surface)!important;color:var(--text)!important;
  -webkit-text-fill-color:var(--text)!important;border:1px solid var(--line-strong)!important;
}
html body #crmApp.crm-admin-ui #portfolioControlBar #newCustomerBtn {
  background:var(--text)!important;color:var(--surface)!important;-webkit-text-fill-color:var(--surface)!important;
}
/* Larguras próprias: ações cabem sem comprimir lembrete e atendimento. */
html body #crmApp.crm-admin-ui #view-carteira table:has(> tbody#portfolioRows) {
  table-layout:fixed!important;width:100%!important;min-width:1040px!important;
}
html body #crmApp.crm-admin-ui #view-carteira table:has(> tbody#portfolioRows) th {
  font-size:11px!important;padding:12px 10px!important;line-height:1.5;
  white-space:normal!important;word-break:normal!important;overflow-wrap:normal!important;
}
html body #crmApp.crm-admin-ui #view-carteira table:has(> tbody#portfolioRows) th:nth-child(1){width:18%}
html body #crmApp.crm-admin-ui #view-carteira table:has(> tbody#portfolioRows) th:nth-child(2){width:9%}
html body #crmApp.crm-admin-ui #view-carteira table:has(> tbody#portfolioRows) th:nth-child(3){width:10%}
html body #crmApp.crm-admin-ui #view-carteira table:has(> tbody#portfolioRows) th:nth-child(4){width:16%}
html body #crmApp.crm-admin-ui #view-carteira table:has(> tbody#portfolioRows) th:nth-child(5){width:13%}
html body #crmApp.crm-admin-ui #view-carteira table:has(> tbody#portfolioRows) th:nth-child(6){width:13%}
html body #crmApp.crm-admin-ui #view-carteira table:has(> tbody#portfolioRows) th:nth-child(7){width:21%}
html body #crmApp.crm-admin-ui #portfolioRows td {
  min-width:0!important;max-width:none!important;padding:14px 10px!important;
  font-size:13px!important;line-height:1.6!important;word-break:normal!important;overflow-wrap:normal!important;
}
html body #crmApp.crm-admin-ui #portfolioRows td small { font-size:11px!important;line-height:1.5; }
html body #crmApp.crm-admin-ui #portfolioRows .base-stage-actions {
  display:flex!important;flex-direction:column!important;gap:8px!important;
  min-width:0!important;width:100%!important;max-width:100%!important;
}
html body #crmApp.crm-admin-ui #portfolioRows .base-stage-buttons {
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;
  width:100%!important;min-width:0!important;max-width:100%!important;
}
html body #crmApp.crm-admin-ui #portfolioRows .base-stage-buttons > .row-actions { display:contents!important; }
html body #crmApp.crm-admin-ui #portfolioRows .base-stage-buttons .btn {
  position:static!important;grid-area:auto!important;order:0!important;flex:none!important;
  width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box;
  height:auto!important;min-height:40px!important;padding:7px!important;margin:0!important;
  font-size:12px!important;line-height:1.4!important;border-radius:9px!important;
  white-space:normal!important;word-break:normal!important;overflow-wrap:normal!important;
}
html body #crmApp.crm-admin-ui #portfolioRows .quick-stage {
  width:100%!important;min-width:0!important;max-width:100%!important;
  height:40px!important;min-height:40px!important;font-size:12px!important;border-radius:9px!important;
}
html body #crmApp.crm-admin-ui #portfolioRows .client-contact-actions { width:100%!important;gap:8px!important; }
html body #crmApp.crm-admin-ui #portfolioRows .client-contact-btn {
  width:100%!important;min-width:0!important;max-width:100%!important;
  height:auto!important;min-height:40px!important;padding:8px!important;font-size:12px!important;
}
/* Pedidos: separa Atendimento/Liberação e mantém valores e códigos legíveis. */
html body #crmApp.crm-admin-ui #view-pedidos .op-vendas-table th,
html body #crmApp.crm-admin-ui #view-pedidos .op-vendas-table td { padding:12px 8px!important; }
html body #crmApp.crm-admin-ui #view-pedidos .op-vendas-table th {
  font-size:11px!important;line-height:1.5!important;white-space:normal!important;
  word-break:normal!important;overflow-wrap:normal!important;
}
html body #crmApp.crm-admin-ui #view-pedidos .op-vendas-table td { font-size:12px!important;line-height:1.6; }
html body #crmApp.crm-admin-ui #view-pedidos .op-pill {
  display:inline-block;max-width:100%;box-sizing:border-box;border-radius:8px!important;
  font-size:11px;line-height:1.45;padding:5px 8px;word-break:normal;overflow-wrap:normal;
}
html body #crmApp.crm-admin-ui #view-pedidos .op-acoes .btn {
  height:auto!important;min-height:40px!important;max-width:100%!important;
  font-size:12px!important;line-height:1.4!important;padding:8px!important;border-radius:9px!important;
  white-space:normal!important;word-break:normal!important;overflow-wrap:normal!important;box-shadow:none!important;
}
@media(min-width:1051px) {
  html body #crmApp.crm-admin-ui #view-pedidos .op-vendas-admin th:nth-child(1){width:14%}
  html body #crmApp.crm-admin-ui #view-pedidos .op-vendas-admin th:nth-child(2){width:10%}
  html body #crmApp.crm-admin-ui #view-pedidos .op-vendas-admin th:nth-child(3){width:6%}
  html body #crmApp.crm-admin-ui #view-pedidos .op-vendas-admin th:nth-child(4){width:7%}
  html body #crmApp.crm-admin-ui #view-pedidos .op-vendas-admin th:nth-child(5){width:6%}
  html body #crmApp.crm-admin-ui #view-pedidos .op-vendas-admin th:nth-child(6){width:7%}
  html body #crmApp.crm-admin-ui #view-pedidos .op-vendas-admin th:nth-child(7){width:9%}
  html body #crmApp.crm-admin-ui #view-pedidos .op-vendas-admin th:nth-child(8){width:11%}
  html body #crmApp.crm-admin-ui #view-pedidos .op-vendas-admin th:nth-child(9){width:9%}
  html body #crmApp.crm-admin-ui #view-pedidos .op-vendas-admin th:nth-child(10){width:9%}
  html body #crmApp.crm-admin-ui #view-pedidos .op-vendas-admin th:nth-child(11){width:12%}
}
html body #crmApp.crm-admin-ui #portfolioControlBar [hidden],
html body #crmApp.crm-admin-ui #portfolioRows [hidden],
html body #crmApp.crm-admin-ui #portfolioRows tr[hidden] { display:none!important; }
@media(max-width:650px) {
  html body #crmApp.crm-admin-ui #portfolioControlBar { padding:16px!important; }
  html body #crmApp.crm-admin-ui #portfolioControlBar #hierarchyToolbar { grid-template-columns:minmax(0,1fr)!important; }
  html body #crmApp.crm-admin-ui #portfolioControlBar .main-client-actions { display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr)); }
  html body #crmApp.crm-admin-ui #portfolioControlBar .main-client-actions > .btn { min-width:0!important;width:100%!important;max-width:100%!important; }
}
