/* IDEIAData - Design System base tokens + resets
   Todos os tokens CSS ficam aqui. public.css e dashboard.css
   dependem dessas variáveis — não defina tokens em outros arquivos.
*/

:root {
  /* Cores base */
  --color-bg: #ffffff;
  --color-surface: #f7f8fa;
  --color-surface-glass: rgba(255, 255, 255, 0.9);
  --bg-card: #f2f4f7;
  --bg-dark: #ffffff;

  /* Borders */
  --color-border: #e5e7eb;
  --border: #e5e7eb;
  --border-soft: rgba(0, 0, 0, 0.06);

  /* Accent / Primary */
  --color-accent: #a76200;
  --color-accent-dim: rgba(167, 98, 0, 0.09);
  --color-primary: #a76200;
  --color-primary-dark: #8f5400;
  --primary: #a76200;
  --primary-dim: rgba(167, 98, 0, 0.09);
  --primary-hover: #8f5400;

  /* Text */
  --color-title: #313841;
  --color-subtitle: #5a6067;
  --color-text-main: #313841;
  --color-text-dim: #5a6067;
  --color-text-light: #8c939a;
  --color-secondary: #313841;
  --text-primary: #313841;
  --text-secondary: #5a6067;
  --text-muted: #8c939a;
  --secondary: #313841;
  --neutral: #5a6067;

  /* Typography */
  --font-main: 'Outfit', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --font-heading: 'Space Grotesk', sans-serif;

  /* Layout */
  --container-padding: 2rem;
  --section-gap: 7rem;

  --transition-smooth: all 0.3s ease;

  /* Border radius */
  --radius: 4px;
  --radius-sm: 4px;
  --radius-md: 4px;
  --radius-lg: 4px;
  --radius-pill: 999px;
}

/* Base Resets */
body {
  background-color: var(--color-bg) !important;
  color: var(--color-text-main) !important;
  font-family: var(--font-main);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .dashboard-title {
  color: var(--color-text-main) !important;
  font-family: var(--font-heading);
}

p, span, label {
  color: var(--color-text-dim);
}

/* Remove old background gradient elements do site público */
.global-bg-elements, .orb, .grid-overlay, .hero-bg-accent, .hero-bg-elements {
  display: none !important;
}

/* Header público (site marketing) */
.header {
  background-color: #ffffff !important;
  border-bottom: 1px solid var(--color-border) !important;
  color: var(--color-text-main) !important;
}

.header .nav-link {
  color: var(--color-text-main) !important;
}

.logo img {
  height: 30px;
  width: auto;
}

/* White Footer */
.site-footer {
  background-color: #ffffff !important;
  color: var(--color-text-main) !important;
  border-top: 1px solid var(--color-border) !important;
}

.site-footer a, .site-footer p, .site-footer span {
  color: var(--color-text-dim) !important;
}

/* Anti-Flicker Cloak */
.is-loading-shell body {
  opacity: 0;
}
.shell-loaded body {
  opacity: 1;
  transition: opacity 0.4s ease;
}

/* Fix btn-link para páginas públicas */
body:not(.dashboard-body) .btn-link {
  color: var(--color-secondary) !important;
  border-color: var(--color-border) !important;
}

body:not(.dashboard-body) .btn-link:hover {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: var(--color-secondary) !important;
  color: var(--color-text-main) !important;
  transform: translateY(-2px);
}

/* Fix glass-panel para páginas públicas */
body:not(.dashboard-body) .glass-panel {
  background: #f8f9fa !important;
  border: 1px solid var(--color-border) !important;
  backdrop-filter: none !important;
}

/* Utility classes */
.hover-glow:hover {
  box-shadow: 0 0 30px rgba(167, 98, 0, 0.45) !important;
}

.glass {
  background: rgba(255, 255, 255, 0.65) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

@keyframes animFadeIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: animFadeIn 0.75s ease forwards;
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-accent), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ═══════════════════════════════════════════════════════
   LANDING PAGE — Ajustes de cor e hierarquia visual
   Escopo: body:not(.dashboard-body) para não afetar painel
═══════════════════════════════════════════════════════ */

/* Background canvas NIPFlow */
body:not(.dashboard-body),
body[data-page="login"] {
  background-color: #F4F6FA;
}

/* Pages with fixed bg: body transparent so SVG shows through */
body[data-page="home"],
body[data-page="blog"],
body[data-page="idsaude"] {
  background-color: transparent;
}

/* Todas as seções: 100vh, conteúdo centralizado */
body:not(.dashboard-body) .hero,
body:not(.dashboard-body) .section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: transparent;
}

