/* ═══════════════════════════════════════════════════════
   ANELTA — AUTENTICAÇÃO (assets/css/auth.css)
   Mesma identidade visual do home.php: Sora + DM Sans,
   maroon institucional #7C0A24, dourado #B8872E.
   Layout em duas colunas (marca + formulário) que colapsa
   para uma coluna em ecrãs pequenos.
═══════════════════════════════════════════════════════ */
:root {
  --g:      #7C0A24;
  --g2:     #9B1030;
  --gl:     #fdf2f4;
  --gb:     #f0c4cc;
  --gold:   #B8872E;
  --gold-l: #f0c96a;
  --ink:    #1C1917;
  --smoke:  #F5F3F0;
  --muted:  #78716C;
  --card:   #ffffff;
  --border: rgba(0,0,0,.08);
  --rb:     12px;
  --rl:     22px;
  --ff-d:   'Sora', system-ui, sans-serif;
  --ff-b:   'DM Sans', system-ui, sans-serif;
  --err:    #dc2626;
  --ok:     #16a34a;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; }
body {
  font-family: var(--ff-b);
  background: var(--smoke);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
}
a { text-decoration:none; color:inherit; }
img { display:block; max-width:100%; }
button, input { font-family: var(--ff-b); }

/* ═══════════════════════════════════════════════
   SHELL — DUAS COLUNAS
═══════════════════════════════════════════════ */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
}

/* ── COLUNA DE MARCA ────────────────────────── */
.auth-brand {
  position: relative;
  background: linear-gradient(155deg, var(--g) 0%, var(--g2) 55%, #6b0a1f 100%);
  color: #fff;
  padding: 34px 28px 30px;
  overflow: hidden;
  isolation: isolate;
}
.auth-brand::before,
.auth-brand::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.16), transparent 70%);
  z-index: -1;
  animation: float-blob 16s ease-in-out infinite;
}
.auth-brand::before { width: 320px; height: 320px; top: -120px; right: -100px; }
.auth-brand::after   { width: 220px; height: 220px; bottom: -80px; left: -60px; animation-delay: -8s; }
@keyframes float-blob {
  0%, 100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(-18px, 22px) scale(1.08); }
}
.auth-brand-grid {
  position: absolute; inset: 0; z-index: -1; opacity: .35;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at 20% 20%, #000 0%, transparent 70%);
}

.auth-logo {
  display: flex; align-items: center; gap: 10px;
  animation: brand-in .7s cubic-bezier(.2,.8,.2,1) both;
}
.auth-logo img { width: 40px; height: 40px; object-fit: contain; border-radius: 10px; background: rgba(255,255,255,.12); padding: 4px; }
.auth-logo-text { font-family: var(--ff-d); font-size: 1.15rem; font-weight: 700; letter-spacing: .02em; }
.auth-logo-text em { color: var(--gold-l); font-style: normal; }

.auth-brand-copy {
  margin-top: 34px;
  max-width: 420px;
  animation: brand-in .7s .1s cubic-bezier(.2,.8,.2,1) both;
}
.auth-eyebrow {
  display:inline-flex; align-items:center; gap:.4rem;
  font-size:.72rem; text-transform:uppercase; letter-spacing:.12em;
  color: rgba(255,255,255,.7); margin-bottom: 10px;
}
.auth-eyebrow i { color: var(--gold-l); }
.auth-brand-title {
  font-family: var(--ff-d); font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.15rem);
  line-height: 1.18; margin-bottom: 12px;
}
.auth-brand-title em { color: var(--gold-l); font-style: normal; }
.auth-brand-sub { font-size: .9rem; color: rgba(255,255,255,.78); line-height: 1.6; }

.auth-brand-stats {
  margin-top: 28px; display: flex; gap: 22px; flex-wrap: wrap;
  animation: brand-in .7s .2s cubic-bezier(.2,.8,.2,1) both;
}
.auth-stat-num {
  font-family: var(--ff-d); font-size: 1.5rem; font-weight: 700; color: #fff;
}
.auth-stat-lbl { font-size: .68rem; color: rgba(255,255,255,.65); text-transform: uppercase; letter-spacing: .06em; }

