/* ============================================================
   ONYX PAG — Auth (login / cadastro) — estilo bank, card elevado
   Coluna única, sem banner. Paleta Onyx (preto + verde).
   ============================================================ */
:root{
  --ink:#0f1115; --ink-2:#2b2f36; --muted:#8a8f98;
  --green:#64A300; --green-600:#558C00; --green-050:#eef6e3;
  --line:#e4e6ea; --req:#e5484d; --bg:#eef0f3; --surface:#ffffff;
  --font:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
}
*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{
  font-family:var(--font); color:var(--ink); -webkit-font-smoothing:antialiased;
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(100,163,0,.10) 0%, rgba(100,163,0,0) 60%),
    var(--bg);
  min-height:100vh;
}
a{ color:inherit; }

/* ---------- card ---------- */
.auth{ min-height:100vh; display:flex; align-items:center; justify-content:center; padding:40px 20px; }
.auth-wrap{
  width:100%; max-width:452px; background:var(--surface);
  border:1px solid rgba(16,18,26,.06); border-radius:22px; padding:40px 36px 34px;
  box-shadow:0 24px 70px rgba(16,18,26,.12), 0 2px 6px rgba(16,18,26,.04);
}

.auth-logo{ display:flex; justify-content:center; margin-bottom:24px; }
.auth-logo img{ height:52px; width:auto; display:block; }

.auth-head h1{ font-size:1.5rem; font-weight:800; letter-spacing:-.025em; text-align:center; margin:0 0 8px; line-height:1.25; }
.auth-sub{ text-align:center; color:var(--muted); font-size:.92rem; line-height:1.55; margin:0 0 28px; }

