/*
 * auth.css — Login & Cadastro
 * frontend-specialist: glassmorphism sobre navy gradient, mesma linguagem do home.css
 * Design system: [[ebad-design-system]] — navy + cyan + frosted glass
 */

/* ─────────────────────────────────────────── TOKENS (mesmo home.css) */
:root {
  --navy:         #0e1e4a;
  --navy-mid:     #152660;
  --cyan:         #00c2e0;
  --cyan-glow:    rgba(0, 194, 224, 0.28);
  --cyan-dim:     rgba(0, 194, 224, 0.14);
  --glass-bg:     rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.16);
  --ink:          #0f172a;
  --muted:        #64748b;
  --line:         #e2e8f0;
  --error:        #f87171;
  --error-bg:     rgba(248, 113, 113, 0.12);
  --success:      #34d399;
  --radius:       14px;
  --radius-sm:    8px;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;

  /* Fundo: navy gradient + radial glow ciano — igual ao hero */
  background:
    radial-gradient(ellipse 70% 55% at 80% 15%, rgba(0, 194, 224, 0.18) 0%, transparent 65%),
    radial-gradient(ellipse 55% 45% at 10% 85%, rgba(21, 38, 96, 0.75) 0%, transparent 60%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, #1a3a7a 100%);
}

/* Dot-grid overlay — igual ao hero */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.055) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

h1, h2 {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 900;
  line-height: 1.1;
}

a { color: inherit; text-decoration: none; }

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ─────────────────────────────────────────── LAYOUT */
.auth-page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 20px;
  gap: 28px;
}

/* ─────────────────────────────────────────── LOGO */
.auth-logo {
  display: block;
}

.auth-logo img {
  display: block;
  height: 44px;
  width: auto;
}

/* ─────────────────────────────────────────── CARD */
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: clamp(28px, 6vw, 44px);

  /* frosted glass — mesmo padrão dos feature-cards */
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255,255,255,0.1);

  /* entrada suave */
  animation: cardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

/* ─────────────────────────────────────────── HEADER DO CARD */
.auth-card-header {
  margin-bottom: 28px;
  text-align: center;
}

.auth-card-header h1 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 1.65rem;
  letter-spacing: -0.02em;
}

.auth-card-header p {
  margin: 0;
  color: rgba(255,255,255,0.5);
  font-size: 0.88rem;
}

/* ─────────────────────────────────────────── ALERTAS */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 20px;
  line-height: 1.45;
}

.alert-error {
  background: var(--error-bg);
  border: 1px solid rgba(248,113,113,0.3);
  color: var(--error);
}

.alert-success {
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52,211,153,0.3);
  color: var(--success);
}

.alert-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ─────────────────────────────────────────── FORMULÁRIO */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  color: rgba(255,255,255,0.75);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.field input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.94rem;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  -webkit-appearance: none;
}

.field input::placeholder {
  color: rgba(255,255,255,0.28);
}

.field input:hover {
  border-color: rgba(255,255,255,0.26);
  background: rgba(255,255,255,0.11);
}

.field input:focus {
  outline: none;
  border-color: var(--cyan);
  background: rgba(255,255,255,0.12);
  box-shadow: 0 0 0 3px rgba(0,194,224,0.2);
}

/* campo com erro */
.field.has-error input {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(248,113,113,0.15);
}

.field-error {
  color: var(--error);
  font-size: 0.78rem;
}

/* ─────────────────────────────────────────── EXTRAS */
.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* checkbox "lembrar" */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.6);
  font-size: 0.83rem;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--cyan);
  cursor: pointer;
  flex-shrink: 0;
}

.link-muted {
  color: rgba(255,255,255,0.5);
  font-size: 0.83rem;
  transition: color 0.15s;
}

.link-muted:hover { color: var(--cyan); }

/* ─────────────────────────────────────────── BOTÃO PRINCIPAL */
.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  margin-top: 4px;
  padding: 0 20px;
  background: var(--cyan);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--navy);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px var(--cyan-glow);
  transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
}

.btn-submit:hover {
  background: #00afd0;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--cyan-glow);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* ─────────────────────────────────────────── RODAPÉ DO CARD */
.auth-card-footer {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
}

.auth-card-footer a {
  color: var(--cyan);
  font-weight: 600;
  transition: opacity 0.15s;
}

.auth-card-footer a:hover { opacity: 0.8; }

/* ─────────────────────────────────────────── LINK VOLTAR HOME */
.back-home {
  color: rgba(255,255,255,0.45);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
}

.back-home:hover { color: rgba(255,255,255,0.75); }

/* ─────────────────────────────────────────── RESPONSIVE */
@media (max-width: 480px) {
  .auth-card { padding: 24px 20px; }
  .auth-card-header h1 { font-size: 1.45rem; }
}

@media (max-width: 360px) {
  .field-row { flex-direction: column; align-items: flex-start; }
}
