@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Space+Grotesk:wght@500;600;700&display=swap');

.auth-page {
  background-color: #020617;
  color: #fff;
  min-height: 100vh;
}

.auth-page ::selection {
  background: rgba(99, 102, 241, 0.35);
}

.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #020617;
}

.auth-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, #1e1b4b 0%, transparent 70%);
  opacity: 0.4;
}

.auth-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%);
  background-size: 100% 4px;
  opacity: 0.3;
}

.auth-page-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 4rem);
  padding: 5rem 1rem 3rem;
}

@media (min-width: 992px) {
  .auth-page-main {
    min-height: calc(100vh - 5rem);
    padding-top: 6rem;
  }
}

.auth-card {
  width: 100%;
  max-width: 28rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
  color: #fff;
}

.auth-card-header {
  padding: 1.5rem 1.5rem 0;
  text-align: center;
}

.auth-card-title {
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
}

.auth-card-desc {
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0.5rem 0 0;
  line-height: 1.5;
}

.auth-card-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.auth-field {
  margin-bottom: 1rem;
}

.auth-label {
  display: block;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.375rem;
}

.auth-input {
  display: block;
  width: 100%;
  height: 2.5rem;
  border-radius: 0.375rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.375rem 0.75rem;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.875rem;
  color: #fff;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.auth-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.auth-input--error {
  border-color: rgba(239, 68, 68, 0.45);
}

.auth-input--error:focus {
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}

.auth-input--readonly {
  opacity: 0.88;
  cursor: default;
}

.auth-error {
  display: none;
  align-items: center;
  gap: 0.25rem;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.75rem;
  color: #f87171;
  margin: 0.375rem 0 0;
  line-height: 1.35;
  filter: drop-shadow(0 0 6px rgba(248, 113, 113, 0.35));
}

.auth-error.is-visible {
  display: flex;
}

.auth-error-icon {
  flex-shrink: 0;
  width: 0.75rem;
  height: 0.75rem;
}

.auth-row-forgot {
  text-align: right;
  margin: -0.25rem 0 0.25rem;
}

.auth-link {
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.875rem;
  color: #818cf8;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-card-footer {
  padding: 0 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.375rem;
  background: #4f46e5;
  color: #fff;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

.auth-btn:hover:not(:disabled) {
  background: #4338ca;
}

.auth-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-btn--loading {
  pointer-events: none;
}

.auth-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin 0.65s linear infinite;
  display: none;
}

.auth-btn--loading .auth-spinner {
  display: block;
}

@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

.auth-foot {
  text-align: center;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

.auth-foot-link {
  color: #818cf8;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.auth-foot-link:hover {
  text-decoration: underline;
}

.auth-captcha-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.auth-captcha-row .auth-input {
  flex: 1;
}

.auth-captcha-box {
  width: 6rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.1);
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 1.125rem;
  letter-spacing: 0.15em;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}

.auth-captcha-box:hover {
  background: rgba(255, 255, 255, 0.18);
}

.auth-page .site-footer-v2 {
  position: relative;
  z-index: 1;
}
