@charset "UTF-8";
/* =========================================================================
   SIS GUSH — Design System v3
   Nova Gush · Soluções em Autopeças
   -------------------------------------------------------------------------
   Organização do arquivo:
     01. Tokens
     02. Reset / base
     03. App shell (sidebar + topbar + conteúdo)
     04. Sidebar / navegação
     05. Topbar
     06. Cabeçalho de página
     07. Componentes  (card, btn, form, table, badge, kpi, alert, ...)
     08. Utilitários de grid e compatibilidade
     09. Overrides de terceiros (DataTables / Chart.js)
     10. Login / telas de acesso
     11. Responsivo
     12. Impressão / acessibilidade
     13. Modo escuro  (html[data-theme="dark"] — ver js/theme.js)
   ========================================================================= */


/* =========================================================================
   01. TOKENS
   ========================================================================= */
:root{
  /* ---- Marca ---- */
  --brand:          #C0303F;
  --brand-600:      #AB2B39;
  --brand-700:      #8E2330;
  --brand-dark:     #8E2330;   /* legado */
  --brand-100:      #F8DDE1;
  --brand-50:       #FDF3F4;
  --brand-rgb:      192, 48, 63;

  /* ---- Neutros ---- */
  --ink-950:        #080D18;
  --ink-900:        #0D1424;
  --ink-850:        #131C2E;
  --ink-800:        #1B2537;
  --ink-700:        #334155;
  --ink-600:        #475569;
  --ink-500:        #64748B;
  --ink-400:        #94A3B8;
  --ink-300:        #CBD5E1;
  --ink-200:        #E2E8F0;
  --ink-100:        #EDF1F7;
  --ink-50:         #F6F8FC;

  /* ---- Semântico ---- */
  --ok:             #0F9D64;
  --ok-bg:          #E9F9F1;
  --ok-border:      #A7E8C8;
  --warn:           #B45309;
  --warn-bg:        #FFF8EB;
  --warn-border:    #FCD9A0;
  --danger:         #D0342C;
  --danger-bg:      #FEF2F2;
  --danger-border:  #F6BDBA;
  --info:           #1D6FD0;
  --info-bg:        #EFF6FF;
  --info-border:    #B9D5F7;

  /* ---- Superfícies / texto ---- */
  --canvas:         #F4F6FA;
  --card:           #FFFFFF;
  --surface-2:      #FAFBFD;
  --text:           #0F172A;
  --text-2:         #475569;
  --muted:          #6B7280;
  --border:         #E4E8EF;
  --border-strong:  #D2D9E4;
  --bg:             #0D1424;   /* legado (sidebar) */
  --panel:          #131C2E;   /* legado (sidebar) */

  /* ---- Raios ---- */
  --r-xs:  6px;
  --r-sm:  8px;
  --r-md:  10px;
  --r-lg:  14px;
  --r-xl:  18px;
  --r-pill:999px;
  --radius: 14px;              /* legado */

  /* ---- Elevação ---- */
  --sh-xs: 0 1px 2px rgba(15, 23, 42, .05);
  --sh-sm: 0 1px 3px rgba(15, 23, 42, .07), 0 1px 2px rgba(15, 23, 42, .04);
  --sh-md: 0 4px 12px rgba(15, 23, 42, .07), 0 1px 3px rgba(15, 23, 42, .05);
  --sh-lg: 0 12px 32px rgba(15, 23, 42, .10), 0 2px 8px rgba(15, 23, 42, .05);
  --sh-xl: 0 24px 60px rgba(15, 23, 42, .18);
  --shadow: var(--sh-md);      /* legado */

  /* ---- Foco ---- */
  --ring: 0 0 0 3px rgba(var(--brand-rgb), .20);

  /* ---- Métricas do shell ---- */
  --sidebar-w:         272px;
  --sidebar-rail:      76px;
  --sidebar-collapsed: 76px;   /* legado */
  --topbar-h:          62px;
  --gutter:            22px;

  /* ---- Tipografia ---- */
  --font: "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, -apple-system,
          "Roboto", "Helvetica Neue", Arial, sans-serif;
  --font-num: "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, sans-serif;

  /* ---- Movimento ---- */
  --t-fast: 120ms cubic-bezier(.4, 0, .2, 1);
  --t-base: 200ms cubic-bezier(.4, 0, .2, 1);
  --t-slow: 280ms cubic-bezier(.4, 0, .2, 1);

  color-scheme: light;
}


/* =========================================================================
   02. RESET / BASE
   ========================================================================= */
*, *::before, *::after{ box-sizing: border-box; }

