:root {
  --primary: #1266f1;
  --primary-dark: #0f56d9;
  --primary-soft: #eaf2ff;
  --dark: #0f172a;
  --text: #233047;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-strong: #d8e0ec;
  --surface: #ffffff;
  --bg: #f5f8ff;
  --success: #18a957;
  --danger: #ef4444;
  --purple: #7c3aed;
  --orange: #f97316;
  --shadow-card: 0 28px 70px rgba(15, 23, 42, 0.13);
  --shadow-soft: 0 14px 38px rgba(15, 23, 42, 0.08);
  --radius-xl: 34px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--dark);
  background:
    radial-gradient(circle at 25% 15%, rgba(18, 102, 241, 0.09), transparent 30%),
    radial-gradient(circle at 80% 15%, rgba(124, 58, 237, 0.07), transparent 28%),
    linear-gradient(135deg, #f8fbff 0%, #eef5ff 48%, #f7fbff 100%);
}

a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 750;
}

a:hover {
  color: var(--primary-dark);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.auth-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(520px, 1.05fr) minmax(420px, 0.95fr);
  gap: clamp(32px, 5vw, 78px);
  width: min(1500px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 58px);
  overflow: hidden;
}

.brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - clamp(56px, 8vw, 116px));
  padding: 0 0 18px;
  z-index: 1;
}

.brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: clamp(42px, 6vw, 74px);
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--dark);
}

.brand-logo:hover {
  color: var(--dark);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 14px;
  color: #fff;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(145deg, #0b76ff, #0754e8);
  box-shadow: 0 14px 30px rgba(18, 102, 241, 0.32);
}

.brand-logo strong {
  display: block;
  font-size: clamp(32px, 3vw, 42px);
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.brand-logo small {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: 100%;
  padding: 13px 19px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  color: var(--dark);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  backdrop-filter: blur(16px);
}

.mini-icon,
.input-icon,
.feature-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.mini-icon {
  width: 22px;
  height: 22px;
}

.mini-icon svg,
.input-icon svg,
.feature-icon svg,
.bottom-pills svg,
.primary-btn svg,
.icon-btn svg {
  width: 100%;
  height: 100%;
}

.success {
  color: var(--success);
}

.hero-copy {
  max-width: 640px;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(42px, 5.1vw, 70px);
  line-height: 1.12;
  letter-spacing: -0.055em;
}

.hero-copy h1 span {
  display: block;
  color: var(--primary);
}

.hero-copy p {
  max-width: 650px;
  margin: 26px 0 46px;
  color: var(--muted);
  font-size: clamp(17px, 1.45vw, 22px);
  line-height: 1.65;
  font-weight: 560;
}

.feature-list {
  display: grid;
  gap: 26px;
  width: min(580px, 100%);
}

.feature-item {
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: center;
  gap: 22px;
}

.feature-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
}

.feature-icon svg {
  width: 36px;
  height: 36px;
}

