/* Ensure proper mobile viewport handling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    touch-action: manipulation; /* Improve touch responsiveness */
    scroll-behavior: smooth; /* Smooth scrolling */
}

/* Prevent zoom on input focus for iOS Safari */
@media screen and (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important; /* Prevent zoom on focus */
    }
}

:root {
    /* Clean black and off-white color palette */
    --background: 0 0% 98%;
    --foreground: 0 0% 9%;
    --card: 0 0% 100%;
    --card-foreground: 0 0% 9%;
    --popover: 0 0% 100%;
    --popover-foreground: 0 0% 9%;
    --primary: 0 0% 9%;
    --primary-foreground: 0 0% 98%;
    --secondary: 0 0% 96%;
    --secondary-foreground: 0 0% 9%;
    --muted: 0 0% 96%;
    --muted-foreground: 0 0% 45%;
    --accent: 0 0% 96%;
    --accent-foreground: 0 0% 9%;
    --destructive: 0 84% 60%;
    --destructive-foreground: 0 0% 98%;
    --border: 0 0% 92%;
    --input: 0 0% 100%;
    --ring: 0 0% 9%;
    --radius: clamp(4px, 1vw, 8px);
    
    /* Fluid typography scale using clamp() for proportional sizing */
    --font-size-xs: clamp(0.7rem, 1.8vw, 0.75rem);
    --font-size-sm: clamp(0.8rem, 2.2vw, 0.875rem);
    --font-size-base: clamp(0.9rem, 2.5vw, 1rem);
    --font-size-lg: clamp(1rem, 3vw, 1.125rem);
    --font-size-xl: clamp(1.1rem, 3.5vw, 1.25rem);
    --font-size-2xl: clamp(1.3rem, 4vw, 1.5rem);
    --font-size-3xl: clamp(1.6rem, 5vw, 1.875rem);
    --font-size-4xl: clamp(1.9rem, 6vw, 2.25rem);
    
    /* Typography weights */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Line heights */
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.625;
    
    /* Proportional spacing scale using clamp() */
    --space-1: clamp(0.2rem, 0.5vw, 0.25rem);
    --space-2: clamp(0.4rem, 1vw, 0.5rem);
    --space-3: clamp(0.6rem, 1.5vw, 0.75rem);
    --space-4: clamp(0.8rem, 2vw, 1rem);
    --space-6: clamp(1.2rem, 3vw, 1.5rem);
    --space-8: clamp(1.6rem, 4vw, 2rem);
    --space-12: clamp(2.4rem, 6vw, 3rem);
    
    /* Proportional component sizes */
    --icon-size-sm: clamp(14px, 3vw, 18px);
    --icon-size-base: clamp(18px, 4vw, 24px);
    --icon-size-lg: clamp(32px, 8vw, 48px);
    
    /* Touch target sizes (minimum 44px, proportional scaling above) */
    --touch-target-sm: max(40px, clamp(40px, 8vw, 48px));
    --touch-target-base: max(44px, clamp(44px, 9vw, 56px));
    --touch-target-lg: max(48px, clamp(48px, 10vw, 64px));
    
    /* Container and component sizing */
    --container-padding: clamp(16px, 4vw, 48px);
    --card-padding: clamp(12px, 3vw, 24px);
    --card-gap: clamp(8px, 2vw, 16px);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: var(--line-height-normal);
    color: hsl(var(--foreground));
    background: hsl(var(--background));
    min-height: 100vh;
    font-size: var(--font-size-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%; /* Prevent text scaling on iOS */
    -ms-text-size-adjust: 100%;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
    min-height: 100vh;
    width: 100%;
}

/* Remove the fixed breakpoint and let the container scale fluidly */

/* Card styles with proportional sizing */
.card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: var(--card-padding);
    margin-bottom: var(--card-gap);
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px 0 rgb(0 0 0 / 0.06);
    width: 100%;
}

.card:hover {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -1px rgb(0 0 0 / 0.06);
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.card-header-content {
    flex: 1;
    min-width: 200px;
}

.card-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: hsl(var(--foreground));
    margin-bottom: var(--space-2);
    line-height: var(--line-height-tight);
}

