/* CSS Variables */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --bg-card: #16161f;
    --bg-hover: #1e1e2a;
    
    --accent-primary: #6366f1;
    --accent-secondary: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-error: #ef4444;
    
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border-color: #2a2a3a;
    --border-subtle: #1e1e2a;
    
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px var(--accent-glow);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Pattern */
.background-pattern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 15% 15%, rgba(99, 102, 241, 0.15) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 20%, rgba(16, 185, 129, 0.08) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 80%, rgba(129, 140, 248, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 85%, rgba(245, 158, 11, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.03) 0%, transparent 60%),
        linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    pointer-events: none;
    z-index: -1;
}

/* Animated floating orbs */
.background-pattern::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatOrb1 20s ease-in-out infinite;
    pointer-events: none;
}

.background-pattern::after {
    content: '';
    position: absolute;
    bottom: 10%;
    right: 10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatOrb2 25s ease-in-out infinite;
    pointer-events: none;
}

@keyframes floatOrb1 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }
    25% {
        transform: translate(50px, 30px) scale(1.1);
        opacity: 0.8;
    }
    50% {
        transform: translate(20px, 60px) scale(0.95);
        opacity: 0.5;
    }
    75% {
        transform: translate(-30px, 20px) scale(1.05);
        opacity: 0.7;
    }
}

@keyframes floatOrb2 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.5;
    }
    33% {
        transform: translate(-40px, -30px) scale(1.15);
        opacity: 0.7;
    }
    66% {
        transform: translate(30px, -50px) scale(0.9);
        opacity: 0.4;
    }
}

/* Container */
.container {
    max-width: 3000px;
    margin: 0 auto;
    padding: 2rem 3rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.upload-section {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

/* Header */
header {
    margin-bottom: 3rem;
    animation: fadeInDown 0.6s ease-out;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Debug Toggle */
.debug-toggle {
    position: relative;
}

.debug-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    transition: all 0.2s ease;
}

.debug-checkbox-label:hover {
    background: var(--bg-hover);
    border-color: var(--border-color);
}

.debug-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.debug-checkbox-text {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.debug-checkbox-label:has(input:checked) {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-primary);
}

.debug-checkbox-label:has(input:checked) .debug-checkbox-text {
    color: var(--accent-secondary);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
}

.logo-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.logo-text h1 {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text .subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Main */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    animation: fadeIn 0.8s ease-out 0.2s both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Upload Section */
.upload-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.upload-zone {
    background: var(--bg-card);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    transform: scale(1);
}

.upload-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-glow), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-zone:hover {
    border-color: var(--accent-primary);
    background: var(--bg-hover);
}

.upload-zone:hover::before {
    opacity: 1;
}

/* Enhanced drag-over state */
.upload-zone.drag-over {
    border-color: var(--accent-primary);
    border-style: solid;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(129, 140, 248, 0.05));
    transform: scale(1.02);
    box-shadow: 
        0 0 0 4px rgba(99, 102, 241, 0.15),
        0 0 40px rgba(99, 102, 241, 0.2),
        inset 0 0 60px rgba(99, 102, 241, 0.05);
    animation: dragPulse 1.5s ease-in-out infinite;
}

.upload-zone.drag-over::before {
    opacity: 1;
    animation: glowPulse 1.5s ease-in-out infinite;
}

.upload-zone.drag-over .upload-icon {
    animation: bounceIcon 0.6s ease-in-out infinite;
}

.upload-zone.drag-over .upload-icon svg {
    color: var(--accent-primary);
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.upload-zone.drag-over h3 {
    color: var(--accent-secondary);
}

@keyframes dragPulse {
    0%, 100% {
        box-shadow: 
            0 0 0 4px rgba(99, 102, 241, 0.15),
            0 0 40px rgba(99, 102, 241, 0.2),
            inset 0 0 60px rgba(99, 102, 241, 0.05);
    }
    50% {
        box-shadow: 
            0 0 0 6px rgba(99, 102, 241, 0.25),
            0 0 60px rgba(99, 102, 241, 0.3),
            inset 0 0 80px rgba(99, 102, 241, 0.08);
    }
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
}

@keyframes bounceIcon {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

.upload-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.upload-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease, background 0.3s ease;
}

.upload-icon svg {
    width: 40px;
    height: 40px;
    color: var(--accent-secondary);
    transition: color 0.3s ease, filter 0.3s ease;
}

.upload-content h3 {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.upload-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* File Selected */
.file-selected {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-tertiary);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    font-weight: 500;
}

.file-info svg {
    width: 24px;
    height: 24px;
    color: var(--accent-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-primary:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.btn-remove {
    background: transparent;
    color: var(--text-muted);
    padding: 0.5rem;
}

.btn-remove:hover {
    color: var(--accent-error);
}

.btn-audit {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    font-size: 1rem;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-glow);
    width: 100%;
    max-width: 300px;
    margin: 0.5rem auto 0;
}

.btn-audit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 0 50px var(--accent-glow);
}

.btn-audit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* Sample Labels */
.sample-labels {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-subtle);
}

.sample-labels h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.sample-labels h4 svg {
    width: 18px;
    height: 18px;
    color: var(--accent-secondary);
}

.sample-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn-sample {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-subtle);
}

