:root {
  --auth-bg: #f6f8fc;
  --auth-text: #121a2f;
  --auth-muted: #63718c;
  --auth-line: #d9e1ef;
  --auth-input: #e9f0fb;
  --auth-primary: #7c3aed;
  --auth-primary-2: #3b82f6;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: var(--auth-bg);
  color: var(--auth-text);
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(420px, 1.03fr) minmax(420px, 1fr);
  min-height: 100vh;
}

.auth-brand {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 72% 27%, rgba(255, 255, 255, 0.16), transparent 22%),
    radial-gradient(circle at 46% 57%, rgba(255, 255, 255, 0.1), transparent 26%),
    linear-gradient(135deg, #292c62 0%, #5a2bb8 42%, #8338ec 68%, #2f8af7 100%);
}

.auth-brand-content {
  width: min(460px, calc(100% - 80px));
  transform: translateY(4px);
}

.auth-brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 44px;
}

.auth-mark {
  width: 46px;
  height: 28px;
  overflow: visible;
}

.auth-wordmark {
  font-size: 31px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.auth-brand h1 {
  margin-bottom: 38px;
  text-align: center;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 650;
}

.auth-feature-list {
  display: grid;
  gap: 22px;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 16px;
  font-weight: 400;
}

.auth-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.auth-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 48px 112px;
}

.auth-card {
  width: min(400px, 100%);
}

.auth-card h2 {
  margin-bottom: 14px;
  color: var(--auth-text);
  font-size: 30px;
  line-height: 1.15;
  font-weight: 650;
}

.auth-subtitle {
  margin-bottom: 36px;
  color: var(--auth-muted);
  font-size: 15px;
  line-height: 1.5;
}

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

.auth-field label,
.auth-check {
  color: var(--auth-text);
  font-size: 13px;
  font-weight: 500;
}

.auth-field label {
  display: block;
  margin-bottom: 9px;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap svg {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 19px;
  height: 19px;
  transform: translateY(-50%);
  color: #91a1b9;
  pointer-events: none;
}

.auth-input-wrap .auth-trailing-icon {
  right: 15px;
  left: auto;
}

.auth-input,
.code-inputs input {
  width: 100%;
  min-height: 47px;
  border: 1px solid var(--auth-line);
  border-radius: 8px;
  background: var(--auth-input);
  color: var(--auth-text);
  font: inherit;
  font-weight: 400;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-input {
  padding: 0 44px;
}

.auth-input:focus,
.code-inputs input:focus {
  border-color: #8b5cf6;
  background: #eef4ff;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: -4px;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--auth-muted);
  font-weight: 500;
}

.auth-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--auth-primary);
}

.auth-button {
  width: 100%;
  min-height: 49px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(90deg, var(--auth-primary), var(--auth-primary-2));
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.auth-button:hover {
  filter: brightness(1.04);
}

.auth-button:active {
  transform: translateY(1px);
}

.auth-link {
  display: inline-flex;
  justify-content: center;
  color: var(--auth-primary);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-demo {
  margin-top: 28px;
  padding: 15px 18px;
  border-radius: 8px;
  background: #f0f4fb;
  color: var(--auth-muted);
  text-align: center;
  font-size: 13px;
  line-height: 1.55;
}

.auth-demo strong {
  display: block;
  color: var(--auth-text);
  font-size: 12px;
  font-weight: 600;
}

.auth-footer {
  position: absolute;
  right: 48px;
  bottom: 58px;
  left: 48px;
  margin-top: 0;
  padding-top: 0;
  color: #8190aa;
  text-align: center;
  font-size: 12px;
}

.auth-error,
.auth-success {
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 500;
}

.auth-error {
  background: #fff1f2;
  color: #dc2626;
}

.auth-success {
  background: #ecfdf5;
  color: #047857;
}

.code-inputs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.code-inputs input {
  padding: 0;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
}

.auth-resend {
  margin-top: 18px;
  text-align: center;
}

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

  .auth-brand {
    min-height: 320px;
  }

  .auth-brand-content {
    width: min(420px, calc(100% - 48px));
  }

  .auth-brand h1 {
    margin-bottom: 28px;
    font-size: 30px;
  }

  .auth-panel {
    padding: 42px 24px 96px;
  }

  .auth-footer {
    right: 24px;
    bottom: 36px;
    left: 24px;
  }
}

@media (max-width: 520px) {
  .auth-brand {
    min-height: 280px;
  }

  .auth-feature {
    font-size: 14px;
  }

  .auth-card h2 {
    font-size: 27px;
  }

  .code-inputs {
    gap: 7px;
  }
}
