/* =========================
   Reset CSS Base
   ========================= */

/* Box-sizing global */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Tipografia base */
html, body {
  height: 100%;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Elementos HTML5 como block */
article, aside, details, figcaption, figure,
footer, header, hgroup, main, menu, nav, section {
  display: block;
}

/* Listas sem estilo */
menu, ol, ul { list-style: none; }

/* Citações sem aspas automáticas */
blockquote, q { quotes: none; }
blockquote::before, blockquote::after,
q::before, q::after { content: ''; }

/* Tabelas colapsadas */
table { border-collapse: collapse; border-spacing: 0; }

/* Normalização de formulários */
input, select, button, textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
  line-height: normal;
  vertical-align: middle;
}

/* Remove estilos nativos inconsistentes */
button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}

/* Imagens responsivas */
img {
  max-width: 100%;
  height: auto;
  display: block;
}
/* =========================================================
   Design tokens base + temas (claro, escuro, mono, daltônico)
   - WCAG AAA: pares texto/fundo ≥ 7:1 (texto normal)
   - CSP-performance: sem @import externo; fallbacks seguros
   - Alternância de tema instantânea via classe no <body>
   - Overlay global controlado, sem véu branco em tema claro
   - Ajuste dinâmico de fonte via [data-font-scale]
   ========================================================= */

/* ===========================
   Tokens comuns (não temáticos)
   =========================== */
