/* ============================================================
   pages.css — Solo Routines
   Estilos especificos de cada pagina + responsivo + heatmap
   ============================================================ */

/* ─── LOGIN SCREEN ─── */
#login-screen,
#registro-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124,58,237,.35) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(6,182,212,.12) 0%, transparent 50%),
    var(--bg-deep);
  padding: 1rem;
  overflow-y: auto;
}
.login-mist {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle 600px at 20% 40%, rgba(124,58,237,.08), transparent),
    radial-gradient(circle 400px at 75% 70%, rgba(6,182,212,.06), transparent);
  pointer-events: none;
  animation: mistDrift 12s ease-in-out infinite alternate;
}
@keyframes mistDrift {
  from { transform: scale(1) translateX(0); }
  to   { transform: scale(1.05) translateX(20px); }
}
.login-card {
  position: relative;
  z-index: 1;
  background: rgba(8, 6, 18, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(124,58,237,.5);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 440px;
  box-shadow:
    0 0 0 1px rgba(124,58,237,.2),
    0 25px 60px rgba(0,0,0,.7),
    0 0 80px rgba(124,58,237,.2),
    inset 0 1px 0 rgba(255,255,255,.06);
  animation: loginCardIn .5s ease-out;
}
@keyframes loginCardIn {
  from { opacity: 0; transform: translateY(30px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.login-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.login-logo-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(124,58,237,.3), rgba(6,182,212,.15));
  border: 2px solid rgba(124,58,237,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  box-shadow: 0 0 30px rgba(124,58,237,.4);
  animation: logoGlow 3s ease-in-out infinite alternate;
}
.login-logo-icon.registro {
  background: linear-gradient(135deg, rgba(6,182,212,.2), rgba(124,58,237,.2));
  border-color: rgba(6,182,212,.4);
  box-shadow: 0 0 30px rgba(6,182,212,.3);
}
@keyframes logoGlow {
  from { box-shadow: 0 0 20px rgba(124,58,237,.3); }
  to   { box-shadow: 0 0 40px rgba(124,58,237,.6); }
}
.login-title {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  color: #ffffff;
  margin: 0 0 .25rem 0;
  text-shadow: 0 0 30px rgba(124,58,237,.8), 0 2px 4px rgba(0,0,0,.8);
}
.login-subtitle {
  font-family: var(--font-section);
  font-size: .8rem;
  color: #c084fc;
  text-align: center;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 .5rem 0;
}
.login-desc {
  font-family: var(--font-body);
  font-size: .83rem;
  color: #94a3b8;
  text-align: center;
  line-height: 1.6;
  margin: 0 0 1.75rem 0;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

/* ── Labels dos formulários de login/registro ── */
.login-form .form-label,
.login-form label {
  display: block;
  font-family: var(--font-section);
  font-size: .78rem;
  font-weight: 700;
  color: #a78bfa;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: .4rem;
}

/* ── Inputs dos formulários de login/registro ── */
.login-form .input,
.login-form input {
  width: 100%;
  background: rgba(20, 15, 40, 0.9) !important;
  border: 1.5px solid rgba(124,58,237,.45) !important;
  border-radius: var(--radius-md);
  padding: .75rem 1rem;
  color: #f1f5f9 !important;
  font-family: var(--font-section);
  font-size: 1rem;
  font-weight: 500;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}

/* ── Botão olho (revelar senha) ── */
.input-pw-wrap {
  position: relative;
}
.input-pw-wrap .input,
.input-pw-wrap input {
  padding-right: 3rem !important;
}
.btn-olho {
  position: absolute;
  right: .6rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  color: #64748b;
  padding: .3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color .2s ease, background .2s ease, transform .15s ease;
  z-index: 5;
  /* Garante que cliques em filhos (svg, span) chegam ao btn */
  pointer-events: all;
}
.btn-olho * {
  pointer-events: none;
}
.btn-olho:hover {
  color: #a78bfa;
  background: rgba(124,58,237,.1);
  transform: translateY(-50%) scale(1.12);
}
/* Estado revelado: cor vermelha */
.btn-olho[data-visivel="1"] {
  color: #ef4444;
}
.btn-olho[data-visivel="1"]:hover {
  color: #f87171;
  background: rgba(239,68,68,.1);
}


.login-form .input::placeholder,
.login-form input::placeholder {
  color: #64748b !important;
  opacity: 1;
}
.login-form .input:focus,
.login-form input:focus {
  outline: none;
  border-color: #7c3aed !important;
  box-shadow: 0 0 0 3px rgba(124,58,237,.25), 0 0 15px rgba(124,58,237,.2);
  background: rgba(26, 20, 55, 0.95) !important;
  color: #ffffff !important;
}

/* ── Input com ícone ── */
.input-icon-wrap .input,
.input-icon-wrap input {
  padding-left: 2.9rem !important;
}

/* ── Botões de submit dos formulários de login/registro ── */
.login-form .btn-primary,
.login-form button[type='submit'] {
  width: 100%;
  padding: .9rem 1rem;
  background: linear-gradient(135deg, #7c3aed, #5b21b6) !important;
  border: 1.5px solid rgba(168,85,247,.6) !important;
  border-radius: var(--radius-md);
  color: #ffffff !important;
  font-family: var(--font-section);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 4px 20px rgba(124,58,237,.4), 0 0 30px rgba(124,58,237,.2);
  margin-top: .25rem;
}
.login-form .btn-primary:hover,
.login-form button[type='submit']:hover {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9) !important;
  box-shadow: 0 6px 30px rgba(124,58,237,.6), 0 0 40px rgba(124,58,237,.3);
  transform: translateY(-1px);
}
.login-form .btn-primary:disabled,
.login-form button[type='submit']:disabled {
  opacity: .65;
  cursor: not-allowed;
  transform: none;
}
.form-error {
  font-family: var(--font-body);
  font-size: .82rem;
  color: #f87171;
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.25);
  border-radius: 8px;
  padding: .6rem .9rem;
  text-align: center;
}
.input-icon-wrap {
  position: relative;
}
.input-icon {
  position: absolute;
  left: .85rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
  z-index: 1;
}
.input-icon-wrap .input {
  padding-left: 2.75rem;
}
.btn-full {
  width: 100%;
}
.login-links {
  text-align: center;
  margin-top: 1.25rem;
}
.login-link {
  font-family: var(--font-section);
  font-size: .85rem;
  font-weight: 600;
  color: #a78bfa;
  text-decoration: none;
  opacity: 1;
  transition: color .2s;
  letter-spacing: .5px;
}
.login-link:hover { color: #c4b5fd; text-decoration: underline; }

/* ─── LOGIN / REGISTRO SOCIAL (OAuth) ─── */
.oauth-bloco { margin-top: 1.1rem; }
.oauth-bloco.hidden { display: none; }

/* Separador "ou entre com" — linha com o texto ao centro */
.oauth-sep {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: .25rem 0 .9rem;
  color: var(--text-muted, #64748b);
  font-family: var(--font-section);
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.oauth-sep::before,
.oauth-sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(148,163,184,.28), transparent);
}

.oauth-botoes {
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.btn-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  width: 100%;
  padding: .7rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,.28);
  background: rgba(255,255,255,.05);
  color: #e2e8f0;
  font-family: var(--font-section);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .3px;
  cursor: pointer;
  transition: transform .12s ease, border-color .2s, background .2s, box-shadow .2s;
}
.btn-oauth svg { flex: none; }
.btn-oauth:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.09);
}
.btn-oauth.google:hover {
  border-color: rgba(234,67,53,.6);
  box-shadow: 0 4px 18px -8px rgba(234,67,53,.7);
}
.btn-oauth.discord:hover {
  border-color: rgba(88,101,242,.7);
  box-shadow: 0 4px 18px -8px rgba(88,101,242,.8);
}
.btn-oauth:active { transform: translateY(0); }
.btn-oauth.hidden { display: none; }

.oauth-nota {
  margin: .7rem 0 0;
  text-align: center;
  font-family: var(--font-section);
  font-size: .68rem;
  color: var(--text-muted, #64748b);
  opacity: .85;
}

/* ─── REGISTRO — ESCOLHA DE MÉTODO, TRAVADA PELO CONVITE ─── */
/* O campo do convite fica FORA do <form>, então não herda a cor clara dos
   inputs do formulário — sem isto, o texto digitado sai preto no fundo escuro. */
#registro-screen .input {
  color: #f1f5f9 !important;
  background: rgba(20, 15, 40, 0.9) !important;
  border: 1.5px solid rgba(124,58,237,.45) !important;
}
#registro-screen .input::placeholder { color: #64748b !important; opacity: 1; }

/* As opções nascem travadas: enquanto o convite não vale, ficam apagadas e
   sem clique. Só os 3 botões aparecem — nunca o formulário longo de cara. */
#reg-opcoes { transition: opacity .3s ease; }
#reg-opcoes.reg-travado .reg-metodos,
#reg-opcoes.reg-travado #form-registro {
  opacity: .35;
  pointer-events: none;
  filter: saturate(.5);
  user-select: none;
}
/* Cadeado só aparece enquanto travado. */
.reg-cadeado {
  display: none;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin: .2rem 0 1rem;
  padding: .6rem .8rem;
  border-radius: 10px;
  border: 1px dashed rgba(148,163,184,.28);
  background: rgba(148,163,184,.06);
  color: var(--text-muted, #94a3b8);
  font-family: var(--font-section);
  font-size: .74rem;
  letter-spacing: .02em;
  text-align: center;
}
#reg-opcoes.reg-travado .reg-cadeado { display: flex; }

/* Os 3 botões de método (Google, Discord, E-mail) */
.reg-metodos {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.reg-metodos.hidden { display: none; }

/* Botão "e-mail" — mesma pegada visual dos sociais, tom roxo do Sistema */
.btn-metodo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  width: 100%;
  padding: .7rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(139,92,246,.45);
  background: rgba(124,58,237,.12);
  color: #e9d5ff;
  font-family: var(--font-section);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .3px;
  cursor: pointer;
  transition: transform .12s ease, border-color .2s, background .2s, box-shadow .2s;
}
.btn-metodo svg { flex: none; }
.btn-metodo:hover {
  transform: translateY(-1px);
  background: rgba(124,58,237,.2);
  border-color: rgba(168,85,247,.7);
  box-shadow: 0 4px 18px -8px rgba(139,92,246,.8);
}
.btn-metodo:active { transform: translateY(0); }

/* Voltar da escolha do formulário para os 3 botões */
.reg-voltar {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin: 0 0 .9rem;
  padding: .15rem 0;
  background: none;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-family: var(--font-section);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: color .2s;
}
.reg-voltar:hover { color: #c4b5fd; }

#form-registro.hidden { display: none; }

/* ── O campo do convite: o herói da tela. Espaçoso, centralizado, com
      brilho próprio ao focar. ── */
/* Só o grupo do convite é filho direto do card; os campos do formulário
   ficam dentro do <form>. Assim mexemos apenas no ícone do convite. */
#registro-screen .login-card > .form-group .input-icon {
  font-size: 1.15rem;
  left: 1.05rem;
}
#reg-codigo {
  width: 100%;                     /* fica fora do .login-form, então precisa
                                      pedir 100% p/ alinhar com os botões abaixo */
  box-sizing: border-box;
  padding: 1rem 3rem !important;   /* simétrico → o código fica centrado de verdade */
  text-align: center;
  font-size: 1.06rem !important;
  letter-spacing: .16em !important;
  border-radius: 12px !important;  /* mesmo raio dos botões, p/ leitura de "pilha" */
  border-width: 1.5px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05),
              0 8px 22px -14px rgba(124,58,237,.7);
  transition: border-color .25s, box-shadow .25s, background .25s;
}
#reg-codigo:focus {
  border-color: #a855f7 !important;
  box-shadow: 0 0 0 3px rgba(124,58,237,.3),
              0 0 26px rgba(124,58,237,.4),
              inset 0 1px 0 rgba(255,255,255,.06) !important;
}

