.otp-auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 17, 33, 0.68);
    backdrop-filter: blur(4px);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.otp-auth-overlay.hidden {
    display: none !important;
}

.otp-auth-step.hidden,
.otp-auth-timer.hidden {
    display: none !important;
}

.otp-auth-modal {
    width: min(420px, 100%);
    border-radius: 180px 180px 22px 22px;
    background: linear-gradient(165deg, #fffdfa 0%, #f8f1e6 100%);
    border: 1px solid #dbc7a9;
    box-shadow: 0 24px 80px rgba(0, 18, 54, 0.24);
    padding: 36px 20px 20px;
    position: relative;
    overflow: hidden;
}

.otp-auth-modal::before {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    top: 10px;
    height: 24px;
    border-radius: 170px 170px 0 0;
    border: 1px solid rgba(132, 84, 34, 0.25);
    border-bottom: 0;
    pointer-events: none;
}

.otp-auth-fullscreen {
    width: min(520px, 100%);
}

#mainAppContainer.auth-hidden {
    visibility: hidden;
    pointer-events: none;
}

.otp-auth-close {
    position: absolute;
    left: 12px;
    top: 10px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #edf2fb;
    color: #24344f;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

#otpAuthOverlay .otp-auth-dome .otp-auth-close {
    position: static !important;
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    height: 30px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #111111;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 5;
}

#otpAuthOverlay .otp-auth-modal.otp-auth-dome {
    display: flex;
    flex-direction: column;
}

.otp-auth-step h3 {
    margin: 0;
    font-size: 20px;
    color: #000000;
}

.otp-auth-step p {
    margin: 10px 0 16px;
    color: #4e5f7a;
    font-size: 14px;
}

.otp-auth-step label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: #36465f;
}

#otpAuthOverlay .otp-auth-dome .otp-phone-label {
    font-size: 17px !important;
    font-weight: 400 !important;
    color: #000000 !important;
    text-align: center !important;
    width: 100%;
}

.otp-auth-step input {
    width: 100%;
    border: 1px solid #d6e2f5;
    border-radius: 12px;
    padding: 11px 12px;
    font-size: 15px;
    direction: ltr;
    text-align: left;
    margin-bottom: 12px;
    background: #fff;
}

.otp-code-phone-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 8px 0 12px;
}

.otp-code-phone-label {
    font-size: 16px;
    color: #1f2f46;
    direction: ltr;
    text-align: center;
    font-weight: 600;
}

.otp-code-edit-btn {
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #0d5fdc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

#otpAuthOverlay .otp-auth-dome .otp-code-inputs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    width: min(300px, 100%);
    margin: 0 auto 14px;
}

#otpAuthOverlay .otp-auth-dome .otp-code-inputs .otp-code-digit {
    width: 100%;
    min-width: 0;
    height: 52px;
    margin: 0;
    padding: 0;
    border: 2px solid #e1e4e9;
    border-radius: 10px;
    color: #087cf0;
    background: #fff;
    box-sizing: border-box;
    text-align: center;
    font-size: 20px;
    font-weight: 500;
    caret-color: #087cf0;
    outline: none;
}

#otpAuthOverlay .otp-auth-dome .otp-code-inputs .otp-code-digit:focus {
    border-color: #087cf0;
    box-shadow: 0 0 0 3px rgba(8, 124, 240, 0.16);
}

.otp-code-edit-btn:hover {
    background: rgba(13, 95, 220, 0.08);
}

.otp-code-edit-btn svg {
    fill: currentColor;
}

#otpAuthOverlay .otp-auth-dome .otp-phone-example {
    margin: -4px 0 12px;
    font-size: 12px;
    color: #9aa3b2;
}

#otpAuthOverlay .otp-auth-dome #otpPhoneInput {
    direction: ltr;
    text-align: left;
    letter-spacing: 4px;
    font-variant-numeric: tabular-nums;
}

#otpAuthOverlay .otp-auth-dome #otpFirstNameInput,
#otpAuthOverlay .otp-auth-dome #otpLastNameInput {
    direction: rtl;
    text-align: right;
}

