/* Credit Inquiry Form Styles */
.mahak-credit-form {
    max-width: 600px;
    margin: 20px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    direction: rtl;
    text-align: right;
}

.form-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.form-header h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
}

.price-info {
    margin: 0;
    font-size: 18px;
    opacity: 0.95;
    background: rgba(255,255,255,0.1);
    padding: 10px 20px;
    border-radius: 25px;
    display: inline-block;
}

.price-info strong {
    font-weight: 700;
    font-size: 22px;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

#credit-inquiry-form {
    padding: 30px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.required {
    color: #e74c3c;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input:invalid {
    border-color: #e74c3c;
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.terms-section {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-left: 10px;
    margin-top: 2px;
}

.form-actions {
    text-align: center;
    margin-top: 30px;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-width: 200px;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-loading {
    display: none;
}

.form-messages {
    margin-top: 20px;
}

.message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Result Section Styles */
.credit-result {
    background: #fff;
    margin-top: 30px;
}

.result-header {
    background: #f8f9fa;
    padding: 25px 30px;
    border-bottom: 1px solid #dee2e6;
}

.result-header h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 22px;
}

.result-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 600;
}

.result-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-icon {
    font-size: 18px;
}

.result-content {
    padding: 30px;
}

.result-content h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
    border-bottom: 2px solid #f8f9fa;
    padding-bottom: 10px;
}

.info-grid,
.credit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.info-item,
.credit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    border-right: 4px solid #dee2e6;
}

.credit-item.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-right-color: #fff;
}

.info-item label,
.credit-item label {
    font-weight: 600;
    font-size: 14px;
}

.info-item span,
.credit-item span {
    font-weight: 500;
}

.grade-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    text-align: center;
    min-width: 40px;
}

.grade-a\+ { background: #28a745; color: white; }
.grade-a { background: #6f42c1; color: white; }
.grade-b\+ { background: #17a2b8; color: white; }
.grade-b { background: #20c997; color: white; }
.grade-c\+ { background: #ffc107; color: #212529; }
.grade-c { background: #fd7e14; color: white; }
.grade-d\+ { background: #dc3545; color: white; }
.grade-d { background: #6c757d; color: white; }
.grade-f { background: #343a40; color: white; }
.grade-unknown { background: #e9ecef; color: #6c757d; }

.additional-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.inquiry-info {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.inquiry-date {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    border-top: 1px solid #dee2e6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mahak-credit-form {
        margin: 10px;
        border-radius: 8px;
    }
    
    .form-header {
        padding: 20px;
    }
    
    .form-header h3 {
        font-size: 20px;
    }
    
    #credit-inquiry-form {
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .info-grid,
    .credit-grid {
        grid-template-columns: 1fr;
    }
    
    .additional-info {
        grid-template-columns: 1fr;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Print Styles */
@media print {
    .mahak-credit-form {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .form-header {
        background: #f8f9fa !important;
        color: #333 !important;
    }
    
    .result-actions {
        display: none;
    }
    
    .btn {
        display: none;
    }
}

/* Loading Animation */
.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Admin Styles */
.card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    margin-bottom: 20px;
    padding: 20px;
}

.card h2 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

#api-test-result,
#sms-test-result {
    margin-right: 10px;
    font-weight: 600;
}