/* ── Botões de método: mais altos, com um brilho que varre no hover. ── */
.reg-metodos { gap: .7rem; }
.reg-metodos .btn-oauth,
.reg-metodos .btn-metodo {
  position: relative;
  overflow: hidden;
  padding: .85rem 1rem;
  font-size: .92rem;
}
/* O feixe de luz que atravessa o botão ao passar o mouse. */
.reg-metodos .btn-oauth::before,
.reg-metodos .btn-metodo::before {
  content: "";
  position: absolute;
  top: 0; left: -130%;
  width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.16), transparent);
  transform: skewX(-18deg);
  transition: left .6s ease;
  pointer-events: none;
}
.reg-metodos .btn-oauth:hover::before,
.reg-metodos .btn-metodo:hover::before { left: 150%; }
/* O ícone do provedor/e-mail ganha um respiro à esquerda. */
.reg-metodos .btn-oauth svg,
.reg-metodos .btn-metodo svg { margin-right: .15rem; }

/* ─── FILTROS DO EXTRATO ───────────────────────────────────────────
   A legibilidade do menu aberto foi resolvida na raiz (color-scheme no
   design-system), porque o problema era de todo <select> do app, não
   só destes. Aqui fica apenas a aparência: cada filtro traz seu tom em
   --f-cor e o resto é comum aos sete. */
