/* ── CSS Custom Properties (mirrors _variables.scss) ──────────────────── */
:root {
  --white: #fff;
  --color-100: #454f66;
  --color-200: #841618;
  --dark-200: #c1c1c1;
  --dark-300: #999999;
  --dark-400: #707070;
  --primary-font: "Times New Roman Cyr", "Times New Roman", serif;
  --fs-08: 0.75rem;
  --fs-09: 0.875rem;
  --fs-10: 1rem;
  --fs-14: 1.875rem;
}

/* ── Auth page shell ──────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body.auth-page {
  min-height: 100vh;
  margin: 0;
  background-color: #f0f0ef;
  font-family: var(--primary-font);
}

.auth-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  padding: 3rem 2.5rem 2.5rem;
  background-color: var(--white);
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.09);
}

@media (max-width: 480px) {
  .auth-card {
    padding: 2rem 1.25rem 2rem;
  }
}

/* ── Logo ──────────────────────────────────────────────────────────────── */
.auth-logo {
  display: block;
  text-align: center;
  margin-bottom: 2.5rem;
  text-decoration: none;
}

.auth-logo img {
  width: 200px;
  max-width: 100%;
}

/* ── Section heading ────────────────────────────────────────────────────── */
.auth-hd {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-hd h2 {
  color: var(--color-100);
  font-size: var(--fs-14);
  margin: 0 0 0.5rem 0;
  font-weight: normal;
}

.auth-hd p {
  color: var(--dark-400);
  font-size: var(--fs-10);
  margin: 0;
  line-height: 1.6;
}

.auth-hd strong {
  color: var(--color-100);
  font-weight: 600;
}

/* ── Error message ──────────────────────────────────────────────────────── */
.auth-error {
  display: block;
  color: var(--color-200);
  font-size: var(--fs-09);
  margin-top: 0.4rem;
  margin-bottom: 0.75rem;
}

.auth-error i {
  margin-right: 0.25rem;
}

.auth-error.text-center {
  text-align: center;
  margin-bottom: 1rem;
}

/* ── Fine-print note ────────────────────────────────────────────────────── */
.auth-note {
  margin-top: 1.5rem;
  color: var(--dark-300);
  font-size: var(--fs-08);
  text-align: center;
  line-height: 1.5;
}

/* ── Phone input row ────────────────────────────────────────────────────── */
.otp-phone-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.isd-select {
  flex: 0 0 auto;
  width: 150px;
  height: 52px;
  padding: 0 1.5rem 0 0.75rem;
  color: var(--color-100);
  background-color: transparent;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='rgba(69,79,102,1)' d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 10px;
  border: 1px solid var(--dark-200);
  border-radius: 0;
  font-size: 0.875rem;
  font-family: var(--primary-font);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.isd-select:focus {
  outline: none;
  border-color: var(--color-100);
  box-shadow: none;
}

@media (max-width: 480px) {
  .isd-select {
    width: 90px;
    font-size: 0.8rem;
    padding-left: 0.5rem;
  }
}

.phone-input {
  flex: 1 1 0;
  min-width: 0;
  height: 52px;
  padding: 0 1rem;
  color: var(--color-100);
  font-size: 1rem;
  font-family: var(--primary-font);
  background-color: transparent;
  border: 1px solid var(--dark-200);
  border-radius: 0;
  transition: border-color 0.2s;
}

.phone-input:focus {
  outline: none;
  border-color: var(--color-100);
  box-shadow: none;
}

.phone-input::placeholder {
  color: var(--dark-300);
}

.phone-input.is-error {
  border-color: var(--color-200);
}

/* ── Primary action button ──────────────────────────────────────────────── */
.btn-auth {
  display: block;
  width: 100%;
  height: 52px;
  color: var(--white);
  font-size: 1rem;
  font-family: var(--primary-font);
  letter-spacing: 0.04em;
  background-color: var(--color-100);
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-top: 1.25rem;
}

.btn-auth i {
  font-size: 0.9em;
}

.btn-auth:hover {
  background-color: var(--color-200);
}

.btn-auth:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-auth.mt-2 {
  margin-top: 0.75rem;
}

/* ── Ghost text button ──────────────────────────────────────────────────── */
.btn-auth-text {
  background: none;
  border: none;
  color: var(--color-100);
  font-size: var(--fs-09);
  font-family: var(--primary-font);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.btn-auth-text:hover {
  color: var(--color-200);
}

.btn-auth-text:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-auth-text i {
  font-size: 0.85em;
}

/* ── OTP 4-box grid ─────────────────────────────────────────────────────── */
.otp-boxes {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 0.25rem;
}

.otp-box {
  flex: 0 0 auto;
  width: 64px;
  height: 72px;
  text-align: center;
  font-size: 2rem;
  font-weight: bold;
  font-family: var(--primary-font);
  color: var(--color-100);
  background-color: transparent;
  border: 2px solid var(--dark-200);
  border-radius: 0;
  outline: none;
  transition: border-color 0.2s, color 0.2s;
  caret-color: var(--color-100);
}

.otp-box:focus {
  border-color: var(--color-100);
}

.otp-box.is-filled {
  border-color: var(--color-200);
  color: var(--color-200);
}

@media (max-width: 420px) {
  .otp-box {
    width: 54px;
    height: 62px;
    font-size: 1.75rem;
  }
  .otp-boxes {
    gap: 0.75rem;
  }
}

@media (max-width: 360px) {
  .otp-box {
    width: 46px;
    height: 56px;
    font-size: 1.5rem;
  }
  .otp-boxes {
    gap: 0.5rem;
  }
}

/* ── Resend / change-number row ─────────────────────────────────────────── */
.otp-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  gap: 0.5rem;
}

.otp-resend {
  font-size: var(--fs-09);
}

.otp-resend-timer {
  color: var(--dark-400);
  font-size: var(--fs-09);
}

/* ── Bootstrap-icons helper (already loaded via bootstrap-icons.min.css) ── */
/* me-1 utility used on icons */
.me-1 {
  margin-right: 0.25rem !important;
}
