/* Nakhlistan authentication experience */
.nx-auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    min-height: 100svh;
    padding: 56px 20px !important;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 12%, rgba(239, 166, 72, .22), transparent 24rem),
        radial-gradient(circle at 88% 88%, rgba(133, 20, 49, .18), transparent 28rem),
        linear-gradient(135deg, #fffaf5 0%, #f7eeee 48%, #fff8f1 100%);
}

.nx-auth-container::before,
.nx-auth-container::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 310px;
    height: 310px;
    border: 1px solid rgba(126, 19, 48, .12);
    border-radius: 42% 58% 61% 39% / 47% 41% 59% 53%;
    transform: rotate(27deg);
}

.nx-auth-container::before { top: -145px; right: -100px; }
.nx-auth-container::after { bottom: -165px; left: -100px; }

.nx-auth-card,
.nx-auth-box {
    position: relative;
    width: min(100%, 460px) !important;
    max-width: 460px !important;
    min-width: 0;
    flex: 0 0 auto;
    height: auto;
    text-align: center;
    padding: 36px 38px !important;
    border: 1px solid rgba(126, 19, 48, .12);
    border-radius: 28px !important;
    background: rgba(255, 255, 255, .9) !important;
    box-shadow: 0 24px 70px rgba(67, 22, 35, .15), 0 4px 14px rgba(67, 22, 35, .06);
    backdrop-filter: blur(12px);
}