.card-description {
    font-size: var(--font-size-sm);
    color: hsl(var(--muted-foreground));
    line-height: var(--line-height-normal);
}

/* Special card types */
.highlight-card {
    border-color: hsl(var(--primary));
    box-shadow: 0 1px 3px 0 hsl(var(--primary) / 0.1), 0 1px 2px 0 rgb(0 0 0 / 0.06);
}

.secondary-card {
    background: hsl(var(--card)); /* Same as regular cards */
    border-color: hsl(var(--border));
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.08), 0 1px 2px 0 rgb(0 0 0 / 0.06); /* Lighter subtle shadow */
}

.tertiary-card {
    background: hsl(var(--card)); /* Same as regular cards */
    border-color: hsl(var(--border));
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); /* Very light shadow */
}

/* Form styles */
.form-group {
    margin-bottom: var(--space-4);
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: hsl(var(--foreground));
}

.form-input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    font-size: var(--font-size-sm);
    background: hsl(var(--input));
    color: hsl(var(--foreground));
    transition: all 0.2s ease-in-out;
    position: relative;
}

.form-input:focus {
    outline: none;
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.form-input::placeholder {
    color: hsl(var(--muted-foreground));
}

/* Input Validation States */
.form-input.valid {
    border-color: hsl(var(--primary));
    padding-right: calc(var(--space-4) + 24px);
}

.form-input.invalid {
    border-color: hsl(var(--destructive));
    padding-right: calc(var(--space-4) + 24px);
}

.form-input.loading {
    padding-right: calc(var(--space-4) + 24px);
}

/* Validation Icons */
.validation-icon {
    position: absolute;
    right: var(--space-3);
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.form-group.valid .validation-icon.success {
    opacity: 1;
    color: hsl(var(--primary));
}

.form-group.invalid .validation-icon.error {
    opacity: 1;
    color: hsl(var(--destructive));
}

.form-group.loading .validation-icon.loading {
    opacity: 1;
    color: hsl(var(--muted-foreground));
    animation: spin 1s linear infinite;
}

/* Validation Messages */
.validation-message {
    margin-top: var(--space-2);
    font-size: var(--font-size-xs);
    opacity: 0;
    transform: translateY(-4px);
    transition: all 0.2s ease-in-out;
}

.validation-message.show {
    opacity: 1;
    transform: translateY(0);
}

.validation-message.success {
    color: hsl(var(--primary));
}

.validation-message.error {
    color: hsl(var(--destructive));
}

/* Input Suggestions */
.input-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.2s ease-in-out;
}

.input-suggestions.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.suggestion-item {
    padding: var(--space-2) var(--space-3);
    cursor: pointer;
    font-size: var(--font-size-sm);
    transition: background-color 0.2s ease-in-out;
}

.suggestion-item:hover,
.suggestion-item.highlighted {
    background: hsl(var(--muted));
}

/* Drag and Drop Upload */
.upload-zone {
    border: 2px dashed hsl(var(--border));
    border-radius: var(--radius);
    padding: var(--space-8);
    text-align: center;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    position: relative;
    background: hsl(var(--background));
    margin-bottom: var(--space-4);
}

.upload-zone:hover {
    border-color: hsl(var(--primary));
    background: hsl(var(--primary) / 0.02);
}

.upload-zone.drag-over {
    border-color: hsl(var(--primary));
    background: hsl(var(--primary) / 0.05);
    transform: scale(1.02);
}

.upload-zone.processing {
    pointer-events: none;
    opacity: 0.7;
}

.upload-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-3);
    color: hsl(var(--muted-foreground));
    transition: color 0.3s ease-in-out;
}

.upload-zone:hover .upload-icon,
.upload-zone.drag-over .upload-icon {
    color: hsl(var(--primary));
}

.upload-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-2);
    color: hsl(var(--foreground));
}

.upload-subtitle {
    font-size: var(--font-size-sm);
    color: hsl(var(--muted-foreground));
    margin-bottom: var(--space-4);
}

.upload-formats {
    font-size: var(--font-size-xs);
    color: hsl(var(--muted-foreground));
    margin-top: var(--space-3);
}

