/* =========================================================================
   Notas Fiscais de Entrada (NotaLocal no bi-stack) -- 16/10/2026
   Estilo padrão "notalocal" = visual do pacote NotaLocal (menu verde-escuro,
   destaque verde-limão, fundo creme). Os 5 "Vidro" são os mesmos do resto do
   bi-stack (comercial-dashboard/treinamentos): [data-estilo^="vidro-"] dá a
   estrutura (blur/arredondado), [data-estilo="vidro-X"] só as cores.
   Tudo usa variáveis -- componente novo NÃO deve ter cor fixa.
   ========================================================================= */

:root{
  --font: 'Inter', 'Segoe UI', Arial, sans-serif;
  --mono: 'JetBrains Mono', Consolas, monospace;
  --radius: 7px;
  --radius-lg: 9px;
}

/* ---------------------------- NotaLocal (padrão) ---------------------------- */
:root, [data-estilo="notalocal"]{
  --bg: #f5f6f1; --surface: #ffffff; --surface-2: #fafbf7; --surface-3: #f0f3e8;
  --line: #e2e7dd; --line-2: #edf0e7;
  --text: #1f352f; --text-2: #3f5141; --muted: #6f7b74; --faint: #899280;
  --accent: #2b5945; --accent-2: #214a37; --accent-soft: #e8f2e3; --accent-text: #46713b;
  --highlight: #d5eb88; --highlight-text: #203b2d;
  --sidebar-bg: #183d31; --sidebar-text: #cfddd3; --sidebar-muted: #99b1a1; --sidebar-hover: #24503e;
  --sidebar-line: #355746; --sidebar-active: #d5eb88; --sidebar-active-text: #203b2d;
  --sidebar-box: rgba(255,255,255,0.04);
  --input-bg: #ffffff; --input-line: #dbe1d4;
  --danger: #a73b36; --danger-soft: #f9e5e1;
  --warn-bg: #fbf1da; --warn-line: #f0dfb9; --warn-text: #86652d;
  --info-bg: #edf2ed; --info-line: #d9e4d5; --info-text: #526a4d;
  --shadow: 0 1px 2px rgba(20,40,30,0.05);
}

/* ---------------------------- RadarSEFAZ (21/10/2026) ----------------------------
   Identidade oficial "Opção 01 · Azul e ciano": principal #123B70, destaque #06B6D4,
   fundo #ECF8FC, branco. Ciano só em destaque/elementos gráficos (texto pequeno em
   ciano sobre branco tem pouco contraste -- orientação do LEIA-ME da marca). */