.btn-sample:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-sample.selected {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

/* Model Selector */
.model-selector {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.model-selector label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.model-toggle {
    display: flex;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 4px;
    gap: 4px;
    border: 1px solid var(--border-subtle);
}

.model-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.model-btn .model-name {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.model-btn .model-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.model-btn:hover {
    background: var(--bg-hover);
}

.model-btn:hover .model-name {
    color: var(--text-primary);
}

.model-btn.active {
    background: var(--accent-primary);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.model-btn.active .model-name {
    color: white;
}

.model-btn.active .model-desc {
    color: rgba(255, 255, 255, 0.7);
}

/* Method Selector */
.method-selector {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.method-selector label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.method-toggle {
    display: flex;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 4px;
    gap: 4px;
    border: 1px solid var(--border-subtle);
}

.method-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 180px;
}

.method-btn .method-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.method-btn .method-icon svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.method-btn .method-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.method-btn .method-name {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.method-btn .method-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.method-btn:hover {
    background: var(--bg-hover);
}

.method-btn:hover .method-name {
    color: var(--text-primary);
}

.method-btn:hover .method-icon {
    background: var(--bg-hover);
}

.method-btn:hover .method-icon svg {
    color: var(--accent-secondary);
}

.method-btn.active {
    background: linear-gradient(135deg, var(--accent-primary), #4f46e5);
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.35);
}

.method-btn.active .method-icon {
    background: rgba(255, 255, 255, 0.15);
}

.method-btn.active .method-icon svg {
    color: white;
}

.method-btn.active .method-name {
    color: white;
}

.method-btn.active .method-desc {
    color: rgba(255, 255, 255, 0.7);
}

/* Codified method gets a special indicator */
.method-btn[data-method="codified"].active {
    background: linear-gradient(135deg, var(--accent-success), #059669);
    box-shadow: 0 2px 12px rgba(16, 185, 129, 0.35);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 15, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.loading-content {
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 3px solid var(--bg-tertiary);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-content h3 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.loading-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.loading-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
    max-width: 200px;
    margin: 0 auto;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.step.active {
    color: var(--accent-secondary);
}

.step.completed {
    color: var(--accent-success);
}

.step-icon {
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

/* Spinning loader for active step */
.step.active .step-icon {
    position: relative;
}

.step.active .step-icon::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2px solid var(--bg-tertiary);
    border-top-color: var(--accent-secondary);
    border-radius: 50%;
    animation: stepSpin 0.8s linear infinite;
}

.step.active .step-icon-text {
    display: none;
}

@keyframes stepSpin {
    to { transform: rotate(360deg); }
}

/* Hide spinner when step is completed */
.step.completed .step-icon::before {
    display: none;
}

.step.completed .step-icon-text {
    display: inline;
}

/* Results Section */
.results-section {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-top-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

.results-grid {
    display: grid;
    grid-template-columns: 380px 1fr 1fr;
    gap: 1.5rem;
}

/* Large screens */
@media (min-width: 1600px) {
    .results-grid {
        grid-template-columns: 420px 1fr 1fr;
        gap: 2rem;
    }
}

/* Extra large screens */
@media (min-width: 1800px) {
    .results-grid {
        grid-template-columns: 480px 1fr 1fr;
    }
    
    .result-box-header h2 {
        font-size: 1.15rem;
    }
    
    .nutrition-table {
        font-size: 0.95rem;
    }
    
    .nutrition-table th,
    .nutrition-table td {
        padding: 0.85rem 1rem;
    }
}

@media (max-width: 1200px) {
    .results-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .nutrition-box {
        grid-column: 1 / -1;
        max-width: 450px;
        justify-self: center;
    }
}

@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .nutrition-box {
        max-width: 100%;
    }
}

.result-box {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    /* Prevent boxes from causing layout issues */
    min-width: 0;
    max-width: 100%;
}

.result-box:not(.collapsed) {
    flex: 1;
    /* Ensure content doesn't overflow the box */
    min-height: 0;
}

.result-box-header {
    display: flex;
    align-items: center;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-tertiary);
}

.result-box-header h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

.result-box-header h2 svg {
    width: 22px;
    height: 22px;
    color: var(--accent-secondary);
}

.auditing-box {
    border-color: rgba(16, 185, 129, 0.3);
}

.auditing-box .result-box-header {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), transparent);
}

.auditing-box .result-box-header h2 svg {
    color: var(--accent-success);
}

/* Non-conformity titles styling */
.auditing-box .result-box-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: var(--accent-error);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    color: var(--accent-error);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: none;
}

.auditing-box .result-box-content h3:first-child {
    margin-top: 0;
}

.auditing-box .result-box-content hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1.5rem 0;
}

/* ==========================================
   EXTRACTED INFO BOX
   ========================================== */

.extracted-info-box {
    border-color: rgba(99, 102, 241, 0.3);
}

.extracted-info-box .result-box-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), transparent);
}

