/* 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 {
:root {
  color-scheme: light;
  --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --color-bg: #eef3ff;
  --color-surface: #ffffff;
  --color-glass: rgba(255, 255, 255, 0.72);
  --color-glass-strong: rgba(255, 255, 255, 0.86);
  --color-surface-muted: #e7f0ff;
  --color-text: #18233d;
  --color-muted: #6c7895;
  --color-primary: #4e73ff;
  --color-primary-strong: #2f63f5;
  --color-success: #107c41;
  --color-warning: #b7791f;
  --color-danger: #b42318;
  --color-border: rgba(255, 255, 255, 0.55);
  --color-focus: #2f63f5;
  --shadow-soft: 0 28px 78px rgba(59, 78, 132, 0.18);
  --shadow-subtle: 0 16px 46px rgba(59, 78, 132, 0.12);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-button: 8px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --topbar-height: 82px;
  --dock-height: 28px;
  --color-bg-field: #ffffff;
  --color-text-main: #18233d;
  --color-surface-hover: #f5f5f7;
  --apple-blue: var(--color-primary);
  --apple-red: var(--color-danger);
  --apple-green: var(--color-success);
  --color-text-muted: var(--color-muted);
  font-family: var(--font-system);
  font-size: 16px;
  color: var(--color-text);
  background: var(--color-bg);
}

:root[data-font-size="large"] {
  font-size: 18px;
}

:root[data-font-size="xlarge"] {
  font-size: 20px;
}

:root[data-contrast="high"] {
  color-scheme: dark;
  --color-bg: #05070a;
  --color-surface: #111827;
  --color-glass: rgba(17, 24, 39, 0.78);
  --color-glass-strong: rgba(17, 24, 39, 0.92);
  --color-surface-muted: #1f2937;
  --color-text: #f9fafb;
  --color-muted: #d1d5db;
  --color-primary: #7ab7ff;
  --color-primary-strong: #b8dcff;
  --color-success: #7ee2a8;
  --color-warning: #ffd27a;
  --color-danger: #ff9b91;
  --color-border: #4b5563;
  --color-focus: #facc15;
  --shadow-soft: 0 18px 48px rgba(0, 0, 0, 0.35);
  --shadow-subtle: 0 8px 24px rgba(0, 0, 0, 0.28);
  --color-bg-field: #111827;
  --color-text-main: #f9fafb;
  --color-surface-hover: #1f2937;
}

:root.theme-dark {
  color-scheme: dark;
  --color-bg: #121a31;
  --color-surface: #161f35;
  --color-glass: rgba(22, 31, 53, 0.72);
  --color-glass-strong: rgba(24, 35, 60, 0.88);
  --color-surface-muted: #26344f;
  --color-text: #f5f7ff;
  --color-muted: #b8c2d8;
  --color-primary: #6e8bff;
  --color-primary-strong: #9fb1ff;
  --color-border: rgba(255, 255, 255, 0.12);
  --shadow-soft: 0 30px 82px rgba(0, 0, 0, 0.34);
  --shadow-subtle: 0 18px 50px rgba(0, 0, 0, 0.24);
  --color-bg-field: #161f35;
  --color-text-main: #f5f7ff;
  --color-surface-hover: #26344f;
}

:root.theme-dim {
  color-scheme: dark;
  --color-bg: #2d3139;
  --color-surface: #3a3f4b;
  --color-glass: rgba(58, 63, 75, 0.72);
  --color-glass-strong: rgba(58, 63, 75, 0.88);
  --color-surface-muted: #434957;
  --color-surface-hover: #4d5464;
  --color-text: #f3f4f6;
  --color-muted: #9ca3af;
  --color-primary: #818cf8;
  --color-primary-strong: #a5b4fc;
  --color-border: rgba(255, 255, 255, 0.08);
  --shadow-soft: 0 30px 82px rgba(0, 0, 0, 0.28);
  --shadow-subtle: 0 18px 50px rgba(0, 0, 0, 0.18);
  --color-bg-field: #3a3f4b;
  --color-text-main: #f3f4f6;
}

select option {
  background-color: var(--color-bg-field);
  color: var(--color-text-main);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-system);
  color: var(--color-text);
  background:
    radial-gradient(circle at 12% 6%, rgba(78, 115, 255, 0.22), transparent 29rem),
    radial-gradient(circle at 82% 10%, rgba(178, 151, 255, 0.26), transparent 24rem),
    radial-gradient(circle at 72% 88%, rgba(124, 164, 255, 0.16), transparent 32rem),
    linear-gradient(120deg, #eaf1ff 0%, #eef3ff 48%, #f1eeff 100%);
  background-attachment: fixed;
}

:root[data-contrast="high"] body {
  background: var(--color-bg);
}

:root.theme-dark body {
  background:
    radial-gradient(circle at 10% 8%, rgba(110, 139, 255, 0.20), transparent 30rem),
    radial-gradient(circle at 84% 14%, rgba(111, 76, 255, 0.16), transparent 25rem),
    radial-gradient(circle at 74% 88%, rgba(76, 126, 255, 0.12), transparent 34rem),
    linear-gradient(125deg, #0f172a 0%, #121a31 52%, #171433 100%);
}

:root.theme-dim body {
  background:
    radial-gradient(circle at 10% 8%, rgba(99, 102, 241, 0.14), transparent 30rem),
    radial-gradient(circle at 84% 14%, rgba(129, 140, 248, 0.10), transparent 25rem),
    linear-gradient(125deg, #242730 0%, #2d3139 52%, #353a44 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

:root[data-focus-highlight="on"] a:focus-visible,
:root[data-focus-highlight="on"] button:focus-visible,
:root[data-focus-highlight="on"] input:focus-visible,
:root[data-focus-highlight="on"] select:focus-visible,
:root[data-focus-highlight="on"] textarea:focus-visible,
:root[data-focus-highlight="on"] [tabindex]:focus-visible {
  outline-width: 4px;
  outline-color: #facc15;
  box-shadow: 0 0 0 7px rgba(250, 204, 21, 0.24);
}

img {
  max-width: 100%;
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 1000;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  color: #ffffff;
  background: var(--color-primary-strong);
  transform: translateY(-140%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Custom Accessibility Font Sizing for Menu */