[data-estilo="radarsefaz"]{
  --bg: #ECF8FC; --surface: #ffffff; --surface-2: #f7fcfe; --surface-3: #e3f3f9;
  --line: #d3e7f0; --line-2: #e6f2f7;
  --text: #10284a; --text-2: #24405f; --muted: #5d7390; --faint: #8497ad;
  --accent: #123B70; --accent-2: #0c2b54; --accent-soft: #e0f4fa; --accent-text: #0b6c85;
  --highlight: #06B6D4; --highlight-text: #0b2a52;
  --sidebar-bg: #123B70; --sidebar-text: #dbe8f6; --sidebar-muted: #93afd0; --sidebar-hover: #1b4a85;
  --sidebar-line: #2a5288; --sidebar-active: #06B6D4; --sidebar-active-text: #0b2a52;
  --sidebar-box: rgba(255,255,255,0.05);
  --input-bg: #ffffff; --input-line: #cfe2eb;
  --info-bg: #e6f6fb; --info-line: #c3e8f3; --info-text: #145a75;
  --shadow: 0 1px 2px rgba(18,59,112,0.06);
}
[data-estilo="radarsefaz"] .topbar{ border-bottom: 3px solid #06B6D4; }
[data-estilo="radarsefaz"] .brand-mark span{ color: #123B70; }
[data-estilo="radarsefaz"] .theme-option.selected{ border-color: #06B6D4; }

*{ box-sizing: border-box; }
html, body{ min-height: 100%; }
body{ margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); }
a{ color: var(--accent); }
button, input, select, textarea{ font: inherit; }
button{ cursor: pointer; }
button:disabled, .btn.disabled{ opacity: .45; cursor: not-allowed; pointer-events: none; }

/* ---------------------------- Layout ---------------------------- */
.app-shell{ display: flex; min-height: 100vh; }
.sidebar{
  width: 244px; flex-shrink: 0; background: var(--sidebar-bg); color: var(--sidebar-text);
  padding: 22px 16px; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 70;
}

/* Topo do menu: logo da EMPRESA (cliente) grande + programa pequeno embaixo */
.brand-empresa{ display: flex; justify-content: center; align-items: center; padding: 4px 6px 12px; }
.brand-empresa img{ max-width: 190px; object-fit: contain; }
.brand-empresa .brand-empresa-nome{ color: #fff; font-weight: 700; font-size: 18px; text-align: center; }
.brand-produto{
  display: flex; align-items: center; justify-content: center; gap: 7px;
  color: var(--sidebar-text); text-decoration: none; padding: 0 6px 16px; margin-bottom: 14px;
  border-bottom: 1px solid var(--sidebar-line);
}
.brand-produto img{ height: 18px; width: auto; }
.brand-mark{
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: var(--highlight); color: var(--sidebar-bg); font-weight: 700; line-height: 1;
  width: 20px; height: 22px; border-radius: 6px; font-size: 17px; letter-spacing: -2px; padding-right: 2px;
}
.brand-mark span{ color: #548c35; }
.brand-produto-txt{ display: flex; flex-direction: column; line-height: 1.1; }
/* Logo RadarSEFAZ: versão branca+ciano em menu escuro, colorida em menu claro (Vidro) */
.logo-sobre-claro{ display: none; }
[data-estilo^="vidro-"]:not([data-estilo="vidro-escuro"]) .logo-sobre-escuro{ display: none; }
[data-estilo^="vidro-"]:not([data-estilo="vidro-escuro"]) .logo-sobre-claro{ display: block; }
.brand-radar{ flex-direction: column; gap: 6px; }
.brand-radar img{ height: auto; width: 150px; }
.brand-produto-destaque{ padding: 6px 4px 18px; }
.brand-produto-destaque.brand-radar img{ width: 196px; }
.brand-radar-sub{ font-size: 9.5px; color: var(--sidebar-muted); letter-spacing: .2px; text-align: center; }
.brand-produto-txt strong{ font-size: 12px; font-weight: 700; letter-spacing: -.2px; color: var(--sidebar-text); }
.brand-produto-txt small{ font-size: 7.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--sidebar-muted); }

.nav-group{ margin-bottom: 12px; }
.nav-group-label{
  margin: 0 0 6px; padding: 7px 12px; font-size: 10px; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--sidebar-muted);
  border: 1px solid var(--sidebar-line); border-radius: var(--radius); background: var(--sidebar-box);
}
.nav-group-itens{ display: flex; flex-direction: column; gap: 3px; }
.nav-item{
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--radius);
  color: var(--sidebar-text); text-decoration: none; font-size: 13px; font-weight: 500;
  border: 0; background: transparent; width: 100%; text-align: left;
}
.nav-item svg{ width: 17px; height: 17px; flex-shrink: 0; }
.nav-item:hover{ background: var(--sidebar-hover); }
.nav-item.active{ background: var(--sidebar-active); color: var(--sidebar-active-text); font-weight: 600; }
.nav-item b{ margin-left: auto; font-size: 10px; font-weight: 500; opacity: .7; }
.sidebar-footer{ margin-top: auto; padding-top: 12px; border-top: 1px solid var(--sidebar-line); }
.sidebar-user{ font-size: 11px; color: var(--sidebar-muted); padding: 8px 12px 4px; }
.sidebar-user strong{ color: var(--sidebar-text); display: block; font-size: 12px; }

.workspace{ flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar{
  min-height: 70px; background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 34px; flex-wrap: wrap;
}
.breadcrumb{ font-size: 12px; color: var(--muted); }
.breadcrumb span{ margin: 0 10px; color: var(--faint); }
.breadcrumb strong{ font-weight: 600; color: var(--text-2); }
.top-controls{ display: flex; gap: 12px; align-items: center; }
.top-controls form{ margin: 0; }
/* 23/10/2026: selo do usuário logado no topo, à direita */
.top-controls{ margin-left: auto; }
.user-chip{ order: 3; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text-2); }
.user-chip svg{ width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: var(--line); flex: none; }
.user-chip span{ display: flex; flex-direction: column; line-height: 1.15; }
.user-chip strong{ font-size: 12px; color: var(--text); white-space: nowrap; }
.user-chip small{ font-size: 10px; color: var(--faint); }
.top-controls select{ border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: 12px; color: var(--text-2); padding: 7px 9px; max-width: 300px; }
main{ padding: 30px 34px; flex: 1; width: 100%; max-width: 1700px; }
footer.rodape{ font-size: 10px; color: var(--faint); display: flex; gap: 10px; padding: 0 34px 20px; flex-wrap: wrap; }

.sidebar-toggle{
  display: none; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 20px;
}
.sidebar-backdrop{ display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .2s; }

/* ---------------------------- Tipografia / cabeçalho ---------------------------- */
.page-heading{ display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.eyebrow{ font-size: 10px; text-transform: uppercase; letter-spacing: 1.7px; font-weight: 600; color: var(--muted); margin: 0 0 6px; }
h1{ font-size: 28px; letter-spacing: -.8px; line-height: 1.2; font-weight: 600; margin: 0 0 6px; }
h2{ font-size: 16px; letter-spacing: -.2px; margin: 0 0 6px; font-weight: 600; }
h3{ font-size: 14px; margin: 0 0 8px; }
p{ margin: 0 0 12px; }
.subtitle{ color: var(--muted); font-size: 12.5px; margin: 0; }
.actions{ display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.actions form{ margin: 0; }

/* ---------------------------- Botões / selos ---------------------------- */
.btn{
  border: 1px solid var(--input-line); background: var(--surface); border-radius: 6px; color: var(--text-2);
  font-size: 12px; font-weight: 500; min-height: 36px; padding: 8px 14px; display: inline-flex;
  align-items: center; justify-content: center; gap: 7px; text-decoration: none;
}
.btn:hover{ background: var(--surface-3); }
.btn.primary{ background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover{ background: var(--accent-2); }
.btn.danger{ background: transparent; color: var(--danger); }
.btn.danger:hover{ background: var(--danger-soft); }
.btn.sm{ min-height: 29px; padding: 4px 10px; font-size: 11px; }
.button-link{ border: 0; background: none; color: var(--accent); font-size: 12px; padding: 0; text-decoration: none; font-weight: 500; }
.badge{ display: inline-block; padding: 3px 8px; border-radius: 4px; white-space: nowrap; font-size: 10.5px; line-height: 1.6; font-weight: 500; }
.badge.neutral{ background: var(--surface-3); color: var(--muted); }
.badge.green{ background: var(--accent-soft); color: var(--accent-text); }
.badge.amber{ background: var(--warn-bg); color: var(--warn-text); }
.badge.red{ background: var(--danger-soft); color: var(--danger); }

/* ---------------------------- Cartões / painéis ---------------------------- */
.stats{ display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 22px; }
.stat{ border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 18px 20px; box-shadow: var(--shadow); }
.stat .label{ font-size: 11px; color: var(--muted); display: flex; justify-content: space-between; }
.stat .symbol{ font-size: 15px; color: var(--faint); }
.stat strong{ display: block; font-size: 25px; line-height: 1.3; font-weight: 600; letter-spacing: -.5px; margin: 9px 0 5px; }
.stat small{ font-size: 10.5px; color: var(--faint); }
.stat:first-child{ border-top: 3px solid var(--accent); padding-top: 16px; }
.stats.cinco{ grid-template-columns: repeat(5, minmax(0,1fr)); }
a.stat:hover{ border-color: var(--accent); }

.panel{ background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); margin-bottom: 22px; overflow: hidden; box-shadow: var(--shadow); }
.panel-head{ display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); gap: 12px; flex-wrap: wrap; }
.panel-head h2{ margin: 0; font-size: 15px; }
.panel-body{ padding: 22px; }
.count{ font-weight: 500; font-size: 10.5px; background: var(--surface-3); border-radius: 4px; padding: 2px 6px; margin-left: 6px; color: var(--muted); }

.filters{ display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; padding: 16px 22px; border-bottom: 1px solid var(--line); background: var(--surface-2); margin: 0; }
.field{ display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 130px; margin-bottom: 12px; }
.filters .field{ margin-bottom: 0; }
.field.grow{ flex: 2; min-width: 220px; }
.field label, label.lbl{ font-size: 11.5px; color: var(--muted); font-weight: 600; }
input[type=text], input[type=password], input[type=date], input[type=number], input[type=email], input[type=file], select, textarea{
  border: 1px solid var(--input-line); background: var(--input-bg); border-radius: 5px; padding: 8px 10px;
  color: var(--text); font-size: 12.5px; min-height: 36px; width: 100%;
}
textarea{ resize: vertical; min-height: 90px; }
input:focus, select:focus, textarea:focus{ outline: 2px solid var(--accent); outline-offset: 0; }
.form-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full{ grid-column: 1 / -1; }
.check{ display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--text-2); margin: 10px 0; }
.check input{ margin-top: 3px; accent-color: var(--accent); }
.hint, .muted{ color: var(--muted); font-size: 11.5px; }

.table-wrap{ overflow-x: auto; }
table{ border-collapse: collapse; width: 100%; font-size: 12.5px; }
thead{ color: var(--muted); background: var(--surface-2); font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; text-align: left; }
th, td{ padding: 13px 18px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th{ font-weight: 600; white-space: nowrap; }
td{ color: var(--text-2); }
tbody tr:hover{ background: var(--surface-2); }
td strong{ font-weight: 600; color: var(--text); }
td small{ display: block; font-size: 10.5px; color: var(--faint); margin-top: 2px; }
.right{ text-align: right; }
.nowrap{ white-space: nowrap; }
.key{ font-family: var(--mono); font-size: 11px; word-break: break-all; }

.empty{ text-align: center; padding: 46px 25px 50px; color: var(--muted); }
.empty-icon{ display: inline-flex; width: 52px; height: 56px; align-items: center; justify-content: center; font-size: 30px; color: var(--accent-text); background: var(--surface-3); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; }
.empty h3{ color: var(--text-2); font-weight: 600; margin-bottom: 6px; }
.empty p{ font-size: 12.5px; max-width: 500px; margin: 0 auto 16px; }
.table-footer{ padding: 12px 22px; color: var(--faint); font-size: 11px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.notice{ background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-text); padding: 12px 16px; border-radius: 6px; font-size: 12.5px; margin-bottom: 18px; }
.notice.blue{ background: var(--info-bg); border-color: var(--info-line); color: var(--info-text); }
.notice.red{ background: var(--danger-soft); border-color: var(--danger-soft); color: var(--danger); }
.flash{ padding: 11px 16px; border-radius: 6px; font-size: 12.5px; margin-bottom: 16px; border: 1px solid; }
.flash-success{ background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent-soft); }
.flash-error{ background: var(--danger-soft); color: var(--danger); border-color: var(--danger-soft); }
.info-line{ display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--surface-3); border-radius: 6px; font-size: 11.5px; color: var(--muted); line-height: 1.6; flex-wrap: wrap; }
.info-line .dot{ width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

.settings-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.company-card{ padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.company-card strong{ display: block; font-size: 13px; }
.company-card small{ font-size: 11px; color: var(--muted); }
.metadata{ display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin: 0; }
.metadata dt{ font-size: 10.5px; color: var(--muted); }
.metadata dd{ margin: 4px 0 0; font-size: 12.5px; color: var(--text); word-break: break-word; }

/* Aparência: escolha de estilo */
.theme-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.theme-option{ border: 2px solid var(--line); border-radius: 9px; padding: 10px; cursor: pointer; background: var(--surface); font-size: 12px; font-weight: 600; color: var(--text-2); }
.theme-option.selected{ border-color: var(--accent); }
.theme-swatch{ display: flex; gap: 4px; margin-bottom: 8px; }
.theme-swatch span{ flex: 1; height: 22px; border-radius: 4px; }
.marca-preview{ background: var(--sidebar-bg); border-radius: 10px; padding: 16px 10px 2px; width: 244px; }

/* Quem Somos */
.quem-somos-hero{ display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.quem-somos-hero .brand-mark{ width: 56px; height: 62px; font-size: 46px; border-radius: 14px; letter-spacing: -6px; padding-right: 6px; }
.quem-somos-hero img{ height: 62px; }
.quem-somos-hero h1{ margin: 0; font-size: 34px; }
.quem-somos-hero h1 .light{ font-weight: 350; }
.texto-livre{ white-space: pre-wrap; font-size: 13.5px; line-height: 1.8; color: var(--text-2); }

/* ---------------------------- Responsivo / menu mobile ---------------------------- */
@media (max-width: 1100px){
  .stats, .stats.cinco{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .settings-grid{ grid-template-columns: 1fr; }
  .metadata{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px){
  .sidebar-toggle{ display: inline-flex; }
  .sidebar-backdrop{ display: block; }
  .sidebar{ position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .25s; box-shadow: 4px 0 24px rgba(0,0,0,.25); }
  .app-shell.sidebar-aberto .sidebar{ transform: translateX(0); }
  .app-shell.sidebar-aberto .sidebar-backdrop{ opacity: 1; pointer-events: auto; }
  .topbar{ padding: 12px 16px; }
  .breadcrumb{ display: none; }
  main{ padding: 20px 16px; }
  footer.rodape{ padding: 0 16px 18px; }
  .form-grid{ grid-template-columns: 1fr; }
  th, td{ padding: 10px 12px; }
  h1{ font-size: 24px; }
}
@media (max-width: 560px){
  .stats, .stats.cinco{ grid-template-columns: 1fr; }
  .metadata{ grid-template-columns: 1fr; }
  .top-controls{ width: 100%; justify-content: flex-end; order: 4; }
  .user-chip{ order: 2; margin-left: auto; }
}

/* ---------------------------- Temas Vidro (padrão bi-stack) ---------------------------- */
[data-estilo^="vidro-"]{
  --text: #1B232C; --text-2: #2c3742; --muted: #5f6b78; --faint: #8b95a0;
  --line: rgba(0,0,0,0.09); --line-2: rgba(0,0,0,0.06);
  --surface: rgba(255,255,255,0.5); --surface-2: rgba(255,255,255,0.35); --surface-3: rgba(255,255,255,0.55);
  --input-bg: rgba(255,255,255,0.6); --input-line: rgba(0,0,0,0.1);
  --sidebar-bg: rgba(255,255,255,0.5); --sidebar-text: #2c3742; --sidebar-muted: #6B7684;
  --sidebar-line: rgba(0,0,0,0.08); --sidebar-hover: rgba(255,255,255,0.65); --sidebar-box: rgba(0,0,0,0.045);
  --sidebar-active-text: #fff;
  --shadow: 0 8px 30px rgba(20,40,30,0.10);
}
[data-estilo^="vidro-"] .app-shell{ gap: 20px; padding: 20px; align-items: flex-start; }
[data-estilo^="vidro-"] .sidebar, [data-estilo^="vidro-"] .panel, [data-estilo^="vidro-"] .stat, [data-estilo^="vidro-"] .topbar{
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.6); box-shadow: 0 8px 30px rgba(20,40,30,0.12);
}
[data-estilo^="vidro-"] .sidebar{ border-radius: 20px; height: calc(100vh - 40px); top: 20px; }
[data-estilo^="vidro-"] .topbar{ border-radius: 18px; margin-bottom: 4px; }
[data-estilo^="vidro-"] .panel{ border-radius: 18px; }
[data-estilo^="vidro-"] .stat{ border-radius: 16px; }
[data-estilo^="vidro-"] .btn, [data-estilo^="vidro-"] input, [data-estilo^="vidro-"] select, [data-estilo^="vidro-"] textarea{ border-radius: 10px; }
[data-estilo^="vidro-"] .badge{ border-radius: 20px; }
[data-estilo^="vidro-"] main{ padding: 20px 4px; }
[data-estilo^="vidro-"] footer.rodape{ padding: 0 4px 10px; }
[data-estilo^="vidro-"] .brand-empresa .brand-empresa-nome{ color: var(--text); }
[data-estilo^="vidro-"] .marca-preview{ background: rgba(255,255,255,0.6); }
[data-estilo="vidro-escuro"] .marca-preview{ background: rgba(255,255,255,0.06); }   /* 21/10/2026: logo branca sumia na caixa clara */

[data-estilo="vidro-verde"]{ --accent: #1f7a4d; --accent-2: #175c3a; --accent-soft: #d7ecdf; --accent-text: #175c3a; --highlight: #1f7a4d; --sidebar-active: #1f7a4d; }
[data-estilo="vidro-verde"] body{ background: linear-gradient(135deg, #eef6ef 0%, #dbe8dd 45%, #b6c8b9 100%); background-attachment: fixed; }
[data-estilo="vidro-cinza"]{ --accent: #455a64; --accent-2: #34474f; --accent-soft: #dde3e6; --accent-text: #34474f; --highlight: #455a64; --sidebar-active: #455a64; }
[data-estilo="vidro-cinza"] body{ background: linear-gradient(135deg, #f4f5f6 0%, #e2e5e7 45%, #c2c9cc 100%); background-attachment: fixed; }
[data-estilo="vidro-azul"]{ --accent: #1f6fb2; --accent-2: #175a8f; --accent-soft: #d7e8f6; --accent-text: #175a8f; --highlight: #1f6fb2; --sidebar-active: #1f6fb2; }
[data-estilo="vidro-azul"] body{ background: linear-gradient(135deg, #eaf3fb 0%, #d3e6f5 45%, #a9c9e3 100%); background-attachment: fixed; }
[data-estilo="vidro-roxo"]{ --accent: #6c3fa0; --accent-2: #54317d; --accent-soft: #ebe0f6; --accent-text: #54317d; --highlight: #6c3fa0; --sidebar-active: #6c3fa0; }
[data-estilo="vidro-roxo"] body{ background: linear-gradient(135deg, #f3eefc 0%, #e3d6f6 45%, #c7b0e8 100%); background-attachment: fixed; }
[data-estilo^="vidro-"] .brand-mark{ color: #fff; }
[data-estilo^="vidro-"] .brand-mark span{ color: rgba(255,255,255,.75); }

[data-estilo="vidro-escuro"]{
  --accent: #3da5f5; --accent-2: #2b86d1; --accent-soft: #1c3547; --accent-text: #8cc8f7; --highlight: #3da5f5;
  --text: #e7ece9; --text-2: #cfd8d3; --muted: #a7b3ac; --faint: #7f8b85;
  --line: rgba(255,255,255,0.12); --line-2: rgba(255,255,255,0.07);
  --surface: rgba(255,255,255,0.06); --surface-2: rgba(255,255,255,0.04); --surface-3: rgba(255,255,255,0.08);
  --input-bg: rgba(255,255,255,0.08); --input-line: rgba(255,255,255,0.14);
  --sidebar-bg: rgba(255,255,255,0.06); --sidebar-text: #dfe6e2; --sidebar-muted: #a7b3ac; --sidebar-line: rgba(255,255,255,0.10);
  --sidebar-hover: rgba(255,255,255,0.09); --sidebar-box: rgba(255,255,255,0.04); --sidebar-active: #3da5f5;
  --danger: #e0685b; --danger-soft: rgba(224,104,91,0.15);
  --warn-bg: rgba(237,161,0,0.12); --warn-line: rgba(237,161,0,0.25); --warn-text: #f0c66b;
  --info-bg: rgba(61,165,245,0.10); --info-line: rgba(61,165,245,0.22); --info-text: #9fd0f7;
}
[data-estilo="vidro-escuro"] body{ background: linear-gradient(135deg, #1c222b 0%, #12161d 50%, #0a0d12 100%); background-attachment: fixed; }
[data-estilo="vidro-escuro"] .sidebar, [data-estilo="vidro-escuro"] .panel, [data-estilo="vidro-escuro"] .stat, [data-estilo="vidro-escuro"] .topbar{ border-color: rgba(255,255,255,0.12); }
[data-estilo="vidro-escuro"] select option{ background: #1b222b; }

@media (max-width: 900px){
  [data-estilo^="vidro-"] .app-shell{ padding: 10px; gap: 0; display: block; }
  [data-estilo^="vidro-"] .sidebar{ top: 0; height: 100vh; border-radius: 0 20px 20px 0; background: rgba(255,255,255,0.85); }
  [data-estilo="vidro-escuro"] .sidebar{ background: rgba(20,25,32,0.95); }
}

@media print{
  .sidebar, .topbar, .sidebar-toggle, .no-print, footer.rodape{ display: none !important; }
  body{ background: #fff; }
  main{ padding: 0; }
}

/* Conferência ERP (16/10/2026): marcação contornada -- verde = lançada no Agrosys, amarelo = pendente (pedido do usuário). */
.erp-tag{ display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px; border: 2px solid; line-height: 1.4; }
.erp-ok{ color: #1e6b3a; background: rgba(46,160,90,0.10); border-color: #2ea05a; }
.erp-pendente{ color: #8a5a00; background: rgba(245,190,40,0.14); border-color: #e0a800; }
[data-estilo="vidro-escuro"] .erp-ok{ color: #8ee0ad; background: rgba(46,160,90,0.18); }
[data-estilo="vidro-escuro"] .erp-pendente{ color: #ffd36b; background: rgba(245,190,40,0.18); }

/* 19/10/2026: dropdown (lista de opções do <select>) ficava com fundo
   branco no Vidro Escuro -- a lista é desenhada pelo navegador e ignora o
   fundo translúcido da caixa, sobrando texto claro em fundo branco.
   color-scheme faz o navegador desenhar lista/calendário/rolagem em escuro;
   a regra das options é garantia p/ navegador que ignora color-scheme. */
html[data-estilo="vidro-escuro"] { color-scheme: dark; }
html[data-estilo="vidro-escuro"] select option,
html[data-estilo="vidro-escuro"] select optgroup { background: #1b222b; color: #e7ece9; }

/* Como funciona (20/10/2026) */
.regras{ margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.75; color: var(--text-2); }
.regras li{ margin-bottom: 6px; }
.regras li::marker{ color: var(--accent-text); }
.regras code, .fluxo code{ overflow-wrap: anywhere; font-size: 12px; background: var(--surface-3); padding: 1px 5px; border-radius: 4px; }
.fluxo{ display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; counter-reset: passo; }
.fluxo div{ border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; font-size: 12.5px; line-height: 1.55; color: var(--text-2); background: var(--surface-2, var(--surface)); }
.fluxo div::before{ counter-increment: passo; content: counter(passo); display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-size: 11px; font-weight: 700; margin-bottom: 6px; }
.fluxo strong{ display: block; color: var(--text); margin-bottom: 2px; }

/* Ciência manual (20/10/2026) */
.ciencia-barra{ display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 22px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.prazo-curto{ color: var(--danger) !important; font-weight: 600; }
.recusa-form textarea{ min-height: 70px; }
.field[hidden]{ display: none; }