.extracted-info-box .result-box-header h2 svg {
    color: var(--accent-primary);
}

.extracted-info-box .result-box-content {
    max-height: none;
    overflow-y: auto;
    padding: 1rem 1.5rem;
}

/* Extracted Sections */
.extracted-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
}

.extracted-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.extracted-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.extracted-section-title svg {
    width: 16px;
    height: 16px;
    color: var(--accent-warning);
}

/* Product Name Section */
.product-name-section {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), transparent);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.product-name-section .extracted-section-title {
    color: var(--accent-secondary);
    margin-bottom: 0.5rem;
}

.product-name-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin: 0;
}

/* Marketing Claims Section */
.marketing-claims-section {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), transparent);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    border: 1px solid rgba(245, 158, 11, 0.15);
}

.marketing-claims-section .extracted-section-title {
    color: var(--accent-warning);
    margin-bottom: 0.5rem;
}

.marketing-claims-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.marketing-claim-item {
    display: inline-flex;
    align-items: center;
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-warning);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.marketing-claim-item::before {
    content: '•';
    margin-right: 0.4rem;
    font-weight: bold;
}

/* Nutrition Section within Extracted Info */
.nutrition-section .extracted-section-title svg {
    color: var(--accent-warning);
}

/* Legacy nutrition-box support */
.nutrition-box {
    border-color: rgba(245, 158, 11, 0.3);
}

.nutrition-box .result-box-header {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), transparent);
}

.nutrition-box .result-box-header h2 svg {
    color: var(--accent-warning);
}

/* Nutrition Table */
.nutrition-box .result-box-content,
.extracted-info-box .nutrition-table-container {
    max-height: none;
    overflow-y: auto;
}

.nutrition-table-container {
    padding: 0;
    overflow-x: auto;
    min-width: 0;
}

.nutrition-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
    /* Prevent table from forcing container width */
    table-layout: auto;
}