:root {
  --menu-font-scale: 1;
  --icon-scale: 1;
}
:root[data-menu-font-size="large"] {
  --menu-font-scale: 1.25;
}
:root[data-menu-font-size="xlarge"] {
  --menu-font-scale: 1.5;
}

:root[data-icon-size="large"] {
  --icon-scale: 1.25;
}
:root[data-icon-size="xlarge"] {
  --icon-scale: 1.5;
}

/* Apply Menu Font Scale to navigation and drawer text elements */

.app-dock .dock-item strong,
.app-dock .dock-item span {
  font-size: calc(0.8rem * var(--menu-font-scale, 1));
}

/* Apply Icon Scale to general SVG/PNG icons and menu icons */
.ui-svg-icon,
.nav-icon .ui-svg-icon,
.nav-icon {
  transform: scale(var(--icon-scale, 1));
}


/* Custom Accessibility Font Sizing for Menu */
:root {
  --menu-font-scale: 1;
  --icon-scale: 1;
}
:root[data-menu-font-size="large"] {
  --menu-font-scale: 1.25;
}
:root[data-menu-font-size="xlarge"] {
  --menu-font-scale: 1.5;
}

:root[data-icon-size="large"] {
  --icon-scale: 1.25;
}

/* Apply Menu Font Scale to navigation and drawer text elements */
.nav-icon-label {
  font-size: calc(12.5px * var(--menu-font-scale, 1));
}

.menu-dropdown a {
  font-size: calc(14.4px * var(--menu-font-scale, 1));
}

/* Apply Icon Scale to general SVG/PNG icons and menu icons */


/* Ensure Accessibility widget is always visible, high contrast, and on top of all elements */

/* Standardized Page Headers (Module Hero) */
.module-hero {
  background:
    radial-gradient(circle at 88% 18%, rgba(78, 115, 255, 0.08), transparent 22rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.60));
  border: 1px solid rgba(255, 255, 255, 0.68);
  box-shadow: 0 15px 35px rgba(59, 78, 132, 0.06);
  border-radius: 20px;
  padding: 24px 32px;
  margin-bottom: 24px;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  align-items: flex-start;
}

:root.theme-dark .module-hero {
  border-color: rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 88% 18%, rgba(110, 139, 255, 0.16), transparent 22rem),
    linear-gradient(145deg, rgba(31, 43, 70, 0.88), rgba(22, 31, 53, 0.70));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
}

