/* Item 18 (padronização visual): CSS legado em camada (ver crm-ui.css). As declarações !important genéricas que a ponte substitui
   ficaram normais (cópia em @layer legacy-imp, no fim, mantendo a prioridade sobre o restante do legado); as demais seguem !important. */
@layer legacy {
/* Camada visual Smart3Lab — única fonte de acabamento, carregada após layout.css. */
:root {
  --smart3-bg: #f3f5f7;
  --smart3-surface: #ffffff;
  --smart3-surface-soft: #f7f9fa;
  --smart3-text: #17232d;
  --smart3-muted: #78858f;
  --smart3-border: #d9e1e7;
  --smart3-primary: #17668f;
  --smart3-primary-hover: #105477;
  --smart3-navy: #154a65;
  --smart3-radius: 16px;
  --smart3-shadow: 0 10px 30px rgba(23, 35, 45, .08);
  --font-system: Inter, "Segoe UI", Arial, sans-serif;
  --color-bg: var(--smart3-bg);
  --color-surface: var(--smart3-surface);
  --color-surface-muted: var(--smart3-surface-soft);
  --color-text: var(--smart3-text);
  --color-muted: var(--smart3-muted);
  --color-border: var(--smart3-border);
  --color-primary: var(--smart3-primary);
  --color-primary-strong: var(--smart3-primary-hover);
  --shadow-soft: var(--smart3-shadow);
  --shadow-subtle: 0 4px 16px rgba(23, 35, 45, .06);
}

body:not(.login-screen) {
  background: var(--smart3-bg);
}

.app-topbar {
  border-bottom: 1px solid var(--smart3-border);
  background: rgba(255, 255, 255, .98);
  box-shadow: none;
  backdrop-filter: none;
}

.menu-cluster {
  border-radius: 11px;
  background: transparent;
}

.menu-cluster:hover,
.menu-cluster:focus-within,
.menu-cluster.is-active {
  background: #edf3f6;
}

.app-main,
.app-shell { width: min(1600px, calc(100% - 40px)); }

.app-card,
.data-panel,
.kpi-card,
.daily-summary,
.dashboard-hero-card,
.ios-calendar-widget {
  border: 1px solid var(--smart3-border);
  border-radius: var(--smart3-radius);
  background: var(--smart3-surface);
  box-shadow: var(--smart3-shadow);
  backdrop-filter: none;
}

.app-card.padded,
.data-panel.padded { padding: 24px; }

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea,
.field-group input,
.field-group select,
.field-group textarea {
  border: 1px solid #cbd6de;
  border-radius: 11px;
  background: #fff;
  color: var(--smart3-text);
  box-shadow: none;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
.field-group input,
.field-group select { min-height: 48px; }

input:focus,
select:focus,
textarea:focus {
  border-color: var(--smart3-primary);
  box-shadow: 0 0 0 2px rgba(23, 102, 143, .12);
}

.primary-button,
.button.primary,
button[type="submit"] {
  min-height: 46px;
  background: var(--smart3-primary);
}

.primary-button:hover,
.button.primary:hover,
button[type="submit"]:hover { background: var(--smart3-primary-hover); }

.data-table-container,
.table-shell,
.table-wrapper {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--smart3-border);
  border-radius: 14px;
  background: #fff;
}

table { border-collapse: separate; border-spacing: 0; }
thead th {
  background: #f5f7f8;
  color: #52616c;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
}
tbody td { border-bottom-color: #e7ecef; }

/* Login medido diretamente no criador.smart3lab.com. */

:root.theme-dim {
  --smart3-bg: #27313a;
  --smart3-surface: #35414b;
  --smart3-surface-soft: #3e4a54;
  --smart3-text: #f3f6f8;
  --smart3-muted: #b6c0c7;
  --smart3-border: #53606a;
}
:root.theme-dark {
  --smart3-bg: #0f171e;
  --smart3-surface: #18242d;
  --smart3-surface-soft: #22313b;
  --smart3-text: #f4f7f9;
  --smart3-muted: #aebbc4;
  --smart3-border: #344550;
}
:root.theme-dim body:not(.login-screen),
:root.theme-dark body:not(.login-screen) { background: var(--smart3-bg); }
:root.theme-dim .app-topbar,
:root.theme-dark .app-topbar { border-color: var(--smart3-border); background: #121d25; }
:root.theme-dim .app-topbar .app-logo,
:root.theme-dark .app-topbar .app-logo { background: #fff !important; }
:root.theme-dim .menu-cluster:hover,
:root.theme-dim .menu-cluster.is-active,
:root.theme-dark .menu-cluster:hover,
:root.theme-dark .menu-cluster.is-active { background: #22323d; }
:root.theme-dim .app-card,
:root.theme-dim .data-panel,
:root.theme-dim .kpi-card,
:root.theme-dark .app-card,
:root.theme-dark .data-panel,
:root.theme-dark .kpi-card { border-color: var(--smart3-border); background: var(--smart3-surface); color: var(--smart3-text); }
:root.theme-dim input,
:root.theme-dim select,
:root.theme-dim textarea,
:root.theme-dark input,
:root.theme-dark select,
:root.theme-dark textarea { border-color: var(--smart3-border); background: var(--smart3-surface-soft); color: var(--smart3-text); }

/* Agenda (.product-selection-result / .purchase-link-*): movido para op-agenda-novo.css (R9 W3-B). */

/* Controles de rolagem mais largos e fáceis de localizar. */
html,
* {
  scrollbar-width: auto;
  scrollbar-color: #718795 #dce4e9;
}
*::-webkit-scrollbar { width: 15px; height: 15px; }
*::-webkit-scrollbar-track {
  background: #dce4e9;
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb {
  min-height: 44px;
  border: 3px solid #dce4e9;
  border-radius: 999px;
  background: #718795;
}
*::-webkit-scrollbar-thumb:hover { background: #526b7a; }
:root.theme-dim *,
:root.theme-dark * { scrollbar-color: #8195a2 #1a2730; }
:root.theme-dim *::-webkit-scrollbar-track,
:root.theme-dark *::-webkit-scrollbar-track { background: #1a2730; }
:root.theme-dim *::-webkit-scrollbar-thumb,
:root.theme-dark *::-webkit-scrollbar-thumb {
  border-color: #1a2730;
  background: #8195a2;
}

/* Menu superior: ícones maiores, rótulos abaixo e estados de acessibilidade. */
.app-topbar .menu-cluster { min-width: 64px; gap: 3px; }
.app-topbar .nav-icon-button {
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 5px;
}
.app-topbar .nav-icon,
.app-topbar .nav-icon-button .nav-icon,
.app-topbar .nav-icon .ui-svg-icon {
  width: 30px;
  height: 30px;
}
:root[data-icon-size="large"] .app-topbar .nav-icon-button {
  width: 48px !important;
  min-width: 48px !important;
  height: 48px !important;
  min-height: 48px !important;
}
:root[data-icon-size="large"] .app-topbar .nav-icon,
:root[data-icon-size="large"] .app-topbar .nav-icon .ui-svg-icon {
  width: 36px !important;
  height: 36px !important;
}
:root[data-icon-size="xlarge"] .app-topbar .nav-icon-button {
  width: 54px !important;
  min-width: 54px !important;
  height: 54px !important;
  min-height: 54px !important;
}
:root[data-icon-size="xlarge"] .app-topbar .nav-icon,
:root[data-icon-size="xlarge"] .app-topbar .nav-icon .ui-svg-icon {
  width: 42px !important;
  height: 42px !important;
}


/* Mega menu Smart3: painel amplo, descritivo e com abertura suave. */
.app-topbar .menu-dropdown {
  position: fixed;
  inset: var(--topbar-height, 72px) 0 auto 0;
  width: 100vw;
  min-width: 0;
  max-height: min(520px, calc(100dvh - var(--topbar-height, 72px) - 24px));
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  padding: 26px max(32px, calc((100vw - 1500px) / 2)) 30px;
  overflow-y: auto;
  border: 0;
  border-top: 1px solid var(--smart3-border);
  border-bottom: 1px solid var(--smart3-border);
  border-radius: 0 0 22px 22px;
  background: rgba(250, 252, 253, .985);
  box-shadow: 0 24px 46px rgba(23, 35, 45, .13);
  backdrop-filter: blur(18px) saturate(125%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-14px);
  transform-origin: top center;
  transition: opacity 210ms ease, transform 240ms cubic-bezier(.22, 1, .36, 1), visibility 0s linear 240ms;
}
.app-topbar .menu-cluster.is-open .menu-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;
}
.mega-menu-intro {
  align-self: start;
  padding: 8px 4px;
}
.mega-menu-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--ui-accent-text);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.mega-menu-intro h2 {
  margin: 0;
  color: var(--smart3-text);
  font-size: clamp(1.55rem, 2.2vw, 2.15rem);
  line-height: 1.05;
  letter-spacing: -.035em;
}
.mega-menu-intro p {
  margin: 10px 0 0;
  color: var(--smart3-muted);
  font-size: .94rem;
  line-height: 1.5;
}
.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 10px 14px;
}
.app-topbar .menu-dropdown .mega-menu-item {
  min-width: 0;
  min-height: 76px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: var(--smart3-text);
  background: transparent;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.app-topbar .menu-dropdown .mega-menu-item:hover,
.app-topbar .menu-dropdown .mega-menu-item:focus-visible,
.app-topbar .menu-dropdown .mega-menu-item.is-active {
  border-color: #d5e4eb;
  background: #fff;
  box-shadow: 0 8px 22px rgba(23, 35, 45, .07);
  transform: translateY(-1px);
}
.mega-menu-item-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--smart3-primary-hover);
  background: #e7f1f5;
  font-size: 1.22rem;
  font-weight: 800;
}
.mega-menu-item-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.mega-menu-item-copy strong {
  color: inherit;
  font-size: .93rem;
  line-height: 1.2;
}
.mega-menu-item-copy > span {
  color: var(--smart3-muted);
  font-size: .78rem;
  line-height: 1.35;
}
.mega-menu-item-arrow {
  color: #8da0ab;
  font-size: 1.4rem;
  transition: transform 160ms ease, color 160ms ease;
}
.mega-menu-item:hover .mega-menu-item-arrow,
.mega-menu-item:focus-visible .mega-menu-item-arrow {
  color: var(--ui-accent-text);
  transform: translateX(3px);
}

/* Superfícies, formulários e tabelas mais leves e legíveis. */
.app-card,
.data-panel,
.module-workspace {
  box-shadow: 0 8px 24px rgba(23, 35, 45, .055);
}
main input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
main select,
main textarea {
  background: #fbfcfd;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}
main input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):hover,
main select:hover,
main textarea:hover {
  border-color: #aebdc7;
  background: #fff;
}
main .filter-group > span,
main .field-group > label,
main label.filter-group > span {
  color: #52616c;
  font-size: .76rem;
  font-weight: 750;
  letter-spacing: .035em;
}
main table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
main table thead th {
  min-height: 46px;
  padding: 12px 13px;
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: normal; /* R9 W2 (pedido W3): sem !important e sem quebrar cabeçalho no meio da palavra */
  line-height: 1.25;
}
main table tbody td {
  min-height: 50px;
  padding: 12px 13px;
  vertical-align: middle;
  line-height: 1.4;
  transition: background-color 130ms ease;
}
main table tbody tr:nth-child(even) td {
  background: rgba(245, 248, 249, .58);
}
main table tbody tr:hover td {
  background: #edf6f9;
}
.table-scroll,
.table-responsive,
[class*="table-wrapper"],
.data-table-container,
.preview-table-container,
.validation-table-wrap {
  scrollbar-width: auto;
  scrollbar-color: #8195a2 #e8edf0;
  scrollbar-gutter: stable;
}
.table-scroll::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar,
[class*="table-wrapper"]::-webkit-scrollbar,
.data-table-container::-webkit-scrollbar,
.preview-table-container::-webkit-scrollbar,
.validation-table-wrap::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
.table-scroll::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb,
[class*="table-wrapper"]::-webkit-scrollbar-thumb,
.data-table-container::-webkit-scrollbar-thumb,
.preview-table-container::-webkit-scrollbar-thumb,
.validation-table-wrap::-webkit-scrollbar-thumb {
  min-width: 46px;
  border: 3px solid #e8edf0;
  border-radius: 999px;
  background: #8195a2;
}
.app-button,
.app-button-secondary,
.primary-button,
.button {
  transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease, border-color 150ms ease;
}
.app-button:hover,
.app-button-secondary:hover,
.primary-button:hover,
.button:hover {
  transform: translateY(-1px);
}

:root.theme-dim .app-topbar .menu-dropdown,
:root.theme-dark .app-topbar .menu-dropdown {
  border-color: var(--color-border);
  background: rgba(25, 36, 45, .985);
}
:root.theme-dim .mega-menu-intro h2,
:root.theme-dark .mega-menu-intro h2,
:root.theme-dim .mega-menu-item-copy strong,
:root.theme-dark .mega-menu-item-copy strong {
  color: var(--color-text);
}
:root.theme-dim .app-topbar .menu-dropdown .mega-menu-item:hover,
:root.theme-dim .app-topbar .menu-dropdown .mega-menu-item:focus-visible,
:root.theme-dim .app-topbar .menu-dropdown .mega-menu-item.is-active,
:root.theme-dark .app-topbar .menu-dropdown .mega-menu-item:hover,
:root.theme-dark .app-topbar .menu-dropdown .mega-menu-item:focus-visible,
:root.theme-dark .app-topbar .menu-dropdown .mega-menu-item.is-active {
  border-color: #425562;
  background: #24343f;
}
:root.theme-dim .mega-menu-item-icon,
:root.theme-dark .mega-menu-item-icon {
  color: #8ed5ef;
  background: #273e4b;
}
:root.theme-dim main table tbody tr:nth-child(even) td,
:root.theme-dark main table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, .018);
}
:root.theme-dim main table tbody tr:hover td,
:root.theme-dark main table tbody tr:hover td {
  background: #263a47;
}

@media (max-width: 1100px) {
  .app-topbar .menu-dropdown { display: none; }
}

/* QA visual 3 temas: controles, linhas e estados sempre distinguíveis. */
.app-button,
.app-button-primary,
.primary-button,
.button.primary,
button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid #105477;
  border-radius: 10px !important;
  background-color: var(--smart3-primary);
  background-image: none;
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.app-button:hover,
.app-button:focus-visible,
.app-button-primary:hover,
.app-button-primary:focus-visible,
.primary-button:hover,
.primary-button:focus-visible,
.button.primary:hover,
.button.primary:focus-visible,
button[type="submit"]:hover,
button[type="submit"]:focus-visible {
  border-color: #0b435f;
  background-color: var(--smart3-primary-hover);
  color: #ffffff;
}
.app-button-secondary,
.button:not(.primary):not(.danger),
button.secondary,
button.ghost {
  border: 1px solid #91a2ae;
  background-color: #ffffff;
  background-image: none;
  color: #243743;
}
.app-button-secondary:hover,
.app-button-secondary:focus-visible,
.button:not(.primary):not(.danger):hover,
.button:not(.primary):not(.danger):focus-visible,
button.secondary:hover,
button.secondary:focus-visible,
button.ghost:hover,
button.ghost:focus-visible {
  border-color: #607b8c;
  background-color: #eaf1f5;
  color: #102b3b;
}
.app-button[disabled],
.app-button-primary[disabled],
.app-button-secondary[disabled],
.primary-button[disabled],
.button[disabled],
button[disabled] {
  border-color: #aebbc4;
  background-color: #e4e9ec;
  color: #5b6871;
  opacity: 1;
}
main table thead th {
  border-top: 1px solid #cbd6de;
  border-bottom: 1px solid #aebdc7;
  color: #41535f;
}
main table tbody td { border-bottom: 1px solid #d8e0e5; }
main table tbody tr:last-child td { border-bottom-color: #c5d0d7; }
.modal-content,
[role="dialog"] {
  border-color: var(--smart3-border);
  color: var(--smart3-text);
}

:root.theme-dim .app-button,
:root.theme-dark .app-button,
:root.theme-dim .app-button-primary,
:root.theme-dark .app-button-primary,
:root.theme-dim .primary-button,
:root.theme-dark .primary-button,
:root.theme-dim .button.primary,
:root.theme-dark .button.primary,
:root.theme-dim button[type="submit"],
:root.theme-dark button[type="submit"] {
  border-color: #72c4e5;
  background-color: #197cab;
  color: #ffffff;
}
:root.theme-dim .app-button-secondary,
:root.theme-dark .app-button-secondary,
:root.theme-dim .button:not(.primary):not(.danger),
:root.theme-dark .button:not(.primary):not(.danger),
:root.theme-dim button.secondary,
:root.theme-dark button.secondary,
:root.theme-dim button.ghost,
:root.theme-dark button.ghost {
  border-color: #718592;
  background-color: #2b3b46;
  color: #f7fafc;
}
:root.theme-dim .app-button-secondary:hover,
:root.theme-dark .app-button-secondary:hover,
:root.theme-dim .app-button-secondary:focus-visible,
:root.theme-dark .app-button-secondary:focus-visible,
:root.theme-dim .button:not(.primary):not(.danger):hover,
:root.theme-dark .button:not(.primary):not(.danger):hover,
:root.theme-dim .button:not(.primary):not(.danger):focus-visible,
:root.theme-dark .button:not(.primary):not(.danger):focus-visible {
  border-color: #9eb0ba;
  background-color: #3a4c58;
  color: #ffffff;
}
:root.theme-dim .app-button[disabled],
:root.theme-dark .app-button[disabled],
:root.theme-dim .app-button-primary[disabled],
:root.theme-dark .app-button-primary[disabled],
:root.theme-dim .app-button-secondary[disabled],
:root.theme-dark .app-button-secondary[disabled],
:root.theme-dim button[disabled],
:root.theme-dark button[disabled] {
  border-color: #566873;
  background-color: #293740;
  color: #aebcc5;
  opacity: 1;
}
:root.theme-dim main table thead th,
:root.theme-dark main table thead th {
  border-top-color: #536875;
  border-bottom-color: #6b818e;
  background: #22313b;
  color: #e5edf2;
}
:root.theme-dim main table tbody td,
:root.theme-dark main table tbody td { border-bottom-color: #455a67; }
:root.theme-dim .data-table-container,
:root.theme-dark .data-table-container,
:root.theme-dim .table-shell,
:root.theme-dark .table-shell,
:root.theme-dim .table-wrapper,
:root.theme-dark .table-wrapper {
  border-color: #536875;
  background: var(--smart3-surface);
}
:root.theme-dim .modal-content,
:root.theme-dark .modal-content,
:root.theme-dim [role="dialog"],
:root.theme-dark [role="dialog"] {
  border-color: #607480;
  background: var(--smart3-surface);
  color: var(--smart3-text);
}
}

@layer legacy-imp {
body:not(.login-screen) { background: var(--smart3-bg); }
.app-topbar { border-bottom: 1px solid var(--smart3-border); background: rgba(255, 255, 255, .98); box-shadow: none; backdrop-filter: none; }
.menu-cluster { background: transparent; }
.menu-cluster:hover, .menu-cluster:focus-within, .menu-cluster.is-active { background: #edf3f6; }
.app-card, .data-panel, .kpi-card, .daily-summary, .dashboard-hero-card, .ios-calendar-widget { border: 1px solid var(--smart3-border); border-radius: var(--smart3-radius); background: var(--smart3-surface); box-shadow: var(--smart3-shadow); backdrop-filter: none; }
.app-card.padded, .data-panel.padded { padding: 24px; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea, .field-group input, .field-group select, .field-group textarea { border: 1px solid #cbd6de; border-radius: 11px; background: #fff; color: var(--smart3-text); box-shadow: none; }
input:focus, select:focus, textarea:focus { border-color: var(--smart3-primary); box-shadow: 0 0 0 2px rgba(23, 102, 143, .12); }
.primary-button, .button.primary, button[type="submit"] { background: var(--smart3-primary); }
.primary-button:hover, .button.primary:hover, button[type="submit"]:hover { background: var(--smart3-primary-hover); }
.data-table-container, .table-shell, .table-wrapper { overflow: auto; border: 1px solid var(--smart3-border); border-radius: 14px; background: #fff; }
thead th { background: #f5f7f8; color: #52616c; font-size: .75rem; font-weight: 700; }
tbody td { border-bottom-color: #e7ecef; }
:root.theme-dim body:not(.login-screen), :root.theme-dark body:not(.login-screen) { background: var(--smart3-bg); }
:root.theme-dim .app-topbar, :root.theme-dark .app-topbar { border-color: var(--smart3-border); background: #121d25; }
:root.theme-dim .menu-cluster:hover, :root.theme-dim .menu-cluster.is-active, :root.theme-dark .menu-cluster:hover, :root.theme-dark .menu-cluster.is-active { background: #22323d; }
:root.theme-dim .app-card, :root.theme-dim .data-panel, :root.theme-dim .kpi-card, :root.theme-dark .app-card, :root.theme-dark .data-panel, :root.theme-dark .kpi-card { border-color: var(--smart3-border); background: var(--smart3-surface); color: var(--smart3-text); }
:root.theme-dim input, :root.theme-dim select, :root.theme-dim textarea, :root.theme-dark input, :root.theme-dark select, :root.theme-dark textarea { border-color: var(--smart3-border); background: var(--smart3-surface-soft); color: var(--smart3-text); }
.app-topbar .menu-dropdown { border: 0; border-top: 1px solid var(--smart3-border); border-bottom: 1px solid var(--smart3-border); background: rgba(250, 252, 253, .985); box-shadow: 0 24px 46px rgba(23, 35, 45, .13); }
.app-topbar .menu-dropdown .mega-menu-item { color: var(--smart3-text); }
.app-topbar .menu-dropdown .mega-menu-item:hover, .app-topbar .menu-dropdown .mega-menu-item:focus-visible, .app-topbar .menu-dropdown .mega-menu-item.is-active { background: #fff; }
.app-card, .data-panel, .module-workspace { box-shadow: 0 8px 24px rgba(23, 35, 45, .055); }
main input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), main select, main textarea { background: #fbfcfd; }
main input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):hover, main select:hover, main textarea:hover { border-color: #aebdc7; background: #fff; }
main table { border-collapse: separate; border-spacing: 0; }
main table thead th { padding: 12px 13px; line-height: 1.25; }
main table tbody td { padding: 12px 13px; }
main table tbody tr:hover td { background: #edf6f9; }
:root.theme-dim .app-topbar .menu-dropdown, :root.theme-dark .app-topbar .menu-dropdown { border-color: var(--color-border); background: rgba(25, 36, 45, .985); }
:root.theme-dim .app-topbar .menu-dropdown .mega-menu-item:hover, :root.theme-dim .app-topbar .menu-dropdown .mega-menu-item:focus-visible, :root.theme-dim .app-topbar .menu-dropdown .mega-menu-item.is-active, :root.theme-dark .app-topbar .menu-dropdown .mega-menu-item:hover, :root.theme-dark .app-topbar .menu-dropdown .mega-menu-item:focus-visible, :root.theme-dark .app-topbar .menu-dropdown .mega-menu-item.is-active { background: #24343f; }
:root.theme-dim main table tbody tr:hover td, :root.theme-dark main table tbody tr:hover td { background: #263a47; }
.app-button, .app-button-primary, .primary-button, .button.primary, button[type="submit"] { border: 1px solid #105477; background-color: var(--smart3-primary); background-image: none; color: #ffffff; }
.app-button:hover, .app-button:focus-visible, .app-button-primary:hover, .app-button-primary:focus-visible, .primary-button:hover, .primary-button:focus-visible, .button.primary:hover, .button.primary:focus-visible, button[type="submit"]:hover, button[type="submit"]:focus-visible { border-color: #0b435f; background-color: var(--smart3-primary-hover); color: #ffffff; }
.app-button-secondary, .button:not(.primary):not(.danger), button.secondary, button.ghost { border: 1px solid #91a2ae; background-color: #ffffff; background-image: none; color: #243743; }
.app-button-secondary:hover, .app-button-secondary:focus-visible, .button:not(.primary):not(.danger):hover, .button:not(.primary):not(.danger):focus-visible, button.secondary:hover, button.secondary:focus-visible, button.ghost:hover, button.ghost:focus-visible { border-color: #607b8c; background-color: #eaf1f5; color: #102b3b; }
.app-button[disabled], .app-button-primary[disabled], .app-button-secondary[disabled], .primary-button[disabled], .button[disabled], button[disabled] { border-color: #aebbc4; background-color: #e4e9ec; color: #5b6871; opacity: 1; }
main table thead th { border-top: 1px solid #cbd6de; border-bottom: 1px solid #aebdc7; color: #41535f; }
main table tbody td { border-bottom: 1px solid #d8e0e5; }
main table tbody tr:last-child td { border-bottom-color: #c5d0d7; }
.modal-content, [role="dialog"] { border-color: var(--smart3-border); color: var(--smart3-text); }
:root.theme-dim .app-button, :root.theme-dark .app-button, :root.theme-dim .app-button-primary, :root.theme-dark .app-button-primary, :root.theme-dim .primary-button, :root.theme-dark .primary-button, :root.theme-dim .button.primary, :root.theme-dark .button.primary, :root.theme-dim button[type="submit"], :root.theme-dark button[type="submit"] { border-color: #72c4e5; background-color: #197cab; color: #ffffff; }
:root.theme-dim .app-button-secondary, :root.theme-dark .app-button-secondary, :root.theme-dim .button:not(.primary):not(.danger), :root.theme-dark .button:not(.primary):not(.danger), :root.theme-dim button.secondary, :root.theme-dark button.secondary, :root.theme-dim button.ghost, :root.theme-dark button.ghost { border-color: #718592; background-color: #2b3b46; color: #f7fafc; }
:root.theme-dim .app-button-secondary:hover, :root.theme-dark .app-button-secondary:hover, :root.theme-dim .app-button-secondary:focus-visible, :root.theme-dark .app-button-secondary:focus-visible, :root.theme-dim .button:not(.primary):not(.danger):hover, :root.theme-dark .button:not(.primary):not(.danger):hover, :root.theme-dim .button:not(.primary):not(.danger):focus-visible, :root.theme-dark .button:not(.primary):not(.danger):focus-visible { border-color: #9eb0ba; background-color: #3a4c58; color: #ffffff; }
:root.theme-dim .app-button[disabled], :root.theme-dark .app-button[disabled], :root.theme-dim .app-button-primary[disabled], :root.theme-dark .app-button-primary[disabled], :root.theme-dim .app-button-secondary[disabled], :root.theme-dark .app-button-secondary[disabled], :root.theme-dim button[disabled], :root.theme-dark button[disabled] { border-color: #566873; background-color: #293740; color: #aebcc5; opacity: 1; }
:root.theme-dim main table thead th, :root.theme-dark main table thead th { border-top-color: #536875; border-bottom-color: #6b818e; background: #22313b; color: #e5edf2; }
:root.theme-dim main table tbody td, :root.theme-dark main table tbody td { border-bottom-color: #455a67; }
:root.theme-dim .data-table-container, :root.theme-dark .data-table-container, :root.theme-dim .table-shell, :root.theme-dark .table-shell, :root.theme-dim .table-wrapper, :root.theme-dark .table-wrapper { border-color: #536875; background: var(--smart3-surface); }
:root.theme-dim .modal-content, :root.theme-dark .modal-content, :root.theme-dim [role="dialog"], :root.theme-dark [role="dialog"] { border-color: #607480; background: var(--smart3-surface); color: var(--smart3-text); }/* R10 L2: declarações que eram !important na camada legacy e só precisam vencer o restante do legado. */
.app-topbar .app-logo { border: 0; }
.app-topbar .nav-icon-button { width: 42px; }
.app-topbar .menu-dropdown { gap: clamp(28px, 4vw, 70px); }
@media (prefers-reduced-motion: reduce) {
.app-topbar .menu-dropdown, .mega-menu-item, .mega-menu-item-arrow { transition: none; }
}
}

@layer ui-bridge {
/* R10 L2: declarações que eram !important na camada legacy e precisam vencer a ponte (ui-bridge do crm-ui.css). */
.primary-button, .button.primary, button[type="submit"] { box-shadow: 0 8px 18px rgba(16, 84, 119, .14); }
}