:root {
  /* Paleta estrutural (fallbacks neutros) */
  --color-bg: #0D0D0F;                 /* fallback quando sem tema */
  --color-surface: #1b1b1f;
  --color-surface-alt: #222229;

  /* Texto e acentos (fallbacks) */
  --color-text-primary: #F5F5F5;
  --color-text-secondary: #A6A6A6;
  --color-primary: #d4af37;
  --color-primary-dark: #b8962e;
  --color-primary-hover: #ffcc5c;
  --color-accent: #0097a7;
  --color-accent-alt: #00e6e6;
  --color-accent-current: #F5F5F5;     /* atualizado por tema */

  /* Estados */
  --color-secondary: #6c757d;
  --color-danger: #e74c3c;
  --color-warning: #ffc107;
  --color-success: #2ecc71;

  /* Inputs e bordas */
  --color-input-bg: #121215;
  --color-border: rgba(244,182,58,.20);

  /* Tipografia (CSP-friendly) */
  --font-main: 'Segoe UI', Arial, sans-serif;
  --font-base: 'Segoe UI', Arial, sans-serif;

  /* Escalas base (multiplicadas por --font-scale) */
  --font-size-sm: 0.875rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-xxl: 2rem;

  /* Controle global de escala */
  --font-scale: 1;

  /* Espaçamentos */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;

  /* Layout */
  --sidebar-width: 240px;
  --sidebar-collapsed: 60px;
  --gutter: 32px;
  --sidebar-offset-top: 12px;

  /* Bordas */
  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 9999px;

  /* Sombras */
  --shadow-card: 0 4px 8px rgba(0,0,0,0.4);
  --shadow-card-lg: 0 8px 24px rgba(0,0,0,0.35);
  --shadow-inset-soft: inset 0 0 6px rgba(0,151,167,.25);
  --shadow-glow: 0 0 8px rgba(0,230,230,.35);
  --shadow-glow-strong: 0 0 12px rgba(0,230,230,.5);

  /* Transições */
  --transition-fast: all .15s ease;
  --transition: all .25s ease;
  --transition-slow: all .4s ease;

  /* Foco (visível) */
  --focus-outline: 0 0 0 3px rgba(244,182,58,.35);
  --focus-outline-strong: 0 0 0 3px rgba(0,230,230,.45);

  /* Charts */
  --chart-success: #2ecc71;
  --chart-danger: #e74c3c;
  --chart-accent: #2196f3;
  --chart-bar: var(--color-accent);

  /* Z-index (hierarquia segura) */
  --z-base: 1;
  --z-dropdown: 1100;
  --z-overlay: 900;   /* overlay global abaixo do modal */
  --z-modal: 1200;
  --z-toast: 1300;

  /* Avatares */
  --avatar-size-header: 56px;
  --avatar-size-popup: 120px;
  --avatar-border: 2px solid #fff;
  --avatar-shadow: 0 0 6px rgba(0,0,0,.4);

  /* Acessibilidade adicional */
  --motion-reduce-duration: .01ms;

  /* Links */
  --link-decoration-default: underline;

  /* Overlay global (tema-aware, seguro em tema claro)
     Importante: usamos overlay escuro no tema claro para evitar "véu" branco */
  --overlay-strength: 0.35; /* recomendado 0.3–0.8 */
  --overlay-bg: rgba(0,0,0,var(--overlay-strength));

  /* Gradientes (tema atualiza) */
  --gradient-header: linear-gradient(90deg, rgba(15,15,16,.95), rgba(26,26,29,.9));
  --gradient-surface: linear-gradient(180deg, #1b1b1f 0%, #222229 100%);
}

/* ===========================
   Temas com contraste AAA (aplicados no body)
   =========================== */

/* Tema Claro */
body.theme-light {
  --color-bg: #FFFFFF;
  --color-text-primary: #0D0D0F;
  --color-text-secondary: #232323;
  --color-input-bg: #FAFAFA;
  --color-border: rgba(12,12,16,.15);
  --color-accent-current: #0D0D0F;

  /* Overlay escuro em tema claro para não "lavar" a tela */
  --overlay-bg: rgba(0,0,0,0.30);
  --gradient-header: linear-gradient(90deg, rgba(255,255,255,.95), rgba(240,240,240,.9));
  --gradient-surface: linear-gradient(180deg, #FFFFFF 0%, #F5F5F5 100%);
}

/* Tema Escuro */
body.theme-dark {
  --color-bg: #0D0D0F;
  --color-text-primary: #F5F5F5;
  --color-text-secondary: #A6A6A6;
  --color-input-bg: #121215;
  --color-border: rgba(244,182,58,.20);
  --color-accent-current: #F5F5F5;

  --overlay-bg: rgba(0,0,0,var(--overlay-strength));
  --gradient-header: linear-gradient(90deg, rgba(15,15,16,.95), rgba(26,26,29,.9));
  --gradient-surface: linear-gradient(180deg, #1b1b1f 0%, #222229 100%);
}

/* Tema Monocromático Claro */
body.theme-mono-light {
  --color-bg: #FFFFFF;
  --color-text-primary: #0D0D0F;
  --color-text-secondary: #555555;
  --color-input-bg: #FAFAFA;
  --color-border: rgba(12,12,16,.15);
  --color-accent-current: #0D0D0F;

  /* overlay escuro no modo claro */
  --overlay-bg: rgba(0,0,0,0.30);
}

/* Tema Monocromático Escuro */
body.theme-mono-dark {
  --color-bg: #0D0D0F;
  --color-text-primary: #F5F5F5;
  --color-text-secondary: #A6A6A6;
  --color-input-bg: #121215;
  --color-border: rgba(244,182,58,.20);
  --color-accent-current: #F5F5F5;

  --overlay-bg: rgba(0,0,0,var(--overlay-strength));
}

/* Tema Daltônico Claro (acentos mais distinguíveis) */
body.theme-dalt-light {
  --color-bg: #FFFFFF;
  --color-text-primary: #0D0D0F;
  --color-text-secondary: #2B2B2B;
  --color-input-bg: #FAFAFA;
  --color-border: rgba(12,12,16,.15);
  --color-accent-current: #005fcc; /* azul forte para distinção */

  /* overlay escuro no modo claro */
  --overlay-bg: rgba(0,0,0,0.30);
}

/* Tema Daltônico Escuro (acentos mais distinguíveis) */
body.theme-dalt-dark {
  --color-bg: #0D0D0F;
  --color-text-primary: #F5F5F5;
  --color-text-secondary: #B0B0B0;
  --color-input-bg: #121215;
  --color-border: rgba(244,182,58,.20);
  --color-accent-current: #00d3ff; /* ciano forte para distinção */

  --overlay-bg: rgba(0,0,0,var(--overlay-strength));
}

/* ===========================
   Ajuste dinâmico de fonte
   =========================== */
:root[data-font-scale="sm"] { --font-scale: 0.9; }
:root[data-font-scale="md"] { --font-scale: 1; }
:root[data-font-scale="lg"] { --font-scale: 1.15; }
:root[data-font-scale="xl"] { --font-scale: 1.3; }

/* ===========================
   Base: fundo, texto e tipografia
   =========================== */
html, body {
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-main);
  font-size: calc(16px * var(--font-scale));
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

/* Texto secundário */
.muted, .text-muted {
  color: var(--color-text-secondary);
}

/* Links acessíveis */
a {
  color: var(--color-accent-current, var(--color-text-primary));
  text-decoration: var(--link-decoration-default);
  transition: color .2s ease, background-color .2s ease;
}
a:hover,
a:focus {
  color: var(--color-text-secondary);
  outline: none;
  background-color: rgba(212,175,55,0.20); /* fundo dourado translúcido */
  border-radius: 4px;
  text-decoration: underline;
  text-decoration-color: var(--color-primary);
}

/* Botões básicos (seguem acento atual do tema) */
button {
  color: var(--color-accent-current, var(--color-text-primary));
  background: transparent;
  border: 1px solid currentColor;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}
button:hover, button:focus {
  box-shadow: var(--focus-outline-strong);
}

/* Header com fallback sólido */
.header-solid,
.landing-header {
  background: var(--gradient-header);
  background-color: var(--color-bg);
}

/* ===========================
   Overlay global (acessibilidade)
   =========================== */
/* Importante: usamos ::after como overlay global,
   mas garantimos hierarquia z-index abaixo do modal via --z-overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--overlay-bg, transparent);
  pointer-events: none;
  z-index: var(--z-overlay);
}

/* Desativar overlay em páginas que não precisam (ex.: dashboard) */
body.dashboard-page::after {
  content: none !important;
  background: transparent !important;
}
body.profile-page::after {
  content: none !important;
  background: transparent !important;
}

/* ===========================
   Movimento reduzido
   =========================== */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: none;
    --transition: none;
    --transition-slow: none;
  }
}
/* Declaração das fontes AS LABS  */
@font-face {
  font-family: 'Inter';
  src: url('/static/fonts/inter/Inter-VariableFont_opsz,wght.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/static/fonts/inter/Inter-Italic-VariableFont_opsz,wght.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Space Grotesk';
  src: url('/static/fonts/space_grotesk/SpaceGrotesk-VariableFont_wght.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

/* Z-index e escalas — valores padrão seguros */
:root {
  --z-overlay: 900;
  --z-modal: 2005; /* modal sempre acima */
  --z-dropdown: 1100;
  --shadow-card: 0 2px 6px rgba(0,0,0,.25);
  --shadow-card-lg: 0 8px 24px rgba(0,0,0,.45);
  --radius: 10px;
  --radius-sm: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --gutter: 24px;
  --gutter-sm: 12px;
  --sidebar-width: 280px;
  --sidebar-collapsed: 72px;
  --space-3: 12px;
  --font-title: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-main: 'Inter', 'Segoe UI', Arial, sans-serif;
  --font-base: 'Inter', 'Segoe UI', Arial, sans-serif;
  --font-size-lg: 1.1rem;
  --font-size-md: 1rem;
  --font-scale: 1;
  --link-decoration-default: underline;
}

/* ===== 1. Reset ===== */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}
html { scroll-behavior: smooth; }

/* ===== 2. Botão voltar ao topo ===== */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2003;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  transition: transform 0.15s ease, opacity 0.15s ease;
  color: var(--color-accent-current, var(--color-text-primary));
  background: transparent;
  border: 1px solid currentColor;
}
.back-to-top:hover { transform: translateY(-2px); }
.back-to-top.is-hidden { opacity: 0; pointer-events: none; }

/* ===== 3. Body ===== */
body {
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-size: calc(16px * var(--font-scale));
  line-height: 1.6;
  animation: fadeInBackground 1.2s ease forwards;
  transition: background-color .3s ease, color .3s ease;
  text-rendering: optimizeLegibility;
}

/* Overlay global decorativo */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--overlay-bg, transparent);
  z-index: var(--z-overlay);
  pointer-events: none;
  opacity: 1;
  transition: opacity .25s ease;
}