.sr-filtro {
  --f-cor: #7c3aed;
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--font-section);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .02em;
  padding: .4rem 1.85rem .4rem .6rem;
  border-radius: .5rem;
  color: #e2e8f0;
  background-color: color-mix(in srgb, var(--f-cor) 14%, #0f0a1e);
  border: 1px solid color-mix(in srgb, var(--f-cor) 45%, transparent);
  cursor: pointer;
  outline: none;
  transition: border-color .18s, background-color .18s, box-shadow .18s;

  /* Seta própria: a nativa vem com a cor do sistema e destoa do tema. */
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 1.05rem) calc(50% + 1px),
    calc(100% - 0.72rem) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.sr-filtro:hover {
  border-color: color-mix(in srgb, var(--f-cor) 75%, transparent);
  background-color: color-mix(in srgb, var(--f-cor) 22%, #0f0a1e);
}
.sr-filtro:focus-visible {
  border-color: var(--f-cor);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--f-cor) 28%, transparent);
}
/* Filtro em uso fica evidente — ajuda a entender por que a lista encolheu. */
.sr-filtro.sr-filtro-ativo {
  background-color: color-mix(in srgb, var(--f-cor) 30%, #0f0a1e);
  border-color: var(--f-cor);
  color: #fff;
}
.sr-filtro option {
  background-color: #14102b;
  color: #e2e8f0;
  font-weight: 500;
  padding: .4rem;
}
.sr-filtro option:checked {
  background-color: var(--f-cor);
  color: #fff;
}

/* ─── MAIN APP LAYOUT ─── */
#main-app {
  display: flex;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ─── SIDEBAR ─── */
#sidebar {
  width: 250px;
  min-height: 100vh;
  background: rgba(5,5,10,.9);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255,255,255,.06);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 200;
  transition: transform .3s ease;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(124,58,237,.3) transparent;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: 1.4rem 1.25rem 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.sidebar-logo-icon {
  font-size: 1.6rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg,rgba(124,58,237,.25),rgba(6,182,212,.1));
  border-radius: 10px;
  border: 1px solid rgba(124,58,237,.3);
  flex-shrink: 0;
  overflow: hidden;
}
.sidebar-logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sidebar-logo-texts { min-width: 0; }
.sidebar-logo-text {
  font-family: var(--font-title);
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-logo-sub {
  font-family: var(--font-section);
  font-size: .65rem;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: .1rem;
}
.sidebar-nav {
  flex: 1;
  padding: .75rem .75rem;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.nav-section {
  padding: .9rem .5rem .3rem;
}
.nav-section-label {
  font-family: var(--font-section);
  font-size: .65rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .85rem;
  border-radius: 9px;
  text-decoration: none;
  color: var(--text-muted);
  font-family: var(--font-section);
  font-size: .88rem;
  font-weight: 500;
  transition: all .2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}
.nav-item:hover {
  color: var(--text-secondary);
  background: rgba(124,58,237,.08);
  border-color: rgba(124,58,237,.15);
}
.nav-item.active {
  color: white;
  background: linear-gradient(135deg, rgba(124,58,237,.2), rgba(124,58,237,.08));
  border-color: rgba(124,58,237,.3);
  box-shadow: 0 0 15px rgba(124,58,237,.1);
}
.nav-item.active .nav-icon {
  filter: drop-shadow(0 0 6px rgba(124,58,237,.6));
}
.nav-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.1rem;
  border-top: 1px solid rgba(255,255,255,.06);
  background: rgba(0,0,0,.2);
  flex-shrink: 0;
}
.sidebar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg,var(--purple-main),var(--blue-mana));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border: 2px solid rgba(124,58,237,.4);
  flex-shrink: 0;
  overflow: hidden;
}
.sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
  font-family: var(--font-section);
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-rank {
  font-family: var(--font-section);
  font-size: .68rem;
  color: var(--gold-xp);
  letter-spacing: .5px;
}
.sidebar-logout {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.08);
  color: var(--text-muted);
  cursor: pointer;
  font-size: .95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  flex-shrink: 0;
}
.sidebar-logout {
  border: 1px solid rgba(124,58,237,.25);
  color: var(--text-muted);
  position: relative;
  overflow: hidden;
}
.sidebar-logout svg { transition: all .25s ease; }
.sidebar-logout:hover {
  background: radial-gradient(circle at center, rgba(239,68,68,.18), rgba(239,68,68,.05));
  border-color: rgba(239,68,68,.55);
  color: #f87171;
  box-shadow: 0 0 14px rgba(239,68,68,.35), inset 0 0 10px rgba(239,68,68,.08);
}
.sidebar-logout:hover svg {
  filter: drop-shadow(0 0 5px rgba(239,68,68,.8));
  transform: scale(1.1);
}
.sidebar-logout:active svg { transform: scale(.9); }

