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

/* ── VARIÁVEIS DE TEMA (claro) ── */
:root {
  --blue:       #1a56db;
  --blue-dark:  #1740a8;
  --blue-light: #eff4ff;
  --blue-mid:   #c7d7fa;

  --gold:       #d97706;
  --gold-light: #fffbeb;
  --gold-mid:   #fde68a;

  --red:        #dc2626;
  --red-light:  #fef2f2;
  --red-mid:    #fecaca;

  --green:       #16a34a;
  --green-light: #f0fdf4;
  --green-mid:   #bbf7d0;

  --bg: #ffffff;
  --bg-card: #ffffff;
  --border-color: #e5e7eb;
  --shadow-color: rgba(0, 0, 0, 0.10);
  --footer-bg: #111827;
  --nav-bg: rgba(255, 255, 255, 0.92);

  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-350: #c4c9d4;
  --gray-400: #9ca3af;
  --gray-600: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
}

/* ── VARIÁVEIS DE TEMA (escuro) ── */
[data-theme="dark"] {
  --blue:       #4c7dff;
  --blue-dark:  #6d94ff;
  --blue-light: #16233f;
  --blue-mid:   #2a3c63;

  --gold:       #f5b83d;
  --gold-light: #2a2110;
  --gold-mid:   #7a5a12;

  --red:        #f87171;
  --red-light:  #3f1d1d;
  --red-mid:    #7f1d1d;

  --green:       #22c55e;
  --green-light: #113321;
  --green-mid:   #14532d;

  --bg: #0f1420;
  --bg-card: #161c2c;
  --border-color: #2a3242;
  --shadow-color: rgba(0, 0, 0, 0.40);
  --footer-bg: #05070c;
  --nav-bg: rgba(15, 20, 32, 0.92);

  --gray-50:  #161c2c;
  --gray-100: #1c2333;
  --gray-200: #2a3242;
  --gray-300: #3a4358;
  --gray-350: #4b5566;
  --gray-400: #6b7280;
  --gray-600: #9ca3af;
  --gray-700: #d1d5db;
  --gray-900: #f3f4f6;
}

/* transição suave ao trocar de tema */
body, nav, .page, .side, .form-area, .input-wrap input, .btn-outline,
.plan-card, .strength-bar, .success-icon, .codigo-wrap input, .theme-toggle,
.nav-burger, .nav-mobile-panel, .nav-user-btn, .nav-user-dropdown {
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* ── BODY ── */
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── NAV (mesmo padrão de principal.html / configurações.html) ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
  background: transparent;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
}

.nav-logo-text {
  font-family: 'Sora', sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--gray-900);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  color: var(--gray-600);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--blue);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  color: var(--gray-600);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.theme-toggle:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.btn-ghost {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
  transition: background 0.15s, color 0.15s;
}

.btn-ghost:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

nav .btn-primary {
  font-size: 14px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 9px 20px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}

nav .btn-primary:hover {
  background: var(--blue-dark);
}

/* ── MENU DO USUÁRIO LOGADO ── */
.nav-auth-guest {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-user-menu {
  position: relative;
}

.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-50);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  transition: border-color 0.15s, color 0.15s;
}

.nav-user-btn span {
  white-space: nowrap;
}

.nav-user-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.nav-user-btn i.ti-chevron-down {
  font-size: 13px;
  transition: transform 0.2s;
}

.nav-user-btn.aberto i.ti-chevron-down { transform: rotate(180deg); }

.nav-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 8px 24px var(--shadow-color);
  width: 100%;
  min-width: 150px;
  box-sizing: border-box;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  z-index: 1000;
}

.nav-user-dropdown.aberto {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-user-dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 7px;
  font-size: 13.5px;
  line-height: 1.6; /* FIX: style_principal.css define line-height:1.6 no
                        body, e esses itens herdam esse valor lá. Aqui o
                        body não define line-height (fica no padrão do
                        navegador, ~1.2), então os itens ficavam com
                        menos altura de linha e pareciam mais "grudados".
                        Definindo explicitamente, o espaçamento fica igual
                        em todas as páginas, independente do line-height
                        do body. */
  color: var(--gray-600);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.nav-user-dropdown a:hover {
  background: var(--gray-50);
  color: #dc2626;
}

/* ── BOTÃO HAMBÚRGUER ── */
.nav-burger {
  display: none;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  cursor: pointer;
  font-size: 20px;
  color: var(--gray-700);
  transition: background 0.15s, border-color 0.15s;
}

.nav-burger:hover {
  background: var(--gray-100);
}

.nav-burger.ativo {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-light);
}