/* Conteúdo acima do overlay */
body > * {
  position: relative;
  z-index: calc(var(--z-overlay) + 1);
}

/* Quando o modal está aberto, remove o overlay */
body.modal-open::before {
  content: none !important;
  background: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Header e acessibilidade */
.landing-header {
  position: relative;
  z-index: 2001;
}
#accessibility-toggle {
  position: relative;
  z-index: 2002;
}

/* Hero */
.landing-page .hero {
  position: relative;
  z-index: 0;
  pointer-events: none;
}
.landing-page .hero * {
  pointer-events: auto;
}

/* ===== 4. Tipografia ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: .6em;
  color: var(--color-text-primary);
}
h1 { font-size: 1.8rem; }
h2 { font-size: 1.4rem; color: var(--color-accent-current, var(--color-primary)); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }

p  { margin-bottom: 1em; color: var(--color-text-secondary); }
small { font-size: 13px; color: var(--color-text-secondary); }

a {
  color: var(--color-accent-current, var(--color-primary));
  text-decoration: var(--link-decoration-default);
  transition: color .2s ease;
}
a:hover,
a:focus {
  color: var(--color-text-secondary);
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

ul, ol { margin: 0 0 1em 1.5em; }
li { margin-bottom: .4em; }

blockquote {
  border-left: 4px solid var(--color-accent-current, var(--color-primary));
  padding-left: 12px;
  margin: 1em 0;
  color: var(--color-text-secondary);
  font-style: italic;
}

/* ===== 5. Painéis elevados ===== */
.panel-elevado {
  background: var(--gradient-surface, var(--color-bg));
  backdrop-filter: blur(6px);
  border: 1px solid rgba(244,182,58,.2);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .25s ease, background .25s ease;
}
.panel-elevado:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-lg);
}
.panel-elevado .titulo {
  font-size: var(--font-size-lg);
  color: var(--color-accent-current, var(--color-primary));
  margin-bottom: 8px;
}
.panel-elevado .subtitulo {
  color: var(--color-text-secondary);
  font-size: var(--font-size-md);
  line-height: 1.5;
}
/* ===== 6. Sidebar ===== */
.sidebar {
  grid-area: sidebar;
  position: relative;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  background: var(--color-surface, var(--color-bg));
  color: var(--color-text-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card-lg);
  z-index: 2000;
  transition: width .3s ease, background .3s ease, box-shadow .3s ease;
}
.sidebar.collapsed { width: var(--sidebar-collapsed); overflow: visible; }

