:root {
  --fx-primary: #6c5ce7;
  --fx-primary-dark: #4b3fcf;
  --fx-ink: #111827;
  --fx-muted: #6b7280;
  --fx-border: #e5e7eb;
  --fx-bg: #f8fafc;
  --fx-card: #ffffff;
  --fx-shadow: 0 20px 50px rgba(17, 24, 39, 0.08);
  --fx-danger-bg: #fef2f2;
  --fx-danger-border: #fecaca;
  --fx-danger-text: #991b1b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: linear-gradient(180deg, #ffffff 0%, #f6f7fc 100%);
  color: var(--fx-ink);
}

a {
  color: inherit;
  text-decoration: none;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-brand {
  padding: 48px;
  background:
    radial-gradient(circle at top right, rgba(108, 92, 231, 0.16), transparent 30%),
    linear-gradient(160deg, #17162a 0%, #101828 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-brand__logo img {
  height: 52px;
  width: auto;
  display: block;
}

.auth-brand__content h1 {
  margin: 0 0 18px;
  font-size: clamp(2.1rem, 4.8vw, 3.8rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  max-width: 520px;
}

.auth-brand__content p {
  margin: 0;
  max-width: 520px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.7;
  font-size: 1.05rem;
}

.auth-brand__card {
  margin-top: 28px;
  width: min(420px, 100%);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 20px;
}

.auth-brand__card-title {
  display: block;
  margin-bottom: 12px;
  font-weight: 700;
}

.auth-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-stat {
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.auth-stat small {
  display: block;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 8px;
}

.auth-stat strong {
  font-size: 1.4rem;
}

.auth-brand__footer {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.92rem;
}

.auth-form-wrap {
  display: grid;
  place-items: center;
  padding: 32px;
  background: var(--fx-bg);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--fx-card);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 24px;
  box-shadow: var(--fx-shadow);
  padding: 32px;
}

.auth-card h2 {
  margin: 0 0 8px;
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.auth-card__sub {
  margin: 0 0 24px;
  color: var(--fx-muted);
  line-height: 1.6;
}

.alert {
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 18px;
  font-size: 0.95rem;
}

.alert-danger {
  background: var(--fx-danger-bg);
  color: var(--fx-danger-text);
  border: 1px solid var(--fx-danger-border);
}

.form-field {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--fx-border);
  border-radius: 14px;
  padding: 0 16px;
  font: inherit;
  background: #fff;
  outline: none;
  transition: 0.2s ease;
}

.form-input:focus {
  border-color: rgba(108, 92, 231, 0.55);
  box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
}

.auth-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 22px;
  color: var(--fx-muted);
  font-size: 0.94rem;
}

.auth-link-muted {
  color: var(--fx-muted);
}

.auth-link-muted.is-disabled {
  pointer-events: none;
  opacity: 0.65;
}

.btn-primary {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 14px;
  background: var(--fx-primary);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(108, 92, 231, 0.22);
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-primary:hover {
  background: var(--fx-primary-dark);
}

.btn-primary:active {
  transform: translateY(1px);
}

.auth-extra {
  margin-top: 18px;
  text-align: center;
  color: var(--fx-muted);
  font-size: 0.95rem;
}

.auth-extra a {
  color: var(--fx-primary-dark);
  font-weight: 600;
}

@media (max-width: 980px) {
  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    padding: 32px;
    gap: 40px;
  }

  .auth-form-wrap {
    padding: 24px;
  }
}

@media (max-width: 640px) {
  .auth-brand {
    padding: 24px;
  }

  .auth-card {
    padding: 24px;
    border-radius: 20px;
  }

  .auth-brand__logo img {
    height: 44px;
  }

  .auth-brand__content h1 {
    font-size: 2rem;
  }
}