.nutrition-table th,
.nutrition-table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.nutrition-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nutrition-table th:last-child,
.nutrition-table td:last-child {
    text-align: right;
}

.nutrition-table tbody tr {
    transition: background 0.15s ease;
}

.nutrition-table tbody tr:hover {
    background: var(--bg-hover);
}

.nutrition-table tbody td {
    color: var(--text-secondary);
}

.nutrition-table tbody td:first-child {
    color: var(--text-primary);
    font-weight: 500;
}

/* Indent levels for sub-items */
.nutrition-table tbody tr.indent-1 td:first-child {
    padding-left: 1.25rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.nutrition-table tbody tr.indent-1 td {
    font-size: 0.8rem;
}

.nutrition-table tbody tr.indent-2 td:first-child {
    padding-left: 2rem;
    font-weight: 400;
    color: var(--text-muted);
}

.nutrition-table tbody tr.indent-2 td {
    font-size: 0.75rem;
}

.nutrition-table .no-data {
    text-align: center !important;
    color: var(--text-muted);
    font-style: italic;
    padding: 1.5rem;
}

/* Ingredients Section */
.ingredients-section {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-subtle);
}

.ingredients-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ingredients-title svg {
    width: 16px;
    height: 16px;
    color: var(--accent-warning);
}

.ingredients-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.ingredient-item {
    position: relative;
    padding-left: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.ingredient-item::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-warning);
    font-weight: bold;
}

.ingredient-item.allergen {
    color: var(--text-primary);
    font-weight: 500;
}

.ingredient-item.allergen::before {
    color: var(--accent-error);
}