.sidebar-header {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--space-3);
  border-bottom: 1px solid rgba(244,182,58,.25);
  margin-bottom: var(--space-3);
}

.sidebar-logo {
  max-width: 120px;
  max-height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(244,182,58,.4));
  transition: max-width .3s ease, max-height .3s ease;
}
.sidebar.collapsed .sidebar-logo { max-width: 32px; max-height: 32px; }

.toggle-sidebar {
  position: absolute;
  top: 100%;
  right: -18px;
  transform: translateY(-50%);
  background: var(--color-surface-alt, var(--color-bg));
  border: 1px solid rgba(244,182,58,.25);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  color: var(--color-accent-current, var(--color-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .3s ease, background .3s ease, box-shadow .3s ease;
}
.toggle-sidebar:hover {
  background: rgba(244,182,58,.15);
  box-shadow: 0 0 6px var(--color-accent-current, var(--color-accent));
}
.sidebar.collapsed .toggle-sidebar { transform: translateY(-50%) rotate(180deg); }

.sidebar-footer {
  margin-top: auto;
  font-size: 12px;
  color: var(--color-text-secondary);
  text-align: center;
  padding: 8px 0;
}

/* ===== 7. Rodapé global ===== */
.landing-footer {
  position: fixed;
  bottom: 0; left: 0; width: 100%;
  background: var(--color-bg);
  color: var(--color-text-secondary);
  font-size: 12px; line-height: 1.4;
  border-top: 1px solid rgba(244,182,58,.25);
  backdrop-filter: blur(4px);
  box-shadow: 0 -2px 8px rgba(0,0,0,.35);
  font-family: var(--font-base);

  display: flex;
  justify-content: center;
  align-items: center;

  padding: 6px 16px;
  z-index: 2000;
  overflow: visible;
}

.landing-footer .footer-text {
  text-align: center;
  flex: 1;
  position: relative;
}

.landing-footer .footer-security {
  position: absolute;
  right: 550px;
  bottom: -30px;
}

.landing-footer .footer-security img.footer-badge {
  height: 140px;
  width: auto;
  display: block;
}

/* ===== 8. Animações globais ===== */
@keyframes fadeInBackground { from {opacity:0;} to {opacity:1;} }
@keyframes fadeInContent { from {opacity:0; transform:translateY(20px);} to {opacity:1; transform:translateY(0);} }
@keyframes slideDown { from {opacity:0; transform:translateY(-20px);} to {opacity:1; transform:translateY(0);} }
@keyframes fadeOut { from {opacity:1;} to {opacity:0; height:0; margin:0; padding:0;} }
@keyframes fadeIn { from {opacity:0; transform:scale(.95);} to {opacity:1; transform:scale(1);} }
@keyframes fadeInUp { from {opacity:0; transform:translateY(20px);} to {opacity:1; transform:translateY(0);} }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ===== 9. Ajustes globais ===== */
:target { scroll-margin-top: 80px; }
.is-hidden { display: none !important; }

/* ===== 10. Dashboard Wrapper ===== */
.dashboard-wrapper {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "sidebar header"
    "sidebar main";

  min-height: 100vh;
  row-gap: var(--gutter-sm);
  column-gap: var(--gutter);

  margin: 16px;

  .sidebar { grid-area: sidebar; margin-top: 16px; margin-left: 16px; }
  .dashboard-header { grid-area: header; margin-top: 16px; }

  padding: 0 var(--gutter) calc(var(--gutter) + 48px) 0;

  background: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-main);
  border-radius: var(--radius-xl);
  box-shadow: 0 12px 32px rgba(0,0,0,.45);
  position: relative;
  overflow: visible;
}

.dashboard-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(
    135deg,
    rgba(212,175,55,0.24) 0%,
    rgba(212,175,55,0.12) 35%,
    rgba(212,175,55,0.06) 65%,
    rgba(212,175,55,0) 100%
  );
  opacity: 1;
  transition: opacity .25s ease;
}

