/* Customizações do sistema base — evite sobrescrever o Tabler além do necessário */
.avatar { background-color: var(--tblr-primary); color: var(--tblr-primary-fg, #fff); font-weight: 600; }

/* Cores claras de destaque: texto escuro sobre a cor primária (botões, avatar, menu colorido) */
html[data-bs-theme-primary="yellow"], html[data-bs-theme-primary="lime"] { --tblr-primary-fg: #1f2937; }
html[data-bs-navbar-theme="primary"]:is([data-bs-theme-primary="yellow"], [data-bs-theme-primary="lime"]) .page > .navbar {
  --tblr-navbar-color: rgba(0, 0, 0, .75); --tblr-navbar-hover-color: #000; --tblr-navbar-active-color: #000;
  --tblr-navbar-active-bg: rgba(0, 0, 0, .08); --tblr-navbar-brand-color: #000;
}
.navbar-vertical .navbar-brand > a { flex: none; min-width: 32px; }
.navbar-vertical .navbar-brand-image { border-radius: 6px; flex: none; width: 32px; height: 32px; }
.navbar-vertical .navbar-brand-text { white-space: nowrap; overflow: hidden; }
.navbar-vertical .navbar-brand-full { height: 32px; width: auto; max-width: 180px; object-fit: contain; }
.navbar-vertical .navbar-brand-mini { display: none; }
.login-logo { height: 48px; width: auto; max-width: 260px; object-fit: contain; }

/* Cards de KPI do dashboard (Kpi::card): grid em vez de .row/col- — larguras sempre idênticas entre
   os cards, imune a arredondamento de flex-basis percentual que alguns navegadores (Edge/Chromium com
   escala de tela fracionada, ex. 125%/150% no Windows) acumulam de forma desigual em telas muito largas. */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; width: 100%; }
.kpi-grid > * { min-width: 0; }
@media (max-width: 991.98px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575.98px) { .kpi-grid { grid-template-columns: 1fr; } }

/* Sidebar recolhida (só desktop ≥ lg): esconde o nome da marca, exceto ao expandir por hover */
@media (min-width: 992px) {
  html[data-bs-sidebar="folded"] .navbar-vertical .navbar-brand-text,
  html[data-bs-sidebar="folded-hover"] .navbar-vertical:not(:hover):not(:has(:focus-visible)) .navbar-brand-text { display: none; }
  html[data-bs-sidebar="folded"] .navbar-vertical .navbar-brand-mini,
  html[data-bs-sidebar="folded-hover"] .navbar-vertical:not(:hover):not(:has(:focus-visible)) .navbar-brand-mini { display: block; }
}

/* Barra superior fica dentro de .page-wrapper (sidebar + navbar juntas); replica o sticky do Tabler */
html[data-bs-navbar="sticky"] .page-wrapper > .navbar { position: sticky; top: 0; z-index: 1020; }

/* Tela de login (layout dividido, app/views/public_header.php com $authSplit) */
.auth-split-body, .auth-split { min-height: 100vh; }
.auth-split { padding: 0 !important; }
.auth-hero {
  background: linear-gradient(160deg, var(--tblr-primary) 0%, color-mix(in srgb, var(--tblr-primary) 55%, #05070d) 100%);
  background-size: cover; background-position: center;
}
.auth-hero-overlay { background: linear-gradient(180deg, rgba(0, 0, 0, .15) 0%, rgba(0, 0, 0, .55) 100%); min-height: 100%; }
.auth-logo-badge {
  background: rgba(255, 255, 255, .5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-radius: .75rem; padding: .75rem 1.125rem; line-height: 0; box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  max-width: 100%; box-sizing: border-box; display: inline-flex; align-items: center;
}
.auth-logo-badge .login-logo-lg { height: 96px; width: auto; max-width: 100%; }
@media (max-width: 420px) { .auth-logo-badge .login-logo-lg { height: 56px; } }
html[data-bs-theme="dark"] .auth-hero-overlay { background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, .7) 100%); }
