:root {
  --bg-1: #050816;
  --bg-2: #0a1224;
  --bg-3: #0d1730;
  --panel: rgba(9, 15, 29, 0.78);
  --panel-2: rgba(12, 20, 38, 0.92);
  --panel-3: rgba(16, 28, 52, 0.92);
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(148, 163, 184, 0.24);
  --text: #eef4ff;
  --muted: #9aaccc;
  --muted-2: #7689ae;
  --primary: #5d7cff;
  --primary-2: #7e5cff;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow-xl: 0 32px 90px rgba(0, 0, 0, 0.4);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 18%, rgba(93,124,255,0.18), transparent 24%),
    radial-gradient(circle at 88% 10%, rgba(126,92,255,0.14), transparent 22%),
    radial-gradient(circle at 50% 100%, rgba(34,197,94,0.08), transparent 20%),
    linear-gradient(180deg, var(--bg-1), var(--bg-2) 40%, var(--bg-3));
  overflow-x: hidden;
}

.page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(560px, 760px) 1fr;
  gap: 0;
}

.left {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.right {
  padding: 24px 24px 24px 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  position: relative;
}

.right::before {
  content: "";
  position: absolute;
  inset: 24px 24px 24px 0;
  border-radius: 34px;
  background:
    radial-gradient(circle at 20% 18%, rgba(93,124,255,0.18), transparent 18%),
    radial-gradient(circle at 82% 70%, rgba(126,92,255,0.12), transparent 18%),
    linear-gradient(180deg, rgba(12,18,34,0.9), rgba(8,12,24,0.96));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xl);
}

.auth-shell {
  width: 100%;
  max-width: 780px;
  border-radius: 34px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.6), rgba(8, 12, 24, 0.92));
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(20px);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.auth-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0% 0%, rgba(93,124,255,0.12), transparent 20%),
    radial-gradient(circle at 100% 0%, rgba(126,92,255,0.08), transparent 20%);
  pointer-events: none;
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  text-decoration: none;
}

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 18px 34px rgba(93,124,255,0.26);
}

.brand-text {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-text span {
  color: #9db3ff;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pill {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d7e2ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--success);
}

.head {
  position: relative;
  z-index: 2;
  margin-bottom: 22px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(93,124,255,0.10);
  border: 1px solid rgba(93,124,255,0.18);
  color: #d7e4ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.kicker-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.title {
  margin: 0 0 10px;
  font-size: 58px;
  line-height: 0.96;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.subtitle {
  margin: 0;
  max-width: 630px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
}

.panel {
  border-radius: 26px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(13,20,38,0.9), rgba(10,15,28,0.96));
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.panel::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.03);
  pointer-events: none;
}

.panel-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.panel-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--warning);
}

.panel-dot:nth-child(2) {
  background: #ec4899;
}

.panel-dot:nth-child(3) {
  background: var(--success);
}

.panel-label {
  margin-left: 8px;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-shell {
  position: relative;
  z-index: 2;
}

.security-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.security-card {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
}

.security-label {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.security-value {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.oauth-grid {
  display: grid;
  gap: 12px;
}

.oauth-btn {
  width: 100%;
  height: 58px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: rgba(15,23,42,0.82);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.oauth-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(93,124,255,0.35);
  background: rgba(18,28,52,0.94);
}

.oauth-icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  font-weight: 900;
}

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.field {
  margin-bottom: 16px;
}

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

label {
  display: block;
  color: #d7e2ff;
  font-size: 14px;
  font-weight: 700;
}

.sub-link {
  color: #9db3ff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.input-wrap {
  position: relative;
}

.input {
  width: 100%;
  height: 58px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: rgba(15,23,42,0.82);
  color: var(--text);
  padding: 0 16px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.input::placeholder {
  color: #7f91b2;
}

.input:focus {
  border-color: rgba(93,124,255,0.5);
  box-shadow: 0 0 0 4px rgba(93,124,255,0.10);
}

.primary-btn {
  width: 100%;
  height: 60px;
  border: 1px solid rgba(93,124,255,0.36);
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(93,124,255,0.24);
  transition: transform 0.18s ease, filter 0.18s ease;
}

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

.primary-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.form-status {
  min-height: 22px;
  margin: 10px 0 4px;
  color: #fca5a5;
  font-size: 13px;
  font-weight: 700;
}

.form-foot {
  margin-top: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.form-foot a {
  color: #9db3ff;
  font-weight: 700;
  text-decoration: none;
}

.verify-step {
  display: none;
}

.verify-step.show {
  display: block;
}

.side {
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15,23,42,0.72), rgba(10,15,28,0.92));
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.side::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.03);
  pointer-events: none;
}

.side-title {
  position: relative;
  z-index: 2;
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 800;
}

.side-text {
  position: relative;
  z-index: 2;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.side-list {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 10px;
}

.side-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.05);
}

.side-item-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  margin-top: 4px;
  flex: 0 0 auto;
}

.side-item-text {
  color: #d9e4ff;
  font-size: 13px;
  line-height: 1.5;
}

.processing-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(7,12,23,0.48);
  backdrop-filter: blur(8px);
  border-radius: 22px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.processing-overlay.show {
  opacity: 1;
  visibility: visible;
}

.processing-box {
  min-width: 250px;
  padding: 20px 18px;
  border-radius: 22px;
  background: rgba(10,15,28,0.94);
  border: 1px solid var(--line-strong);
  box-shadow: 0 18px 40px rgba(0,0,0,0.28);
  text-align: center;
}

.processing-spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto 12px;
  border-radius: 50%;
  border: 4px solid rgba(148,163,184,0.14);
  border-top-color: var(--primary);
  animation: spin 0.9s linear infinite;
}

.processing-title {
  color: var(--text);
  font-weight: 800;
  font-size: 16px;
}

.processing-subtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.hero {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 700px;
  padding: 54px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.10);
  color: #d9e4ff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
  margin-bottom: 22px;
}

.hero-pill-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.hero-title {
  margin: 0 0 16px;
  font-size: 52px;
  line-height: 1.04;
  font-weight: 500;
}

.hero-title strong {
  display: block;
  font-size: 64px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-text {
  max-width: 570px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.72;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
  max-width: 640px;
}

.hero-metric {
  padding: 18px 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}

.hero-metric-value {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 6px;
}

.hero-metric-label {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-btn {
  display: inline-flex;
  min-height: 54px;
  padding: 0 24px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  color: white;
  text-decoration: none;
  font-size: 16px;
  font-weight: 800;
  background: rgba(255,255,255,0.06);
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-btn:hover {
  transform: translateY(-2px);
}

.hero-btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-color: rgba(93,124,255,0.34);
  box-shadow: 0 16px 34px rgba(93,124,255,0.24);
}

.debug-line {
  min-height: 24px;
  margin-top: 12px;
  color: #fca5a5;
  font-size: 13px;
  font-weight: 700;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

  .right {
    display: none;
  }

  .left {
    padding: 18px;
  }

  .auth-shell {
    max-width: 860px;
  }

  .layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .left {
    padding: 12px;
  }

  .auth-shell {
    padding: 18px;
    border-radius: 24px;
  }

  .title {
    font-size: 40px;
  }

  .subtitle {
    font-size: 16px;
  }

  .brand-logo {
    width: 46px;
    height: 46px;
    font-size: 22px;
  }

  .brand-text {
    font-size: 23px;
  }

  .security-row {
    grid-template-columns: 1fr;
  }
}