.otp-auth-primary-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    border: 0;
    border-radius: 12px;
    padding: 11px 12px;
    font-size: 15px;
    color: #fff;
    background: linear-gradient(120deg, #0d5fdc, #0a8cd9);
    cursor: pointer;
}

.otp-auth-primary-btn:disabled {
    cursor: wait;
    opacity: 0.72;
}

.otp-auth-btn-label {
    visibility: visible;
}

.otp-auth-btn-spinner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.42);
    border-top-color: #ffffff;
    border-radius: 50%;
    opacity: 0;
    animation: otp-auth-spin 0.72s linear infinite;
    pointer-events: none;
}

.otp-auth-primary-btn.is-loading .otp-auth-btn-label {
    visibility: hidden;
}

.otp-auth-primary-btn.is-loading .otp-auth-btn-spinner {
    opacity: 1;
}

@keyframes otp-auth-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .otp-auth-btn-spinner {
        animation-duration: 1.4s;
    }
}

.otp-auth-link-btn {
    width: 100%;
    border: 0;
    background: transparent;
    color: #0d5fdc;
    margin-top: 8px;
    cursor: pointer;
}

.otp-auth-message {
    display: none;
    min-height: 22px;
    font-size: 13px;
    margin: 34px auto 0;
    color: #8f1024;
    text-align: center;
    width: fit-content;
    max-width: 92%;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #f3b7c0;
    background: #fff1f3;
    box-shadow: 0 6px 16px rgba(176, 0, 32, 0.08);
}

.otp-auth-message.is-visible {
    display: block;
}

.otp-auth-timer {
    margin: 10px 0 12px;
    font-size: 14px;
    font-weight: 400;
    color: #0d5fdc;
    text-align: center;
}

.otp-auth-timer.is-expired {
    color: #b00020;
}

.otp-auth-resend-btn {
    width: 100%;
    min-height: 36px;
    margin-top: 8px;
    padding: 4px 8px;
    border: 0;
    border-radius: 0;
    color: #087cf0;
    background: transparent;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
}

.otp-auth-resend-btn:hover,
.otp-auth-resend-btn:focus-visible {
    color: #075fb8;
    background: transparent;
}

.otp-auth-resend-btn:disabled {
    cursor: wait;
    opacity: 0.55;
}

.otp-auth-resend-btn.hidden {
    display: none !important;
}

body.otp-auth-lock {
    overflow: hidden;
}

.otp-auth-page-body {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    color: #111827;
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 208, 138, 0.5), transparent 28%),
        radial-gradient(circle at 88% 82%, rgba(0, 150, 135, 0.24), transparent 34%),
        linear-gradient(145deg, #f8fbfb 0%, #e4eff1 48%, #f7eee2 100%);
    overflow-x: hidden;
}

.otp-auth-page-body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.42;
    background-image: radial-gradient(rgba(0, 88, 79, 0.13) 1px, transparent 1px);
    background-size: 24px 24px;
}

.otp-auth-page-header {
    position: relative;
    z-index: 2;
    width: min(1120px, calc(100% - 32px));
    min-height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.otp-auth-page-brand,
.otp-auth-page-back {
    color: #00584f;
    text-decoration: none;
}

.otp-auth-page-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 400;
}

.otp-auth-page-brand img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 12px;
}

.otp-auth-page-back {
    width: 44px;
    height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 88, 79, 0.2);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    appearance: none;
    transition: background-color 180ms ease;
}

.otp-auth-page-back:hover,
.otp-auth-page-back:focus-visible {
    background: #fff;
}

.otp-auth-page-back svg {
    width: 24px;
    height: 24px;
}

.otp-auth-page-main {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 80px);
    min-height: calc(100dvh - 80px);
    display: grid;
    place-items: center;
    padding: 24px 16px 56px;
    box-sizing: border-box;
}

.otp-auth-overlay.otp-auth-page {
    position: static;
    inset: auto;
    width: 100%;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    z-index: auto;
}