/* ===== 11. Main Content ===== */
.main-content {
  grid-area: main;
  padding: 20px;
  position: relative;
  overflow: visible;
  z-index: 1;
  min-height: 0;
}

/* ===== 12. Header do Dashboard ===== */
.dashboard-header {
  grid-area: header;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--color-surface, var(--color-bg));
  border: 1px solid rgba(244,182,58,.15);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card, 0 2px 6px rgba(0,0,0,.25));

  font-family: var(--font-main);
  color: var(--color-text-primary);
  position: relative;
  overflow: visible;
  z-index: 2001;
}

.dashboard-header .page-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.2;
  flex: 0 0 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-text-primary);
}

.dashboard-header .subheader {
  display: block;
  margin-top: 2px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  line-height: 1.3;
}

.dashboard-header .global-search {
  flex: 1 1 auto;
  max-width: 360px;
  position: relative;
  z-index: 1;
}

.dashboard-header .user-menu {
  margin-left: auto;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2002;
}

/* ===== 13. Avatar no header ===== */
.dashboard-header .user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
  transition: background .25s ease, box-shadow .25s ease, transform .25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dashboard-header .user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.dashboard-header .user-avatar:hover {
  background: rgba(244,182,58,.12);
  box-shadow: inset 0 0 6px var(--color-accent-current, var(--color-accent));
  transform: scale(1.05);
}

