/*
 * ZARVIA ERP — layout padrão de todas as páginas internas.
 * Medidas, cores e tipografia são as da ficha "Solicitar acesso"
 * (institucional-login.css, bloco .zcr-*). Ajustes visuais devem ser
 * feitos aqui, nunca na página.
 */
:root {
  --zerp-navy: #01224b;
  --zerp-ink: #1a2333;
  --zerp-ink-2: #243447;
  --zerp-blue: #0a3a7a;
  --zerp-title: #0f2748;
  --zerp-brand: #0a2a5c;
  --zerp-muted: #5a6d86;
  --zerp-muted-2: #6b7c93;
  --zerp-line: #9eb0c8;
  --zerp-line-2: #8fa3bc;
  --zerp-line-3: #d5e0ec;
  --zerp-bg: #e8eef5;
  --zerp-group: #f7fafc;
  --zerp-focus: #1d6fd8;
  --zerp-font: "Segoe UI", Tahoma, sans-serif;
}

html.zerp-on,
html.zerp-on body {
  height: 100%;
  margin: 0;
  background: var(--zerp-bg);
}
html.zerp-on body {
  overflow: hidden;
  color: var(--zerp-ink);
  font-family: var(--zerp-font);
  font-size: 16px;
}

/* P0.29 — chrome legado jamais pinta em rota ERP (antes mesmo da casca montar) */
html.zerp-on .home-topbar,
html.zerp-on .acopa-ux-contextbar,
html.zerp-on #sidebar,
html.zerp-on .mobile-overlay,
html.zerp-on .inst-sidebar,
html.zerp-on aside.sidebar,
html.zerp-on .acopa-admin-sidebar {
  display: none !important;
}

/* P0.37.6 — conteúdo legado não pinta enquanto a casca ainda não está pronta. */
html.zerp-on[data-zerp-state="loading"] body > :not(script):not(style):not(link) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
}
html.zerp-on[data-zerp-state="loading"] body::before {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 32px;
  background: #01224b;
  z-index: 2;
}
html.zerp-on[data-zerp-state="loading"] body::after {
  content: "ZARVIA";
  position: fixed;
  top: 7px;
  left: 12px;
  z-index: 3;
  color: #fff;
  font: 700 13px "Segoe UI", Tahoma, sans-serif;
}
html.zerp-on[data-theme="dark"][data-zerp-state="loading"] body::before {
  background: #0b1220;
}

html.zerp-on[data-zerp-state="loading"] body > .copa-notif-wrap {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
}

html.zerp-on[data-zerp-state="error"] body > :not(#zerpBootError):not(script):not(style):not(link):not(.zerp-shell) {
  display: none !important;
}
html.zerp-on[data-zerp-state="error"] #zerpBootError {
  display: block !important;
  margin: 24px auto;
  max-width: 36rem;
}

html.zerp-on[data-theme="dark"],
html.zerp-on[data-theme="dark"] body {
  background: #0b1220;
  color: #e2e8f0;
}

