/* CVDB CSS separado — visual dos cards, listas, tabelas e responsividade.
 * Versão: 20260718_05 (V265)
 * Ajuste: popup de exclusão fechado até uma solicitação explícita do admin.
 */
:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e5e7eb;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --success-soft: #dcfce7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --warning: #ca8a04;
  --warning-soft: #fef3c7;
  --blue-soft: #eff6ff;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.05);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(37,99,235,0.08), transparent 23%),
    radial-gradient(circle at top right, rgba(22,163,74,0.06), transparent 20%),
    var(--bg);
  color: var(--text);
  font-family: Inter, Arial, Helvetica, sans-serif;
}

body.dark {
  --bg: #020617;
  --surface: #0f172a;
  --surface-2: #111827;
  --border: #1f2937;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --success-soft: rgba(22, 163, 74, 0.14);
  --danger-soft: rgba(220, 38, 38, 0.14);
  --warning-soft: rgba(202, 138, 4, 0.16);
  --blue-soft: rgba(37, 99, 235, 0.16);
  background:
    radial-gradient(circle at top left, rgba(37,99,235,0.18), transparent 24%),
    radial-gradient(circle at top right, rgba(22,163,74,0.12), transparent 20%),
    var(--bg);
}

body { padding: 14px; }

.page {
  width: min(100%, 1760px);
  margin: 0 auto;
}

.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: white;
  border-radius: 22px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  right: -72px;
  top: -72px;
  width: 190px;
  height: 190px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 1;
}

/* V266: cliente ativo compacto no cabeçalho, após a marca CVDB. */
.cvdb-hero-identidade {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.cvdb-contexto-operacao {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.cvdb-contexto-operacao[hidden] { display: none !important; }
.cvdb-contexto-operacao label {
  margin: 0;
  color: rgba(219, 234, 254, .78);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}
.cvdb-contexto-operacao select {
  width: clamp(220px, 28vw, 430px);
  min-height: 36px;
  height: 36px;
  padding: 6px 34px 6px 12px;
  border-color: rgba(96, 165, 250, .48);
  border-radius: 12px;
  background-color: rgba(3, 12, 32, .64);
  color: #f8fbff;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
}

h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(28px, 2.1vw, 38px); margin-bottom: 0; letter-spacing: -0.03em; }

.top-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  min-width: min(660px, 60vw);
}

.login-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.user-box {
  display: none;
  align-items: center;
  gap: 8px;
  max-width: 480px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.38);
  background: rgba(217, 119, 6, 0.12);
  color: white;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.user-box.visible { display: inline-flex; }
.user-dot {
  width: 10px;
  height: 10px;
  min-width: 10px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.13);
  transition: background-color 180ms ease, box-shadow 180ms ease;
}

.user-box.api-online {
  border-color: rgba(34, 197, 94, 0.38);
  background: rgba(22, 163, 74, 0.14);
}

.user-box.api-online .user-dot {
  background: #22c55e;
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.13);
}

.user-box.api-offline {
  border-color: rgba(239, 68, 68, 0.46);
  background: rgba(220, 38, 38, 0.14);
}

.user-box.api-offline .user-dot {
  background: #ef4444;
  box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.14);
}

.user-box.api-checking .user-dot {
  animation: cvdb-api-checking 900ms ease-in-out infinite alternate;
}

.user-box.api-action-success .user-dot {
  background: #22c55e;
  animation: cvdb-api-action-pulse 420ms ease-out 2;
}

@keyframes cvdb-api-checking {
  from { opacity: 0.55; transform: scale(0.88); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes cvdb-api-action-pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.58); }
  70% { transform: scale(1.18); box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .user-box.api-checking .user-dot,
  .user-box.api-action-success .user-dot {
    animation: none;
  }
}