#otpAuthOverlay.otp-auth-page .otp-auth-modal.otp-auth-fullscreen.otp-auth-dome {
    width: min(520px, 100%);
    margin: 0 auto;
}

#otpAuthOverlay .otp-auth-modal.otp-auth-fullscreen.otp-auth-dome {
    border-radius: 280px 280px 26px 26px !important;
    padding-top: 84px !important;
    min-height: 560px !important;
    overflow: visible !important;
    background: #ffffff !important;
    border: 1px solid #f4b1b1 !important;
    box-shadow: 0 28px 78px rgba(160, 0, 0, 0.38) !important;
    padding-bottom: 120px !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
}

#otpAuthOverlay .otp-auth-dome .otp-auth-floor-art {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: cover;
    object-position: bottom center;
    border-radius: 0 0 26px 26px;
    z-index: 1;
    pointer-events: none;
}

#otpAuthOverlay .otp-auth-modal.otp-auth-fullscreen.otp-auth-dome::before {
    content: "" !important;
    position: absolute !important;
    left: 12px !important;
    right: 12px !important;
    top: 14px !important;
    height: 130px !important;
    border-radius: 260px 260px 0 0 !important;
    border: 0 !important;
    pointer-events: none !important;
    z-index: 1;
}

#otpAuthOverlay .otp-auth-modal.otp-auth-fullscreen.otp-auth-dome::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 3px rgba(210, 0, 0, 0.55), inset 0 0 44px rgba(220, 20, 20, 0.52);
    pointer-events: none;
    z-index: 2;
}

#otpAuthOverlay .otp-auth-dome .otp-auth-step,
#otpAuthOverlay .otp-auth-dome .otp-auth-message {
    position: relative;
    z-index: 3;
}

#otpAuthOverlay .otp-auth-dome .otp-auth-step h3 {
    text-align: center !important;
    width: 100%;
    margin: 0 auto 10px !important;
    font-size: 26px !important;
    font-weight: 700 !important;
    color: #000000 !important;
}

#otpAuthOverlay .otp-auth-dome #otpPhoneStep > :not(h3),
#otpAuthOverlay .otp-auth-dome #otpCodeStep > :not(h3),
#otpAuthOverlay .otp-auth-dome #otpNameStep > :not(h3) {
    position: relative;
    top: 64px;
}

#otpAuthOverlay .otp-auth-dome #otpAuthMessage {
    position: static !important;
    top: auto !important;
    margin-top: 87px !important;
    padding-top: 8px;
    clear: both;
}

#otpAuthOverlay .otp-auth-close.otp-close-fixed {
    position: absolute !important;
    top: -14px !important;
    right: 6px !important;
    margin: 0 !important;
    z-index: 5 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    aspect-ratio: 1 / 1 !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: #c81e1e !important;
    font-size: 20px !important;
    line-height: 1 !important;
    font-weight: 500 !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08) !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

@media (max-width: 600px) {
    .otp-auth-page-header {
        width: calc(100% - 24px);
        min-height: 68px;
    }

    .otp-auth-page-brand span {
        display: none;
    }

    .otp-auth-page-main {
        min-height: calc(100dvh - 68px);
        padding: 12px 12px 32px;
        place-items: start center;
    }

    #otpAuthOverlay .otp-auth-dome .otp-code-inputs {
        width: min(280px, 100%);
    }

    #otpAuthOverlay .otp-auth-dome .otp-code-inputs .otp-code-digit {
        height: 48px;
        border-radius: 9px;
        font-size: 18px;
    }

    #otpAuthOverlay .otp-auth-dome .otp-code-inputs .otp-code-digit:focus {
        box-shadow: 0 0 0 3px rgba(8, 124, 240, 0.16);
    }

    #otpAuthOverlay .otp-auth-dome .otp-auth-floor-art {
        max-height: 88px;
    }

    #otpAuthOverlay .otp-auth-modal.otp-auth-fullscreen.otp-auth-dome {
        padding-bottom: 96px !important;
    }
}