body:not(.dashboard-body) .hero .container,
body:not(.dashboard-body) .section .container {
  width: 100%;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

/* Título do hero: cor correta */
body:not(.dashboard-body) .hero-title {
  color: var(--color-title) !important;
}

/* Accent EA9216 — DADOS, IDEIAData (sobre), ícones de serviços */
body:not(.dashboard-body) .hero-dados {
  color: #EA9216 !important;
}

body:not(.dashboard-body) .card-icon,
body:not(.dashboard-body) .card-icon span,
body:not(.dashboard-body) .card-icon svg {
  color: #EA9216 !important;
}

body:not(.dashboard-body) .text-white,
body:not(.dashboard-body) .hero-title-dot {
  color: var(--color-title) !important;
}

/* IDSaúde nav badge */
.nav-link-idsaude {
  background-color: #FFF0D6 !important;
  color: #C97A10 !important;
  padding: 0.2rem 0.65rem !important;
  border-radius: 4px;
  font-weight: 600;
}
.nav-link-idsaude:hover,
.nav-link-idsaude.active {
  background-color: #FFE4B0 !important;
  color: #A5620C !important;
}

/* Nav links no fundo claro */
body:not(.dashboard-body) .nav-link {
  color: var(--color-subtitle) !important;
}

body:not(.dashboard-body) .nav-link:hover,
body:not(.dashboard-body) .nav-link.active {
  color: var(--color-title) !important;
}

/* Logo sempre preto no header branco */
body:not(.dashboard-body) .logo img {
  height: 22px;
  width: auto;
}

/* Section tag — só cor, sem pílula */
body:not(.dashboard-body) .section-tag {
  background: transparent !important;
  border: none !important;
  color: var(--color-accent) !important;
}

/* Títulos de seção */
body:not(.dashboard-body) .section-title {
  color: var(--color-title) !important;
}

body:not(.dashboard-body) .section-subtitle {
  color: var(--color-subtitle) !important;
}

/* About: textos e strong */
body:not(.dashboard-body) .about-text p {
  color: var(--color-subtitle) !important;
}

body:not(.dashboard-body) .about-text strong {
  color: var(--color-accent) !important;
}

/* Highlight item text */
body:not(.dashboard-body) .highlight-item span:last-child {
  color: var(--color-title) !important;
}

/* Cookie banner */
body:not(.dashboard-body) .cookie-banner {
  background: rgba(255, 255, 255, 0.95) !important;
  color: var(--color-text-main) !important;
}

/* Footer links e textos */
body:not(.dashboard-body) .footer-title {
  color: var(--color-title) !important;
}

body:not(.dashboard-body) .footer-links a,
body:not(.dashboard-body) .footer-links a:hover {
  color: var(--color-subtitle) !important;
}

body:not(.dashboard-body) .footer-links a:hover {
  color: var(--color-accent) !important;
}

/* Form feedback status */
body:not(.dashboard-body) .form-feedback[data-state="success"] {
  color: #166534 !important;
}

body:not(.dashboard-body) .form-feedback[data-state="error"] {
  color: #991b1b !important;
}

/* ─── Login page: sem header/footer ─── */
body[data-page="login"] .header,
body[data-page="login"] .site-footer {
  display: none !important;
}

/* ─── NIPFlow Login Layout ─── */
body[data-page="login"] {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.nf-login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 480px;
  position: relative;
  overflow: hidden;
  background: #F4F6FA;
}

.nf-login-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .9;
}

.nf-login-bg svg {
  width: 100%;
  height: 100%;
}

/* Landing page fixed background — matches login */
.page-fixed-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  background: #F4F6FA;
  opacity: .9;
}