.result-box-content {
    padding: 1.5rem;
    line-height: 1.9;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    font-size: 1rem;
    /* Prevent content from breaking layout */
    min-width: 0;
    min-height: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Large screens - even taller content areas */
@media (min-width: 1600px) {
    .result-box-content {
        max-height: 80vh;
        padding: 2rem;
        font-size: 0.95rem;
    }
    
    .result-box-content p,
    .result-box-content ul,
    .result-box-content ol {
        font-size: 0.95rem;
    }
    
    .result-box-content h1 { font-size: 1.4rem; }
    .result-box-content h2 { font-size: 1.2rem; }
    .result-box-content h3 { font-size: 1.1rem; }
}

/* Markdown Styles */
.result-box-content h1,
.result-box-content h2,
.result-box-content h3,
.result-box-content h4 {
    color: var(--text-primary);
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.result-box-content h1:first-child,
.result-box-content h2:first-child,
.result-box-content h3:first-child {
    margin-top: 0;
}

.result-box-content h1 { font-size: 1.25rem; }
.result-box-content h2 { 
    font-size: 1.1rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-subtle);
}
.result-box-content h3 { font-size: 1rem; }
.result-box-content h4 { font-size: 0.95rem; }

.result-box-content p {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.result-box-content ul,
.result-box-content ol {
    margin: 0.5rem 0 0.75rem 1.25rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.result-box-content li {
    margin-bottom: 0.35rem;
}

.result-box-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.result-box-content code {
    font-family: var(--font-mono);
    background: var(--bg-tertiary);
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    font-size: 0.8em;
    color: var(--accent-secondary);
}

.result-box-content pre {
    background: var(--bg-tertiary);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 0.75rem 0;
    font-size: 0.85rem;
}

.result-box-content pre code {
    background: none;
    padding: 0;
}

.result-box-content blockquote {
    border-left: 3px solid var(--accent-primary);
    padding-left: 0.75rem;
    margin: 0.75rem 0;
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.9rem;
}

.result-box-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: 0.85rem;
}

.result-box-content th,
.result-box-content td {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.result-box-content th {
    background: var(--bg-tertiary);
    font-weight: 600;
}

.result-box-content hr {
    border: none;
    border-top: 1px solid var(--border-subtle);
    margin: 1.5rem 0;
}

/* Custom scrollbar */
.result-box-content::-webkit-scrollbar {
    width: 6px;
}

.result-box-content::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.result-box-content::-webkit-scrollbar-thumb {
    background: var(--bg-hover);
    border-radius: 3px;
}

.result-box-content::-webkit-scrollbar-thumb:hover {
    background: var(--border-color);
}

/* Footer */
footer {
    margin-top: auto;
    padding-top: 2rem;
    text-align: center;
}

footer p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==========================================
   SPLIT VIEW LAYOUT
   ========================================== */

.results-split-view {
    display: grid;
    /* Use fixed minimum widths to prevent columns from collapsing */
    grid-template-columns: minmax(280px, 1fr) minmax(300px, 1.2fr) minmax(280px, 1fr);
    gap: 1.5rem;
    align-items: stretch;
    width: 100%;
}

/* Left Panel: Extracted Info - ISOLATED */
.results-left-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0; /* Prevent grid blowout */
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.5rem;
}

.results-left-panel::-webkit-scrollbar {
    width: 6px;
}

.results-left-panel::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.results-left-panel::-webkit-scrollbar-thumb {
    background: var(--bg-hover);
    border-radius: 3px;
}

/* Middle Panel: Image Viewer - ISOLATED */
.results-middle-panel {
    min-width: 0; /* Prevent grid blowout */
    max-height: calc(50vh - 70px); /* Half the height */
    overflow: hidden; /* Contain the image viewer */
    position: sticky;
    top: 1rem;
}

/* Right Panel: Findings & Recommendations - ISOLATED */
.results-right-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0; /* Prevent grid blowout */
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.5rem;
}

.results-right-panel::-webkit-scrollbar {
    width: 6px;
}

.results-right-panel::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.results-right-panel::-webkit-scrollbar-thumb {
    background: var(--bg-hover);
    border-radius: 3px;
}

/* Responsive split view */
@media (max-width: 1400px) {
    .results-split-view {
        grid-template-columns: 1fr 1fr;
    }
    
    .results-middle-panel {
        grid-column: 1 / -1;
        order: -1;
        max-height: 50vh;
        position: relative;
        top: 0;
    }
}

@media (max-width: 900px) {
    .results-split-view {
        grid-template-columns: 1fr;
    }
    
    .results-left-panel,
    .results-right-panel {
        max-height: none;
        overflow-y: visible;
    }
    
    .results-middle-panel {
        max-height: 45vh;
    }
}

/* ==========================================
   FINDINGS BOX
   ========================================== */

.findings-box {
    border-color: rgba(239, 68, 68, 0.3);
}

.findings-box .result-box-header {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), transparent);
}

.findings-box .result-box-header h2 svg {
    color: var(--accent-error);
}

.findings-count {
    background: var(--accent-error);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    margin-left: 0.5rem;
}

.findings-list-container {
    padding: 0 !important;
    max-height: none;
    overflow-y: auto;
    flex: 1;
}

.finding-item {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.finding-item:last-child {
    border-bottom: none;
}

.finding-item:hover {
    background: var(--bg-hover);
}

.finding-item.active {
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid var(--accent-error);
}

.finding-item-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.finding-number {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: var(--accent-error);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.finding-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.05rem;
    line-height: 1.5;
}

.finding-article {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent-secondary);
    background: var(--bg-tertiary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-left: 2.5rem;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.finding-details {
    margin-left: 2.5rem;
    font-size: 1rem;
    color: var(--text-secondary);
    display: none;
    line-height: 1.7;
}

.finding-item.expanded .finding-details {
    display: block;
}

.finding-detail-row {
    margin-bottom: 0.5rem;
}

.finding-detail-row strong {
    color: var(--text-muted);
    font-weight: 500;
}

.finding-severity {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}

.finding-severity.major {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-error);
}

.finding-severity.medium {
    background: rgba(245, 158, 11, 0.2);
    color: var(--accent-warning);
}

.finding-severity.minor {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-success);
}

.finding-location-hint {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    margin-left: 2rem;
}

.finding-location-hint svg {
    width: 14px;
    height: 14px;
}

/* Warning Notice for advisory checks */
.finding-warning-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.75rem;
    margin-left: 2.5rem;
    padding: 0.6rem 0.8rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--accent-warning);
    line-height: 1.4;
}

