:root {
  --auth-bg-deep: #0e1a23;
  --auth-bg-mid: #143241;
  --auth-ink: #17212c;
  --auth-muted: #556070;
  --auth-accent: #2b9aa3;
  --auth-accent-strong: #1f7b84;
  --auth-accent-soft: rgba(43, 154, 163, 0.16);
  --auth-warm: #f1a55c;
  --auth-card: rgba(255, 255, 255, 0.94);
  --auth-border: rgba(15, 26, 35, 0.12);
  --auth-shadow: 0 24px 60px rgba(12, 23, 31, 0.25);
}

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

html,
body {
  height: 100%;
}

body.auth-body {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  color: var(--auth-ink);
  background: radial-gradient(circle at 10% 15%, rgba(241, 165, 92, 0.35), transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(43, 154, 163, 0.35), transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(240, 220, 180, 0.4), transparent 45%),
    linear-gradient(180deg, #0f1c24 0%, #163847 45%, #0b141b 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body.auth-body::before,
body.auth-body::after {
  content: "";
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 70%);
  filter: blur(0);
  opacity: 0.55;
  z-index: 0;
}

body.auth-body::before {
  top: -140px;
  right: -120px;
}

body.auth-body::after {
  bottom: -180px;
  left: -140px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.auth-shell,
.login-container,
.forgot-password-container,
.activation-container,
.password-container {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(80px, 12vh, 140px) 20px 80px;
  position: relative;
  z-index: 1;
}

.auth-card,
.login-box,
.forgot-password-box,
.activation-box,
.password-box {
  width: min(540px, 92vw);
  background: var(--auth-card);
  border-radius: 24px;
  padding: clamp(24px, 4vw, 36px);
  box-shadow: var(--auth-shadow);
  border: 1px solid rgba(255, 255, 255, 0.4);
  position: relative;
  overflow: hidden;
}

.auth-card::before,
.login-box::before,
.forgot-password-box::before,
.activation-box::before,
.password-box::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -140px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(43, 154, 163, 0.32), transparent 70%);
  opacity: 0.7;
  pointer-events: none;
}

.auth-card::after,
.login-box::after,
.forgot-password-box::after,
.activation-box::after,
.password-box::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--auth-accent), var(--auth-warm));
  border-radius: 24px 24px 0 0;
  pointer-events: none;
}

.auth-card__header {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.auth-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--auth-accent-strong);
  background: rgba(43, 154, 163, 0.12);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 600;
  width: fit-content;
}

.auth-title {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.6rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  color: var(--auth-ink);
}

.auth-subtitle {
  margin: 0;
  color: var(--auth-muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field label,
.auth-form label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #3f485a;
}

.auth-form .form-control,
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(23, 33, 44, 0.12);
  padding: 12px 14px;
  font-size: 0.98rem;
  background: #f6f8fb;
  color: var(--auth-ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-form .form-control:focus,
.auth-form input[type="email"]:focus,
.auth-form input[type="password"]:focus,
.auth-form input[type="text"]:focus {
  outline: none;
  border-color: var(--auth-accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(43, 154, 163, 0.18);
}

.auth-form img {
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(23, 33, 44, 0.12);
}

.auth-form .errorlist {
  margin: 6px 0 0;
  padding-left: 18px;
  color: #b43030;
  font-size: 0.85rem;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--auth-muted);
}

.auth-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.auth-row a {
  color: var(--auth-accent-strong);
  text-decoration: none;
  font-weight: 600;
}

.auth-row a:hover {
  color: var(--auth-accent);
}

.auth-form input[type="checkbox"] {
  accent-color: var(--auth-accent);
}

.auth-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 12px 18px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
}

.btn-primary {
  background: linear-gradient(120deg, var(--auth-accent), var(--auth-accent-strong));
  color: #fff;
  box-shadow: 0 12px 30px rgba(43, 154, 163, 0.28);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(43, 154, 163, 0.32);
}

.btn-primary:disabled {
  background: #b8c6c9;
  box-shadow: none;
  cursor: not-allowed;
}

.btn-secondary {
  background: #fff;
  color: var(--auth-ink);
  border: 1px solid rgba(23, 33, 44, 0.18);
}

.btn-secondary:hover {
  border-color: var(--auth-accent);
  color: var(--auth-accent-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--auth-accent-strong);
  border: 1px dashed rgba(43, 154, 163, 0.4);
}

.btn-ghost:hover {
  color: var(--auth-accent);
  border-color: var(--auth-accent);
}

.auth-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--auth-muted);
  margin-top: 10px;
}

.auth-footer a {
  color: var(--auth-accent-strong);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover {
  color: var(--auth-accent);
}

.auth-alert,
.error-message,
.success-message {
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.auth-alert--error,
.error-message {
  background: rgba(220, 70, 70, 0.12);
  color: #b43030;
  border: 1px solid rgba(220, 70, 70, 0.2);
}

.auth-alert--success,
.success-message {
  background: rgba(43, 154, 163, 0.12);
  color: #1b6f76;
  border: 1px solid rgba(43, 154, 163, 0.2);
}

.auth-status {
  margin-top: 18px;
  border-radius: 16px;
  padding: 16px;
  background: rgba(245, 250, 249, 0.95);
  border: 1px solid rgba(23, 33, 44, 0.12);
  display: grid;
  gap: 8px;
}

.auth-status__timer {
  font-size: 0.88rem;
  color: var(--auth-muted);
}

.auth-status__timer span {
  font-weight: 700;
  color: var(--auth-ink);
}

.auth-note {
  font-size: 0.88rem;
  color: var(--auth-muted);
  margin: 0;
}

.social-login {
  margin-top: 18px;
}

.terms-note {
  font-size: 0.82rem;
  color: var(--auth-muted);
  margin: 10px 0 0;
}

.fade-in {
  animation: auth-fade-up 0.6s ease both;
}

@keyframes auth-fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 700px) {
  .auth-shell,
  .login-container,
  .forgot-password-container,
  .activation-container,
  .password-container {
    padding: 100px 16px 60px;
  }

  .auth-card,
  .login-box,
  .forgot-password-box,
  .activation-box,
  .password-box {
    padding: 22px;
  }

  .auth-actions,
  .auth-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-secondary,
  .btn-ghost {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fade-in,
  .auth-card,
  .login-box,
  .forgot-password-box,
  .activation-box,
  .password-box {
    animation: none;
  }
}