:root.theme-dim .module-hero {
  border-color: rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(circle at 88% 18%, rgba(99, 102, 241, 0.14), transparent 22rem),
    linear-gradient(145deg, rgba(58, 63, 75, 0.90), rgba(45, 49, 57, 0.75));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.module-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: 4px;
}

:root.theme-dark .module-eyebrow,
:root.theme-dim .module-eyebrow {
  color: #a5b4fc;
}

.module-hero-content {
  justify-content: space-between;
  align-items: center !important;
  gap: 20px !important;
  flex-wrap: wrap;
  width: 100%;
}

.module-hero-content h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0 0 6px 0;
  color: var(--color-text-main);
  letter-spacing: -0.02em;
}

.module-hero-content p {
  font-size: 0.92rem;
  margin: 0;
  color: var(--color-muted);
  font-weight: 500;
  line-height: 1.4;
}



/* ==========================================
   AJUSTES DE TABELA (DIVISÓRIAS SUAVES) E LAYOUT OVERFLOW
   ========================================== */
.placeholder-table th,
.placeholder-table td,
table.placeholder-table tr td,
table.placeholder-table tr th {
  border-bottom: 1px solid rgba(0, 0, 0, 0.09);
}

:root.theme-dark .placeholder-table th,
:root.theme-dark .placeholder-table td,
:root.theme-dark table.placeholder-table tr td,
:root.theme-dark table.placeholder-table tr th,
:root.theme-dim .placeholder-table th,
:root.theme-dim .placeholder-table td,
:root.theme-dim table.placeholder-table tr td,
:root.theme-dim table.placeholder-table tr th {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

/* Prevenção de estouro de campos em filtros de busca */

.readonly-field input,
.readonly-field select,
.readonly-field textarea,
.filter-item input,
.filter-item select,
.filter-group input,
.filter-group select,
input[type="text"],
input[type="search"],
input[type="email"],
select {
  box-sizing: border-box;
}




/* Cores semânticas aplicadas pelo menu.js apenas às ações fora das linhas de resultados. */
.crm-action-button--blue,
.crm-action-button--green {
  background-image: none;
  color: #ffffff;
  border-color: transparent;
  border-radius: var(--radius-button) !important;
  font-weight: 700 !important;
}

.crm-action-button--blue {
  background-color: var(--ui-accent);
}

.crm-action-button--blue:hover,
.crm-action-button--blue:focus-visible {
  background-color: #005bb5;
}

.crm-action-button--green {
  background-color: #107c41;
}

.crm-action-button--green:hover,
.crm-action-button--green:focus-visible {
  background-color: #0b6333;
}

.crm-action-button--blue:disabled,
.crm-action-button--green:disabled {
  opacity: 0.58;
}

/* Barra única de ações para páginas, consultas e relatórios. */
.module-section-heading {
  justify-content: space-between;
  flex-wrap: wrap;
}

.module-section-heading > :first-child {
  flex: 1 1 280px;
  min-width: 0;
}

.crm-action-toolbar {
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 !important;
}

.crm-action-toolbar > button,
.crm-action-toolbar > a,
.crm-action-toolbar > label.app-button,
.crm-action-toolbar > label.app-button-secondary {
  min-height: 42px;
}

.crm-action-helper {
  display: block;
  width: 100%;
  margin: -10px 0 20px;
  line-height: 1.5;
}

/* Controle de Vendas: regras exclusivas (.vendas-controle-page) migradas para op-vendas.css (R9 W3-D). */

/* Padrão único para áreas de pesquisa e campos de preenchimento. */
.crm-search-panel {
  display: grid !important;
  grid-template-columns: minmax(240px, 2fr) repeat(auto-fit, minmax(150px, 1fr)) !important;
  align-items: end;
  gap: 16px !important;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface, #ffffff);
}

.crm-search-panel .filter-group,
.crm-search-panel .filter-item,
.crm-search-field {
  display: flex; /* R9 W2: sem !important para o atributo hidden esconder o filtro */
  flex-direction: column;
  justify-content: flex-end !important;
  width: 100%;
  max-width: none !important;
}

.crm-search-panel .readonly-field {
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  max-width: none !important;
}

.crm-search-panel label,
.crm-search-panel .readonly-field > span,
.crm-search-field > span {
  min-height: 18px;
  margin: 0;
  color: var(--color-muted);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.25;
}

.crm-search-panel input,
.crm-search-panel select,
.crm-search-panel button,
.crm-search-input {
  min-height: 42px;
  height: 42px;
  padding: 9px 12px;
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 0.95rem;
  line-height: 1.2;
}

.crm-filter-action {
  flex-direction: column;
  justify-content: flex-end;
  min-height: 70px;
}

.crm-filter-action > button {
  min-height: 42px;
  margin: 0;
}

.crm-filter-button {
  align-self: end;
  min-height: 42px;
}

main input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
main select {
  min-height: 42px;
}

main textarea {
  min-height: 96px;
  resize: vertical;
}

@media (max-width: 720px) {
  .module-section-heading,
  .crm-action-toolbar {
    width: 100%;
  }

  .crm-action-toolbar > a {
    width: 100%;
  }

  .crm-action-toolbar > button,
  .crm-action-toolbar > label.app-button,
  .crm-action-toolbar > label.app-button-secondary {
    flex: 1 1 100%;
    width: 100%;
  }

  .crm-search-panel {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 14px;
  }
}

/* ==========================================
   UNIFIED VISIBILITY RULES FOR FORM INPUTS (LIGHT / DIM / DARK)
   ========================================== */
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
select,
textarea {
  background-color: var(--color-bg-field, #ffffff);
  color: var(--color-text-main, #18233d);
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.2));
  border-radius: 8px;
  padding: 8px 12px;
  box-sizing: border-box;
  font-family: inherit;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):focus,
select:focus,
textarea:focus {
  border-color: var(--color-focus, #0071e3);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

/* Specific styling for placeholder in all themes */
input::placeholder,
textarea::placeholder {
  color: var(--color-muted, #6c7895);
  opacity: 0.78;
}
/* Padrão global: a ação de fechar permanece sempre no lado direito do cabeçalho. */
.ios-modal-header,.modal-header{display:flex;align-items:center;width:100%}
.ios-modal-header .ios-modal-close-btn,.modal-header .close-btn,.modal-header [aria-label="Fechar"],.modal-header [id*="fechar"],.modal-header [id*="close"]{margin-left:auto;order:99}

/* Shared field inset: matches Matriz / Filial in the client form.
   Keep native buttons, choices, sliders, colors and file pickers unchanged.
   Specificity also covers legacy page-level .readonly-field overrides. */
:root {
  --crm-field-inset-block: 8px;
  --crm-field-inset-inline: 12px;
}
:root body :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="range"]):not([type="color"]),
  select,
  textarea
) {
  padding: var(--crm-field-inset-block) var(--crm-field-inset-end, var(--crm-field-inset-inline)) var(--crm-field-inset-block) var(--crm-field-inset-inline);
  box-sizing: border-box;
  min-width: 0 !important;
}
:root body select:not([multiple]):not([size]),
:root body select[size="1"] {
  --crm-field-inset-end: 36px;
  background-position: right var(--crm-field-inset-inline) center;
}
:root body .input-action-wrap input { --crm-field-inset-end: 48px; }
:root body #client-search-input { --crm-field-inset-end: 40px; }
@media (max-width: 720px) {
  :root body .schema-field-grid {
    gap: 16px !important;
  }
  :root body .schema-field-grid > * {
    min-width: 0;
  }
}

/* Keep field foreground and background paired, including focus and autofill. */
:root {
  --crm-field-background: #ffffff;
  --crm-field-foreground: #18233d;
  --crm-field-placeholder: #52617a;
}
:root.theme-dim {
  --crm-field-background: #293541;
  --crm-field-foreground: #f3f5f7;
  --crm-field-placeholder: #bbc5d1;
}
:root.theme-dark {
  --crm-field-background: #1d2b35;
  --crm-field-foreground: #f3f5f7;
  --crm-field-placeholder: #abbac8;
}
:root[data-contrast="high"] {
  --crm-field-background: #111827;
  --crm-field-foreground: #ffffff;
  --crm-field-placeholder: #d1d5db;
}
:root body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="range"]):not([type="color"]), select, textarea) {
  background-color: var(--crm-field-background);
  color: var(--crm-field-foreground);
  -webkit-text-fill-color: var(--crm-field-foreground);
  caret-color: var(--crm-field-foreground);
}
:root body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="range"]):not([type="color"]), select, textarea)::placeholder {
  color: var(--crm-field-placeholder);
  -webkit-text-fill-color: var(--crm-field-placeholder);
}
:root body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="range"]):not([type="color"]), select, textarea):is(:autofill, :-webkit-autofill) {
  -webkit-box-shadow: 0 0 0 1000px var(--crm-field-background) inset;
  box-shadow: 0 0 0 1000px var(--crm-field-background) inset;
  border-color: var(--color-focus, #0071e3);
}
:root body select option {
  background-color: var(--crm-field-background);
  color: var(--crm-field-foreground);
  -webkit-text-fill-color: var(--crm-field-foreground);
}
}

