/* =====================================================
   ZHIURA LOGIN — RESPONSIVE ONLY
   Desktop/base design lives in login.css and is untouched.
===================================================== */

/* Tablet: 901px down to 651px */
@media (max-width: 900px) {
  .auth-page {
    min-height: 100svh;
    padding-inline: 16px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .auth-brand {
    padding-top: 34px;
  }

  .auth-shell {
    width: min(100%, 560px);
    padding: 28px 0 22px;
  }

  .auth-card {
    width: 100%;
    min-height: 565px;
  }

  .auth-footer {
    right: 24px;
    bottom: 18px;
  }
}

/* Mobile */
@media (max-width: 650px) {
  .auth-page {
    min-height: 100svh;
    padding-inline: 10px;
    justify-content: flex-start;
  }

  .auth-brand {
    width: 100%;
    padding-top: 24px;
  }

  .auth-brand__mark {
    font-size: 34px;
  }

  .auth-brand__name {
    margin-top: 9px;
    font-size: 22px;
    letter-spacing: 5px;
  }

  .auth-brand__sub {
    font-size: 7px;
    letter-spacing: 3px;
  }

  .auth-shell {
    width: 100%;
    padding: 18px 0 14px;
  }

  .auth-card {
    width: 100%;
    min-height: 0;
    padding: 30px 20px 24px;
    border-radius: 20px;
  }

  /* The active step controls the card height; the other step stays out of flow. */
  .auth-step {
    inset: 30px 20px 24px;
  }

  .auth-step.is-active {
    inset: auto;
  }

  .auth-card h1,
  .auth-card h2 {
    margin-top: 10px;
    font-size: 21px;
    line-height: 1.65;
  }

  .auth-card__head p {
    font-size: 9px;
    line-height: 2;
  }

  .auth-form {
    margin-top: 27px;
  }

  .field-label {
    font-size: 10px;
  }

  .phone-field {
    width: 100%;
    height: 58px;
    border-radius: 15px;
  }

  .phone-country {
    padding-inline: 11px;
    gap: 7px;
    font-size: 10px;
    flex: 0 0 auto;
  }

  .phone-field input {
    min-width: 0;
    padding-inline: 13px;
    font-size: 13px;
  }

  .auth-main-button {
    width: 100%;
    height: 54px;
    border-radius: 15px;
  }

  .security-note {
    margin-top: 20px;
    font-size: 8px;
  }

  .auth-features {
    margin-top: 28px;
    padding-top: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .auth-feature__icon {
    width: 38px;
    height: 38px;
    margin-bottom: 8px;
    font-size: 16px;
  }

  .auth-feature h3 {
    font-size: 8px;
    white-space: nowrap;
  }

  .auth-feature p {
    font-size: 6.5px;
  }

  /* OTP — always exactly four boxes */
  .otp-grid {
    width: min(100%, 360px);
    margin-inline: auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    direction: ltr;
  }

  .otp-input {
    width: 100%;
    min-width: 0;
    height: 56px;
    border-radius: 13px;
    font-size: 20px;
  }

  .otp-timer {
    flex-wrap: wrap;
    margin-bottom: 20px;
  }

  .change-phone {
    margin-top: 16px;
  }

  .otp-security {
    padding-top: 18px;
  }

  .auth-footer {
    position: static;
    width: 100%;
    margin: 2px 0 12px;
    align-items: center;
    text-align: center;
  }

  .back-home {
    margin: 2px 0 10px;
  }

  .auth-toast {
    width: max-content;
    max-width: calc(100vw - 28px);
    text-align: center;
  }
}

/* Small phones */
@media (max-width: 420px) {
  .auth-page {
    padding-inline: 8px;
  }

  .auth-brand {
    padding-top: 20px;
  }

  .auth-brand__mark {
    font-size: 30px;
  }

  .auth-brand__name {
    font-size: 20px;
    letter-spacing: 4px;
  }

  .auth-brand__sub {
    font-size: 6px;
    letter-spacing: 2.5px;
  }

  .auth-shell {
    padding-top: 14px;
  }

  .auth-card {
    padding: 27px 16px 21px;
    border-radius: 18px;
  }

  .auth-step {
    inset: 27px 16px 21px;
  }

  .auth-card h1,
  .auth-card h2 {
    font-size: 19px;
  }

  .auth-card__head p {
    font-size: 8px;
  }

  .auth-form {
    margin-top: 23px;
  }

  .phone-field {
    height: 55px;
  }

  .phone-country {
    padding-inline: 9px;
    font-size: 9px;
  }

  .phone-field input {
    padding-inline: 10px;
    font-size: 12px;
  }

  .auth-main-button {
    height: 52px;
    border-radius: 14px;
  }

  .otp-grid {
    gap: 7px;
  }

  .otp-input {
    height: 52px;
    border-radius: 12px;
    font-size: 18px;
  }

  .auth-features {
    margin-top: 24px;
    gap: 4px;
  }

  .auth-feature__icon {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }

  .auth-feature h3 {
    font-size: 7.5px;
  }

  .auth-feature p {
    font-size: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-page *,
  .auth-page *::before,
  .auth-page *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
