:root{
  --bg: 12 16% 6%;
  --panel: 215 28% 12%;
  --panel2: 215 25% 10%;
  --text: 210 40% 96%;
  --muted: 215 20% 70%;
  --muted2: 215 16% 55%;
  --border: 215 22% 22%;
  --shadow: 0 0% 0%;

  --blue: 210 100% 62%;
  --green: 150 70% 44%;
  --orange: 28 95% 60%;

  --ring: 210 100% 62%;
  --radius: 16px;
}

/* Light theme */
[data-theme="light"]{
  --bg: 210 20% 98%;
  --panel: 0 0% 100%;
  --panel2: 210 20% 96%;
  --text: 215 25% 15%;
  --muted: 215 15% 40%;
  --muted2: 215 12% 50%;
  --border: 215 20% 88%;
  --shadow: 215 20% 20%;
}

/* Barras de rolagem — padrão em todo o app (Firefox + WebKit; herda cores do tema) */
html {
  scrollbar-gutter: stable;
}
* {
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--muted2) / 0.7) hsl(var(--panel2) / 0.55);
}
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-track {
  background: hsl(var(--panel2) / 0.45);
  border-radius: 100px;
  margin: 4px;
}
*::-webkit-scrollbar-thumb {
  background: hsl(var(--muted2) / 0.55);
  border-radius: 100px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--muted) / 0.65);
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:active {
  background: hsl(var(--blue) / 0.55);
}