.upload-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Image Preview */
.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--space-3);
    margin-top: var(--space-4);
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--background));
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-remove {
    position: absolute;
    top: var(--space-1);
    right: var(--space-1);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.preview-item:hover .preview-remove {
    opacity: 1;
}

.preview-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: var(--space-2);
    font-size: var(--font-size-xs);
    transform: translateY(100%);
    transition: transform 0.2s ease-in-out;
}

.preview-item:hover .preview-overlay {
    transform: translateY(0);
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    margin-top: var(--space-4);
    flex-wrap: wrap;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    background: hsl(var(--card));
    color: hsl(var(--foreground));
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.quick-action:hover {
    border-color: hsl(var(--primary));
    background: hsl(var(--primary) / 0.05);
}

.quick-action-icon {
    width: 16px;
    height: 16px;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, 
        hsl(var(--muted)) 25%, 
        hsl(var(--background)) 50%, 
        hsl(var(--muted)) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--radius);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1em;
    margin-bottom: var(--space-2);
}

.skeleton-text:last-child {
    margin-bottom: 0;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

.skeleton-text.long {
    width: 100%;
}

.skeleton-image {
    width: 100%;
    height: 200px;
}

.skeleton-button {
    height: 40px;
    width: 120px;
}

.skeleton-card {
    padding: var(--space-4);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    margin-bottom: var(--space-4);
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-4);
}

/* Fade-in Animation for Content */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in.delay-1 { animation-delay: 0.1s; }
.fade-in.delay-2 { animation-delay: 0.2s; }
.fade-in.delay-3 { animation-delay: 0.3s; }

/* Content groups */
.content-group {
    margin-bottom: var(--space-8);
}

.secondary-group {
    border-radius: var(--radius);
    padding: var(--space-6);
    border: 1px solid hsl(var(--border) / 0.5); /* Subtle border instead of grey background */
}
.tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
    font-size: 10px;
    font-weight: var(--font-weight-bold);
    margin-left: var(--space-2);
    cursor: help;
    position: relative;
}

.tooltip::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: hsl(var(--foreground));
    color: hsl(var(--background));
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-normal);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-in-out;
    pointer-events: none;
    margin-bottom: var(--space-2);
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Button styles with proportional sizing */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    border: none;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    min-height: var(--touch-target-base);
    width: 100%;
    max-width: fit-content;
}

.button.loading {
    pointer-events: none;
}

.button.loading .button-text {
    opacity: 0;
}

.button.loading .button-icon {
    opacity: 0;
}

.button-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: var(--icon-size-base);
    height: var(--icon-size-base);
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
}