@layer legacy-imp {
select option { background-color: var(--color-bg-field); color: var(--color-text-main); }
.app-dock .dock-item strong, .app-dock .dock-item span { font-size: calc(0.8rem * var(--menu-font-scale, 1)); }
.nav-icon-label { font-size: calc(12.5px * var(--menu-font-scale, 1)); }
.menu-dropdown a { font-size: calc(14.4px * var(--menu-font-scale, 1)); }
.module-hero { background: radial-gradient(circle at 88% 18%, rgba(78, 115, 255, 0.08), transparent 22rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.60)); border: 1px solid rgba(255, 255, 255, 0.68); box-shadow: 0 15px 35px rgba(59, 78, 132, 0.06); border-radius: 20px; padding: 24px 32px; margin-bottom: 24px; }
:root.theme-dark .module-hero { border-color: rgba(255, 255, 255, 0.08); background: radial-gradient(circle at 88% 18%, rgba(110, 139, 255, 0.16), transparent 22rem),
    linear-gradient(145deg, rgba(31, 43, 70, 0.88), rgba(22, 31, 53, 0.70)); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22); }
:root.theme-dim .module-hero { border-color: rgba(255, 255, 255, 0.06); background: radial-gradient(circle at 88% 18%, rgba(99, 102, 241, 0.14), transparent 22rem),
    linear-gradient(145deg, rgba(58, 63, 75, 0.90), rgba(45, 49, 57, 0.75)); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18); }
