:root {
  --page-bg: #eef4f8;
  --page-bg-2: #e8eff5;
  --text: #15355d;
  --muted: #5f7692;
  --muted-2: #8ea0b4;
  --card: rgba(255, 255, 255, 0.72);
  --card-strong: rgba(255, 255, 255, 0.9);
  --line: rgba(20, 53, 93, 0.10);
  --line-strong: rgba(20, 53, 93, 0.16);
  --primary-a: #ffb347;
  --primary-b: #ff7a59;
  --accent: #2f63d8;
  --success: #19a463;
  --danger: #c93a3a;
  --shadow-xl: 0 28px 70px rgba(18, 47, 78, 0.12);
  --radius-xl: 32px;
  --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% 12%, rgba(255,255,255,0.55), transparent 25%),
    radial-gradient(circle at 85% 8%, rgba(255,255,255,0.35), transparent 20%),
    linear-gradient(180deg, var(--page-bg), var(--page-bg-2));
}

body {
  overflow-x: hidden;
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.auth-card {
  width: min(100%, 1240px);
  min-height: 760px;
  display: grid;
  grid-template-columns: minmax(520px, 700px) 1fr;
  border-radius: 34px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(18px);
}

.auth-left {
  background: linear-gradient(180deg, rgba(240,246,251,0.96), rgba(234,241,247,0.92));
  padding: 54px 54px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-right {
  position: relative;
  background:
    radial-gradient(circle at 18% 20%, rgba(255,255,255,0.08), transparent 20%),
    radial-gradient(circle at 82% 70%, rgba(255,255,255,0.06), transparent 20%),
    linear-gradient(180deg, #0a3767, #042747);
  color: white;
  padding: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.left-inner {
  width: 100%;
  max-width: 560px;
}

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

.brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary-a), var(--primary-b));
  display: grid;
  place-items: center;
  color: white;
  font-size: 30px;
  font-weight: 900;
  box-shadow: 0 16px 34px rgba(255, 128, 84, 0.25);
}

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

.brand-text .dot {
  color: #f29a37;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(20,53,93,0.08);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

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

.auth-title {
  margin: 0 0 12px;
  font-size: 64px;
  line-height: 0.96;
  font-weight: 900;
  letter-spacing: -0.055em;
  color: #0d2d57;
}

.auth-subtitle {
  margin: 0 0 26px;
  color: #29476b;
  font-size: 21px;
  line-height: 1.55;
}

.product-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.product-chip {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(20,53,93,0.08);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

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

.form-panel {
  position: relative;
  border-radius: 30px;
  padding: 24px;
  background: rgba(255,255,255,0.56);
  border: 1px solid rgba(20,53,93,0.08);
  box-shadow: 0 20px 44px rgba(18, 47, 78, 0.08);
  backdrop-filter: blur(14px);
}

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

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

.panel-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ffd27b;
}

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

.panel-dot:nth-child(3) {
  background: #81d6a6;
}

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

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

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

.trust-card {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.62);
  border: 1px solid rgba(20,53,93,0.08);
}

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

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

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

.oauth-btn {
  width: 100%;
  height: 62px;
  border-radius: 18px;
  border: 1px solid rgba(20,53,93,0.12);
  background: rgba(255,255,255,0.92);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(18, 47, 78, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.oauth-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(18, 47, 78, 0.08);
  border-color: rgba(47,99,216,0.18);
}

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

.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(20,53,93,0.12);
}

.field {
  margin-bottom: 18px;
}

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

label {
  display: block;
  color: #304b6d;
  font-size: 15px;
  font-weight: 800;
}

.sub-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.input {
  width: 100%;
  height: 64px;
  border-radius: 18px;
  border: 1px solid rgba(20,53,93,0.12);
  background: rgba(255,255,255,0.94);
  color: var(--text);
  padding: 0 18px;
  font-size: 18px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.input::placeholder {
  color: #b1bcc8;
}

.input:focus {
  border-color: rgba(47,99,216,0.35);
  box-shadow: 0 0 0 4px rgba(47,99,216,0.10);
}

.primary-btn {
  width: 100%;
  height: 64px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(90deg, var(--primary-a), var(--primary-b));
  color: white;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(255, 128, 84, 0.20);
  transition: transform 0.18s ease, filter 0.18s ease;
}

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

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

.form-status {
  min-height: 22px;
  margin: 10px 0 4px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

.form-foot {
  margin-top: 20px;
  text-align: center;
  color: #46637f;
  font-size: 15px;
}

.form-foot a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.verify-step {
  display: none;
}

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

.processing-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.42);
  backdrop-filter: blur(8px);
  border-radius: 24px;
  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(255,255,255,0.95);
  border: 1px solid rgba(20,53,93,0.08);
  box-shadow: 0 18px 40px rgba(17, 44, 72, 0.12);
  text-align: center;
}

.processing-spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto 12px;
  border-radius: 50%;
  border: 4px solid rgba(20,53,93,0.10);
  border-top-color: #ff8a4c;
  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;
}

.right-inner {
  width: 100%;
  max-width: 620px;
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-logo {
  width: 100%;
  max-width: 360px;
  margin: 0 auto 28px;
  display: block;
}

.hero-title {
  margin: 0 0 18px;
  font-size: 48px;
  line-height: 1.1;
  font-weight: 500;
}

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

.hero-text {
  max-width: 520px;
  margin: 0 auto 28px;
  color: rgba(255,255,255,0.92);
  font-size: 22px;
  line-height: 1.6;
}

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

.hero-card {
  padding: 18px 14px;
  border-radius: 22px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.12);
  text-align: left;
}

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

.hero-card-label {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255,255,255,0.82);
}

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

.hero-btn {
  display: inline-flex;
  min-height: 58px;
  padding: 0 26px;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  border: 2px solid rgba(255,255,255,0.72);
  color: white;
  text-decoration: none;
  font-size: 18px;
  font-weight: 800;
}

.hero-btn.secondary {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.16);
}

.debug-line {
  min-height: 24px;
  margin-top: 12px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

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

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

  .auth-right {
    display: none;
  }

  .auth-left {
    padding: 34px 24px;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 0;
  }

  .auth-card {
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  .auth-left {
    padding: 28px 22px;
  }

  .brand-mark {
    width: 52px;
    height: 52px;
    font-size: 26px;
  }

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

  .auth-title {
    font-size: 54px;
  }

  .auth-subtitle {
    font-size: 18px;
  }

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

  .form-panel {
    padding: 18px;
  }
}