/* ════════════════════════════════════
   TOKENS
════════════════════════════════════ */
:root {
  --bg: #f5f4f1;
  --surface: #ffffff;
  --surface-soft: #f9f7f3;
  --border: #e4dfd6;
  --text: #171310;
  --muted: #6f665d;
  --accent: #e4b062;
  --accent-deep: #9f6716;
  --accent-green: #5c816c;
  --danger: #b94040;
  --success: #4d7a5b;
  --shadow: 0 1px 4px rgba(0,0,0,0.07), 0 0 0 1px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.10);
  --r: 14px;
  --r-sm: 10px;
}

/* ════════════════════════════════════
   BASE (mobile primeiro)
════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
.hidden { display: none !important; }

/* ════════════════════════════════════
   AUTH SHELL — MOBILE: só painel
════════════════════════════════════ */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px 40px;
}

/* Showcase escondida no mobile */
.auth-showcase { display: none; }

/* Painel de login ocupa tudo */
.auth-panel {
  width: 100%;
  max-width: 420px;
}

/* ════════════════════════════════════
   AUTH CARD
════════════════════════════════════ */
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px 18px;
  box-shadow: var(--shadow-md);
}

.eyebrow {
  margin: 0 0 6px;
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-green);
}

.auth-head { margin-bottom: 16px; }
.auth-head.compact { margin-bottom: 10px; }
.auth-head h2 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 1.3rem;
  line-height: 1.15;
}
.auth-subtitle {
  margin: 5px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Tabs ── */
.tab-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}
.tab-button {
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: background 140ms, color 140ms;
}
.tab-button.active {
  background: #171310;
  border-color: #171310;
  color: #fff8ee;
}

/* ── Banners ── */
.setup-banner,
.feedback-banner {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  font-size: 13px;
}
.setup-banner {
  background: rgba(23,19,16,0.05);
  border: 1px solid var(--border);
  color: var(--muted);
}
.setup-banner code {
  background: rgba(23,19,16,0.08);
  padding: 1px 5px;
  border-radius: 5px;
}
.feedback-banner {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
}
.feedback-banner.show    { display: block; }
.feedback-banner.success { border-color: rgba(77,122,91,0.3); background: #f2faf5; color: var(--success); }
.feedback-banner.error   { border-color: rgba(185,64,64,0.25); background: #fff5f5; color: var(--danger); }

/* ── Painéis de tab ── */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Formulário ── */
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form label { display: grid; gap: 5px; font-weight: 500; font-size: 14px; }
.auth-form input {
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: #fff;
  font-size: 15px;
  transition: border-color 140ms;
}
.auth-form input:focus { outline: none; border-color: var(--accent); }

.primary-button {
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #f0c47a);
  color: #17120d;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  width: 100%;
  margin-top: 2px;
}

.foot-note {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}

/* ════════════════════════════════════
   DESKTOP (860px+) — mostra showcase
════════════════════════════════════ */
@media (min-width: 860px) {
  .auth-shell {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    min-height: 100vh;
  }

  .auth-showcase {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    justify-content: center;
  }

  .showcase-copy { max-width: 36rem; }
  .showcase-copy h1 {
    margin: 0;
    font-family: "Sora", sans-serif;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    line-height: 1.08;
  }
  .showcase-copy p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 10px 0 0; }

  .showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .showcase-card {
    min-height: 175px;
    padding: 16px;
    border-radius: var(--r);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 6px;
  }
  .showcase-card.featured {
    background: linear-gradient(160deg, #fff8ee, #fdf0d8);
    border-color: rgba(228,176,98,0.25);
  }
  .showcase-card h2 { margin: 0; font-family: "Sora", sans-serif; font-size: 14px; }
  .showcase-card p  { margin: 0; font-size: 12px; color: var(--muted); }
  .card-index {
    display: inline-flex;
    width: 28px; height: 28px;
    align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(23,19,16,0.07);
    font-family: "Sora", sans-serif;
    font-size: 11px;
  }

  .auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .auth-card { width: 100%; max-width: none; }

  .tab-row { grid-template-columns: repeat(3, 1fr); }
  .tab-button { border-radius: 999px; }
}