[data-theme="light"] body{
  background:
    radial-gradient(1000px 400px at 20% -10%, hsl(var(--blue)/0.12), transparent 60%),
    radial-gradient(900px 360px at 80% 0%, hsl(var(--orange)/0.08), transparent 60%),
    radial-gradient(900px 360px at 60% 110%, hsl(var(--green)/0.08), transparent 60%),
    hsl(var(--bg));
}
[data-theme="light"] .topbar{
  background: hsl(var(--bg) / 0.9);
}
[data-theme="light"] .userDropdownItemBtn:hover{
  background: hsl(var(--panel2));
  border-color: hsl(var(--border));
}
[data-theme="light"] .productSearchDropdown,
[data-theme="light"] .supplierSearchDropdown,
[data-theme="light"] .dropdownSearchPanel,
[data-theme="light"] .inputInfoIcon[data-tooltip]::after{
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
[data-theme="light"] .btnDanger{
  background: hsl(0 75% 97%);
  border-color: hsl(0 65% 85%);
  color: hsl(0 65% 35%);
}
[data-theme="light"] .btnDanger:hover{
  background: hsl(0 75% 92%);
  border-color: hsl(0 65% 70%);
  color: hsl(0 65% 25%);
}
[data-theme="light"] .btnExcel{
  background: linear-gradient(135deg, hsl(142 50% 40%), hsl(142 50% 35%));
  border-color: hsl(142 45% 50%);
  color: #fff;
}
[data-theme="light"] .btnExcel:hover{ background: linear-gradient(135deg, hsl(142 50% 45%), hsl(142 50% 40%)); border-color: hsl(142 45% 55%); color: #fff; }
[data-theme="light"] .btnPdf{
  background: linear-gradient(135deg, hsl(0 70% 48%), hsl(0 70% 42%));
  border-color: hsl(0 65% 55%);
  color: #fff;
}
[data-theme="light"] .btnPdf:hover{ background: linear-gradient(135deg, hsl(0 70% 54%), hsl(0 70% 48%)); border-color: hsl(0 65% 60%); color: #fff; }
.dashboardOverdueRow{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: hsl(0 60% 20% / 0.3);
  border-radius: 12px;
  border-left: 4px solid hsl(0 70% 50%);
}
.dashboardOverdueRow strong{ color: hsl(0 70% 60%); }
[data-theme="light"] .dashboardOverdueRow{
  background: hsl(0 75% 97%);
  border-left-color: hsl(0 65% 75%);
}
[data-theme="light"] .dashboardOverdueRow strong{ color: hsl(0 65% 35%); }

.dashboardCancelledRow{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: hsl(0 60% 20% / 0.25);
  border-radius: 12px;
  border-left: 4px solid hsl(0 70% 50%);
  margin-top: 8px;
}
.dashboardCancelledRow strong{ color: hsl(0 70% 60%); }
[data-theme="light"] .dashboardCancelledRow{
  background: hsl(0 75% 97%);
  border-left-color: hsl(0 65% 75%);
}
[data-theme="light"] .dashboardCancelledRow strong{ color: hsl(0 65% 35%); }

.tableRowOverdue{ background: hsl(0 60% 20% / 0.25); }
.tableRowOverdue td:first-child{ border-left: 4px solid hsl(0 70% 50%); }
.tableRowOverdue td{ color: hsl(var(--text)); }
[data-theme="light"] .tableRowOverdue{ background: hsl(0 75% 97%); }
[data-theme="light"] .tableRowOverdue td:first-child{ border-left-color: hsl(0 65% 75%); }

/* Produto em promoção na listagem de mercadorias */
.productThumbBtn:hover img{ opacity: 0.85; }
.productThumbBtn:focus{ outline: 2px solid hsl(var(--blue)); outline-offset: 2px; }

.productPromoRow{
  background: hsl(28 95% 60% / 0.08);
  border-left: 4px solid hsl(var(--orange));
}
[data-theme="light"] .productPromoRow{
  background: hsl(28 95% 97%);
  border-left-color: hsl(var(--orange));
}
.productPromoBadge{
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 6px;
  background: hsl(var(--orange) / 0.2);
  color: hsl(28 95% 45%);
  border: 1px solid hsl(var(--orange) / 0.4);
  width: fit-content;
}
[data-theme="light"] .productPromoBadge{
  background: hsl(28 95% 92%);
  color: hsl(28 65% 35%);
  border-color: hsl(var(--orange) / 0.5);
}

.alert.productPromoAlert{
  display: flex;
  align-items: center;
  border: 2px solid hsl(28 95% 45%);
  background: hsl(28 75% 25%) !important;
  color: hsl(var(--text));
  border-radius: var(--radius);
  padding: 14px 18px;
}
[data-theme="light"] .alert.productPromoAlert{
  background: hsl(28 95% 97%) !important;
  border-width: 1px;
  border-color: hsl(var(--orange) / 0.5);
  color: hsl(215 25% 15%);
}
.productPromoAlertInner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}
.productPromoAlertText{
  flex: 1;
  min-width: 0;
}
.productPromoAlertBtn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}

[data-theme="light"] .alertError{
  background: hsl(0 75% 97%);
  border-color: hsl(0 65% 85%);
  color: hsl(0 65% 35%);
}
[data-theme="light"] .alertOk{
  background: hsl(150 50% 96%);
  border-color: hsl(150 45% 80%);
  color: hsl(150 50% 28%);
}
[data-theme="light"] .alertWarning{
  background: hsl(45 90% 96%);
  border-color: hsl(45 70% 80%);
  color: hsl(35 80% 30%);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: hsl(var(--text));
  background:
    radial-gradient(1000px 400px at 20% -10%, hsl(var(--blue)/0.18), transparent 60%),
    radial-gradient(900px 360px at 80% 0%, hsl(var(--orange)/0.10), transparent 60%),
    radial-gradient(900px 360px at 60% 110%, hsl(var(--green)/0.10), transparent 60%),
    hsl(var(--bg));
}

a{ color: inherit; }
.muted{ color: hsl(var(--muted)); }
.muted2{ color: hsl(var(--muted2)); }

.container{ max-width: 1200px; margin: 0 auto; padding: 20px 16px 40px; }

/* Área restrita do cliente: preenche todo o viewport, sem margens horizontais */
body.app-area{ display: flex; flex-direction: column; min-height: 100vh; }
body.app-area .topbar-inner{ max-width: none; }
body.app-area .container{
  max-width: none;
  margin: 0;
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
body.app-area .app{ flex: 1; min-height: 0; }
body.app-area .sidebar{ height: 100%; top: 0; }
/* Área principal: rolagem interna (menu lateral fora do scroll). min-height:0 libera o encolhimento no flex/grid. */
body.app-area .content{
  min-height: 0;
  padding: 20px 24px 40px;
  overflow: auto;
}

.app{
  display:grid;
  grid-template-columns: 300px 1fr;
  gap:16px;
}
@media (max-width: 960px){
  .app{ grid-template-columns: 1fr; }
}

/*
  Desktop + shell com sidebar: o documento não rola; só main.content rola.
  Evita duas barras (viewport + main) e mantém a navegação lateral fixa na coluna.
*/
@media (min-width: 961px){
  html:has(body.app-area .app){
    height: 100%;
    overflow: hidden;
  }
  body.app-area:has(.app){
    height: 100%;
    min-height: 100vh;
    max-height: 100vh;
    overflow: hidden;
  }
  body.app-area:has(.app) .container{
    overflow: hidden;
    min-height: 0;
  }
  body.app-area:has(.app) .app{
    overflow: hidden;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
  }
  body.app-area:has(.app) .content{
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.topbar{
  position: sticky;
  top:0;
  z-index: 50;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--bg) / 0.75);
  backdrop-filter: blur(10px);
}
.topbar-inner{
  max-width:1200px;
  margin:0 auto;
  padding: 14px 16px;
  display:flex;
  align-items:center;
  gap:12px;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
  letter-spacing: .2px;
}
.brandLogoLink{
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.brandLogo{
  height: 32px;
  width: auto;
  display: block;
}
/* Logo por tema: fallback dark, light alterna */
.brandLogoLight{ display: none; }
.brandLogoDark{ display: block; }
[data-theme="light"] .brandLogoLight{ display: block; }
[data-theme="light"] .brandLogoDark{ display: none; }
[data-theme="dark"] .brandLogoLight{ display: none; }
[data-theme="dark"] .brandLogoDark{ display: block; }
.brandTenantSlug{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
a.brandTenantSlugLink{
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
a.brandTenantSlugLink:hover{
  text-decoration: underline;
  text-underline-offset: 3px;
}
.spacer{ flex:1; }

.themeToggle{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: hsl(var(--panel2) / 0.75);
  color: hsl(var(--muted2));
  cursor: pointer;
  transition: background .12s, color .12s;
}
.themeToggle:hover{
  background: hsl(var(--panel2));
  color: hsl(var(--text));
}
.themeToggleIcon{ display: none; }
[data-theme="dark"] .themeToggleIconSun,
[data-theme="light"] .themeToggleIconMoon,
html:not([data-theme]) .themeToggleIconSun{ display: inline-flex; }

.helpToggle{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: hsl(var(--panel2) / 0.75);
  color: hsl(var(--muted2));
  cursor: pointer;
  transition: background .12s, color .12s;
  text-decoration: none;
}
.helpToggle:hover{
  background: hsl(var(--panel2));
  color: hsl(var(--text));
}
.helpToggle svg{ width: 18px; height: 18px; }

.dmTopbarLink{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 12px;
  background: hsl(var(--panel2) / 0.75);
  color: hsl(var(--muted2));
  text-decoration: none;
  transition: background .12s, color .12s;
}
.dmTopbarLink:hover{
  background: hsl(var(--panel2));
  color: hsl(var(--text));
}
button.dmTopbarLink{
  border: none;
  cursor: pointer;
  font: inherit;
}
.dmTopbarIconWrap{ position: relative; display: inline-flex; align-items: center; justify-content: center; }
.dmTopbarLink svg{ width: 18px; height: 18px; }
.dmTopbarBadge{
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px hsl(var(--panel));
}

.adminAlertsTopbarHost{
  display: inline-flex;
  align-items: center;
}
.adminAlertsBtn{
  border: none;
  cursor: pointer;
  font: inherit;
}
.adminAlertsBadge{
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: hsl(var(--danger, 0 72% 51%));
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-sizing: border-box;
  pointer-events: none;
  box-shadow: 0 0 0 2px hsl(var(--panel));
}
.dmTopbarIconWrap .adminAlertsBadge{
  position: absolute;
  top: -5px;
  right: -7px;
}

/* Assistente IA — orb Siri (topbar + botão enviar do spotlight) */
.aiSpotlightOrbBtn{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font: inherit;
  flex-shrink: 0;
  color: #fff;
  isolation: isolate;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.52) 0%, rgba(255, 255, 255, 0) 44%),
    linear-gradient(155deg, #5856e8 0%, #a855de 38%, #ec4899 68%, #38bdf8 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.2),
    0 1px 8px rgba(88, 86, 232, 0.4),
    0 4px 18px rgba(168, 85, 222, 0.32),
    0 0 22px rgba(56, 189, 248, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  animation: aiSiriOrbPulse 3.2s ease-in-out infinite;
}
.aiSpotlightOrbBtn::before{
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  z-index: -1;
  background: conic-gradient(
    from 220deg,
    #f472b6,
    #a78bfa,
    #60a5fa,
    #22d3ee,
    #4ade80,
    #facc15,
    #fb923c,
    #f472b6
  );
  opacity: 0.5;
  filter: blur(5px);
  animation: aiSiriOrbHalo 5s linear infinite;
}
@keyframes aiSiriOrbPulse{
  0%, 100%{
    transform: scale(1);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.2),
      0 1px 8px rgba(88, 86, 232, 0.4),
      0 4px 18px rgba(168, 85, 222, 0.32),
      0 0 22px rgba(56, 189, 248, 0.22);
  }
  50%{
    transform: scale(1.025);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.3),
      0 2px 10px rgba(88, 86, 232, 0.48),
      0 6px 22px rgba(236, 72, 153, 0.36),
      0 0 28px rgba(56, 189, 248, 0.3);
  }
}
@keyframes aiSiriOrbHalo{
  to{
    transform: rotate(360deg);
  }
}
.aiSpotlightOrbBtn:hover:not(:disabled){
  transform: scale(1.04);
  filter: saturate(1.1) brightness(1.04);
  animation-play-state: paused;
}
.aiSpotlightOrbBtn:active:not(:disabled){
  transform: scale(0.96);
}
.aiSpotlightOrbBtn:disabled{
  opacity: 0.5;
  cursor: not-allowed;
  animation: none;
  filter: grayscale(0.35);
}
.aiSpotlightOrbBtn:disabled::before{
  opacity: 0.25;
  animation: none;
}
[data-theme="light"] .aiSpotlightOrbBtn{
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.6),
    0 1px 8px rgba(88, 86, 232, 0.32),
    0 4px 20px rgba(168, 85, 222, 0.24),
    0 0 24px rgba(56, 189, 248, 0.18);
}
.aiSpotlightOrbBtn svg,
.aiSpotlightOrbIcon svg{
  width: 16px;
  height: 16px;
  stroke: currentColor;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}
.aiSpotlightOrbIcon{
  display: inline-flex;
  line-height: 0;
}
@media (prefers-reduced-motion: reduce){
  .aiSpotlightOrbBtn,
  .aiSpotlightOrbBtn::before{
    animation: none !important;
  }
}

/* Overlay estilo “Spotlight”: input central + atalhos */
.aiSpotlightLayer{
  position: fixed;
  inset: 0;
  z-index: 10080;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 20px 24px;
  box-sizing: border-box;
}
.aiSpotlightLayer[hidden]{
  display: none !important;
}
.aiSpotlightBackdrop{
  position: absolute;
  inset: 0;
  background: hsl(0 0% 0% / 0.5);
  backdrop-filter: blur(4px);
  cursor: pointer;
}
.aiSpotlightPanel{
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  padding: 20px 22px 18px;
  border-radius: 16px;
  box-shadow:
    0 24px 80px hsl(var(--shadow) / 0.45),
    0 0 0 1px hsl(var(--border) / 0.9);
  animation: aiSpotlightIn 0.18s ease-out;
}
@keyframes aiSpotlightIn{
  from{
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to{
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.aiSpotlightHeading{
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #a78bfa;
  background: linear-gradient(
    132deg,
    #5856e8 0%,
    #a855de 34%,
    #ec4899 66%,
    #38bdf8 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 18px rgba(168, 85, 222, 0.2);
}
.aiSpotlightModeRow{
  display: flex;
  gap: 8px;
  margin: 0 0 10px;
}
.aiSpotlightModeBtn{
  flex: 1;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--surface));
  color: hsl(var(--text));
  cursor: pointer;
}
.aiSpotlightModeBtn:hover{
  border-color: hsl(var(--primary) / 0.45);
}
.aiSpotlightModeBtn.is-active{
  border-color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--text));
}
/* Tema claro: texto e contorno menos “pretos” — cinza legível */
[data-theme="light"] .aiSpotlightModeBtn{
  color: hsl(215 11% 40%);
  border-color: hsl(215 9% 72%);
}
[data-theme="light"] .aiSpotlightModeBtn:hover{
  color: hsl(215 12% 32%);
  border-color: hsl(215 10% 62%);
}
[data-theme="light"] .aiSpotlightModeBtn.is-active{
  color: hsl(215 14% 28%);
  border-color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.1);
}
.aiSpotlightLead{
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.45;
}
.aiSpotlightInputRow{
  display: flex;
  align-items: center;
  gap: 10px;
}
.aiSpotlightInput{
  flex: 1;
  min-width: 0;
  font-size: 15px;
  padding: 12px 14px;
  border-radius: 12px;
}
/* Enviar: mesmo orb da topbar (.aiSpotlightOrbBtn), alinhado à altura do campo */
.aiSpotlightSend.aiSpotlightOrbBtn{
  align-self: center;
}
.aiSpotlightExamples{
  margin-top: 14px;
  margin-bottom: 0;
  max-height: min(38vh, 280px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.aiSpotlightFoot{
  margin: 12px 0 0;
  font-size: 12px;
}
.aiSpotlightLayer--result{
  align-items: center;
  padding: 20px;
}
.aiSpotlightResultCard{
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  max-height: min(92vh, 720px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.aiSpotlightResultBody{
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0;
}
.aiSpotlightResultActions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid hsl(var(--border));
  flex-shrink: 0;
}

.adminAlertsBadge[hidden],
.adminAlertsBadge:empty{
  display: none !important;
}
/* fixed + posição via JS: evita “preso” à viewport por backdrop-filter/sticky na .topbar */
/* display:flex abaixo quebrava o atributo [hidden] em alguns navegadores — fechado = none !important */
.adminAlertsPanel[hidden]{
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.adminAlertsPanel{
  position: fixed;
  box-sizing: border-box;
  width: min(380px, calc(100vw - 24px));
  max-height: min(70vh, 420px);
  display: flex;
  flex-direction: column;
  z-index: 10040;
  border-radius: 14px;
  background: hsl(var(--panel));
  border: 1px solid hsl(var(--border));
  box-shadow: 0 16px 48px rgba(0,0,0,.28);
  overflow: hidden;
  margin: 0;
  left: auto;
  visibility: visible;
}
.adminAlertsPanelHead{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid hsl(var(--border));
  flex-shrink: 0;
}
.adminAlertsPanelTitle{
  font-weight: 700;
  font-size: 14px;
  color: hsl(var(--text));
}
.adminAlertsLogsLink{
  font-size: 12px;
  color: hsl(var(--accent, 210 90% 48%));
  text-decoration: none;
  white-space: nowrap;
}
.adminAlertsLogsLink:hover{ text-decoration: underline; }
.adminAlertsPanelBody{
  overflow-y: auto;
  padding: 8px 0;
  flex: 1;
}
.adminAlertsMuted{
  margin: 12px 14px;
  font-size: 13px;
  color: hsl(var(--muted));
}
.adminAlertsRow{
  padding: 10px 14px;
  border-bottom: 1px solid hsl(var(--border) / 0.5);
}
.adminAlertsRow:last-child{ border-bottom: none; }
.adminAlertsRowTitle{
  font-weight: 600;
  font-size: 13px;
  color: hsl(var(--text));
  margin-bottom: 4px;
}
.adminAlertsRowBody{
  font-size: 13px;
  color: hsl(var(--muted));
  line-height: 1.4;
}
.adminAlertsRowMeta{
  margin-top: 6px;
  font-size: 11px;
  color: hsl(var(--muted2, var(--muted)));
}

.dmToast{
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10050;
  max-width: min(360px, calc(100vw - 40px));
  padding: 14px 16px;
  border-radius: 14px;
  background: hsl(var(--panel));
  border: 1px solid hsl(var(--border));
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
  cursor: pointer;
  animation: dmToastIn .22s ease-out;
}
@keyframes dmToastIn{
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.dmToastTitle{ font-weight: 700; font-size: 13px; margin-bottom: 6px; color: hsl(var(--text)); }
.dmToastBody{ font-size: 13px; color: hsl(var(--muted)); line-height: 1.4; }

.dmPageRoot{ margin-bottom: 24px; }
.dmPageGrid{
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 0;
  padding: 0 !important;
  overflow: hidden;
}
@media (max-width: 900px){
  .dmPageGrid{ grid-template-columns: 1fr; }
}
.dmSidebar{
  border-right: 1px solid hsl(var(--border));
  display: flex;
  flex-direction: column;
  min-height: 420px;
  max-height: 70vh;
}
@media (max-width: 900px){
  .dmSidebar{ border-right: none; border-bottom: 1px solid hsl(var(--border)); max-height: 40vh; }
}
.dmSidebarHead{ padding: 16px; border-bottom: 1px solid hsl(var(--border)); flex-shrink: 0; }
.dmPeerList{
  overflow-y: auto;
  flex: 1;
  padding: 8px;
}
.dmPeerRowTop{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}
.dmPeerBtn{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  margin-bottom: 4px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  transition: background .12s;
}
.dmPeerBtn:hover{ background: hsl(var(--panel2) / 0.6); }
.dmPeerBtn.isActive{ background: hsl(var(--blue) / 0.12); outline: 1px solid hsl(var(--ring) / 0.35); }
.dmPeerName{ font-weight: 600; font-size: 13px; min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dmPeerUnread{
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  background: #dc2626;
  color: #fff;
  border-radius: 999px;
  padding: 2px 6px;
}
.dmPeerHint{ font-size: 11px; margin-top: 4px; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dmMain{
  display: flex;
  flex-direction: column;
  min-height: 420px;
  max-height: 70vh;
}
@media (max-width: 900px){
  .dmMain{ max-height: none; min-height: 360px; }
}
.dmThreadTitle{
  padding: 14px 16px;
  font-weight: 700;
  font-size: 15px;
  border-bottom: 1px solid hsl(var(--border));
  flex-shrink: 0;
}
.dmThread{
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: hsl(var(--panel2) / 0.25);
}
.dmThreadLoading{ padding: 24px; text-align: center; }
.dmBubbleWrap{ display: flex; flex-direction: column; max-width: 85%; }
.dmBubbleMine{ align-self: flex-end; align-items: flex-end; }
.dmBubbleTheirs{ align-self: flex-start; align-items: flex-start; }
.dmBubble{
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.dmBubbleMine .dmBubble{
  background: hsl(var(--blue) / 0.22);
  border: 1px solid hsl(var(--ring) / 0.25);
}
.dmBubbleTheirs .dmBubble{
  background: hsl(var(--panel));
  border: 1px solid hsl(var(--border));
}
.dmBubbleMeta{ font-size: 10px; margin-top: 4px; }
.dmCompose{
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid hsl(var(--border));
  flex-shrink: 0;
}
.dmCompose .btnPrimary,
.dmCompose button[type='submit']{
  flex-shrink: 0;
}
.dmCompose .dmComposeSend{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
}
.dmComposeSendIcon svg{
  display: block;
  flex-shrink: 0;
}
.dmComposeInput{
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  min-height: 44px !important;
  height: auto !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  resize: vertical;
}

/* Painel lateral de mensagens (sobreposição global) */
.dmDrawerBackdrop{
  position: fixed;
  inset: 0;
  z-index: 10060;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.dmDrawerBackdrop.isVisible{
  opacity: 1;
  pointer-events: auto;
}
.dmDrawerShell{
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(520px, 100vw);
  max-width: 100vw;
  z-index: 10070;
  display: flex;
  flex-direction: column;
  background: hsl(var(--panel));
  border-left: 1px solid hsl(var(--border));
  box-shadow: -12px 0 48px rgba(0, 0, 0, 0.22);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}
.dmDrawerShell.isOpen{
  transform: translateX(0);
}
.dmDrawerHeader{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid hsl(var(--border));
  flex-shrink: 0;
  background: hsl(var(--panel));
}
.dmDrawerHeaderText{ min-width: 0; }
.dmDrawerTitle{
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: hsl(var(--text));
  letter-spacing: -0.02em;
}
.dmDrawerSubtitle{
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.35;
}
.dmDrawerClose{
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: hsl(var(--panel2) / 0.65);
  color: hsl(var(--muted2));
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s;
}
.dmDrawerClose:hover{
  background: hsl(var(--panel2));
  color: hsl(var(--text));
}
.dmDrawerRoot{
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.dmDrawerViewport{
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: hsl(var(--panel));
}
.dmDrawerPanel{
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: hsl(var(--panel));
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.dmDrawerPanelList{
  transform: translateX(0);
  z-index: 1;
}
.dmDrawerPanelChat{
  transform: translateX(100%);
  z-index: 2;
  border-left: none;
}
.dmDrawerRoot[data-dm-drawer-view='chat'] .dmDrawerPanelList{
  transform: translateX(-100%);
}
.dmDrawerRoot[data-dm-drawer-view='chat'] .dmDrawerPanelChat{
  transform: translateX(0);
}
.dmDrawerRoot[data-dm-drawer-view='list'] .dmDrawerPanelChat{
  pointer-events: none;
}
.dmDrawerRoot[data-dm-drawer-view='chat'] .dmDrawerPanelList{
  pointer-events: none;
}
.dmDrawerListStack{
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.dmDrawerListHead{
  flex-shrink: 0;
}
.dmDrawerSectionLabel{
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: hsl(var(--muted2));
}
.dmDrawerNewLabel{
  font-size: 11px;
  display: block;
  margin-top: 10px;
}
.dmDrawerSelect{
  margin-top: 4px;
  width: 100%;
}
.dmDrawerPeerList{
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.dmChatToolbar{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid hsl(var(--border));
  flex-shrink: 0;
  background: hsl(var(--panel));
}
.dmChatBack{
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin: -6px 0 -6px -4px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: hsl(var(--text));
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s;
}
.dmChatBack:hover{
  background: hsl(var(--panel2) / 0.65);
  color: hsl(var(--text));
}
.dmChatBackIcon svg{
  display: block;
}
.dmChatTitle{
  min-width: 0;
  flex: 1;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  color: hsl(var(--text));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dmDrawerThread{
  flex: 1;
  min-height: 0;
}
.dmDrawerCompose{
  flex-shrink: 0;
}
html.dmDrawerOpen,
body.dmDrawerOpen{
  overflow: hidden;
}

/* Landing: nav fora da .topbar — backdrop-filter na topbar prendia position:fixed no drawer */
.landingStickyHeader{
  position: sticky;
  top: 0;
  z-index: 2500;
  background: hsl(var(--bg) / 0.98);
  border-bottom: 1px solid hsl(var(--border));
}
.landing-page .topbar--landing{
  position: relative;
  z-index: 3;
  border-bottom: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: transparent;
}
.topbarLandingActions{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
/* Landing: logo | tema | (menu + inbox/hamburger); menu alinhado à direita no desktop */
.landing-page .topbar-inner:has(.landingNavMenu){
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  row-gap: 10px;
}
.landing-page .brand{
  flex-shrink: 0;
}
.landing-page .landingTopbarTheme{
  flex-shrink: 0;
}
.landing-page .landingTopbarEnd{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}
/* Evita que a gaveta fixed ocupe slot no flex da topbar no mobile; no desktop cresce e alinha os links à direita */
.landing-page .landingNavDrawerHost{
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.landing-page .topbarLandingActions{
  flex: 0 0 auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}
.landingNavMenu{
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
  box-sizing: border-box;
}
@media (min-width: 769px){
  .landing-page .landingTopbarTheme{
    margin-left: 0;
  }
  .landing-page .landingNavDrawerHost{
    flex: 1 1 auto;
    min-width: min(100%, 320px);
    justify-content: flex-end;
  }
  .landing-page .landingNavMenu{
    padding: 0;
    margin: 0;
    width: auto;
    max-width: 100%;
    flex: 1 1 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 8px;
  }
  .landing-page .landingNavMenu .landingNavLink{
    min-height: 36px;
    height: auto;
    padding: 0 11px;
    font-size: 13px;
  }
  .landingNavToggle{
    display: none !important;
  }
  .landingNavBackdrop{
    display: none !important;
  }
}
.landingNavToggle{
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  background: hsl(var(--panel2) / 0.75);
  color: hsl(var(--text));
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.landingNavToggle:hover{
  background: hsl(var(--panel2));
  border-color: hsl(var(--ring) / 0.35);
}
.landingNavToggleLines{
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 20px;
  height: 16px;
}
.landingNavToggleBar{
  display: block;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.landing-page.landing-nav-open .landingNavToggleBar:nth-child(1){
  transform: translateY(7px) rotate(45deg);
}
.landing-page.landing-nav-open .landingNavToggleBar:nth-child(2){
  opacity: 0;
}
.landing-page.landing-nav-open .landingNavToggleBar:nth-child(3){
  transform: translateY(-7px) rotate(-45deg);
}
.landingNavBackdrop{
  display: none;
}
@media (max-width: 768px){
  .landing-page{
    --landing-topbar-h: calc(72px + env(safe-area-inset-top, 0px));
  }
  .landingNavToggle{
    display: inline-flex;
  }
  .landing-page .topbar-inner:has(.landingNavMenu){
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: nowrap;
  }
  .landing-page .landingTopbarTheme{
    margin-left: auto;
  }
  .landing-page .landingTopbarEnd{
    flex: 0 0 auto;
  }
  .landing-page .landingNavDrawerHost{
    flex: 0 0 0;
    width: 0;
    min-width: 0;
    overflow: visible;
    display: block;
  }
  .landing-page .topbarLandingActions{
    flex: 0 0 auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
  }
  .landingNavMenu{
    position: fixed;
    top: var(--landing-topbar-h);
    right: 0;
    bottom: 0;
    left: auto;
    width: min(320px, calc(100vw - 36px));
    max-width: 100%;
    margin: 0;
    padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 0px));
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
    background: hsl(var(--bg));
    border-left: 1px solid hsl(var(--border));
    box-shadow: -12px 0 40px hsl(var(--shadow) / 0.45);
    z-index: 2;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0.3s;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .landing-page.landing-nav-open .landingNavMenu{
    transform: translateX(0);
    visibility: visible;
  }
  .landingNavMenu .landingNavLink{
    width: 100%;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-left: 14px;
    padding-right: 14px;
  }
  .landingNavBackdrop{
    display: block;
    position: fixed;
    top: var(--landing-topbar-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    background: hsl(0 0% 0% / 0.5);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s;
  }
  [data-theme="light"] .landingNavBackdrop{
    background: hsl(0 0% 28% / 0.42);
  }
  .landing-page.landing-nav-open .landingNavBackdrop{
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .landing-page.landing-nav-open{
    overflow: hidden;
  }
}
@media (max-width: 720px){
  .landingNavMenu .btn{ height: auto; min-height: 44px; }
}

.chip{
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--panel2) / 0.75);
  font-size: 12px;
}
.chipBlue{ border-color: hsl(var(--blue)/0.35); }
.chipGreen{ border-color: hsl(var(--green)/0.35); }
.chipOrange{ border-color: hsl(var(--orange)/0.35); }
.chipDanger{ border-color: hsl(0 70% 50%/0.5); background: hsl(0 60% 20%/0.2); color: hsl(0 70% 60%); }
[data-theme="light"] .chipDanger{ background: hsl(0 75% 97%); border-color: hsl(0 65% 75%); color: hsl(0 65% 35%); }
.kpiCancelled{ border: 2px solid hsl(0 70% 50%); background: hsl(0 60% 20% / 0.15); }
.kpiCancelled .kpiValue{ color: hsl(0 70% 60%); }
[data-theme="light"] .kpiCancelled{ background: hsl(0 75% 97%); border-color: hsl(0 65% 75%); }
[data-theme="light"] .kpiCancelled .kpiValue{ color: hsl(0 65% 35%); }
.receivableCancelledRow{ background: hsl(0 60% 20% / 0.08); }
[data-theme="light"] .receivableCancelledRow{ background: hsl(0 75% 97%); }
.chipLink{
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: opacity .15s ease, background .15s ease;
}
.chipLink:hover{ opacity: .9; background: hsl(var(--panel2)); }

.userDropdown{ position: relative; }
.userDropdownTrigger{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid hsl(var(--green)/0.35);
  background: hsl(var(--panel2) / 0.75);
  color: hsl(var(--text));
  font-size: 12px;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.userDropdownTrigger:hover{
  background: hsl(var(--panel2));
  border-color: hsl(var(--green)/0.5);
}
.userDropdownChevron{
  font-size: 8px;
  opacity: 0.9;
  transition: transform .2s ease;
}
.userDropdown[data-open] .userDropdownChevron{ transform: rotate(180deg); }
.userDropdownMenu{
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--panel) / 0.98);
  box-shadow: 0 10px 40px hsl(var(--shadow)/0.4);
  display: none;
  z-index: 100;
}
.userDropdown[data-open] .userDropdownMenu{ display: block; }
.userDropdownItem{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: hsl(var(--text));
  text-decoration: none;
  font-size: 13px;
  transition: background .12s ease;
}
.userDropdownItem:hover{
  background: hsl(var(--panel2)/0.8);
}
.userDropdownItemIcon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  opacity: 0.9;
}
.userDropdownDivider{
  height: 1px;
  margin: 6px 0;
  background: hsl(var(--border));
}
.userDropdownItemBtn{
  margin-top: 4px;
  justify-content: center;
  font-weight: 600;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--panel2)/0.6);
}
.userDropdownItemBtn:hover{
  background: hsl(0 50% 20% / 0.5);
  border-color: hsl(0 60% 35% / 0.6);
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--panel2));
  color: hsl(var(--text));
  text-decoration:none;
  cursor:pointer;
  transition: transform .08s ease, background .12s ease, border-color .12s ease;
}
.btn:hover{ background: hsl(var(--panel)); border-color: hsl(var(--border)/0.9); }
.btn:active{ transform: translateY(1px); }
.btnPrimary{
  background: linear-gradient(135deg, hsl(var(--blue)), hsl(var(--blue)/0.75));
  border-color: hsl(var(--blue)/0.55);
}
.btnPrimary:hover{ border-color: hsl(var(--blue)/0.8); }
.btnDanger{
  background: hsl(0 60% 16%);
  border-color: hsl(0 60% 28%);
}
.btnExcel{
  background: linear-gradient(135deg, hsl(142 71% 25%), hsl(142 71% 20%));
  border-color: hsl(142 60% 35%);
  color: #fff;
}
.btnExcel:hover{ background: linear-gradient(135deg, hsl(142 71% 30%), hsl(142 71% 25%)); border-color: hsl(142 60% 45%); color: #fff; }
.btnPdf{
  background: linear-gradient(135deg, hsl(0 72% 40%), hsl(0 72% 35%));
  border-color: hsl(0 65% 45%);
  color: #fff;
}
.btnPdf:hover{ background: linear-gradient(135deg, hsl(0 72% 48%), hsl(0 72% 42%)); border-color: hsl(0 65% 52%); color: #fff; }

.panel{
  border: 1px solid hsl(var(--border));
  background: hsl(var(--panel) / 0.65);
  border-radius: var(--radius);
  box-shadow: 0 10px 40px hsl(var(--shadow)/0.25);
}
.panelPad{ padding: 18px; }

.planBreakdownGrid{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.planParcelaCard{
  padding: 8px 12px;
  background: hsl(var(--panel2)/0.5);
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  font-size: 11px;
  white-space: nowrap;
}

.sidebar{
  position: sticky;
  top: 82px;
  height: calc(100vh - 92px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.sidebarNavScroll{
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.sidebarPlayStore{
  flex-shrink: 0;
  padding: 12px 12px 14px;
  border-top: 1px solid hsl(var(--border));
  background: hsl(var(--panel) / 0.5);
}
.sidebarPlayStoreLink{
  display: inline-block;
  line-height: 0;
  border-radius: 8px;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.sidebarPlayStoreLink:hover{
  opacity: 0.92;
  transform: translateY(-1px);
}
.sidebarPlayStoreImg{
  display: block;
  height: 50px;
  width: auto;
  max-width: 100%;
}
@media (max-width: 960px){
  .sidebar{
    position: static;
    height: auto;
    overflow: visible;
    display: block;
  }
  .sidebarNavScroll{
    overflow: visible;
    min-height: 0;
  }
}
.sideHeader{
  display:flex; align-items:center; justify-content:space-between;
  padding: 14px 14px 8px;
}
.sideTitle{ font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: hsl(var(--muted2)); }
.navSearchWrap{
  padding: 0 10px 10px;
}
.navSearchInput{
  width: 100%;
  padding: 8px 12px 8px 36px;
  border-radius: 10px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--panel2)/0.5);
  color: hsl(var(--text));
  font-size: 13px;
  outline: none;
  transition: border-color .15s, background .15s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px 50%;
}
.navSearchInput::placeholder{ color: hsl(var(--muted2)); }
.navSearchInput:focus{
  border-color: hsl(var(--blue)/0.6);
  background-color: hsl(var(--panel2));
}
.nav{
  display:grid;
  gap: 6px;
  padding: 10px;
}
.navIcon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  opacity: 0.85;
}
.navIconSm{ width: 18px; height: 18px; }
.navLinkContent{ display: flex; align-items: center; gap: 8px; }
.nav a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  text-decoration:none;
  font-size: 14px;
  color: hsl(var(--text));
  background: transparent;
  transition: background .12s ease, border-color .12s ease;
}
.nav a:hover{
  background: hsl(var(--panel2)/0.8);
  border-color: hsl(var(--border));
}
.nav a.active{
  background: linear-gradient(135deg, hsl(var(--blue)/0.18), hsl(var(--panel2)));
  border-color: hsl(var(--blue)/0.35);
}
.navExpansionTile{ margin-top: 6px; }
.navExpansionTile:first-of-type{ margin-top: 0; }
.navExpansionTileHeader{
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  gap: 10px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: hsl(var(--text));
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background .12s ease, border-color .12s ease;
  border: 1px solid transparent;
}
.navExpansionTileHeader:hover{
  background: hsl(var(--panel2)/0.8);
  border-color: hsl(var(--border));
}
.navExpansionTileHeader.isExpanded{
  background: hsl(var(--panel2)/0.5);
  border-color: hsl(var(--border));
}
.navExpansionTileChevron{
  font-size: 10px;
  transition: transform .2s ease;
  opacity: 0.8;
}
.navExpansionTileHeader:not(.isExpanded) .navExpansionTileChevron{
  transform: rotate(-90deg);
}
.navExpansionTileContent{
  padding: 4px 0 4px 8px;
  margin-left: 8px;
  border-left: 2px solid hsl(var(--border)/0.6);
}
.navSectionItem{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 13px;
  color: hsl(var(--text));
  background: transparent;
  transition: background .12s ease, border-color .12s ease;
  margin-top: 2px;
}
.navSectionItem:first-child{ margin-top: 0; }
.navSectionItem:hover{
  background: hsl(var(--panel2)/0.8);
  border-color: hsl(var(--border));
}
.navSectionItem.active{
  background: linear-gradient(135deg, hsl(var(--blue)/0.18), hsl(var(--panel2)));
  border-color: hsl(var(--blue)/0.35);
}
.navDirectLink.navSearchHidden,
.navExpansionTile.navSearchHidden{ display: none !important; }
.navSectionItem.navSearchHidden{ display: none !important; }

.content{ min-width:0; }
.pageHeader{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom: 14px;
}
.pageHeader .btn{
  flex-shrink: 0;
}
/** Bloco único dos relatórios: título + exportações na mesma linha; descrição abaixo. */
.pageHeaderInner{
  flex: 1;
  min-width: 0;
}
.pageHeaderTitleRow{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  flex-wrap: wrap;
}
.pageHeaderTitleRow .pageTitle{
  flex: 1;
  min-width: 0;
}
.pageHeaderActions{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
  flex-shrink: 0;
}
.pageTitle{ margin:0; font-size: 22px; letter-spacing: -0.02em; }
.pageDesc{ margin-top:6px; font-size: 13px; color: hsl(var(--muted)); }

.grid{ display:grid; gap: 12px; }
.grid2{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid4{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px){ .grid2,.grid3,.grid4{ grid-template-columns: 1fr; } }

.kpi{
  padding: 14px;
  border-radius: 16px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--panel2) / 0.75);
}
.kpiLabel{ font-size: 12px; color: hsl(var(--muted)); }
.kpiValue{ margin-top: 8px; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.kpiHint{ margin-top: 4px; font-size: 12px; color: hsl(var(--muted2)); }

/* Resumo da venda — valor de referência dos brindes (abaixo do contador) */
.saleGiftSubtotal{
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
  color: hsl(var(--muted));
}
.kpiBlue{ border-color: hsl(var(--blue)/0.35); }
.kpiGreen{ border-color: hsl(var(--green)/0.35); }
.kpiOrange{ border-color: hsl(var(--orange)/0.35); }
.kpiProfit{
  border: 2px solid hsl(var(--green) / 0.6);
  background: hsl(var(--green) / 0.08);
  padding: 18px;
}
.kpiProfit .kpiValue{ font-size: 32px; font-weight: 900; }

.dashboardTabs{ display: flex; gap: 4px; border-bottom: 1px solid hsl(var(--border)); }
.dashboardTab{
  padding: 10px 16px; font-size: 13px; font-weight: 600; text-decoration: none;
  color: hsl(var(--muted)); border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.dashboardTab:hover{ color: hsl(var(--text)); }
.dashboardTab.isActive{ color: hsl(var(--blue)); border-bottom-color: hsl(var(--blue)); }

.input, select{
  width:100%;
  height: 42px;
  border-radius: 12px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--panel2));
  color: hsl(var(--text));
  padding: 0 12px;
  outline: none;
}
.input:focus, select:focus{
  border-color: hsl(var(--ring)/0.8);
  box-shadow: 0 0 0 4px hsl(var(--ring)/0.18);
}
.inputSm{ height: 36px; font-size: 13px; padding: 0 10px; }

/* Custom file input */
.fileInputWrap{
  display: inline-flex;
  align-items: center;
  min-width: 240px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--panel2));
  color: hsl(var(--text));
  padding: 0 14px 0 12px;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
  position: relative;
  overflow: hidden;
}
.fileInputWrap:hover{
  border-color: hsl(var(--border) / 1.2);
}
.fileInputWrap:focus-within{
  border-color: hsl(var(--ring)/0.8);
  box-shadow: 0 0 0 4px hsl(var(--ring)/0.18);
}
.fileInputWrap .fileInputNative{
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
  width: 100%;
  height: 100%;
}
.fileInputLabel{
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
}
.fileInputIcon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: hsl(var(--muted));
  opacity: 0.9;
}
.fileInputText{
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: hsl(var(--muted));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fileInputWrap.hasFile .fileInputText{
  color: hsl(var(--text));
  font-weight: 500;
}

.inputWithTrailingIcon{
  position: relative;
  width: 100%;
}
.inputWithTrailingIcon .input{
  padding-right: 36px;
  width: 100%;
}
.inputInfoIcon{
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--muted2));
  cursor: help;
  transition: color .15s ease;
  pointer-events: auto;
}
.inputInfoIcon:hover{ color: hsl(var(--blue)); }
.inputInfoIcon[data-tooltip]{
  position: absolute;
}
.inputInfoIcon[data-tooltip]::after{
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 12px;
  background: hsl(var(--panel2));
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  max-width: 280px;
  white-space: normal;
  font-size: 12px;
  font-weight: 400;
  color: hsl(var(--text));
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  pointer-events: none;
  z-index: 100;
}
.inputInfoIcon[data-tooltip]:hover::after,
.inputInfoIcon[data-tooltip]:focus::after{
  opacity: 1;
  visibility: visible;
}
.inputInfoIcon:focus{ outline: none; }

.btnSm{ padding: 6px 10px; font-size: 12px; min-height: 32px; }

/* Product search dropdown (Nova venda) */
.productSearchWrap{ position: relative; width: 100%; min-width: 180px; }
.productSearchInput{ width: 100%; min-width: 180px; }
.purchaseItemsTable .productSearchWrap{ min-width: 600px; }
.purchaseItemsTable .productSearchInput{ min-width: 600px; }
.productSearchDropdown{
  position: fixed;
  max-height: 220px;
  overflow-y: auto;
  background: hsl(var(--panel2));
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  min-width: 180px;
}
.productSearchDropdown[data-open="true"]{ display: block; }
.productSearchDropdown[data-open="false"]{ display: none; }
.supplierSearchDropdown{ min-width: 440px; max-height: 440px; }
.purchaseProductDropdown{ width: 600px !important; min-width: 600px !important; max-height: 320px !important; }
.productSearchItem{
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
  border-bottom: 1px solid hsl(var(--border));
  transition: background 0.15s;
}
.productSearchItem:last-child{ border-bottom: none; }
.productSearchItem:hover{ background: hsl(var(--panel)); }
.productSearchItemEmpty{ padding: 12px; color: hsl(var(--muted2)); font-size: 13px; }

/* DropdownSearch (mercadoria específica em rotas de venda) */
.dropdownSearch{
  position: relative;
  min-width: 280px;
  flex: 1;
}
.dropdownSearchTrigger{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  box-sizing: border-box;
}
.dropdownSearchTrigger:focus{
  border-color: hsl(var(--ring)/0.8);
  box-shadow: 0 0 0 4px hsl(var(--ring)/0.18);
}
.dropdownSearchTriggerLabel{
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
.dropdownSearchChevron{
  flex: 0 0 auto;
  font-size: 10px;
  opacity: 0.55;
  line-height: 1;
  transition: transform 0.15s ease;
}
.dropdownSearchOpen .dropdownSearchChevron{
  transform: rotate(180deg);
}
.dropdownSearchPanel{
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 200;
  background: hsl(var(--panel2));
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  overflow: hidden;
}
.dropdownSearchInput{
  width: 100%;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid hsl(var(--border));
  height: 40px;
  font-size: 14px;
}
.dropdownSearchInput:focus{
  box-shadow: none;
}
.dropdownSearchList{
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 260px;
  overflow-y: auto;
}
.dropdownSearchOption{
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
  border-bottom: 1px solid hsl(var(--border));
  transition: background 0.15s;
}
.dropdownSearchOption:last-child{ border-bottom: none; }
.dropdownSearchOption:hover{ background: hsl(var(--panel)); }
.dropdownSearchOptionTitle{ font-weight: 600; line-height: 1.3; }
.dropdownSearchOptionSub{ font-size: 11px; margin-top: 4px; line-height: 1.25; }
.dropdownSearchOptionEmpty{
  cursor: default;
  color: hsl(var(--muted2));
}
.dropdownSearchOptionEmpty:hover{ background: transparent; }

table{ width:100%; border-collapse: collapse; }
th, td{ padding: 10px 10px; border-top: 1px solid hsl(var(--border)); text-align:left; font-size: 14px; }
th{ color: hsl(var(--muted2)); font-weight: 700; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }

.alert{
  border-radius: 14px;
  border:1px solid hsl(var(--border));
  padding: 10px 12px;
  font-size: 13px;
  background: hsl(var(--panel2)/0.6);
}
.alertError{ border-color: hsl(0 70% 40% / 0.5); background: hsl(0 50% 16% / 0.5); }
.alertOk{ border-color: hsl(var(--green)/0.45); background: hsl(var(--green)/0.10); }
.alertWarning{ border-color: hsl(45 90% 45% / 0.5); background: hsl(45 60% 18% / 0.4); }

.importErrorsDetails{ margin-bottom:12px; }
.importErrorsDetails summary{ cursor:pointer; font-weight:600; }
.importErrorsDetails ul{ margin:8px 0 0 20px; padding:0; }
.importErrorsDetails li{ margin-bottom:4px; }

.chartWrap{
  height: 260px;
}
.chartWrapTall{ height: 320px; }

/* Landing */
.landing-page .topbar-inner{
  max-width: min(1520px, 100%);
}
.landing-page .container{
  max-width: min(1520px, 100%);
  padding: 24px 24px 48px;
}
@media (max-width: 720px){
  .landing-page .container{ padding: 20px 16px 40px; }
}
.landing-page .heroSubtitle{
  max-width: 72ch;
}
.landing-page .heroSubtitle a{
  color: hsl(var(--blue));
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}
.landing-page .heroSubtitle a:hover{
  filter: brightness(1.08);
}
/* Âncoras: header sticky não cobre o título da seção */
.landing-page .container > section[id],
.landing-page .container .landingModern > section[id]{
  scroll-margin-top: max(96px, calc(12px + env(safe-area-inset-top, 0px) + 72px));
}

/* --- Landing modern (home) --- */
.landing-page .landingModern{
  position: relative;
}

.landing-page .landingHero{
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(20px, 4vw, 36px) clamp(16px, 3vw, 28px);
  margin-bottom: 8px;
  border: 1px solid hsl(var(--border) / 0.45);
  background:
    radial-gradient(120% 90% at 100% 0%, hsl(var(--blue) / 0.18), transparent 55%),
    radial-gradient(90% 70% at 0% 20%, hsl(var(--green) / 0.12), transparent 50%),
    linear-gradient(165deg, hsl(var(--panel) / 0.95) 0%, hsl(var(--panel2) / 0.35) 100%);
  box-shadow: 0 20px 50px hsl(var(--shadow) / 0.25);
}
[data-theme="light"] .landing-page .landingHero{
  background:
    radial-gradient(120% 90% at 100% 0%, hsl(var(--blue) / 0.12), transparent 55%),
    radial-gradient(90% 70% at 0% 20%, hsl(var(--green) / 0.08), transparent 50%),
    linear-gradient(165deg, hsl(var(--panel)) 0%, hsl(var(--panel2) / 0.65) 100%);
  box-shadow: 0 16px 40px hsl(var(--shadow) / 0.12);
}

.landing-page .landingHeroDecor{
  pointer-events: none;
  position: absolute;
  inset: -30% -15% auto -10%;
  height: 100%;
  opacity: 0.85;
  background:
    radial-gradient(ellipse 70% 55% at 78% 8%, hsl(var(--blue) / 0.35), transparent 52%),
    radial-gradient(ellipse 50% 40% at 12% 35%, hsl(var(--green) / 0.22), transparent 48%),
    radial-gradient(ellipse 45% 38% at 92% 55%, hsl(var(--orange) / 0.18), transparent 50%);
}
[data-theme="light"] .landing-page .landingHeroDecor{
  opacity: 1;
}

.landing-page .landingHeroGrid{
  position: relative;
  z-index: 1;
  align-items: start;
}

.landing-page .landingHeroAside{
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  align-self: start;
  width: 100%;
  min-width: 0;
}
.landing-page .landingHeroAside .landingHeroMock{
  width: 100%;
}
.landing-page .landingHeroAside .landingHeroCard{
  margin-top: 0;
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}

.landing-page .landingEyebrow{
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: hsl(var(--muted2));
}

.landing-page .landingHeroLead{
  max-width: 62ch;
}

.landing-page .landingHeroBullets{
  margin: 16px 0 0;
  padding: 0 0 0 1.2rem;
  max-width: 62ch;
  font-size: 14px;
  line-height: 1.65;
  color: hsl(var(--muted));
}
.landing-page .landingHeroBullets li{ margin-bottom: 8px; }
.landing-page .landingHeroBullets a{
  color: hsl(var(--blue));
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.landing-page .landingHeroBullets a:hover{ filter: brightness(1.08); }

.landing-page .landingHeroBadges{
  margin-top: 16px;
}

.landing-page .landingCalloutPdv{
  border-radius: 16px;
}

.landing-page .landingBtnGhost{
  border: 1px solid hsl(var(--border) / 0.85);
  background: hsl(var(--panel2) / 0.25);
  color: hsl(var(--text));
}
.landing-page .landingBtnGhost:hover{
  background: hsl(var(--panel2) / 0.55);
  border-color: hsl(var(--border));
}

.landing-page .landingHeroMock{
  box-shadow: 0 24px 56px hsl(var(--shadow) / 0.35);
}
[data-theme="light"] .landing-page .landingHeroMock{
  box-shadow: 0 20px 48px hsl(var(--shadow) / 0.14);
}

.landing-page .landingBand{
  margin-left: -24px;
  margin-right: -24px;
  width: calc(100% + 48px);
  max-width: none;
  box-sizing: border-box;
  padding-left: 24px;
  padding-right: 24px;
  padding-top: 28px;
  padding-bottom: 32px;
  margin-top: 4px;
  margin-bottom: 4px;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid hsl(var(--border) / 0.4);
  background: linear-gradient(
    180deg,
    hsl(var(--panel2) / 0.55) 0%,
    hsl(var(--panel) / 0.35) 100%
  );
}
[data-theme="light"] .landing-page .landingBand{
  background: linear-gradient(
    180deg,
    hsl(var(--panel2) / 0.9) 0%,
    hsl(var(--panel) / 0.75) 100%
  );
  border-color: hsl(var(--border) / 0.55);
}
@media (max-width: 720px){
  .landing-page .landingBand{
    margin-left: -16px;
    margin-right: -16px;
    width: calc(100% + 32px);
    padding-left: 16px;
    padding-right: 16px;
    padding-top: 22px;
    padding-bottom: 26px;
    border-radius: var(--radius);
  }
}

.landing-page .landingSectionHead{
  margin-bottom: 18px;
}
.landing-page .landingSectionHead .sectionTitle{
  margin-top: 4px;
}
.landing-page .landingKicker{
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: hsl(var(--blue));
}

.landing-page .landingToc{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid hsl(var(--border) / 0.5);
  background: hsl(var(--panel2) / 0.4);
}
[data-theme="light"] .landing-page .landingToc{
  background: hsl(var(--panel2) / 0.85);
}
.landing-page .landingTocLabel{
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: hsl(var(--muted2));
  margin-right: 4px;
}
.landing-page .landingToc a{
  font-size: 13px;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 999px;
  text-decoration: none;
  color: hsl(var(--text));
  border: 1px solid hsl(var(--border) / 0.55);
  background: hsl(var(--panel) / 0.55);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.landing-page .landingToc a:hover{
  border-color: hsl(var(--blue) / 0.45);
  background: hsl(var(--blue) / 0.12);
  transform: translateY(-1px);
}

.landing-page .landingFeatures .landingCluster{
  margin-top: 28px;
}
.landing-page .landingFeatures .landingCluster:first-of-type{
  margin-top: 8px;
}
.landing-page .landingClusterTitle{
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: hsl(var(--text));
  padding-bottom: 8px;
  border-bottom: 1px solid hsl(var(--border) / 0.5);
}

.landing-page .landingCardGrid{
  gap: 16px;
}
.landing-page .landingCard{
  border-radius: calc(var(--radius) + 2px);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.landing-page .landingCard:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 36px hsl(var(--shadow) / 0.22);
  border-color: hsl(var(--border) / 0.85);
}
.landing-page .landingCard--accent{
  border-color: hsl(var(--orange) / 0.5);
  box-shadow: 0 0 0 1px hsl(var(--orange) / 0.12);
  background: linear-gradient(
    160deg,
    hsl(var(--orange) / 0.08) 0%,
    hsl(var(--panel) / 0.98) 55%
  );
}
[data-theme="light"] .landing-page .landingCard--accent{
  background: linear-gradient(
    160deg,
    hsl(var(--orange) / 0.06) 0%,
    hsl(var(--panel)) 55%
  );
}
.landing-page .landingCard--intel{
  border-color: hsl(var(--blue) / 0.45);
  box-shadow: 0 0 0 1px hsl(var(--blue) / 0.1);
  background: linear-gradient(
    165deg,
    hsl(var(--blue) / 0.1) 0%,
    hsl(var(--panel) / 0.98) 50%
  );
}
[data-theme="light"] .landing-page .landingCard--intel{
  background: linear-gradient(
    165deg,
    hsl(var(--blue) / 0.06) 0%,
    hsl(var(--panel)) 50%
  );
}

.landing-page .landingIntelGrid{
  gap: 18px;
}
.landing-page .landingIntelCard{
  border-radius: calc(var(--radius) + 2px);
}
.landing-page .landingPlans{
  padding-top: 8px;
}

.landing-page .landingOutro{
  padding-top: 8px;
  padding-bottom: 8px;
}
.landing-page .landingCtaCard{
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid hsl(var(--blue) / 0.35);
  background: linear-gradient(
    125deg,
    hsl(var(--blue) / 0.12) 0%,
    hsl(var(--panel) / 0.95) 45%,
    hsl(var(--green) / 0.08) 100%
  );
  box-shadow: 0 16px 44px hsl(var(--shadow) / 0.2);
}
[data-theme="light"] .landing-page .landingCtaCard{
  background: linear-gradient(
    125deg,
    hsl(var(--blue) / 0.08) 0%,
    hsl(var(--panel)) 45%,
    hsl(var(--green) / 0.06) 100%
  );
  box-shadow: 0 12px 32px hsl(var(--shadow) / 0.1);
}
.landing-page .landingCopyright{
  text-align: center;
  margin-top: 14px;
  font-size: 12px;
}
.landing-page .sectionSubtitle.landingScopeNote{
  max-width: min(1000px, 100%);
}
.landing-page .planTrialCallout{
  width: 100%;
  max-width: none;
  margin: 0 0 22px;
  box-sizing: border-box;
  text-align: left;
  border: 1px solid hsl(var(--green) / 0.42);
  border-left-width: 4px;
  border-left-color: hsl(var(--green));
  background: linear-gradient(
    125deg,
    hsl(var(--green) / 0.14) 0%,
    hsl(var(--panel) / 0.92) 42%,
    hsl(var(--panel2) / 0.55) 100%
  );
  box-shadow: 0 10px 36px hsl(var(--shadow) / 0.22);
}
[data-theme="light"] .landing-page .planTrialCallout{
  background: linear-gradient(
    125deg,
    hsl(var(--green) / 0.1) 0%,
    hsl(var(--panel)) 45%,
    hsl(var(--panel2) / 0.85) 100%
  );
  border-color: hsl(var(--green) / 0.35);
  border-left-color: hsl(var(--green));
}
.landing-page .planTrialCalloutBody{
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: hsl(var(--muted));
}
.landing-page .planTrialCalloutBody strong{
  color: hsl(var(--text));
  font-weight: 700;
}
@media (max-width: 768px){
  .landing-page .heroSubtitle{
    max-width: none;
    font-size: 15px;
  }
  .landing-page .hero:not(.landingHero){ padding: 16px 0 8px; }
  .landing-page .badgeRow{ gap: 8px; }
  .landing-page .badge{ font-size: 11px; padding: 5px 8px; }
  .landing-page .section{ padding: 14px 0; }
  .landing-page .sectionTitle{ font-size: 20px; }
  .landing-page .sectionSubtitle{ font-size: 13px; }
  .landing-page .planTrialCalloutBody{ font-size: 14px; }
  .landing-page .planCompareTable{ font-size: 12px; }
  .landing-page .planCompareTable th,
  .landing-page .planCompareTable td{
    padding: 8px 8px;
  }
  .landing-page .planFeature{ flex-direction: column; gap: 8px; }
  .landing-page .cta{
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .landing-page .ctaActions{
    justify-content: center;
    width: 100%;
  }
  .landing-page .panelPad{ padding: 14px 16px; }
}
@media (max-width: 480px){
  .landing-page .heroTitle{
    font-size: 28px;
    line-height: 1.12;
  }
  .landing-page .sectionTitle{ font-size: 18px; }
  .landing-page .planPrice{ font-size: 22px; }
  .landing-page .brandLogo{ height: 28px; }
  .landing-page .heroCtas .btn{ min-height: 44px; }
}
.hero{ padding: 22px 0 10px; }
.heroGrid{
  display:grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px 32px;
  align-items: center;
}
@media (max-width: 960px){
  .heroGrid{ grid-template-columns: 1fr; }
}
.badgeRow{ display:flex; gap:10px; flex-wrap:wrap; }
.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  border:1px solid hsl(var(--border));
  background: hsl(var(--panel2)/0.6);
}
.badgeBlue{ border-color: hsl(var(--blue)/0.35); }
.badgeGreen{ border-color: hsl(var(--green)/0.35); }
.badgeOrange{ border-color: hsl(var(--orange)/0.35); }
.heroTitle{
  margin: 14px 0 0;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
@media (max-width: 720px){ .heroTitle{ font-size: 36px; } }
.heroAccent{
  background: linear-gradient(135deg, hsl(var(--blue)), hsl(var(--green)) 55%, hsl(var(--orange)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.heroSubtitle{
  margin-top: 12px;
  color: hsl(var(--muted));
  font-size: 15px;
  line-height: 1.6;
  max-width: 56ch;
}
.heroCtas{ display:flex; gap:10px; flex-wrap:wrap; margin-top: 18px; }
.heroFootnote{ margin-top: 12px; font-size: 12px; }

.landing-page .landingIntelHeroSpotlight{
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid hsl(var(--blue) / 0.45);
  background: linear-gradient(
    125deg,
    hsl(var(--blue) / 0.16) 0%,
    hsl(var(--panel2) / 0.55) 42%,
    hsl(280 55% 50% / 0.08) 100%
  );
  font-size: 14px;
  line-height: 1.55;
  color: hsl(var(--text));
  max-width: 52rem;
  box-shadow: 0 10px 28px hsl(var(--blue) / 0.08);
}
[data-theme="light"] .landing-page .landingIntelHeroSpotlight{
  background: linear-gradient(
    125deg,
    hsl(var(--blue) / 0.1) 0%,
    hsl(var(--panel2) / 0.95) 45%,
    hsl(280 45% 55% / 0.06) 100%
  );
}
.landing-page .landingIntelHeroSpotlightLink{
  display: inline-block;
  margin-top: 8px;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  color: hsl(var(--blue));
  border-bottom: 1px solid hsl(var(--blue) / 0.35);
}
.landing-page .landingIntelHeroSpotlightLink:hover{
  border-bottom-color: hsl(var(--blue) / 0.65);
  filter: brightness(1.06);
}
.landing-page .landingBtnIntel{
  border: 1px solid hsl(var(--blue) / 0.42);
  background: linear-gradient(180deg, hsl(var(--blue) / 0.14), hsl(var(--panel2) / 0.35));
  color: hsl(var(--text));
  font-weight: 700;
}
.landing-page .landingBtnIntel:hover{
  border-color: hsl(var(--blue) / 0.55);
  background: linear-gradient(180deg, hsl(var(--blue) / 0.2), hsl(var(--panel2) / 0.5));
}
.landing-page .landingBadgeIntel{
  font-weight: 800;
  border-color: hsl(var(--blue) / 0.4);
  background: linear-gradient(135deg, hsl(var(--blue) / 0.2), hsl(var(--panel) / 0.5));
}

.landing-page .landingIntel--spotlight{
  border-color: hsl(var(--blue) / 0.38);
  box-shadow: 0 18px 48px hsl(var(--blue) / 0.07);
}
.landing-page .landingIntelCard--accent{
  border: 1px solid hsl(var(--blue) / 0.38);
  background: linear-gradient(
    165deg,
    hsl(var(--blue) / 0.1) 0%,
    hsl(var(--panel) / 0.98) 58%
  );
}
[data-theme="light"] .landing-page .landingIntelCard--accent{
  background: linear-gradient(
    165deg,
    hsl(var(--blue) / 0.07) 0%,
    hsl(var(--panel)) 58%
  );
}

.landing-page .landingPdvSpotlight{
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid hsl(var(--orange) / 0.42);
  background: linear-gradient(135deg, hsl(var(--orange) / 0.14), hsl(var(--blue) / 0.08));
  font-size: 14px;
  line-height: 1.55;
  color: hsl(var(--text));
  max-width: 52rem;
}
.heroMock{ border-radius: var(--radius); overflow:hidden; }
.mockTop{
  display:flex; align-items:center; gap:8px;
  padding: 12px 14px;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--panel2)/0.85);
}
.dot{ width:10px; height:10px; border-radius: 999px; }
.dotRed{ background: rgba(239,68,68,0.85); }
.dotYellow{ background: rgba(234,179,8,0.85); }
.dotGreen{ background: rgba(34,197,94,0.85); }
.mockTitle{ margin-left:8px; font-weight:800; font-size: 12px; color: hsl(var(--muted)); }
.mockBody{ padding: 14px; }
.mockKpis{ display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap:10px; }
@media (max-width: 960px){ .mockKpis{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mockKpi{ height: 56px; border-radius: 14px; border:1px solid hsl(var(--border)); background: hsl(var(--panel2)/0.7); }
.mockKpiBlue{ border-color: hsl(var(--blue)/0.35); }
.mockKpiGreen{ border-color: hsl(var(--green)/0.35); }
.mockKpiOrange{ border-color: hsl(var(--orange)/0.35); }
.mockCharts{ display:grid; grid-template-columns: 1fr 1fr; gap:10px; margin-top: 10px; }
@media (max-width: 960px){ .mockCharts{ grid-template-columns: 1fr; } }
.mockChart{ height: 120px; border-radius: 14px; border:1px solid hsl(var(--border)); background: linear-gradient(180deg, hsl(var(--panel2)/0.75), transparent); }
.mockTable{ height: 110px; border-radius: 14px; border:1px solid hsl(var(--border)); margin-top: 10px; background: linear-gradient(180deg, transparent, hsl(var(--panel2)/0.55)); }

.section{ padding: 18px 0; }
.sectionHeader{ margin-bottom: 12px; }
.sectionTitle{ margin: 0; font-size: 22px; letter-spacing: -0.02em; }
.sectionSubtitle{ margin-top: 6px; color: hsl(var(--muted)); font-size: 14px; line-height: 1.6; }

.feature{ position: relative; overflow: hidden; }
.featureIcon{
  width: 12px; height:12px; border-radius: 4px;
  background: hsl(var(--text)/0.08);
  border: 1px solid hsl(var(--border));
}
.featureIconBlue{ background: hsl(var(--blue)/0.18); border-color: hsl(var(--blue)/0.35); }
.featureIconGreen{ background: hsl(var(--green)/0.18); border-color: hsl(var(--green)/0.35); }
.featureIconOrange{ background: hsl(var(--orange)/0.18); border-color: hsl(var(--orange)/0.35); }
.featureTitle{ margin-top: 10px; font-weight: 900; }
.featureDesc{ margin-top: 6px; color: hsl(var(--muted)); font-size: 14px; line-height: 1.6; }

.cta{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.ctaActions{ display:flex; gap:10px; flex-wrap:wrap; }

/* Planos */
.plansGrid{ align-items: stretch; margin-bottom: 24px; }
.planCard{
  display: flex;
  flex-direction: column;
  position: relative;
  border-radius: var(--radius);
  overflow: visible;
}
.planCardBasic{ border-color: hsl(var(--blue)/0.35); }
.planCardHighlight{
  border-color: hsl(var(--green)/0.5);
  box-shadow: 0 0 0 2px hsl(var(--green)/0.15), 0 12px 40px hsl(var(--shadow)/0.3);
}
.planCardAdvanced{ border-color: hsl(var(--orange)/0.35); }

.plansGridSaaS{
  gap: 20px;
}
@media (min-width: 960px){
  .plansGridSaaS{
    grid-template-columns: 1fr 1.12fr 1fr;
    align-items: stretch;
  }
  .planCardFeatured{
    padding-top: 22px;
    padding-bottom: 22px;
    box-shadow: 0 0 0 2px hsl(var(--green)/0.2), 0 20px 50px hsl(var(--shadow)/0.35);
  }
}
.planTierTagline{
  margin: 6px 0 0;
  font-size: 13px;
  color: hsl(var(--muted));
  line-height: 1.45;
}
.planPriceLg{ font-size: 34px; }
.planCtaLg{
  min-height: 48px;
  font-size: 15px;
  font-weight: 800;
}
.planPsychologyRow{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 8px 0 20px;
}
.planPsychologyChip{
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--panel2) / 0.65);
  color: hsl(var(--muted));
  font-weight: 600;
}

.planUsagePanel .planUsageGrid{
  display: grid;
  gap: 14px;
}
@media (min-width: 720px){
  .planUsagePanel .planUsageGrid{
    grid-template-columns: repeat(3, 1fr);
  }
}
.planUsageLabel{
  font-size: 12px;
  font-weight: 600;
  color: hsl(var(--muted2));
  text-transform: uppercase;
  letter-spacing: .04em;
}
.planUsageRowUnl .planUsageLabel{ margin-right: 8px; }
.planUsageBar{
  height: 8px;
  border-radius: 6px;
  background: hsl(var(--panel2));
  margin-top: 8px;
  position: relative;
  overflow: hidden;
}
.planUsageBar::after{
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--pct, 0%);
  background: hsl(var(--blue));
  border-radius: 6px;
  transition: width 0.25s ease;
}
.planUsageBarWarn::after{ background: hsl(var(--orange)); }
.planUsageBarBlock::after{ background: hsl(0 65% 48%); }

.planLimitModal{
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.planLimitModal[hidden]{
  display: none !important;
}
.planLimitModalBackdrop{
  position: absolute;
  inset: 0;
  background: hsl(0 0% 0% / 0.55);
  cursor: pointer;
}
.planLimitModalCard{
  position: relative;
  z-index: 1;
  max-width: 440px;
  width: 100%;
}

.planBadge{
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  background: linear-gradient(135deg, hsl(var(--green)), hsl(var(--green)/0.85));
  color: white;
  white-space: nowrap;
  box-shadow: 0 4px 12px hsl(var(--green)/0.3);
}
.planCardHeader{ margin-bottom: 10px; }
.planCardHeader .badge{ font-weight: 700; }
.planPrice{ font-size: 28px; font-weight: 900; letter-spacing: -0.03em; }
.planPeriod{ font-size: 14px; font-weight: 600; color: hsl(var(--muted)); }

.planSpecs{
  margin: 14px 0 0;
  padding: 14px 0;
  list-style: none;
  border-top: 1px solid hsl(var(--border));
  border-bottom: 1px solid hsl(var(--border));
}
.planSpecs li{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 14px;
  color: hsl(var(--muted));
}
.planSpecs li:first-child{ padding-top: 0; }
.planSpecs li:last-child{ padding-bottom: 0; }
.planSpecLabel{
  font-size: 12px;
  font-weight: 600;
  color: hsl(var(--muted2));
  text-transform: uppercase;
  letter-spacing: .05em;
}

.planFeature{
  display: flex;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  background: hsl(var(--panel2)/0.6);
  border: 1px solid hsl(var(--border));
}
.planFeature .featureIcon{ flex-shrink: 0; margin-top: 2px; }
.planFeature .featureTitle{ margin-top: 0; font-size: 14px; }
.planFeature .featureDesc{ margin-top: 4px; font-size: 12px; }
.planCardHighlight .planFeature{
  background: hsl(var(--green)/0.08);
  border-color: hsl(var(--green)/0.25);
}

.planDesc{ margin-top: 8px; color: hsl(var(--muted)); font-size: 13px; line-height: 1.5; flex: 1; }
.planCta{ margin-top: 16px; width: 100%; }
.planCardBasic .planCta,
.planCardAdvanced .planCta{ border-color: hsl(var(--border)); }
.planCardBasic .planCta:hover{ border-color: hsl(var(--blue)/0.5); background: hsl(var(--blue)/0.1); }
.planCardAdvanced .planCta:hover{ border-color: hsl(var(--orange)/0.5); background: hsl(var(--orange)/0.1); }

/* Tenant list pagination */
.tenant-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid hsl(var(--border));
}
.tenant-pagination ul {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0.25rem;
}
.tenant-pagination li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.5rem;
  border-radius: 8px;
  color: hsl(var(--muted));
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
}
.tenant-pagination li a:hover {
  background: hsl(var(--panel2));
  color: hsl(var(--text));
}
.tenant-pagination li.active a {
  background: hsl(var(--blue) / 0.25);
  color: hsl(var(--text));
}
.tenant-pagination-info {
  font-size: 0.85rem;
  color: hsl(var(--muted));
}

.planCompareWrap{ margin-top: 8px; }
.planCompareTitle{ margin: 0 0 12px; font-size: 18px; font-weight: 800; }
.planTableWrap{ overflow-x: auto; padding: 0; }
.planCompareTable{
  width: 100%;
  min-width: 560px;
  font-size: 14px;
}
.planCompareTable th{ padding: 12px 14px; }
.planCompareTable td{ padding: 10px 14px; }
.planCompareTable thead th:nth-child(2){ text-align: center; }
.planCompareTable thead th:nth-child(3){ text-align: center; background: hsl(var(--blue)/0.08); }
.planCompareTable thead th:nth-child(4){ text-align: center; }
.planCompareTable tbody td:nth-child(2){ text-align: center; }
.planCompareTable tbody td:nth-child(3){ text-align: center; background: hsl(var(--blue)/0.04); }
.planCompareTable tbody td:nth-child(4){ text-align: center; }
.planCompareTable tfoot td{
  text-align: left;
  font-size: 12px;
  line-height: 1.55;
  color: hsl(var(--muted));
  padding: 14px;
  border-top: 1px solid hsl(var(--border) / 0.45);
  vertical-align: top;
}
.planCheck{ color: hsl(var(--green)); font-weight: 800; }
.planCross{ color: hsl(var(--muted2)); font-size: 12px; }

/* Manual do Usuário */
.manualHero{
  background: linear-gradient(135deg, hsl(var(--blue)/0.15) 0%, hsl(var(--panel) / 0.9) 50%, hsl(var(--green)/0.08) 100%);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 36px 40px;
  margin-bottom: 24px;
}
.manualHeroTitle{ margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.manualHeroDesc{ margin: 16px 0 0; font-size: 15px; color: hsl(var(--muted)); line-height: 1.6; }
.manualLayout{ display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; }
@media (max-width: 960px){ .manualLayout{ grid-template-columns: 1fr; } }
.manualSidebar{
  position: sticky;
  top: 24px;
  background: hsl(var(--panel) / 0.6);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 16px;
}
.manualSidebarTitle{ font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: hsl(var(--muted2)); margin: 0 0 12px; padding: 0 8px; }
.manualNavLink{
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 13px;
  color: hsl(var(--text));
  border: 1px solid transparent;
  margin-bottom: 4px;
  transition: background .12s, border-color .12s, color .12s;
}
.manualNavLink:hover{ background: hsl(var(--panel2)); border-color: hsl(var(--border)); }
.manualNavLink:last-child{ margin-bottom: 0; }
.manualSection{
  background: hsl(var(--panel) / 0.5);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 20px;
  scroll-margin-top: 100px;
}
.manualSection:last-of-type{ margin-bottom: 0; }
.manualSection h2{
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  padding-bottom: 12px;
  border-bottom: 1px solid hsl(var(--border)/0.6);
}
.manualSection h3{
  margin: 20px 0 10px;
  font-size: 15px;
  font-weight: 600;
  color: hsl(var(--text));
}
.manualSection h3:first-of-type{ margin-top: 0; }
.manualSection p{ margin: 0 0 12px; font-size: 14px; line-height: 1.6; color: hsl(var(--text)); }
.manualSection p:last-child{ margin-bottom: 0; }
.manualSection ul, .manualSection ol{ margin: 0 0 16px; padding-left: 20px; }
.manualSection li{ margin-bottom: 6px; font-size: 14px; line-height: 1.55; color: hsl(var(--text)); }
.manualStepList{ counter-reset: step; list-style: none; padding-left: 0; }
.manualStepList li{
  position: relative;
  padding-left: 44px;
  margin-bottom: 12px;
  min-height: 32px;
}
.manualStepList li::before{
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(135deg, hsl(var(--blue)/0.25), hsl(var(--blue)/0.12));
  border: 1px solid hsl(var(--blue)/0.35);
  border-radius: 8px;
  color: hsl(var(--blue));
}
.manualBackTop{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  margin-top: 24px;
  border-radius: 12px;
  background: hsl(var(--panel2) / 0.8);
  border: 1px solid hsl(var(--border));
  color: hsl(var(--muted));
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .12s, color .12s, border-color .12s;
}
.manualBackTop:hover{ background: hsl(var(--panel2)); color: hsl(var(--text)); border-color: hsl(var(--blue)/0.3); }

/* Driver.js — tour de boas-vindas (tema Estoqfy) */
.driver-popover.estoqfy-driver-popover{
  all: unset;
  box-sizing: border-box;
  margin: 0;
  padding: 22px 22px 18px;
  min-width: 280px;
  max-width: min(400px, calc(100vw - 32px));
  border-radius: var(--radius, 16px);
  background: linear-gradient(155deg, hsl(var(--panel) / 0.98) 0%, hsl(var(--panel2) / 0.99) 100%);
  border: 1px solid hsl(var(--border));
  box-shadow:
    0 0 0 1px hsl(var(--blue) / 0.12),
    0 24px 48px -12px hsl(var(--shadow) / 0.55),
    0 12px 24px -8px hsl(var(--blue) / 0.08);
  color: hsl(var(--text));
  z-index: 1000000001 !important;
  font-family: inherit;
}
.driver-popover.estoqfy-driver-popover *{
  font-family: inherit;
  box-sizing: border-box;
}
.driver-popover.estoqfy-driver-popover .driver-popover-title{
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: hsl(var(--text));
}
.driver-popover.estoqfy-driver-popover .driver-popover-description{
  font-size: 0.9rem;
  line-height: 1.55;
  color: hsl(var(--muted));
  margin-top: 8px;
}
.driver-popover.estoqfy-driver-popover .driver-popover-description strong{
  color: hsl(var(--text));
  font-weight: 600;
}
.driver-popover.estoqfy-driver-popover .driver-popover-progress-text{
  font-size: 12px;
  font-weight: 600;
  color: hsl(var(--muted2));
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.driver-popover.estoqfy-driver-popover .driver-popover-footer{
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid hsl(var(--border));
}
.driver-popover.estoqfy-driver-popover .driver-popover-footer button{
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .12s;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--panel2));
  color: hsl(var(--text));
}
.driver-popover.estoqfy-driver-popover .driver-popover-next-btn{
  background: linear-gradient(135deg, hsl(var(--blue)), hsl(var(--blue) / 0.85));
  border-color: hsl(var(--blue) / 0.5);
  color: #fff;
}
.driver-popover.estoqfy-driver-popover .driver-popover-next-btn:hover{
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.driver-popover.estoqfy-driver-popover .driver-popover-prev-btn:hover,
.driver-popover.estoqfy-driver-popover .driver-popover-close-btn:hover{
  background: hsl(var(--panel));
  border-color: hsl(var(--blue) / 0.25);
  color: hsl(var(--text));
}
.driver-popover.estoqfy-driver-popover .driver-popover-close-btn{
  color: hsl(var(--muted2));
  font-size: 22px;
  line-height: 1;
  padding: 4px 8px;
  border: none;
  background: transparent;
}
.driver-popover.estoqfy-driver-popover .driver-popover-arrow{
  border-color: hsl(var(--panel)) !important;
}
[data-theme="light"] .driver-popover.estoqfy-driver-popover .driver-popover-arrow{
  border-color: hsl(var(--panel)) !important;
}

/* --- Marketing / SEO (somente páginas com .landing-page no body) --- */
/* Largura total do .container, alinhado às demais seções (grid, planos, etc.). */
.landing-page .landingSeoSection{
  text-align: left;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.landing-page .landingSeoSection .sectionHeader,
.landing-page .landingSeoSection .sectionTitle,
.landing-page .landingSeoSection .sectionSubtitle{
  text-align: left;
  max-width: none;
}
.landing-page .landingSeoSection .landingSeoArticle,
.landing-page .container > .landingSeoArticle{
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  text-align: left;
  box-sizing: border-box;
}
.landing-page .landingSeoArticle h1,
.landing-page .landingSeoArticle h2{
  text-align: left;
}
.landing-page .landingSeoArticle--home p,
.landing-page .landingSeoArticle p{
  font-size: 1rem;
  line-height: 1.65;
  color: hsl(var(--muted));
  margin: 0 0 1rem;
  text-align: left;
}
.landing-page .landingSeoArticle--home p strong,
.landing-page .landingSeoArticle p strong{
  color: hsl(var(--text));
  font-weight: 600;
}
/* Não estilizar .btn como link de parágrafo (páginas temáticas + bloco SEO na home). */
.landing-page .landingSeoArticle--home a:not(.btn),
.landing-page .landingSeoArticle a:not(.btn){
  color: hsl(var(--blue));
  text-decoration: underline;
  text-underline-offset: 2px;
}
.landing-page .landingSeoArticle--home a:not(.btn):hover,
.landing-page .landingSeoArticle a:not(.btn):hover{
  filter: brightness(1.08);
}
.landing-page .landingSeoH3{
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 1.75rem 0 0.65rem;
  color: hsl(var(--text));
  text-align: left;
}
.landing-page .landingSeoArticle--home .landingSeoH3:first-of-type{
  margin-top: 0.5rem;
}
.landing-page .landingSeoBreadcrumb{
  font-size: 0.9rem;
  margin: 0 0 1rem;
}
.landing-page .landingSeoBreadcrumb a{
  color: hsl(var(--muted2));
  text-decoration: none;
}
.landing-page .landingSeoBreadcrumb a:hover{
  color: hsl(var(--blue));
  text-decoration: underline;
}
.landing-page .landingSeoLead{
  font-size: 1.05rem;
  line-height: 1.6;
  color: hsl(var(--muted));
  margin: 0 0 1.25rem;
}
.landing-page .landingSeoLinks{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid hsl(var(--border));
  font-size: 0.95rem;
  text-align: left;
}
.landing-page .landingSeoLinksLabel{
  color: hsl(var(--muted2));
  font-weight: 600;
  margin-right: 0.25rem;
}
.landing-page .landingSeoLinks a{
  color: hsl(var(--blue));
  text-decoration: none;
  font-weight: 500;
}
.landing-page .landingSeoLinks a:hover{
  text-decoration: underline;
}
.landing-page .landingSeoCta{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.landing-page .landingSeoCta .btn{
  text-decoration: none;
  font-weight: 600;
  box-sizing: border-box;
}
.landing-page .landingSeoCta .btn:hover{
  filter: none;
}
.landing-page .landingSeoCta .btnPrimary{
  color: #fff;
}
.landing-page .landingSeoCta .btnPrimary:hover{
  filter: brightness(1.06);
}
@media (max-width: 480px){
  .landing-page .landingSeoCta .btn{
    min-height: 44px;
  }
}
@media (max-width: 640px){
  .landing-page .landingSeoSection .sectionHeader{
    text-align: left;
  }
  .landing-page .landingSeoH3{
    font-size: 1.1rem;
  }
}

/* --- Modal global de carregamento (não fechável; acima do modal de limite de plano) --- */
body.global-loading-modal-open{
  overflow: hidden;
}
.globalLoadingModal{
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}
.globalLoadingModal[hidden]{
  display: none !important;
}
.globalLoadingModal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  cursor: wait;
}
.globalLoadingModal__card{
  position: relative;
  z-index: 1;
  max-width: 380px;
  width: 100%;
  text-align: center;
  pointer-events: none;
  user-select: none;
}
.globalLoadingModal__spinner{
  width: 40px;
  height: 40px;
  margin: 0 auto 14px;
  border: 3px solid hsl(var(--border));
  border-top-color: hsl(var(--blue));
  border-radius: 50%;
  animation: globalLoadingModalSpin 0.75s linear infinite;
}
@keyframes globalLoadingModalSpin{
  to { transform: rotate(360deg); }
}
.globalLoadingModal__text{
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  color: hsl(var(--foreground));
}

/* Acessível: esconde visualmente mantendo leitura por leitor de ecrã */
.visually-hidden{
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* --- Central de Inteligência --- (usa largura útil da área principal; padding reduzido) */
body.app-area .content:has(.intelPage){
  padding-left: 12px;
  padding-right: 12px;
}
@media (min-width: 1100px){
  body.app-area .content:has(.intelPage){
    padding-left: 18px;
    padding-right: 18px;
  }
}
.intelPage{
  max-width: none;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}
.intelKpiStrip{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.intelKpiCard{
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--panel2) / 0.55);
  min-width: 0;
}
.intelKpiCard--warn{
  border-color: hsl(var(--orange) / 0.55);
  background: hsl(var(--orange) / 0.12);
}
.intelKpiLabel{
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: hsl(var(--muted2));
  margin-bottom: 6px;
  line-height: 1.3;
}
.intelKpiValue{
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: hsl(var(--text));
  line-height: 1.25;
}
.intelKpiWarnText{
  color: hsl(var(--orange));
}
.intelKpiSub{
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.35;
}
.intelIntro{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
@media (min-width: 1024px){
  .intelIntro{ grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 640px){
  .intelIntro{ grid-template-columns: 1fr; }
}
.intelIntroCard{
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--panel2) / 0.65);
  font-size: 13px;
  line-height: 1.5;
  color: hsl(var(--muted));
}
.intelIntroCard strong{
  display: block;
  font-size: 14px;
  color: hsl(var(--text));
  margin-bottom: 6px;
}
.intelIntroCard--accent{
  border-color: hsl(var(--blue) / 0.35);
  background: linear-gradient(135deg, hsl(var(--panel2)) 0%, hsl(var(--blue) / 0.08) 100%);
}
.intelToolbar{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--panel2) / 0.55);
}
.intelToolbarMeta{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  font-size: 13px;
  color: hsl(var(--muted2));
}
.intelStatPills{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.intelPill{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--panel));
  color: hsl(var(--text));
}
.intelPill--amber{ border-color: hsl(var(--orange) / 0.45); color: hsl(var(--orange)); }
.intelPill--blue{ border-color: hsl(var(--blue) / 0.45); color: hsl(var(--blue)); }
.intelPill--rose{ border-color: hsl(0 70% 55% / 0.45); color: hsl(0 72% 62%); }
[data-theme="light"] .intelPill--rose{ color: hsl(0 65% 38%); }

.intelGrid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 960px){
  .intelGrid{ grid-template-columns: 1fr; }
}
.intelColumn{
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--panel));
}
.intelColumnHead{
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid hsl(var(--border) / 0.85);
}
.intelColumnIcon{
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 20px;
  line-height: 1;
}
.intelColumn--alerts .intelColumnIcon{
  background: hsl(var(--orange) / 0.18);
}
.intelColumn--opportunities .intelColumnIcon{
  background: hsl(var(--blue) / 0.18);
}
.intelColumn--risks .intelColumnIcon{
  background: hsl(0 70% 50% / 0.15);
}
.intelColumnTitle{
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: hsl(var(--text));
}
.intelColumnDesc{
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: hsl(var(--muted2));
}
.intelCardList{
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.intelCard{
  padding: 14px 14px 14px 16px;
  border-radius: 12px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--panel2) / 0.45);
  border-left: 4px solid hsl(var(--border));
  transition: border-color 0.15s, box-shadow 0.15s;
}
.intelCard:hover{
  border-color: hsl(var(--border) / 0.95);
  box-shadow: 0 4px 14px hsl(var(--shadow) / 0.12);
}
.intelCard--low_stock{ border-left-color: hsl(var(--orange)); }
.intelCard--dead_stock{ border-left-color: hsl(var(--blue)); }
.intelCard--sales_drop{ border-left-color: hsl(var(--orange)); }
.intelCard--overdue_receivable,
.intelCard--overdue_payable{ border-left-color: hsl(0 72% 55%); }
.intelCardTag{
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: hsl(var(--panel2));
  color: hsl(var(--muted2));
  border: 1px solid hsl(var(--border));
}
.intelCardTitle{
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: hsl(var(--text));
  line-height: 1.35;
}
.intelCardDetail{
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: hsl(var(--muted));
}
.intelEmpty{
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 12px;
  border-radius: 12px;
  border: 1px dashed hsl(var(--border));
  background: hsl(var(--panel2) / 0.35);
}
.intelEmptyIcon{
  font-size: 32px;
  line-height: 1;
  margin-bottom: 10px;
  opacity: 0.85;
}
.intelEmpty p{
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: hsl(var(--muted2));
  max-width: 260px;
}
.intelLoading{
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 48px 24px;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--panel2) / 0.4);
}
.intelSpinner{
  width: 36px;
  height: 36px;
  border: 3px solid hsl(var(--border));
  border-top-color: hsl(var(--blue));
  border-radius: 50%;
  animation: globalLoadingModalSpin 0.75s linear infinite;
}
.intelChatExamples{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.intelChip{
  cursor: pointer;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--panel2));
  color: hsl(var(--text));
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  line-height: 1.2;
  transition: background 0.15s, border-color 0.15s;
}
.intelChip:hover{
  border-color: hsl(var(--blue) / 0.5);
  background: hsl(var(--blue) / 0.12);
}
.intelChip:focus-visible{
  outline: 2px solid hsl(var(--blue));
  outline-offset: 2px;
}
.intelAnswerIntent{
  font-size: 12px;
  font-weight: 600;
  color: hsl(var(--muted2));
  margin-bottom: 10px;
}
.intelAnswerBody{
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: hsl(var(--text));
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Primeiros passos — cartões do mapa / destaques (IA, manual, DMs, alertas) */
.onboardingStepGrid{
  display: grid;
  gap: 10px;
}
.onboardingStepCard{
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  background: hsl(var(--panel) / 0.35);
}
.onboardingStepCard--highlight{
  border-color: hsl(var(--blue) / 0.55);
  background: linear-gradient(
    135deg,
    hsl(var(--blue) / 0.14) 0%,
    hsl(var(--panel2) / 0.55) 48%,
    hsl(var(--orange) / 0.08) 100%
  );
  box-shadow:
    0 0 0 1px hsl(var(--blue) / 0.2),
    0 6px 20px hsl(var(--shadow) / 0.12);
}
[data-theme="light"] .onboardingStepCard--highlight{
  box-shadow:
    0 0 0 1px hsl(var(--blue) / 0.35),
    0 8px 24px hsl(var(--shadow) / 0.08);
}
.onboardingStepBadge{
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: hsl(var(--blue) / 0.22);
  color: hsl(var(--text));
  border: 1px solid hsl(var(--blue) / 0.4);
}
.onboardingStepCta{
  background: hsl(var(--blue) / 0.22);
  border-color: hsl(var(--blue) / 0.55);
  color: hsl(var(--text));
  font-weight: 600;
}
.onboardingStepCta:hover{
  background: hsl(var(--blue) / 0.32);
  border-color: hsl(var(--blue) / 0.75);
}