/* ── PAINEL MOBILE ── */
.nav-mobile-panel {
  display: none;
  flex-direction: column;
  position: sticky;
  top: 64px;
  z-index: 99;
  background: var(--bg-card);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: 0 8px 24px var(--shadow-color);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.nav-mobile-panel.aberto {
  max-height: 420px;
}

.nav-mobile-panel a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 20px;
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-700);
  text-decoration: none;
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.15s, color 0.15s;
}

.nav-mobile-panel a:last-child {
  border-bottom: none;
}

.nav-mobile-panel a:hover {
  background: var(--blue-light);
  color: var(--blue);
}

.nav-mobile-theme-spacer {
  width: 18px;
  visibility: hidden;
}

/* wrapper que centraliza o card de login/cadastro, deixando o
   rodapé sempre fixo na base da página. */
.auth-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

/* ── CONTAINER PRINCIPAL ── */
.page {
  display: flex;
  width: 900px;
  min-height: 580px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 40px var(--shadow-color);
  border: 1px solid var(--border-color);
}

/* ── LADO ESQUERDO (azul) ── */
.side {
  width: 340px;
  background: var(--blue);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
}

.side-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 40px;
}

.side-logo-icon {
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: #fff;
}

.side-logo-text {
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  color: #fff;
  font-weight: 600;
}

.side-tagline {
  font-size: 26px;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
  letter-spacing: -0.3px;
  font-family: 'Sora', sans-serif;
}

.side-tagline span {
  color: rgba(255, 255, 255, 0.5);
}

.side-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.side-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}

.side-features li i {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.5);
}

.side-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 100px;
  padding: 6px 12px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
}

/* ── LADO DIREITO (formulário) ── */
.form-area {
  flex: 1;
  background: var(--bg-card);
  padding: 52px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ── TELAS (login / cadastro / etc) ── */
.screen {
  display: none;
  animation: fadeIn 0.25s ease both;
}

.screen.active {
  display: flex;
  flex-direction: column;
}

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

/* ── TIPOGRAFIA ── */
h2 {
  font-family: 'Sora', sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.sub {
  font-size: 13px;
  color: var(--gray-400);
  margin-bottom: 28px;
  line-height: 1.6;
}

/* ── CAMPOS ── */
.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-600);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-bottom: 7px;
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  width: 100%;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 12px 14px 12px 40px;
  font-size: 14px;
  color: var(--gray-900);
  font-family: 'Inter', sans-serif;
  transition: all 0.18s;
  outline: none;
}

.input-wrap input::placeholder {
  color: var(--gray-300);
}

.input-wrap input:focus {
  border-color: var(--blue);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.08);
}

.input-wrap .ico {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--gray-350);
  pointer-events: none;
}

.input-wrap .ico-r {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--gray-350);
  cursor: pointer;
  transition: color 0.15s;
}

.input-wrap .ico-r:hover {
  color: var(--gray-600);
}

/* ── LINHA LEMBRAR / ESQUECI ── */
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--gray-600);
  cursor: pointer;
}

.remember input {
  accent-color: var(--blue);
  cursor: pointer;
}

.link {
  font-size: 13px;
  color: var(--blue);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s;
}

.link:hover {
  color: var(--blue-dark);
}

/* ── BOTÕES ── */
.btn {
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.18s;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--blue-dark);
}

.btn-primary:active {
  transform: scale(0.99);
}

.btn-outline {
  background: var(--bg-card);
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  margin-top: 10px;
}

.btn-outline:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

/* ── DIVISOR ── */
.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  color: var(--gray-300);
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-100);
}

/* ── CARDS DE PLANO ── */
.plan-cards {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
}

.plan-card {
  flex: 1;
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  border: 1.5px solid var(--gray-200);
  transition: all 0.18s;
  text-align: center;
  background: var(--gray-50);
}

.plan-card:hover {
  border-color: var(--blue);
}

