/* ============================================ */
/* MERGED CSS - modal.css + verify_mobile styles */
/* ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    position: relative;
}

/* Animated background particles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

.dashboard-card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: 32px;
    padding: 50px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    text-align: center;
    border: 1px solid rgba(255,255,255,0.2);
}

.dashboard-card h1 {
    background: linear-gradient(135deg, #0f9b0f 0%, #0b6623 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    font-size: 36px;
    font-weight: 800;
}

.dashboard-card p {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 18px;
}

.user-id-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 28px;
    border-radius: 50px;
    font-weight: 600;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(102,126,234,0.3);
}

/* ========== MODAL STYLES (from modal.css) ========== */
.modal { 
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.5); 
    z-index: 1000; 
}

.modal-content { 
    background: white; 
    margin: 10% auto; 
    width: 90%; 
    max-width: 500px; 
    border-radius: 8px; 
    position: relative;
}

.modal-header { 
    background: #4CAF50; 
    color: white; 
    padding: 16px; 
    display: block;
    position: relative;
}

.modal-header h4 {
    margin: 0;
    color: white;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    position: absolute;
    top: 15px;
    right: 20px;
}

.modal-body { 
    padding: 10px; 
}

.form-group input { 
    width: 100%; 
    padding: 10px; 
    border: 1px solid #ddd; 
    border-radius: 4px; 
}

.btn { 
    padding: 8px 16px; 
    border: none; 
    border-radius: 4px; 
    cursor: pointer; 
}

.btn-update { 
    background: #4CAF50; 
    color: white; 
}

.btn-cancel { 
    background: #eee; 
}

.message { 
    padding: 10px; 
    margin-top: 10px; 
    display: none; 
}

.message.success { 
    background: #dfd; 
    color: #080; 
    display: block; 
}

.message.error { 
    background: #fdd; 
    color: #800; 
    display: block; 
}

/* ========== MOBILE VERIFICATION MODAL STYLES ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.modal-container {
    background: linear-gradient(145deg, #ffffff 0%, #f8faff 100%);
    border-radius: 48px;
    width: 480px;
    max-width: 90%;
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.34, 1.2, 0.64, 1);
    box-shadow: 0 40px 80px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.2);
}

/* Mobile verification modal header (overrides modal.css header) */
.modal-container .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    padding: 35px 30px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.modal-container .modal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(135deg, #0f9b0f 0%, #0b6623 100%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.modal-container .modal-header i {
    font-size: 52px;
    margin-bottom: 12px;
    display: inline-block;
    animation: pulse 2s ease infinite;
    position: relative;
    z-index: 1;
}

.modal-container .modal-header h2 {
    font-size: 28px !important;
    font-weight: 700 !important;
    margin-bottom: 8px !important;
    margin-top: 0 !important;
    position: relative !important;
    z-index: 1 !important;
    display: block !important;
    clear: both !important;
    width: 100% !important;
    float: none !important;
    line-height: 1.2 !important;
}

.modal-container .modal-header p {
    font-size: 14px !important;
    opacity: 0.92 !important;
    position: relative !important;
    z-index: 1 !important;
    display: block !important;
    clear: both !important;
    width: 100% !important;
    float: none !important;
    margin-top: 5px !important;
    margin-bottom: 0 !important;
    line-height: 1.4 !important;
}

.modal-container .modal-body {
    padding: 35px 30px;
    overflow-x: hidden;
}

.instruction-text {
    background: #fff5f5;
    border-left: 4px solid #e53e3e;
    padding: 12px 15px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-size: 13px;
    color: #c53030;
    font-weight: 500;
}

.instruction-text i {
    margin-right: 8px;
}

/* Input group styles */
.input-group {
    margin-bottom: 8px;
    position: relative;
    width: 100%;
    display: block;
}

.input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

