:root {
  --bg: #081115;
  --bg-deep: #050a0d;
  --panel: rgba(9, 18, 22, 0.82);
  --panel-soft: rgba(16, 29, 33, 0.72);
  --card: rgba(10, 20, 24, 0.92);
  --card-strong: rgba(7, 15, 18, 0.96);
  --line: rgba(163, 189, 183, 0.18);
  --line-strong: rgba(163, 189, 183, 0.3);
  --text: #eff7f4;
  --muted: #9db0aa;
  --accent: #8bd3a8;
  --accent-strong: #c7f05a;
  --accent-soft: rgba(139, 211, 168, 0.14);
  --danger: #ff8f80;
  --success: #7ce4a8;
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 18px 40px rgba(0, 0, 0, 0.25);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

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

body.auth-body {
  margin: 0;
  font-family: "Outfit", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(139, 211, 168, 0.18), transparent 32%),
    radial-gradient(circle at bottom right, rgba(199, 240, 90, 0.14), transparent 28%),
    linear-gradient(135deg, var(--bg) 0%, #0a171b 46%, var(--bg-deep) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  position: relative;
  overflow-x: hidden;
}

body.auth-body::before,
body.auth-body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: 0;
}

body.auth-body::before {
  top: -120px;
  right: -120px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(139, 211, 168, 0.09);
  filter: blur(18px);
}

body.auth-body::after {
  left: -120px;
  bottom: -120px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: rgba(199, 240, 90, 0.08);
  filter: blur(22px);
}

.auth-shell {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(320px, 0.95fr);
  background: linear-gradient(180deg, rgba(12, 21, 25, 0.92), rgba(7, 14, 18, 0.96));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}

.auth-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(139, 211, 168, 0.06), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 24%);
  pointer-events: none;
}

.auth-panel {
  position: relative;
  z-index: 1;
}

.auth-panel--promo {
  padding: 56px clamp(28px, 4vw, 56px);
  background:
    linear-gradient(160deg, rgba(13, 26, 30, 0.95), rgba(8, 15, 18, 0.86)),
    radial-gradient(circle at top left, rgba(139, 211, 168, 0.14), transparent 36%);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
}

.auth-panel--form {
  padding: 44px clamp(20px, 4vw, 44px);
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(6, 12, 15, 0.84), rgba(10, 17, 20, 0.96)),
    radial-gradient(circle at top right, rgba(199, 240, 90, 0.08), transparent 26%);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: #071014;
  box-shadow: 0 12px 30px rgba(139, 211, 168, 0.2);
}

.promo-copy {
  max-width: 460px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.promo-title {
  margin: 18px 0 12px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.promo-text {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  max-width: 40ch;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.feature-card {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--panel-soft);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-md);
}

.feature-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}

.feature-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.promo-stat {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 13px;
}

.promo-stat strong {
  color: var(--text);
  font-size: 18px;
}

.form-card {
  width: min(100%, 430px);
  background: linear-gradient(180deg, rgba(11, 22, 25, 0.98), rgba(7, 14, 18, 0.98));
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow-md);
  padding: 30px;
}

.form-head {
  margin-bottom: 26px;
}

.form-title {
  margin: 10px 0 8px;
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.form-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

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

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.input-shell {
  position: relative;
}

.auth-input,
.auth-select {
  width: 100%;
  min-height: 50px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  padding: 0 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-input::placeholder {
  color: #6f8780;
}

.auth-input:focus,
.auth-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(139, 211, 168, 0.13);
  background: rgba(255, 255, 255, 0.05);
}

.auth-select {
  appearance: none;
  padding-right: 42px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 22px,
    calc(100% - 14px) 22px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
}

.hint-text {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.forgot-row {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 6px;
}

.inline-link,
.forgot-row a {
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.inline-link:hover,
.forgot-row a:hover {
  text-decoration: underline;
}

.btn-primary {
  width: 100%;
  min-height: 52px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: #081115;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 14px 34px rgba(139, 211, 168, 0.22);
}

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

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  box-shadow: none;
}

.form-footer {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  line-height: 1.6;
}

.message,
.error-msg {
  display: none;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.5;
}

.message.error,
.error-msg.error {
  display: block;
  color: var(--danger);
  background: rgba(255, 143, 128, 0.1);
  border: 1px solid rgba(255, 143, 128, 0.22);
}

.message.success,
.error-msg.success {
  display: block;
  color: var(--success);
  background: rgba(124, 228, 168, 0.1);
  border: 1px solid rgba(124, 228, 168, 0.22);
}

.invalid-token {
  text-align: center;
  padding: 10px 0;
}

.invalid-token h2 {
  margin: 0 0 10px;
  color: var(--danger);
  font-size: 1.5rem;
}

.invalid-token p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

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

  .auth-panel--promo {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 36px;
  }
}

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

  .auth-panel--promo,
  .auth-panel--form {
    padding-left: 18px;
    padding-right: 18px;
  }

  .auth-panel--promo {
    padding-top: 22px;
    padding-bottom: 28px;
  }

  .auth-panel--form {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .form-card {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .feature-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .promo-title {
    font-size: 2.2rem;
  }
}
