/* OTP Modal */
.otp-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 16px;
}

.otp-modal {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    overflow: hidden;
    transform: translateY(6px);
}

.otp-modal__header {
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.otp-modal__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #111;
}

.otp-modal__close {
    border: 0;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 10px;
    width: 50px;
    max-width: 100%;
    padding: 0 !important;
    margin: 0 !important;
}

.otp-modal__close:hover {
    background: rgba(0, 0, 0, .06);
}

.otp-modal__body {
    padding: 16px 18px 18px;
}

.otp-hint {
    margin: 0 0 12px;
    font-size: 13px;
    color: rgba(0, 0, 0, .7);
}

.otp-phone {
    font-weight: 700;
    color: #111;
}

.otp-code {
    width: 100%;
    font-size: 22px;
    letter-spacing: .22em;
    padding: 12px 14px;
    border: 1px solid rgba(0, 0, 0, .2);
    border-radius: 12px;
    outline: none;
}

.otp-code:focus {
    border-color: rgba(0, 0, 0, .55);
}

.otp-error {
    margin-top: 10px;
    font-size: 13px;
    color: #b00020;
    display: none;
}

.otp-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.otp-btn {
    flex: 1;
    border: 0;
    cursor: pointer;
    border-radius: 12px;
    padding: 12px 14px;
    font-weight: 700;
    font-size: 14px;
    width: 50px;
    max-width: 100%;
    padding: 0 !important;
    font-size: 20px !important;
    margin: 0 !important;
}

.otp-btn--primary {
    background: #111;
    color: #fff;
}

.otp-btn--ghost {
    background: rgba(0, 0, 0, .06);
    color: #111;
}

.otp-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.otp-footer {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    font-size: 12px;
    color: rgba(0, 0, 0, .65);
}

.otp-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0, 0, 0, .2);
    border-top-color: rgba(0, 0, 0, .7);
    border-radius: 50%;
    display: inline-block;
    animation: otp-spin .7s linear infinite;
    vertical-align: -2px;
    margin-right: 6px;
}

@keyframes otp-spin {
    to {
        transform: rotate(360deg);
    }
}

.otp-modal--shake {
    animation: otpShake 240ms ease-in-out;
}

@keyframes otpShake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-6px);
    }

    75% {
        transform: translateX(6px);
    }
}

.otp-toast {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;

    max-width: 92vw;
    width: 520px;
    padding: 12px 14px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
    background: #111;
    color: #fff;
    font: 14px/1.35 system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

.otp-toast--error {
    background: #b91c1c;
}

.otp-toast--ok {
    background: #15803d;
}