.button.loading .button-spinner {
    opacity: 1;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Progress animation */
@keyframes progress-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.step.processing {
    animation: progress-pulse 2s ease-in-out infinite;
}

.step.processing .step-number {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    animation: spin 2s linear infinite;
}

/* Smooth transitions for all interactive elements */
.card, .step, .image-item, .form-input, .status-display {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.button-primary {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px 0 rgb(0 0 0 / 0.06);
}

.button-primary:hover {
    background: hsl(var(--primary) / 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -1px rgb(0 0 0 / 0.06);
}

.button-secondary {
    background: hsl(var(--card));
    color: hsl(var(--foreground));
    border: 1px solid hsl(var(--border));
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.button-secondary:hover {
    background: hsl(var(--muted) / 0.3);
    border-color: hsl(var(--border));
    transform: translateY(-1px);
    box-shadow: 0 2px 4px 0 rgb(0 0 0 / 0.1);
}

.button-large {
    padding: var(--space-4) var(--space-8);
    font-size: var(--font-size-base);
    min-height: var(--touch-target-lg);
}

.button-small {
    padding: var(--space-2) var(--space-4);
    font-size: var(--font-size-xs);
    min-height: var(--touch-target-sm);
}

.button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.button-group {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    width: 100%;
}

/* Form styles with proportional sizing */
.form-group {
    margin-bottom: var(--space-4);
    position: relative;
    width: 100%;
}

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: hsl(var(--foreground));
}

.form-input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    font-size: var(--font-size-base);
    background: hsl(var(--input));
    color: hsl(var(--foreground));
    transition: all 0.2s ease-in-out;
    position: relative;
    min-height: var(--touch-target-base);
    box-sizing: border-box;
}

@media (max-width: 640px) {
    .button-group {
        flex-direction: column;
    }
    
    .button {
        width: 100%;
    }
}

/* Utility styles */
.hidden {
    display: none;
}

/* Quick test card with proportional sizing */
.quick-test-card {
    position: relative;
    padding: var(--card-padding);
}

.quick-test-card .card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}

.quick-test-header-left {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    flex: 1;
    min-width: 0;
}

.quick-test-icon {
    width: var(--icon-size-lg);
    height: var(--icon-size-lg);
    background: hsl(var(--primary) / 0.1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: hsl(var(--primary));
    flex-shrink: 0;
}

.quick-test-content {
    flex: 1;
    min-width: 0;
}

.quick-test-content .card-title {
    margin-bottom: var(--space-2);
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
}

.quick-test-content .card-description {
    margin-bottom: 0;
    color: hsl(var(--muted-foreground));
    line-height: var(--line-height-relaxed);
}

.quick-test-button-wrapper {
    display: flex;
    align-items: flex-start;
    flex-shrink: 0;
}

.quick-test-section {
    display: none; /* Hide the old button section */
}

/* Features section for quick test card */
.quick-test-features {
    display: flex;
    gap: var(--space-6);
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid hsl(var(--border));
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    color: hsl(var(--muted-foreground));
}

.feature-item svg {
    color: hsl(var(--primary));
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .quick-test-features {
        flex-direction: column;
        gap: var(--space-3);
    }
}

/* Progress steps with proportional sizing */
.progress-steps {
    display: grid;
    gap: var(--space-3);
    width: 100%;
}

.step {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    background: hsl(var(--card));
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.02);
    min-height: var(--touch-target-lg);
    width: 100%;
}

.step.active {
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 1px hsl(var(--primary) / 0.1), 0 1px 3px 0 rgb(0 0 0 / 0.05);
}

.step.completed {
    border-color: hsl(var(--primary) / 0.6);
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.03);
}

.step-number {
    width: clamp(28px, 6vw, 36px);
    height: clamp(28px, 6vw, 36px);
    border-radius: 50%;
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-sm);
    flex-shrink: 0;
}

.step.active .step-number,
.step.completed .step-number {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.step-content {
    flex: 1;
    min-width: 0;
}

.step-title {
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-1);
    line-height: var(--line-height-tight);
}

.step-description {
    font-size: var(--font-size-xs);
    color: hsl(var(--muted-foreground));
    line-height: var(--line-height-normal);
}

.step-status {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    color: hsl(var(--muted-foreground));
    padding: var(--space-1) var(--space-3);
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) / 2);
    min-width: clamp(70px, 15vw, 90px);
    text-align: center;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Server Status Panel Styles */
.server-status-display {
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: var(--card-padding);
    margin-top: var(--space-4);
    transition: all 0.2s ease-in-out;
}

.server-status-main {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.server-status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    border-radius: 50%;
    background: hsl(var(--muted));
    transition: all 0.3s ease-in-out;
    position: relative;
}

.server-status-indicator.online {
    background: hsl(142 76% 36%);
    box-shadow: 0 0 16px hsla(142, 76%, 36%, 0.3);
}

.server-status-indicator.offline {
    background: hsl(var(--destructive));
    box-shadow: 0 0 16px hsla(var(--destructive), 0.3);
}

.server-status-indicator.checking {
    background: hsl(43 96% 56%);
    box-shadow: 0 0 16px hsla(43, 96%, 56%, 0.3);
}

.server-status-indicator.partial {
    background: hsl(25 95% 53%);
    box-shadow: 0 0 16px hsla(25, 95%, 53%, 0.3);
}

.indicator-dot {
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    opacity: 0.9;
    transition: all 0.3s ease-in-out;
}

.server-status-indicator.checking .indicator-dot {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

.server-status-text {
    flex: 1;
    min-width: 0;
}

.server-status-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: hsl(var(--foreground));
    margin-bottom: var(--space-1);
}