/* Left: branding */
.nf-login-brand {
  padding: 56px 80px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.nf-login-logo-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nf-login-logo-img {
  height: 22px;
  width: auto;
}

.nf-login-hero {
  max-width: 480px;
}

.nf-eyebrow {
  font-size: 11px;
  color: var(--color-accent);
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-family: var(--font-heading);
}

.nf-headline {
  font-size: 44px;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--color-title);
  margin: 0 0 18px;
  font-family: var(--font-heading);
}

.nf-accent { color: #EA9216; }

.nf-sub {
  font-size: 15px;
  color: var(--color-subtitle);
  line-height: 1.55;
  margin: 0 0 32px;
}

.nf-stats {
  display: flex;
  gap: 24px;
}

.nf-stat {
  display: flex;
  flex-direction: column;
}

.nf-stat-val {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 500;
  color: var(--color-title);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.nf-stat-lbl {
  font-size: 10px;
  color: var(--color-text-light);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-top: 2px;
}

.nf-login-foot {
  font-size: 10px;
  color: var(--color-text-light);
  letter-spacing: .1em;
  margin: 0;
}

/* Right: form panel */
.nf-login-panel {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-left: 1px solid rgba(15,23,42,.06);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
  box-shadow: -12px 0 40px rgba(15,23,42,.06);
}

.nf-panel-inner {
  padding: 0 64px;
  width: 100%;
}

.nf-form-hd { margin-bottom: 28px; }

.nf-step {
  font-size: 10px;
  color: var(--color-text-light);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin: 0 0 8px;
  font-family: var(--font-heading);
}

.nf-form-title {
  font-size: 26px;
  font-weight: 500;
  color: var(--color-title);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  font-family: var(--font-heading);
}

.nf-form-desc {
  font-size: 13px;
  color: var(--color-text-light);
  margin: 0;
}

.nf-field { margin-bottom: 14px; }

.nf-field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.nf-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-subtitle);
  text-transform: uppercase;
  letter-spacing: .06em;
  display: block;
  margin-bottom: 6px;
}

.nf-field-row .nf-label { margin-bottom: 0; }

.nf-input {
  width: 100%;
  background: #ffffff;
  border: 1px solid rgba(15,23,42,.1);
  border-radius: 4px;
  padding: 9px 12px;
  color: var(--color-title);
  font-size: 13px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
  box-sizing: border-box;
}

.nf-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(167,98,0,.14);
}

.nf-input::placeholder { color: var(--color-text-light); }

.nf-link-xs {
  font-size: 11px;
  color: var(--color-accent);
  letter-spacing: .04em;
  text-decoration: none;
}

.nf-link-xs:hover { text-decoration: underline; }

.nf-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-dim);
  cursor: pointer;
}

.nf-checkbox-label input { width: auto; }

.nf-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 40px;
  background: #1e2b3c;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .12s;
  margin-top: 4px;
  margin-bottom: 8px;
  font-family: inherit;
}

.nf-btn-primary:hover { background: #2d3e56; }
.nf-btn-primary:disabled { opacity: .45; cursor: not-allowed; }

.nf-status {
  font-size: 12px;
  min-height: 18px;
  margin: 4px 0 0;
}

.nf-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--color-subtitle);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nf-btn-ghost:hover { color: var(--color-title); }

.nf-panel-footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(15,23,42,.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--color-text-light);
}

.nf-link-amber {
  color: var(--color-accent);
  text-decoration: none;
  font-size: 11px;
}

/* Responsive login */
@media (max-width: 860px) {
  .nf-login {
    grid-template-columns: 1fr;
  }
  .nf-login-brand {
    padding: 40px 32px 32px;
    justify-content: flex-start;
    gap: 32px;
  }
  .nf-login-foot { display: none; }
  .nf-headline { font-size: 28px; }
  .nf-stats { display: none; }
  .nf-login-panel {
    border-left: none;
    border-top: 1px solid rgba(15,23,42,.06);
    box-shadow: none;
    background: #ffffff;
  }
  .nf-panel-inner {
    padding: 40px 32px 48px;
  }
}