/* ===== Modal ===== */
#profileModal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal); /* garante acima de overlay e dashboard */
}
/* ===== 14. Dropdown do usuário ===== */
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--color-surface, var(--color-bg));
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
  padding: 8px 0;
  z-index: var(--z-dropdown);
}
.user-dropdown a {
  display: block;
  padding: 10px 16px;
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  transition: background .25s ease, color .25s ease, box-shadow .25s ease;
}
.user-dropdown a:hover {
  background: rgba(244,182,58,.12);
  color: var(--color-accent-current, var(--color-primary));
  box-shadow: inset 0 0 6px var(--color-accent-current, var(--color-accent));
}

/* ===== 15. Responsividade do header ===== */
@media (max-width: 768px) {
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .dashboard-header .global-search {
    width: 100%;
    flex: 1 1 auto;
    max-width: none;
  }
  .dashboard-header .user-menu {
    margin-left: 0;
    align-self: flex-end;
  }
}

/* ===== 16. Login ===== */
body.login-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.login-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ===== 17. Compat extra para sidebar ===== */
.sidebar img,
.sidebar svg {
  display: block;
}

/* ===== 18. Busca Global ===== */
.global-search {
  position: relative;
  max-width: 280px;
  flex: 0 1 auto;
}
.global-search input {
  width: 100%;
  padding: 7px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--color-text-secondary);
  background: var(--color-surface, var(--color-bg));
  color: var(--color-text-primary);
  font-size: 14px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.global-search input:focus {
  background: var(--color-surface-alt, var(--color-bg));
  border-color: var(--color-accent-current, var(--color-primary));
  box-shadow: 0 0 6px var(--color-accent-current, var(--color-accent));
  outline: none;
}
.global-search input::placeholder {
  color: var(--color-text-secondary);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--color-surface-alt, var(--color-bg));
  border: 1px solid var(--color-text-secondary);
  border-radius: var(--radius);
  margin-top: 4px;
  list-style: none;
  padding: 0;
  z-index: 1200;
  box-shadow: var(--shadow-card);
}
.search-results[hidden] { display: none !important; }

.search-results li {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  transition: background .2s ease, color .2s ease;
}
.search-results li:hover {
  background: rgba(244,182,58,.12);
  color: var(--color-accent-current, var(--color-primary));
}

/* ===== 19. Dashboard Main ===== */
.dashboard-main {
  grid-area: main;
  padding: 20px;
  width: 100%;
  margin: 0;
  z-index: 1;
  min-height: 0;
}
.dashboard-main p {
  font-size: 16px;
  color: var(--color-text-secondary);
  margin-top: 20px;
}

/* ===== 20. Charts ===== */
.charts-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 24px;
  justify-content: center;
}
.chart-box {
  flex: 1 1 300px;
  max-width: 500px;
  background: var(--gradient-surface, var(--color-bg));
  backdrop-filter: blur(4px);
  border: 1px solid rgba(244,182,58,.2);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-card);
  text-align: center;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.chart-box:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-lg);
}
.chart-box h3 {
  margin-bottom: 12px;
  color: var(--color-accent-current, var(--color-primary));
  font-size: 18px;
}
.chart-box canvas {
  width: 100% !important;
  height: 300px !important;
}

/* ===== 21. Scrollbar personalizado ===== */
*::-webkit-scrollbar { width: 10px; }
*::-webkit-scrollbar-track { background: var(--color-bg); }
*::-webkit-scrollbar-thumb {
  background-color: var(--color-accent-current, var(--color-primary));
  border-radius: 5px;
  border: 2px solid var(--color-bg);
}
*::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-primary-dark, var(--color-accent-current, var(--color-primary)));
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent-current, var(--color-primary)) var(--color-bg);
}