.feature-icon.blue { color: var(--primary); background: #eaf2ff; }
.feature-icon.green { color: #16a34a; background: #eafbf1; }
.feature-icon.purple { color: var(--purple); background: #f1ecff; }
.feature-icon.orange { color: var(--orange); background: #fff4ea; }

.feature-item strong {
  display: block;
  margin-bottom: 7px;
  color: var(--dark);
  font-size: 18px;
  letter-spacing: -0.02em;
}

.feature-item small {
  display: block;
  max-width: 360px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 520;
}

.bottom-pills {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 54px;
}

.bottom-pills span {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 54px;
  padding: 12px 28px;
  border: 1px solid rgba(226, 232, 240, 0.82);
  border-radius: 12px;
  color: var(--dark);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
  font-size: 15px;
  font-weight: 800;
  backdrop-filter: blur(14px);
}

.bottom-pills svg {
  width: 24px;
  height: 24px;
}

.decor-lines {
  position: absolute;
  right: -155px;
  bottom: -95px;
  width: 610px;
  height: 610px;
  border-radius: 52% 48% 56% 44%;
  background:
    repeating-radial-gradient(ellipse at 45% 52%,
      transparent 0 18px,
      rgba(18, 102, 241, 0.14) 19px 20px,
      transparent 21px 36px);
  opacity: 0.65;
  transform: rotate(-22deg);
  z-index: -1;
}

.decor-dots {
  position: absolute;
  right: 190px;
  bottom: 175px;
  width: 150px;
  height: 150px;
  opacity: 0.42;
  background-image: radial-gradient(rgba(18, 102, 241, 0.45) 1.2px, transparent 1.2px);
  background-size: 18px 18px;
  z-index: -1;
}

.form-panel {
  display: grid;
  place-items: center;
  min-height: calc(100vh - clamp(56px, 8vw, 116px));
  z-index: 2;
}

.auth-card {
  width: min(100%, 610px);
  padding: clamp(34px, 5.4vw, 66px);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(255, 255, 255, 0.93));
  box-shadow: var(--shadow-card);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: 0 auto 28px;
  border-radius: 50%;
  color: var(--primary);
  background:
    radial-gradient(circle at 35% 28%, #ffffff 0 18%, transparent 19%),
    linear-gradient(135deg, #e8f1ff, #dbeaff);
}

.card-icon svg {
  width: 50px;
  height: 50px;
}

.form-title {
  text-align: center;
  margin-bottom: 34px;
}

.form-title h2 {
  margin: 0;
  color: var(--dark);
  font-size: clamp(28px, 2.6vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.form-title p {
  margin: 12px auto 0;
  max-width: 440px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
  font-weight: 550;
}

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

.form-group {
  display: grid;
  gap: 10px;
}

.form-group label {
  color: var(--dark);
  font-size: 14px;
  font-weight: 800;
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 19px;
  top: 50%;
  width: 25px;
  height: 25px;
  color: #667085;
  transform: translateY(-50%);
  pointer-events: none;
}

.input-wrap input {
  width: 100%;
  height: 62px;
  padding: 0 56px 0 58px;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  outline: none;
  color: var(--dark);
  background: rgba(255, 255, 255, 0.92);
  font-size: 16px;
  font-weight: 560;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.input-wrap input::placeholder {
  color: #758195;
}

.input-wrap input:focus {
  border-color: rgba(18, 102, 241, 0.65);
  box-shadow: 0 0 0 5px rgba(18, 102, 241, 0.12);
  background: #fff;
}

.input-wrap input.error {
  border-color: var(--danger);
  background: #fef2f2;
}

.icon-btn {
  position: absolute;
  right: 17px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  color: #667085;
  background: transparent;
  transform: translateY(-50%);
}

.icon-btn:hover {
  color: var(--primary);
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
}

.checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
}

.checkbox-line input {
  width: 21px;
  height: 21px;
  margin: 0;
  accent-color: var(--primary);
}

.primary-btn,
.google-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 850;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.primary-btn {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #0f7aff 0%, #0d54f0 100%);
  box-shadow: 0 16px 28px rgba(18, 102, 241, 0.28);
}

.primary-btn svg {
  width: 25px;
  height: 25px;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(18, 102, 241, 0.34);
}

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

.secondary-btn {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  box-shadow: 0 12px 24px rgba(22, 163, 74, 0.25);
  margin-top: 4px;
}

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

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

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

.google-btn {
  border: 1.5px solid var(--line-strong);
  color: var(--dark);
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.035);
}

.google-btn:hover {
  border-color: rgba(18, 102, 241, 0.28);
  background: #fbfdff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.google-mark {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  font-size: 24px;
  font-weight: 900;
  background: linear-gradient(90deg, #4285f4 0 25%, #34a853 25% 50%, #fbbc05 50% 75%, #ea4335 75%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.switch-text {
  margin: 8px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 16px;
  font-weight: 650;
}

.switch-text a {
  margin-left: 10px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: end;
}

.two-col .form-group {
  margin-bottom: 0;
}

.two-col .input-wrap input {
  padding: 0 18px 0 58px;
}

.password-hint {
  margin: 8px 0 4px;
}

.error-message,
.success-message {
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  display: none;
}

.error-message {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--danger);
}

.error-message.show {
  display: block;
  animation: shake 0.5s ease-in-out;
}

.success-message {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: var(--success);
}

.success-message.show {
  display: block;
}

.field-error {
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
  display: none;
}

.field-error.show {
  display: block;
}

.timer-warning {
  margin-top: 15px;
  padding: 12px 16px;
  background: #fef3c7;
  border-radius: 12px;
  text-align: center;
  color: #92400e;
  font-weight: 700;
  font-size: 15px;
}

.auth-step {
  display: none;
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.auth-step.is-visible {
  display: grid;
  gap: 22px;
}

.info-banner {
  padding: 14px 18px;
  border-radius: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

.primary-btn:disabled,
.secondary-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-hint {
  margin: -8px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.field-hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.loading {
  opacity: 0.7;
  pointer-events: none;
}

.verification-popup {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(6px);
}

.verification-popup.show {
  display: flex;
}

.verification-popup-content {
  width: min(100%, 480px);
  padding: 36px 28px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.verification-popup-title {
  text-align: center;
  margin-bottom: 24px;
}

.verification-popup-title h3 {
  margin: 0 0 8px;
  font-size: 26px;
  color: var(--dark);
}

.verification-popup-title p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.verification-popup .error-message,
.verification-popup .success-message {
  margin-bottom: 16px;
}

.verification-popup .primary-btn {
  min-height: 56px;
  font-size: 17px;
}

.reset-popup-form .form-group {
  margin-bottom: 18px;
}

.code-input-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 24px 0;
}

.code-input-box {
  width: 52px;
  height: 58px;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  color: var(--dark);
  background: rgba(255, 255, 255, 0.92);
}

.code-input-box:focus {
  outline: none;
  border-color: rgba(18, 102, 241, 0.65);
  box-shadow: 0 0 0 5px rgba(18, 102, 241, 0.12);
}

.code-input-box.filled {
  border-color: var(--primary);
}

.resend-code-link {
  text-align: center;
  margin-top: 18px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
}

.resend-code-link .countdown {
  color: var(--muted);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@media (max-width: 1180px) {
  .auth-shell {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 30px;
  }

  .brand-panel,
  .form-panel {
    min-height: auto;
  }

  .brand-header {
    margin-bottom: 36px;
  }

  .hero-copy,
  .feature-list {
    max-width: none;
    width: 100%;
  }

  .bottom-pills {
    margin-top: 26px;
    padding-top: 16px;
  }

  .decor-lines {
    right: -210px;
    bottom: -170px;
    opacity: 0.35;
  }

  .form-panel {
    place-items: start center;
  }
}

@media (max-width: 760px) {
  .auth-shell {
    padding: 18px;
  }

  .brand-header {
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
  }

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

  .brand-logo strong {
    font-size: 30px;
  }

  .trust-badge {
    display: none;
  }

  .hero-copy h1 {
    font-size: 38px;
  }

  .hero-copy p {
    margin: 18px 0 24px;
    font-size: 16px;
  }

  .feature-item {
    grid-template-columns: 58px 1fr;
    gap: 14px;
  }

  .feature-icon {
    width: 56px;
    height: 56px;
  }

  .bottom-pills,
  .decor-lines,
  .decor-dots {
    display: none;
  }

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

  .card-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 20px;
  }

  .card-icon svg {
    width: 42px;
    height: 42px;
  }

  .input-wrap input,
  .primary-btn,
  .google-btn,
  .secondary-btn {
    min-height: 56px;
    height: 56px;
    font-size: 16px;
  }

  .form-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .code-input-box {
    width: 44px;
    height: 52px;
    font-size: 18px;
  }
}

@media (max-width: 460px) {
  .brand-panel {
    display: none;
  }

  .auth-shell {
    display: grid;
    place-items: center;
    min-height: 100vh;
  }

  .form-panel,
  .auth-card {
    width: 100%;
  }
}
