/* ========================================
   Login / Register Page
   Payel Bhunia
   ======================================== */

.auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px var(--sp-md) 80px;
  background: linear-gradient(135deg, #1E1233 0%, #2F1F4F 40%, #4A2D7A 100%);
}

.auth__container {
  width: 100%;
  max-width: 420px;
  background: rgba(255,255,255,0.97);
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.auth__brand {
  font-family: 'Great Vibes', cursive;
  font-size: 2.4rem;
  text-align: center;
  color: var(--clr-primary, #917ABF);
  margin-bottom: 4px;
}

.auth__subtitle {
  text-align: center;
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 28px;
}

/* ---------- Tabs ---------- */
.auth__tabs {
  display: flex;
  border-bottom: 2px solid #eee;
  margin-bottom: 24px;
}

.auth__tab {
  flex: 1;
  background: none;
  border: none;
  padding: 10px 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #aaa;
  cursor: pointer;
  position: relative;
  transition: color 0.3s;
}

.auth__tab--active {
  color: var(--clr-primary, #917ABF);
}

.auth__tab--active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 20%;
  width: 60%;
  height: 2px;
  background: var(--clr-primary, #917ABF);
  border-radius: 1px;
}

/* ---------- Form ---------- */
.auth__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth__field label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #555;
}

.auth__field input {
  padding: 12px 14px;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.3s, box-shadow 0.3s;
  background: #fafafa;
}

.auth__field input:focus {
  outline: none;
  border-color: var(--clr-primary, #917ABF);
  box-shadow: 0 0 0 3px rgba(145,122,191,0.15);
  background: #fff;
}

.auth__submit {
  margin-top: 6px;
  padding: 14px;
  background: linear-gradient(135deg, #917ABF, #6B4F9E);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.auth__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(145,122,191,0.4);
}

.auth__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth__error {
  color: #e74c3c;
  font-size: 0.85rem;
  text-align: center;
  min-height: 1.2em;
}

.auth__success {
  color: #059669;
  font-size: 0.85rem;
  text-align: center;
  min-height: 1.2em;
}

.auth__forgot {
  text-align: center;
  font-size: 0.82rem;
  margin-top: 4px;
}

.auth__forgot a {
  color: var(--clr-primary, #917abf);
  text-decoration: none;
}

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

.auth__blocked-msg {
  display: inline-block;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.4;
}

.auth__hint {
  text-align: center;
  font-size: 0.78rem;
  color: #aaa;
  font-style: italic;
  margin-top: -4px;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .auth {
    padding: 100px 16px 80px;
  }
  .auth__container {
    padding: 30px 24px;
  }
  .auth__brand {
    font-size: 2rem;
  }
}

/* ========== Dark Mode ========== */
[data-theme="dark"] .auth__container {
  background: rgba(42, 30, 61, 0.97);
}

[data-theme="dark"] .auth__subtitle {
  color: var(--clr-text-muted);
}

[data-theme="dark"] .auth__tabs {
  border-bottom-color: var(--clr-border);
}

[data-theme="dark"] .auth__tab {
  color: var(--clr-text-light);
}

[data-theme="dark"] .auth__tab--active {
  color: var(--clr-text);
}

[data-theme="dark"] .auth__field label {
  color: var(--clr-text-muted);
}

[data-theme="dark"] .auth__field input {
  border-color: var(--clr-border);
  background: var(--clr-surface);
  color: var(--clr-text);
}

[data-theme="dark"] .auth__field input:focus {
  background: var(--clr-bg-alt);
}

[data-theme="dark"] .auth__blocked-msg {
  background: rgba(127, 29, 29, 0.2);
  border-color: rgba(220, 38, 38, 0.3);
  color: #fca5a5;
}

[data-theme="dark"] .auth__hint {
  color: var(--clr-text-light);
}
