/* ========================================================================== */
/* NexoCaixa — SYSTEM-V1.0 — camada visual da aplicação autenticada          */
/* Escopo: SOMENTE apresentação. Não altera fluxo, regras, dados ou permissões. */
/* ========================================================================== */

html { color-scheme: light; background: var(--surface-page); }
body,
.app-body,
.auth-body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

*, *::before, *::after { box-sizing: border-box; }
img, svg { max-width: 100%; }
a { color: var(--brand-primary); text-underline-offset: 2px; }
a:hover { color: var(--brand-primary-hover); }

h1, h2, h3, h4, h5, h6,
.page-title, .section-title, .card-title,
.topbar-title strong {
  color: var(--text-primary);
  font-family: var(--font-display);
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(1.65rem, 2.5vw, 2rem); line-height: 1.18; }
h2 { font-size: 1.45rem; line-height: 1.25; }
h3 { font-size: 1.15rem; line-height: 1.3; }
small, .muted, .help-text, .form-help, .field-help { color: var(--text-secondary); }

/* Ambiente de teste: aviso operacional deve permanecer inequívoco. */
.environment-banner {
  min-height: 30px;
  padding: 6px 16px;
  border: 0;
  border-bottom: 1px solid var(--environment-border);
  background: var(--environment-bg);
  color: var(--environment-text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: .015em;
  text-align: center;
}
.environment-banner strong { font-weight: 800; }

/* Estrutura principal */
.app-shell {
  min-height: calc(100vh - 30px);
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  background: var(--surface-page);
}
.sidebar {
  width: 244px;
  min-width: 244px;
  background: var(--surface-sidebar);
  color: var(--text-on-dark);
  padding: 22px 14px 16px;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 30px);
  border-right: 1px solid rgba(255,255,255,.04);
}
.brand-block { padding: 2px 10px 14px; }
.brand {
  color: var(--text-on-dark);
  text-decoration: none;
  display: block;
}
.brand:hover { color: var(--text-on-dark); }
.brand-logo-horizontal {
  display: block;
  width: 174px;
  max-width: 100%;
  height: auto;
}
.brand-subtitle {
  display: block;
  margin-top: 7px;
  color: var(--text-on-dark-muted);
  font-size: 10.5px;
  line-height: 1.35;
  letter-spacing: .01em;
}
.nav-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 3px;
}
.nav-item {
  min-height: 40px;
  padding: 8px 11px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #D8E2E8;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  transition: background-color .14s ease, color .14s ease;
}
.nav-item:hover {
  color: var(--text-on-dark);
  background: rgba(255,255,255,.065);
}
.nav-item:focus-visible { color: var(--text-on-dark); }
.nav-item.active,
.nav-item[aria-current="page"] {
  color: var(--text-on-dark);
  background: var(--surface-active);
  font-weight: 600;
}
.nav-icon,
.nc-nav-icon {
  width: 20px;
  height: 20px;
  min-width: 20px;
  object-fit: contain;
}
img.nav-icon,
img.nc-nav-icon {
  filter: brightness(0) invert(1);
  opacity: .72;
}
.nav-item:hover img.nav-icon,
.nav-item:hover img.nc-nav-icon,
.nav-item.active img.nav-icon,
.nav-item.active img.nc-nav-icon,
.nav-item[aria-current="page"] img.nav-icon,
.nav-item[aria-current="page"] img.nc-nav-icon { opacity: 1; }
.test-nav-item { border-left: 2px solid transparent; }
.test-nav-item:hover { border-left-color: var(--environment-border); }
.sidebar-footer {
  margin-top: auto;
  padding: 15px 10px 0;
  border-top: 1px solid rgba(255,255,255,.09);
  color: var(--text-on-dark-muted);
  font-size: 10.5px;
  line-height: 1.5;
  display: grid;
  gap: 2px;
}
.sidebar-footer strong { color: var(--text-on-dark); }
.sidebar-test-label {
  display: inline-flex;
  width: max-content;
  margin-top: 5px;
  padding: 4px 8px;
  border: 1px solid rgba(215,178,74,.55);
  border-radius: var(--radius-pill);
  background: rgba(255,244,206,.10);
  color: #F8E9AD;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .04em;
}
.main-column { min-width: 0; background: var(--surface-page); }
.topbar {
  min-height: 68px;
  padding: 10px 28px;
  background: var(--surface-topbar);
  border-bottom: 1px solid var(--surface-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: relative;
  z-index: 10;
}
.topbar-title { display: flex; align-items: center; gap: 11px; min-width: 0; }
.topbar-title > div { min-width: 0; }
.topbar-title strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-title small {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  font-size: 12px;
}
.user-copy { min-width: 0; }
.user-copy strong { display: block; color: var(--text-primary); font-weight: 650; white-space: nowrap; }
.user-copy small { display: block; font-size: 10.5px; }
.status-dot {
  width: 8px;
  height: 8px;
  min-width: 8px;
  border-radius: 50%;
  background: var(--status-success);
  box-shadow: 0 0 0 3px var(--status-success-bg);
}
.content-area {
  width: 100%;
  max-width: 1440px;
  padding: 24px 28px 42px;
  color: var(--text-primary);
}

/* Botões e links de ação */
.button,
.btn,
button:not(.text-button):not(.icon-button),
input[type="submit"],
input[type="button"],
a.button {
  min-height: 40px;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  padding: 8px 14px;
  background: var(--surface-card);
  color: var(--text-primary);
  font: 600 13px/1.2 var(--font-ui);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease, transform .05s ease;
}
.button:hover,
.btn:hover,
button:not(.text-button):not(.icon-button):hover,
input[type="submit"]:hover,
input[type="button"]:hover,
a.button:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.button:active,
.btn:active,
button:not(.text-button):not(.icon-button):active { transform: translateY(1px); }
.button.primary,
.btn.primary,
button.primary,
input[type="submit"].primary,
a.button.primary {
  border-color: var(--brand-primary);
  background: var(--brand-primary);
  color: var(--text-on-dark);
}
.button.primary:hover,
.btn.primary:hover,
button.primary:hover,
a.button.primary:hover { background: var(--brand-primary-hover); border-color: var(--brand-primary-hover); color: var(--text-on-dark); }
.button.danger,
.button.destructive,
.btn.danger,
button.danger,
button.destructive {
  border-color: var(--status-danger);
  background: var(--status-danger);
  color: #fff;
}
.button.secondary,
.btn.secondary { background: #fff; color: var(--brand-primary); border-color: var(--border-strong); }
.button[disabled], .btn[disabled], button[disabled], input[disabled] { opacity: .58; cursor: not-allowed; transform: none; }
.text-link,
.text-button {
  color: var(--brand-accent);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.text-button {
  border: 0;
  background: transparent;
  padding: 5px 3px;
  cursor: pointer;
  font-family: var(--font-ui);
}
.text-link:hover, .text-button:hover { color: var(--brand-primary); }
.icon-button {
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  border: 1px solid var(--border-default);
  border-radius: 9px;
  background: #fff;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.menu-toggle img, .menu-icon { width: 20px; height: 20px; display: block; }

/* Superfícies, cards e grids comuns */
.card,
.panel,
.form-card,
.table-card,
.metric-card,
.summary-card,
.dashboard-card,
.content-card,
.section-card,
.module-card {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.card, .panel, .form-card, .content-card, .section-card, .module-card { padding: 20px; }
.metric-card, .summary-card, .dashboard-card { padding: 17px 18px; }
.metric-value,
.stat-value,
.amount,
.money,
.currency,
td[data-type="money"] {
  font-variant-numeric: tabular-nums lining-nums;
}
.metric-value,
.stat-value { color: var(--text-primary); font-family: var(--font-display); font-weight: 700; }

/* Dashboard/hero — sem exigir mudança estrutural do template. */
.hero,
.dashboard-hero,
.page-hero,
.hero-card {
  background: var(--brand-primary);
  color: var(--text-on-dark);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: none;
}
.hero h1, .hero h2, .dashboard-hero h1, .dashboard-hero h2, .page-hero h1, .hero-card h1 { color: var(--text-on-dark); }
.hero p, .dashboard-hero p, .page-hero p, .hero-card p { color: var(--text-on-dark-muted); }
.hero-symbol { width: 74px; height: 74px; object-fit: contain; }

/* Formulários */
label, .form-label { color: var(--text-primary); font-size: 12px; font-weight: 650; }
input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="date"], input[type="datetime-local"], input[type="search"], input[type="tel"], input[type="url"], select, textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface-card);
  color: var(--text-primary);
  padding: 8px 10px;
  font: 400 13px/1.4 var(--font-ui);
  transition: border-color .14s ease, box-shadow .14s ease, background-color .14s ease;
}
textarea { min-height: 96px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #7B8D9A; }
input:focus, select:focus, textarea:focus {
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 3px rgba(74,127,165,.14);
  outline: none;
}
input[readonly], textarea[readonly], input:disabled, select:disabled, textarea:disabled { background: var(--surface-subtle); color: var(--text-secondary); }
.errorlist, .field-error, .form-error { color: var(--status-danger); font-size: 12px; }

/* Tabelas */
.table-responsive, .table-wrapper { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface-card);
  color: var(--text-primary);
  font-size: 13px;
}
thead th {
  padding: 11px 13px;
  border-bottom: 1px solid var(--border-default);
  background: var(--surface-page);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .035em;
  text-align: left;
}
tbody td { padding: 12px 13px; border-bottom: 1px solid var(--surface-subtle); vertical-align: middle; }
tbody tr:hover { background: rgba(247,249,250,.72); }
tbody tr:last-child td { border-bottom-color: transparent; }
td.money, th.money, td[data-type="money"], th[data-type="money"] { text-align: right; }

/* Alertas / badges semânticos */
.alert,
.message,
.badge,
.status-badge {
  border-radius: 10px;
}
.alert, .message { padding: 11px 13px; border: 1px solid var(--border-default); background: var(--status-neutral-bg); color: var(--status-neutral); }
.alert.success, .message.success, .badge.success, .status-success { background: var(--status-success-bg); color: var(--status-success); border-color: rgba(47,107,85,.28); }
.alert.warning, .message.warning, .badge.warning, .status-warning { background: var(--status-warning-bg); color: var(--status-warning); border-color: rgba(122,91,19,.26); }
.alert.error, .alert.danger, .message.error, .badge.danger, .status-danger { background: var(--status-danger-bg); color: var(--status-danger); border-color: rgba(154,61,61,.25); }
.alert.info, .message.info, .badge.info, .status-info { background: var(--status-info-bg); color: var(--status-info); border-color: rgba(49,95,120,.22); }
.badge, .status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 650;
  border: 1px solid transparent;
}

/* Autenticação / MFA */
.auth-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 12%, rgba(147,171,186,.16), transparent 36%),
    var(--surface-page);
}
.auth-shell {
  min-height: calc(100vh - 30px);
  padding: 42px 18px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.auth-card {
  width: min(100%, 440px);
  padding: 30px 32px 28px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  box-shadow: var(--shadow-md);
}
.auth-brand { display: flex; justify-content: center; text-decoration: none; }
.auth-brand img { display: block; width: min(210px, 72%); height: auto; }
.auth-product-subtitle { margin: 9px 0 24px; color: var(--text-secondary); text-align: center; font-size: 12px; }
.auth-card h1, .auth-card h2 { margin-top: 0; }
.auth-card form p { margin: 0 0 14px; }
.auth-card .button, .auth-card button, .auth-card input[type="submit"] { min-width: 112px; }
.auth-links { margin: 18px 0 0; text-align: center; font-size: 12px; }
.auth-footer { margin: 15px 0 0; color: var(--text-secondary); text-align: center; font-size: 10.5px; }
.auth-help-text { color: var(--text-secondary); font-size: 12px; line-height: 1.55; }

/* Acessibilidade / motion */
:where(a,button,input,select,textarea,[tabindex]):focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Responsividade. Mantém a lógica existente de body.sidebar-open. */
@media (max-width: 1080px) {
  .content-area { padding: 22px 22px 36px; }
  .topbar { padding-inline: 22px; }
}
@media (max-width: 860px) {
  .app-shell { display: block; }
  .sidebar {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 30px;
    bottom: 0;
    transform: translateX(-102%);
    transition: transform .18s ease;
    box-shadow: 12px 0 30px rgba(17,34,51,.16);
    overflow-y: auto;
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .main-column { width: 100%; }
  .menu-toggle { display: inline-flex !important; }
  .topbar { min-height: 64px; padding-inline: 16px; }
  .content-area { padding: 18px 16px 32px; }
  .user-copy { display: none; }
  .nav-item { min-height: 42px; }
}
@media (max-width: 620px) {
  .environment-banner { min-height: 34px; padding-inline: 10px; font-size: 10px; }
  .sidebar { top: 34px; width: min(86vw, 280px); min-width: 0; }
  .topbar { gap: 8px; }
  .topbar-title { flex: 1; }
  .topbar-title small { max-width: 60vw; }
  .user-menu { gap: 6px; }
  .content-area { padding: 16px 12px 28px; }
  .auth-shell { padding: 28px 12px 18px; }
  .auth-card { padding: 26px 20px 24px; border-radius: 14px; }
  .card, .panel, .form-card, .content-card, .section-card, .module-card { padding: 16px; }
  table { min-width: 660px; }
}

/* ========================================================================== */
/* CORREÇÃO VISUAL ÚNICA — SYSTEM-V1.0.5                                     */
/* Ajustes consolidados após homologação visual.                              */
/* Escopo: somente apresentação.                                              */
/* ========================================================================== */

/* 1) Sidebar: aplicar o tema escuro de forma mandatória e restaurar contraste. */
html body .app-shell .sidebar,
html body .sidebar {
  background: var(--surface-sidebar) !important;
  color: var(--text-on-dark) !important;
  border-right: 1px solid rgba(255,255,255,.04) !important;
}
html body .sidebar .brand,
html body .sidebar .brand:hover,
html body .sidebar .sidebar-footer strong,
html body .sidebar .nav-item,
html body .sidebar .nav-item span,
html body .sidebar .brand-subtitle,
html body .sidebar .sidebar-footer,
html body .sidebar .sidebar-footer * {
  color: inherit;
}
html body .sidebar .brand,
html body .sidebar .sidebar-footer strong,
html body .sidebar .nav-item.active,
html body .sidebar .nav-item[aria-current="page"] { color: var(--text-on-dark) !important; }
html body .sidebar .brand-subtitle,
html body .sidebar .sidebar-footer,
html body .sidebar .sidebar-footer *:not(strong),
html body .sidebar .nav-item { color: #D8E2E8 !important; }
html body .sidebar .nav-item:hover,
html body .sidebar .nav-item:focus-visible {
  background: rgba(255,255,255,.065) !important;
  color: var(--text-on-dark) !important;
}
html body .sidebar .nav-item.active,
html body .sidebar .nav-item[aria-current="page"] {
  background: var(--surface-active) !important;
  color: var(--text-on-dark) !important;
  font-weight: 600 !important;
}
html body .sidebar .sidebar-test-label {
  background: rgba(255,244,206,.10) !important;
  color: #F8E9AD !important;
  border-color: rgba(215,178,74,.55) !important;
}

/* 2) Ícones de navegação: garantir visibilidade e evitar placeholders sem contraste. */
html body .sidebar .nav-icon,
html body .sidebar .nc-nav-icon {
  display: inline-block !important;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  object-fit: contain !important;
}
html body .sidebar img.nav-icon,
html body .sidebar img.nc-nav-icon {
  filter: brightness(0) invert(1) !important;
  opacity: .86 !important;
}
html body .sidebar .nav-item:hover img.nav-icon,
html body .sidebar .nav-item:hover img.nc-nav-icon,
html body .sidebar .nav-item.active img.nav-icon,
html body .sidebar .nav-item.active img.nc-nav-icon,
html body .sidebar .nav-item[aria-current="page"] img.nav-icon,
html body .sidebar .nav-item[aria-current="page"] img.nc-nav-icon {
  opacity: 1 !important;
}

/* 3) Autenticação/MFA: remover botões vazios e padronizar linha de ações. */
.auth-card form { display: grid; gap: 14px; }
.auth-card form p { margin: 0; }
.auth-card form button:empty,
.auth-card form .button:empty,
.auth-card form .btn:empty,
.auth-card form input[type="submit"][value=""],
.auth-card form input[type="button"][value=""] {
  display: none !important;
}
.auth-card .actions,
.auth-card .form-actions,
.auth-card .submit-row,
.auth-card .button-row,
.auth-card .otp-actions,
.auth-card .login-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  align-items: center !important;
  justify-content: flex-end !important;
}
.auth-card .actions .button,
.auth-card .actions .btn,
.auth-card .form-actions .button,
.auth-card .form-actions .btn,
.auth-card .submit-row .button,
.auth-card .submit-row .btn,
.auth-card .button-row .button,
.auth-card .button-row .btn,
.auth-card .otp-actions .button,
.auth-card .otp-actions .btn,
.auth-card .login-actions .button,
.auth-card .login-actions .btn,
.auth-card input[type="submit"],
.auth-card input[type="button"] {
  min-width: 112px !important;
}
.auth-card .auth-links,
.auth-card a[href*="password_reset"],
.auth-card a[href*="senha"] {
  text-align: center;
}

/* 4) Botões neutros e estados desabilitados: contraste e leitura. */
.button.secondary,
.btn.secondary,
.button:not(.primary):not(.danger):not(.destructive)[disabled],
.btn:not(.primary):not(.danger):not(.destructive)[disabled],
button:not(.primary):not(.danger):not(.destructive)[disabled],
input[type="submit"][disabled],
input[type="button"][disabled] {
  color: var(--text-secondary) !important;
}
.button[disabled], .btn[disabled], button[disabled], input[disabled] {
  background: var(--surface-subtle) !important;
  border-color: var(--border-default) !important;
  opacity: 1 !important;
}

/* 5) Topbar em telas menores: reduzir colisões entre menu, usuário e ações. */
@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; align-items: center; }
  .user-menu { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
}
@media (max-width: 620px) {
  .topbar {
    min-height: auto;
    align-items: center;
  }
  .topbar-title { min-width: calc(100% - 44px); }
  .user-menu {
    width: 100%;
    justify-content: flex-start;
    padding-top: 4px;
  }
}

/* ========================================================================== */
/* CORREÇÃO DEFINITIVA CONSOLIDADA — SYSTEM-V1.0.6                            */
/* Rodada final de ajustes após homologação expandida.                        */
/* Escopo: exclusivamente visual.                                             */
/* ========================================================================== */

/* Sidebar — força estrutura escura, melhora contraste e substitui marcadores
   genéricos por ícones consistentes via pseudo-elementos. */
html body .sidebar {
  background: var(--surface-sidebar) !important;
  color: #D8E2E8 !important;
}
html body .sidebar .brand,
html body .sidebar .brand:hover,
html body .sidebar .sidebar-footer strong { color: #FFFFFF !important; }
html body .sidebar .brand-subtitle,
html body .sidebar .sidebar-footer,
html body .sidebar .sidebar-footer *:not(strong) { color: #B3C3CD !important; }
html body .sidebar .nav-list { gap: 4px !important; }
html body .sidebar .nav-item {
  position: relative;
  min-height: 42px !important;
  padding: 9px 12px !important;
  gap: 10px !important;
  background: transparent !important;
  color: #C9D6DE !important;
  border-radius: 10px !important;
}
html body .sidebar .nav-item:hover,
html body .sidebar .nav-item:focus-visible {
  background: rgba(255,255,255,.07) !important;
  color: #FFFFFF !important;
}
html body .sidebar .nav-item.active,
html body .sidebar .nav-item[aria-current="page"] {
  background: rgba(255,255,255,.12) !important;
  color: #FFFFFF !important;
  box-shadow: inset 2px 0 0 var(--brand-accent-soft) !important;
}
html body .sidebar .nav-item span { color: inherit !important; }
/* Oculta o marcador legado/bala/placeholder e substitui por pseudo-ícone. */
html body .sidebar .nav-icon,
html body .sidebar .nc-nav-icon,
html body .sidebar .nav-item > .icon,
html body .sidebar .nav-item > .bullet,
html body .sidebar .nav-item > .marker {
  display: none !important;
}
html body .sidebar .nav-item::before {
  content: "";
  width: 18px;
  height: 18px;
  min-width: 18px;
  flex: 0 0 18px;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  opacity: .95;
}
/* Ordem padrão dos módulos do menu lateral */
html body .sidebar .nav-list .nav-item:nth-child(1)::before { -webkit-mask-image: url("/static/icons/overview.dae4fedab81d.svg"); mask-image: url("/static/icons/overview.dae4fedab81d.svg"); }
html body .sidebar .nav-list .nav-item:nth-child(2)::before { -webkit-mask-image: url("/static/icons/compliance.d2e6ae8e41f2.svg"); mask-image: url("/static/icons/compliance.d2e6ae8e41f2.svg"); }
html body .sidebar .nav-list .nav-item:nth-child(3)::before { -webkit-mask-image: url("/static/icons/protocols.0841fff7ea1e.svg"); mask-image: url("/static/icons/protocols.0841fff7ea1e.svg"); }
html body .sidebar .nav-list .nav-item:nth-child(4)::before { -webkit-mask-image: url("/static/icons/receipts.b9bf1e8a7b8f.svg"); mask-image: url("/static/icons/receipts.b9bf1e8a7b8f.svg"); }
html body .sidebar .nav-list .nav-item:nth-child(5)::before { -webkit-mask-image: url("/static/icons/deposits.72f0b48fefef.svg"); mask-image: url("/static/icons/deposits.72f0b48fefef.svg"); }
html body .sidebar .nav-list .nav-item:nth-child(6)::before { -webkit-mask-image: url("/static/icons/revenue.1d19668bd726.svg"); mask-image: url("/static/icons/revenue.1d19668bd726.svg"); }
html body .sidebar .nav-list .nav-item:nth-child(7)::before { -webkit-mask-image: url("/static/icons/accounts-receivable.9ac355eeea44.svg"); mask-image: url("/static/icons/accounts-receivable.9ac355eeea44.svg"); }
html body .sidebar .nav-list .nav-item:nth-child(8)::before { -webkit-mask-image: url("/static/icons/cash-registers.ecb29256a4e5.svg"); mask-image: url("/static/icons/cash-registers.ecb29256a4e5.svg"); }
html body .sidebar .nav-list .nav-item:nth-child(9)::before { -webkit-mask-image: url("/static/icons/bank-reconciliation.02201c56368d.svg"); mask-image: url("/static/icons/bank-reconciliation.02201c56368d.svg"); }
html body .sidebar .nav-list .nav-item:nth-child(10)::before { -webkit-mask-image: url("/static/icons/expenses.68935a09e9f8.svg"); mask-image: url("/static/icons/expenses.68935a09e9f8.svg"); }
html body .sidebar .nav-list .nav-item:nth-child(11)::before { -webkit-mask-image: url("/static/icons/funds-taxes.a18ed368aa25.svg"); mask-image: url("/static/icons/funds-taxes.a18ed368aa25.svg"); }
html body .sidebar .nav-list .nav-item:nth-child(12)::before { -webkit-mask-image: url("/static/icons/irpf-issqn.632f857f9b38.svg"); mask-image: url("/static/icons/irpf-issqn.632f857f9b38.svg"); }
html body .sidebar .nav-list .nav-item:nth-child(13)::before { -webkit-mask-image: url("/static/icons/closings.1308fea0c8a5.svg"); mask-image: url("/static/icons/closings.1308fea0c8a5.svg"); }
html body .sidebar .nav-list .nav-item:nth-child(14)::before { -webkit-mask-image: url("/static/icons/books.3e9a2394b616.svg"); mask-image: url("/static/icons/books.3e9a2394b616.svg"); }
html body .sidebar .nav-list .nav-item:nth-child(15)::before { -webkit-mask-image: url("/static/icons/reports.8dc0ee586323.svg"); mask-image: url("/static/icons/reports.8dc0ee586323.svg"); }
html body .sidebar .nav-list .nav-item:nth-child(16)::before { -webkit-mask-image: url("/static/icons/documents.de9dd3017948.svg"); mask-image: url("/static/icons/documents.de9dd3017948.svg"); }
html body .sidebar .nav-list .nav-item:nth-child(17)::before { -webkit-mask-image: url("/static/icons/continuity.443c2126911a.svg"); mask-image: url("/static/icons/continuity.443c2126911a.svg"); }
html body .sidebar .nav-list .nav-item:nth-child(18)::before { -webkit-mask-image: url("/static/icons/integrity.967cb20f94e7.svg"); mask-image: url("/static/icons/integrity.967cb20f94e7.svg"); }
html body .sidebar .nav-list .nav-item:nth-child(19)::before { -webkit-mask-image: url("/static/icons/fees.d02250d4218c.svg"); mask-image: url("/static/icons/fees.d02250d4218c.svg"); }
html body .sidebar .nav-list .nav-item:nth-child(20)::before { -webkit-mask-image: url("/static/icons/calculator.5a40d88f9cf4.svg"); mask-image: url("/static/icons/calculator.5a40d88f9cf4.svg"); }

/* Hero e atalhos — pequenas consistências de espaçamento */
.hero, .dashboard-hero, .page-hero, .hero-card { padding: 24px 22px !important; }
.hero-symbol { width: 80px !important; height: 80px !important; }

/* Botões: contraste consistente para estados primário, secundário, perigo e desabilitado. */
.button.secondary,
.btn.secondary {
  background: #FFFFFF !important;
  color: var(--brand-primary) !important;
  border-color: var(--border-strong) !important;
}
.button.secondary:hover,
.btn.secondary:hover {
  background: #F7F9FA !important;
  color: var(--brand-primary) !important;
}
.button.danger:not([disabled]),
.button.destructive:not([disabled]),
.btn.danger:not([disabled]),
button.danger:not([disabled]),
button.destructive:not([disabled]) {
  background: #A84747 !important;
  border-color: #A84747 !important;
  color: #FFFFFF !important;
}
.button[disabled], .btn[disabled], button[disabled], input[disabled] {
  background: #F4F6F8 !important;
  border-color: #D9E1E5 !important;
  color: #96A5B1 !important;
  opacity: 1 !important;
  box-shadow: none !important;
}
.button.danger[disabled], .button.destructive[disabled], .btn.danger[disabled], button.danger[disabled], button.destructive[disabled] {
  background: #FFF7F7 !important;
  border-color: #E8CFCF !important;
  color: #D3A7A7 !important;
}

/* Badges e alertas */
.badge, .status-badge { font-weight: 700 !important; }

/* Auth/MFA — alinhamento final das ações e hierarquia visual. */
.auth-card {
  width: min(100%, 430px) !important;
  padding: 30px 30px 26px !important;
}
.auth-card form { display: grid !important; gap: 14px !important; }
.auth-card .actions,
.auth-card .form-actions,
.auth-card .submit-row,
.auth-card .button-row,
.auth-card .otp-actions,
.auth-card .login-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  align-items: center !important;
  justify-content: flex-end !important;
}
.auth-card .submit-row > *,
.auth-card .actions > *,
.auth-card .form-actions > *,
.auth-card .button-row > *,
.auth-card .otp-actions > *,
.auth-card .login-actions > * { margin: 0 !important; }
.auth-card form button:empty,
.auth-card form .button:empty,
.auth-card form .btn:empty,
.auth-card form input[type="submit"][value=""],
.auth-card form input[type="button"][value=""] { display: none !important; }
.auth-card a[href*="password_reset"],
.auth-card .auth-links a { font-weight: 600; }

/* Tabelas de livros/exportações: desabilitados mais legíveis. */
.table-card .button[disabled],
.table-card .btn[disabled],
.section-card .button[disabled],
.section-card .btn[disabled] { color: #A1B0BA !important; }

/* Responsividade final */
@media (max-width: 860px) {
  .topbar { flex-wrap: wrap !important; }
  .user-menu { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
}
@media (max-width: 620px) {
  .topbar-title { min-width: calc(100% - 44px) !important; }
  .user-menu { width: 100%; justify-content: flex-start !important; padding-top: 4px; }
  .auth-card { padding: 24px 18px 22px !important; }
}

/* ========================================================================== */
/* CORREÇÃO DEFINITIVA CONSOLIDADA — SYSTEM-V1.0.7                            */
/* Sidebar final, ícones finais e tipografia compatível com o website.       */
/* ========================================================================== */

/* Tipografia compatível com o website (Manrope + Inter).
   Usa preferencialmente fontes locais do dispositivo/navegador.
   Não depende de CDN externo. */
@font-face {
  font-family: "Inter";
  src: local("Inter"), local("Inter Variable"), local("Inter 18pt"), local("Inter Regular");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: local("Manrope"), local("Manrope Variable"), local("Manrope Regular");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}
:root {
  --font-display: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}
html, body, button, input, select, textarea, table, .topbar, .sidebar, .content-shell {
  font-family: var(--font-ui) !important;
}
h1, h2, h3, .hero-title, .page-title, .section-title, .stat-value, .metric-value, .kpi-value {
  font-family: var(--font-display) !important;
  letter-spacing: -0.02em;
}
.stat-value, .metric-value, .kpi-value, .currency, .money, td[data-type="money"], .nc-numeric {
  font-variant-numeric: tabular-nums lining-nums !important;
}

/* Sidebar final */
html body .sidebar,
html body .app-shell .sidebar {
  background: #112233 !important;
  color: #D8E2E8 !important;
  border-right: 1px solid rgba(255,255,255,.06) !important;
}
html body .sidebar .brand,
html body .sidebar .brand *,
html body .sidebar .sidebar-footer strong { color: #FFFFFF !important; }
html body .sidebar .brand-subtitle,
html body .sidebar .sidebar-footer,
html body .sidebar .sidebar-footer *:not(strong) { color: #B3C3CD !important; }
html body .sidebar .nav-list,
html body .sidebar nav,
html body .sidebar .menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
html body .sidebar .nav-item,
html body .sidebar a.nc-sidebar-item,
html body .sidebar a.nav-item {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 40px !important;
  padding: 9px 12px !important;
  border-radius: 10px !important;
  background: transparent !important;
  color: #D8E2E8 !important;
  text-decoration: none !important;
  font-family: var(--font-ui) !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
}
html body .sidebar .nav-item:hover,
html body .sidebar .nav-item:focus-visible,
html body .sidebar a.nc-sidebar-item:hover,
html body .sidebar a.nav-item:hover {
  background: rgba(255,255,255,.08) !important;
  color: #FFFFFF !important;
}
html body .sidebar .nav-item.active,
html body .sidebar .nav-item[aria-current="page"],
html body .sidebar a.nc-sidebar-item.active,
html body .sidebar a.nav-item.active,
html body .sidebar a.nav-item[aria-current="page"] {
  background: #2E455A !important;
  color: #FFFFFF !important;
  box-shadow: inset 2px 0 0 #93ABBA !important;
}
/* Desliga pseudo-elementos/ícones legados do tema antigo */
html body .sidebar .nav-item::before,
html body .sidebar .nav-item::after,
html body .sidebar a.nc-sidebar-item::before,
html body .sidebar a.nc-sidebar-item::after,
html body .sidebar a.nav-item::before,
html body .sidebar a.nav-item::after {
  content: none !important;
  display: none !important;
}
/* Esconde ícones antigos de qualquer família conhecida */
html body .sidebar .nav-item i,
html body .sidebar .nav-item svg,
html body .sidebar .nav-item img.nav-icon,
html body .sidebar .nav-item img.nc-nav-icon,
html body .sidebar .nav-item .nav-icon,
html body .sidebar .nav-item .icon,
html body .sidebar .nav-item .marker,
html body .sidebar .nav-item .bullet,
html body .sidebar .nav-item [class^="fa"],
html body .sidebar .nav-item [class*=" fa-"],
html body .sidebar .nav-item [class^="icon-"],
html body .sidebar .nav-item [class*=" icon-"] {
  display: none !important;
}
html body .sidebar .nc-nav-icon-mask {
  display: inline-block !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  flex: 0 0 18px !important;
  background-color: currentColor !important;
  -webkit-mask-image: var(--nc-icon-url) !important;
  mask-image: var(--nc-icon-url) !important;
  -webkit-mask-repeat: no-repeat !important;
  mask-repeat: no-repeat !important;
  -webkit-mask-position: center !important;
  mask-position: center !important;
  -webkit-mask-size: contain !important;
  mask-size: contain !important;
  opacity: .92 !important;
}
html body .sidebar .nav-item:hover .nc-nav-icon-mask,
html body .sidebar .nav-item.active .nc-nav-icon-mask,
html body .sidebar .nav-item[aria-current="page"] .nc-nav-icon-mask { opacity: 1 !important; }
html body .sidebar .sidebar-test-label {
  background: rgba(255,244,206,.12) !important;
  border-color: rgba(215,178,74,.58) !important;
  color: #F8E9AD !important;
}
html body .sidebar .sidebar-footer,
html body .sidebar .sidebar-footer * {
  font-family: var(--font-ui) !important;
  font-size: 10.5px !important;
}

/* ========================================================================== */
/* BRAND SYNC WEB FINAL — SYSTEM-V1.0.8                                       */
/* Lockups oficiais do website no login/sidebar.                              */
/* ========================================================================== */
html body .sidebar .brand-logo-horizontal {
  width: 176px !important;
  max-width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
  object-position: left center !important;
  filter: none !important;
  opacity: 1 !important;
}
html body .sidebar .brand-block {
  padding: 2px 10px 16px !important;
}
html body .auth-brand img {
  width: min(224px, 76%) !important;
  max-width: 224px !important;
  height: auto !important;
  object-fit: contain !important;
  filter: none !important;
  opacity: 1 !important;
}

/* ========================================================================== */
/* CORREÇÃO FINAL DE POSICIONAMENTO E LOCKUP — SYSTEM-V1.0.9                  */
/* Remove sobreposição de logos e corrige topo sem função.                    */
/* ========================================================================== */

/* Brand lockup final: mantém apenas a marca oficial visível. */
html body .sidebar .brand,
html body .auth-brand {
  position: relative !important;
  overflow: hidden !important;
}
html body .sidebar .brand > *:not(.nc-brand-primary-image):not(.brand-logo-horizontal),
html body .auth-brand > *:not(.nc-brand-primary-image) {
  display: none !important;
}
html body .sidebar .brand img:not(.nc-brand-primary-image),
html body .auth-brand img:not(.nc-brand-primary-image),
html body .sidebar .brand svg:not(.nc-brand-primary-image),
html body .auth-brand svg:not(.nc-brand-primary-image),
html body .nc-brand-legacy-hidden {
  display: none !important;
  visibility: hidden !important;
}
html body .sidebar .brand {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  min-height: 40px !important;
}
html body .sidebar .brand .nc-brand-primary-image,
html body .sidebar .brand-logo-horizontal {
  display: block !important;
  width: 168px !important;
  max-width: 168px !important;
  height: auto !important;
  object-fit: contain !important;
}
html body .auth-brand {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 64px !important;
}
html body .auth-brand .nc-brand-primary-image,
html body .auth-brand img {
  display: block !important;
  width: min(226px, 76%) !important;
  max-width: 226px !important;
  height: auto !important;
  object-fit: contain !important;
}

/* Topbar: remove o botão sem função e corrige o respiro vertical. */
html body .topbar .menu-toggle,
html body .topbar .icon-button.menu-toggle,
html body .topbar [aria-label="Abrir menu"],
html body .topbar [aria-label="Open menu"] {
  display: none !important;
}
html body .topbar {
  min-height: 60px !important;
  padding: 8px 28px 12px !important;
  gap: 14px !important;
  margin-top: 0 !important;
}
html body .topbar-title {
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
html body .topbar + *,
html body .main-column > .topbar + * {
  margin-top: 10px !important;
}

@media (max-width: 900px) {
  html body .topbar {
    padding: 8px 18px 12px !important;
  }
}

/* ========================================================================== */
/* SYSTEM-V1.1.0 — CONSOLIDAÇÃO VISUAL PELAS REFERÊNCIAS OFICIAIS            */
/* Base: dashboard-reference.html + login-reference.html do pacote branding.  */
/* ========================================================================== */

/* Estrutura exata de dashboard/reference */
html body .environment-banner {
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 16px !important;
  background: #FFF4CE !important;
  border-bottom: 1px solid #D7B24A !important;
  color: #6C5417 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: .02em !important;
}
html body .app-shell {
  grid-template-columns: 244px minmax(0,1fr) !important;
  min-height: calc(100vh - 30px) !important;
}
html body .sidebar {
  width: 244px !important;
  min-width: 244px !important;
  min-height: calc(100vh - 30px) !important;
  padding: 24px 14px 16px !important;
  background: #112233 !important;
}
html body .sidebar .brand-block {
  padding: 2px 10px 18px !important;
  margin: 0 !important;
}
html body .sidebar .brand {
  min-height: 0 !important;
  margin: 0 0 6px !important;
  background: none !important;
  background-image: none !important;
}
html body .sidebar .brand::before,
html body .sidebar .brand::after,
html body .auth-brand::before,
html body .auth-brand::after {
  content: none !important;
  display: none !important;
  background: none !important;
}
html body .sidebar .brand .nc-brand-primary-image,
html body .sidebar .brand-logo-horizontal {
  width: 174px !important;
  max-width: 174px !important;
  height: auto !important;
  margin: 2px 0 0 !important;
}
html body .sidebar .brand-subtitle {
  margin: 7px 2px 10px !important;
  color: #B3C3CD !important;
  font-size: 10px !important;
  line-height: 1.35 !important;
}
html body .sidebar .nav-list { gap: 3px !important; margin-top: 0 !important; }
html body .sidebar .nav-item,
html body .sidebar a.nc-sidebar-item {
  min-height: 38px !important;
  padding: 8px 12px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  gap: 10px !important;
}
html body .sidebar .nc-nav-icon-mask {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  flex-basis: 18px !important;
  opacity: .72 !important;
}
html body .sidebar .nav-item.active .nc-nav-icon-mask,
html body .sidebar .nav-item[aria-current="page"] .nc-nav-icon-mask,
html body .sidebar .nav-item:hover .nc-nav-icon-mask { opacity: 1 !important; }
html body .sidebar .sidebar-footer {
  margin-top: auto !important;
  padding: 16px 10px 0 !important;
  font-size: 10px !important;
  line-height: 1.5 !important;
}

/* Cabeçalho: exatamente 68px, sem hambúrguer desktop e com conteúdo respirando 24px abaixo. */
html body .topbar {
  height: 68px !important;
  min-height: 68px !important;
  padding: 0 28px !important;
  margin: 0 !important;
  background: #FFFFFF !important;
  border-bottom: 1px solid #E8ECEE !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
}
html body .topbar .menu-toggle,
html body .topbar .icon-button.menu-toggle,
html body .topbar [aria-label="Abrir menu"],
html body .topbar [aria-label="Open menu"] { display: none !important; }
html body .topbar-title { gap: 0 !important; margin: 0 !important; padding: 0 !important; }
html body .topbar-title strong { font-size: 14px !important; font-weight: 700 !important; }
html body .topbar-title small { margin-top: 3px !important; font-size: 12px !important; color: #566F84 !important; }
html body .content-area {
  width: 100% !important;
  max-width: 1320px !important;
  margin: 0 !important;
  padding: 24px 28px 40px !important;
}
html body .topbar + *,
html body .main-column > .topbar + * { margin-top: 0 !important; }

/* Dashboard: medidas da referência oficial */
html body .hero,
html body .dashboard-hero,
html body .page-hero,
html body .hero-card {
  border-radius: 16px !important;
  padding: 24px 26px !important;
  margin: 0 0 22px !important;
  background: #112233 !important;
  color: #FFFFFF !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
html body .hero h1,
html body .dashboard-hero h1,
html body .page-hero h1,
html body .hero-card h1 {
  margin: 0 0 7px !important;
  font-family: var(--font-display) !important;
  font-size: 28px !important;
  line-height: 1.2 !important;
  font-weight: 750 !important;
  color: #FFFFFF !important;
}
html body .hero p,
html body .dashboard-hero p,
html body .page-hero p,
html body .hero-card p { margin: 0 !important; color: #B3C3CD !important; font-size: 13px !important; }
html body .hero-symbol { width: 74px !important; height: 74px !important; opacity: .94 !important; }
html body .section-head {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: space-between !important;
  margin: 0 0 16px !important;
}
html body .section-head .eyebrow,
html body .eyebrow {
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: .08em !important;
  color: #566F84 !important;
  text-transform: uppercase !important;
}
html body .section-head h2 { margin: 5px 0 4px !important; font-size: 25px !important; line-height: 1.25 !important; }
html body .metric-card,
html body .summary-card,
html body .dashboard-card {
  min-height: 116px !important;
  padding: 17px 18px !important;
  border: 1px solid #D9E1E5 !important;
  border-radius: 14px !important;
  background: #FFFFFF !important;
  box-shadow: none !important;
}
html body .metric-value,
html body .stat-value {
  font-size: 24px !important;
  line-height: 1.15 !important;
  font-weight: 750 !important;
}
html body .card,
html body .content-card,
html body .section-card {
  border: 1px solid #D9E1E5 !important;
  border-radius: 14px !important;
  padding: 20px !important;
  background: #FFFFFF !important;
  box-shadow: none !important;
}

/* Login: medidas e hierarquia do login-reference.html */
html body.auth-body,
html body .auth-body {
  background: #F7F9FA !important;
  background-image: none !important;
}
html body .auth-shell {
  min-height: calc(100vh - 30px) !important;
  padding: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
html body .auth-card {
  width: min(100%, 430px) !important;
  padding: 34px !important;
  border: 1px solid #D9E1E5 !important;
  border-radius: 16px !important;
  background: #FFFFFF !important;
  box-shadow: 0 8px 24px rgba(17,34,51,.08) !important;
}
html body .auth-brand {
  min-height: 0 !important;
  margin: 0 0 26px !important;
  background: none !important;
  background-image: none !important;
  overflow: visible !important;
}
html body .auth-brand .nc-brand-primary-image,
html body .auth-brand img {
  width: 210px !important;
  max-width: 210px !important;
  height: auto !important;
  margin: 0 auto !important;
}
/* A referência não exibe um segundo lockup/tagline sob a marca. */
html body .auth-product-subtitle { display: none !important; }
html body .auth-card h1,
html body .auth-card h2 {
  margin: 0 0 8px !important;
  text-align: center !important;
  font-size: 25px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
}
html body .auth-card > p,
html body .auth-card .auth-help-text,
html body .auth-card form > p:first-child:not(:has(label)):not(:has(input)) {
  margin: 0 0 26px !important;
  color: #566F84 !important;
  text-align: center !important;
  font-size: 13px !important;
}
html body .auth-card label {
  display: block !important;
  margin: 0 0 7px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}
html body .auth-card input[type="text"],
html body .auth-card input[type="password"],
html body .auth-card input[type="email"] {
  height: 42px !important;
  min-height: 42px !important;
  margin: 0 0 16px !important;
  padding: 0 12px !important;
  border: 1px solid #B3C3CD !important;
  border-radius: 10px !important;
}
html body .auth-card form { display: block !important; }
html body .auth-card .actions,
html body .auth-card .form-actions,
html body .auth-card .submit-row,
html body .auth-card .button-row,
html body .auth-card .otp-actions,
html body .auth-card .login-actions {
  display: block !important;
  margin: 0 !important;
}
html body .auth-card .button,
html body .auth-card .btn,
html body .auth-card button,
html body .auth-card input[type="submit"] {
  width: 100% !important;
  min-width: 100% !important;
  height: 42px !important;
  min-height: 42px !important;
  margin: 4px 0 0 !important;
  border-radius: 10px !important;
  background: #112233 !important;
  border-color: #112233 !important;
  color: #FFFFFF !important;
  font-size: 14px !important;
  font-weight: 650 !important;
}
html body .auth-links,
html body .auth-card a[href*="password_reset"],
html body .auth-card a[href*="senha"] {
  display: block !important;
  margin-top: 18px !important;
  text-align: center !important;
  color: #315F78 !important;
  font-size: 12px !important;
  text-decoration: none !important;
}
html body .auth-footer {
  margin: 26px 0 0 !important;
  padding-top: 20px !important;
  border-top: 1px solid #E8ECEE !important;
  color: #566F84 !important;
  text-align: center !important;
  font-size: 11px !important;
}

@media (max-width: 700px) {
  html body .environment-banner { height: 42px !important; min-height: 42px !important; text-align: center !important; padding: 0 10px !important; }
  html body .sidebar { top: 42px !important; }
  html body .topbar { height: 58px !important; min-height: 58px !important; padding: 0 14px !important; }
  html body .content-area { padding: 16px !important; }
  html body .hero, html body .dashboard-hero, html body .page-hero, html body .hero-card { padding: 18px !important; align-items: flex-start !important; }
  html body .hero h1, html body .dashboard-hero h1 { font-size: 22px !important; }
  html body .hero-symbol { width: 54px !important; height: 54px !important; }
  html body .section-head { align-items: flex-start !important; }
  html body .section-head h2 { font-size: 22px !important; }
  html body .auth-shell { padding: 24px 14px !important; }
  html body .auth-card { padding: 28px 22px !important; }
}


/* ========================================================================== */
/* SYSTEM-V1.1.1 — AJUSTES FINAIS DE HOMOLOGAÇÃO                              */
/* Corrige login com painel lateral, MFA, centralização e topbar fixa.       */
/* ========================================================================== */

/* Layout da área autenticada */
html body .main-column {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}
@media (min-width: 861px) {
  html body .topbar {
    position: sticky !important;
    top: 30px !important;
    z-index: 120 !important;
    height: 68px !important;
    min-height: 68px !important;
    padding-left: clamp(24px, calc((100vw - 244px - 1320px) / 2 + 24px), 56px) !important;
    padding-right: clamp(24px, calc((100vw - 244px - 1320px) / 2 + 24px), 56px) !important;
    box-shadow: 0 1px 0 #E8ECEE !important;
  }
  html body .content-area {
    width: min(1320px, calc(100% - 56px)) !important;
    max-width: 1320px !important;
    margin: 0 auto !important;
    padding: 18px 0 40px !important;
  }
}
html body .topbar + *,
html body .main-column > .topbar + * {
  margin-top: 0 !important;
}
html body .content-area > :first-child,
html body .main-column > .content-area > :first-child {
  margin-top: 0 !important;
}

/* Login + MFA: estrutura bipartida com painel lateral institucional */
html body .auth-shell {
  min-height: calc(100vh - 30px) !important;
  padding: 40px 24px !important;
}
html body .nc-auth-stage {
  width: 100% !important;
  max-width: 1060px !important;
}
html body .nc-auth-split {
  display: grid !important;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 430px) !important;
  gap: 28px !important;
  align-items: stretch !important;
}
html body .nc-auth-aside {
  position: relative !important;
  overflow: hidden !important;
  border-radius: 20px !important;
  border: 1px solid #D9E1E5 !important;
  background: linear-gradient(160deg, #112233 0%, #1D3447 62%, #315F78 100%) !important;
  box-shadow: 0 12px 34px rgba(17,34,51,.12) !important;
  min-height: 560px !important;
}
html body .nc-auth-aside::before {
  content: "" !important;
  position: absolute !important;
  inset: auto -60px -80px auto !important;
  width: 240px !important;
  height: 240px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.08) !important;
}
html body .nc-auth-aside-inner {
  position: relative !important;
  height: 100% !important;
  padding: 34px 34px 32px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  gap: 22px !important;
}
html body .nc-auth-aside-logo {
  width: 206px !important;
  max-width: 100% !important;
  height: auto !important;
}
html body .nc-auth-aside-copyblock {
  display: grid !important;
  gap: 12px !important;
}
html body .nc-auth-aside-eyebrow {
  display: inline-flex !important;
  width: max-content !important;
  padding: 6px 10px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.10) !important;
  color: #EAF1F5 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}
html body .nc-auth-aside-title {
  margin: 0 !important;
  color: #FFFFFF !important;
  font-family: var(--font-display) !important;
  font-size: 30px !important;
  line-height: 1.15 !important;
  font-weight: 760 !important;
  letter-spacing: -.02em !important;
}
html body .nc-auth-aside-copy {
  margin: 0 !important;
  color: #D8E2E8 !important;
  font-size: 14px !important;
  line-height: 1.65 !important;
}
html body .nc-auth-aside-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  gap: 10px !important;
}
html body .nc-auth-aside-list li {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  color: #EAF1F5 !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
}
html body .nc-auth-aside-list li::before {
  content: "" !important;
  width: 8px !important;
  height: 8px !important;
  min-width: 8px !important;
  margin-top: 6px !important;
  border-radius: 999px !important;
  background: #D7B24A !important;
}
html body .nc-auth-aside-visual {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: flex-end !important;
  margin-top: auto !important;
}
html body .nc-auth-aside-visual img {
  width: min(100%, 290px) !important;
  height: auto !important;
  opacity: .97 !important;
}
html body .auth-card {
  width: 100% !important;
  max-width: 430px !important;
  min-height: 560px !important;
  margin: 0 0 0 auto !important;
  padding: 34px !important;
  overflow: visible !important;
}
html body .auth-brand { margin-bottom: 22px !important; }
html body .auth-card .auth-help-text,
html body .auth-card > p {
  margin: 0 0 22px !important;
}
html body .auth-card form {
  display: grid !important;
  gap: 14px !important;
}
html body .auth-card form p {
  margin: 0 !important;
}
html body .auth-card input[type="text"],
html body .auth-card input[type="password"],
html body .auth-card input[type="email"],
html body .auth-card input[type="number"],
html body .auth-card input[type="tel"] {
  width: 100% !important;
  margin: 0 !important;
}
html body .auth-card .actions,
html body .auth-card .form-actions,
html body .auth-card .submit-row,
html body .auth-card .button-row,
html body .auth-card .otp-actions,
html body .auth-card .login-actions {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
  margin-top: 4px !important;
  overflow: visible !important;
}
html body .auth-card .actions > *,
html body .auth-card .form-actions > *,
html body .auth-card .submit-row > *,
html body .auth-card .button-row > *,
html body .auth-card .otp-actions > *,
html body .auth-card .login-actions > * {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}
html body .auth-card .button,
html body .auth-card .btn,
html body .auth-card button,
html body .auth-card input[type="submit"],
html body .auth-card input[type="button"] {
  width: 100% !important;
  min-width: 0 !important;
  height: 42px !important;
  min-height: 42px !important;
  margin: 0 !important;
}
html body .auth-footer {
  margin-top: 22px !important;
}

@media (max-width: 980px) {
  html body .nc-auth-split {
    grid-template-columns: 1fr !important;
    max-width: 430px !important;
    margin: 0 auto !important;
  }
  html body .nc-auth-aside {
    min-height: 0 !important;
    display: none !important;
  }
  html body .auth-card {
    min-height: 0 !important;
    margin: 0 auto !important;
  }
}
@media (max-width: 860px) {
  html body .topbar {
    position: sticky !important;
    top: 30px !important;
    padding: 0 16px !important;
  }
  html body .content-area {
    width: calc(100% - 32px) !important;
    margin: 0 auto !important;
    padding: 16px 0 30px !important;
  }
}
@media (max-width: 700px) {
  html body .topbar { top: 42px !important; }
  html body .auth-shell { padding: 24px 14px !important; }
}


/* ========================================================================== */
/* SYSTEM-V1.1.6 — PAINEL DE AUTENTICAÇÃO SEM JAVASCRIPT                      */
/* A arte de Login/MFA passa a ser renderizada pela própria .auth-shell.      */
/* ========================================================================== */

@media (min-width: 981px) {
  html body .auth-shell {
    width: 100% !important;
    max-width: none !important;
    min-height: calc(100vh - 30px) !important;
    display: grid !important;
    grid-template-columns: minmax(520px, 720px) 430px !important;
    grid-template-rows: auto auto !important;
    justify-content: center !important;
    align-content: center !important;
    align-items: stretch !important;
    column-gap: 34px !important;
    row-gap: 18px !important;
    padding: 42px 28px 28px !important;
    box-sizing: border-box !important;
  }

  html body .auth-shell::before {
    content: "" !important;
    display: block !important;
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
    min-width: 0 !important;
    min-height: 560px !important;
    border-radius: 24px !important;
    border: 1px solid #D9E1E5 !important;
    background-color: #F4F6F8 !important;
    background-image: url("/static/brand/auth-login-panel-v116.9688e8203f49.webp?v=116") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
    box-shadow: 0 12px 34px rgba(17,34,51,.08) !important;
  }

  html body .auth-shell > .auth-card {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 430px !important;
    max-width: 430px !important;
    min-height: 560px !important;
    margin: 0 !important;
    align-self: stretch !important;
  }

  html body .auth-shell > .auth-footer {
    grid-column: 2 !important;
    grid-row: 2 !important;
    width: 430px !important;
    margin: 0 !important;
    align-self: start !important;
  }

  /* Neutraliza wrappers eventualmente deixados por versões anteriores do CSS/JS. */
  html body .auth-shell > .nc-auth-stage,
  html body .auth-shell .nc-auth-split,
  html body .auth-shell .nc-auth-aside {
    display: contents !important;
  }
}

@media (max-width: 980px) {
  html body .auth-shell {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }
  html body .auth-shell::before {
    content: none !important;
    display: none !important;
  }
}
