/* Custom styles for Payment Risk Assessment */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    line-height: 1.6;
}

.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #34495e 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.header .lead {
    font-size: 1.2rem;
    opacity: 0.9;
}

.card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    transition: transform 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(135deg, var(--light-bg) 0%, #ffffff 100%);
}

/* Upload Zone Styles */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    background-color: #f8f9fa;
    margin: 1rem 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-zone:hover {
    border-color: var(--secondary-color);
    background-color: #e3f2fd;
}

.upload-zone.drag-over {
    border-color: var(--success-color);
    background-color: #e8f5e8;
    transform: scale(1.02);
}
    border-bottom: 1px solid var(--border-color);
    border-radius: 12px 12px 0 0 !important;
}

.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2980b9 100%);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #219a52 100%);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #c0392b 100%);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #d68910 100%);
    border: none;
}

.btn-info {
    background: linear-gradient(135deg, var(--info-color) 0%, #2980b9 100%);
    border: none;
}

/* Risk level badges */
.risk-low {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

.risk-medium {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

.risk-high {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

.risk-critical {
    background: linear-gradient(135deg, #f5c6cb 0%, #f1b0b7 100%);
    color: #491217;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
}

/* Upload zone */
.upload-zone {
    border: 2px dashed var(--border-color);
    padding: 3rem;
    text-align: center;
    border-radius: 12px;
    margin: 1rem 0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-zone:hover {
    border-color: var(--secondary-color);
    background-color: rgba(52, 152, 219, 0.05);
}

.upload-zone.dragover {
    border-color: var(--secondary-color);
    background-color: rgba(52, 152, 219, 0.1);
}

/* Progress bar */
.progress {
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.progress-bar {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2980b9 100%);
    transition: width 0.3s ease;
}

/* Form elements */
.form-control {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* Table styling */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color) 0%, #34495e 100%);
    color: white;
    border: none;
    font-weight: 600;
}

.table tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

/* Weight and threshold inputs */
.weight-input, .threshold-input {
    width: 100px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-align: center;
}

/* Status messages */
.toast {
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.toast-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #219a52 100%);
    color: white;
}

.toast-error {
    background: linear-gradient(135deg, var(--danger-color) 0%, #c0392b 100%);
    color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .header .lead {
        font-size: 1rem;
    }
    
    .upload-zone {
        padding: 2rem 1rem;
    }
}

/* Professional signup form alignment */
#signupForm {
    max-width: 600px;
    margin: 0 auto;
}

#signupForm .form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-size: 14px;
    text-align: left;
    display: block;
}

#signupForm .form-control,
#signupForm textarea.form-control {
    height: 48px;
    border-radius: 8px;
    border: 2px solid #e1e8ed;
    padding: 12px 16px;
    font-size: 15px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #fff;
}

#signupForm .form-control:focus,
#signupForm textarea.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

#signupForm textarea.form-control {
    height: 90px;
    resize: vertical;
    line-height: 1.5;
}

/* Consistent spacing and alignment */
#signupForm .row {
    margin-left: -12px;
    margin-right: -12px;
    margin-bottom: 0;
}

#signupForm .col-md-6,
#signupForm .col-md-8, 
#signupForm .col-md-4,
#signupForm .col-md-12 {
    padding-left: 12px;
    padding-right: 12px;
}

#signupForm .mb-3 {
    margin-bottom: 1.8rem !important;
}

/* Form validation styling */
#signupForm .form-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 0.5rem;
}

#signupForm .text-danger {
    font-size: 12px;
    font-weight: 500;
    margin-top: 0.5rem;
}

/* Submit button styling */
#signupForm .btn {
    height: 48px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    padding: 12px 32px;
    width: 100%;
    margin-top: 1rem;
}

/* Single Assessment Test Form - Professional Alignment */
#singleTestForm {
    background-color: #f8f9fa;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

#singleTestForm .form-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
}

#singleTestForm .form-control {
    height: 42px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    background-color: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#singleTestForm .form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

#singleTestForm .row {
    margin-left: -8px;
    margin-right: -8px;
}

#singleTestForm .col-md-6,
#singleTestForm .col-md-4 {
    padding-left: 8px;
    padding-right: 8px;
}

#singleTestForm .mb-3 {
    margin-bottom: 20px;
}

#singleTestForm .btn {
    height: 42px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    padding: 8px 24px;
    margin-top: 16px;
    min-width: 160px;
}

/* Database Connection Form - Professional Alignment */
#databaseConnectionForm {
    background-color: #f8f9fa;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

#databaseConnectionForm .form-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
    text-align: left;
}

#databaseConnectionForm .form-control,
#databaseConnectionForm select.form-control,
#databaseConnectionForm textarea.form-control {
    height: 42px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    background-color: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#databaseConnectionForm textarea.form-control {
    height: 80px;
    resize: vertical;
    line-height: 1.5;
}

#databaseConnectionForm .form-control:focus,
#databaseConnectionForm select.form-control:focus,
#databaseConnectionForm textarea.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

#databaseConnectionForm .row {
    margin-left: -8px;
    margin-right: -8px;
}

#databaseConnectionForm .col-md-6,
#databaseConnectionForm .col-md-4,
#databaseConnectionForm .col-md-12 {
    padding-left: 8px;
    padding-right: 8px;
}

#databaseConnectionForm .mb-3 {
    margin-bottom: 20px;
}

#databaseConnectionForm .btn {
    height: 42px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    padding: 8px 24px;
    margin-top: 16px;
    min-width: 160px;
}

#databaseConnectionForm .form-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .weight-input, .threshold-input {
        width: 80px;
    }
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

/* Animation for cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.5s ease-out;
}

/* Pre code styling */
pre {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
}

pre code {
    color: #495057;
    font-size: 0.9rem;
}

/* Free Test Form - Vertical Layout */
#freeTestForm .form-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
    width: 100%;
}

#freeTestForm .form-control {
    height: 42px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    background-color: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 0;
}

#freeTestForm .form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

#freeTestForm .mb-3 {
    margin-bottom: 20px;
    display: block;
    width: 100%;
}

#freeTestForm .btn {
    height: 42px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    padding: 8px 24px;
    margin-top: 16px;
    min-width: 160px;
}