.module-eyebrow { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-primary); margin-bottom: 4px; }
:root.theme-dark .module-eyebrow, :root.theme-dim .module-eyebrow { color: #a5b4fc; }
.module-hero-content h1 { font-size: 1.8rem; font-weight: 800; margin: 0 0 6px 0; color: var(--color-text-main); letter-spacing: -0.02em; }
.module-hero-content p { font-size: 0.92rem; margin: 0; color: var(--color-muted); font-weight: 500; line-height: 1.4; }
.placeholder-table th, .placeholder-table td, table.placeholder-table tr td, table.placeholder-table tr th { border-bottom: 1px solid rgba(0, 0, 0, 0.09); }
:root.theme-dark .placeholder-table th, :root.theme-dark .placeholder-table td, :root.theme-dark table.placeholder-table tr td, :root.theme-dark table.placeholder-table tr th, :root.theme-dim .placeholder-table th, :root.theme-dim .placeholder-table td, :root.theme-dim table.placeholder-table tr td, :root.theme-dim table.placeholder-table tr th { border-bottom: 1px solid rgba(255, 255, 255, 0.15); }
.readonly-field input, .readonly-field select, .readonly-field textarea, .filter-item input, .filter-item select, .filter-group input, .filter-group select, input[type="text"], input[type="search"], input[type="email"], select { box-sizing: border-box; }
.crm-action-button--blue, .crm-action-button--green { background-image: none; color: #ffffff; border-color: transparent; }
.crm-action-button--blue { background-color: var(--ui-accent); }
.crm-action-button--blue:hover, .crm-action-button--blue:focus-visible { background-color: #005bb5; }
.crm-action-button--green { background-color: #107c41; }
.crm-action-button--green:hover, .crm-action-button--green:focus-visible { background-color: #0b6333; }
.crm-action-toolbar { align-items: center; gap: 10px; }
.crm-action-toolbar > button, .crm-action-toolbar > a, .crm-action-toolbar > label.app-button, .crm-action-toolbar > label.app-button-secondary { min-height: 42px; }
.crm-search-panel { align-items: end; padding: 16px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface, #ffffff); }
.crm-search-panel .readonly-field { flex-direction: column; justify-content: flex-end; gap: 6px; }
.crm-search-panel label, .crm-search-panel .readonly-field > span, .crm-search-field > span { margin: 0; color: var(--color-muted); font-size: 0.85rem; font-weight: 600; line-height: 1.25; }
.crm-search-panel input, .crm-search-panel select, .crm-search-panel button, .crm-search-input { min-height: 42px; height: 42px; padding: 9px 12px; border-radius: 8px; box-sizing: border-box; font-size: 0.95rem; line-height: 1.2; }
.crm-filter-action { justify-content: flex-end; min-height: 70px; }
.crm-filter-action > button { min-height: 42px; margin: 0; }
.crm-filter-button { min-height: 42px; }
@media (max-width: 720px) {
.crm-action-toolbar > button, .crm-action-toolbar > label.app-button, .crm-action-toolbar > label.app-button-secondary { flex: 1 1 100%; }
}
@media (max-width: 720px) {
.crm-search-panel { padding: 14px; }
}
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]), select, textarea { background-color: var(--color-bg-field, #ffffff); color: var(--color-text-main, #18233d); border: 1px solid var(--color-border, rgba(0, 0, 0, 0.2)); border-radius: 8px; padding: 8px 12px; box-sizing: border-box; font-family: inherit; }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):focus, select:focus, textarea:focus { border-color: var(--color-focus, #0071e3); outline: none; box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15); }
input::placeholder, textarea::placeholder { color: var(--color-muted, #6c7895); opacity: 0.78; }
:root body :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="range"]):not([type="color"]),
  select,
  textarea
) { padding: var(--crm-field-inset-block) var(--crm-field-inset-end, var(--crm-field-inset-inline)) var(--crm-field-inset-block) var(--crm-field-inset-inline); box-sizing: border-box; }
:root body select:not([multiple]):not([size]), :root body select[size="1"] { background-position: right var(--crm-field-inset-inline) center; }
:root body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="range"]):not([type="color"]), select, textarea) { background-color: var(--crm-field-background); color: var(--crm-field-foreground); -webkit-text-fill-color: var(--crm-field-foreground); caret-color: var(--crm-field-foreground); }
:root body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="range"]):not([type="color"]), select, textarea)::placeholder { color: var(--crm-field-placeholder); -webkit-text-fill-color: var(--crm-field-placeholder); }
:root body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="range"]):not([type="color"]), select, textarea):is(:autofill, :-webkit-autofill) { -webkit-box-shadow: 0 0 0 1000px var(--crm-field-background) inset; box-shadow: 0 0 0 1000px var(--crm-field-background) inset; border-color: var(--color-focus, #0071e3); }
:root body select option { background-color: var(--crm-field-background); color: var(--crm-field-foreground); -webkit-text-fill-color: var(--crm-field-foreground); }/* R10 L2: declarações que eram !important na camada legacy e só precisam vencer o restante do legado. */
.ios-drawer-submenu-link { font-size: calc(14px * var(--menu-font-scale, 1)); }
.ios-drawer-item-text { font-size: calc(15px * var(--menu-font-scale, 1)); }
.accessibility-toggle { z-index: 99999; border: 2px solid var(--color-primary); box-shadow: 0 4px 20px rgba(78, 115, 255, 0.4); }
.accessibility-panel { z-index: 100000; }
.crm-search-panel .filter-group, .crm-search-panel .filter-item, .crm-search-field { gap: 6px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]), select, textarea { transition: all 0.2s ease; }
}

@layer ui-components {
/* R10 L2: declarações que eram !important na camada legacy e precisam vencer os componentes (ui-components do crm-ui.css). */
.module-hero { display: flex; }
.module-hero-content { display: flex; }
.module-section-heading { display: flex; align-items: flex-start; gap: 20px; }
.crm-action-toolbar { display: flex; max-width: 100%; }
.crm-search-panel { margin-block: 16px; }
.crm-search-panel .filter-group, .crm-search-panel .filter-item, .crm-search-field { min-width: 0; }
.crm-search-panel input, .crm-search-panel select, .crm-search-panel button, .crm-search-input { width: 100%; }
@media (max-width: 720px) {
.crm-action-toolbar > a { flex: 1 1 100%; }
}
@media (max-width: 720px) {
:root body .schema-field-grid > * { grid-column: 1 / -1; }
}
}