.auth-brand-quote {
  margin-top: auto; padding-top: 34px;
  font-size: .82rem; color: rgba(255,255,255,.72); font-style: italic;
  border-left: 2px solid rgba(255,255,255,.25); padding-left: 12px;
  animation: brand-in .7s .3s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes brand-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── COLUNA DE FORMULÁRIO ───────────────────── */
.auth-form-col {
  display: flex; align-items: center; justify-content: center;
  padding: 34px 20px 44px;
}
.auth-card {
  width: 100%; max-width: 400px;
  animation: card-in .55s .1s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.auth-card-head { margin-bottom: 22px; }
.auth-card-title { font-family: var(--ff-d); font-size: 1.35rem; font-weight: 700; margin-bottom: 5px; }
.auth-card-sub { font-size: .82rem; color: var(--muted); }
.auth-card-sub a { color: var(--g); font-weight: 600; }

/* ── MENSAGENS ───────────────────────────────── */
.auth-msg {
  border-radius: var(--rb); padding: 11px 13px; margin-bottom: 16px;
  font-size: .8rem; display: flex; align-items: flex-start; gap: 8px;
  animation: card-in .35s both;
}
.auth-msg i { margin-top: 1px; }
.auth-msg.error   { background:#fef2f2; color:#7f1d1d; border:1px solid #fecaca; }
.auth-msg.success { background:#f0fdf4; color:#14532d; border:1px solid #bbf7d0; }
.auth-msg.info    { background: var(--gl); color: var(--g); border:1px solid var(--gb); }

/* ── CAMPOS ──────────────────────────────────── */
.field { margin-bottom: 15px; position: relative; }
.field label {
  display: block; font-size: .76rem; font-weight: 600; color: var(--ink);
  margin-bottom: 6px;
}
.field-input-wrap { position: relative; }
.field input {
  width: 100%; padding: .72rem .9rem;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: .88rem; color: var(--ink); background: var(--card);
  transition: border-color .18s, box-shadow .18s, transform .12s;
}
.field input:focus {
  outline: none; border-color: var(--g);
  box-shadow: 0 0 0 4px var(--gl);
}
.field input.has-icon { padding-right: 2.6rem; }
.field-icon-btn {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); cursor: pointer; background: none; border: none; font-size: .85rem;
}
.field-icon-btn:hover { background: var(--gl); color: var(--g); }
.field-hint { font-size: .7rem; color: var(--muted); margin-top: 5px; }
.field-error { font-size: .72rem; color: var(--err); margin-top: 5px; display:none; align-items:center; gap:4px; }
.field.invalid input { border-color: var(--err); }
.field.invalid .field-error { display:flex; }

/* medidor de força de senha */
.pw-meter { display:flex; gap:4px; margin-top:7px; }
.pw-meter i {
  flex:1; height:4px; border-radius:3px; background: var(--border);
  transition: background .25s;
}
.pw-meter-label { font-size:.68rem; color: var(--muted); margin-top:5px; }

/* ── BOTÃO PRINCIPAL ─────────────────────────── */
.btn-auth {
  width: 100%; padding: .82rem 1rem; border: none; border-radius: 40px;
  background: var(--g); color: #fff; font-weight: 600; font-size: .88rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: .5rem;
  transition: transform .15s, box-shadow .2s, background .2s;
  box-shadow: 0 6px 16px rgba(124,10,36,.25);
  margin-top: 4px;
}
.btn-auth:hover { background: var(--g2); box-shadow: 0 8px 20px rgba(124,10,36,.32); }
.btn-auth:active { transform: scale(.98); }
.btn-auth:disabled { opacity: .65; cursor: not-allowed; transform:none; }
.btn-auth .fa-spinner { display:none; }
.btn-auth.loading .fa-spinner { display:inline-block; animation: spin .7s linear infinite; }
.btn-auth.loading .btn-auth-label { opacity:.7; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth-divider {
  display:flex; align-items:center; gap:10px; margin: 20px 0;
  font-size:.72rem; color: var(--muted); text-transform: uppercase; letter-spacing:.06em;
}
.auth-divider::before, .auth-divider::after { content:""; flex:1; height:1px; background: var(--border); }

.auth-foot { margin-top: 18px; text-align: center; font-size: .82rem; color: var(--muted); }
.auth-foot a { color: var(--g); font-weight: 600; }

.auth-back {
  display:inline-flex; align-items:center; gap:.4rem; font-size:.78rem;
  color: var(--muted); margin-bottom: 18px;
}
.auth-back:hover { color: var(--g); }

.checkbox-row { display:flex; align-items:flex-start; gap:8px; margin-bottom:16px; font-size:.78rem; color:var(--muted); }
.checkbox-row input { margin-top:2px; accent-color: var(--g); width:15px; height:15px; }

/* ── RESPONSIVO ──────────────────────────────── */
@media (min-width: 900px) {
  .auth-shell { grid-template-columns: 1.05fr 1fr; }
  .auth-brand { padding: 52px 52px 40px; display:flex; flex-direction:column; }
  .auth-form-col { padding: 52px 60px; }
}
@media (max-width: 899px) {
  .auth-brand { padding: 26px 22px 46px; text-align:left; }
  .auth-brand-quote { display:none; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-brand::before, .auth-brand::after { animation: none; }
  .auth-logo, .auth-brand-copy, .auth-brand-stats, .auth-brand-quote, .auth-card, .auth-msg { animation: none; }
}
