.otp-container {
    max-width: 450px;
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    padding: 25px 30px 30px 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    position: relative;
}
.otp-inline-modal .modal-dialog,
.otp-inline-dialog {
    width: calc(100vw - 56px);
    max-width: 540px;
    margin: 0.75rem auto;
}
.otp-inline-modal .modal-content {
    border: none;
    border-radius: 24px;
    overflow: visible;
    background: transparent;
    box-shadow: none;
}
.otp-inline-modal .modal-body {
    padding: 0 !important;
    max-height: none;
    overflow: visible;
    background: transparent;
}
.modal-otp-inline {
    padding: 0 !important;
    background: transparent;
}
.modal-otp-inline .otp-container {
    max-width: 460px;
    padding: 16px 22px 18px 22px;
    margin: 0 auto;
}
.modal-otp-inline .inline-otp-alert .alert {
    margin-bottom: 0;
    padding: 0.65rem 0.8rem;
    font-size: 0.9rem;
    line-height: 1.25;
}
.modal-otp-inline .otp-title {
    font-size: 19px;
    margin-bottom: 10px;
}
.modal-otp-inline .otp-text {
    font-size: 12px;
    line-height: 1.3;
    margin-bottom: 12px;
}
.modal-otp-inline .otp-inputs-group {
    gap: 8px;
    margin-bottom: 12px;
}
.modal-otp-inline .otp-digit {
    width: 44px;
    height: 50px;
    font-size: 17px;
}
.modal-otp-inline .btn-finalize,
.modal-otp-inline .btn-resend-secondary {
    padding: 10px;
    margin-bottom: 0;
}
.modal-otp-inline .otp-buttons {
    gap: 0.45rem;
    margin-top: 0.35rem;
}
.modal-otp-inline .otp-spinner {
    margin: 4px 0;
}
.modal-otp-inline .cooldown-display {
    min-height: 16px;
    margin-top: 0.25rem;
}
.modal-otp-inline .btn-link {
    margin-top: 0.5rem !important;
    padding-top: 0;
    padding-bottom: 0;
    font-size: 13px;
}
.otp-title {
    margin-top: 40px;
    color: #3f3670;
    font-weight: 700;
    font-size: 24px;
    margin-bottom: 20px;
    margin-top: 5px;
    line-height: 1.3;
}
.btn-back {
    position: absolute;
    top: 20px;
    left: 30px;
    width: auto;
    max-width: max-content;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: #757575;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-back:hover {color: #555;transform: translateX(-2px);}
.otp-text {color: #555;font-size: 14px;line-height: 1.4;margin-bottom: 20px;text-align: left;}

.otp-inputs-group {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin-bottom: 20px;
}
.otp-field,.otp-digit {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    border: 2px solid #e8ecf0;
    border-radius: 10px;
    background-color: #ffffff;
    color: #2c175a;
    transition: all 0.2s ease;
}
.otp-field:focus,.otp-digit:focus {
    outline: none;
    border-color: #2c175a;
    box-shadow: 0 0 0 3px rgba(44, 23, 90, 0.1);
    background-color: #fafbfc;
}
.otp-field:disabled,.otp-digit:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
    border-color: #dee2e6;
}
.otp-field.valid,.otp-digit.valid {
    border-color: #00ffa2;
    background-color: rgba(0, 255, 162, 0.05);
}
.otp-field.invalid,.otp-digit.invalid,.otp-field:invalid {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
}
.otp-field.error,.otp-digit.error {animation: shake 0.5s;border-color: #dc3545;}

.btn-finalize,.otp-verify-btn,.btn-resend-secondary,.otp-resend-btn {
    width: 100%;
    border-radius: 12px;
    padding: 14px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 12px;
}
.btn-finalize,.otp-verify-btn {
    background: linear-gradient(135deg, #2c175a 0%, #4b88ff 100%);
    border: none;
    color: white;
}
.btn-finalize:disabled {background-color: #e2e4e8;color: #3f3670;}
.btn-finalize:hover:not(:disabled),.otp-verify-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #1e0f3d 0%, #3d73e6 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(44, 23, 90, 0.3);
    color: white;
}
.btn-finalize:disabled,.otp-verify-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    background: #6c757d;
}
.btn-resend-secondary,.otp-resend-btn {
    background: transparent;
    border: 2px solid #2c175a;
    color: #2c175a;
    padding: 12px;
    font-size: 14px;
}
.btn-resend-secondary:hover,.otp-resend-btn:hover:not(:disabled) {
    background-color: #2c175a;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(44, 23, 90, 0.2);
}
.btn-resend-secondary:disabled,.otp-resend-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    border-color: #6c757d;
    color: #6c757d;
}

.footer-text {text-align: center;font-size: 15px;color: #666;}
.link-login {color: #007bff;text-decoration: none;font-weight: 600;transition: color 0.2s ease;}
.link-login:hover {color: #0056b3;text-decoration: underline;}
.hr-light {border: 0;border-top: 1px solid #f0f0f0;margin: 25px 0;}

.otp-spinner,.otp-verify-btn .spinner-border,.otp-resend-btn .spinner-border {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: #3f3670;
    font-size: 14px;
}
.otp-spinner {display: none;margin: 8px 0;}
.otp-spinner .spinner-border,.otp-verify-btn .spinner-border {width: 20px;height: 20px;border-width: 2px;margin-right: 0.5rem;}

@media (max-width: 576px) {
    .otp-container {padding: 30px 20px;margin: 0 15px;}
    .otp-inline-modal .modal-dialog,.otp-inline-dialog {width: calc(100vw - 16px);max-width: calc(100vw - 16px);margin: 0.5rem auto;}
    .otp-inline-modal .modal-body {max-height: none;}
    .modal-otp-inline .otp-container {max-width: 100%;padding: 14px 14px 16px 14px;margin: 0;}
    .otp-title {font-size: 22px;}
    .otp-text {font-size: 14px;}
    .otp-field,.otp-digit {width: 45px;height: 55px;font-size: 18px;}
    .otp-inputs-group {gap: 8px;}
    .otp-verification-modal .modal-dialog {margin: 0.5rem;width: calc(100% - 1rem);max-width: calc(100% - 1rem);}
    .otp-verification-modal .modal-body {padding: 1.5rem 1rem;}
    .otp-input-container {gap: 0.5rem;}
    .otp-buttons {gap: 0.5rem;margin-top: 1rem;}
    .modal-otp-inline .otp-title {font-size: 17px;margin-bottom: 8px;}
    .modal-otp-inline .otp-text {font-size: 11px;margin-bottom: 10px;}
    .modal-otp-inline .otp-digit {width: 40px;height: 46px;font-size: 16px;}
}

#otp-message {margin: 1rem 0;min-height: 20px;}
#otp-message .alert {margin-bottom: 0;font-size: 0.9rem;padding: 0.75rem 1rem;border-radius: 8px;}
.cooldown-display {text-align: center;font-size: 0.85rem;color: #6c757d;margin-top: 0.5rem;min-height: 20px;}

.otp-buttons {display: flex;flex-direction: column;gap: 0.75rem;margin-top: 1.5rem;}
.security-notice {
    background: linear-gradient(90deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-left: 4px solid #00ffa2;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: #2c175a;
}
.security-notice .fas {color: #00ffa2;margin-right: 0.5rem;}

@keyframes shake {
    0%, 100% {transform: translateX(0);}
    10%, 30%, 50%, 70%, 90% {transform: translateX(-4px);}
    20%, 40%, 60%, 80% {transform: translateX(4px);}
}