/* ═══ AURA DE CHAMAS DO ARQUITETO ═══════════════════════════
   Chamas vivas translúcidas em volta do avatar — só o Arquiteto.
   Camada 1 (::before): labareda distorcida por turbulência SVG animada
   Camada 2 (::after):  anel de energia dourada girando               */
.chamas-arquiteto {
  position: relative !important;
  overflow: visible !important;
  z-index: 0;
}
.chamas-arquiteto::before {
  content: '';
  position: absolute;
  inset: -42%;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 68%,
      rgba(255, 244, 200, .95) 0%,
      rgba(251, 191, 36, .85) 18%,
      rgba(249, 115, 22, .6) 40%,
      rgba(217, 70, 239, .3) 60%,
      rgba(124, 58, 237, .18) 72%,
      transparent 82%);
  filter: url(#fx-chamas) blur(1.5px);
  animation: chamas-arder 3.2s ease-in-out infinite;
  will-change: transform, opacity;
}
.chamas-arquiteto::after {
  content: '';
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
  background: conic-gradient(from 0deg,
    transparent 0%,   rgba(251,191,36,.9) 8%,  transparent 22%,
    rgba(249,115,22,.7) 38%, transparent 52%,
    rgba(251,191,36,.8) 64%, transparent 78%,
    rgba(217,70,239,.5) 88%, transparent 100%);
  filter: blur(5px);
  animation: chamas-girar 4.5s linear infinite;
  will-change: transform;
}
@keyframes chamas-girar { to { transform: rotate(360deg); } }
@keyframes chamas-arder {
  0%   { transform: scale(1)    translateY(0);    opacity: .85; }
  20%  { transform: scale(1.07) translateY(-2.5%); opacity: 1;  }
  40%  { transform: scale(.96)  translateY(1%);   opacity: .78; }
  60%  { transform: scale(1.05) translateY(-1.8%); opacity: .95; }
  80%  { transform: scale(.99)  translateY(-.5%); opacity: .82; }
  100% { transform: scale(1)    translateY(0);    opacity: .85; }
}
/* Respeito a quem prefere menos movimento */
@media (prefers-reduced-motion: reduce) {
  .chamas-arquiteto::before, .chamas-arquiteto::after { animation: none; }
}