.server-status-message {
    font-size: var(--font-size-sm);
    color: hsl(var(--muted-foreground));
    margin-bottom: var(--space-2);
    line-height: var(--line-height-relaxed);
}

.server-status-timestamp {
    font-size: var(--font-size-xs);
    color: hsl(var(--muted-foreground));
    font-style: italic;
}

.status-controls {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-shrink: 0;
}

.auto-refresh-toggle {
    display: flex;
    align-items: center;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    font-size: var(--font-size-sm);
    color: hsl(var(--muted-foreground));
    user-select: none;
}

.toggle-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle-slider {
    position: relative;
    width: 36px;
    height: 20px;
    background: hsl(var(--muted));
    border-radius: 10px;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.toggle-input:checked + .toggle-slider {
    background: hsl(var(--primary));
}

.toggle-input:checked + .toggle-slider::before {
    transform: translateX(16px);
}

.server-metrics {
    border-top: 1px solid hsl(var(--border));
    padding-top: var(--space-4);
    transition: all 0.3s ease-in-out;
}

.server-metrics.hidden {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    margin: 0;
    border: none;
    padding: 0;
}

/* Primary Metrics Grid */
.metrics-grid.primary-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

/* Metric Cards */
.metric-card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: var(--space-4);
    transition: all 0.2s ease;
    position: relative;
}

.metric-card:hover {
    border-color: hsl(var(--primary) / 0.2);
    box-shadow: 0 2px 8px hsl(var(--foreground) / 0.08);
    transform: translateY(-1px);
}

.metric-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.metric-icon {
    color: hsl(var(--muted-foreground));
    flex-shrink: 0;
}

.metric-card .metric-label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: hsl(var(--muted-foreground));
}

.metric-card .metric-value {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: hsl(var(--foreground));
    margin-bottom: var(--space-1);
    font-family: 'JetBrains Mono', monospace;
}

.metric-card .metric-value.success {
    color: #22c55e;
}

.metric-card .metric-value.warning {
    color: #f59e0b;
}

.metric-card .metric-value.error {
    color: #ef4444;
}

.metric-subtitle {
    font-size: var(--font-size-xs);
    color: hsl(var(--muted-foreground));
    font-weight: var(--font-weight-normal);
}

/* Progress Bars */
/* Secondary Metrics Grid (for basic server metrics) */
.metrics-grid.secondary-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-3);
}

/* Legacy Metrics Grid Support */
.metrics-grid:not(.primary-metrics):not(.secondary-metrics) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-4);
}

.metric-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-3);
    background: hsl(var(--muted));
    border-radius: var(--radius);
    transition: all 0.2s ease-in-out;
}

.metric-item:hover {
    background: hsl(var(--accent));
    transform: translateY(-1px);
}

.metric-label {
    font-size: var(--font-size-xs);
    color: hsl(var(--muted-foreground));
    margin-bottom: var(--space-1);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.metric-value {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: hsl(var(--foreground));
    font-family: 'JetBrains Mono', monospace;
}

.metric-value.error {
    color: hsl(var(--destructive));
}

.metric-value.warning {
    color: hsl(25 95% 53%);
}

.metric-value.success {
    color: hsl(142 76% 36%);
}

/* Mobile responsiveness for server status */
@media (max-width: 768px) {
    .card-header {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-3);
    }
    
    .status-controls {
        justify-content: space-between;
        gap: var(--space-2);
    }
    
    .auto-refresh-toggle .toggle-text {
        display: none;
    }
    
    .server-status-main {
        flex-direction: column;
        gap: var(--space-3);
    }
    
    .server-status-indicator {
        align-self: flex-start;
    }
    
    .metrics-grid:not(.primary-metrics):not(.secondary-metrics) {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
    }
    
    .metrics-grid.primary-metrics {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: var(--space-3);
    }
    
    .metrics-grid.secondary-metrics {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: var(--space-2);
    }
    
    .metric-card {
        padding: var(--space-3);
    }
    
    .metric-card .metric-value {
        font-size: var(--font-size-xl);
    }
    
    .metric-item {
        padding: var(--space-2);
    }
}