/* barra de progresso (cadastro) */
.auth-progress{ display:flex; align-items:center; gap:14px; margin:0 0 26px; }
.auth-progress .bar{ flex:1; height:5px; border-radius:99px; background:#edeef1; overflow:hidden; }
.auth-progress .bar > i{ display:block; height:100%; width:100%; background:var(--green); border-radius:99px; }
.auth-progress .step{ font-size:.76rem; font-weight:600; color:var(--muted); white-space:nowrap; }

/* ---------- alerts ---------- */
#alert-container:not(:empty){ margin-bottom:18px; }
.alert{ padding:12px 14px; border-radius:12px; font-size:.88rem; animation:slideIn .25s ease-out; }
.alert-success{ background:var(--green-050); color:#3f7a1e; border:1px solid rgba(100,163,0,.25); }
.alert-error{ background:#fdeaea; color:#b23b3b; border:1px solid #f4c9c9; }
.alert-content{ display:flex; justify-content:space-between; align-items:center; gap:12px; }
.alert-close{ background:none; border:0; font-size:18px; cursor:pointer; color:inherit; opacity:.6; }
.alert-close:hover{ opacity:1; }
@keyframes slideIn{ from{ opacity:0; transform:translateY(-8px);} to{ opacity:1; transform:translateY(0);} }

/* ---------- campos (bank style) ---------- */
.field{ margin-bottom:16px; }
.field > label{ display:block; font-size:.84rem; font-weight:600; color:var(--ink-2); margin-bottom:7px; }
.field > label .req{ color:var(--req); margin-left:1px; }
.field input,.field select{
  width:100%; height:50px; padding:0 14px;
  border:1.6px solid var(--line); border-radius:12px; background:#fbfbfc;
  font-family:var(--font); font-size:.95rem; color:var(--ink);
  transition:border-color .16s, box-shadow .16s, background .16s;
}
.field input::placeholder{ color:#b6bbc2; }
.field input:focus,.field select:focus{
  outline:none; border-color:var(--green); background:#fff;
  box-shadow:0 0 0 4px rgba(100,163,0,.12);
}
.field select{ appearance:none; cursor:pointer; }
.field.invalid input{ border-bottom-color:var(--req); border-color:var(--req); }

/* senha + olho */
.input-wrap{ position:relative; }
.input-wrap input{ padding-right:48px; }
.pw-toggle{
  position:absolute; right:7px; top:50%; transform:translateY(-50%);
  width:36px; height:36px; border:0; background:transparent; cursor:pointer;
  color:#9aa0a8; border-radius:9px; display:grid; place-items:center; padding:0;
  transition:color .15s, background .15s;
}
.pw-toggle:hover{ color:var(--ink); background:#f2f3f5; }
.pw-toggle svg{ width:19px; height:19px; }
.pw-toggle .eye-off{ display:none; }
.pw-toggle.is-on .eye-on{ display:none; }
.pw-toggle.is-on .eye-off{ display:block; }
.pw-toggle.is-on{ color:var(--green-600); }

/* ---------- linha de opções ---------- */
.form-options{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin:4px 0 22px; font-size:.86rem; }
.remember-me,.terms-checkbox{ display:inline-flex; align-items:center; gap:8px; color:#4b5563; cursor:pointer; user-select:none; }
.remember-me input,.terms-checkbox input{ width:16px; height:16px; accent-color:var(--green); }
.remember-me .checkmark,.terms-checkbox .checkmark{ display:none; }
.forgot-password,.terms-link,.create-account-link,.login-link{ color:var(--green-600); text-decoration:none; font-weight:600; }
.forgot-password:hover,.create-account-link:hover,.login-link:hover,.terms-link:hover{ text-decoration:underline; }

/* ---------- toggle PF / PJ ---------- */
.tipo-pessoa-toggle{ display:flex; gap:0; border:1.6px solid var(--line); border-radius:12px; overflow:hidden; padding:4px; background:#f7f8f9; }
.tipo-btn{
  flex:1; display:flex; align-items:center; justify-content:center; gap:8px;
  height:42px; border:0; background:transparent; border-radius:9px; cursor:pointer;
  font-family:var(--font); font-size:.88rem; font-weight:600; color:#6b7280; transition:all .18s;
}
.tipo-btn svg{ width:17px; height:17px; }
.tipo-btn.active{ background:#fff; color:var(--ink); box-shadow:0 1px 3px rgba(16,18,26,.12); }
.tipo-btn.active svg{ color:var(--green-600); }

/* ---------- botão principal ---------- */
.auth-btn{
  width:100%; height:54px; border:0; border-radius:13px; cursor:pointer;
  background:var(--ink); color:#fff; font-family:var(--font); font-size:1rem; font-weight:700;
  display:flex; align-items:center; justify-content:center; gap:10px; margin-top:6px;
  transition:transform .12s, box-shadow .18s, background .18s;
}
.auth-btn:hover{ background:#20242b; box-shadow:0 12px 30px rgba(16,18,22,.22); transform:translateY(-1px); }
.auth-btn:active{ transform:translateY(0); }
.auth-btn:disabled{ opacity:.7; cursor:default; transform:none; box-shadow:none; }

.auth-foot{ text-align:center; margin-top:22px; font-size:.9rem; color:var(--muted); }
.auth-secure{
  display:flex; align-items:center; justify-content:center; gap:7px; margin-top:22px; padding-top:18px;
  border-top:1px solid #f0f1f3; color:#a4a9b0; font-size:.78rem;
}
.auth-secure svg{ width:14px; height:14px; }

/* ---------- loading ---------- */
.btn-loading{ display:none; }
.spinner{ width:20px; height:20px; border:2px solid rgba(255,255,255,.45); border-top-color:#fff; border-radius:50%; animation:spin .8s linear infinite; }
@keyframes spin{ to{ transform:rotate(360deg); } }

@media (max-width:520px){
  .auth{ padding:20px 14px; }
  .auth-wrap{ padding:30px 22px 26px; border-radius:18px; }
  .auth-head h1{ font-size:1.35rem; }
}