/* ===== 22. Responsividade geral ===== */
@media (max-width: 768px) {
  .global-search {
    width: 100%;
    max-width: none;
  }

  .dashboard-wrapper {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
    grid-template-areas:
      "header"
      "sidebar"
      "main";
    row-gap: var(--gutter-sm);
    column-gap: 0;
    margin-left: 12px;
    margin-top: 12px;
    padding: 0 12px calc(var(--gutter) + 48px);
  }

  .main-content {
    padding: 16px;
    width: 100%;
    margin: 0;
  }

  .dashboard-main { padding: 20px; }
  .chart-box { flex: 1 1 100%; }
}
/* ===========================
   AS LABS — LANDING PREMIUM
   Mobile-first • Luxo discreto
   =========================== */

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  background: linear-gradient(180deg, #0e0e0e, #141414);
  color: #f2f2f2;
  line-height: 1.6;
}

/* CONTAINER */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -999px;
}

.skip-link:focus {
  left: 20px;
  top: 20px;
  background: #000;
  color: #fff;
  padding: 10px;
  z-index: 9999;
}

/* ===========================
   HEADER
   =========================== */

.landing-header {
  position: sticky;
  top: 0;
  z-index: 5000;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(248, 216, 124, 0.18);
  padding: 0 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

/* LOGO */
.logo {
  display: flex;
  align-items: center;
  height: 100%;
  text-decoration: none;
}

.logo img {
  height: 50px;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(248, 216, 124, 0.45));
  transition: transform 0.25s ease;
}

.logo img:hover {
  transform: scale(1.05);
}

/* NAV DESKTOP */
.nav {
  display: none;
}

.nav a {
  color: #ddd;
  text-decoration: none;
  font-weight: 500;
  margin-left: 22px;
  transition: 0.2s;
}

.nav a:hover {
  color: #f8d87c;
}

.nav-cta {
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(248, 216, 124, 0.12);
  border: 1px solid rgba(248, 216, 124, 0.25);
}

/* ===========================
   HERO
   =========================== */

.hero {
  padding: 80px 0 60px;
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  gap: 40px;
}

.hero-text h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.2rem;
  line-height: 1.2;
  margin-bottom: 18px;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.hero-note {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.55);
}

/* HERO CARD */
.hero-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 26px;
  box-shadow: 0 0 0 1px rgba(248, 216, 124, 0.05);
}

.hero-card h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
  margin-bottom: 14px;
  color: #f8d87c;
}

.hero-card ul {
  list-style: none;
}

.hero-card li {
  margin-bottom: 10px;
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.78);
}

/* ===========================
   BUTTONS
   =========================== */

.btn-primary,
.btn-secondary {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  padding: 14px 18px;
  border-radius: 16px;
  font-weight: 600;
  transition: 0.25s;
}

.btn-primary {
  background: #f8d87c;
  color: #111;
}

.btn-primary:hover {
  transform: translateY(-2px);
  opacity: 0.95;
}

.btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.85);
}

.btn-secondary:hover {
  border-color: rgba(248, 216, 124, 0.4);
  color: #f8d87c;
}

.big {
  font-size: 1.05rem;
  padding: 16px 22px;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ===========================
   SECTION TITLES
   =========================== */

.section-title {
  text-align: center;
  margin-bottom: 45px;
}

.section-title h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.section-title p {
  max-width: 620px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.7);
}

/* ===========================
   SOLUTIONS
   =========================== */

.solutions {
  padding: 70px 0;
}

.solutions-grid {
  display: grid;
  gap: 20px;
}

.solution-card {
  padding: 22px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: 0.25s;
}

.solution-card:hover {
  transform: translateY(-4px);
  border-color: rgba(248, 216, 124, 0.25);
}

.solution-icon {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.solution-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: #f8d87c;
}

.solution-card p {
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.78);
}

.solution-example {
  display: block;
  margin-top: 14px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ÁS PREMIUM */
.solution-card.highlight {
  border: 1px solid rgba(248, 216, 124, 0.45);
  background: rgba(248, 216, 124, 0.06);
}

/* ===========================
   EXEMPLOS DO QUE EU RESOLVO
   =========================== */

.planos-aslabs {
  padding: 70px 0;
}

.cards-container {
  display: grid;
  gap: 20px;
}

.cards-container .card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 22px;
  text-align: center;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  font-family: "Montserrat", sans-serif; /* fonte Montserrat para cards */
}