html{
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html, body{
  height: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body{
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "cv05" 1;
}

h1, h2, h3, h4, h5, h6{
  margin: 0;
  font-weight: 650;
  letter-spacing: -.012em;
  color: var(--text);
  line-height: 1.25;
}
h1{ font-size: 22px; }
h2{ font-size: 18px; }
h3{ font-size: 16px; }
h4{ font-size: 14.5px; }
h5, h6{ font-size: 13px; }

p{ margin: 0 0 10px; }
p:last-child{ margin-bottom: 0; }

a{ color: var(--brand-600); text-decoration: none; }
a:hover{ color: var(--brand-700); text-decoration: underline; text-underline-offset: 2px; }

hr{
  border: 0;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}

small{ font-size: 12px; }
strong, b{ font-weight: 650; }

code, kbd, pre, samp{
  font-family: ui-monospace, "Cascadia Mono", "Consolas", "SF Mono", monospace;
  font-size: .92em;
}

img, svg, video, canvas{ max-width: 100%; }

/* O atributo hidden precisa ganhar dos componentes que definem display
   (ex.: .btn é inline-flex). Sem isto, esconder um botão por JS com
   el.hidden = true simplesmente não funciona: estilo de autor vence a
   regra [hidden] da folha do navegador. */
[hidden]{ display: none !important; }

:focus-visible{
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* ---- Ícones do sprite ---- */
.svg-sprite{ display: none; }

.ico{
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
  pointer-events: none;
}
.ico-sm{ width: 15px; height: 15px; }
.ico-lg{ width: 22px; height: 22px; }
.ico-xl{ width: 28px; height: 28px; stroke-width: 1.6; }

/* ---- Scrollbars discretas ---- */
@supports selector(::-webkit-scrollbar){
  *::-webkit-scrollbar{ width: 10px; height: 10px; }
  *::-webkit-scrollbar-track{ background: transparent; }
  *::-webkit-scrollbar-thumb{
    background: var(--ink-300);
    border: 3px solid transparent;
    background-clip: content-box;
    border-radius: var(--r-pill);
  }
  *::-webkit-scrollbar-thumb:hover{ background-color: var(--ink-400); background-clip: content-box; }
  *::-webkit-scrollbar-corner{ background: transparent; }
}


/* =========================================================================
   03. APP SHELL
   ========================================================================= */
.app{
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 100%;
}

.main{
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
}

.content{
  min-width: 0;
  width: 100%;
  flex: 1 1 auto;
  padding: var(--gutter);
  padding-bottom: calc(var(--gutter) + 24px);
}
.content > *, .main > *{ min-width: 0; }

/* Empilha os blocos soltos que as telas jogam direto no .content */
.content > .card + .card,
.content > .card + .grid,
.content > .grid + .card,
.content > .grid + .grid{ margin-top: 16px; }


/* =========================================================================
   04. SIDEBAR / NAVEGAÇÃO
   ========================================================================= */
.sidebar{
  position: sticky;
  top: 0;
  z-index: 40;
  isolation: isolate;
  height: 100vh;
  height: 100dvh;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  color: #E8ECF4;
  background:
    radial-gradient(820px 420px at -160px -120px, rgba(var(--brand-rgb), .30), transparent 62%),
    linear-gradient(178deg, var(--ink-950) 0%, var(--ink-900) 46%, var(--ink-850) 100%);
  border-right: 1px solid rgba(255, 255, 255, .06);
  transition: width var(--t-slow), transform var(--t-slow), box-shadow var(--t-base);
}

/* ---- Marca ---- */
.brand{
  display: flex;
  align-items: center;
  gap: 11px;
  height: var(--topbar-h);
  flex: 0 0 auto;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}
.brand:hover{ text-decoration: none; color: inherit; }

.brand img{
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: var(--r-sm);
  background: #fff;
  padding: 3px;
  object-fit: contain;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .28);
}

.brand .brand-text{
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}
.brand .brand-text strong{
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .06em;
  white-space: nowrap;
  color: #fff;
}
.brand .brand-text span{
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, .52);
  white-space: nowrap;
  letter-spacing: .01em;
}

/* ---- Fechar drawer (só no mobile) ---- */
.nav-close{
  display: none;
  position: absolute;
  top: 13px;
  right: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  padding: 0;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .70);
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}
.nav-close:hover{ background: rgba(255, 255, 255, .14); color: #fff; }

/* ---- Busca de telas ---- */
.nav-search{
  flex: 0 0 auto;
  padding: 12px 14px 6px;
  position: relative;
}
.nav-search .ico{
  position: absolute;
  left: 25px;
  top: 50%;
  transform: translateY(-25%);
  width: 15px;
  height: 15px;
  color: rgba(255, 255, 255, .40);
  z-index: 1;
}
.nav-search input{
  width: 100%;
  height: 34px;
  padding: 0 10px 0 32px;
  font: inherit;
  font-size: 12.5px;
  color: #fff;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: var(--r-sm);
  outline: none;
  transition: background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.nav-search input::placeholder{ color: rgba(255, 255, 255, .38); }
.nav-search input:focus{
  background: rgba(255, 255, 255, .10);
  border-color: rgba(var(--brand-rgb), .70);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .18);
}

/* ---- Lista ---- */
.nav{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overscroll-behavior: contain;
}
/* Sem isso, quando a lista é mais alta que a sidebar o flexbox encolhe
   os itens (e recorta os submenus abertos) em vez de rolar. */
.nav > *{ flex: 0 0 auto; }
.nav::-webkit-scrollbar{ width: 8px; }
.nav::-webkit-scrollbar-thumb{
  background-color: rgba(255, 255, 255, .16);
  border: 2px solid transparent;
  background-clip: content-box;
}
.nav::-webkit-scrollbar-thumb:hover{ background-color: rgba(255, 255, 255, .28); background-clip: content-box; }
.nav{ scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; }

.nav-section{
  padding: 14px 12px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .34);
  white-space: nowrap;
}
.nav-section:first-child{ padding-top: 4px; }

.nav a,
.nav button.navbtn{
  position: relative;
  width: 100%;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .78);
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.3;
  transition: background var(--t-fast), color var(--t-fast);
}
.nav a:hover,
.nav button.navbtn:hover{
  background: rgba(255, 255, 255, .07);
  color: #fff;
  text-decoration: none;
}
.nav a:focus-visible,
.nav button.navbtn:focus-visible{
  outline: 2px solid rgba(255, 255, 255, .55);
  outline-offset: -2px;
}