/* P0.31 — variáveis e casca acompanham o tema (evita fundo #e8eef5 com data-theme=dark) */
html.zerp-on[data-theme="dark"] {
  --zerp-bg: #0b1220;
  --zerp-group: #121a2b;
  --zerp-ink: #e2e8f0;
  --zerp-ink-2: #cbd5e1;
  --zerp-muted: #94a3b8;
  --zerp-line: #2a3a55;
}
html.zerp-on[data-theme="dark"] .zerp-shell,
html.zerp-on[data-theme="dark"] .zerp-work,
html[data-theme="dark"] .zerp-shell,
html[data-theme="dark"] .zerp-work,
html[data-theme="dark"],
html[data-theme="dark"] body,
html[data-theme="dark"] :root {
  background: var(--zerp-bg, #0b1220) !important;
  color: var(--zerp-ink, #e2e8f0);
}
/* P0.31 — superfícies ERP não herdam fundo claro residual sob tema escuro */
html.zerp-on[data-theme="dark"] .zerp-main,
html.zerp-on[data-theme="dark"] .zerp-content,
html.zerp-on[data-theme="dark"] .zerp-page {
  background: transparent;
}

/* ── Casca ─────────────────────────────────────────────────────────── */
.zerp-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  color: var(--zerp-ink);
  background: var(--zerp-bg);
  font-family: var(--zerp-font);
  font-size: 16px;
  line-height: normal;
  letter-spacing: normal;
}
.zerp-shell *,
.zerp-shell *::before,
.zerp-shell *::after { box-sizing: border-box; }

/* ── Barra de título ───────────────────────────────────────────────── */
.zerp-titlebar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 6px 12px;
  background: linear-gradient(180deg, #f4f7fb 0%, #d9e3f0 100%);
  border-bottom: 1px solid var(--zerp-line);
  box-shadow: inset 0 1px 0 #fff;
}
.zerp-titlebar__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 0 1 220px;
  color: inherit;
  text-decoration: none;
}
.zerp-titlebar__brand img { width: 26px; height: auto; flex-shrink: 0; }
.zerp-titlebar__brand strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--zerp-brand);
  line-height: 1.1;
}
.zerp-titlebar__brand span {
  display: block;
  font-size: 0.68rem;
  color: var(--zerp-muted);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zerp-titlebar h1 {
  flex: 1 1 auto;
  margin: 0;
  text-align: center;
  font-family: var(--zerp-font);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--zerp-title);
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zerp-titlebar__meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 1 240px;
  min-width: 72px;
  max-width: 280px;
  overflow: hidden;
  font-size: 0.72rem;
  color: var(--zerp-muted);
}
.zerp-titlebar__user {
  /* P0.34.14 — elipse antes do X; nunca sobrepor o botão fechar */
  flex: 1 1 auto;
  min-width: 0;
  max-width: calc(100% - 40px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 4px;
}
.zerp-titlebar__x {
  position: relative;
  z-index: 2;
  width: 32px;
  height: 28px;
  flex: 0 0 32px;
  margin-left: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--zerp-line);
  border-radius: 3px;
  background: #eef3f9;
  color: #334155;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}
.zerp-titlebar__x:hover { background: #ffe4e4; border-color: #c45c5c; color: #9b1c1c; }

/* ── Toolbar ───────────────────────────────────────────────────────── */
.zerp-toolbar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 2px;
  flex: 0 0 auto;
  padding: 4px 8px;
  background: linear-gradient(180deg, #f7fafc 0%, #e2eaf3 100%);
  border-bottom: 1px solid #a8b8cc;
}
.zerp-tool {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 68px;
  min-height: 54px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #1e3354;
  font: inherit;
  font-family: var(--zerp-font);
  cursor: pointer;
  text-decoration: none;
}
.zerp-tool:hover {
  background: #fff;
  border-color: var(--zerp-line);
  box-shadow: 0 1px 2px rgba(15, 39, 72, 0.08);
}
.zerp-tool.is-primary {
  background: color-mix(in srgb, var(--zerp-navy) 8%, #fff);
  border-color: var(--zerp-line);
}
.zerp-tool.is-primary:hover { background: color-mix(in srgb, var(--zerp-navy) 14%, #fff); }
.zerp-tool.is-danger:hover { background: #fff1f1; border-color: #d4a0a0; }
.zerp-tool.is-active { background: #fff; border-color: var(--zerp-line); }
.zerp-tool:disabled,
.zerp-tool[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.zerp-tool.is-loading { opacity: 0.7; cursor: wait; }
.zerp-tool__ico {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--zerp-blue);
}
.zerp-tool__ico svg { width: 18px; height: 18px; }
.zerp-tool.is-danger .zerp-tool__ico { color: #b91c1c; }
.zerp-tool__lbl {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
}
.zerp-tool__key {
  font-size: 0.62rem;
  color: var(--zerp-muted-2);
  line-height: 1;
}
.zerp-tool__badge {
  position: absolute;
  top: 2px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #b91c1c;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}
.zerp-toolsep {
  width: 1px;
  margin: 6px 4px;
  background: #b7c6d9;
  flex: 0 0 auto;
}
.zerp-toolbar__spacer { flex: 1 1 auto; }

/* Menu de módulos (navegação do sistema) */
.zerp-menu {
  position: absolute;
  top: calc(100% - 2px);
  z-index: 60;
  min-width: 280px;
  max-width: min(720px, calc(100vw - 24px));
  max-height: min(70vh, 560px);
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--zerp-line);
  border-radius: 4px;
  background: var(--zerp-group);
  box-shadow: 0 8px 24px rgba(15, 39, 72, 0.18);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}
.zerp-menu[hidden] { display: none; }
.zerp-menu__grupo {
  margin: 0;
  padding: 6px 6px 8px;
  border: 1px solid var(--zerp-line);
  border-radius: 4px;
  background: #fff;
  min-width: 0;
}
.zerp-menu__grupo legend {
  padding: 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--zerp-blue);
}
.zerp-menu__item {
  display: block;
  width: 100%;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: var(--zerp-ink-2);
  font: inherit;
  font-size: 0.8rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.zerp-menu__item:hover { background: #eef3f9; border-color: #c5d2e3; }
.zerp-menu__item.is-active { background: #dce5f0; border-color: var(--zerp-line); font-weight: 700; color: var(--zerp-brand); }

/* ── Abas ──────────────────────────────────────────────────────────── */
.zerp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  flex: 0 0 auto;
  padding: 0 8px;
  background: #d5e0ec;
  border-bottom: 1px solid var(--zerp-line-2);
}
.zerp-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 6px 2px 0;
  padding: 7px 14px 8px;
  border: 1px solid var(--zerp-line-2);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: #c5d2e3;
  color: #334155;
  font: inherit;
  font-family: var(--zerp-font);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.zerp-tab:hover { background: #dce5f0; }
.zerp-tab.is-active {
  background: #f3f6fa;
  color: var(--zerp-brand);
  z-index: 1;
  margin-bottom: -1px;
  padding-bottom: 9px;
}
.zerp-tab__n {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--zerp-line-2);
  font-size: 0.68rem;
  font-weight: 800;
  background: #fff;
}
.zerp-tab.is-active .zerp-tab__n {
  background: var(--zerp-navy);
  border-color: var(--zerp-navy);
  color: #fff;
}
.zerp-tab.is-done .zerp-tab__n { background: #16a34a; border-color: #16a34a; color: #fff; }
.zerp-tab__count {
  min-width: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--zerp-line-2);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}

/* ── Área de trabalho ──────────────────────────────────────────────── */
.zerp-work {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 10px 12px 16px;
  background: linear-gradient(180deg, #f3f6fa 0%, #e8eef5 100%);
  font-size: 0.88rem;
  color: var(--zerp-ink);
}
.zerp-work--flush { padding: 0; }
.zerp-note {
  margin: 0 0 10px;
  padding: 6px 10px;
  border: 1px solid #b7c6d9;
  border-radius: 3px;
  background: #fff8e8;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #5c4a1f;
}
.zerp-note.is-info { background: #eef5ff; color: #1e3a5f; }
.zerp-note.is-error { background: #fde8e8; border-color: #e5a0a0; color: #9b1c1c; }
.zerp-note.is-ok { background: #e7f7ec; border-color: #8fcfa3; color: #146c3a; }
.zerp-note.is-warn { background: #fff8e8; border-color: #e5c77a; color: #7a5a12; }

[data-zerp-oculto],
[data-zerp-alvo] { display: none !important; }

.zerp-panel { display: none; }
.zerp-panel.is-active { display: block; animation: zerp-step-in 160ms ease; }
@keyframes zerp-step-in { from { opacity: 0; } to { opacity: 1; } }

.zerp-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.zerp-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}
.zerp-cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.zerp-cols--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.zerp-cols--side { grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); }

/* ── Grupo de campos (group box) ───────────────────────────────────── */
.zerp-grupo {
  margin: 0;
  padding: 12px 12px 14px;
  border: 1px solid var(--zerp-line);
  border-radius: 4px;
  background: var(--zerp-group);
  min-width: 0;
  box-shadow: inset 0 1px 0 #fff;
}
.zerp-grupo > legend {
  padding: 0 6px;
  margin-left: 2px;
  font-family: var(--zerp-font);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--zerp-blue);
}
.zerp-grupo__acoes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  margin: -4px 0 8px;
}
.zerp-grupo + .zerp-grupo { margin-top: 12px; }
.zerp-stack > .zerp-grupo + .zerp-grupo,
.zerp-cols > .zerp-grupo + .zerp-grupo { margin-top: 0; }

/* ── Grade de campos ───────────────────────────────────────────────── */
.zerp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  align-items: start;
}
.zerp-grid--1 { grid-template-columns: minmax(0, 1fr); }
.zerp-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.zerp-field {
  display: grid;
  grid-template-columns: minmax(110px, 180px) minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  min-width: 0;
}
.zerp-field.wide,
.zerp-field.span-2 { grid-column: 1 / -1; }
.zerp-field.is-top { align-items: start; }
.zerp-field.is-top > .zerp-lab { padding-top: 6px; }
.zerp-lab {
  margin: 0;
  font-family: var(--zerp-font);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--zerp-ink-2);
  text-align: right;
  line-height: 1.25;
}
.zerp-req { color: #dc2626; font-weight: 800; }
.zerp-control {
  display: flex;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
}
.zerp-control > input,
.zerp-control > select,
.zerp-control > textarea,
.zerp-control > .zerp-input { flex: 1 1 auto; min-width: 0; }
.zerp-value {
  min-height: 30px;
  display: flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid #c5d2e3;
  border-radius: 3px;
  background: #f1f5f9;
  color: var(--zerp-ink);
  font-size: 0.88rem;
  min-width: 0;
  overflow-wrap: anywhere;
}
.zerp-help {
  grid-column: 2;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--zerp-muted);
}
.zerp-help.is-ok { color: #15803d; font-weight: 600; }
.zerp-help.is-error { color: #b91c1c; font-weight: 600; }
.zerp-help.is-warn { color: #a16207; font-weight: 600; }

/* Controles */
.zerp-input,
.zerp-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
.zerp-field select,
.zerp-field textarea,
.zerp-control input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
.zerp-control select,
.zerp-control textarea {
  width: 100%;
  min-height: 30px;
  height: auto;
  padding: 4px 8px;
  border: 1px solid var(--zerp-line-2);
  border-radius: 3px;
  background: #fff;
  color: var(--zerp-ink);
  font: inherit;
  font-family: var(--zerp-font);
  font-size: 0.88rem;
  box-shadow: inset 1px 1px 0 rgba(15, 39, 72, 0.04);
}
html.zerp-on { color-scheme: light; }
html.zerp-on .zerp-work .zerp-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
html.zerp-on .zerp-work .zerp-field select,
html.zerp-on .zerp-work .zerp-field textarea,
html.zerp-on .zerp-work .zerp-control input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
html.zerp-on .zerp-work .zerp-control select,
html.zerp-on .zerp-work .zerp-control textarea,
html.zerp-on .zerp-work .zerp-input {
  min-height: 30px !important;
  margin: 0 !important;
  padding: 4px 8px !important;
  border: 1px solid var(--zerp-line-2) !important;
  border-radius: 3px !important;
  background: #fff !important;
  color: var(--zerp-ink) !important;
  font-family: var(--zerp-font) !important;
  font-size: 0.88rem !important;
}
html.zerp-on .zerp-work .zerp-field input:disabled,
html.zerp-on .zerp-work .zerp-field input[readonly],
html.zerp-on .zerp-work .zerp-field select:disabled,
html.zerp-on .zerp-work .zerp-input:disabled,
html.zerp-on .zerp-work .zerp-input[readonly] { background: #f1f5f9 !important; color: #475569 !important; }
html.zerp-on .zerp-work .zerp-field input:focus,
html.zerp-on .zerp-work .zerp-field select:focus,
html.zerp-on .zerp-work .zerp-field textarea:focus,
html.zerp-on .zerp-work .zerp-input:focus {
  outline: none !important;
  border-color: var(--zerp-focus) !important;
  box-shadow: 0 0 0 2px rgba(29, 111, 216, 0.2) !important;
}
.zerp-field textarea,
.zerp-control textarea,
textarea.zerp-input { min-height: 72px; resize: vertical; }
.zerp-input:focus,
.zerp-field input:focus,
.zerp-field select:focus,
.zerp-field textarea:focus,
.zerp-control input:focus,
.zerp-control select:focus,
.zerp-control textarea:focus {
  outline: none;
  border-color: var(--zerp-focus);
  box-shadow: 0 0 0 2px rgba(29, 111, 216, 0.2);
  background: #fffef5;
}
.zerp-input:disabled,
.zerp-input[readonly] { background: #f1f5f9; color: #475569; }
.zerp-input.is-invalid { border-color: #dc2626; background: #fff5f5; }
.zerp-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--zerp-ink-2);
  cursor: pointer;
}
.zerp-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--zerp-navy);
  color-scheme: light;
  background: #fff;
  border: 1px solid var(--zerp-line-2);
  border-radius: 2px;
}
html.zerp-on .zerp-work .zerp-check input,
html.zerp-on .zerp-work input[type="checkbox"],
html.zerp-on .zerp-work input[type="radio"] {
  color-scheme: light;
  accent-color: var(--zerp-navy);
}

/* Botão de consulta acoplado ao campo (F4) e botões de ação */
.zerp-f9,
.zerp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 0 0 auto;
  min-width: 52px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--zerp-line-2);
  border-radius: 3px;
  background: linear-gradient(180deg, #f8fbff 0%, #d5e0ec 100%);
  color: var(--zerp-brand);
  font: inherit;
  font-family: var(--zerp-font);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.1;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
.zerp-f9:hover,
.zerp-btn:hover { filter: brightness(1.04); border-color: #6f86a6; }
.zerp-btn.is-primary {
  background: linear-gradient(180deg, #1b4a86 0%, var(--zerp-navy) 100%);
  border-color: var(--zerp-navy);
  color: #fff;
}
.zerp-btn.is-danger { color: #9b1c1c; border-color: #d4a0a0; background: linear-gradient(180deg, #fff 0%, #fde8e8 100%); }
.zerp-btn.is-ok { color: #146c3a; border-color: #8fcfa3; background: linear-gradient(180deg, #fff 0%, #e7f7ec 100%); }
.zerp-btn:disabled,
.zerp-f9:disabled { opacity: 0.55; cursor: not-allowed; filter: none; }
.zerp-btn svg { width: 14px; height: 14px; }
.zerp-acoes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.zerp-acoes--end { justify-content: flex-end; }

/* ── Tabela densa ──────────────────────────────────────────────────── */
.zerp-tablewrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--zerp-line);
  border-radius: 3px;
  background: #fff;
}
.zerp-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-family: var(--zerp-font);
  font-size: 0.8rem;
  color: var(--zerp-ink);
}
.zerp-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: auto;
  padding: 5px 8px;
  border: 1px solid var(--zerp-line);
  border-top: 0;
  background: linear-gradient(180deg, #eef3f9 0%, #dce5f0 100%) !important;
  color: var(--zerp-blue) !important;
  font-size: 0.74rem;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}
.zerp-table td {
  height: auto;
  padding: 4px 8px;
  border: 1px solid var(--zerp-line-3);
  vertical-align: middle;
}
/* Força o esquema claro da ficha mesmo com tema escuro legado ativo. */
html.zerp-on .zerp-table td,
html.zerp-on .zerp-table-base td,
html.zerp-on .zerp-work table.zerp-table td,
html.zerp-on .zerp-work table.zerp-table-base td,
html.dark.zerp-on .zerp-table td,
html[data-theme="dark"].zerp-on .zerp-table td,
body.dark-mode .zerp-table td {
  background: #fff !important;
  color: var(--zerp-ink) !important;
}
html.zerp-on .zerp-table tbody tr:nth-child(even) td,
html.zerp-on .zerp-table-base tbody tr:nth-child(even) td,
html.dark.zerp-on .zerp-table tbody tr:nth-child(even) td,
html[data-theme="dark"].zerp-on .zerp-table tbody tr:nth-child(even) td {
  background: #f7fafc !important;
}
html.zerp-on .zerp-table tbody tr:hover td,
html.zerp-on .zerp-table-base tbody tr:hover td {
  background: #fffbe6 !important;
}
html.zerp-on .zerp-table tbody tr.is-selected td,
html.zerp-on .zerp-table-base tbody tr.is-selected td {
  background: #dbe8f8 !important;
}
.zerp-table tbody tr:nth-child(even) td { background: #f7fafc; }
.zerp-table tbody tr:hover td { background: #fffbe6; }
.zerp-table tbody tr.is-selected td { background: #dbe8f8; }
.zerp-table tbody tr[data-href],
.zerp-table tbody tr.is-link { cursor: pointer; }
.zerp-table .num,
.zerp-table .mono { text-align: right; font-variant-numeric: tabular-nums; }
.zerp-table .mono { text-align: left; font-family: Consolas, "Courier New", monospace; font-size: 0.78rem; }
.zerp-table__empty td { padding: 14px 8px; color: var(--zerp-muted); text-align: center; background: #fff !important; }
html.zerp-on .zerp-work .bg-white { background: #fff !important; }

/* Indicadores (contadores do módulo) */
.zerp-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.zerp-kpi {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 10px;
  border: 1px solid var(--zerp-line);
  border-radius: 3px;
  background: #fff;
  min-width: 0;
}
.zerp-kpi__lbl { font-size: 0.7rem; font-weight: 600; color: var(--zerp-muted); }
.zerp-kpi__val { font-size: 1.05rem; font-weight: 800; color: var(--zerp-brand); font-variant-numeric: tabular-nums; }

.zerp-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border: 1px solid #b7c6d9;
  border-radius: 3px;
  background: #eef3f9;
  color: #1e3354;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}
.zerp-tag.is-ok { background: #e7f7ec; border-color: #8fcfa3; color: #146c3a; }
.zerp-tag.is-warn { background: #fff8e8; border-color: #e5c77a; color: #7a5a12; }
.zerp-tag.is-error { background: #fde8e8; border-color: #e5a0a0; color: #9b1c1c; }

.zerp-msg {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 3px;
  font-size: 0.84rem;
  line-height: 1.4;
}
.zerp-msg.error { background: #fde8e8; border: 1px solid #e5a0a0; color: #9b1c1c; }
.zerp-msg.ok { background: #e7f7ec; border: 1px solid #8fcfa3; color: #146c3a; }

/* ── Barra de status ───────────────────────────────────────────────── */
.zerp-statusbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 28px;
  padding: 4px 12px;
  background: linear-gradient(180deg, #e2eaf3 0%, #cfdceb 100%);
  border-top: 1px solid var(--zerp-line);
  font-family: var(--zerp-font);
  font-size: 0.72rem;
  color: #334155;
}
.zerp-statusbar__mod { font-weight: 800; color: var(--zerp-blue); letter-spacing: 0.04em; }
.zerp-statusbar__sep { color: var(--zerp-line-2); }
.zerp-statusbar__hint { color: var(--zerp-muted); }
.zerp-statusbar__right { margin-left: auto; color: var(--zerp-muted); }
.zerp-statusbar__credit { color: var(--zerp-muted); white-space: nowrap; }
.zerp-statusbar__credit b { color: #1351b4; letter-spacing: 0; }
.zerp-statusbar__credit-link {
  color: inherit;
  text-decoration: none;
}
.zerp-statusbar__credit-link:hover,
.zerp-statusbar__credit-link:focus-visible {
  text-decoration: underline;
}
.zerp-statusbar__credit-link b { color: #1351b4; }
html.zerp-on #zarvia-attribution-global { display: none !important; }
/* Faixa/contexto legado: a casca já traz título, toolbar e status. */
html.zerp-on #acopa-faixa-cidadao,
html.zerp-on .acopa-ux-contextbar,
html.zerp-on #acopa-home-id-bar { display: none !important; }
html.zerp-on body.acopa-tem-faixa-cidadao,
html.zerp-on body.acopa-home-com-atendimento { padding-top: 0 !important; }

/* ── Componentes base dentro da área de trabalho ───────────────────── */
/* Card → grupo de campos */
html.zerp-on .zerp-card {
  border: 1px solid var(--zerp-line) !important;
  border-radius: 4px !important;
  background: var(--zerp-group) !important;
  box-shadow: inset 0 1px 0 #fff !important;
  color: var(--zerp-ink);
}
html.zerp-on .zerp-card__head {
  flex-direction: row !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px !important;
  padding: 6px 12px 0 !important;
  background: transparent !important;
  border: 0 !important;
}
html.zerp-on .zerp-card__head > * + * { margin-top: 0 !important; }
html.zerp-on .zerp-card__title {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  margin: 0 !important;
  padding: 0 6px !important;
  font-family: var(--zerp-font) !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  color: var(--zerp-blue) !important;
  letter-spacing: 0 !important;
  line-height: 1.3 !important;
}
html.zerp-on .zerp-card__title svg { width: 14px !important; height: 14px !important; }
html.zerp-on .zerp-card__desc { font-size: 0.72rem !important; color: var(--zerp-muted) !important; padding: 0 6px; }
html.zerp-on .zerp-card__body { padding: 8px 12px 12px !important; }
html.zerp-on .zerp-card__foot { padding: 0 12px 12px !important; gap: 6px; }

/* Rótulo à esquerda do campo nos formulários base */
html.zerp-on .zerp-formrow {
  display: grid !important;
  grid-template-columns: minmax(110px, 180px) minmax(0, 1fr);
  gap: 4px 10px !important;
  align-items: center;
}
html.zerp-on .zerp-formrow > * + * { margin-top: 0 !important; }
html.zerp-on .zerp-formrow > .zerp-label-base { text-align: right; }
html.zerp-on .zerp-formrow > :not(.zerp-label-base):not(:nth-child(2)) { grid-column: 2; }

html.zerp-on .zerp-label-base {
  font-family: var(--zerp-font) !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  color: var(--zerp-ink-2) !important;
  line-height: 1.25 !important;
}
html.zerp-on .zerp-input-base {
  min-height: 30px !important;
  height: 30px;
  padding: 4px 8px !important;
  border: 1px solid var(--zerp-line-2) !important;
  border-radius: 3px !important;
  background-color: #fff !important;
  color: var(--zerp-ink) !important;
  font-family: var(--zerp-font) !important;
  font-size: 0.88rem !important;
  box-shadow: inset 1px 1px 0 rgba(15, 39, 72, 0.04) !important;
}
.zerp-work textarea.zerp-input-base { height: auto; min-height: 72px !important; }
html.zerp-on .zerp-input-base:focus,
html.zerp-on .zerp-input-base:focus-visible,
html.zerp-on .zerp-input-base[data-state="open"] {
  outline: none !important;
  border-color: var(--zerp-focus) !important;
  box-shadow: 0 0 0 2px rgba(29, 111, 216, 0.2) !important;
  background-color: #fffef5 !important;
  --tw-ring-shadow: 0 0 #0000;
}

/* Botões base */
html.zerp-on .zerp-btn-base {
  min-height: 30px;
  height: auto !important;
  padding: 0 10px !important;
  border-radius: 3px !important;
  font-family: var(--zerp-font) !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}
html.zerp-on .zerp-btn-base[data-variant="default"] {
  border: 1px solid var(--zerp-navy) !important;
  background: linear-gradient(180deg, #1b4a86 0%, var(--zerp-navy) 100%) !important;
  color: #fff !important;
}
html.zerp-on .zerp-btn-base[data-variant="outline"],
html.zerp-on .zerp-btn-base[data-variant="secondary"] {
  border: 1px solid var(--zerp-line-2) !important;
  background: linear-gradient(180deg, #f8fbff 0%, #d5e0ec 100%) !important;
  color: var(--zerp-brand) !important;
}
html.zerp-on .zerp-btn-base[data-variant="destructive"] {
  border: 1px solid #d4a0a0 !important;
  background: linear-gradient(180deg, #fff 0%, #fde8e8 100%) !important;
  color: #9b1c1c !important;
}
html.zerp-on .zerp-btn-base[data-variant="ghost"] { border-radius: 3px !important; color: var(--zerp-brand); }
html.zerp-on .zerp-btn-base[data-variant="ghost"]:hover { background: #eef3f9 !important; }
html.zerp-on .zerp-btn-base[data-size="icon"] { min-width: 30px; width: 30px; padding: 0 !important; }
html.zerp-on .zerp-btn-base:hover { filter: brightness(1.04); }

/* Tabela base */
html.zerp-on .zerp-tablewrap-base {
  border: 1px solid var(--zerp-line);
  border-radius: 3px;
  background: #fff;
}
html.zerp-on .zerp-table-base {
  border-collapse: collapse;
  font-family: var(--zerp-font);
  font-size: 0.8rem !important;
  background: #fff;
}
html.zerp-on .zerp-table-base th {
  height: auto !important;
  padding: 5px 8px !important;
  border: 1px solid var(--zerp-line);
  border-top: 0;
  background: linear-gradient(180deg, #eef3f9 0%, #dce5f0 100%) !important;
  color: var(--zerp-blue) !important;
  font-size: 0.74rem !important;
  font-weight: 700 !important;
  white-space: nowrap;
}
html.zerp-on .zerp-table-base td {
  padding: 4px 8px !important;
  border: 1px solid var(--zerp-line-3);
}
html.zerp-on .zerp-table-base tbody tr { border: 0 !important; }
html.zerp-on .zerp-table-base tbody tr:nth-child(even) td { background: #f7fafc; }
html.zerp-on .zerp-table-base tbody tr:hover td { background: #fffbe6; }

/* Abas internas (Radix Tabs) no formato das abas da ficha */
html.zerp-on .zerp-subtabs {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: flex-start !important;
  height: auto !important;
  gap: 0 !important;
  margin: 0 0 10px;
  padding: 0 4px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--zerp-line-2) !important;
  border-radius: 0 !important;
  background: #d5e0ec !important;
}
html.zerp-on .zerp-subtab {
  margin: 6px 2px 0 !important;
  padding: 6px 12px 7px !important;
  border: 1px solid var(--zerp-line-2) !important;
  border-bottom: 0 !important;
  border-radius: 6px 6px 0 0 !important;
  background: #c5d2e3 !important;
  color: #334155 !important;
  font-family: var(--zerp-font) !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}
html.zerp-on .zerp-subtab[data-state="active"] {
  background: #f3f6fa !important;
  color: var(--zerp-brand) !important;
  margin-bottom: -1px !important;
  padding-bottom: 8px !important;
}

/* Formulários existentes: rótulo à esquerda do campo */
html.zerp-on .zerp-work div:has(> .zerp-label-base:first-child + .zerp-input-base),
html.zerp-on .zerp-work div:has(> .zerp-label-base:first-child + .relative > .zerp-input-base),
html.zerp-on .zerp-work div:has(> .zerp-label-base:first-child + button.zerp-input-base) {
  display: grid !important;
  grid-template-columns: minmax(110px, 180px) minmax(0, 1fr);
  gap: 4px 10px !important;
  align-items: center;
}
html.zerp-on .zerp-work div:has(> .zerp-label-base:first-child + .zerp-input-base) > *,
html.zerp-on .zerp-work div:has(> .zerp-label-base:first-child + .relative > .zerp-input-base) > *,
html.zerp-on .zerp-work div:has(> .zerp-label-base:first-child + button.zerp-input-base) > * { margin-top: 0 !important; }
html.zerp-on .zerp-work div:has(> .zerp-label-base:first-child + .zerp-input-base) > .zerp-label-base,
html.zerp-on .zerp-work div:has(> .zerp-label-base:first-child + .relative > .zerp-input-base) > .zerp-label-base,
html.zerp-on .zerp-work div:has(> .zerp-label-base:first-child + button.zerp-input-base) > .zerp-label-base { text-align: right; }
html.zerp-on .zerp-work div:has(> .zerp-label-base:first-child + .zerp-input-base) > :nth-child(n+3),
html.zerp-on .zerp-work div:has(> .zerp-label-base:first-child + .relative > .zerp-input-base) > :nth-child(n+3),
html.zerp-on .zerp-work div:has(> .zerp-label-base:first-child + button.zerp-input-base) > :nth-child(n+3) { grid-column: 2; }

/* Botões levados para a toolbar viram comandos da toolbar */
html.zerp-on .zerp-toolbar .zerp-btn-base,
html.zerp-on .zerp-toolbar .erp-ws__cmd {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  min-width: 68px;
  min-height: 54px !important;
  height: auto !important;
  padding: 4px 8px !important;
  border: 1px solid transparent !important;
  border-radius: 4px !important;
  background: transparent !important;
  color: #1e3354 !important;
  font-family: var(--zerp-font) !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  line-height: 1.1 !important;
  box-shadow: none !important;
  white-space: nowrap;
  text-decoration: none;
  filter: none !important;
}
html.zerp-on .zerp-toolbar .zerp-btn-base:hover,
html.zerp-on .zerp-toolbar .erp-ws__cmd:hover {
  background: #fff !important;
  border-color: var(--zerp-line) !important;
  box-shadow: 0 1px 2px rgba(15, 39, 72, 0.08) !important;
}
html.zerp-on .zerp-toolbar .zerp-btn-base[data-variant="default"],
html.zerp-on .zerp-toolbar .erp-ws__cmd--primary {
  background: color-mix(in srgb, var(--zerp-navy) 8%, #fff) !important;
  border-color: var(--zerp-line) !important;
}
html.zerp-on .zerp-toolbar .zerp-btn-base[data-variant="destructive"] svg { color: #b91c1c !important; }
html.zerp-on .zerp-toolbar .zerp-btn-base svg,
html.zerp-on .zerp-toolbar .erp-ws__cmd svg {
  width: 18px !important;
  height: 18px !important;
  margin: 2px 0 !important;
  color: var(--zerp-blue);
}
html.zerp-on .zerp-toolbar .erp-ws__cmd b { font-size: 0.72rem; font-weight: 600; }
html.zerp-on .zerp-toolbar .erp-ws__cmd span { font-size: 0.62rem; color: var(--zerp-muted-2); font-weight: 400; }

/* Cascos antigos (ErpWorkspace / ModulePage) dentro da área de trabalho */
html.zerp-on .zerp-work .erp-ws--zerp,
html.zerp-on .zerp-work .acopa-module--zerp {
  display: block;
  height: auto;
  max-height: none;
  min-height: 0;
  overflow: visible;
  background: transparent;
  color: var(--zerp-ink);
  font-family: var(--zerp-font);
  font-size: 0.88rem;
}
html.zerp-on .zerp-work .erp-ws--zerp .erp-ws__filter {
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--zerp-line);
  border-radius: 4px;
  background: var(--zerp-group);
  box-shadow: inset 0 1px 0 #fff;
}
html.zerp-on .zerp-work .erp-ws--zerp .erp-ws__body {
  display: grid;
  gap: 12px;
  min-height: 0;
  background: transparent;
  align-items: start;
}
html.zerp-on .zerp-work .erp-ws--zerp .erp-ws__listpane,
html.zerp-on .zerp-work .erp-ws--zerp .erp-ws__detail {
  background: transparent;
  border: 0 !important;
  overflow: visible;
  min-height: 0;
}
html.zerp-on .zerp-work .erp-ws--zerp .erp-ws__listpane > .zerp-grupo {
  max-height: calc(100dvh - 230px);
  overflow: auto;
}
html.zerp-on .zerp-work .erp-ws--zerp .erp-ws__detail-scroll { padding: 0; overflow: visible; }
html.zerp-on .zerp-work .erp-ws--zerp .erp-ws__panel { margin: 0 0 12px; overflow: visible; }
html.zerp-on .zerp-work .acopa-module--zerp .acopa-module__body,
html.zerp-on .zerp-work .acopa-module--zerp .acopa-module__inner { padding: 0; max-width: none; background: transparent; }

/* Tipografia de conteúdo legado dentro da ficha */
.zerp-work h1,
.zerp-work h2,
.zerp-work h3 {
  font-family: var(--zerp-font);
  letter-spacing: 0;
}

/* ── Responsivo ────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .zerp-panel, .zerp-tool { animation: none; transition: none; }
}
@media (max-width: 1100px) {
  .zerp-cols--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zerp-cols--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .zerp-titlebar h1 { font-size: 0.92rem; text-align: left; }
  .zerp-titlebar__brand span,
  .zerp-titlebar__user { display: none; }
  .zerp-titlebar__brand,
  .zerp-titlebar__meta { flex: 0 0 auto; }
  .zerp-tool { min-width: 56px; min-height: 48px; }
  .zerp-tool__key { display: none; }
  .zerp-field,
  .zerp-work .zerp-formrow { grid-template-columns: 1fr; gap: 3px; }
  .zerp-lab,
  .zerp-work .zerp-formrow > .zerp-label-base { text-align: left; }
  .zerp-help,
  .zerp-work .zerp-formrow > :not(.zerp-label-base):not(:nth-child(2)) { grid-column: 1; }
  .zerp-cols,
  .zerp-cols--side { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .zerp-statusbar__credit { display: none; }
}
/* Ficha cidadão / serviço — identificação global */
.zerp-ficha-id {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.zerp-ficha-id__dados { flex: 1 1 auto; min-width: 0; }
.zerp-ficha-id__kpis { margin-top: 12px; }
.zerp-foto-frame {
  flex: 0 0 auto;
  width: 76px;
  height: 92px;
  padding: 0;
  border: 1px solid var(--zerp-line, #b7c6d9);
  border-radius: 3px;
  background: var(--zerp-bg, #e8eef5);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.zerp-foto-frame--sm {
  width: 64px;
  height: 76px;
}
.zerp-foto-frame:focus-visible {
  outline: 2px solid var(--zerp-brand, #0B4F8A);
  outline-offset: 2px;
}
.zerp-foto-slot {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}
.zerp-foto-img {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity .22s ease;
}
.zerp-foto-img.is-visible { opacity: 1; }
.zerp-foto-skeleton {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: linear-gradient(135deg, var(--zerp-bg, #e8eef5) 0%, #d5e0ee 45%, var(--zerp-bg, #e8eef5) 100%);
  background-size: 200% 200%;
  animation: zerp-foto-shimmer 1.2s ease-in-out infinite;
  color: var(--zerp-muted, #5a6d86);
  position: absolute;
  inset: 0;
}
.zerp-foto-skeleton:not(.zerp-foto-slot .zerp-foto-skeleton) {
  position: relative;
}
.zerp-foto-skeleton__spin {
  width: 14px;
  height: 14px;
  border: 2px solid var(--zerp-line, #b7c6d9);
  border-top-color: var(--zerp-brand, #0B4F8A);
  border-radius: 50%;
  animation: zerp-foto-spin .7s linear infinite;
}
.zerp-foto-skeleton__txt {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.zerp-foto-erro {
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--zerp-bg, #e8eef5);
  color: var(--zerp-ink, #0f2744);
  font-size: 10px;
  cursor: pointer;
}
@keyframes zerp-foto-spin { to { transform: rotate(360deg); } }
@keyframes zerp-foto-shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.zerp-table tbody tr.is-link.is-loading td {
  opacity: 0.72;
}
.zerp-servico-resumo {
  display: grid;
  gap: 10px;
}
.zerp-ficha-id__titulo {
  margin: 0 0 2px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--zerp-ink, #0f2744);
  line-height: 1.25;
}
.zerp-ficha-id__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin-top: 6px;
  font-size: 12px;
  color: var(--zerp-muted, #5a6d86);
}
.zerp-ficha-id__meta strong {
  color: var(--zerp-ink, #0f2744);
  font-weight: 600;
}
@media (max-width: 640px) {
  /* P0.34.39 — padrão ERP responsivo: stack vertical, toolbar scrollável, titlebar compacta */
  .zerp-grid,
  .zerp-grid--3,
  .zerp-cols--3,
  .zerp-cols--4 { grid-template-columns: 1fr; }
  .zerp-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .zerp-tab { white-space: nowrap; }
  .zerp-statusbar__hint { display: none; }
  .zerp-titlebar { padding-inline: 8px; gap: 6px; }
  .zerp-titlebar h1 { max-width: calc(100% - 36px); font-size: 0.86rem; }
  .zerp-toolbar { overflow-x: auto; flex-wrap: nowrap; gap: 4px; -webkit-overflow-scrolling: touch; }
  .zerp-tool span:not(.zerp-tool__ico):not(.zerp-tool__key) { display: none; }
  .zerp-work { padding: 8px; }
  .zerp-grupo { padding: 10px; }
  .zerp-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .notas-internas-erp { max-width: 100%; }
}

/* Notas internas — busca com ícone em flex (não depende de padding do input). */
.notas-internas-erp .notas-internas-busca input[type="search"] {
  padding: 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
}
.notas-internas-erp .notas-internas-busca input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}
@media print {
  html.zerp-on body { overflow: visible; }
  .zerp-titlebar, .zerp-toolbar, .zerp-tabs, .zerp-statusbar { display: none !important; }
  .zerp-shell, .zerp-work { height: auto !important; max-height: none !important; overflow: visible !important; background: #fff !important; }
  .zerp-panel { display: block !important; }
}