.cards-container .card:hover {
  transform: translateY(-5px);
  border-color: rgba(248, 216, 124, 0.3);
  box-shadow: 0 8px 20px rgba(248, 216, 124, 0.15);
}

/* SVG das cartas */
.cards-container .card svg {
  width: 220px; /* tamanho padrão desktop */
  height: auto;
  display: block;
  margin: 0 auto 16px;
}

@media (max-width: 880px) {
  .cards-container .card svg {
    width: 160px; /* tamanho mobile */
  }
}

.cards-container .card h3 {
  font-size: 1.2rem;
  color: #f8d87c;
  margin-bottom: 6px;
}

.cards-container .card .tagline {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 14px;
}

.cards-container .card ul {
  list-style: none;
  margin-bottom: 16px;
  padding-left: 0;
}

.cards-container .card li {
  font-size: 0.92rem;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.78);
  text-align: center; /* centraliza texto dentro da carta */
  padding-left: 0;
  position: relative;
}

.cards-container .card li::before {
  content: "•";
  position: absolute;
  left: -12px;
  color: #f8d87c;
}

/* Destaque Ás */
.cards-container .card.destaque {
  border: 1px solid rgba(248, 216, 124, 0.45);
  background: rgba(248, 216, 124, 0.06);
}

/* Observação */
.planos-observacao {
  text-align: center;
  margin-top: 24px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ===========================
   ABOUT + CONTACT + FOOTER
   =========================== */

.about,
.contact {
  padding: 70px 0;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.about-box,
.contact-box, .about-founder {
  border-radius: 22px;
  padding: 40px 26px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.contact-box {
  text-align: center;
  background: rgba(248, 216, 124, 0.08);
  border: 1px solid rgba(248, 216, 124, 0.22);
}

.footer {
  padding: 30px 0;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.45);
  border-top: 1px solid rgba(248, 216, 124, 0.10);
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.footer-link {
  opacity: 0.75;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-weight: 500;
  transition: 0.25s;
}

.footer-link:hover {
  opacity: 1;
  color: #f8d87c;
  text-decoration: underline;
}


/* ===========================
   MENU MOBILE
   =========================== */

.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  z-index: 7100;
}

.menu-toggle span {
  height: 2px;
  width: 26px;
  background: rgba(248, 216, 124, 0.9);
  border-radius: 2px;
  transition: 0.25s;
}

body.nav-open .menu-toggle span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

body.nav-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .menu-toggle span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.nav-mobile {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translate(-50%, -140%);
  padding: 32px 28px;
  border-radius: 24px;
  background: rgba(20, 20, 20, 0.98);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  gap: 22px;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s ease, opacity 0.35s ease;
  z-index: 7150;
}

body.nav-open .nav-mobile {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}

.nav-mobile a {
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
  text-decoration: none;
  padding: 12px 10px;
  border-radius: 16px;
  transition: background 0.25s ease, color 0.25s ease;
}

.nav-mobile a:hover {
  color: #f8d87c;
  background: rgba(248, 216, 124, 0.10);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 7100;
}

body.nav-open .nav-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* ===========================
   RESPONSIVE (DESKTOP)
   =========================== */

@media (min-width: 880px) {
  .nav {
    display: flex;
    align-items: center;
  }

  .menu-toggle,
  .nav-mobile,
  .nav-overlay {
    display: none !important;
  }

  .hero-grid {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
  }

  .hero-text h1 {
    font-size: 3rem;
  }

  .hero-actions {
    flex-direction: row;
  }

  .solutions-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cards-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .solutions-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .cards-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===========================
   WhatsApp Flutuante
   =========================== */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;   /* tamanho do ícone */
  height: 60px;
  z-index: 1000; /* sempre sobre outros elementos */
  cursor: pointer;
  transition: transform 0.2s;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

/* ===========================
   REMOVE TODO OVERLAY GLOBAL
   =========================== */

body::before,
body::after,
.landing-page::before,
.landing-page::after {
  display: none !important;
  content: none !important;
}

.mt-20 {
    margin-top: 20px;
}

/* força 5 cards em uma linha no desktop */
@media (min-width: 1200px) {
  .solutions-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}