*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:     #1a2e6b;
  --gold:     #e8b400;
  --white:    #ffffff;
  --g50:      #f9fafb;
  --g100:     #f3f4f6;
  --g200:     #e5e7eb;
  --g400:     #9ca3af;
  --g500:     #6b7280;
  --g700:     #374151;
  --g900:     #111827;
  --red:      #dc2626;
}

html, body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg,#0f172a 0%,#1e3a5f 55%,#1d4ed8 100%);
  background-attachment: fixed;
  color: var(--g700);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── LAYOUT ── */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

/* ── CARD ── */
.card {
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 32px 80px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.06);
  overflow: hidden;
  width: 100%;
  max-width: 460px;
}

/* Blue top — logo/brand */
.card-top {
  background: linear-gradient(135deg,#0f172a 0%,#1e3a5f 55%,#1d4ed8 100%);
  padding: 36px 48px 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 0 0 20px 20px;
}

/* White bottom — form and links */
.card-body {
  padding: 36px 48px 40px;
}

/* ── LOGO ── */
.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo img {
  height: 180px;
  width: auto;
}

.logo-name {
  font-size: 22px;
  font-weight: 400;
  color: var(--white);
  letter-spacing: 0.02em;
}

.logo-name span {
  color: var(--gold);
  font-weight: 700;
}

/* ── FORM ── */
.form { display: flex; flex-direction: column; gap: 14px; }

.field { position: relative; }

.field input {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--g200);
  border-radius: 10px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  color: var(--g900);
  background: var(--white);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.field input::placeholder { color: var(--g400); }

.field input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26,46,107,.08);
}

.field input.error { border-color: var(--red); }

.toggle-pw {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--g400);
  display: flex;
  align-items: center;
  padding: 0;
  transition: color .15s;
}

.toggle-pw:hover { color: var(--g700); }

.field input[type="password"] { padding-right: 44px; }

/* ── FORGOT ── */
.forgot {
  text-align: right;
  margin-top: -6px;
}

.forgot a {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.forgot a:hover { text-decoration: underline; }

/* ── BUTTON ── */
.btn-submit {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg,#0f172a 0%,#1e3a5f 55%,#1d4ed8 100%);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: opacity .15s, transform .15s, box-shadow .15s;
  margin-top: 4px;
}

.btn-submit:hover {
  opacity: .88;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(29,78,216,.35);
}

.btn-submit:active { transform: none; }

/* loading state */
.btn-submit.loading {
  opacity: .7;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── LINKS ── */
.links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.register-line {
  font-size: 14px;
  color: var(--g500);
}

.register-line a {
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .03em;
  font-size: 13px;
}

.register-line a:hover { text-decoration: underline; }

.support-link {
  font-size: 13px;
  color: var(--g400);
  text-decoration: none;
  transition: color .15s;
}

.support-link:hover { color: var(--navy); }

/* ── DIVIDER ── */
.divider {
  width: 100%;
  height: 1px;
  background: var(--g200);
  margin: 20px 0 16px;
}

/* ── TERMS ── */
.terms {
  font-size: 12px;
  color: var(--g400);
  text-align: center;
  line-height: 1.6;
}

.terms a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── GOOGLE BUTTON ── */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 0;
  border: 1.5px solid var(--g200);
  border-radius: 10px;
  background: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--g700);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  margin-bottom: 16px;
}

.btn-google:hover {
  border-color: #4285F4;
  box-shadow: 0 0 0 3px rgba(66,133,244,.12);
}

/* ── DIVIDER OR ── */
.divider-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--g400);
  font-size: 12px;
}

.divider-or::before,
.divider-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--g200);
}

/* ── FIELD ROW (OAB: UF + número) ── */
.field-row {
  display: flex;
  gap: 8px;
}

.field-uf { flex: 0 0 90px; }
.field-oab-num { flex: 1; }

.field-uf select {
  width: 100%;
  height: 48px;
  border: 1.5px solid var(--g200);
  border-radius: 10px;
  padding: 0 10px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--g700);
  background: var(--white);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color .15s, box-shadow .15s;
}

.field-uf select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26,46,107,.08);
}

.field-uf select.error { border-color: var(--red); }

/* ── PASSWORD STRENGTH ── */
.pw-strength {
  height: 4px;
  background: var(--g200);
  border-radius: 4px;
  margin-top: 6px;
  overflow: hidden;
}

.pw-strength-bar {
  height: 100%;
  border-radius: 4px;
  width: 0%;
  transition: width .25s, background .25s;
}

.pw-strength-label {
  font-size: 11px;
  margin-top: 4px;
  color: var(--g400);
  min-height: 16px;
}

/* ── TABS ── */
.auth-tabs {
  display: flex;
  background: var(--g100);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
  gap: 4px;
}

.auth-tab {
  flex: 1;
  padding: 9px 0;
  border: none;
  border-radius: 7px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--g500);
  transition: all .18s;
}

.auth-tab.active {
  background: var(--white);
  color: var(--navy);
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}

/* ── SIGNUP SUCCESS ── */
.signup-success {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  text-align: center;
  margin-top: 4px;
}

/* ── ERROR MSG ── */
.error-msg {
  font-size: 12px;
  color: var(--red);
  margin-top: 4px;
  display: none;
}

.error-msg.show { display: block; }

/* ── FOOTER ── */
.footer-copy {
  margin-top: 28px;
  font-size: 12px;
  color: rgba(255,255,255,.3);
  text-align: center;
}

/* ── RESPONSIVE ── */
@media (max-width: 520px) {
  .card-top { padding: 28px 24px 24px; }
  .card-body { padding: 28px 24px 32px; }
  .logo img { height: 130px; }
}
