/* ==========================================================
   CONTROLE O BOLSO — LOGIN E CADASTRO
   Tema escuro do app. Desktop: painel da marca + formulário.
   Celular: só o formulário.
========================================================== */
:root {
  --bg: #090f1b;
  --surface: #121e2f;
  --surface-2: #0b1727;
  --line: rgba(148, 163, 184, .16);
  --line-strong: #2a3b52;
  --text: #f1f5f9;
  --text-2: #c3cfdd;
  --muted: #8193a8;
  --green: #39d98a;
  --green-2: #18ad79;
  --red: #fb7185;
  --amber: #fbbf24;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh; min-height: 100dvh;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased; line-height: 1.5;
}
a { color: var(--green); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }
button { font: inherit; }

.auth-shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1fr; }

/* ---------- Painel da marca (desktop) ---------- */
.auth-brand { display: none; }

@media (min-width: 960px) {
  .auth-shell { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .auth-brand {
    position: relative; overflow: hidden; isolation: isolate;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 48px 56px;
    background:
      radial-gradient(700px 420px at 0% 0%, rgba(57, 217, 138, .22), transparent 60%),
      radial-gradient(600px 400px at 100% 100%, rgba(77, 194, 1, .16), transparent 60%),
      linear-gradient(160deg, #0d1a24 0%, #0a1420 100%);
    border-right: 1px solid var(--line);
  }
  .auth-brand::before { /* grade sutil */
    content: ""; position: absolute; inset: 0; z-index: -1;
    background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 30% 30%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 30%, #000 30%, transparent 75%);
  }
}

.auth-logo { display: inline-flex; align-items: center; gap: 11px; color: var(--text); font-size: 17px; font-weight: 500; letter-spacing: -.2px; text-decoration: none !important; }
.auth-logo img { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; }
.auth-logo b { font-weight: 800; }

.auth-brand__copy { max-width: 470px; }
.auth-brand__copy h2 { font-size: 40px; line-height: 1.12; font-weight: 800; letter-spacing: -1.2px; }
.auth-brand__copy h2 span { color: var(--green); }
.auth-brand__copy p { margin-top: 14px; font-size: 16px; color: var(--text-2); }

.auth-perks { list-style: none; margin-top: 30px; display: grid; gap: 14px; }
.auth-perks li { display: flex; align-items: center; gap: 13px; font-size: 15px; color: #dbe5f1; }
.auth-perks i {
  width: 36px; height: 36px; flex: none; border-radius: 11px; display: grid; place-items: center;
  background: rgba(57, 217, 138, .13); color: var(--green); font-size: 14px;
}

.auth-proof {
  display: flex; align-items: center; gap: 14px; max-width: 470px;
  padding: 16px 18px; border-radius: 16px;
  background: rgba(18, 30, 47, .7); border: 1px solid var(--line);
}
.auth-proof__stars { color: var(--amber); letter-spacing: 2px; font-size: 13px; }
.auth-proof p { font-size: 13.5px; color: var(--text-2); }
.auth-proof strong { color: var(--text); }

/* ---------- Formulário ---------- */
.auth-main {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 18px 24px;
  background: radial-gradient(600px 300px at 50% 0%, rgba(57, 217, 138, .08), transparent 70%), var(--bg);
}
.auth-card { width: 100%; max-width: 420px; }
.auth-card .auth-logo { margin-bottom: 28px; }
@media (min-width: 960px) { .auth-card .auth-logo { display: none; } }

.auth-title { font-size: 28px; font-weight: 800; letter-spacing: -.8px; line-height: 1.2; }
.auth-sub { margin-top: 6px; font-size: 15px; color: var(--muted); }

.auth-flash {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 22px; padding: 12px 14px; border-radius: 12px; font-size: 14px;
  background: rgba(251, 113, 133, .1); border: 1px solid rgba(251, 113, 133, .35); color: #fecdd3;
}
.auth-flash i { margin-top: 3px; color: var(--red); }
.auth-flash.is-success { background: rgba(57, 217, 138, .1); border-color: rgba(57, 217, 138, .35); color: #d1fae5; }
.auth-flash.is-success i { color: var(--green); }
.auth-flash[hidden] { display: none; }

/* Google */
.auth-google { margin-top: 26px; }
.auth-google__btn { min-height: 44px; display: flex; justify-content: center; }
.auth-google__hint { margin-top: 10px; font-size: 12px; color: var(--muted); text-align: center; }
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 24px 0 4px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; font-weight: 600; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.auth-form { display: flex; flex-direction: column; gap: 18px; margin-top: 22px; }
.auth-google + .auth-divider + .auth-form { margin-top: 18px; }

.auth-field { display: flex; flex-direction: column; gap: 7px; }
.auth-field__row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.auth-field label { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.auth-field__row a { font-size: 13px; }

.auth-input { position: relative; }
.auth-input > i:first-child {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  color: #5f7187; font-size: 14px; pointer-events: none; transition: color .15s;
}
.auth-input input {
  width: 100%; height: 50px; padding: 0 46px 0 44px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 13px;
  font: inherit; font-size: 15.5px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.auth-input input::placeholder { color: #5b6d83; }
.auth-input input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(57, 217, 138, .14); }
.auth-input:focus-within > i:first-child { color: var(--green); }
.auth-input input:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 100px var(--surface-2) inset;
  caret-color: var(--text);
}
.auth-field.has-error .auth-input input { border-color: var(--red); }
.auth-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border: 0; border-radius: 10px; background: none;
  color: #5f7187; cursor: pointer; display: grid; place-items: center;
}
.auth-eye:hover { color: var(--text); background: rgba(148, 163, 184, .08); }
.auth-error { font-size: 12.5px; color: var(--red); }
.auth-error[hidden] { display: none; }

/* Força da senha */
.auth-strength { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.auth-strength__bar { flex: 1; height: 5px; border-radius: 99px; background: #1c2b3e; overflow: hidden; }
.auth-strength__bar i { display: block; height: 100%; width: 0; border-radius: 99px; transition: width .25s, background .25s; }

.auth-check { display: flex; gap: 11px; align-items: flex-start; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.auth-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--green); flex: none; cursor: pointer; }

.auth-submit {
  height: 52px; border: 0; border-radius: 13px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: linear-gradient(135deg, #42e39a, var(--green-2)); color: #062417;
  font-size: 16px; font-weight: 800;
  box-shadow: 0 12px 28px rgba(35, 197, 129, .25);
  transition: transform .15s, filter .15s, box-shadow .15s;
}
.auth-submit:hover { transform: translateY(-1px); filter: brightness(1.05); }
.auth-submit:disabled { opacity: .7; cursor: wait; transform: none; }
.auth-submit i { transition: transform .2s; }
.auth-submit:hover i { transform: translateX(3px); }

.auth-switch { margin-top: 26px; text-align: center; font-size: 14.5px; color: var(--muted); }
.auth-legal { margin-top: 28px; font-size: 12px; color: #5f7187; text-align: center; }
.auth-legal a { color: #8193a8; font-weight: 500; }

/* Modal de sucesso (cadastro) */
.auth-modal {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  padding: 18px; background: rgba(3, 7, 15, .75); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.auth-modal[hidden] { display: none; }
.auth-modal__card {
  width: 100%; max-width: 380px; padding: 30px 26px 26px; border-radius: 22px; text-align: center;
  background: linear-gradient(160deg, #152339, #0f1a2b); border: 1px solid var(--line);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .5);
  animation: authPop .25s cubic-bezier(.2, .8, .2, 1);
}
.auth-modal__icon {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 20px; display: grid; place-items: center;
  font-size: 26px; background: rgba(57, 217, 138, .14); color: var(--green);
}
.auth-modal__card h3 { font-size: 21px; font-weight: 800; letter-spacing: -.4px; }
.auth-modal__card p { margin: 8px 0 22px; font-size: 14.5px; color: var(--text-2); }
.auth-modal__card .auth-submit { width: 100%; }
@keyframes authPop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }

@media (max-width: 420px) {
  .auth-title { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Recuperar senha: estado "e-mail enviado" ---------- */
.auth-state-icon {
  width: 60px; height: 60px; margin-bottom: 18px; border-radius: 18px; display: grid; place-items: center;
  font-size: 25px; background: rgba(57, 217, 138, .14); color: var(--green);
}
.auth-steps { list-style: none; margin: 22px 0 24px; display: grid; gap: 10px; }
.auth-steps li {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; color: var(--text-2);
}
.auth-steps i { margin-top: 3px; color: var(--green); width: 16px; text-align: center; flex: none; }
.auth-submit--link { width: 100%; text-decoration: none !important; }
.auth-submit--link:hover i { transform: translateX(-3px); }