/* Mobile input with icon */
.input-group.mobile-input-group input,
#step1 .input-group input {
    width: 100%;
    padding: 15px 16px 15px 48px;
    border: 2px solid #2E8B57;
    border-radius: 20px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
}

/* OTP input without icon */
.otp-input {
    letter-spacing: 6px;
    font-size: 28px;
    text-align: center;
    font-weight: 700;
    width: 100% !important;
    padding: 15px 16px !important;
    border: 2px solid #2E8B57;
    border-radius: 20px;
    box-sizing: border-box;
    font-family: 'Inter', monospace;
}

.input-group input:focus,
.otp-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.15);
}

.input-group input::placeholder,
.otp-input::placeholder {
    color: #cbd5e0;
}

/* Message styles */
.error-message {
    color: #e53e3e;
    font-size: 12px;
    margin-bottom: 8px;
    display: none;
    font-weight: 500;
    padding: 8px 12px;
    background: #fff5f5;
    border-radius: 10px;
    border-left: 3px solid #e53e3e;
}

.info-message {
    color: #2c5282;
    font-size: 12px;
    margin-bottom: 8px;
    display: none;
    font-weight: 500;
    padding: 8px 12px;
    background: #ebf8ff;
    border-radius: 10px;
    border-left: 3px solid #3182ce;
}

.warning-message {
    color: #c05621;
    font-size: 12px;
    margin-bottom: 8px;
    display: none;
    font-weight: 500;
    padding: 8px 12px;
    background: #fffaf0;
    border-radius: 10px;
    border-left: 3px solid #ed8936;
}

.success-message {
    color: #2f855a;
    font-size: 12px;
    margin-bottom: 8px;
    display: none;
    font-weight: 500;
    padding: 8px 12px;
    background: #f0fff4;
    border-radius: 10px;
    border-left: 3px solid #48bb78;
}

/* Button styles (overriding modal.css) */
.modal-container .btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102,126,234,0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102,126,234,0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    margin-top: 12px;
    box-shadow: none;
}

.btn-secondary:hover:not(:disabled) {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.info-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
    padding: 12px 15px;
    border-radius: 16px;
    font-size: 12px;
    color: #b45309;
    margin-top: 20px;
    text-align: center;
    border: 1px solid #fde68a;
}

.resend-link {
    text-align: center;
    margin-top: 18px;
}

.resend-link a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.resend-link a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.resend-link.disabled a {
    color: #FF7F7F;
    cursor: not-allowed;
    pointer-events: none;
}

.attempts-warning {
    background: linear-gradient(135deg, #fed7d7 0%, #fff5f5 100%);
    color: #c53030;
    padding: 12px;
    border-radius: 16px;
    font-size: 13px;
    margin-top: 18px;
    text-align: center;
    font-weight: 500;
    border: 1px solid #fc8181;
}

.cooldown-timer {
    background: linear-gradient(135deg, #e0e7ff 0%, #eef2ff 100%);
    color: #4338ca;
    padding: 10px;
    border-radius: 14px;
    font-size: 12px;
    text-align: center;
    margin-top: 15px;
    font-weight: 500;
}

/* Remove spinner from number input */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    flex-direction: column;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid #0f9b0f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: white;
    margin-top: 20px;
    font-size: 16px;
    font-weight: 500;
}

.field-container {
    margin-bottom: 22px;
}

/* Step containers */
#step1, #step2 {
    width: 100%;
}

#step2 .input-group,
#step1 .input-group {
    width: 100%;
    display: block;
}

/* Override any Bootstrap conflicts */
.modal-body .input-group,
.modal-container .input-group {
    display: block;
    width: 100%;
}

/* Ensure OTP input is full width and centered */
#otpInput.otp-input {
    text-align: center;
    letter-spacing: 4px;
    font-size: 24px;
}

/* Mobile verification modal header overrides for h2 and p */
.modal-container .modal-header h2,
.modal-container .modal-header p {
    display: block !important;
    margin: 0 0 5px 0 !important;
}