.nav .label{
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Ícone do item (agora SVG, sem "caixinha") */
.nav .icon{
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .58);
  background: none;
  transition: color var(--t-fast);
}
.nav a:hover .icon,
.nav button.navbtn:hover .icon{ color: #fff; }

/* Item ativo — barra de acento + fundo da marca */
.nav a.active{
  color: #fff;
  font-weight: 650;
  background: linear-gradient(90deg, rgba(var(--brand-rgb), .34), rgba(var(--brand-rgb), .12) 78%, transparent);
}
.nav a.active::before{
  content: "";
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 22px;
  border-radius: 0 3px 3px 0;
  background: var(--brand);
  box-shadow: 0 0 12px rgba(var(--brand-rgb), .85);
}
.nav a.active .icon{ color: #fff; }

/* Grupo com submenu aberto */
.nav button.navbtn.open{ color: #fff; background: rgba(255, 255, 255, .05); }
.nav button.navbtn.open .icon{ color: #fff; }
.nav button.navbtn.has-active .icon{ color: var(--brand); }

.caret{
  margin-left: auto;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: rgba(255, 255, 255, .42);
  transition: transform var(--t-base), color var(--t-fast);
}
button.navbtn.open .caret{ transform: rotate(180deg); color: rgba(255, 255, 255, .75); }

/* ---- Submenu ---- */
.submenu{
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows var(--t-slow);
}
.submenu > .submenu-inner{
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1px;
  position: relative;
  margin: 2px 0 4px;
  padding-left: 30px;
}
/* guia vertical ligando os subitens */
.submenu > .submenu-inner::before{
  content: "";
  position: absolute;
  left: 20px;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: rgba(255, 255, 255, .13);
}
.submenu.open{ grid-template-rows: 1fr; }

.submenu a{
  padding: 7px 11px;
  border-radius: var(--r-sm);
  font-size: 12.8px;
  font-weight: 500;
  color: rgba(255, 255, 255, .63);
  gap: 8px;
}
.submenu a:hover{ background: rgba(255, 255, 255, .07); color: #fff; }
.submenu a.active{
  color: #fff;
  font-weight: 650;
  background: rgba(var(--brand-rgb), .22);
}
.submenu a.active::before{
  left: -10px;
  width: 2px;
  height: 16px;
  box-shadow: none;
}

/* Fallback p/ navegadores sem animação de grid-template-rows */
@supports not (grid-template-rows: 1fr){
  .submenu{ display: block; max-height: 0; transition: max-height var(--t-slow); }
  .submenu.open{ max-height: 760px; }
}

/* ---- Rodapé da sidebar ---- */
.nav-foot{
  flex: 0 0 auto;
  padding: 10px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  background: rgba(0, 0, 0, .20);
}
.nav-user{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: var(--r-md);
  overflow: hidden;
}
.nav-user .avatar{ flex: 0 0 32px; }
.nav-user-meta{ display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.nav-user-meta strong{
  font-size: 12.8px;
  font-weight: 650;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-user-meta span{
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .45);
  white-space: nowrap;
}
.nav-logout{
  margin-left: auto;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  color: rgba(255, 255, 255, .55);
  transition: background var(--t-fast), color var(--t-fast);
}
.nav-logout:hover{
  background: rgba(var(--brand-rgb), .26);
  color: #fff;
  text-decoration: none;
}

/* Avatar (usado na sidebar e na topbar) */
.avatar{
  width: 32px;
  height: 32px;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), var(--brand-700));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28);
  user-select: none;
}

/* ---- Modo trilha (rail) — desktop ----
   `.collapsed` é aceito como sinônimo de `.rail`: pedidos_compra.php e
   painel_devolucoes.php recolhem a sidebar por JS usando esse nome
   (o do layout antigo). Não renomear sem ajustar essas telas. */
@media (min-width: 1024px){
  .app:has(.sidebar:is(.rail, .collapsed)){ grid-template-columns: var(--sidebar-rail) minmax(0, 1fr); }
  .app{ transition: grid-template-columns var(--t-slow); }

  .sidebar:is(.rail, .collapsed){ width: var(--sidebar-rail); }
  .sidebar:is(.rail, .collapsed) .brand{ padding: 0; justify-content: center; }
  .sidebar:is(.rail, .collapsed) .brand-text,
  .sidebar:is(.rail, .collapsed) .nav-search,
  .sidebar:is(.rail, .collapsed) .nav-section,
  .sidebar:is(.rail, .collapsed) .label,
  .sidebar:is(.rail, .collapsed) .caret,
  .sidebar:is(.rail, .collapsed) .nav-user-meta{ display: none; }
  .sidebar:is(.rail, .collapsed) .nav{ padding: 10px 12px; align-items: center; }
  .sidebar:is(.rail, .collapsed) .nav a,
  .sidebar:is(.rail, .collapsed) .nav button.navbtn{ justify-content: center; padding: 10px 0; width: 48px; }
  .sidebar:is(.rail, .collapsed) .nav a.active::before{ left: -12px; }
  .sidebar:is(.rail, .collapsed) .submenu{ display: none; }
  .sidebar:is(.rail, .collapsed) .nav-user{ justify-content: center; padding: 4px; }
  .sidebar:is(.rail, .collapsed) .nav-logout{ margin: 0; }
  .sidebar:is(.rail, .collapsed) .nav-user .avatar{ display: none; }

  /* Expande ao passar o mouse, sobrepondo o conteúdo */
  .sidebar:is(.rail, .collapsed):hover,
  .sidebar:is(.rail, .collapsed):focus-within{
    width: var(--sidebar-w);
    box-shadow: var(--sh-xl);
  }
  .sidebar:is(.rail, .collapsed):hover .brand,
  .sidebar:is(.rail, .collapsed):focus-within .brand{ padding: 0 16px; justify-content: flex-start; }
  .sidebar:is(.rail, .collapsed):hover .brand-text,
  .sidebar:is(.rail, .collapsed):hover .nav-search,
  .sidebar:is(.rail, .collapsed):hover .nav-section,
  .sidebar:is(.rail, .collapsed):hover .label,
  .sidebar:is(.rail, .collapsed):hover .caret,
  .sidebar:is(.rail, .collapsed):hover .nav-user-meta,
  .sidebar:is(.rail, .collapsed):focus-within .brand-text,
  .sidebar:is(.rail, .collapsed):focus-within .nav-search,
  .sidebar:is(.rail, .collapsed):focus-within .nav-section,
  .sidebar:is(.rail, .collapsed):focus-within .label,
  .sidebar:is(.rail, .collapsed):focus-within .caret,
  .sidebar:is(.rail, .collapsed):focus-within .nav-user-meta{ display: revert; }
  .sidebar:is(.rail, .collapsed):hover .nav-search,
  .sidebar:is(.rail, .collapsed):focus-within .nav-search{ display: block; }
  .sidebar:is(.rail, .collapsed):hover .nav-section,
  .sidebar:is(.rail, .collapsed):focus-within .nav-section{ display: block; }
  .sidebar:is(.rail, .collapsed):hover .label,
  .sidebar:is(.rail, .collapsed):focus-within .label{ display: block; }
  .sidebar:is(.rail, .collapsed):hover .nav-user-meta,
  .sidebar:is(.rail, .collapsed):focus-within .nav-user-meta{ display: flex; }
  .sidebar:is(.rail, .collapsed):hover .submenu,
  .sidebar:is(.rail, .collapsed):focus-within .submenu{ display: grid; }
  .sidebar:is(.rail, .collapsed):hover .nav,
  .sidebar:is(.rail, .collapsed):focus-within .nav{ padding: 8px 10px 14px; align-items: stretch; }
  .sidebar:is(.rail, .collapsed):hover .nav a,
  .sidebar:is(.rail, .collapsed):hover .nav button.navbtn,
  .sidebar:is(.rail, .collapsed):focus-within .nav a,
  .sidebar:is(.rail, .collapsed):focus-within .nav button.navbtn{ justify-content: flex-start; padding: 9px 11px; width: 100%; }
  .sidebar:is(.rail, .collapsed):hover .nav-user,
  .sidebar:is(.rail, .collapsed):focus-within .nav-user{ justify-content: flex-start; padding: 7px 8px; }
  .sidebar:is(.rail, .collapsed):hover .nav-user .avatar,
  .sidebar:is(.rail, .collapsed):focus-within .nav-user .avatar{ display: inline-flex; }
  .sidebar:is(.rail, .collapsed):hover .nav-logout,
  .sidebar:is(.rail, .collapsed):focus-within .nav-logout{ margin-left: auto; }
}

/* ---- Overlay do drawer (mobile) ---- */
.nav-overlay{
  position: fixed;
  inset: 0;
  z-index: 39;
  background: rgba(8, 13, 24, .55);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-base), visibility var(--t-base);
}
.nav-overlay.show{ opacity: 1; visibility: visible; }


/* =========================================================================
   05. TOPBAR
   ========================================================================= */
.topbar{
  position: sticky;
  top: 0;
  z-index: 30;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--topbar-h);
  padding: 0 var(--gutter);
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
}
.topbar.is-stuck{ box-shadow: var(--sh-sm); }

.topbar-left{
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}
.topbar-right{
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

/* Botão de ícone quadrado (usado na topbar e nas telas) */
.btn-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  flex: 0 0 auto;
  font: inherit;
  color: var(--ink-600);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.btn-icon:hover{
  background: var(--ink-100);
  color: var(--text);
  border-color: var(--border);
  transform: none;
  box-shadow: none;
}
.btn-icon:active{ background: var(--ink-200); }

/* Título + breadcrumb */
.page-id{ min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.page-crumb{
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.page-id h1{
  font-size: 16.5px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Chip do usuário */
.user-chip{
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: #fff;
  box-shadow: var(--sh-xs);
}
.user-chip-meta{ display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.user-chip-meta strong{
  font-size: 12.5px;
  font-weight: 650;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-chip-meta span{
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--brand-600);
}


/* =========================================================================
   06. CABEÇALHO DE PÁGINA  (opcional, para telas novas)
   ========================================================================= */
.page-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.page-head-txt h2{ font-size: 19px; }
.page-head-txt p{
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.page-head-actions{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}


/* =========================================================================
   07. COMPONENTES
   ========================================================================= */

/* ---------- Card ---------- */
.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--sh-sm);
  min-width: 0;
}
.card + .card{ margin-top: 16px; }
/* dentro de um grid o espaçamento é do gap — evita margem dupla */
.grid .card + .card,
.sg-grid-2 .card + .card,
.grid-3 .card + .card,
.sg-grid-4 .card + .card{ margin-top: 0; }

.card-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: -18px -18px 16px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.card-head h2, .card-head h3{ font-size: 15.5px; }
.card-head p{ margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.card-head-actions{ display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.card-flush{ padding: 0; overflow: hidden; }
.card-flush .card-head{ margin: 0; border-radius: 0; }
.card-soft{ box-shadow: none; }

/* ---------- Toolbar de filtros ---------- */
.sg-toolbar{
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.sg-toolbar > *{ min-width: 0; }
.sg-toolbar-spacer{ flex: 1 1 auto; }

/* ---------- Botões ---------- */
/* O padrão do .btn é tingido com a marca de propósito: as telas do
   sistema usam `class="btn"` para a ação principal (Filtrar, Buscar,
   Exportar...). Um cinza neutro por padrão tiraria a ênfase de ~170
   botões já existentes. Para o secundário neutro, use .btn-neutral. */
.btn{
  --btn-bg:      var(--brand-50);
  --btn-fg:      var(--brand-700);
  --btn-bd:      var(--brand-100);
  --btn-bg-h:    var(--brand-100);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid var(--btn-bd);
  border-radius: var(--r-md);
  box-shadow: var(--sh-xs);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--t-fast), border-color var(--t-fast),
              color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover{
  background: var(--btn-bg-h);
  color: var(--btn-fg);
  text-decoration: none;
  box-shadow: var(--sh-sm);
}
.btn:active{ transform: translateY(1px); box-shadow: none; }
.btn:disabled, .btn.is-disabled{
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn .ico{ width: 16px; height: 16px; }

/* Variantes */
.btn-primary,
.btn.btn-primary{
  --btn-bg:   var(--brand);
  --btn-fg:   #fff;
  --btn-bd:   var(--brand-600);
  --btn-bg-h: var(--brand-600);
  box-shadow: 0 1px 2px rgba(var(--brand-rgb), .28);
}
.btn-primary:hover{ box-shadow: 0 4px 12px rgba(var(--brand-rgb), .28); }

/* Secundário neutro */
.btn-neutral{
  --btn-bg:   #fff;
  --btn-fg:   var(--ink-700);
  --btn-bd:   var(--border-strong);
  --btn-bg-h: var(--ink-50);
}

.btn-ghost{
  --btn-bg:   transparent;
  --btn-bd:   transparent;
  --btn-fg:   var(--ink-600);
  --btn-bg-h: var(--ink-100);
  box-shadow: none;
}
.btn-ghost:hover{ box-shadow: none; }

/* alias explícito do padrão */
.btn-brand-soft{
  --btn-bg:   var(--brand-50);
  --btn-fg:   var(--brand-700);
  --btn-bd:   var(--brand-100);
  --btn-bg-h: var(--brand-100);
}
.btn-ok{      --btn-bg: var(--ok);     --btn-fg:#fff; --btn-bd:#0C8B58; --btn-bg-h:#0C8B58; }
.btn-danger{  --btn-bg: var(--danger); --btn-fg:#fff; --btn-bd:#B82C25; --btn-bg-h:#B82C25; }
.btn-warn{    --btn-bg: var(--warn);   --btn-fg:#fff; --btn-bd:#9A4708; --btn-bg-h:#9A4708; }
.btn-dark{    --btn-bg: var(--ink-800);--btn-fg:#fff; --btn-bd: var(--ink-800); --btn-bg-h: var(--ink-700); }

/* Tamanhos */
.btn-sm{ min-height: 32px; padding: 0 10px; font-size: 12.5px; gap: 6px; }
.btn-sm .ico{ width: 14px; height: 14px; }
.btn-lg{ min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn-block{ width: 100%; }

/* Botão primário "solto" do login — mantém compatibilidade */
button.btn-primary:not(.btn){
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 0 18px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 650;
  color: #fff;
  background: var(--brand);
  border: 1px solid var(--brand-600);
  border-radius: var(--r-md);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(var(--brand-rgb), .26);
  transition: background var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
  text-decoration: none;
}
button.btn-primary:not(.btn):hover{
  background: var(--brand-600);
  box-shadow: 0 6px 18px rgba(var(--brand-rgb), .30);
}
button.btn-primary:not(.btn):active{ transform: translateY(1px); }

a.btn-primary:not(.btn){
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 650;
  color: #fff;
  background: var(--brand);
  border: 1px solid var(--brand-600);
  border-radius: var(--r-md);
  text-decoration: none;
}
a.btn-primary:not(.btn):hover{ background: var(--brand-600); color: #fff; text-decoration: none; }

/* ---------- Formulários ---------- */
.input,
.select,
.textarea{
  width: auto;
  max-width: 100%;
  min-width: 200px;
  min-height: 38px;
  padding: 8px 11px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  box-shadow: var(--sh-xs);
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  appearance: none;
}
textarea.input, .textarea{ min-height: 88px; line-height: 1.5; resize: vertical; }

.input::placeholder{ color: var(--ink-400); }

.input:hover:not(:disabled):not([readonly]){ border-color: var(--ink-400); }

.input:focus,
.input:focus-visible{
  border-color: var(--brand);
  box-shadow: var(--ring);
  outline: none;
}

.input:disabled,
.input[readonly],
.readonly{
  color: var(--ink-500);
  background: var(--ink-100);
  border-color: var(--border);
  cursor: not-allowed;
  box-shadow: none;
}

/* Seta do select */
select.input,
select.select{
  padding-right: 32px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 16px;
}
select.input[multiple]{ background-image: none; padding-right: 11px; }

input[type="checkbox"],
input[type="radio"]{
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
  cursor: pointer;
  vertical-align: -2px;
}

input[type="date"].input,
input[type="month"].input,
input[type="time"].input{ min-width: 150px; }

/* Campo rotulado */
.field{
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin-bottom: 14px;
}
.field label{
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink-700);
}
.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea{
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field input:focus,
.field select:focus,
.field textarea:focus{
  border-color: var(--brand);
  box-shadow: var(--ring);
}
.field-hint{ font-size: 11.5px; color: var(--muted); }

/* Rótulos soltos que as telas usam acima dos filtros */
label{ font-size: 12.5px; }

/* ---------- Tabelas ---------- */
/* O .sg-tscroll é inserido automaticamente pelo app.js em volta das
   tabelas soltas. A rolagem horizontal só é ativada abaixo de 1024px:
   no desktop o wrapper fica "transparente", para não recortar menus
   e popovers posicionados dentro das células. */
.sg-tscroll{
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-radius: var(--r-md);
}
@media (max-width: 1023px){
  .sg-tscroll{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }
  /* Se o DataTables criou o wrapper dele dentro, ele cuida da rolagem */
  .sg-tscroll:has(> .dataTables_wrapper){ overflow: visible; }
}

.table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.2px;
  color: var(--text);
}

.table thead th{
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-500);
  text-align: left;
  white-space: nowrap;
  background: var(--ink-50);
  border-bottom: 1px solid var(--border-strong);
}
.table thead th:first-child{ border-top-left-radius: var(--r-sm); }
.table thead th:last-child{ border-top-right-radius: var(--r-sm); }

.table tbody td{
  padding: 10px 12px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tbody tr:last-child td{ border-bottom: 0; }
.table tbody tr{ transition: background var(--t-fast); }
.table tbody tr:hover{ background: var(--brand-50); }

.table tfoot td, .table tfoot th{
  padding: 10px 12px;
  font-weight: 700;
  background: var(--ink-50);
  border-top: 1px solid var(--border-strong);
  white-space: nowrap;
}

/* Variantes utilitárias */
.table-zebra tbody tr:nth-child(even){ background: var(--surface-2); }
.table-zebra tbody tr:hover{ background: var(--brand-50); }
.table-compact thead th,
.table-compact tbody td{ padding: 6px 9px; font-size: 12.5px; }
.sg-cell-wrap tbody td{ white-space: normal; }

/* Números alinhados à direita */
.table .sg-num, .table .text-right{ text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Badges / pills ---------- */
.sg-badge{
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.6;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--ink-100);
  color: var(--ink-700);
  white-space: nowrap;
}
.sg-badge-ok{     background: var(--ok-bg);     border-color: var(--ok-border);     color: #0A7A4D; }
.sg-badge-warn{   background: var(--warn-bg);   border-color: var(--warn-border);   color: var(--warn); }
.sg-badge-danger{ background: var(--danger-bg); border-color: var(--danger-border); color: #A82A23; }
.sg-badge-info{   background: var(--info-bg);   border-color: var(--info-border);   color: #175FB3; }
.sg-badge-brand{  background: var(--brand-50);  border-color: var(--brand-100);     color: var(--brand-700); }

.pill{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink-700);
  white-space: nowrap;
}

.sg-dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 8px;
  background: var(--ink-400);
}
.sg-dot-ok{ background: var(--ok); }
.sg-dot-warn{ background: var(--warn); }
.sg-dot-danger{ background: var(--danger); }

/* ---------- KPI ---------- */
.kpi{
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.kpi small{
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.kpi strong{
  font-size: 24px;
  font-weight: 680;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--text);
}
.kpi-delta{ font-size: 12px; font-weight: 650; }
.kpi-up{ color: var(--ok); }
.kpi-down{ color: var(--danger); }

/* ---------- Alertas ---------- */
.alert{
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 550;
  border-radius: var(--r-md);
  border: 1px solid var(--danger-border);
  background: var(--danger-bg);
  color: #8E211B;
}
.alert .ico{ margin-top: 1px; color: var(--danger); }
.alert-ok{     border-color: var(--ok-border);   background: var(--ok-bg);   color: #0A6B45; }
.alert-ok .ico{ color: var(--ok); }
.alert-warn{   border-color: var(--warn-border); background: var(--warn-bg); color: #8A4309; }
.alert-warn .ico{ color: var(--warn); }
.alert-info{   border-color: var(--info-border); background: var(--info-bg); color: #14508F; }
.alert-info .ico{ color: var(--info); }

/* ---------- Estado vazio ---------- */
.sg-empty{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}
.sg-empty .ico{ width: 34px; height: 34px; color: var(--ink-300); stroke-width: 1.4; }
.sg-empty strong{ font-size: 14.5px; color: var(--ink-700); }
.sg-empty p{ font-size: 13px; max-width: 44ch; }

/* ---------- Divisor com rótulo ---------- */
.sg-section-label{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-400);
}
.sg-section-label::after{
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--border);
}


/* =========================================================================
   08. GRID E COMPATIBILIDADE
   ========================================================================= */
.grid{
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}
.col-1 { grid-column: span 1; }
.col-2 { grid-column: span 2; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-10{ grid-column: span 10; }
.col-11{ grid-column: span 11; }
.col-12{ grid-column: span 12; }
.grid > *{ min-width: 0; }

.grid-3{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  min-width: 0;
}
.sg-grid-2{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}
.sg-grid-4{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}
.grid-3 > *, .sg-grid-2 > *, .sg-grid-4 > *{ min-width: 0; }

.top-controls{
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

/* ---- Gráficos (classes legadas usadas pelas telas) ---- */
.chart-wrap{
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  flex-wrap: wrap;
  min-width: 0;
}
.chart-canvas{
  width: 220px;
  height: 220px;
  flex: 0 0 220px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chart-box{ flex: 1 1 240px; min-width: 0; }
.chart-info{
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.chart-info .muted{ margin-top: 6px; color: var(--muted); }
.chart-legend{
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  max-height: 110px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.3;
}
.chart-legend ul{ list-style: none; padding: 0; margin: 0; }
.chart-legend li{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--ink-100);
}
.chart-legend li:last-child{ border-bottom: none; }
.legend-box{
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex: 0 0 10px;
}

/* ---- Utilitários ---- */
.muted{ color: var(--muted); }
.text-right{ text-align: right; }
.text-center{ text-align: center; }
.nowrap{ white-space: nowrap; }
.mono{ font-variant-numeric: tabular-nums; }
.hide{ display: none !important; }
.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;
}
.sg-stack{ display: flex; flex-direction: column; gap: 16px; }
.sg-row{ display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sg-row-end{ justify-content: flex-end; }
.sg-row-between{ justify-content: space-between; }
.sg-spacer{ flex: 1 1 auto; }


/* =========================================================================
   09. OVERRIDES DE TERCEIROS
   ========================================================================= */

/* ---------- DataTables ---------- */
.dataTables_wrapper{
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto;
  font-size: 13px;
}
.dataTables_wrapper .dataTables_scroll,
.dataTables_wrapper .dataTables_scrollHead,
.dataTables_wrapper .dataTables_scrollBody{ width: 100% !important; }
.dataTables_wrapper table.dataTable{
  width: 100% !important;
  max-width: none !important;
  border-collapse: separate !important;
  border-spacing: 0;
  margin: 10px 0 !important;
}
table.dataTable{ width: 100% !important; max-width: 100%; }

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate{
  font-size: 12.5px;
  color: var(--ink-600);
  padding: 4px 0;
}
.dataTables_wrapper .dataTables_filter{ text-align: right; }
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select{
  min-height: 34px;
  margin-left: 6px;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus{
  border-color: var(--brand);
  box-shadow: var(--ring);
}

.dataTables_wrapper .dataTables_paginate .paginate_button{
  min-width: 32px;
  margin: 0 2px !important;
  padding: 5px 10px !important;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-600) !important;
  background: #fff !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--r-sm) !important;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover{
  background: var(--ink-100) !important;
  border-color: var(--border-strong) !important;
  color: var(--text) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover{
  color: #fff !important;
  background: var(--brand) !important;
  border-color: var(--brand-600) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover{
  opacity: .45;
  cursor: default;
  background: #fff !important;
  border-color: var(--border) !important;
  color: var(--ink-400) !important;
}

table.dataTable thead th{
  position: relative;
  padding: 10px 12px !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-500) !important;
  background: var(--ink-50);
  border-bottom: 1px solid var(--border-strong) !important;
}
table.dataTable tbody td{
  padding: 9px 12px !important;
  border-bottom: 1px solid var(--border);
}

/* Zebra e hover do DataTables.
   -------------------------------------------------------------------
   REGRA IMPORTANTE: pintar SEMPRE no <tr>, nunca no <td>, e sem
   !important. O fundo do <td> é desenhado por cima do fundo do <tr>,
   então um background em td anula o destaque de linha que as telas
   aplicam na <tr> — por exemplo pedidos_compra.php, que usa
   `#dataTable tbody tr.row-selected{background:#D9838C}` para a linha
   selecionada e o mesmo tom no hover. Com background no td, a linha
   selecionada perdia o vermelho em metade dos casos (dependia da
   paridade .odd/.even do zebra).

   O `.content` à frente serve só para somar especificidade suficiente
   para vencer o CSS padrão do DataTables (que é carregado depois, via
   CDN, no corpo da página) — sem chegar perto das regras das telas,
   que usam #id e continuam ganhando. */
.content table.dataTable tbody tr:hover{ background: var(--brand-50); }
.content table.dataTable.stripe tbody tr.odd,
.content table.dataTable.display tbody tr.odd{ background: var(--surface-2); }

table.dataTable.no-footer{ border-bottom: 1px solid var(--border) !important; }

/* ---------- Canvas de gráfico (Chart.js) ---------- */
canvas{ max-width: 100%; }


/* =========================================================================
   10. LOGIN / TELAS DE ACESSO
   ========================================================================= */
.login-wrap{
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 18px;
  background:
    radial-gradient(1000px 600px at 12% 8%,  rgba(var(--brand-rgb), .13), transparent 58%),
    radial-gradient(900px 560px at 92% 96%, rgba(29, 111, 208, .10), transparent 60%),
    linear-gradient(168deg, #EEF1F7 0%, #F5F7FB 100%);
}

.login-card{
  width: min(1000px, 100%);
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: var(--sh-xl);
}

.login-left{
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 38px 36px;
  color: #fff;
  background:
    radial-gradient(720px 420px at -120px -100px, rgba(var(--brand-rgb), .48), transparent 62%),
    linear-gradient(165deg, var(--ink-950) 0%, var(--ink-900) 52%, var(--ink-850) 100%);
  overflow: hidden;
}
/* trama sutil de fundo */
.login-left::after{
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 34px 34px;
  pointer-events: none;
}

.login-brand{
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 13px;
}
.login-brand img{
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  padding: 5px;
  background: #fff;
  border-radius: var(--r-md);
  object-fit: contain;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .30);
}
.login-brand strong{
  display: block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .07em;
  color: #fff;
}
.login-brand span{
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .58);
}

.login-left h1{
  position: relative;
  z-index: 1;
  margin: 34px 0 10px;
  font-size: 30px;
  font-weight: 680;
  letter-spacing: -.02em;
  color: #fff;
}
.login-left p{
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 42ch;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .62);
}

.login-badges{
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 30px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.login-badges .pill{
  gap: 7px;
  padding: 8px 13px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, .84);
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .13);
  backdrop-filter: blur(4px);
}
.login-badges .pill .ico{ width: 14px; height: 14px; color: var(--brand); }

.login-right{
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 38px 36px;
  background: #fff;
}
.form-title{
  margin: 0 0 5px;
  font-size: 21px;
  font-weight: 680;
  letter-spacing: -.015em;
}
.form-subtitle{
  margin: 0 0 24px;
  font-size: 13.5px;
  color: var(--muted);
}
.login-right .field{ margin-bottom: 16px; }

.small-link{
  display: flex;
  justify-content: center;
  margin-top: 18px;
  font-size: 12px;
  text-align: center;
  color: var(--muted);
}

.login-foot{
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  letter-spacing: .03em;
  text-align: center;
  color: var(--ink-400);
}

/* Tela "sem permissão" */
.gate{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}
.gate-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: var(--r-pill);
  color: var(--warn);
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
}
.gate-icon .ico{ width: 26px; height: 26px; }
.gate p{ font-size: 13.5px; color: var(--text-2); max-width: 40ch; }


/* =========================================================================
   11. RESPONSIVO
   ========================================================================= */

/* ---- Notebooks pequenos ---- */
@media (max-width: 1400px){
  .sg-grid-4{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1280px){
  :root{ --gutter: 18px; }
  .grid-3{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .col-4{ grid-column: span 6; }
}

/* ---- Tablet: sidebar vira drawer ---- */
@media (max-width: 1023px){
  .app{ grid-template-columns: minmax(0, 1fr); }

  .sidebar{
    position: fixed;
    top: 0;
    left: 0;
    z-index: 60;
    width: min(300px, 86vw);
    height: 100vh;
    height: 100dvh;
    transform: translateX(-102%);
    box-shadow: none;
  }
  .sidebar.open{
    transform: translateX(0);
    box-shadow: var(--sh-xl);
  }
  /* no mobile o rail não se aplica */
  .sidebar:is(.rail, .collapsed){ width: min(300px, 86vw); }
  .sidebar:is(.rail, .collapsed) .brand-text,
  .sidebar:is(.rail, .collapsed) .nav-search,
  .sidebar:is(.rail, .collapsed) .nav-section,
  .sidebar:is(.rail, .collapsed) .label,
  .sidebar:is(.rail, .collapsed) .caret,
  .sidebar:is(.rail, .collapsed) .nav-user-meta{ display: revert; }
  .sidebar:is(.rail, .collapsed) .nav-search{ display: block; }
  .sidebar:is(.rail, .collapsed) .submenu{ display: grid; }

  .nav-close{ display: inline-flex; }
  .brand{ padding-right: 56px; }

  .topbar{ padding: 0 14px; }
  .sg-grid-2, .grid-3, .sg-grid-4{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .col-6{ grid-column: span 12; }

  /* impede que o drawer aberto deixe a página rolar atrás */
  body.nav-open{ overflow: hidden; }
}

/* ---- Celular ---- */
@media (max-width: 767px){
  :root{
    --gutter: 13px;
    --topbar-h: 56px;
  }

  body{ font-size: 14px; }

  .content{
    padding: 13px;
    padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  }

  .topbar{ gap: 8px; }
  .page-id h1{ font-size: 15px; }
  .page-crumb{ font-size: 10px; }

  /* o chip completo do usuário sai; fica só o avatar */
  .user-chip{ padding: 0; border: 0; background: transparent; box-shadow: none; }
  .user-chip-meta{ display: none; }

  .card{
    padding: 14px;
    border-radius: var(--r-md);
  }
  .card-head{
    margin: -14px -14px 13px;
    padding: 12px 14px;
    border-radius: var(--r-md) var(--r-md) 0 0;
  }

  h1{ font-size: 19px; }
  h2{ font-size: 16.5px; }

  .kpi strong{ font-size: 20px; }
  .kpi small{ font-size: 10.5px; letter-spacing: .03em; }
  .kpi-delta{ font-size: 11.5px; }

  /* Blocos largos (col-4 pra cima) ficam de linha inteira, como antes.
     Tiles pequenos (col-1..3, típicos de KPI) ficam 2 por linha para
     não virar uma coluna infinita de rolagem. */
  .grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .col-1, .col-2, .col-3{ grid-column: span 1; }
  .col-4, .col-5, .col-6, .col-7, .col-8,
  .col-9, .col-10, .col-11, .col-12{ grid-column: span 2; }

  .sg-grid-2, .grid-3{ grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .sg-grid-4{ grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

  .page-head{ margin-bottom: 13px; }
  .page-head-actions, .top-controls{ width: 100%; justify-content: flex-start; }

  /* Filtros: campos ocupam a linha inteira e ficam confortáveis no toque */
  .sg-toolbar{ gap: 8px; }
  .sg-toolbar > *{ flex: 1 1 100%; }
  .input, .select, .textarea{
    width: 100%;
    min-width: 0;
    min-height: 42px;
    font-size: 15px;  /* >=16px evita zoom no iOS; 15px + viewport já resolve */
  }
  input[type="date"].input,
  input[type="month"].input,
  input[type="time"].input{ min-width: 0; }

  .btn{ min-height: 42px; }
  .btn-sm{ min-height: 36px; }
  /* botões da toolbar dividem a linha em vez de virar uma pilha */
  .sg-toolbar > .btn,
  .sg-toolbar > button{ flex: 1 1 130px; }
  .sg-toolbar-spacer{ display: none; }

  /* Tabelas: rolagem horizontal com pista visível */
  .sg-tscroll{
    margin: 0 -14px;
    padding: 0 14px;
    scroll-padding-left: 14px;
  }
  .table{ font-size: 12.6px; }
  .table thead th{ padding: 8px 10px; font-size: 10px; }
  .table tbody td{ padding: 8px 10px; }

  .chart-canvas{ width: 180px; height: 180px; flex-basis: 180px; }

  .dataTables_wrapper .dataTables_filter,
  .dataTables_wrapper .dataTables_length{ text-align: left; float: none !important; width: 100%; }
  .dataTables_wrapper .dataTables_filter input{ width: 100%; margin: 6px 0 0; }
  .dataTables_wrapper .dataTables_paginate{ float: none !important; text-align: center; padding-top: 10px; }
  .dataTables_wrapper .dataTables_info{ float: none !important; text-align: center; }

  /* Login empilhado — painel escuro fica compacto no topo */
  .login-wrap{ padding: 0; place-items: stretch; }
  .login-card{
    grid-template-columns: minmax(0, 1fr);
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .login-left{ padding: 26px 22px 24px; }
  .login-left h1{ margin: 20px 0 8px; font-size: 24px; }
  .login-left p{ font-size: 13.5px; }
  .login-badges{ margin-top: 20px; padding-top: 0; }
  .login-right{ padding: 26px 22px 34px; }
  .form-title{ font-size: 19px; }
}

@media (max-width: 420px){
  .kpi strong{ font-size: 18px; }
  .login-brand img{ width: 46px; height: 46px; flex-basis: 46px; }
  .login-left h1{ font-size: 21px; }
  .login-badges .pill{ padding: 7px 11px; font-size: 11.5px; }
}

/* Telas largas: respiro maior sem esticar demais o conteúdo */
@media (min-width: 1700px){
  :root{ --gutter: 28px; }
}


/* =========================================================================
   12. ACESSIBILIDADE / IMPRESSÃO
   ========================================================================= */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print{
  .sidebar,
  .topbar,
  .nav-overlay,
  .page-head-actions,
  .top-controls,
  .btn,
  .dataTables_filter,
  .dataTables_length,
  .dataTables_paginate{ display: none !important; }

  .app{ display: block; }
  .content{ padding: 0; }
  body{ background: #fff; font-size: 11px; }
  .card{
    border: 1px solid #CCC;
    border-radius: 0;
    box-shadow: none;
    padding: 8px;
    break-inside: avoid;
  }
  .card-head{ background: #fff; }
  .table{ font-size: 10px; }
  .table thead th{ background: #F0F0F0; color: #000; }
  a{ color: #000; text-decoration: none; }
}


/* =========================================================================
   13. MODO ESCURO
   -------------------------------------------------------------------------
   O tema é escolhido pelo botão da topbar e gravado no navegador
   (js/theme.js põe data-theme no <html> antes da primeira pintura).
   Aqui só mudam cores: nenhuma medida, espaçamento ou grid.

   Os componentes deste arquivo seguem os tokens. As cores fixas das
   telas (nos <style> e style="" delas) são adaptadas pelo theme.js.

   A escala --ink-850/900/950 NÃO inverte: é o fundo da sidebar e do
   painel do login, que já são escuros nos dois temas.
   ========================================================================= */
html[data-theme="dark"]{
  --brand-600:      #D9485A;
  --brand-700:      #F28B98;
  --brand-dark:     #F28B98;
  --brand-100:      #4A1F28;
  --brand-50:       #2A161D;

  --ink-800:        #2A3447;
  --ink-700:        #C8CFDB;
  --ink-600:        #A9B3C3;
  --ink-500:        #8D98AA;
  --ink-400:        #6E7A8F;
  --ink-300:        #3C475B;
  --ink-200:        #2B3446;
  --ink-100:        #212938;
  --ink-50:         #1A2130;

  --ok:             #22B07A;
  --ok-bg:          #0F2A21;
  --ok-border:      #1E5A43;
  --warn:           #E3A04B;
  --warn-bg:        #2D2211;
  --warn-border:    #6A4A18;
  --danger:         #EC5B53;
  --danger-bg:      #2F1719;
  --danger-border:  #6B2B2C;
  --info:           #5E9EEB;
  --info-bg:        #122338;
  --info-border:    #29476E;

  --canvas:         #0E121A;
  --card:           #141924;   /* = branco das telas adaptado (theme.js) */
  --surface-2:      #181E2B;
  --text:           #E6EAF1;
  --text-2:         #A9B3C3;
  --muted:          #8D98AA;
  --border:         #252D3C;
  --border-strong:  #323C4F;

  --sh-xs: 0 1px 2px rgba(0, 0, 0, .30);
  --sh-sm: 0 1px 3px rgba(0, 0, 0, .35), 0 1px 2px rgba(0, 0, 0, .25);
  --sh-md: 0 4px 12px rgba(0, 0, 0, .35), 0 1px 3px rgba(0, 0, 0, .25);
  --sh-lg: 0 12px 32px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .25);
  --sh-xl: 0 24px 60px rgba(0, 0, 0, .60);

  --ring: 0 0 0 3px rgba(var(--brand-rgb), .35);

  color-scheme: dark;
  scrollbar-color: var(--ink-300) transparent;
}

/* ---- Botão de tema (topbar) ----
   Mostra o destino: lua no claro, sol no escuro. */
.theme-toggle .ico-sun{ display: none; }
html[data-theme="dark"] .theme-toggle .ico-sun{ display: block; }
html[data-theme="dark"] .theme-toggle .ico-moon{ display: none; }

/* ---- Shell ---- */
html[data-theme="dark"] .topbar{ background: rgba(20, 25, 36, .86); }
html[data-theme="dark"] .user-chip,
html[data-theme="dark"] .pill{ background: var(--card); }

/* ---- Botões ---- */
html[data-theme="dark"] .btn-neutral{ --btn-bg: var(--surface-2); --btn-bg-h: var(--ink-100); }
html[data-theme="dark"] .btn-dark{ --btn-bg-h: #36425A; }

/* ---- Formulários ---- */
/* Campo sem fundo definido pela tela: no esquema escuro o navegador pinta
   um cinza neutro (#3B3B3B) que destoa. Especificidade zero (:where) —
   qualquer regra da tela continua ganhando. */
:where(html[data-theme="dark"]) :where(textarea, select,
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"])
       :not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="file"]):not([type="image"])){
  background-color: #10151F;
  color: var(--text);
}
html[data-theme="dark"] .input,
html[data-theme="dark"] .select,
html[data-theme="dark"] .textarea,
html[data-theme="dark"] .field input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea{ background-color: #10151F; }
html[data-theme="dark"] .input:disabled,
html[data-theme="dark"] .input[readonly],
html[data-theme="dark"] .readonly{ background-color: var(--ink-100); }
html[data-theme="dark"] select.input,
html[data-theme="dark"] select.select{
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238D98AA' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  /* O ".field select { background: #fff }" zera repeat/posição: sem isto a
     seta se repete no campo inteiro (zigue-zague) no escuro (24/09/2026). */
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 16px;
}
html[data-theme="dark"] select.input[multiple]{ background-image: none; }

/* ---- Badges e alertas (texto com cor fixa no claro) ---- */
html[data-theme="dark"] .sg-badge-ok{ color: #5FD3A2; }
html[data-theme="dark"] .sg-badge-danger{ color: #F4908A; }
html[data-theme="dark"] .sg-badge-info{ color: #8DBBF2; }
html[data-theme="dark"] .alert{ color: #F4A19C; }
html[data-theme="dark"] .alert-ok{ color: #6DD6A8; }
html[data-theme="dark"] .alert-warn{ color: #EDBB76; }
html[data-theme="dark"] .alert-info{ color: #93BFF3; }

/* ---- DataTables ----
   O CSS do DataTables vem do CDN, depois do app.css, com #333 e #fff
   fixos: aqui a especificidade é maior para vencer no escuro. */
html[data-theme="dark"] .dataTables_wrapper .dataTables_length,
html[data-theme="dark"] .dataTables_wrapper .dataTables_filter,
html[data-theme="dark"] .dataTables_wrapper .dataTables_info,
html[data-theme="dark"] .dataTables_wrapper .dataTables_processing,
html[data-theme="dark"] .dataTables_wrapper .dataTables_paginate{ color: var(--ink-600) !important; }
html[data-theme="dark"] .dataTables_wrapper .dataTables_filter input,
html[data-theme="dark"] .dataTables_wrapper .dataTables_length select{
  color: var(--text);
  background-color: #10151F;
  border-color: var(--border-strong);
}
html[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button,
html[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
html[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover{
  color: var(--ink-600) !important;
  background: var(--surface-2) !important;
  border-color: var(--border) !important;
}
html[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button:hover{
  color: var(--text) !important;
  background: var(--ink-100) !important;
  border-color: var(--border-strong) !important;
}
html[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.current,
html[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover{
  color: #fff !important;
  background: var(--brand) !important;
  border-color: var(--brand-600) !important;
}
html[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .ellipsis{ color: var(--ink-500); }
html[data-theme="dark"] table.dataTable thead th,
html[data-theme="dark"] table.dataTable thead td,
html[data-theme="dark"] table.dataTable tfoot th,
html[data-theme="dark"] table.dataTable tfoot td{ border-color: var(--border-strong); }
html[data-theme="dark"] table.dataTable > tbody > tr > *{ border-color: var(--border); }
/* a coluna ordenada e o hover do DataTables escurecem com preto
   translúcido — no fundo escuro isso some; clareia de leve */
html[data-theme="dark"] table.dataTable.display > tbody > tr > .sorting_1,
html[data-theme="dark"] table.dataTable.order-column.stripe > tbody > tr > .sorting_1{
  box-shadow: inset 0 0 0 9999px rgba(255, 255, 255, .025);
}
html[data-theme="dark"] table.dataTable.hover > tbody > tr:hover > *,
html[data-theme="dark"] table.dataTable.display > tbody > tr:hover > *{
  box-shadow: inset 0 0 0 9999px rgba(255, 255, 255, .04);
}

/* ---- Leaflet (mapa) ----
   Os blocos do mapa continuam claros; só o que é interface acompanha. */
html[data-theme="dark"] .leaflet-popup-content-wrapper,
html[data-theme="dark"] .leaflet-popup-tip,
html[data-theme="dark"] .leaflet-tooltip{
  color: var(--text);
  background: var(--card);
  border-color: var(--border-strong);
}
html[data-theme="dark"] .leaflet-tooltip-top::before{ border-top-color: var(--card); }
html[data-theme="dark"] .leaflet-tooltip-bottom::before{ border-bottom-color: var(--card); }
html[data-theme="dark"] .leaflet-tooltip-left::before{ border-left-color: var(--card); }
html[data-theme="dark"] .leaflet-tooltip-right::before{ border-right-color: var(--card); }
html[data-theme="dark"] .leaflet-bar a,
html[data-theme="dark"] .leaflet-bar a:hover{
  color: var(--text);
  background-color: var(--card);
  border-bottom-color: var(--border);
}
html[data-theme="dark"] .leaflet-container a.leaflet-popup-close-button{ color: var(--ink-500); }

/* ---- Login / telas de acesso ---- */
html[data-theme="dark"] .login-wrap{
  background:
    radial-gradient(1000px 600px at 12% 8%,  rgba(var(--brand-rgb), .16), transparent 58%),
    radial-gradient(900px 560px at 92% 96%, rgba(29, 111, 208, .10), transparent 60%),
    linear-gradient(168deg, #0B0F17 0%, #111621 100%);
}
html[data-theme="dark"] .login-card{ background: var(--card); border-color: rgba(255, 255, 255, .06); }
html[data-theme="dark"] .login-right{ background: var(--card); }