.plan-card.selected {
  border-color: var(--blue);
  background: var(--blue-light);
}

.plan-card .plan-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 2px;
}

.plan-card .plan-price {
  font-size: 11px;
  color: var(--gray-400);
}

.plan-card .plan-price b {
  color: var(--blue);
  font-size: 14px;
}

/* ── FORÇA DA SENHA ── */
.strength-bar {
  height: 3px;
  border-radius: 3px;
  background: var(--gray-100);
  margin-top: 7px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  border-radius: 3px;
  transition: all 0.3s;
  width: 0;
}

.strength-label {
  font-size: 11px;
  margin-top: 4px;
  color: var(--gray-400);
}

/* ── TELAS DE SUCESSO ── */
.success-wrap {
  text-align: center;
  padding: 8px 0;
}

.success-icon {
  width: 56px;
  height: 56px;
  background: var(--blue-light);
  border: 1px solid var(--blue-mid);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--blue);
  margin: 0 auto 20px;
}

/* ── RODAPÉ DAS TELAS ── */
.bottom-text {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: var(--gray-400);
}

.terms {
  font-size: 11px;
  color: var(--gray-350);
  text-align: center;
  margin-top: 16px;
  line-height: 1.6;
}

.terms .link {
  font-size: 11px;
}

/* ── FOOTER (mesmo padrão de principal.html / configurações.html) ── */
footer {
  background: var(--footer-bg);
  color: rgba(255, 255, 255, 0.5);
  padding: 40px 5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

@media (min-width: 1300px) {
  footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }

  .footer-inmetro {
    text-align: right;
  }
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-logo-icon {
  width: 28px;
  height: 28px;
  background: transparent;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
}

.footer-logo-text {
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.footer-copy {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
}

.footer-inmetro {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
}

/* ═══════════════════════════════════════════════
   RESPONSIVO
   ═══════════════════════════════════════════════ */

/* ── NAV: mesmo breakpoint único (≤1080px) usado nas outras páginas ── */
@media (max-width: 1080px) {
  nav {
    padding: 0 4%;
  }

  .nav-links {
    display: none;
  }

  .nav-cta {
    gap: 8px;
    margin-right: 10px;
  }

  .btn-ghost,
  .nav-cta .btn-primary {
    padding: 8px 14px;
    font-size: 13px;
  }

  .nav-burger {
    display: flex;
  }

  .nav-mobile-panel {
    display: flex;
  }

  .nav-cta > .theme-toggle {
    display: none;
  }

  .nav-mobile-panel a.nav-mobile-theme {
    gap: 10px;
  }

  .nav-logo {
    margin-right: auto;
  }

  .nav-user-menu {
    position: relative;
    top: 2px;
  }
}

@media (max-width: 680px) {
  .nav-logo-text {
    font-size: 15px;
  }
}

/* ── TABLET (≈860px) — layout do card de login ── */
@media (max-width: 860px) {
  .auth-content {
    align-items: flex-start;
    padding: 24px 16px;
  }

  .page {
    width: 100%;
    max-width: 460px;
    min-height: auto;
    flex-direction: column;
  }

  /* painel azul institucional some — não é essencial pro fluxo de login */
  .side {
    display: none;
  }

  .form-area {
    padding: 40px 32px;
    flex: none;
  }
}

/* ── MOBILE (≈480px) ── */
@media (max-width: 480px) {
  .auth-content {
    padding: 0;
  }

  .page {
    max-width: 100%;
    border-radius: 0;
    min-height: 100vh;
    box-shadow: none;
    border: none;
  }

  .form-area {
    padding: 32px 22px;
    justify-content: flex-start;
    padding-top: 48px;
  }

  h2 {
    font-size: 19px;
  }

  .plan-cards {
    gap: 8px;
  }

  .plan-card {
    padding: 12px 8px;
  }

  .codigo-wrap input {
    width: 40px;
    height: 48px;
    font-size: 20px;
  }
}

/* ── BADGE (bolinha) DE NOTIFICAÇÃO NÃO VISTA — sino no dropdown do usuário ── */
.sino-wrap {
  position: relative;
  display: inline-flex;
}

.badge-notificacao {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dc2626;
  border: 1.5px solid var(--bg-card);
}