/* ─── SIDEBAR MOBILE TOGGLE ─── */
#sidebar-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 300;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(10,8,20,.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(124,58,237,.3);
  color: var(--text-primary);
  font-size: 1.1rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,.3);
}
#sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  z-index: 150;
}

/* ─── CONTENT AREA ─── */
#content-area {
  flex: 1;
  margin-left: 250px;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: calc(100vw - 250px);
  box-sizing: border-box;
}

/* ─── PAGE ─── */
.page {
  padding: 2rem;
  animation: pageIn .3s ease-out;
  box-sizing: border-box;
  width: 100%;
}
.page.hidden { display: none; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
.page-title {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  text-shadow: 0 0 30px rgba(124,58,237,.3);
  line-height: 1.2;
}
.page-subtitle {
  font-family: var(--font-section);
  font-size: .82rem;
  color: var(--text-muted);
  margin: .35rem 0 0 0;
  letter-spacing: .5px;
}

/* ─── DASHBOARD GRID ─── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }

/* Container dos gráficos com altura fixa para o Chart.js */
.chart-container {
  position: relative;
  height: 200px;    /* padrão — pode ser sobrescrito inline */
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}
.chart-container canvas {
  display: block !important;
  max-width: 100% !important;
}

/* O FAB foi removido — ver comentário no index.html */

/* ─── HEATMAP ─── */
.heatmap-wrap {
  overflow-x: auto;
  padding-bottom: .5rem;
}
.heatmap-grid {
  display: flex;
  gap: 3px;
  align-items: flex-start;
}
.heatmap-week {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.heatmap-cell {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: rgba(255,255,255,.05);
  transition: all .15s;
  cursor: default;
  position: relative;
}
.heatmap-cell:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10,8,20,.95);
  border: 1px solid rgba(124,58,237,.3);
  color: var(--text-secondary);
  font-family: var(--font-section);
  font-size: .65rem;
  padding: .3rem .55rem;
  border-radius: 5px;
  white-space: nowrap;
  z-index: 100;
  pointer-events: none;
}
.heatmap-cell.lvl-0 { background: rgba(255,255,255,.05); }
.heatmap-cell.lvl-1 { background: rgba(124,58,237,.2); }
.heatmap-cell.lvl-2 { background: rgba(124,58,237,.4); }
.heatmap-cell.lvl-3 { background: rgba(124,58,237,.65); }
.heatmap-cell.lvl-4 { background: var(--purple-main); box-shadow: 0 0 4px rgba(124,58,237,.5); }
.heatmap-cell.lvl-5 { background: var(--gold-xp); box-shadow: 0 0 6px rgba(245,158,11,.5); }
.heatmap-months {
  display: flex;
  gap: 0;
  margin-bottom: 4px;
  padding-left: 0;
}
.heatmap-month-label {
  font-family: var(--font-section);
  font-size: .62rem;
  color: var(--text-muted);
  letter-spacing: .5px;
  text-transform: uppercase;
}
.heatmap-days {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-right: 6px;
  padding-top: 20px;
}
.heatmap-day-label {
  font-family: var(--font-section);
  font-size: .6rem;
  color: var(--text-muted);
  height: 12px;
  line-height: 12px;
  text-align: right;
}
.heatmap-legend {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-top: .75rem;
  justify-content: flex-end;
}
.heatmap-legend-label {
  font-family: var(--font-section);
  font-size: .68rem;
  color: var(--text-muted);
}
.heatmap-legend-cells {
  display: flex;
  gap: 3px;
}