/* Very Small Screens */
@media (max-width: 480px) {
    .metrics-grid.primary-metrics,
    .metrics-grid.secondary-metrics {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: var(--space-2);
    }
    
    .metric-card {
        padding: var(--space-2);
    }
    
    .metric-header {
        margin-bottom: var(--space-2);
    }
    
    .metric-card .metric-value {
        font-size: var(--font-size-lg);
    }
}

/* Status display with proportional sizing */
.status-display {
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: var(--card-padding);
    background: hsl(var(--card));
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.02);
    min-height: clamp(100px, 20vw, 140px);
    width: 100%;
}

.status-main {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
    min-height: clamp(40px, 8vw, 50px);
}

.status-indicator {
    width: clamp(10px, 2.5vw, 14px);
    height: clamp(10px, 2.5vw, 14px);
    border-radius: 50%;
    background: hsl(var(--muted-foreground));
    flex-shrink: 0;
    transition: background-color 0.3s ease-in-out;
}

.status-indicator.processing {
    background: hsl(var(--primary));
}

.status-indicator.success {
    background: hsl(var(--primary));
}

.status-indicator.error {
    background: hsl(var(--destructive));
}

.status-indicator.waiting {
    background: hsl(var(--muted-foreground));
}

.status-text {
    flex: 1;
    min-width: 0;
}

.status-title {
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-1);
    line-height: var(--line-height-tight);
    font-size: var(--font-size-base);
}

.status-message {
    font-size: var(--font-size-sm);
    color: hsl(var(--muted-foreground));
    line-height: var(--line-height-normal);
}

.status-details {
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: var(--space-4);
    margin-top: var(--space-4);
    min-height: clamp(50px, 10vw, 70px);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-2) 0;
    border-bottom: 1px solid hsl(var(--border));
    min-height: clamp(36px, 7vw, 44px);
    gap: var(--space-2);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-sm);
    flex-shrink: 0;
    min-width: clamp(100px, 20vw, 140px);
}

.detail-value {
    font-size: var(--font-size-sm);
    color: hsl(var(--muted-foreground));
    font-family: 'JetBrains Mono', monospace;
    text-align: right;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Results display */
.results-display {
    min-height: 200px;
    padding: var(--space-4);
}

.results-display.has-results {
    display: block;
    min-height: auto;
}

.results-display.empty {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Smooth transitions for results section */
.card.secondary-card {
    transition: opacity 0.3s ease-in-out;
}

/* Simple empty state */
.empty-state {
    text-align: center;
    color: hsl(var(--muted-foreground));
    max-width: 280px;
}

.empty-title {
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-2);
    color: hsl(var(--foreground));
}

.empty-message {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-4);
}

.empty-cta {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border: none;
    border-radius: var(--radius);
    padding: var(--space-2) var(--space-4);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: opacity 0.2s ease-in-out;
}

.empty-cta:hover {
    opacity: 0.9;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
    margin-top: var(--space-4);
}

.image-item {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: var(--space-4);
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    transition: all 0.2s ease-in-out;
}

.image-item:hover {
    box-shadow: 0 4px 8px 0 rgb(0 0 0 / 0.12);
    transform: translateY(-2px);
}

.image-item h4 {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-3);
    color: hsl(var(--foreground));
    text-align: center;
}

/* Before/After Comparison Layout */
.image-comparison {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.before-after {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    align-items: start;
}

.image-container {
    text-align: center;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: var(--space-4);
    transition: all 0.2s ease-in-out;
}

.image-container:hover {
    box-shadow: 0 4px 12px 0 rgb(0 0 0 / 0.15);
    transform: translateY(-2px);
}

.image-container label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: hsl(var(--foreground));
    margin-bottom: var(--space-3);
    padding: var(--space-2) var(--space-3);
    background: hsl(var(--secondary));
    border-radius: calc(var(--radius) / 2);
}

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: var(--space-8) var(--space-4);
    color: hsl(var(--muted-foreground));
}

.empty-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: hsl(var(--foreground));
    margin-bottom: var(--space-2);
}

.empty-message {
    font-size: var(--font-size-sm);
}

