/* ==========================================================================
   ENTRAR — página de login/cadastro (entrar.html)
   ========================================================================== */
#auth {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 110px 5% 60px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(10, 24, 41, 0.82);
  border: 1px solid rgba(0, 207, 255, 0.2);
  border-radius: 4px;
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
}

body.light-theme .auth-card {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(0, 111, 159, 0.2);
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--electric), var(--gold), transparent);
}

.auth-head {
  text-align: center;
  margin-bottom: 26px;
}

.auth-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.auth-title span {
  color: var(--electric);
}

.auth-sub {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 3px;
  color: var(--gray);
  text-transform: uppercase;
  margin-top: 6px;
}

/* Abas */
.auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  padding: 4px;
  background: rgba(0, 207, 255, 0.04);
  border: 1px solid rgba(0, 207, 255, 0.15);
  border-radius: 6px;
}

.auth-tab {
  flex: 1;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--gray);
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s;
}

.auth-tab.active {
  color: var(--electric);
  background: rgba(0, 207, 255, 0.1);
  border-color: rgba(0, 207, 255, 0.3);
}

/* Painéis */
.auth-panel {
  display: none;
  flex-direction: column;
  gap: 15px;
}

.auth-panel.active {
  display: flex;
  animation: authFade 0.3s ease;
}

@keyframes authFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Campos */
.auth-field label {
  display: block;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--electric);
  margin-bottom: 7px;
}

.auth-input-wrap {
  position: relative;
}

.auth-field input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(0, 207, 255, 0.04);
  border: 1px solid rgba(0, 207, 255, 0.18);
  border-radius: 6px;
  color: var(--white);
  font-family: 'Exo 2', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.25s;
}

.auth-field input::placeholder {
  color: rgba(143, 168, 200, 0.4);
}

.auth-field input:focus {
  border-color: var(--electric);
  background: rgba(0, 207, 255, 0.07);
  box-shadow: 0 0 0 3px rgba(0, 207, 255, 0.1);
}

.auth-field input.invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 77, 106, 0.12);
}

.auth-field input.valid {
  border-color: var(--green);
}

.toggle-pw {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: var(--gray);
  cursor: pointer;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 1px;
  padding: 6px;
}

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

.field-msg {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.5px;
  color: var(--red);
  margin-top: 5px;
  min-height: 0.8rem;
}

/* Força da senha */
.pw-strength {
  margin-top: 8px;
}

.pw-bars {
  display: flex;
  gap: 4px;
  margin-bottom: 4px;
}

.pw-bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.3s;
}

.pw-bar.weak { background: var(--red); }
.pw-bar.medium { background: var(--gold); }
.pw-bar.strong { background: var(--green); }

.pw-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 1px;
  color: var(--gray);
}

/* Linha "lembrar / esqueci" */
.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--gray);
  cursor: pointer;
}

.auth-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--electric);
  cursor: pointer;
}

.auth-link {
  font-size: 0.78rem;
  color: var(--electric);
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: 'Exo 2', sans-serif;
}

.auth-link:hover {
  text-decoration: underline;
}

/* Botão de envio (full width) */
.auth-submit {
  width: 100%;
  margin-top: 4px;
  justify-content: center;
  text-align: center;
  position: relative;
}

.auth-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.auth-submit.loading {
  color: transparent;
}

.auth-submit.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(5, 13, 26, 0.35);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: authSpin 0.6s linear infinite;
}

@keyframes authSpin {
  to { transform: rotate(360deg); }
}

/* Alerta global */
.auth-alert {
  display: none;
  padding: 11px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  line-height: 1.5;
}

.auth-alert.show {
  display: block;
}

.auth-alert.error {
  background: rgba(255, 77, 106, 0.1);
  border: 1px solid rgba(255, 77, 106, 0.3);
  color: #ff9bab;
}

.auth-alert.success {
  background: rgba(0, 255, 153, 0.08);
  border: 1px solid rgba(0, 255, 153, 0.28);
  color: var(--green);
}

.auth-alert.info {
  background: rgba(0, 207, 255, 0.08);
  border: 1px solid rgba(0, 207, 255, 0.25);
  color: var(--electric);
}

.auth-foot {
  text-align: center;
  margin-top: 20px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 1px;
  color: rgba(143, 168, 200, 0.5);
}

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