/*
 * SIRE ERP - contrato visual global.
 *
 * Este arquivo e a unica autoridade para identidade, tipografia, cores e
 * geometria dos componentes administrativos. CSS de modulo pode definir
 * apenas composicao e posicionamento especificos da funcionalidade.
 *
 * Revisao 2.5.1: densidade desktop (controle 30px, fonte 13px) e largura
 * de campo por tipo de dado (.erp-form-row + data-w). Ver skill sire-interface.
 */
:root {
  --erp-font: "Segoe UI Variable", "Segoe UI", sans-serif;
  --erp-page-bg: #f4f7fb;
  --erp-surface: #ffffff;
  --erp-surface-subtle: #f8fafc;
  --erp-surface-soft: var(--erp-surface-subtle);
  --erp-surface-muted: #eef2f6;
  --erp-surface-selected: #eff6ff;
  --erp-border: #d7e0ea;
  --erp-border-soft: #e6ecf2;
  --erp-border-strong: #b9c7d8;
  --erp-line: var(--erp-border);
  --erp-text: #172033;
  --erp-text-soft: #526077;
  --erp-text-muted: #718096;
  --erp-muted: var(--erp-text-soft);
  --erp-primary: #1261a6;
  --erp-primary-hover: #0d4f8b;
  --erp-primary-active: #0a426f;
  --erp-primary-strong: var(--erp-primary-hover);
  --erp-primary-soft: #eaf3fb;
  --erp-primary-border: #93b9dc;
  --erp-focus: #2b7bc0;
  --erp-focus-ring: rgba(43, 123, 192, 0.18);
  --erp-success: #26734d;
  --erp-success-soft: #eaf6ef;
  --erp-warning: #9a6700;
  --erp-warning-soft: #fff7df;
  --erp-danger: #b4232c;
  --erp-danger-hover: #922029;
  --erp-danger-soft: #fff0f1;
  --erp-info: #155f96;
  --erp-info-soft: #e9f4fb;
  --erp-overlay: rgba(15, 30, 50, 0.48);
  --erp-radius-sm: 4px;
  --erp-radius-xs: 3px;
  --erp-radius: 6px;
  --erp-radius-md: var(--erp-radius);
  --erp-radius-lg: 9px;
  --erp-shadow-sm: 0 1px 2px rgba(15, 35, 60, 0.06);
  --erp-shadow: 0 8px 24px rgba(15, 35, 60, 0.12);
  --erp-control-h: 30px;
  --erp-control-font: 13px;
  --erp-control-pad-x: 8px;
  --erp-label-font: 12px;
  --erp-label-gap: 3px;
  --erp-field-gap-x: 10px;
  --erp-field-gap-y: 8px;
  --erp-section-padding: 12px;
  --erp-section-gap: 12px;
  --erp-page-padding: 12px;
  --erp-page-padding-x: var(--erp-page-padding);
  --erp-page-padding-y: var(--erp-page-padding);
  --erp-form-max: 1180px;
  --erp-w-pad: 22px;
  --erp-table-font: 12.5px;
  --erp-table-head-h: 28px;
  --erp-table-row-h: 28px;
  --erp-table-visible-rows: 5;
  --erp-header-icon-size: 30px;
  --erp-motion-fast: 120ms;
  --erp-company-1: #1d4ed8; --erp-company-2: #047857; --erp-company-3: #b45309; --erp-company-4: #7c3aed; --erp-company-5: #be123c; --erp-company-6: #0e7490; --erp-company-7: #4d7c0f; --erp-company-8: #a21caf; --erp-on-company: #ffffff; /* cor da empresa (D-065), índice 1-8 do servidor; texto --erp-on-company (AA) */
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
.erp-ui-scope,
:is(#view, body) .erp-ui-scope,
[data-sire-cadastro="1"],
[data-erp-ui="1"] {
  min-width: 0;
  color: var(--erp-text);
  font-family: var(--erp-font);
  font-size: var(--erp-control-font);
  line-height: 1.35;
  accent-color: var(--erp-primary);
  color-scheme: light;
}
.erp-ui-scope {
  width: 100%;
  padding: var(--erp-page-padding);
  background: var(--erp-page-bg);
}
.erp-ui-scope :where(h1, h2, h3, h4, p) {
  margin-top: 0;
}
.erp-ui-scope :where(h1, h2, h3, h4),
[data-sire-cadastro="1"] :where(h1, h2, h3, h4),
[data-erp-ui="1"] :where(h1, h2, h3, h4) {
  color: var(--erp-text);
  font-family: var(--erp-font);
  letter-spacing: normal;
  text-transform: none;
}
.erp-ui-scope h1,
[data-sire-cadastro="1"] h1,
[data-erp-ui="1"] h1 { font-size: 20px; font-weight: 700; line-height: 1.2; }
.erp-ui-scope h2,
[data-sire-cadastro="1"] h2,
[data-erp-ui="1"] h2 { font-size: 16px; font-weight: 700; line-height: 1.25; }
.erp-ui-scope h3,
.erp-ui-scope h4 { font-size: 14px; font-weight: 700; line-height: 1.3; }
.erp-ui-scope :where(p, small, .muted, [class*="subtitle"], [class*="helper"], [class*="hint"]) {
  color: var(--erp-text-soft);
}
.erp-ui-scope a { color: var(--erp-primary); }
.erp-ui-scope a:hover { color: var(--erp-primary-hover); }
.erp-required-marker { color: var(--erp-danger); }
/* Preserve HTML visibility even when component classes define display. */
.erp-ui-scope[hidden],
.erp-ui-scope [hidden] { display: none !important; }
/* Cabecalho compartilhado, enriquecido sem alterar contratos da tela. */
.erp-page-header,
:is(#view, body) .erp-ui-scope.erp-ui-scope .erp-page-header.erp-page-header,
:is([data-sire-cadastro="1"], [data-erp-ui="1"]).erp-ui-scope .erp-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 0;
  margin: 0 0 var(--erp-section-gap);
  padding: 0;
  gap: 12px;
  overflow: visible;
  color: var(--erp-text);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.erp-page-header::before,
.erp-page-header::after { content: none; }
.erp-page-header__main {
  display: grid;
  grid-template-columns: var(--erp-header-icon-size) minmax(0, 1fr);
  grid-auto-rows: min-content;
  align-items: center;
  min-width: 0;
  gap: 1px 10px;
}
.erp-page-header__icon,
:is(#view, body) .erp-ui-scope.erp-ui-scope .erp-page-header__icon.erp-page-header__icon,
:is([data-sire-cadastro="1"], [data-erp-ui="1"]).erp-ui-scope .erp-page-header__icon {
  display: grid;
  grid-column: 1;
  grid-row: 1 / span 4;
  place-items: center;
  width: var(--erp-header-icon-size);
  height: var(--erp-header-icon-size);
  min-width: var(--erp-header-icon-size);
  overflow: hidden;
  color: #ffffff;
  background: var(--erp-primary);
  border: 1px solid var(--erp-primary);
  border-radius: var(--erp-radius);
  box-shadow: none;
  font-family: var(--erp-font);
  font-size: 0;
}
.erp-page-header__icon::before,
.erp-page-header__icon::after { content: none; }
.erp-page-header__legacy-mark { display: none; }
.erp-page-header__icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.erp-page-header__main > :not(.erp-page-header__icon) {
  grid-column: 2;
  min-width: 0;
}

.erp-page-header__title,
:is(#view, body) .erp-ui-scope.erp-ui-scope .erp-page-header__title.erp-page-header__title,
:is([data-sire-cadastro="1"], [data-erp-ui="1"]).erp-ui-scope .erp-page-header__title {
  margin: 0;
  color: var(--erp-text);
  font-family: var(--erp-font);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: normal;
  text-shadow: none;
}

.erp-page-header__subtitle,
.erp-page-header__breadcrumb {
  margin: 1px 0 0;
  color: var(--erp-text-soft);
  font-family: var(--erp-font);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: normal;
  text-transform: none;
}

.erp-page-header__breadcrumb { color: var(--erp-text-muted); }

.erp-page-header__actions,
.erp-page-header__context {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  margin: 0;
  gap: 8px;
}

.erp-page-header__actions { margin-left: auto; }
.erp-page-header__context { color: var(--erp-text-soft); font-size: 12px; }

.erp-more { position: relative; display: inline-flex; } .erp-more[hidden], .erp-more__menu[hidden] { display: none; }
.erp-more__trigger::after { width: 7px; height: 7px; margin: -3px 1px 0 3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; content: ""; transform: rotate(45deg); }
.erp-more.is-open .erp-more__trigger::after { margin-top: 3px; transform: rotate(225deg); }
.erp-more__menu { position: absolute; z-index: 10100; top: calc(100% + 4px); right: 0; display: grid; width: max-content; min-width: 190px; max-width: min(320px, calc(100vw - 24px)); padding: 4px; gap: 2px; background: var(--erp-surface); border: 1px solid var(--erp-border); border-radius: var(--erp-radius); box-shadow: var(--erp-shadow); }
.erp-more__item, :is(#view, body) .erp-ui-scope.erp-ui-scope .erp-more__item.erp-more__item { justify-content: flex-start; width: 100%; padding: 0 9px; color: var(--erp-text); background: transparent; border-color: transparent; box-shadow: none; text-align: left; }
.erp-more__item:hover, :is(#view, body) .erp-ui-scope.erp-ui-scope .erp-more__item.erp-more__item:hover { color: var(--erp-primary-hover); background: var(--erp-primary-soft); border-color: transparent; } .erp-more__item[data-danger="1"] { color: var(--erp-danger); }
/* Botoes. */
.erp-button,
:is(#view, body) .erp-ui-scope.erp-ui-scope .erp-button.erp-button,
:is([data-sire-cadastro="1"], [data-erp-ui="1"]).erp-ui-scope .erp-button,
.erp-ui-scope :where(button, .btn, .erp-btn),
[data-sire-cadastro="1"] :where(button, .btn, .erp-btn),
[data-erp-ui="1"] :where(button, .btn, .erp-btn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: var(--erp-control-h);
  height: var(--erp-control-h);
  min-height: var(--erp-control-h);
  margin: 0;
  padding: 0 12px;
  gap: 6px;
  color: var(--erp-text);
  background: var(--erp-surface);
  border: 1px solid var(--erp-border-strong);
  border-radius: var(--erp-radius);
  box-shadow: var(--erp-shadow-sm);
  font-family: var(--erp-font);
  font-size: var(--erp-control-font);
  font-weight: 600;
  line-height: 1;
  letter-spacing: normal;
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--erp-motion-fast), border-color var(--erp-motion-fast), color var(--erp-motion-fast);
}

.erp-button:hover,
:is(#view, body) .erp-ui-scope.erp-ui-scope .erp-button.erp-button:hover,
:is([data-sire-cadastro="1"], [data-erp-ui="1"]).erp-ui-scope .erp-button:hover,
.erp-ui-scope :where(button, .btn, .erp-btn):hover {
  color: var(--erp-primary-hover);
  background: var(--erp-primary-soft);
  border-color: var(--erp-primary-border);
  transform: none;
}

.erp-button--primary,
:is(#view, body) .erp-ui-scope.erp-ui-scope .erp-button--primary.erp-button--primary,
:is([data-sire-cadastro="1"], [data-erp-ui="1"]).erp-ui-scope .erp-button--primary,
.erp-ui-scope :where(.btn-primary, .btn--primary, .erp-btn--primary, [class*="btn--primary"], [class*="button--primary"], [data-variant="primary"]),
[data-sire-cadastro="1"] :where([class*="btn--primary"], [class*="button--primary"]),
[data-erp-ui="1"] :where([class*="btn--primary"], [class*="button--primary"]) {
  color: #ffffff;
  background: var(--erp-primary);
  border-color: var(--erp-primary);
}

.erp-button--primary:hover,
:is(#view, body) .erp-ui-scope.erp-ui-scope .erp-button--primary.erp-button--primary:hover,
:is([data-sire-cadastro="1"], [data-erp-ui="1"]).erp-ui-scope .erp-button--primary:hover,
.erp-ui-scope :where(.btn-primary, .btn--primary, .erp-btn--primary, [class*="btn--primary"], [class*="button--primary"], [data-variant="primary"]):hover,
[data-sire-cadastro="1"] :where([class*="btn--primary"], [class*="button--primary"]):hover,
[data-erp-ui="1"] :where([class*="btn--primary"], [class*="button--primary"]):hover {
  color: #ffffff;
  background: var(--erp-primary-hover);
  border-color: var(--erp-primary-hover);
}

.erp-button--secondary { color: var(--erp-text); background: var(--erp-surface); }
.erp-button--success { color: #ffffff; background: var(--erp-success); border-color: var(--erp-success); }

.erp-button--danger,
:is(#view, body) .erp-ui-scope.erp-ui-scope .erp-button--danger.erp-button--danger,
:is([data-sire-cadastro="1"], [data-erp-ui="1"]).erp-ui-scope .erp-button--danger,
.erp-ui-scope :where(.btn-danger, .btn--danger, [class*="btn--danger"], [class*="button--danger"], [data-variant="danger"]) {
  color: #ffffff;
  background: var(--erp-danger);
  border-color: var(--erp-danger);
}

.erp-button--danger:hover { color: #ffffff; background: var(--erp-danger-hover); border-color: var(--erp-danger-hover); }

.erp-button--ghost {
  color: var(--erp-primary);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.erp-button--link {
  min-width: 0;
  height: auto;
  min-height: 0;
  padding: 2px 0;
  color: var(--erp-primary);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.erp-button--icon,
.erp-help-btn,
.erp-action-btn { width: var(--erp-control-h); min-width: var(--erp-control-h); padding: 0; }

.erp-button--tile,
:is(#view, body) .erp-ui-scope.erp-ui-scope .erp-button--tile.erp-button--tile,
:is([data-sire-cadastro="1"], [data-erp-ui="1"]).erp-ui-scope .erp-button--tile {
  display: grid;
  width: 100%;
  height: auto;
  min-height: 42px;
  padding: 5px 10px;
  gap: 2px;
  white-space: normal;
}

.erp-button svg,
.erp-ui-scope :where(button, .btn, .erp-btn) svg,
.erp-action-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.erp-button:disabled,
.erp-ui-scope :where(button, .btn, .erp-btn):disabled,
.erp-ui-scope :where(button, .btn, .erp-btn)[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.25);
}

/* Campos, busca e formularios. */
.erp-field-label,
:is(#view, body) .erp-ui-scope.erp-ui-scope .erp-field-label.erp-field-label,
:is([data-sire-cadastro="1"], [data-erp-ui="1"]).erp-ui-scope .erp-field-label,
.erp-ui-scope label,
[data-sire-cadastro="1"] label,
[data-erp-ui="1"] label {
  color: var(--erp-text-soft);
  font-family: var(--erp-font);
  font-size: var(--erp-label-font);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: normal;
  text-transform: none;
}

.erp-ui-scope :where(.field, .form-field, .erp-field, [class$="-field"], [class*="-field "]) {
  min-width: 0;
  gap: var(--erp-label-gap);
}

.erp-control,
:is(#view, body) .erp-ui-scope.erp-ui-scope .erp-control.erp-control,
:is([data-sire-cadastro="1"], [data-erp-ui="1"]).erp-ui-scope .erp-control,
.erp-ui-scope :where(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), select, textarea),
[data-sire-cadastro="1"] :where(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), select, textarea),
[data-erp-ui="1"] :where(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), select, textarea) {
  width: 100%;
  min-width: 0;
  height: var(--erp-control-h);
  min-height: var(--erp-control-h);
  margin: 0;
  padding: 0 var(--erp-control-pad-x);
  color: var(--erp-text);
  background: var(--erp-surface);
  border: 1px solid var(--erp-border-strong);
  border-radius: var(--erp-radius-sm);
  box-shadow: none;
  font-family: var(--erp-font);
  font-size: var(--erp-control-font);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
  transition: border-color var(--erp-motion-fast), box-shadow var(--erp-motion-fast);
}

.erp-control--textarea,
.erp-ui-scope textarea {
  height: auto;
  min-height: 60px;
  padding-top: 6px;
  padding-bottom: 6px;
  resize: vertical;
}

.erp-control--file,
.erp-ui-scope input[type="file"] { height: auto; min-height: var(--erp-control-h); padding: 3px 8px; }
.erp-ui-scope select[multiple] { height: auto; min-height: 88px; padding: 6px 8px; }
.erp-ui-scope :where(input, select, textarea)::placeholder { color: var(--erp-text-muted); opacity: 1; }
.erp-ui-scope :where(input, select, textarea):hover:not(:disabled) { border-color: #8da5bf; }

.erp-ui-scope :where(input, select, textarea):focus,
:is([data-sire-cadastro="1"], [data-erp-ui="1"]).erp-ui-scope .erp-control:focus,
.erp-button:focus-visible,
:is([data-sire-cadastro="1"], [data-erp-ui="1"]).erp-ui-scope .erp-button:focus-visible,
.erp-ui-scope :where(button, .btn, .erp-btn):focus-visible,
.erp-ui-tab:focus-visible {
  outline: 0;
  border-color: var(--erp-focus);
  box-shadow: 0 0 0 3px var(--erp-focus-ring);
}

.erp-ui-scope :where(input, select, textarea):disabled,
.erp-ui-scope :where(input, select, textarea)[readonly] {
  color: var(--erp-text-soft);
  background: var(--erp-surface-muted);
  border-color: var(--erp-border);
  cursor: not-allowed;
}

.erp-ui-scope :where(input[type="checkbox"], input[type="radio"]) {
  width: 15px;
  height: 15px;
  min-width: 15px;
  margin: 0;
}

/* Escolhas segmentadas Sim/Nao e equivalentes. */
.erp-segment,
.erp-ui-scope :where(.yn, .grp-seg, .forn-segment, [data-segment]),
[data-sire-cadastro="1"] :where(.yn, .grp-seg, .forn-segment, [data-segment]) {
  display: inline-flex;
  width: 120px;
  min-width: 0;
  height: var(--erp-control-h);
  min-height: var(--erp-control-h);
  padding: 0;
  overflow: hidden;
  background: var(--erp-surface);
  border: 1px solid var(--erp-border-strong);
  border-radius: var(--erp-radius-sm);
  box-shadow: none;
}

.erp-segment__option,
.erp-ui-scope :where(.yn, .grp-seg, .forn-segment, [data-segment]) > button,
[data-sire-cadastro="1"] :where(.yn, .grp-seg, .forn-segment, [data-segment]) > button {
  position: relative;
  inset: auto;
  flex: 1 1 50%;
  width: auto;
  min-width: 0;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0 8px;
  color: var(--erp-text-soft);
  background: var(--erp-surface);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-family: var(--erp-font);
  font-size: 13px;
  font-weight: 600;
}

.erp-segment__option + .erp-segment__option,
.erp-ui-scope :where(.yn, .grp-seg, .forn-segment, [data-segment]) > button + button,
[data-sire-cadastro="1"] :where(.yn, .grp-seg, .forn-segment, [data-segment]) > button + button {
  border-left: 1px solid var(--erp-border);
}

/* Opcao selecionada: seletores armados como em .erp-button--primary, para vencer a base .erp-button dentro de #view. */
.erp-segment__option:is(.is-active, [aria-pressed="true"]),
:is(#view, body) .erp-ui-scope.erp-ui-scope .erp-segment__option.erp-segment__option:is(.is-active, [aria-pressed="true"]),
:is([data-sire-cadastro="1"], [data-erp-ui="1"]).erp-ui-scope .erp-segment__option:is(.is-active, [aria-pressed="true"]),
.erp-ui-scope :where(.yn, .grp-seg, .forn-segment, [data-segment]) > button:is(.is-active, [aria-pressed="true"]),
[data-sire-cadastro="1"] :where(.yn, .grp-seg, .forn-segment, [data-segment]) > button:is(.is-active, [aria-pressed="true"]) {
  color: #ffffff;
  background: var(--erp-primary);
  border-color: var(--erp-primary);
  opacity: 1;
}

.erp-segment__option:disabled { opacity: 0.65; }

.erp-search,
.erp-ui-search-field { position: relative; display: flex; align-items: center; min-width: 0; }
.erp-ui-search-field > :where(input, .erp-control) { padding-right: 30px; }

.erp-ui-search-decoration,
.erp-ui-search-trigger {
  position: absolute;
  top: 50%;
  right: 7px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  color: var(--erp-text-muted);
  background: transparent;
  border: 0;
  box-shadow: none;
  transform: translateY(-50%);
}

.erp-ui-search-decoration svg,
.erp-ui-search-trigger svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.erp-ui-search-extra { margin-left: 8px; }

.erp-form-grid,
.erp-grid,
.erp-ui-layout-grid,
.erp-ui-scope :where(.form-grid, .fields-grid, [class$="-grid"], [class*="-grid "]) {
  display: grid;
  min-width: 0;
  gap: var(--erp-field-gap-y) var(--erp-field-gap-x);
}

.erp-ui-grid-fitted { grid-template-columns: repeat(var(--erp-grid-cols, 4), minmax(0, 1fr)); }
.erp-ui-layout-item,
.erp-ui-scope :where(.field, .form-field, .erp-field) { min-width: 0; }

.erp-toolbar,
.erp-ui-scope :where(.toolbar, .actions, .form-actions, [class$="-actions"], [class*="-actions "]) {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* Linha de formulario: flex com quebra, campo com a largura do dado. */
.erp-form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  max-width: var(--erp-form-max);
  gap: var(--erp-field-gap-y) var(--erp-field-gap-x);
}

.erp-form-row + .erp-form-row { margin-top: var(--erp-field-gap-y); }

.erp-form-row > .erp-field,
.erp-form-row > [data-w] {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: var(--erp-label-gap);
}

.erp-form-row > .erp-field > label,
.erp-form-row > [data-w] > label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-w="xs"]   { flex: 0 0 calc(6ch  + var(--erp-w-pad)); }
[data-w="sm"]   { flex: 0 0 calc(10ch + var(--erp-w-pad)); }
[data-w="md"]   { flex: 0 0 calc(14ch + var(--erp-w-pad)); }
[data-w="lg"]   { flex: 0 0 calc(20ch + var(--erp-w-pad)); }
[data-w="xl"]   { flex: 0 0 calc(32ch + var(--erp-w-pad)); }
[data-w="fill"] {
  flex: 1 1 calc(28ch + var(--erp-w-pad));
  max-width: calc(72ch + var(--erp-w-pad));
}

.erp-period-presets { display: flex; flex: 1 1 100%; flex-wrap: wrap; align-items: center; gap: 4px; } .erp-period-presets .erp-button { padding: 0 8px; box-shadow: none; } .erp-period-presets .erp-button.is-active { color: #ffffff; background: var(--erp-primary); border-color: var(--erp-primary); }
/* Bloco homogeneo de parametros numericos: colunas fixas, nao esticadas. */
.erp-grid-numeric {
  display: grid;
  grid-template-columns: repeat(auto-fill, calc(14ch + var(--erp-w-pad)));
  gap: var(--erp-field-gap-y) var(--erp-field-gap-x);
}

/* Numericos a direita. */
.erp-ui-scope :where(input[data-type="number"], input[data-type="money"], input[inputmode="decimal"], input[inputmode="numeric"]) {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* Selecao parece campo: texto a esquerda, caixa normal, seta a direita. */
:is(#view, body) .erp-ui-scope.erp-ui-scope select.erp-control.erp-control,
.erp-ui-scope select:not([multiple]),
[data-sire-cadastro="1"] select:not([multiple]),
[data-erp-ui="1"] select:not([multiple]),
.erp-select {
  padding-right: 26px;
  text-align: left;
  text-transform: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23526077' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px 12px;
}

.erp-ui-scope select:invalid,
.erp-ui-scope select:has(option[value=""]:checked) { color: var(--erp-text-muted); }

/* Lookup composto: codigo + descricao + busca em um controle so. */
.erp-lookup { display: flex; align-items: stretch; min-width: 0; }
.erp-lookup > .erp-lookup__code { flex: 0 0 calc(10ch + var(--erp-w-pad)); }
.erp-lookup > .erp-lookup__desc { flex: 1 1 auto; min-width: 0; }

:is(#view, body) .erp-ui-scope.erp-ui-scope .erp-lookup .erp-lookup__code.erp-control.erp-control,
.erp-ui-scope .erp-lookup > .erp-lookup__code {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

:is(#view, body) .erp-ui-scope.erp-ui-scope .erp-lookup .erp-lookup__desc.erp-control.erp-control,
.erp-ui-scope .erp-lookup > .erp-lookup__desc {
  margin-left: -1px;
  color: var(--erp-text-soft);
  background: var(--erp-surface-subtle);
  border-radius: 0;
  cursor: default;
}

:is(#view, body) .erp-ui-scope.erp-ui-scope .erp-lookup .erp-lookup__btn.erp-button.erp-button,
.erp-ui-scope .erp-lookup > .erp-lookup__btn {
  width: var(--erp-control-h);
  min-width: var(--erp-control-h);
  margin-left: -1px;
  padding: 0;
  border-radius: 0 var(--erp-radius-sm) var(--erp-radius-sm) 0;
  box-shadow: none;
}

/* Checkboxes em colunas, sem decoracao. */
.erp-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, max-content));
  gap: 2px 28px;
  background: none;
  border-radius: 0;
  box-shadow: none;
}

.erp-check-grid > label {
  display: flex;
  align-items: center;
  min-height: 24px;
  gap: 8px;
  color: var(--erp-text);
  font-weight: 400;
  background: none;
}

/* Superficies e secoes. */
.erp-surface,
:is(#view, body) .erp-ui-scope.erp-ui-scope .erp-surface.erp-surface,
:is([data-sire-cadastro="1"], [data-erp-ui="1"]).erp-ui-scope .erp-surface,
.erp-card,
.erp-panel,
.erp-box {
  min-width: 0;
  padding: var(--erp-section-padding);
  color: var(--erp-text);
  background: var(--erp-surface);
  border: 1px solid var(--erp-border);
  border-radius: var(--erp-radius);
  box-shadow: var(--erp-shadow-sm);
}

.erp-surface::before,
.erp-surface::after { pointer-events: none; }

.erp-ui-scope > .erp-surface + .erp-surface,
.erp-ui-scope > section + section { margin-top: var(--erp-section-gap); }

/* Sem cartao dentro de cartao. */
:is(#view, body) .erp-ui-scope.erp-ui-scope .erp-surface .erp-surface.erp-surface,
.erp-ui-tabs-body .erp-surface,
.erp-surface .erp-surface {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.erp-surface .erp-surface + .erp-surface { margin-top: var(--erp-section-gap); }

.erp-section-title,
.erp-surface > :where(h2, h3):first-child {
  margin: 0 0 8px;
  color: var(--erp-primary);
  font-family: var(--erp-font);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.erp-divider,
.erp-ui-scope hr { height: 1px; margin: var(--erp-section-gap) 0; background: var(--erp-border); border: 0; }

/* Abas. */
.erp-ui-tabs,
:is(#view, body) .erp-ui-scope.erp-ui-scope .erp-ui-tabs.erp-ui-tabs,
.erp-tabs {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  color: var(--erp-text-soft);
  background: var(--erp-surface-subtle);
  border: 1px solid var(--erp-border);
  border-radius: var(--erp-radius) var(--erp-radius) 0 0;
  scrollbar-width: thin;
}

.erp-ui-tab,
:is(#view, body) .erp-ui-scope.erp-ui-scope .erp-ui-tab.erp-ui-tab,
.erp-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  min-width: max-content;
  height: calc(var(--erp-control-h) + 2px);
  min-height: calc(var(--erp-control-h) + 2px);
  padding: 0 12px;
  gap: 6px;
  color: var(--erp-text-soft);
  background: transparent;
  border: 0;
  border-right: 1px solid var(--erp-border);
  border-radius: 0;
  box-shadow: none;
  font-family: var(--erp-font);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.erp-ui-tab:is(.is-active, .active, [aria-selected="true"]),
:is(#view, body) .erp-ui-scope.erp-ui-scope .erp-ui-tab.erp-ui-tab:is(.is-active, .active, [aria-selected="true"]),
.erp-tab:is(.is-active, .active, [aria-selected="true"]) {
  color: var(--erp-primary);
  background: var(--erp-surface);
  box-shadow: inset 0 -2px 0 var(--erp-primary);
}

.erp-tab-icon { width: 15px; height: 15px; }
.erp-ui-tabs-shell,
.erp-ui-tabs-panel,
.erp-ui-tabs-body { min-width: 0; max-width: 100%; }

.erp-ui-tabs-body {
  padding: var(--erp-section-padding);
  background: var(--erp-surface);
  border: 1px solid var(--erp-border);
  border-top: 0;
  border-radius: 0 0 var(--erp-radius) var(--erp-radius);
}

.erp-cadastro-query-tabs-row {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  margin-bottom: var(--erp-section-gap);
}

.erp-cadastro-query-tabs-row > .erp-cadastro-query-tabs {
  width: 100%;
  min-width: 0;
  margin-bottom: 0;
}

.erp-cadastro-query-tabs-row > .erp-cadastro-query-count {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 8px;
  max-width: calc(100% - 230px);
  margin: 0;
  padding: 0 4px;
  overflow: hidden;
  color: var(--erp-text);
  background: var(--erp-surface-subtle);
  font-family: var(--erp-font);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
  text-overflow: ellipsis;
  transform: translateY(-50%);
  white-space: nowrap;
}

.erp-cadastro-query-tabs { margin-bottom: var(--erp-section-gap); }
.erp-cadastro-query-count-source--empty { display: none; }
[data-erp-cadastro-query-panel="1"] { min-height: var(--erp-cadastro-query-panel-height, auto); }
[data-erp-cadastro-query-panel="1"][data-erp-cadastro-query-active="pesquisa"] :is(.cw-table-wrap, .cw-panel__foot, [data-el="list-supplement"], [data-el="list-error"]) { display: none; }
[data-erp-cadastro-query-panel="1"][data-erp-cadastro-query-active="consulta"] [data-el="filters"] { display: none; }

/* Tabelas operacionais. */
.erp-table-container,
.erp-table-wrap,
.erp-ui-generated-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: auto;
  background: var(--erp-surface);
  border: 1px solid var(--erp-border);
  border-radius: var(--erp-radius);
  scrollbar-width: thin;
  scrollbar-color: #a8b7c7 transparent;
}

.erp-table-visible-rows,
.erp-ui-generated-wrap {
  max-height: calc(var(--erp-table-head-h) + (var(--erp-table-row-h) * var(--erp-table-visible-rows)) + 2px);
}

.erp-data-table,
:is(#view, body) .erp-ui-scope.erp-ui-scope .erp-data-table.erp-data-table,
:is([data-sire-cadastro="1"], [data-erp-ui="1"]).erp-ui-scope .erp-data-table,
.erp-table,
.erp-ui-table-standard,
.erp-ui-scope table,
[data-sire-cadastro="1"] table,
[data-erp-ui="1"] table {
  width: 100%;
  min-width: 100%;
  margin: 0;
  color: var(--erp-text);
  background: var(--erp-surface);
  border-collapse: separate;
  border-spacing: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-family: var(--erp-font);
  font-size: var(--erp-table-font);
  line-height: 1.2;
}

.erp-ui-scope table thead,
.erp-ui-table-standard thead { color: #314158; background: #eaf0f6; }

.erp-ui-scope table th,
:is(#view, body) .erp-ui-scope.erp-ui-scope .erp-data-table.erp-data-table th,
:is([data-sire-cadastro="1"], [data-erp-ui="1"]).erp-ui-scope table th,
:is([data-sire-cadastro="1"], [data-erp-ui="1"]).erp-ui-scope .erp-data-table th,
.erp-ui-scope .erp-data-table th,
[data-sire-cadastro="1"] table th,
[data-erp-ui="1"] table th,
.erp-ui-table-standard th {
  position: relative;
  height: var(--erp-table-head-h);
  min-height: var(--erp-table-head-h);
  padding: 0 8px;
  color: #314158;
  background: #eaf0f6;
  border: 0;
  border-right: 1px solid #d4dee9;
  border-bottom: 1px solid var(--erp-border-strong);
  font-family: var(--erp-font);
  font-size: var(--erp-table-font);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: normal;
  text-align: left;
  text-transform: none;
  white-space: nowrap;
}

.erp-table-container table thead th,
.erp-ui-generated-wrap table thead th { position: sticky; top: 0; z-index: 2; }

.erp-ui-scope table td,
:is(#view, body) .erp-ui-scope.erp-ui-scope .erp-data-table.erp-data-table td,
:is([data-sire-cadastro="1"], [data-erp-ui="1"]).erp-ui-scope table td,
:is([data-sire-cadastro="1"], [data-erp-ui="1"]).erp-ui-scope .erp-data-table td,
.erp-ui-scope .erp-data-table td,
[data-sire-cadastro="1"] table td,
[data-erp-ui="1"] table td,
.erp-ui-table-standard td {
  height: var(--erp-table-row-h);
  min-height: var(--erp-table-row-h);
  padding: 0 8px;
  color: var(--erp-text);
  background: var(--erp-surface);
  border: 0;
  border-right: 1px solid #e6ecf2;
  border-bottom: 1px solid #e1e8f0;
  font-family: var(--erp-font);
  font-size: var(--erp-table-font);
  font-weight: 400;
  line-height: 1.2;
  vertical-align: middle;
}

.erp-ui-scope table :where(th, td):last-child,
.erp-ui-table-standard :where(th, td):last-child { border-right: 0; }
.erp-ui-scope table tbody tr:nth-child(even) td,
.erp-ui-table-standard tbody tr:nth-child(even) td { background: #fbfcfe; }
.erp-ui-scope table tbody tr:hover td,
.erp-ui-table-standard tbody tr:hover td { background: var(--erp-primary-soft); }

:is(#view, body) .erp-ui-scope.erp-ui-scope.erp-ui-scope table tbody tr:is(.is-selected, .is-active, [aria-selected="true"]) td {
  color: #ffffff;
  background: var(--erp-primary);
  box-shadow: none;
}

.erp-ui-table-standard.erp-ui-table-standard.erp-ui-table-standard tbody tr:is(.is-selected, .is-active, [aria-selected="true"]) td {
  color: #ffffff;
  background: var(--erp-primary);
  box-shadow: none;
}

/* Seleção unitária de célula: opt-in, sem transformar a linha em selecionada. */
:is(#view, body) .erp-ui-scope.erp-ui-scope.erp-ui-scope [data-erp-cell-selection="1"] table tbody td[aria-selected="true"],
[data-erp-cell-selection="1"] .erp-ui-table-standard.erp-ui-table-standard.erp-ui-table-standard tbody td[aria-selected="true"] {
  color: #ffffff;
  background: var(--erp-primary);
  box-shadow: none;
}

.erp-ui-scope table .num,
.erp-ui-scope table [data-type="money"],
.erp-ui-scope table [data-type="number"] { font-variant-numeric: tabular-nums; text-align: right; }

.erp-ui-placeholder { pointer-events: none; }
.erp-ui-placeholder td { color: transparent; user-select: none; }
.erp-sortable { padding-right: 28px; cursor: pointer; user-select: none; }

.erp-sort-indicator {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  color: #8797aa;
  transform: translateY(-50%);
}

.erp-sort-indicator svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.erp-sortable:is(.is-sorted-asc, .is-sorted-desc) .erp-sort-indicator { color: var(--erp-primary); }
.erp-sortable:not(.is-sorted-asc) .erp-sort-up,
.erp-sortable:not(.is-sorted-desc) .erp-sort-down { opacity: 0.28; }

.erp-col-resizer { position: absolute; top: 0; right: -4px; bottom: 0; z-index: 3; width: 8px; cursor: col-resize; }
.erp-col-resizer::after { position: absolute; top: 20%; right: 3px; bottom: 20%; width: 1px; content: ""; background: transparent; }
.erp-col-resizer:hover::after { background: var(--erp-primary); }

/* Indicadores, estados e retorno de operacao. */
.erp-kpi-grid,
.erp-dashboard-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }

.erp-kpi,
.erp-dashboard-card {
  min-width: 0;
  padding: var(--erp-section-padding);
  background: var(--erp-surface);
  border: 1px solid var(--erp-border);
  border-radius: var(--erp-radius);
  box-shadow: var(--erp-shadow-sm);
}

.erp-kpi__label { color: var(--erp-text-soft); font-size: var(--erp-label-font); font-weight: 600; }
.erp-kpi__value { margin-top: 4px; color: var(--erp-text); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }

.erp-badge,
.erp-ui-badge,
.erp-ui-scope :where(.badge, .chip, [class*="status"]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  min-height: 20px;
  padding: 1px 8px;
  color: var(--erp-text-soft);
  background: #eef2f6;
  border: 1px solid #d8e0e9;
  border-radius: 999px;
  font-family: var(--erp-font);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.erp-badge--active,
.erp-badge--done,
.erp-badge--success { color: var(--erp-success); background: var(--erp-success-soft); border-color: #b8dcc8; }
.erp-badge--pending,
.erp-badge--warning { color: var(--erp-warning); background: var(--erp-warning-soft); border-color: #ead695; }
.erp-badge--inactive,
.erp-badge--danger { color: var(--erp-danger); background: var(--erp-danger-soft); border-color: #efbdc1; }
.erp-badge--analysis,
.erp-badge--info { color: var(--erp-info); background: var(--erp-info-soft); border-color: #b9d9ec; }

.erp-state {
  display: grid;
  justify-items: start;
  min-height: 64px;
  padding: var(--erp-section-padding);
  gap: 4px;
  color: var(--erp-text-soft);
  background: var(--erp-surface-subtle);
  border: 1px dashed var(--erp-border-strong);
  border-radius: var(--erp-radius);
  font-size: var(--erp-control-font);
}

.erp-state strong { color: var(--erp-text); }
.erp-state--success { color: var(--erp-success); background: var(--erp-success-soft); border-color: #b8dcc8; }
.erp-state--warning { color: var(--erp-warning); background: var(--erp-warning-soft); border-color: #ead695; }
.erp-state--info { color: var(--erp-info); background: var(--erp-info-soft); border-color: #b9d9ec; }
.erp-state--error { color: var(--erp-danger); background: var(--erp-danger-soft); border-color: #e8aeb3; }
.erp-state--loading { position: relative; padding-left: 42px; }

.erp-state--loading::before {
  position: absolute;
  top: 16px;
  left: 14px;
  width: 18px;
  height: 18px;
  content: "";
  border: 2px solid var(--erp-border-strong);
  border-top-color: var(--erp-primary);
  border-radius: 50%;
  animation: erp-spin 0.8s linear infinite;
}

.erp-route-state { display: grid; align-content: start; min-height: 180px; gap: 12px; }
@keyframes erp-spin { to { transform: rotate(360deg); } }

/* Dialogos existentes e dialogo gerado por erp-ui.js. */
.erp-dialog,
:is(#view, body) .erp-ui-scope.erp-ui-scope .erp-dialog.erp-dialog {
  color: var(--erp-text);
  background: var(--erp-surface);
  border: 1px solid var(--erp-border);
  border-radius: var(--erp-radius-lg);
  box-shadow: var(--erp-shadow);
  font-family: var(--erp-font);
}

.erp-ui-modal { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 20px; }
.erp-ui-modal[hidden] { display: none; }
.erp-ui-modal__backdrop { position: absolute; inset: 0; background: var(--erp-overlay); }

.erp-ui-modal__dialog {
  position: relative;
  width: min(520px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 16px;
  color: var(--erp-text);
  background: var(--erp-surface);
  border: 1px solid var(--erp-border);
  border-radius: var(--erp-radius-lg);
  box-shadow: var(--erp-shadow);
  font-family: var(--erp-font);
}

.erp-modal--sm { width: min(420px, calc(100vw - 40px)); }
.erp-modal--md { width: min(620px, calc(100vw - 40px)); }
.erp-modal--lg { width: min(960px, calc(100vw - 40px)); }
.erp-ui-modal__content { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: start; gap: 12px; }

.erp-ui-modal__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--erp-primary);
  background: var(--erp-primary-soft);
  border-radius: var(--erp-radius);
  font-size: 18px;
  font-weight: 800;
}

.erp-ui-modal[data-kind="success"] .erp-ui-modal__icon { color: var(--erp-success); background: var(--erp-success-soft); }
.erp-ui-modal[data-kind="error"] .erp-ui-modal__icon { color: var(--erp-danger); background: var(--erp-danger-soft); }
.erp-ui-modal[data-kind="warn"] .erp-ui-modal__icon { color: var(--erp-warning); background: var(--erp-warning-soft); }
.erp-ui-modal__title { margin: 0 0 6px; color: var(--erp-text); font-size: 16px; font-weight: 700; }
.erp-ui-modal__message { margin: 0; color: var(--erp-text-soft); font-size: var(--erp-control-font); white-space: pre-line; }
.sire-company-sigla { display: inline-grid; place-items: center; flex: 0 0 auto; min-width: 26px; height: 20px; padding: 0 5px; border-radius: var(--erp-radius-sm); background: var(--sire-company-color, var(--erp-company-1)); color: var(--erp-on-company); font: 700 11px/1 var(--erp-font); letter-spacing: .03em; font-variant-numeric: tabular-nums; } /* sigla da empresa (D-065) */
.erp-ui-modal__company { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; padding: 6px 8px; border: 1px solid var(--erp-border); border-left: 3px solid var(--sire-company-color, var(--erp-company-1)); border-radius: var(--erp-radius-sm); background: var(--erp-surface-subtle); color: var(--erp-text); font-size: var(--erp-control-font); } .erp-ui-modal__company[hidden] { display: none; } .erp-ui-modal__company strong { font-weight: 600; } /* empresa da tela nas confirmações (D-065) */
.erp-ui-modal__field { width: 100%; min-height: var(--erp-control-h); margin-top: 12px; }
textarea.erp-ui-modal__field { min-height: 72px; }
.erp-ui-modal__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.erp-ui-modal__columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; max-height: 46vh; margin-top: 12px; overflow: auto; }
.erp-ui-modal__column { display: flex; align-items: center; gap: 8px; min-height: 24px; font-size: var(--erp-control-font); }
.erp-ui-scope table :is(th, td, col).erp-col-hidden,
.erp-ui-table-standard :is(th, td, col).erp-col-hidden { display: none; }

/* Densidade touch e responsividade mantem a mesma identidade. */
[data-ui-density="touch"] {
  --erp-control-h: 44px;
  --erp-control-font: 15px;
  --erp-control-pad-x: 10px;
  --erp-label-font: 14px;
  --erp-label-gap: 4px;
  --erp-field-gap-x: 14px;
  --erp-field-gap-y: 10px;
  --erp-table-font: 14px;
  --erp-table-head-h: 42px;
  --erp-table-row-h: 44px;
  --erp-header-icon-size: 38px;
}

@media (max-width: 1093px) {
  .erp-ui-grid-fitted { --erp-grid-cols: 3; }
  .erp-kpi-grid,
  .erp-dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .erp-page-header { align-items: flex-start; flex-wrap: wrap; }
  .erp-page-header__actions { flex: 1 1 auto; }
}

@media (max-width: 720px) {
  :root { --erp-page-padding: 8px; }
  .erp-ui-grid-fitted,
  .erp-kpi-grid,
  .erp-dashboard-grid { grid-template-columns: 1fr; }
  .erp-form-row > .erp-field,
  .erp-form-row > [data-w] { flex: 1 1 100%; max-width: none; }
  .erp-check-grid { grid-template-columns: 1fr; }
  .erp-page-header { display: grid; grid-template-columns: minmax(0, 1fr); }
  .erp-page-header__actions,
  .erp-page-header__context { width: 100%; justify-content: flex-start; margin-left: 0; overflow-x: auto; }
  .erp-ui-modal { padding: 10px; }
  .erp-ui-modal__dialog,
  .erp-modal--sm,
  .erp-modal--md,
  .erp-modal--lg { width: calc(100vw - 20px); max-height: calc(100vh - 20px); }
}

@media (prefers-reduced-motion: reduce) {
  .erp-ui-scope *,
  .erp-ui-scope *::before,
  .erp-ui-scope *::after {
    scroll-behavior: auto;
    transition-duration: 0.01ms;
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
  }
}

@media print {
  .erp-ui-scope { padding: 0; background: #ffffff; }
  .erp-page-header,
  .erp-surface,
  .erp-table-container,
  .erp-ui-generated-wrap { box-shadow: none; }
  .erp-page-header__actions,
  .erp-ui-scope :where(button, .btn, .erp-btn) { display: none; }
}
