/* OTP-only customer login */
.otp-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1b1d1f;
    padding: 24px;
    direction: rtl;
    box-sizing: border-box;
}

.otp-login-page *,
.otp-login-page *::before,
.otp-login-page *::after {
    box-sizing: border-box;
}

.otp-login-container {
    position: relative;
    overflow: hidden;
    width: min(470px, 100%);
    background: #181a1c;
    border: 1px solid #34383c;
    border-radius: 9px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    padding: 46px 38px 34px;
    color: #eef2f7;
}

.otp-login-container::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(
        to left,
        #c4000b 0%,
        #c4000b 8%,
        #79aaff 8%,
        #79aaff 22%,
        #c4000b 22%,
        #c4000b 100%
    );
}

.otp-login-header {
    text-align: center;
    margin-bottom: 30px;
}

.otp-login-header h1 {
    margin: 0 0 9px;
    color: #72a5ff;
    font-size: 29px;
    line-height: 1.4;
    font-weight: 800;
}

.otp-login-header p {
    margin: 0;
    color: #d3dae4;
    font-size: 13px;
}

.otp-form {
    width: 100%;
}

.form-group {
    margin: 0;
}

.form-group label {
    display: block;
    margin: 0 0 9px;
    color: #f4f6f8;
    font-size: 14px;
    font-weight: 700;
    text-align: right;
}

.form-group label .required {
    color: #ff3948;
    margin-right: 3px;
}

.form-group input[type="text"] {
    display: block;
    width: 100%;
    height: 52px;
    margin: 0;
    padding: 0 16px;
    background: #202326;
    color: #f4f7fb;
    border: 2px solid #d4000b;
    border-radius: 7px;
    outline: none;
    font-size: 17px;
    direction: ltr;
    text-align: center;
    box-shadow: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.form-group input[type="text"]::placeholder {
    color: #8d97a5;
    opacity: 1;
}

.form-group input[type="text"]:focus {
    border-color: #73a5ff;
    background: #23272b;
    box-shadow: 0 0 0 3px rgba(115, 165, 255, .12);
}

.form-group input[type="text"].valid {
    border-color: #2f9e5b;
}

.form-group input[type="text"].invalid {
    border-color: #ff3948;
}

.field-hint {
    display: block;
    margin-top: 8px;
    color: #c8d0da;
    font-size: 12px;
    text-align: center;
    direction: rtl;
}

.btn {
    font-family: inherit;
    border: 0;
    border-radius: 5px;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.btn-primary {
    min-height: 50px;
    padding: 11px 20px;
    background: #c4000b;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
}

.btn-primary:hover:not(:disabled) {
    background: #d30713;
    transform: translateY(-1px);
    box-shadow: 0 7px 18px rgba(196, 0, 11, .2);
}

.btn-primary:disabled {
    opacity: .62;
    cursor: not-allowed;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-loader {
    display: none;
}

.btn.loading {
    position: relative;
}

.btn.loading .btn-text {
    visibility: hidden;
}

.btn.loading .btn-loader {
    display: inline-block !important;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.spinner {
    display: block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, .3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lab-otp-spin .8s linear infinite;
}

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

/* A reserved message row prevents the card from jumping when a message appears. */
.otp-message {
    min-height: 53px;
    margin: 14px 0;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 5px;
    color: transparent;
    font-size: 13px;
    line-height: 1.8;
    text-align: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity .18s ease;
}

.otp-message.show {
    visibility: visible;
    opacity: 1;
}

.otp-message.success {
    color: #69dc91;
    background: rgba(30, 93, 54, .22);
    border-color: #2f7046;
}

.otp-message.error {
    color: #ff9aa3;
    background: rgba(118, 25, 34, .24);
    border-color: #7f3038;
}

.otp-message.info {
    color: #90b9ff;
    background: rgba(37, 67, 111, .24);
    border-color: #365b8c;
}

.otp-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 17px;
    padding-top: 15px;
    border-top: 1px solid #303438;
}

.btn-link {
    padding: 3px 0;
    background: transparent;
    border: 0;
    color: #72a5ff;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
}

.btn-link:hover:not(:disabled) {
    color: #99bdff;
}

.btn-link:disabled {
    color: #818993;
    cursor: not-allowed;
}

#resend-timer {
    color: #9aa3ae;
    margin-right: 4px;
}

@media (max-width: 520px) {
    .otp-login-page {
        padding: 12px;
    }

    .otp-login-container {
        padding: 39px 26px 28px;
    }

    .otp-login-header h1 {
        font-size: 25px;
    }

    .otp-actions {
        gap: 10px;
    }
}

#otp_code {
    text-align: center;
}

#otp_code::placeholder {
    text-align: center;
}

.otp-login-brand {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 18px;
}

.otp-login-brand a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    padding: 10px 16px;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    text-decoration: none;
}

.otp-login-logo {
    display: block;
    width: 115px;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

#mobile-input {
    text-align: center;
}

#mobile-input::placeholder {
    text-align: center;
}

#otp-code-input {
    text-align: center !important;
    direction: ltr;
}

#otp-code-input::placeholder {
    text-align: center;
}