:root {
  --navy-900: #050d24;
  --navy-800: #0a1738;
  --navy-700: #0f2050;
  --panel: rgba(255, 255, 255, 0.04);
  --line: rgba(120, 160, 235, 0.18);
  --green: #3ddc84;
  --green-600: #2ecc71;
  --orange: #f39c3c;
  --red: #e05a6b;
  --text: #eef3ff;
  --muted: #9db0d6;
  --radius: 16px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--navy-900);
  min-height: 100vh;
}
h1, h2, h3, .btn, .auth__brand span { font-family: "Poppins", "Montserrat", sans-serif; }
img { display: block; max-width: 100%; }

.auth-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(55% 45% at 80% 10%, rgba(74,144,226,.18), transparent 70%),
    radial-gradient(60% 50% at 15% 100%, rgba(61,220,132,.16), transparent 70%),
    linear-gradient(180deg, var(--navy-800), var(--navy-900));
}

.auth {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 20px; padding: 32px 18px;
}
.auth__brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.auth__brand img { width: 34px; height: 34px; object-fit: contain; }
.auth__brand span { font-weight: 800; letter-spacing: .08em; font-size: 1.02rem; }

.auth__card {
  width: 100%; max-width: 500px;
  background: linear-gradient(180deg, rgba(15,32,80,.65), rgba(10,23,56,.85));
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 34px);
}

.auth__tabs { display: flex; gap: 6px; background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 999px; padding: 5px; margin-bottom: 22px; }
.auth__tab { flex: 1; padding: 10px; border: none; background: none; color: var(--muted); font-weight: 600; font-size: .88rem; border-radius: 999px; cursor: pointer; transition: .2s ease; }
.auth__tab.is-active { background: linear-gradient(90deg, var(--green-600), var(--green)); color: #04240f; }

.auth__alert { padding: 12px 14px; border-radius: 12px; font-size: .88rem; margin-bottom: 16px; border: 1px solid transparent; }
.auth__alert.is-error { background: rgba(224,90,107,.12); border-color: rgba(224,90,107,.4); color: #ffc3cb; }
.auth__alert.is-ok { background: rgba(61,220,132,.12); border-color: rgba(61,220,132,.4); color: #b9f5d3; }

.view { display: none; }
.view.is-active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.view__head { margin-bottom: 18px; text-align: center; }
.view__head h2 { font-size: 1.15rem; margin-bottom: 6px; }
.view__head p { color: var(--muted); font-size: .86rem; }

.field { display: block; margin-bottom: 13px; }
.field > span { display: block; font-size: .78rem; color: var(--muted); margin-bottom: 5px; }
.field input {
  width: 100%; padding: 11px 13px; border-radius: 11px;
  border: 1px solid var(--line); background: rgba(0,0,0,.25); color: var(--text);
  font-family: inherit; font-size: .9rem;
}
.field input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(61,220,132,.15); }
.field input[readonly] { opacity: .7; cursor: not-allowed; }
.field__hint { display: block; font-size: .76rem; margin-top: 5px; color: var(--muted); }
.field__hint.is-error { color: #ffc3cb; }
.field__hint.is-ok { color: #b9f5d3; }

.field__pass { position: relative; display: block; }
.field__pass input { padding-right: 44px; }
.toggle-pass { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 1.05rem; opacity: .7; }
.toggle-pass:hover { opacity: 1; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 90px; gap: 0 14px; }
.grid-cep { display: grid; grid-template-columns: 150px 120px 1fr; gap: 0 14px; }

.field-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 18px; }
.field-row--center { justify-content: center; gap: 24px; margin-top: 16px; }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .88rem; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--green); }

.link { background: none; border: none; color: var(--green); font-size: .86rem; font-weight: 600; cursor: pointer; text-decoration: none; }
.link:hover { text-decoration: underline; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 999px; border: none; font-weight: 700; font-size: .92rem; cursor: pointer; transition: transform .15s ease, filter .2s ease, opacity .2s ease; }
.btn--green { background: linear-gradient(90deg, var(--green-600), var(--green)); color: #04240f; }
.btn--green:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn--block { width: 100%; margin-top: 6px; }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* Regras de senha em tempo real */
.pass-rules { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin: 2px 0 16px; }
.pass-rules li { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); transition: color .2s ease; }
.pass-rules li i { width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--muted); flex: 0 0 auto; position: relative; transition: .2s ease; }
.pass-rules li.ok { color: #b9f5d3; }
.pass-rules li.ok i { background: var(--green); border-color: var(--green); }
.pass-rules li.ok i::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 10px; color: #04240f; font-weight: 700; }

.code-input {
  width: 100%; text-align: center; letter-spacing: 14px;
  font-size: 1.5rem; font-weight: 700; padding: 13px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(0,0,0,.25); color: var(--text); margin-bottom: 14px;
}
.code-input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(61,220,132,.15); }

.auth__foot { color: var(--muted); font-size: .78rem; letter-spacing: .08em; text-align: center; }

@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-cep { grid-template-columns: 1fr; }
  .pass-rules { grid-template-columns: 1fr; }
}