.result-image {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    background: hsl(var(--background));
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}

.result-image:hover {
    transform: scale(1.02);
}

/* Image Actions */
.image-actions {
    display: flex;
    gap: var(--space-2);
    justify-content: center;
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid hsl(var(--border));
}

.image-action-btn {
    font-size: var(--font-size-xs);
    padding: var(--space-2) var(--space-3);
    border-radius: calc(var(--radius) / 2);
}

/* Image Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.lightbox.show {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: hsl(var(--card));
    border-radius: var(--radius);
    overflow: hidden;
}

.lightbox-image {
    width: 100%;
    height: auto;
    display: block;
}

.lightbox-close {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Processing Status Overlay */
.processing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: hsl(var(--card) / 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.processing-overlay.show {
    opacity: 1;
    visibility: visible;
}

.processing-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid hsl(var(--muted));
    border-top: 3px solid hsl(var(--primary));
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--space-3);
}

.processing-text {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: hsl(var(--foreground));
}

.image-metadata {
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid hsl(var(--border));
    font-size: var(--font-size-xs);
    color: hsl(var(--muted-foreground));
}

.metadata-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-1);
}

.metadata-item:last-child {
    margin-bottom: 0;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid hsl(var(--border));
}

.results-count {
    font-size: var(--font-size-sm);
    color: hsl(var(--muted-foreground));
}

.results-actions {
    display: flex;
    gap: var(--space-2);
}

.download-all-btn {
    font-size: var(--font-size-xs);
    padding: var(--space-2) var(--space-3);
}

/* Advanced settings */
.advanced-settings {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid hsl(var(--border));
}

.advanced-settings-actions {
    margin-top: var(--space-6);
    padding-top: var(--space-4);
    border-top: 1px solid hsl(var(--border));
    display: flex;
    justify-content: center;
}

@media (min-width: 768px) {
    .advanced-settings-actions {
        justify-content: flex-start;
    }
}

/* Tooltips */
.tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
    font-size: 10px;
    font-weight: var(--font-weight-bold);
    margin-left: var(--space-2);
    cursor: help;
}

/* Toast Notification System */
.toast-container {
    position: fixed;
    top: var(--space-4);
    right: var(--space-4);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    pointer-events: none;
}

.toast {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: var(--space-4);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -1px rgb(0 0 0 / 0.06);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 300px;
    max-width: 400px;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-color: hsl(var(--primary));
}

.toast.error {
    border-color: hsl(var(--destructive));
}

.toast.info {
    border-color: hsl(var(--primary));
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: hsl(var(--primary));
}

.toast.error .toast-icon {
    color: hsl(var(--destructive));
}

.toast.info .toast-icon {
    color: hsl(var(--primary));
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-1);
}

.toast-message {
    font-size: var(--font-size-xs);
    color: hsl(var(--muted-foreground));
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: hsl(var(--muted-foreground));
    padding: var(--space-1);
    border-radius: calc(var(--radius) / 2);
    transition: background-color 0.2s ease-in-out;
}

.toast-close:hover {
    background: hsl(var(--muted));
}

@media (max-width: 640px) {
    .toast-container {
        top: var(--space-2);
        right: var(--space-2);
        left: var(--space-2);
    }
    
    .toast {
        min-width: auto;
        max-width: none;
    }
}
.content-group {
    margin-bottom: var(--space-8);
}

.secondary-group {
    border-radius: var(--radius);
    padding: var(--space-6);
    border: 1px solid hsl(var(--border) / 0.5); /* Subtle border instead of grey background */
}