.nx-auth-card::before,
.nx-auth-box::before {
    content: "";
    position: absolute;
    top: 0;
    right: 42px;
    left: 42px;
    height: 4px;
    border-radius: 0 0 999px 999px;
    background: linear-gradient(90deg, #8a1738, #d2444e 52%, #ec9b40);
}

.login-store-title {
    margin: 0 0 8px !important;
    color: #6d1632 !important;
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    letter-spacing: -.5px;
}

.nx-auth-logo { margin: 6px 0 16px !important; }
.nx-auth-logo img {
    width: 82px !important;
    height: 82px !important;
    max-height: 82px !important;
    padding: 7px;
    object-fit: contain;
    border: 1px solid rgba(139, 23, 55, .14);
    border-radius: 23px;
    background: linear-gradient(145deg, #fff, #fff4ed);
    box-shadow: 0 10px 22px rgba(123, 20, 47, .12);
}

.nx-auth-title {
    margin: 0 0 9px !important;
    color: #421225 !important;
    font-size: 1.34rem !important;
    font-weight: 800 !important;
    line-height: 1.7;
}

.nx-auth-subtitle,
.nx-auth-hint {
    color: #76626a !important;
    font-size: .9rem !important;
    line-height: 2 !important;
}

.nx-auth-label,
.nx-auth-field label {
    color: #53152a !important;
    font-weight: 700;
}

.nx-auth-input {
    box-sizing: border-box;
    width: 100% !important;
    min-height: 52px;
    padding: 12px 16px !important;
    color: #36121f;
    border: 1px solid #ead8dc !important;
    border-radius: 14px !important;
    background: #fffdfc !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.nx-auth-input:focus {
    border-color: #aa2348 !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(170, 35, 72, .11) !important;
}

.nx-auth-btn,
.nx-auth-btn-primary {
    min-height: 52px;
    border: 0 !important;
    border-radius: 14px !important;
    background: linear-gradient(112deg, #7d1635, #ba2947 57%, #d85c43) !important;
    box-shadow: 0 11px 20px rgba(136, 24, 55, .23);
    font-family: inherit;
    font-weight: 800;
    transition: transform .2s, box-shadow .2s, filter .2s;
}

.nx-auth-btn:hover,
.nx-auth-btn-primary:hover {
    transform: translateY(-2px);
    filter: saturate(1.08);
    box-shadow: 0 15px 25px rgba(136, 24, 55, .3);
}

.nx-auth-btn-secondary {
    color: #7a1834 !important;
    border: 1px solid #e6c3cb !important;
    background: linear-gradient(112deg, #fff8f3, #fff) !important;
    box-shadow: none !important;
}

.nx-auth-btn-secondary:hover {
    color: #fff !important;
    background: linear-gradient(112deg, #9b1d40, #cf4a47) !important;
}

.nx-auth-btn-disabled {
    color: #9c8b90 !important;
    background: #eee8e7 !important;
    box-shadow: none !important;
}

.nx-auth-error {
    margin: 14px 0 !important;
    padding: 12px 14px !important;
    color: #941d39 !important;
    border: 1px solid #f0c6cf;
    border-right: 4px solid #c62d4b;
    border-radius: 12px !important;
    background: #fff2f4 !important;
}

.nx-auth-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.nx-auth-back,
.nx-auth-resend-btn,
.nx-auth-footer a {
    color: #971d3e !important;
    font-family: inherit;
    font-weight: 700;
}

.nx-auth-resend-btn {
    padding: 7px 10px !important;
    border: 0 !important;
    border-bottom: 1px dashed currentColor !important;
    background: transparent !important;
}

.otp-boxes {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    width: 100%;
    max-width: 324px;
    gap: 9px !important;
    margin: 18px auto 22px;
    direction: ltr;
}
.otp-cell {
    width: 100%;
    min-width: 0;
    height: 55px;
}
.otp-cell .otp-digit {
    width: 100% !important;
    height: 100% !important;
    min-width: 0;
    margin: 0;
    padding: 0;
    /* متن واقعی توسط otp-digit-fa نمایش داده می‌شود؛ از نمایش دوباره جلوگیری کن */
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
    caret-color: transparent !important;
    border: 1px solid #ead4da !important;
    border-radius: 13px !important;
    background: #fffdfc;
    font-weight: 800;
    font-size: 1.25rem;
}
.otp-cell .otp-digit:focus {
    border-color: #aa2348 !important;
    box-shadow: 0 0 0 4px rgba(170,35,72,.11);
    outline: 0;
}
.otp-timer-circle { filter: drop-shadow(0 8px 16px rgba(121, 22, 49, .12)); }
.otp-timer-progress { stroke: #a72247 !important; }
.otp-resend button {
    color: #8d1a3b !important;
    border-color: #dfb7c2 !important;
    border-radius: 10px;
    font-family: inherit;
}

.profile-page .password-form {
    padding: 24px;
    border: 1px solid #f0e0e1;
    border-radius: 18px;
    background: linear-gradient(145deg, #fff, #fffaf8);
}
.profile-page .password-form input {
    min-height: 46px;
    border: 1px solid #e7d3d6;
    border-radius: 11px;
}
.profile-page .button-edit-profile {
    border-radius: 12px;
    background: linear-gradient(112deg, #811735, #c73749, #db7540);
}

@media (max-width: 560px) {
    .nx-auth-container { padding: 28px 14px !important; }
    .nx-auth-card, .nx-auth-box { padding: 30px 20px !important; border-radius: 22px !important; }
    .otp-boxes { gap: 5px !important; }
    .otp-cell { height: 50px; }
}

/* Authentication has its own document and must also fit short/mobile screens. */
.auth-page,
.auth-page #auth-content,
.auth-page .nx-auth-container {
    width: 100%;
    min-width: 0;
    margin: 0;
    box-sizing: border-box;
}
.auth-page .nx-auth-container *,
.auth-page .nx-auth-container *::before,
.auth-page .nx-auth-container *::after {
    box-sizing: border-box;
}
.auth-page #otpData[hidden] { display: none; }
.auth-page .nx-auth-form { width: 100%; min-width: 0; }
.auth-page .nx-auth-btn,
.auth-page .nx-auth-btn-primary {
    width: 100%;
    padding: 12px 16px;
    line-height: 1.8;
    white-space: normal;
    color: #fff;
}
.auth-page .nx-auth-title,
.auth-page .login-store-title,
.auth-page .nx-auth-subtitle,
.auth-page .nx-auth-hint,
.auth-page .nx-auth-error { overflow-wrap: anywhere; }
.auth-page .nx-auth-input { font-size: 16px; }
.auth-page .nx-auth-mobile { display: inline-block; font-weight: 800; }
.auth-page .nx-auth-footer { gap: 10px 14px; }
.auth-page .nx-auth-footer a,
.auth-page .nx-auth-resend-btn { font-size: .875rem; line-height: 1.8; }
.auth-page .otp-timer-box { flex-wrap: wrap; justify-content: center; }
.auth-page .otp-digit-fa { font-family: inherit; line-height: 1; }
.auth-page a:focus-visible,
.auth-page button:focus-visible { outline: 3px solid #a72247; outline-offset: 3px; }
@media (max-width: 360px) {
    .auth-page .nx-auth-container { padding-inline: 12px !important; }
    .auth-page .nx-auth-card,
    .auth-page .nx-auth-box { padding-inline: 16px !important; }
}
@media (max-height: 650px) {
    .auth-page .nx-auth-container { padding-block: 18px !important; }
}