.grid-status {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.card, .panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.status-card {
  min-height: 80px;
  padding: 12px;
  position: relative;
  overflow: hidden;
}

.status-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* CVDB_MARCACOES_NUMEROS_V1: contraste dos rotulos dos cartoes */
.status-label {
  color: #475569;
  font-size: 10.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
body.dark .status-label { color: #cbd5e1; }

.status-icon {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  font-size: 13px;
}

.status-value {
  margin-top: 6px;
  font-weight: 950;
  font-size: clamp(18px, 1.2vw, 24px);
  letter-spacing: -0.03em;
  word-break: break-word;
}
.last-code-card { grid-column: span 2; }
.last-code-value { font-size: clamp(14px, 1.05vw, 20px); line-height: 1.18; word-break: break-all; min-height: 24px; }

.status-sub { color: var(--muted); font-size: 12px; margin-top: 4px; display: none; }
.stock-counter { color: #2563eb; }
.located-counter { color: #16a34a; }
.pending-counter { color: #d97706; }
.danger-counter { color: #d97706; }
.divergent-counter { color: #6b7280; }
body.dark .stock-counter { color: #93c5fd; }
body.dark .located-counter { color: #86efac; }
body.dark .pending-counter { color: #fcd34d; }
body.dark .danger-counter { color: #fdba74; }
body.dark .divergent-counter { color: #d1d5db; }
.stock-card { border-color: rgba(59,130,246,.26); background: linear-gradient(135deg, rgba(59,130,246,.07), var(--surface)); }
.located-card { border-color: rgba(22,163,74,.32); background: linear-gradient(135deg, rgba(22,163,74,.10), var(--surface)); }
.pending-card { border-color: rgba(245,158,11,.34); background: linear-gradient(135deg, rgba(245,158,11,.10), var(--surface)); }
.segregated-card { border-color: rgba(249,115,22,.34); background: linear-gradient(135deg, rgba(249,115,22,.11), var(--surface)); }
.divergent-card { border-color: rgba(148,163,184,.34); background: linear-gradient(135deg, rgba(148,163,184,.12), var(--surface)); }
.last-code-card { border-color: rgba(37,99,235,.28); background: linear-gradient(135deg, rgba(37,99,235,.08), var(--surface)); }

.workspace {
  display: grid;
  grid-template-columns: minmax(420px, 0.62fr) minmax(760px, 1.38fr);
  gap: 14px;
  align-items: start;
}

.left-column { display: grid; gap: 14px; min-width: 0; }
.right-column { min-width: 0; }

.panel { padding: 18px; }
.panel-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.panel-title h2 { margin: 0 0 4px 0; font-size: 22px; letter-spacing: -0.02em; }
.panel-title span { color: var(--muted); font-size: 13px; }

label { font-weight: 900; font-size: 14px; display: block; margin-bottom: 8px; }
input, select {
  width: 100%;
  border: 2px solid #c7d2fe;
  background: #fff;
  color: var(--text);
  border-radius: 14px;
  padding: 13px 14px;
  outline: none;
  font-size: 15px;
}
body.dark input, body.dark select { background: #020617; border-color: #1d4ed8; color: var(--text); }
input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 5px rgba(37,99,235,0.12); }
.login-form input { width: 140px; height: 38px; border-width: 1px; border-radius: 999px; padding: 8px 12px; font-size: 13px; }

.scan-input { font-size: clamp(22px, 1.6vw, 31px); padding: 20px; }
.form-grid { display: grid; gap: 12px; }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.btn {
  border: none;
  border-radius: 13px;
  padding: 12px 15px;
  font-weight: 950;
  cursor: pointer;
  transition: 0.18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(15,23,42,0.08); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { background: var(--primary); color: white; }
.btn-secondary { background: #e2e8f0; color: #0f172a; }
.btn-success { background: #dcfce7; color: #166534; }
.btn-danger { background: #fee2e2; color: #991b1b; }
.btn-warning { background: #fef3c7; color: #92400e; }
.btn-ghost { background: rgba(255,255,255,0.12); color: white; border: 1px solid rgba(255,255,255,0.18); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.message {
  border-left: 6px solid var(--primary);
  background: var(--blue-soft);
  color: #1e3a8a;
  border-radius: 14px;
  padding: 14px 16px;
  font-weight: 900;
  margin: 12px 0;
  line-height: 1.35;
}
.message.ok, .message.localizados { background: var(--success-soft); color: #166534; border-left-color: var(--success); }
.message.erro { background: var(--danger-soft); color: #991b1b; border-left-color: var(--danger); }
.message.aviso, .message.pendentes { background: var(--warning-soft); color: #854d0e; border-left-color: var(--warning); }
.message.segregados { background: rgba(249,115,22,.14); color: #c2410c; border-left-color: #f97316; }
.message.divergentes { background: rgba(148,163,184,.18); color: #475569; border-left-color: #94a3b8; }
.message.declaracao { background: rgba(99,102,241,.14); color: #4338ca; border-left-color: #6366f1; }
body.dark .message { color: #bfdbfe; }
body.dark .message.ok { color: #bbf7d0; }
body.dark .message.erro { color: #fecaca; }
body.dark .message.aviso, body.dark .message.pendentes { color: #fde68a; }
body.dark .message.segregados { color: #fdba74; }
body.dark .message.divergentes { color: #d1d5db; }
body.dark .message.declaracao { color: #c4b5fd; }

.quick-last-read {
  border: 1px solid #bfdbfe;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 8px;
}
body.dark .quick-last-read { background: linear-gradient(135deg, rgba(37,99,235,0.16), #0f172a); border-color: #1d4ed8; }
.quick-title { color: var(--muted); font-size: 12px; font-weight: 950; text-transform: uppercase; letter-spacing: 0.05em; }
.quick-code { color: var(--primary-dark); font-size: clamp(20px, 1.6vw, 28px); font-weight: 950; word-break: break-word; }
body.dark .quick-code { color: #93c5fd; }
.quick-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 12px; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 10px; font-weight: 900; font-size: 12px; border: 1px solid var(--border); background: var(--surface-2); }
.pill-ok { background: var(--success-soft); color: #166534; border-color: #bbf7d0; }
.pill-err, .pill-warn { background: var(--warning-soft); color: #854d0e; border-color: #fde68a; }
.pill-seg { background: rgba(249,115,22,.14); color: #c2410c; border-color: rgba(249,115,22,.35); }
.pill-div { background: rgba(148,163,184,.18); color: #475569; border-color: rgba(148,163,184,.42); }
.pill-decl { background: rgba(99,102,241,.14); color: #4338ca; border-color: rgba(99,102,241,.34); }
.pill-blue { background: #eff6ff; color: #1d4ed8; border-color: #dbeafe; }
body.dark .pill-blue { background: #172554; color: #bfdbfe; border-color: #1d4ed8; }
body.dark .pill-div { color: #d1d5db; }
body.dark .pill-seg { color: #fdba74; }
body.dark .pill-decl { color: #c4b5fd; }
/* CVDB_MARCACOES_NUMEROS_V1: no tema escuro o texto das pills de status usa fundo solido e texto claro */
body.dark .pill-ok { background: #14532d; color: #dcfce7; border-color: #22c55e; }
body.dark .pill-err, body.dark .pill-warn { background: #713f12; color: #fef3c7; border-color: #eab308; }

.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 6px;
  border: 1px solid rgba(59,130,246,0.24);
  background: rgba(248,250,252,0.74);
  border-radius: 16px;
}
body.dark .tabs { background: rgba(15,23,42,0.35); }
.tab-group, .report-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tab-btn {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 9px 12px;
  cursor: pointer;
  font-weight: 950;
  color: var(--muted);
  background: transparent;
}
.tab-btn.active { color: #1d4ed8; border-color: rgba(37,99,235,.28); background: rgba(219,234,254,.9); }
.tab-btn[data-tab="localizados"].active { color: #166534; border-color: rgba(22,163,74,.38); background: rgba(220,252,231,.86); }
.tab-btn[data-tab="pendentes"].active { color: #92400e; border-color: rgba(245,158,11,.38); background: rgba(254,243,199,.9); }
.tab-btn[data-tab="segregados"].active { color: #c2410c; border-color: rgba(249,115,22,.42); background: rgba(255,237,213,.88); }
.tab-btn[data-tab="declaracao"].active { color: #4338ca; border-color: rgba(99,102,241,.38); background: rgba(224,231,255,.88); }
.tab-btn[data-tab="divergentes"].active { color: #475569; border-color: rgba(148,163,184,.46); background: rgba(226,232,240,.78); }
body.dark .tab-btn.active { color: #dbeafe; border-color: rgba(59,130,246,.68); background: rgba(37,99,235,.28); }
body.dark .tab-btn[data-tab="localizados"].active { color: #bbf7d0; border-color: rgba(34,197,94,.52); background: rgba(22,163,74,.18); }
body.dark .tab-btn[data-tab="pendentes"].active { color: #fde68a; border-color: rgba(245,158,11,.52); background: rgba(245,158,11,.17); }
body.dark .tab-btn[data-tab="segregados"].active { color: #fdba74; border-color: rgba(249,115,22,.54); background: rgba(249,115,22,.18); }
body.dark .tab-btn[data-tab="declaracao"].active { color: #c4b5fd; border-color: rgba(129,140,248,.54); background: rgba(99,102,241,.18); }
body.dark .tab-btn[data-tab="divergentes"].active { color: #d1d5db; border-color: rgba(148,163,184,.48); background: rgba(148,163,184,.15); }

.admin-leituras-acoes {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(239,68,68,.28);
  border-radius: 14px;
  background: rgba(239,68,68,.055);
}
.admin-leituras-acoes[hidden] { display: none; }
.admin-leituras-selecionar { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; font-weight: 800; }
.admin-leituras-selecionar input, .admin-leitura-check { width: 17px; height: 17px; accent-color: var(--danger); cursor: pointer; }
.admin-leituras-contador { color: var(--muted); font-size: 12px; font-weight: 800; }
.admin-leituras-botoes { display: flex; gap: 8px; margin-left: auto; }
.admin-leituras-excluir-todas { border: 1px solid rgba(220,38,38,.35); }
.admin-leitura-check-col { width: 46px; min-width: 46px; text-align: center; }
.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; }

.cvdb-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2,6,23,.72);
  backdrop-filter: blur(5px);
}
.cvdb-confirm-overlay[hidden],
.cvdb-confirm-overlay.cvdb-confirm-fechado { display: none !important; }
.cvdb-confirm-card {
  width: min(440px, 100%);
  padding: 24px;
  border: 1px solid rgba(248,113,113,.38);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(2,6,23,.46);
  text-align: center;
}
.cvdb-confirm-icon { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 50%; background: var(--danger-soft); color: var(--danger); font-size: 24px; font-weight: 950; }
.cvdb-confirm-card h3 { margin-bottom: 10px; }
.cvdb-confirm-card p { color: var(--muted); line-height: 1.5; }
.cvdb-confirm-card .cvdb-confirm-alerta { color: var(--danger); font-size: 12px; font-weight: 900; }
.cvdb-confirm-actions { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }

.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  max-height: calc(100vh - 310px);
  min-height: 360px;
}
.lista-localizados { border-color: rgba(22,163,74,.35); box-shadow: inset 0 0 0 1px rgba(22,163,74,.08); }
.lista-pendentes { border-color: rgba(245,158,11,.35); box-shadow: inset 0 0 0 1px rgba(245,158,11,.08); }
.lista-segregados { border-color: rgba(249,115,22,.38); box-shadow: inset 0 0 0 1px rgba(249,115,22,.09); }
.lista-declaracao { border-color: rgba(99,102,241,.35); box-shadow: inset 0 0 0 1px rgba(99,102,241,.08); }
.lista-divergentes { border-color: rgba(148,163,184,.42); box-shadow: inset 0 0 0 1px rgba(148,163,184,.10); }
table { width: 100%; border-collapse: collapse; min-width: 980px; }
thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  color: #475569; /* CVDB_MARCACOES_NUMEROS_V1: contraste do cabecalho da tabela */
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
body.dark thead th { color: #cbd5e1; }
tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: top; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
.lista-localizados thead th { background: rgba(220,252,231,.72); }
.lista-pendentes thead th { background: rgba(254,243,199,.72); }
.lista-segregados thead th { background: rgba(255,237,213,.74); }
.lista-declaracao thead th { background: rgba(224,231,255,.72); }
.lista-divergentes thead th { background: rgba(226,232,240,.72); }
body.dark .lista-localizados thead th { background: rgba(22,163,74,.14); }
body.dark .lista-pendentes thead th { background: rgba(245,158,11,.14); }
body.dark .lista-segregados thead th { background: rgba(249,115,22,.15); }
body.dark .lista-declaracao thead th { background: rgba(99,102,241,.16); }
body.dark .lista-divergentes thead th { background: rgba(148,163,184,.12); }
.linha-localizados { background: rgba(22,163,74,.035); }
.linha-pendentes { background: rgba(245,158,11,.04); }
.linha-segregados { background: rgba(249,115,22,.045); }
.linha-declaracao { background: rgba(99,102,241,.04); }
.linha-divergentes { background: rgba(148,163,184,.05); }
.report-table { width: min(760px, 100%); min-width: 640px; table-layout: fixed; }
.report-table th:nth-child(1), .report-table td:nth-child(1) { width: 220px; text-align: left; }
.report-table th:nth-child(n+2), .report-table td:nth-child(n+2) { width: 140px; text-align: right; }
/* V242 — códigos completos nas listas, sem corte visual. */
.codigo-pill {
  width: max-content;
  min-width: max-content;
  max-width: none;
  flex: 0 0 auto;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.status-cell { display: inline-flex; align-items: center; gap: 7px; }
.motivo-btn { position: relative; width: 27px; height: 21px; border: 1px solid rgba(125,211,252,0.9); border-radius: 10px; cursor: pointer; background: #e0f2fe; box-shadow: 0 4px 10px rgba(14,116,144,0.18); font-size: 0; }
.motivo-btn::before { content: ""; position: absolute; left: 6px; top: 8px; width: 4px; height: 4px; border-radius: 999px; background: #0e7490; box-shadow: 7px 0 #0e7490, 14px 0 #0e7490; }
.motivo-btn::after { content: ""; position: absolute; left: 5px; bottom: -4px; width: 8px; height: 8px; background: inherit; border-left: 1px solid rgba(125,211,252,0.9); border-bottom: 1px solid rgba(125,211,252,0.9); transform: rotate(45deg); }
.motivo-btn:hover, .motivo-btn:focus { outline: none; border-color: #38bdf8; box-shadow: 0 0 0 4px rgba(56,189,248,0.16); }
body.dark .motivo-btn { background: #164e63; border-color: rgba(34,211,238,0.55); }
body.dark .motivo-btn::before { background: #dbeafe; box-shadow: 7px 0 #dbeafe, 14px 0 #dbeafe; }
body.dark .motivo-btn::after { border-color: rgba(34,211,238,0.55); }
.empty-state { padding: 30px 14px; text-align: center; color: var(--muted); font-weight: 800; }
.sync { margin-top: 10px; padding: 11px 13px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); font-size: 12px; }
.raw-box { margin-top: 12px; max-height: 220px; overflow: auto; white-space: pre-wrap; font-family: Consolas, Monaco, monospace; font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 12px; color: var(--muted); }

@media (max-width: 1260px) {
  .grid-status { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .last-code-card { grid-column: span 2; }
  .workspace { grid-template-columns: 1fr; }
  .table-wrap { max-height: 560px; }
  .top-actions { min-width: 0; justify-content: flex-start; }
  .hero-top { flex-direction: column; }
  .cvdb-hero-identidade { width: 100%; }
}

@media (max-width: 700px) {
  .cvdb-hero-identidade { align-items: flex-start; flex-direction: column; gap: 10px; }
  .cvdb-contexto-operacao { width: 100%; align-items: stretch; flex-direction: column; gap: 5px; }
  .cvdb-contexto-operacao select { width: 100%; }
  body { padding: 10px; }
  .hero, .panel, .card { border-radius: 16px; }
  .grid-status, .two-cols { grid-template-columns: 1fr; }
  .last-code-card { grid-column: span 1; }
  .login-form, .login-form input, .login-form button, .actions .btn { width: 100%; }
  .top-actions { width: 100%; }
  .user-box { max-width: 100%; border-radius: 14px; }
  .admin-leituras-acoes { align-items: stretch; flex-direction: column; }
  .admin-leituras-botoes { width: 100%; margin-left: 0; flex-direction: column; }
  .cvdb-confirm-actions { flex-direction: column-reverse; }
}

[hidden] { display: none !important; }

/* CVDB_AJUSTE_FUNDO_TELA_INTEIRA_START */
html {
  min-height: 100%;
  background: var(--bg) !important;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 24%),
    radial-gradient(circle at top right, rgba(22, 163, 74, 0.08), transparent 20%),
    var(--bg) !important;
}

body.dark {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 24%),
    radial-gradient(circle at top right, rgba(22, 163, 74, 0.12), transparent 20%),
    var(--bg) !important;
}
/* CVDB_AJUSTE_FUNDO_TELA_INTEIRA_END */

/* CVDB_AJUSTE_TOPO_COMPACTO_START */
.hero {
  padding: 14px 22px !important;
  min-height: 58px !important;
  border-radius: 20px !important;
}

.hero h1 {
  font-size: clamp(28px, 1.8vw, 38px) !important;
  line-height: 1 !important;
  margin: 0 !important;
}

.hero .top-actions {
  gap: 8px !important;
  align-items: center !important;
}

.hero input {
  min-height: 38px !important;
  height: 38px !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

.hero button,
.hero .btn,
.hero .theme-toggle {
  min-height: 38px !important;
  height: 38px !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

.hero .brand,
.hero .hero-brand {
  min-height: 0 !important;
}
/* CVDB_AJUSTE_TOPO_COMPACTO_END */