/* Simplified responsive layout - components scale fluidly */
@media (max-width: 768px) {
    /* Stack layouts vertically on smaller screens */
    .quick-test-card .card-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: var(--space-3);
    }
    
    .quick-test-header-left {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: var(--space-3);
        width: 100%;
    }
    
    .quick-test-content {
        text-align: center;
        width: 100%;
    }
    
    .quick-test-button-wrapper {
        width: 100%;
        justify-content: center;
    }
    
    .test-actions {
        flex-direction: column;
        gap: var(--space-2);
        width: 100%;
    }
    
    .test-action {
        width: 100%;
        justify-content: center;
    }
    
    .upload-actions {
        flex-direction: column;
        gap: var(--space-2);
    }
    
    .upload-action {
        width: 100%;
        justify-content: center;
    }
    
    .button-group {
        flex-direction: column;
        gap: var(--space-2);
    }
    
    .button {
        width: 100%;
        justify-content: center;
    }
    
    .image-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }
    
    .results-header {
        flex-direction: column;
        gap: var(--space-2);
        text-align: center;
    }
    
    .results-actions {
        justify-content: center;
        width: 100%;
        flex-wrap: wrap;
    }
    
    .image-actions {
        flex-wrap: wrap;
        gap: var(--space-2);
        justify-content: center;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-1);
        text-align: left;
    }
    
    .detail-label {
        min-width: auto;
        font-weight: var(--font-weight-semibold);
    }
    
    .detail-value {
        text-align: left;
        word-break: break-all;
        white-space: normal;
    }
    
    .toast-container {
        top: var(--space-2);
        right: var(--space-2);
        left: var(--space-2);
    }
    
    .toast {
        min-width: auto;
        max-width: none;
        margin: 0;
    }
    
    .lightbox-content {
        max-width: 95vw;
        max-height: 95vh;
        margin: var(--space-2);
    }
    
    .image-preview {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: var(--space-2);
    }
}

/* Fine-tuning for very small screens */
@media (max-width: 480px) {
    /* Only essential adjustments needed since components already scale fluidly */
    .lightbox-content {
        max-width: 98vw;
        max-height: 98vh;
        margin: var(--space-1);
    }
    
    .lightbox-close {
        width: clamp(32px, 8vw, 40px);
        height: clamp(32px, 8vw, 40px);
        top: var(--space-1);
        right: var(--space-1);
    }
    
    .image-preview {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: var(--space-2);
    }
}

/* Primary Test Image Section */
.test-image-section {
    padding: var(--space-6);
    background: hsl(var(--card));
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    margin-bottom: var(--space-6);
}

.primary-test-group {
    margin-bottom: var(--space-4);
}

.primary-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 600;
    font-size: 1rem;
    color: hsl(var(--foreground));
    margin-bottom: var(--space-3);
}

.primary-label svg {
    color: hsl(var(--primary));
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-2);
    background: hsl(var(--primary) / 0.1);
    color: hsl(var(--primary));
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: calc(var(--radius) / 2);
    margin-left: auto;
}

.primary-input {
    font-size: 1rem;
    padding: var(--space-3);
    border: 2px solid hsl(var(--primary) / 0.3);
    background: hsl(var(--card));
}

.primary-input:focus {
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

.input-help {
    margin-top: var(--space-2);
}

.help-text {
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Test Actions */
.test-actions {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-4);
}

.test-action {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.test-action:hover {
    background: hsl(var(--muted));
    border-color: hsl(var(--primary) / 0.5);
}

.test-action.primary {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-color: hsl(var(--primary));
}

.test-action.primary:hover {
    background: hsl(var(--primary) / 0.9);
}

.test-action-icon {
    width: 16px;
    height: 16px;
}

/* Secondary Upload Section */
.upload-section {
    margin-top: var(--space-6);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    overflow: hidden;
}

.upload-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4);
    background: hsl(var(--muted) / 0.5);
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    list-style: none;
}

.upload-toggle:hover {
    background: hsl(var(--muted));
    color: hsl(var(--foreground));
}

.upload-toggle svg {
    transition: transform 0.2s ease;
}

.upload-section[open] .upload-toggle svg {
    transform: rotate(180deg);
}

.upload-zone.secondary {
    margin: var(--space-4);
    padding: var(--space-6);
    border: 2px dashed hsl(var(--border));
    border-radius: var(--radius);
    background: hsl(var(--muted) / 0.3);
}

.upload-zone.secondary .upload-icon svg {
    width: 32px;
    height: 32px;
}

.upload-actions {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-4);
    padding: 0 var(--space-4) var(--space-4);
}

.upload-action {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-action:hover {
    background: hsl(var(--muted));
}

.upload-action-icon {
    width: 14px;
    height: 14px;
}

