/* ============================================================
   PRECIANO — auth.css (login / cadastro), design "Ink & Teal"
   ============================================================ */

body.auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-content: stretch;
  background: #FDFEFE;
}

/* ---------- Painel de marca (esquerda) ---------- */
.auth-brand {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(168deg, var(--ink-950) 0%, var(--ink-900) 55%, #0D2A44 100%);
  color: #B9CBDC;
  display: flex;
  flex-direction: column;
  padding: 40px 48px;
  overflow: hidden;
}
.auth-brand::after {
  content: '';
  position: absolute;
  right: -120px; bottom: -120px;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(22,172,156,.22), transparent 65%);
}
.auth-brand-logo { display: flex; align-items: center; gap: 12px; }
.auth-brand-logo .chip {
  width: 42px; height: 42px;
  border-radius: 13px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-brand-logo .chip img { width: 30px; height: 30px; object-fit: contain; }
.auth-brand-logo b {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 730;
  color: #fff;
}
.auth-brand-mid { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 430px; }
.auth-brand-mid h2 {
  color: #fff;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 760;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.auth-brand-mid h2 em { font-style: normal; color: var(--teal-400); }
.auth-brand-mid p { margin-top: 14px; font-size: .9rem; line-height: 1.7; color: #8FA9BE; }

.auth-quote {
  margin-top: 36px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  padding: 20px 22px;
}
.auth-quote .stars { color: var(--amber); letter-spacing: 2px; font-size: .8rem; margin-bottom: 10px; }
.auth-quote p { font-size: .84rem; color: #C7D6E4; margin: 0; line-height: 1.6; }
.auth-quote-author { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.auth-quote-author .av {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--teal-600);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .68rem;
  font-weight: 700;
}
.auth-quote-author b { display: block; font-size: .76rem; color: #fff; }
.auth-quote-author span { font-size: .66rem; color: #7E96AB; }

.auth-brand-foot { font-size: .72rem; color: #5E7A93; }

/* ---------- Painel do formulário (direita) ---------- */
.auth-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
}
.auth-panel-top {
  position: absolute;
  top: 26px; right: 40px;
  font-size: .82rem;
  color: var(--t3);
}
.auth-panel-top a { font-weight: 650; }
.auth-card { width: min(420px, 100%); }
.auth-card h1 { font-size: 1.65rem; font-weight: 760; letter-spacing: -.02em; }
.auth-card .sub { color: var(--t3); font-size: .9rem; margin-top: 6px; margin-bottom: 30px; }
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.pass-wrap { position: relative; }
.pass-wrap .input { padding-right: 44px; }
.pass-eye {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--t4);
  padding: 8px;
}
.pass-eye:hover { color: var(--t2); }
.auth-row { display: flex; justify-content: flex-end; align-items: center; font-size: .8rem; }
.auth-row a { font-weight: 600; }
.auth-check { display: flex; gap: 9px; align-items: flex-start; font-size: .78rem; color: var(--t3); cursor: pointer; }
.auth-check input { margin-top: 3px; accent-color: var(--teal-600); }
.auth-submit { margin-top: 4px; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--t4);
  font-size: .72rem;
  margin: 22px 0;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-alt { text-align: center; font-size: .84rem; color: var(--t3); }
.auth-alt a { font-weight: 650; }

.pass-meter { display: flex; gap: 5px; margin-top: 8px; }
.pass-meter span { flex: 1; height: 4px; border-radius: 99px; background: var(--line); }
.pass-meter span.on { background: var(--teal-500); }
.pass-hint { font-size: .7rem; color: var(--t4); margin-top: 5px; }

/* ---------- Erro geral (credencial inválida, rate limit, etc.) ---------- */
.auth-error {
  display: none;
  background: var(--err-bg);
  color: var(--err-tx);
  border: 1px solid var(--err-bd);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: .85rem;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 18px;
}
.auth-error.show { display: block; }
.auth-error.is-rate-limit { background: var(--warn-bg); color: var(--warn-tx); border-color: var(--warn-bd); }

.input.is-invalid { border-color: var(--err-tx); box-shadow: 0 0 0 3px var(--err-bg); }

/* ---------- Botão com spinner de carregamento ---------- */
.btn-spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2.5px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: authSpin .6s linear infinite;
}
.btn.is-loading .btn-spinner { display: inline-block; }
@keyframes authSpin { to { transform: rotate(360deg); } }

/* ---------- Rodapé (mobile) ---------- */
.auth-foot-links { text-align: center; font-size: .76rem; color: var(--t4); margin-top: 26px; }
.auth-foot-links a { color: var(--t4); }
.auth-foot-links a:hover { color: var(--t2); }

/* ---------- Responsivo ---------- */
@media (max-width: 880px) {
  body.auth { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-panel { justify-content: flex-start; padding-top: 28px; }
  .auth-panel-top { position: static; margin-bottom: 34px; align-self: flex-end; }
  .auth-mobile-logo {
    display: flex !important;
    align-self: flex-start;
    margin-bottom: 8px;
  }
  .auth-mobile-logo img { height: 30px; width: auto; }
  .auth-head-row { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-bottom: 26px; }
}
.auth-mobile-logo { display: none; }