.finding-warning-notice svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 1px;
}

.finding-item.warning-check .finding-number {
    background: var(--accent-warning);
}

.finding-item.warning-check.active {
    background: rgba(245, 158, 11, 0.1);
    border-left-color: var(--accent-warning);
}

/* ==========================================
   RECOMMENDATIONS BOX
   ========================================== */

.recommendations-box {
    border-color: rgba(16, 185, 129, 0.3);
}

.recommendations-box .result-box-header {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), transparent);
}

.recommendations-box .result-box-header h2 svg {
    color: var(--accent-success);
}

.recommendations-box .result-box-content {
    max-height: none;
    overflow-y: auto;
}

.recommendation-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.recommendation-item:last-child {
    border-bottom: none;
}

.recommendation-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--accent-success);
}

.recommendation-text {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

/* ==========================================
   COLLAPSIBLE SECTIONS
   ========================================== */

.collapsible-header {
    cursor: pointer;
    justify-content: space-between;
    transition: background 0.2s ease;
}

.collapsible-header:hover {
    background: var(--bg-hover);
}

.collapse-icon {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.result-box.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.result-box.collapsed .collapsible-content {
    display: none;
}

/* ==========================================
   IMAGE VIEWER
   ========================================== */

.image-viewer-container {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Prevent container from affecting parent grid */
    min-width: 0;
    max-width: 100%;
}

.image-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-tertiary);
}

.image-viewer-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
}

.image-viewer-header h2 svg {
    width: 18px;
    height: 18px;
    color: var(--accent-secondary);
}

.image-viewer-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.4rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.btn-icon:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-icon svg {
    width: 16px;
    height: 16px;
}

.zoom-level {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 50px;
    text-align: center;
}

.image-viewer-wrapper {
    flex: 1;
    overflow: auto; /* Allows both x and y scrolling */
    overflow-x: auto;
    overflow-y: auto;
    background: var(--bg-secondary);
    /* Use block display to allow the inner container to define scrollable area */
    display: block;
    /* Prevent wrapper from affecting grid layout */
    min-width: 0;
    min-height: 0;
}

.image-container {
    position: relative;
    display: inline-block;
    transform-origin: top left;
    transition: transform 0.2s ease;
    /* Padding is set dynamically via JS based on zoom level */
    /* This ensures any part of the zoomed image can be scrolled to center */
    padding: 50vh 50vw; /* Initial fallback, overridden by JS */
    margin: 0;
    box-sizing: content-box;
}

.image-container img {
    display: block;
    /* Let the image display at natural size, controlled by zoom */
    width: auto;
    height: auto;
    /* Remove min-width constraints that break the grid */
    max-width: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

/* ==========================================
   ANNOTATION OVERLAY
   ========================================== */

.annotation-overlay {
    position: absolute;
    top: 0;
    left: 0;
    /* Width and height are set dynamically via JS to match image natural dimensions */
    /* The SVG scales with the image container via CSS transform */
    pointer-events: none;
    overflow: visible;
    /* Ensure SVG doesn't create its own stacking context issues */
    z-index: 10;
}

.annotation-marker {
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.2s ease;
    transform-box: fill-box;
    transform-origin: center center;
}

.annotation-marker circle {
    fill: var(--accent-error);
    stroke: white;
    /* stroke-width set dynamically in JS based on image size */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.annotation-marker text {
    fill: white;
    /* font-size set dynamically in JS based on image size */
    font-weight: 600;
    font-family: var(--font-sans);
    text-anchor: middle;
    dominant-baseline: central;
}

.annotation-marker:hover circle {
    fill: var(--accent-primary);
}

.annotation-marker:hover {
    transform: scale(1.2);
    transform-origin: center;
    transform-box: fill-box;
}

.annotation-marker.active circle {
    fill: var(--accent-primary);
    stroke: var(--accent-secondary);
    stroke-width: 3;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { 
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    }
    50% { 
        filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.6));
    }
}

