/* =========================================================
   Dashboard — caioalencar.com/dashboard
   Paleta, tipografia, header e menu hambúrguer reaproveitados
   1:1 do style.css do site principal. Só a área de conteúdo
   abaixo do header é exclusiva do dashboard.
   ========================================================= */

html {
  scrollbar-gutter: auto; /* Era 'stable'*/
}

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

:root {
  --bg: #000000;
  --bg-soft: #0a0a0a;
  --bg-elev: #111111;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.15);
  --fg: #ffffff;
  --fg-dim: rgba(255,255,255,0.55);
  --fg-mute: rgba(255,255,255,0.4);
  --accent: #e8a87c;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --display: "DM Sans", system-ui, sans-serif;
  --body: "DM Sans", system-ui, sans-serif;
}

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  padding-top: 64px;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* =========================================================
   Header (idêntico ao site principal)
   ========================================================= */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
}
.header-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand {
  font-family: var(--body);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg);
}

/* =========================================================
   Hambúrguer (sempre visível no dashboard, como no site
   principal em modo "hamburger-sempre")
   ========================================================= */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-hamburger span {
  display: block;
  width: 20px;
  height: 1px;
  background: var(--fg);
  border-radius: 0;
  flex-shrink: 0;
}

/* =========================================================
   Menu overlay + painel lateral (idêntico ao site principal)
   ========================================================= */
.nav-mobile-overlay {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1100;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.nav-mobile-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.nav-mobile-panel {
  width: 72vw;
  max-width: 280px;
  height: 100%;
  background: #0a0a0a;
  border-left: 1px solid var(--border);
  padding: 80px 28px 40px;
  display: flex;
  flex-direction: column;
  position: relative;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.nav-mobile-overlay.open .nav-mobile-panel {
  transform: translateX(0);
}
.nav-mobile-panel ul {
  list-style: none;
  display: flex;
  flex-direction: column;
}
.nav-mobile-panel ul li {
  border-bottom: none;
}
.nav-mobile-link {
  display: block;
  padding: 14px 0;
  font-family: var(--body);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-dim);
  transition: color 0.2s;
  cursor: pointer;
}
.nav-mobile-link:hover { color: var(--fg); }
.nav-mobile-link.ativo { color: var(--accent); }

.nav-mobile-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: transparent;
  border: none;
  color: var(--fg-mute);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}
.nav-mobile-close:hover { color: var(--fg); }

/* E-mail logado + Logout — ficam presos ao rodapé do painel */
.nav-mobile-logged-as {
  margin-top: auto;
  padding-top: 16px;
  font-family: var(--body);
  font-size: 12px;
  color: var(--fg-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-mobile-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0 4px;
  background: transparent;
  border: none;
  font-family: var(--body);
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #d9695f;
  cursor: pointer;
  transition: opacity 0.2s;
}
.nav-mobile-logout:hover { opacity: 0.7; }
.nav-mobile-logout-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: #d9695f;
}

/* CTA button (idêntico ao site principal) */
.cta-btn {
  font-family: var(--body);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 9px 20px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--fg);
  transition: background 0.25s, border-color 0.25s;
  cursor: pointer;
}
.cta-btn:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* =========================================================
   Tela de login (gate) — bloqueia o dashboard sem sessão
   ========================================================= */
.gate:not([hidden]) {
  position: fixed;
  inset: 0;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  z-index: 2000;
}
.gate-box {
  width: 100%;
  max-width: 340px;
  text-align: center;
  padding: 44px 36px 36px;
  border: 1px solid #242424;
  border-radius: 18px;
  background: #000000;
}
.gate-mark {
  width: 26px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  margin: 0 auto 18px;
}
.gate-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #666666;
  margin-bottom: 10px;
}
.gate-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: 27px;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  color: #ffffff;
}
.gate-sub { color: #b3b3b3; font-size: 13px; line-height: 1.5; margin-bottom: 32px; }
.gate-form { display: flex; flex-direction: column; gap: 16px; text-align: left; }
.gate-field label {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #666666;
  margin-bottom: 7px;
}
.gate-field input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #242424;
  border-radius: 10px;
  background:  #000000;
  color: #ffffff;
  font-family: var(--body);
  font-size: 14px;
  transition: border-color 0.5s ease;
}
.gate-field input:focus {
  outline: none;
  border-color: #3a3a3a;
  background:  #000000;
}
.gate-btn {
  margin-top: 10px;
  padding: 13px;
  border: 1px solid #ffffff;
  border-radius: 10px;
  background: #ffffff;
  color: #000000;
  font-family: var(--body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}
.gate-btn:hover { background: #e6e6e6; }
.gate-btn:disabled { background: #333333; color: #888888; cursor: default; }
.gate-err { color: #d9695f; font-size: 12px; min-height: 14px; margin-top: 16px; }

/* =========================================================
   Área de conteúdo do dashboard (exclusiva desta ramificação)
   ========================================================= */
.dash-main {
  max-width: none;      /* era: 1400px */
  margin: 0;             /* era: 0 auto */
  padding: 0;
  min-height: calc(100vh - 64px);
  min-height: calc(100dvh - 64px);
}

/* Cada aba agora é um <iframe> — documento isolado de verdade, não um
   pedaço de HTML injetado. #dashConteudo só empilha os iframes; o
   padding/max-width de cada tela fica por conta do próprio partial. */
.dash-conteudo {
  position: relative;
  width: 100%;
  height: calc(100vh - 64px);
  height: calc(100dvh - 64px);
}
.dash-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: transparent;
}
.dash-iframe[hidden] { display: none; }

.dash-cabecalho { margin-bottom: 24px; }
.dash-cabecalho h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(28px, 3vw, 36px);
  letter-spacing: -0.02em;
}
.dash-sub { color: var(--fg-dim); font-size: 14px; line-height: 1.6; margin-top: 8px; }

.dash-carregando,
.dash-erro { color: var(--fg-mute); font-size: 13.5px; padding: 4px 0; }

/* =========================================================
   Responsivo — 640px
   ========================================================= */
@media (max-width: 640px) {
  header { height: 64px; }
  .header-container { padding: 0 24px; }
  .brand { font-size: 12px; }
  .cta-btn { padding: 9px 16px; font-size: 11px; letter-spacing: 0.18em; }
}