:root {
  --primary: #3157d5;
  --primary-dark: #2445b5;
  --primary-soft: #eef2ff;
  --ink: #172033;
  --muted: #6f7a90;
  --line: #e4e8f0;
  --surface: #ffffff;
  --page: #f5f7fb;
  --danger: #d64550;
  --success: #15956b;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.auth-page {
  width: min(1180px, calc(100% - 40px));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  padding: 28px 0;
}

.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand img {
  width: 150px;
  height: 46px;
  /* border-radius: 50%; */
  object-fit: cover;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: "Manrope", sans-serif;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.7px;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.back-home-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.back-home-link:hover {
  color: var(--primary);
}

.auth-layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  align-items: center;
  gap: clamp(50px, 8vw, 110px);
  padding: 70px 7%;
}

.auth-intro {
  max-width: 590px;
}

.auth-intro h1 {
  max-width: 580px;
  margin: 0 0 20px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(44px, 5vw, 68px);
  line-height: 1.06;
  letter-spacing: -3px;
}

.auth-intro > p {
  max-width: 530px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 42px;
}

.feature-grid article {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.feature-grid i {
  display: block;
  margin-bottom: 13px;
  color: var(--primary);
  font-size: 20px;
}

.feature-grid strong,
.feature-grid span {
  display: block;
}

.feature-grid strong {
  margin-bottom: 5px;
  font-size: 13px;
}

.feature-grid span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.auth-card {
  position: relative;
  width: 100%;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(31, 47, 89, 0.11);
}

.auth-form-header {
  margin-bottom: 28px;
}

.auth-form-header h2 {
  margin: 0 0 8px;
  font-family: "Manrope", sans-serif;
  font-size: 29px;
  letter-spacing: -0.8px;
}

.auth-form-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.auth-alert {
  display: flex;
  gap: 9px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.5;
}

.auth-alert-error {
  background: #fff1f2;
  color: #b93640;
}

.auth-alert-success {
  background: #ecfdf5;
  color: #087a57;
}

.auth-form {
  display: grid;
  gap: 20px;
}

.auth-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
}

.mobile-field-wrapper {
  height: 58px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mobile-field-wrapper:focus-within,
.otp-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(49, 87, 213, 0.1);
}

.country-code {
  padding: 0 15px;
  border-right: 1px solid var(--line);
  font-size: 13px;
  font-weight: 800;
}

.mobile-field-wrapper input {
  min-width: 0;
  height: 100%;
  flex: 1;
  padding: 0 15px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.mobile-field-wrapper input::placeholder {
  color: #a0a8b8;
}

.mobile-field-wrapper > i {
  margin-right: 16px;
  color: var(--muted);
}

.field-error {
  display: block;
  min-height: 16px;
  margin-top: 6px;
  color: var(--danger);
  font-size: 11px;
}

.auth-submit-button {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 13px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease;
}

.auth-submit-button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.auth-terms {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
  text-align: center;
}

.auth-terms a,
.otp-number-card button,
.otp-resend-wrapper button {
  color: var(--primary);
  font-weight: 800;
}

.security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 27px;
  color: var(--muted);
  font-size: 11px;
}

.security-note i {
  color: var(--success);
}

.otp-number-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--primary-soft);
}

.otp-number-card small,
.otp-number-card strong {
  display: block;
}

.otp-number-card small {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
}

.otp-number-card strong {
  font-size: 13px;
}

.otp-number-card button,
.otp-resend-wrapper button {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 12px;
}

.otp-input-group {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.otp-input {
  width: 100%;
  min-width: 0;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  background: #fff;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  text-align: center;
}

.otp-resend-wrapper {
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 11px;
}

.otp-resend-wrapper strong {
  color: var(--ink);
}

.otp-resend-wrapper button:disabled {
  display: none;
}

.auth-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  color: var(--muted);
  font-size: 11px;
}

.auth-footer span:not(:last-child)::after {
  content: "•";
  margin-left: 22px;
  color: #bec5d2;
}

.d-none {
  display: none !important;
}

@media (max-width: 920px) {
  .auth-layout {
    grid-template-columns: 1fr;
    gap: 42px;
    padding: 55px 8%;
  }

  .auth-intro {
    max-width: 700px;
  }

  .auth-intro h1 {
    font-size: 48px;
  }

  .auth-card {
    max-width: 520px;
  }
}

@media (max-width: 620px) {
  .auth-page {
    width: min(100% - 24px, 520px);
    padding: 16px 0 22px;
  }

  .brand small {
    display: none;
  }

  .back-home-link {
    font-size: 11px;
  }

  .auth-layout {
    gap: 28px;
    padding: 42px 0;
  }


  .auth-intro h1 {
    margin-bottom: 14px;
    font-size: 36px;
    letter-spacing: -1.8px;
  }

  .auth-intro > p {
    font-size: 14px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    margin-top: 25px;
  }

  .feature-grid article {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px;
  }

  .feature-grid i {
    margin: 0;
  }

  .auth-card {
    padding: 28px 22px;
    border-radius: 20px;
  }

  .auth-form-header h2 {
    font-size: 25px;
  }

  .auth-footer {
    gap: 10px;
    font-size: 9px;
  }

  .auth-footer span:not(:last-child)::after {
    margin-left: 10px;
  }
}