/* auth-mobile.css — Auth / Mobile / Login / Default (Figma 390px) */

.auth-mobile__topbar {
  display: none;
}

.auth-mobile-page__spacer {
  display: none;
}

@media (max-width: 767px) {
  /* Frame 417 — page shell */
  .auth-mobile-page {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    background: #0b0e2e;
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .auth-mobile-page--login {
    gap: 18.625rem;
  }

  .auth-mobile-page--register {
    gap: 0;
  }

  /* Frame 413 — register content */
  .auth-mobile-page__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    align-self: stretch;
    flex: none;
    gap: 1.5rem;
    width: 100%;
  }

  .auth-mobile-page__promo-layer {
    display: none;
  }

  /* Frame 416 — auth block (topbar + form) */
  .auth-mobile-page__auth {
    display: flex;
    flex-direction: column;
    align-items: center;
    align-self: stretch;
    flex: none;
    gap: 0.75rem;
    width: 100%;
  }

  /* Frame 415 / 371 — topbar */
  .auth-mobile__topbar {
    display: block;
    flex: none;
    align-self: stretch;
    width: 100%;
    height: 4.875rem;
    background: #010212;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
    padding-top: env(safe-area-inset-top, 0px);
  }

  .auth-mobile__topbar-inner {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: center;
    height: 4.875rem;
    padding: 1.5625rem 1.0625rem;
  }

  .auth-mobile__back {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.8125rem;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    text-decoration: none;
    color: #ffffff;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .auth-mobile__back-icon {
    box-sizing: border-box;
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0.75rem 0.6875rem 0.6875rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1.25rem;
  }

  .auth-mobile__back-arrow {
    display: block;
    width: 0.5625rem;
    height: 0.5625rem;
    margin-left: 0.125rem;
    border-left: 3px solid #ffffff;
    border-bottom: 3px solid #ffffff;
    transform: rotate(45deg);
  }

  .auth-mobile__back-label {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.1667;
    color: #ffffff;
  }

  .auth-mobile-page .auth-modal-page__backdrop,
  .auth-modal-page__backdrop {
    display: none;
  }

  .auth-mobile-page .auth-mobile__topbar--modal {
    display: none;
  }

  .auth-mobile-page .auth-modal:not(.auth-modal--open) {
    display: none;
  }

  .auth-mobile-page .auth-modal.auth-modal--open {
    position: static;
    z-index: auto;
    visibility: visible;
    pointer-events: auto;
    display: block;
    flex: none;
    align-self: stretch;
    width: 100%;
    padding: 0;
  }

  /* Frame 308 — form column */
  .auth-mobile-page .auth-modal--open .auth-modal__dialog,
  .auth-mobile-page .auth-modal__dialog {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: 24.375rem;
    min-height: 0;
    max-height: none;
    overflow: visible;
    margin: 0 auto;
    padding: 0 1rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    transform: none;
  }

  .auth-mobile-page .auth-modal__inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 1.0625rem;
    width: min(100%, 22.375rem);
    margin: 0 auto;
  }

  /* Frame 307 */
  .auth-mobile-page .auth-modal__form-wrap {
    align-items: flex-start;
    gap: 1.5rem;
    width: 100%;
  }

  .auth-mobile-page .auth-modal__head {
    gap: 0.375rem;
    width: 100%;
  }

  .auth-mobile-page .auth-modal__title {
    font-size: 1.5rem;
    line-height: 1.1667;
    color: #ffffff;
  }

  .auth-mobile-page .auth-modal__subtitle {
    font-size: 0.875rem;
    line-height: 1.1429;
    color: #e8e8f3;
  }

  .auth-mobile-page .auth-modal__form {
    gap: 1.5rem;
    width: 100%;
  }

  /* Frame 312 */
  .auth-mobile-page .auth-modal__fields {
    gap: 0.5rem;
    width: 100%;
  }

  .auth-mobile-page .auth-modal__field {
    gap: 0.5rem;
    width: 100%;
  }

  .auth-mobile-page .auth-modal__label,
  .auth-mobile-page .auth-modal__label-row {
    font-size: 0.75rem;
    line-height: 1.1667;
    color: #e8e8f3;
  }

  .auth-mobile-page .auth-modal__forgot {
    font-size: 0.625rem;
    line-height: 1.1;
    color: #a5a2c0;
  }

  .auth-mobile-page .auth-modal__control {
    gap: 0.625rem;
    width: 100%;
    height: 2.125rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    background: rgba(18, 23, 59, 0.8);
    border-color: #2d325f;
  }

  .auth-mobile-page .auth-modal__control--password {
    padding-right: 2rem;
  }

  .auth-mobile-page .auth-modal__input {
    font-size: 0.75rem;
    line-height: 1.4661;
    color: #e8e8f3;
  }

  .auth-mobile-page .auth-modal__input::placeholder {
    color: #a5a2c0;
  }

  .auth-mobile-page .auth-modal__submit {
    width: 100%;
    height: 2.375rem;
    padding: 0.625rem;
    border-radius: 4px;
    box-shadow: 0 0 25px rgba(34, 6, 199, 0.25);
    font-size: 0.875rem;
    line-height: 1.1429;
    color: #e8e8f3;
  }

  /* Frame 282 + 303 */
  .auth-mobile-page .auth-modal__bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    width: 100%;
  }

  .auth-mobile-page .auth-modal__divider {
    margin: 0 0 1.0625rem;
    font-size: 0.75rem;
    line-height: 1.1667;
    color: #e8e8f3;
    text-align: center;
  }

  .auth-mobile-page .auth-modal__google {
    width: 100%;
    max-width: none;
    height: 2.125rem;
    gap: 0.75rem;
    margin: 0 0 1rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #2d325f;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.1667;
    color: #000000;
  }

  .auth-mobile-page .auth-modal__google-form {
    width: 100%;
    max-width: none;
  }

  .auth-mobile-page .auth-modal__google-icon {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
  }

  .auth-mobile-page .auth-modal__footer {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.4661;
    color: #a5a2c0;
    text-align: center;
  }

  .auth-mobile-page .auth-modal__footer-link {
    color: #2206c7;
  }

  /* Register — Frame 412 / 308 / 217 */
  .auth-mobile-page--register .auth-modal.auth-modal--open {
    display: block;
  }

  .auth-mobile-page--register .auth-modal__dialog--register {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    width: 100%;
    max-width: 24.375rem;
    padding: 0 1rem;
    overflow: visible;
  }

  .auth-mobile-page--register .auth-modal__register-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    width: min(100%, 22.375rem);
    max-width: none;
    margin: 0 auto;
    padding: 0;
    overflow: visible;
  }

  .auth-mobile-page--register .auth-modal__register-col .auth-modal__title {
    font-size: 1.5rem;
    line-height: 1.1667;
    color: #ffffff;
  }

  .auth-mobile-page--register .auth-modal__register-col .auth-modal__subtitle {
    font-size: 0.875rem;
    line-height: 1.1429;
    color: #e8e8f3;
  }

  .auth-mobile-page--register .auth-modal__form--register {
    gap: 1.5rem;
    width: 100%;
  }

  .auth-mobile-page--register .auth-modal__register-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  .auth-mobile-page--register .auth-modal__register-stack {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  .auth-mobile-page--register .auth-modal__field {
    gap: 0.5rem;
    width: 100%;
  }

  .auth-mobile-page--register .auth-modal__control {
    gap: 0.625rem;
    width: 100%;
    height: 2.125rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    background: rgba(18, 23, 59, 0.8);
    border-color: #2d325f;
  }

  .auth-mobile-page--register .auth-modal__control--password {
    padding-right: 2rem;
  }

  .auth-mobile-page--register .auth-modal__register-col .auth-modal__input {
    font-size: 0.75rem;
    line-height: 1.4661;
    color: #e8e8f3;
  }

  .auth-mobile-page--register .auth-modal__register-col .auth-modal__input::placeholder {
    color: #a5a2c0;
  }

  .auth-mobile-page--register .auth-modal__register-actions {
    gap: 1rem;
    width: 100%;
  }

  .auth-mobile-page--register .auth-modal__terms {
    align-items: flex-start;
    gap: 0.5625rem;
    width: 100%;
  }

  .auth-mobile-page--register .auth-modal__terms-box {
    width: 0.9375rem;
    height: 0.9375rem;
    margin-top: 0.0625rem;
    border-radius: 2px;
  }

  .auth-mobile-page--register .auth-modal__terms-text {
    font-size: 0.75rem;
    line-height: 1.4661;
    color: #a5a2c0;
  }

  .auth-mobile-page--register .auth-modal__terms-link {
    color: #2206c7;
  }

  .auth-mobile-page--register .auth-modal__register-submit-wrap {
    gap: 1rem;
    width: 100%;
  }

  .auth-mobile-page--register .auth-modal__submit--register {
    width: 100%;
    max-width: none;
    height: 2.375rem;
    padding: 0.625rem;
    border-radius: 4px;
    box-shadow: 0 0 25px rgba(34, 6, 199, 0.25);
    font-size: 0.875rem;
    line-height: 1.1429;
    color: #e8e8f3;
  }

  .auth-mobile-page--register .auth-modal__register-submit-wrap .auth-modal__footer {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.4661;
    color: #a5a2c0;
    text-align: center;
  }

  .auth-mobile-page--register .auth-modal__register-submit-wrap .auth-modal__footer-link {
    color: #2206c7;
  }

  /* Frame 217 — benefits panel */
  .auth-mobile-page__benefits-panel {
    box-sizing: border-box;
    align-self: stretch;
    width: 100%;
    padding: 2.0625rem 1.4375rem 2.125rem;
    background: #04071c;
    border-top: 1px solid #2a305e;
  }

  .auth-mobile-page__benefits-panel .auth-modal__benefits {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.75rem;
    width: min(100%, 15.875rem);
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .auth-mobile-page__benefits-panel .auth-modal__benefits-title {
    margin: 0;
    width: 100%;
    font-size: 1.125rem;
    line-height: 1.1667;
    color: #ffffff;
  }

  .auth-mobile-page__benefits-panel .auth-modal__benefits-list {
    gap: 1.125rem;
    width: 100%;
  }

  .auth-mobile-page__benefits-panel .auth-modal__benefit {
    gap: 0.625rem;
    width: 100%;
  }

  .auth-mobile-page__benefits-panel .auth-modal__benefit-icon-wrap {
    width: 2.9375rem;
    height: 2.9375rem;
    background: #101438;
    border-color: #13183d;
    border-radius: 7px;
  }

  .auth-mobile-page__benefits-panel .auth-modal__benefit-name {
    font-size: 0.875rem;
    line-height: 1.1429;
    color: #ffffff;
  }

  .auth-mobile-page__benefits-panel .auth-modal__benefit-desc {
    font-size: 0.75rem;
    line-height: 1.4661;
    color: #a5a2c0;
  }

  /* BASEMENT SECTOR — footer on auth pages */
  .auth-mobile-page .footer {
    flex: none;
    align-self: stretch;
    width: 100%;
    margin-top: 0;
  }

  .auth-mobile-page .footer__shell {
    background: rgba(2, 2, 26, 0.8);
    border-top: 1px solid #0b0c20;
  }

  .auth-mobile-page .footer__container {
    box-sizing: border-box;
    width: 100%;
    max-width: 24.375rem;
    margin: 0 auto;
    padding-top: 1.375rem;
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 0px));
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
  }

  .auth-mobile-page .footer__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .auth-mobile-page .footer__grid {
    flex-direction: column;
    align-items: flex-start;
    gap: 2.4375rem;
    width: min(100%, 22.375rem);
  }

  .auth-mobile-page .footer__brand-col {
    gap: 1.25rem;
    max-width: 19.625rem;
    width: 100%;
  }

  .auth-mobile-page .footer__brand {
    gap: 0.4375rem;
  }

  .auth-mobile-page .footer__description {
    max-width: 19.625rem;
    font-size: 0.875rem;
    line-height: 1.7258;
    color: #b3adae;
  }

  .auth-mobile-page .footer__socials {
    gap: 0.875rem;
  }

  .auth-mobile-page .footer__social-link {
    width: 2.6875rem;
    height: 2.6875rem;
  }

  .auth-mobile-page .footer__nav-group {
    gap: 2.4375rem 2.4375rem;
  }

  .auth-mobile-page .footer__col-title {
    font-size: 1rem;
    line-height: 1.125;
  }

  .auth-mobile-page .footer__col-list,
  .auth-mobile-page .footer__contacts {
    gap: 0.5625rem;
  }

  .auth-mobile-page .footer__link {
    font-size: 0.875rem;
    line-height: 1.7258;
    color: #b3adae;
  }

  .auth-mobile-page .footer__bar {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    border-top: 1px solid #0e0f24;
    background: rgba(2, 2, 26, 0.8);
  }

  .auth-mobile-page .footer__copy {
    font-size: 0.75rem;
    line-height: 1.7258;
    color: #b3adae;
  }

  body.auth-mobile-page-active {
    overflow: auto;
    background: #0b0e2e;
  }

  body.auth-mobile-page-active.is-auth-modal-open {
    overflow: auto;
  }
}

@media (max-width: 390px) {
  .auth-mobile-page .auth-modal__dialog,
  .auth-mobile-page--register .auth-modal__dialog--register {
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
  }

  .auth-mobile-page__benefits-panel {
    padding-left: max(1.4375rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.4375rem, env(safe-area-inset-right, 0px));
    padding-bottom: max(2.125rem, env(safe-area-inset-bottom, 0px));
  }
}