.annotation-highlight {
    fill: rgba(239, 68, 68, 0.2);
    stroke: var(--accent-error);
    /* stroke-width, stroke-dasharray, rx, ry are set dynamically in JS based on image size */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.annotation-highlight.visible {
    opacity: 1;
}

.annotation-line {
    stroke: var(--accent-error);
    stroke-width: 2;
    stroke-dasharray: 8 4;
    fill: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.annotation-line.visible {
    opacity: 1;
    animation: dash 0.5s linear forwards;
}

@keyframes dash {
    from {
        stroke-dashoffset: 100;
    }
    to {
        stroke-dashoffset: 0;
    }
}

/* Severity-based marker colors */
.annotation-marker.severity-major circle {
    fill: var(--accent-error);
}

.annotation-marker.severity-medium circle {
    fill: var(--accent-warning);
}

.annotation-marker.severity-minor circle {
    fill: var(--accent-success);
}

/* No findings state */
.no-findings {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

/* ==========================================
   MANUAL CHECKS BOX
   ========================================== */

.manual-checks-box {
    margin-top: 1.5rem;
    border-color: rgba(56, 189, 248, 0.3);
}

.manual-checks-box .result-box-header {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), transparent);
}

.manual-checks-box .result-box-header h2 svg {
    color: #38bdf8;
}

.manual-checks-intro {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.manual-check-item {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-subtle);
    transition: border-color 0.2s ease;
}

.manual-check-item:last-child {
    margin-bottom: 0;
}

.manual-check-item:hover {
    border-color: rgba(56, 189, 248, 0.4);
}

.manual-check-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.manual-check-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(56, 189, 248, 0.15);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.manual-check-icon svg {
    width: 20px;
    height: 20px;
    color: #38bdf8;
}

.manual-check-title {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-primary);
    flex: 1;
}

.manual-check-article {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.manual-check-content {
    margin-left: calc(36px + 0.75rem);
}

.manual-check-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.manual-check-requirements {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.manual-check-requirements li {
    position: relative;
    padding: 0.6rem 0.75rem 0.6rem 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    border-left: 3px solid #38bdf8;
}

.manual-check-requirements li:last-child {
    margin-bottom: 0;
}

.manual-check-requirements li strong {
    color: var(--text-primary);
    font-weight: 500;
}

.manual-check-requirements .highlight-value {
    color: #38bdf8;
    font-weight: 700;
    font-family: var(--font-mono);
    font-size: 1rem;
}

.manual-check-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.manual-check-note svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: #38bdf8;
    margin-top: 1px;
}

/* Dynamic manual checks (rendered from API) */
.manual-check-item.dynamic-check {
    border-color: rgba(251, 191, 36, 0.3);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.05), transparent);
}

.manual-check-item.dynamic-check:hover {
    border-color: rgba(251, 191, 36, 0.5);
}

.manual-check-item.dynamic-check .manual-check-icon svg {
    color: #fbbf24;
}

.manual-check-item.dynamic-check .manual-check-article {
    color: #fbbf24;
}

.manual-check-found-items {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.manual-check-found-items strong {
    color: #fbbf24;
    font-weight: 600;
}

.manual-check-action {
    background: var(--bg-secondary);
    border-left: 3px solid #fbbf24;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.manual-check-action strong {
    color: var(--text-primary);
    font-weight: 600;
}

.manual-check-example {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* ==========================================
   FALLBACK AUDITING BOX
   ========================================== */

.fallback-auditing {
    margin-top: 1.5rem;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }
    
    .logo-text h1 {
        font-size: 1.25rem;
    }
    
    .upload-zone {
        padding: 2rem 1rem;
    }
    
    .results-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .results-content {
        padding: 1rem;
    }
    
    .results-split-view {
        grid-template-columns: 1fr;
    }
    
    .results-left-panel {
        max-height: none;
        overflow-y: visible;
    }
    
    .results-right-panel {
        position: relative;
        max-height: 40vh;
    }
    
    .image-viewer-wrapper {
        min-height: 250px;
    }
}

