/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 300;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Form styles */
.form-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

input[type="text"],
input[type="date"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

input[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
}

/* Button styles */
.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    margin-left: 10px;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Results section */
.results-section,
.inquiry-section,
.status-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.results-section h2,
.inquiry-section h2,
.status-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-right: 10px;
}

.status-validated { background: #d4edda; color: #155724; }
.status-classified { background: #cce5ff; color: #004085; }
.status-inquery { background: #fff3cd; color: #856404; }
.status-inquired { background: #d1ecf1; color: #0c5460; }
.status-researched { background: #e2e3e5; color: #383d41; }
.status-analyzed { background: #f8d7da; color: #721c24; }
.status-completed { background: #d4edda; color: #155724; }

/* JSON display */
.json-display {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    overflow-x: hidden;
    overflow-y: auto;
    margin: 10px 0;
    line-height: 1.4;
}

/* Pre elements in step results */
.index pre {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    white-space: pre-wrap;
    overflow-x: auto;
    margin: 10px 0;
    word-wrap: break-word;
    word-break: break-all;
    line-height: 1.4;
    max-width: 100%;
}

/* Inquiry form */
.inquiry-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
}

.inquiry-question {
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.inquiry-response {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error messages */
.error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    margin: 10px 0;
    border: 1px solid #f5c6cb;
}

.success {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 6px;
    margin: 10px 0;
    border: 1px solid #c3e6cb;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-secondary {
        margin-left: 0;
        margin-top: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
}

/* Progress indicator */
.progress-bar {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    width: 0%;
}

/* Risk type badges */
.risk-type-badge {
    display: inline-block;
    padding: 4px 8px;
    background: #667eea;
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
}

/* ===========================================
   INDEX PAGE STYLES (.index namespace)
   =========================================== */

.index .workflow-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.index .workflow-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
}

.index .workflow-step {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    border-left: 5px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
}

.index .workflow-step.active {
    border-left-color: #007bff;
    box-shadow: 0 4px 20px rgba(0,123,255,0.2);
}

.index .workflow-step.completed {
    border-left-color: #28a745;
    background: #f8fff9;
}

.index .workflow-step.pending {
    opacity: 0.6;
}

.index .step-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.index .step-number {
    background: #007bff;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
}

.index .step-number.completed {
    background: #28a745;
}

.index .step-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.index .step-description {
    color: #666;
    margin-top: 5px;
}

.index .form-group {
    margin-bottom: 20px;
}

.index .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.index .form-group input,
.index .form-group textarea,
.index .form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.index .form-group input:focus,
.index .form-group textarea:focus,
.index .form-group select:focus {
    outline: none;
    border-color: #007bff;
}

.index .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.index .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.index .btn-primary {
    background: #007bff;
    color: white;
}

.index .btn-primary:hover {
    background: #0056b3;
}

.index .btn-success {
    background: #28a745;
    color: white;
}

.index .btn-success:hover {
    background: #1e7e34;
}

.index .btn-secondary {
    background: #6c757d;
    color: white;
}

.index .btn-secondary:hover {
    background: #545b62;
}

.index .btn-info {
    background: #17a2b8;
    color: white;
}

.index .btn-info:hover {
    background: #138496;
}

.index .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.index .inquiry-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #ffc107;
}

.index .inquiry-question {
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.index .inquiry-answer {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.index .workflow-progress {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 30px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    margin-bottom: 40px;
    position: sticky;
    top: 20px;
    z-index: 100;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.index .progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.index .progress-header h3 {
    margin: 0;
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.index .header-links {
    display: flex;
    gap: 10px;
}

.index .debug-link,
.index .header-links a {
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
}

.index .progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.index .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffffff, #f8f9fa);
    transition: width 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.index .progress-steps {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.index .progress-step {
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.index .progress-step.active {
    color: white;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.index .progress-step.completed {
    color: #90EE90;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.index .loading {
    text-align: center;
    padding: 20px;
    color: #007bff;
}

.index .error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid #dc3545;
}

.index .success {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid #28a745;
}

.index .results-display {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid #28a745;
}

/* Locked form fields */
.index input:disabled, 
.index textarea:disabled, 
.index select:disabled {
    background-color: #f8f9fa !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

/* Step Loading Overlay - localized within workflow-step */
.index .step-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
    border-radius: 10px;
    margin: 0;
    padding: 0;
}

.index .step-loading-content {
    text-align: center;
    background: transparent;
    padding: 20px;
    border-radius: 0;
    box-shadow: none;
    border: none;
    width: 100%;
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    max-height: 300px;
}

.index .step-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px auto;
    flex-shrink: 0;
}

.index .step-loading-content h4 {
    margin: 0 0 15px 0;
    color: #007bff;
    font-size: 1.1em;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    line-height: 1.3;
    flex-shrink: 0;
}

.index .step-loading-content p {
    margin: 0;
    color: #333;
    font-size: 1em;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.index .timeout-countdown {
    margin-top: 10px;
    padding: 8px 12px;
    background-color: rgba(0, 123, 255, 0.1);
    border: 1px solid rgba(0, 123, 255, 0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
}

.index .timeout-label {
    color: #007bff;
    font-weight: 600;
    font-size: 0.85em;
}

.index .timeout-timer {
    color: #007bff;
    font-weight: 700;
    font-size: 1em;
    font-family: 'Courier New', monospace;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 3px 6px;
    border-radius: 3px;
    min-width: 45px;
    text-align: center;
}

/* Timeout Error Styles */
.index .timeout-error {
    text-align: center;
    padding: 30px;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    margin: 20px 0;
}

.index .timeout-error-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.index .timeout-error h4 {
    color: #856404;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.index .timeout-error p {
    color: #856404;
    margin-bottom: 20px;
    font-size: 1em;
}

.index .timeout-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.index .timeout-actions .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.index .timeout-actions .btn-primary {
    background-color: #007bff;
    color: white;
}

.index .timeout-actions .btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.index .timeout-actions .btn-secondary {
    background-color: #6c757d;
    color: white;
}

.index .timeout-actions .btn-secondary:hover {
    background-color: #545b62;
    transform: translateY(-2px);
}

.index .timeout-info {
    color: #6c757d;
    font-style: italic;
}

/* Error with Resume Styles */
.index .error-with-resume {
    text-align: center;
    padding: 30px;
    background-color: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 10px;
    margin: 20px 0;
}

.index .error-with-resume .error-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.index .error-with-resume .error-message {
    margin-bottom: 20px;
}

.index .error-with-resume .error-message strong {
    color: #856404;
    font-size: 1.3em;
    display: block;
    margin-bottom: 10px;
}

.index .error-with-resume .error-message p {
    color: #856404;
    font-size: 1em;
}

.index .error-with-resume .error-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.index .error-with-resume .error-actions .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
}

.index .error-with-resume .error-actions .btn-primary {
    background-color: #007bff;
    color: white;
}

.index .error-with-resume .error-actions .btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.index .error-with-resume .error-info {
    color: #6c757d;
    font-style: italic;
    font-size: 0.9em;
}

/* Workflow Content Styles */
.index .workflow-loading {
    text-align: center;
    padding: 60px 30px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.index .workflow-loading h3 {
    margin-top: 20px;
    color: #007bff;
    font-size: 1.2em;
}

.index .workflow-success {
    text-align: center;
    padding: 40px 30px;
    background-color: #d4edda;
    border: 2px solid #28a745;
    border-radius: 10px;
    margin: 20px 0;
}

.index .workflow-success .success-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.index .workflow-success h3 {
    color: #155724;
    margin: 0;
}

.index .workflow-result {
    margin-top: 20px;
}

.index .workflow-result h3 {
    color: #155724;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.index .workflow-result .results-display {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
}

.index .workflow-result .results-display h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #495057;
}

.index .workflow-result .results-display pre {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    max-height: 500px;
    overflow-y: auto;
    margin: 0;
}

.index .inquiry-section {
    padding: 20px;
}

.index .inquiry-section h3 {
    color: #007bff;
    margin-bottom: 10px;
}

.index .inquiry-section p {
    color: #6c757d;
    margin-bottom: 20px;
}

/* Skipped Step Styles */
.index .skipped-step {
    text-align: center;
    padding: 30px;
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    margin: 20px 0;
}

.index .skipped-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #6c757d;
}

.index .skipped-step h4 {
    color: #495057;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.index .skipped-step p {
    color: #6c757d;
    margin-bottom: 0;
    font-size: 1em;
}

/* Loading status for progress steps */
.index .progress-step.loading {
    background-color: #007bff !important;
    color: white !important;
    opacity: 0.7;
    position: relative;
}

/* Alternative: Use a separate spinner element instead of ::after */
.index .progress-step.loading .step-spinner-mini {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: progressSpinner 1s linear infinite;
    transform-origin: center;
    will-change: transform;
}

/* Fallback: Keep ::after for compatibility but make it more isolated */
.index .progress-step.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: progressSpinner 1s linear infinite;
    transform-origin: center;
    will-change: transform;
    pointer-events: none;
    z-index: 1;
}

/* Separate animation for progress step spinner to avoid conflicts */
@keyframes progressSpinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===========================================
   DEBUG PAGE STYLES (.debug namespace)
   =========================================== */

.debug .debug-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.debug .debug-header {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
}

.debug .debug-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.debug .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.debug .stat-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid #007bff;
}

.debug .stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #007bff;
}

.debug .stat-label {
    color: #6c757d;
    margin-top: 5px;
}

.debug .table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.debug .debug-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.debug .debug-table th,
.debug .debug-table td {
    border: 1px solid #dee2e6;
    padding: 12px;
    text-align: left;
}

.debug .debug-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.debug .debug-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.debug .status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.debug .status-created { background: #e9ecef; color: #495057; }
.debug .status-validated { background: #d4edda; color: #155724; }
.debug .status-classified { background: #cce5ff; color: #004085; }
.debug .status-inquery { background: #fff3cd; color: #856404; }
.debug .status-inquired { background: #d1ecf1; color: #0c5460; }
.debug .status-researched { background: #e2e3e5; color: #383d41; }
.debug .status-analyzed { background: #f8d7da; color: #721c24; }
.debug .status-completed { background: #d4edda; color: #155724; }

.debug .json-display {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
}

.debug .action-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.debug .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
}

.debug .btn-primary {
    background: #007bff;
    color: white;
}

.debug .btn-danger {
    background: #dc3545;
    color: white;
}

.debug .btn-secondary {
    background: #6c757d;
    color: white;
}

.debug .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Table button styles - smaller and more compact */
.debug table .btn {
    padding: 4px 8px;
    font-size: 11px;
    margin: 0 2px;
    min-width: auto;
    white-space: nowrap;
    display: inline-block;
    vertical-align: top;
}

/* Disable hover effects for table buttons to prevent layout shifts */
.debug table .btn:hover {
    transform: none;
    box-shadow: none;
    opacity: 0.8;
}

.debug .no-data {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 40px;
}

/* Debug Detail Page Styles */
.debug .field-group {
    margin-bottom: 20px;
}

.debug .field-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
}

.debug .field-value {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    border-left: 4px solid #007bff;
}

.debug .two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.debug .btn-warning {
    background: #ffc107;
    color: #212529;
}

@media (max-width: 768px) {
    .debug .two-column {
        grid-template-columns: 1fr;
    }
    
    .index .progress-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .index .debug-link {
        align-self: flex-end;
    }
}

/* Inquiry Styles */
.inquiry-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #007bff;
}

.inquiry-section h3 {
    margin: 0 0 15px 0;
    color: #007bff;
    font-size: 1.3em;
}

.inquiry-section p {
    margin: 0 0 20px 0;
    color: #6c757d;
    line-height: 1.5;
}

.inquiry-questions {
    margin-bottom: 20px;
}

.inquiry-item {
    background: white;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
}

.inquiry-question {
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.inquiry-answer {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.inquiry-answer:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.inquiry-answer::placeholder {
    color: #6c757d;
    font-style: italic;
}

/* Success Message Styles */
.workflow-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: center;
    justify-content: center;
}

.success-icon {
    font-size: 2em;
    color: #155724;
    flex-shrink: 0;
}

.workflow-success h3 {
    margin: 0 0 8px 0;
    color: #155724;
    font-size: 1.3em;
}

.workflow-success p {
    margin: 0;
    color: #155724;
    opacity: 0.8;
}

/* Error Message Styles */
.error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.error-icon {
    font-size: 1.5em;
    color: #721c24;
    flex-shrink: 0;
}

.error-content h3 {
    margin: 0 0 10px 0;
    color: #721c24;
    font-size: 1.2em;
}

.error-content p {
    margin: 0 0 8px 0;
    color: #721c24;
    line-height: 1.4;
}

.error-content p:last-child {
    margin-bottom: 0;
    font-style: italic;
    opacity: 0.8;
}

/* Report Result Styles */
.workflow-result {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid #007bff;
}

.results-display {
    margin-top: 20px;
}

.report-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.report-meta {
    background: #e9f5ff;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #007bff;
}

.report-meta h5 {
    margin: 0 0 10px 0;
    color: #0056b3;
    font-size: 1.1em;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.meta-label {
    font-weight: 600;
    color: #495057;
}

.meta-value {
    color: #007bff;
    font-weight: 500;
}

.report-section {
    margin-bottom: 25px;
    padding: 15px;
    border-radius: 6px;
    background: #f8f9fa;
}

.report-section h5 {
    margin: 0 0 15px 0;
    color: #0056b3;
    font-size: 1.2em;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

.analysis-summary {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-left: 4px solid #2196f3;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.metric-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-top: 3px solid #007bff;
    transition: transform 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.metric-value {
    font-size: 1.8em;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 8px;
}

.metric-label {
    font-size: 0.9em;
    color: #6c757d;
    line-height: 1.3;
}

.damage-breakdown {
    background: linear-gradient(135deg, #fff3e0 0%, #fce4ec 100%);
    border-left: 4px solid #ff9800;
}

.damage-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.damage-type {
    background: white;
    padding: 15px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid #ff9800;
}

.damage-type-name {
    font-weight: 500;
    color: #333;
    text-transform: capitalize;
}

.damage-type-percentage {
    font-weight: bold;
    color: #ff9800;
    font-size: 1.1em;
}

.sensitivity-analysis {
    background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%);
    border-left: 4px solid #4caf50;
}

.sensitivity-item {
    background: white;
    padding: 12px 15px;
    margin: 8px 0;
    border-radius: 6px;
    border-left: 3px solid #4caf50;
    color: #333;
}

.recommendations {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1f5fe 100%);
    border-left: 4px solid #9c27b0;
}

.recommendation-list {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
}

.recommendation-list li {
    background: white;
    padding: 12px 15px;
    margin: 8px 0;
    border-radius: 6px;
    border-left: 3px solid #9c27b0;
    position: relative;
    padding-left: 35px;
}

.recommendation-list li::before {
    content: "💡";
    position: absolute;
    left: 12px;
    top: 12px;
}

@media (max-width: 768px) {
    .meta-grid {
        grid-template-columns: 1fr;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .damage-types {
        grid-template-columns: 1fr;
    }
    
    .meta-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}
.badge-landwirtschaft { 
    background-color: #d4edda; 
    color: #155724; 
}
.badge-wetter { 
    background-color: #cce5ff; 
    color: #004085; 
}
.badge-sicherheit { 
    background-color: #fff3cd; 
    color: #856404; 
}