/* ─── PERFIL PAGE ─── */
#page-perfil .card {
  height: fit-content;
}

/* ─── GERENCIAL GRID ─── */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

/* ─── BTN GOLD ─── */
.btn-gold {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #1a0f00;
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(245,158,11,.3);
}
.btn-gold:hover {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  box-shadow: 0 6px 20px rgba(245,158,11,.4);
  transform: translateY(-1px);
}

/* ─── RESPONSIVO ─── */
@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .col-span-3 { grid-column: span 2; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  #sidebar {
    transform: translateX(-100%);
  }
  #sidebar.open {
    transform: translateX(0);
  }
  #sidebar-toggle {
    display: flex;
  }
  #sidebar-overlay.visible {
    display: block;
  }
  #content-area {
    margin-left: 0;
    max-width: 100vw;       /* ← CORREÇÃO: impede conteúdo ficar em 140px */
    width: 100%;
  }
  .page {
    padding: 1.25rem .85rem;
    padding-top: 4.75rem;   /* espaço para o botão ☰ */
    box-sizing: border-box;
    width: 100%;
    overflow-x: hidden;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .col-span-2 { grid-column: span 1; }
  .col-span-3 { grid-column: span 1; }
  #page-perfil .card,
  #page-perfil > div > div {
    grid-template-columns: 1fr !important;
  }
  #page-perfil .card[style*="grid-column:span 2"] {
    grid-column: span 1 !important;
  }

  /* Hunter card: stats em linha com wrap */
  #hunter-card .d-flex[style*="flex-wrap"] {
    flex-direction: column !important;
    gap: .75rem !important;
  }
  #hunter-card [style*="gap:1.5rem"] {
    gap: .75rem !important;
    justify-content: center !important;
  }

  /* Page header: título + botão em coluna no mobile */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: .65rem;
  }
  .page-title { font-size: 1.25rem; }

  /* Filtros do extrato e tarefas: scroll horizontal se apertado */
  #card-rotinas-hoje > div:nth-child(2),
  #card-tarefas-hoje > div:nth-child(2) {
    overflow-x: auto;
    flex-wrap: nowrap !important;
    padding-bottom: .25rem;
  }
  /* Cards de missão: padding mais compacto */
  .dash-rotina-card,
  .dash-tarefa-card {
    padding: .55rem .7rem !important;
  }
}

@media (max-width: 600px) {
  .login-card {
    padding: 1.75rem 1.25rem;
  }
  .page-title { font-size: 1.25rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .tabs { width: 100%; overflow-x: auto; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .hunter-stats-row { gap: .75rem; }
}
@media (max-width: 400px) {
  .grid-4 { grid-template-columns: 1fr; }
}

/* ─── UTILITY ─── */
.mb-1 { margin-bottom: .75rem; }
.mb-2 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 1.5rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 1rem; }
.hidden { display: none !important; }
.text-center { text-align: center; }