/* ================================
   EQUALITY — auth.css
   Login e Register
   ================================ */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background-color: #000;
  background-image: radial-gradient(circle, rgba(255, 255, 0, .12) 1px, transparent 1px);
  background-size: 28px 28px;
}

.auth-container {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.auth-logo {
  font-size: 22px;
}

.auth-card {
  width: 100%;
  background: var(--bg2);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow:
    0 8px 40px rgba(0, 0, 0, .8),
    0 2px 8px rgba(0, 0, 0, .6);
}

.auth-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.5px;
  margin-bottom: 6px;
}

.auth-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 28px;
}

/* ---- FORM ---- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--white);
}

.field input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--white);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.field input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(255, 255, 0, .08);
}

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

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

.field__input-wrap {
  position: relative;
}

.field__input-wrap input {
  padding-right: 44px;
}

.field__toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: color .2s;
}

.field__toggle:hover {
  color: var(--white);
}

.field__error {
  font-size: 12px;
  color: var(--danger);
  min-height: 16px;
}

.field__hint {
  font-size: 12px;
  color: var(--muted);
}

.field__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

/* ---- CHECKBOX ---- */
.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}

.checkbox input {
  accent-color: var(--green);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.checkbox--terms {
  margin-bottom: 20px;
}

/* ---- PASSWORD STRENGTH ---- */
.password-strength {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 2px;
}

.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width .3s, background .3s;
}

/* ---- DIVIDER ---- */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 12px;
}

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

/* ---- LINKS ---- */
.link {
  color: var(--green);
  text-decoration: none;
  font-size: 13px;
  transition: opacity .2s;
}

.link:hover {
  opacity: .75;
}

.auth-footer {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 20px;
}

/* ---- FORM ERROR BANNER ---- */
.form-error {
  background: rgba(224, 82, 82, .1);
  border: 1px solid rgba(224, 82, 82, .3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--danger);
  margin-bottom: 18px;
  display: none;
}

.form-error.active {
  display: block;
}

/* ================================
   LIGHT MODE
   ================================ */
[data-theme="light"] .auth-page {
  background-color: #FFFFFF;
  background-image: radial-gradient(circle, rgba(0, 0, 0, .18) 1px, transparent 1px);
  background-size: 28px 28px;
}

[data-theme="light"] .auth-card {
  background: #FFFFFF;
  border-color: #E5E5E5;
  box-shadow:
    0 12px 48px rgba(0, 0, 0, .10),
    0 4px 12px rgba(0, 0, 0, .06);
}

[data-theme="light"] .field input {
  background: #FAFAFA;
  border-color: #E5E5E5;
  color: #0D0D0D;
}

[data-theme="light"] .field input:focus {
  border-color: #0D0D0D;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .08);
}

[data-theme="light"] .field__toggle:hover {
  color: #0D0D0D;
}

/* ================================
   BOTÕES FIXOS (Toggle e Voltar)
   ================================ */
.auth-theme-toggle {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 200;
}

.auth-back-btn {
  position: fixed;
  top: 22px;
  left: 24px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: opacity .2s;
}

.auth-back-btn:hover {
  opacity: 0.7;
}

[data-theme="light"] .auth-back-btn:hover {
  opacity: 0.6;
}

@media (max-width: 480px) {
  .auth-card {
    padding: 28px 20px;
  }

  .auth-theme-toggle {
    top: 14px;
    right: 16px;
  }

  .auth-back-btn {
    top: 16px;
    left: 16px;
  }

  .auth-back-btn span {
    display: none;
  }
}
