:root {
  --auth-content-width: 420px;
  --auth-accent: #6c63ff;
  --auth-muted-text: #333;
  --auth-soft-bg: #f7f8ff;
}

.auth-container {
  width: min(100%, var(--auth-content-width));
  margin: 0 auto;
}

.auth-logo {
  max-width: var(--auth-content-width);
  margin: 0 auto 1.5rem;
}

.auth-logo img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: contain;
}

.auth-login-page {
  background:
    radial-gradient(circle at 50% 12%, rgba(108, 99, 255, 0.22), transparent 32%),
    radial-gradient(circle at 62% 28%, rgba(56, 189, 248, 0.11), transparent 30%),
    #0e1117;
}

.auth-login-page .auth-wrapper {
  min-height: 100dvh;
  padding: 34px 18px 42px;
}

.auth-login-page .auth-logo {
  position: relative;
  width: min(585px, 78vw);
  max-width: none;
  margin: 0 0 36px 50%;
  transform: translateX(-50%);
  text-align: center;
  animation: authBannerIn 0.6s ease both;
}

.auth-login-page .auth-logo::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 36px;
  z-index: -1;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(108, 99, 255, 0.28), rgba(56, 189, 248, 0.2));
  filter: blur(22px);
  opacity: 0.75;
}

.auth-login-page .auth-logo img {
  position: static;
  width: 100%;
  aspect-ratio: auto;
  transform: scale(1);
  transform-origin: center;
  filter: drop-shadow(0 18px 42px rgba(108, 99, 255, 0.18));
}

.auth-login-tagline {
  margin: 8px 0 0;
  color: rgba(229, 231, 235, 0.72);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.4;
  text-align: center;
}

.auth-login-page .auth-card {
  max-width: 480px;
  border-color: rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.9), rgba(11, 16, 32, 0.94));
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.025) inset;
  backdrop-filter: blur(18px);
  animation: authCardIn 0.6s ease 0.15s both;
}

@keyframes authBannerIn {
  from {
    opacity: 0;
    transform: translate(-50%, 12px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

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

.captcha-box {
  margin-top: 1.5rem;
  padding: 1rem;
  border: 2px dashed var(--auth-accent);
  border-radius: 8px;
  background: var(--auth-soft-bg);
}

.captcha-label {
  margin-bottom: 0.25rem;
  color: var(--auth-accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.captcha-question {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--auth-muted-text);
  font-weight: 600;
}

.captcha-box input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  font-size: 14px;
}

.captcha-box input:focus {
  outline: none;
  border-color: var(--auth-accent);
}

.captcha-note {
  margin-top: 0.375rem;
  color: #9ca3af;
  font-size: 0.75rem;
}

.field-helper {
  display: block;
  margin-top: 6px;
  color: #9ca3af;
  font-size: 12px;
  line-height: 1.35;
}

.register-section {
  margin-top: 24px;
}

.register-section:first-of-type {
  margin-top: 0;
}

.register-section-title {
  margin: 0 0 14px;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-transform: uppercase;
}

.auth-status-actions {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.auth-status-actions form {
  margin: 0;
}

.auth-secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 16px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  color: #e5e7eb;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.auth-secondary-action:hover,
.auth-secondary-action:focus-visible {
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(148, 163, 184, 0.1);
  color: #ffffff;
  text-decoration: none;
}

.date-group {
  position: relative;
}

.auth-page .password-group input,
.auth-page .date-group input {
  padding-right: 56px;
}

.auth-page .toggle-password,
.auth-page .date-picker-trigger {
  position: absolute;
  display: grid;
  place-items: center;
  top: 29px;
  right: 8px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  font-size: 19px;
  line-height: 1;
  opacity: 1;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
  user-select: none;
}

.auth-page .date-group input::-webkit-calendar-picker-indicator {
  opacity: 0;
}

.auth-page .toggle-password:hover,
.auth-page .toggle-password:focus-visible,
.auth-page .date-picker-trigger:hover,
.auth-page .date-picker-trigger:focus-visible {
  background: rgba(148, 163, 184, 0.1);
  color: #e5e7eb;
}

.auth-page .toggle-password:focus-visible,
.auth-page .date-picker-trigger:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.55);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .auth-page {
    padding-top: 0;
  }

  .auth-wrapper {
    align-items: flex-start;
    min-height: 100dvh;
    padding: 18px 14px 28px;
    overflow-x: hidden;
  }

  .auth-container {
    width: 100%;
    max-width: 430px;
  }

  .auth-logo {
    width: min(260px, 78vw);
    margin-bottom: 1rem;
  }

  .auth-login-page .auth-wrapper {
    padding: 20px 14px 30px;
  }

  .auth-login-page .auth-logo {
    width: min(420px, 90vw);
    margin-bottom: 34px;
  }

  .auth-login-page .auth-logo::after {
    bottom: 30px;
    height: 32px;
    filter: blur(18px);
  }

  .auth-login-tagline {
    margin-top: 8px;
    font-size: 13px;
  }

  .auth-card {
    max-width: none;
    padding: 24px 18px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  }

  .auth-card h1 {
    font-size: 24px;
    line-height: 1.2;
  }

  .auth-subtext {
    margin-bottom: 22px;
    line-height: 1.45;
  }

  .form-group {
    margin-bottom: 16px;
  }

  .form-group input {
    min-height: 44px;
    font-size: 16px;
    line-height: 1.25;
  }

  .field-error {
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .password-group input,
  .date-group input {
    padding-right: 56px;
  }

  .auth-page .toggle-password,
  .auth-page .date-picker-trigger {
    top: 27px;
    right: 7px;
    width: 42px;
    height: 42px;
    font-size: 20px;
  }

  .btn-primary {
    min-height: 44px;
    font-size: 16px;
  }

  .captcha-box {
    margin-top: 1.25rem;
    padding: 14px;
    border-width: 1px;
  }

  .captcha-question {
    line-height: 1.4;
  }

  .captcha-box input {
    min-height: 44px;
    font-size: 16px;
  }

  .auth-footer {
    line-height: 1.45;
  }
}

@media (max-width: 380px) {
  .auth-wrapper {
    padding: 14px 10px 22px;
  }

  .auth-card {
    padding: 18px 12px;
  }

  .auth-logo {
    width: min(230px, 76vw);
  }

  .auth-login-page .auth-logo {
    width: min(360px, 90vw);
  }

  .auth-card h1 {
    font-size: 22px;
  }

  .captcha-box {
    padding: 12px;
  }

  .auth-page .toggle-password,
  .auth-page .date-picker-trigger {
    right: 5px;
  }
}
