/* ========================================
   CSS Variables - Technical Precision Theme
   ======================================== */
:root {
    /* Core Colors */
    --bg-primary: #0a0e17;
    --bg-secondary: #121620;
    --bg-tertiary: #1a1f2e;
    --bg-elevated: #222938;
    
    /* Accent Colors - Syntax Highlighting Inspired */
    --accent-orange: #ff9c42;
    --accent-green: #4ade80;
    --accent-blue: #60a5fa;
    --accent-purple: #a78bfa;
    --accent-pink: #f472b6;
    
    /* Text Colors */
    --text-primary: #e8eaed;
    --text-secondary: #9ca3af;
    --text-tertiary: #6b7280;
    --text-inverse: #0a0e17;
    
    /* Borders & Dividers */
    --border-primary: #2a3142;
    --border-secondary: #1e2532;
    --border-accent: #3a4558;
    
    /* Status Colors */
    --status-success: #4ade80;
    --status-warning: #fbbf24;
    --status-error: #ef4444;
    --status-info: #60a5fa;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
    
    /* Typography */
    --font-display: 'Playfair Display', serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-body: 'JetBrains Mono', monospace;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

/* ========================================
   Reset & Base Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animated background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, transparent 48%, var(--border-secondary) 48%, var(--border-secondary) 52%, transparent 52%),
        linear-gradient(45deg, transparent 48%, var(--border-secondary) 48%, var(--border-secondary) 52%, transparent 52%);
    background-size: 80px 80px;
    background-position: 0 0, 40px 40px;
    opacity: 0.02;
    z-index: -1;
    pointer-events: none;
}

/* ========================================
   Layout
   ======================================== */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 2rem;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

/* ========================================
   Header
   ======================================== */
.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    animation: slideDown 0.6s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-pink));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-inverse);
    box-shadow: var(--shadow-md);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

.logo-icon svg {
    width: 28px;
    height: 28px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.app-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--accent-orange), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.app-subtitle {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: -2px;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-header:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border-accent);
    transform: translateY(-1px);
}

.btn-header svg {
    color: var(--accent-orange);
}

/* ========================================
   Welcome Screen
   ======================================== */
.welcome-screen {
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-orange), var(--accent-pink), var(--accent-blue));
}

.welcome-header {
    text-align: center;
    margin-bottom: 3rem;
}

.accent-line {
    width: 60px;
    height: 3px;
    background: var(--accent-orange);
    margin: 0 auto 1.5rem;
    border-radius: 2px;
}

.welcome-header h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    animation: fadeInUp 0.8s ease 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-description {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease 0.3s both;
}

/* ========================================
   Process Overview
   ======================================== */
.process-overview {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1rem;
    margin-bottom: 3rem;
    align-items: center;
}

.process-step {
    grid-column: span 1;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    transition: all var(--transition-base);
    animation: fadeInUp 0.8s ease calc(0.4s + var(--delay)) both;
}

.process-step:nth-child(1) { --delay: 0s; }
.process-step:nth-child(3) { --delay: 0.1s; }
.process-step:nth-child(5) { --delay: 0.2s; }
.process-step:nth-child(7) { --delay: 0.3s; }

.process-step:hover {
    background: var(--bg-elevated);
    border-color: var(--border-accent);
    transform: translateY(-2px);
}

.process-connector {
    grid-column: span 1;
    height: 2px;
    background: linear-gradient(90deg, var(--border-primary), var(--border-accent), var(--border-primary));
    position: relative;
    animation: fadeIn 0.8s ease calc(0.5s + var(--delay)) both;
}

.process-connector::after {
    content: '→';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-orange);
    font-size: 1.2rem;
}

.step-number {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-orange);
    margin-bottom: 0.5rem;
}

.step-content h3 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.step-content p {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    line-height: 1.5;
}

/* ========================================
   Input Section
   ======================================== */
.input-section {
    animation: fadeInUp 0.8s ease 0.7s both;
}

.input-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.label-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 400;
    margin-top: 0.25rem;
}

.requirements-input {
    width: 100%;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 1rem;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
    resize: vertical;
    transition: all var(--transition-base);
}

.requirements-input:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(255, 156, 66, 0.1);
}

.requirements-input::placeholder {
    color: var(--text-tertiary);
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.char-count {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.char-count span {
    color: var(--accent-orange);
    font-weight: 600;
}

/* ========================================
   Buttons
   ======================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-pink));
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-inverse);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-secondary:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border-accent);
}

.btn-download {
    font-size: 0.8125rem;
}

/* ========================================
   Session Screen
   ======================================== */
.session-screen {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    animation: fadeIn 0.8s ease;
}

/* Progress Section */
.progress-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.progress-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.progress-stage {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.progress-stats {
    display: flex;
    gap: 2rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-orange);
}

.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-orange), var(--accent-pink));
    border-radius: 4px;
    transition: width var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.progress-percentage {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-orange);
    min-width: 45px;
    text-align: right;
}

/* Stage Indicators */
.stage-indicators {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.stage-indicator {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.stage-indicator.active {
    background: var(--bg-elevated);
    border-color: var(--accent-orange);
}

.stage-indicator.active .stage-icon {
    background: var(--accent-orange);
    color: var(--text-inverse);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 156, 66, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(255, 156, 66, 0);
    }
}

.stage-indicator.completed .stage-icon {
    background: var(--status-success);
    color: var(--text-inverse);
}

.stage-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    transition: all var(--transition-base);
}

.stage-icon svg {
    width: 20px;
    height: 20px;
}

.stage-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
}

.stage-indicator.active .stage-label {
    color: var(--text-primary);
    font-weight: 600;
}

/* ========================================
   Results Section
   ======================================== */
.results-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.results-tabs {
    display: flex;
    gap: 0;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
    overflow-x: auto;
}

.tab-btn {
    flex: 1;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.tab-btn.active {
    color: var(--accent-orange);
    border-bottom-color: var(--accent-orange);
    background: var(--bg-secondary);
}

.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--bg-elevated);
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tab-btn.active .tab-badge {
    background: rgba(255, 156, 66, 0.2);
    color: var(--accent-orange);
}

.results-content {
    padding: 2rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-primary);
}

.content-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Design Selector */
.design-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.design-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all var(--transition-base);
}

.design-option:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.design-option.active {
    background: var(--bg-elevated);
    border-color: var(--accent-orange);
    color: var(--text-primary);
}

.design-icon {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: block;
}

/* Critique Selector */
.critique-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.critique-select {
    padding: 0.625rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all var(--transition-base);
}

.critique-select:focus {
    outline: none;
    border-color: var(--accent-orange);
}

/* Markdown Content */
.markdown-content {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    min-height: 400px;
    font-size: 0.9375rem;
    line-height: 1.7;
}

.markdown-content h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-primary);
    padding-bottom: 0.5rem;
}

.markdown-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.markdown-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.markdown-content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.markdown-content ul, .markdown-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.markdown-content li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.markdown-content code {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    padding: 0.2em 0.4em;
    font-family: var(--font-mono);
    font-size: 0.875em;
    color: var(--accent-green);
}

.markdown-content pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
    overflow-x: auto;
}

.markdown-content pre code {
    background: none;
    border: none;
    padding: 0;
}

.markdown-content blockquote {
    border-left: 3px solid var(--accent-orange);
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--text-tertiary);
    font-style: italic;
}

.markdown-content a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.markdown-content a:hover {
    color: var(--accent-green);
    text-decoration: underline;
}

/* Loading Placeholder */
.loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-primary);
    border-top-color: var(--accent-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-placeholder p {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

/* ========================================
   Action Bar
   ======================================== */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
}

/* ========================================
   Modal
   ======================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 23, 0.9);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid var(--border-primary);
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.modal-close:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-primary);
}

/* Config Sections */
.config-section {
    margin-bottom: 2rem;
}

.config-section:last-child {
    margin-bottom: 0;
}

.config-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.config-description {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-bottom: 1.5rem;
}

.config-group {
    margin-bottom: 1.25rem;
}

.config-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.config-select, .config-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    transition: all var(--transition-base);
}

.config-select:focus, .config-input:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(255, 156, 66, 0.1);
}

.config-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* History List */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-item {
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
}

.history-item:hover {
    background: var(--bg-elevated);
    border-color: var(--border-accent);
    transform: translateX(4px);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.5rem;
}

.history-item-title {
    font-weight: 600;
    color: var(--text-primary);
}

.history-item-date {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.history-item-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    color: var(--accent-green);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
}

.empty-state svg {
    color: var(--text-tertiary);
}

.empty-state p {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

/* ========================================
   Approval Panels
   ======================================== */
.approval-panel {
    background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-tertiary) 100%);
    border: 2px solid var(--accent-orange);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 8px 32px rgba(255, 156, 66, 0.2);
    animation: slideInApproval 0.4s ease;
}

@keyframes slideInApproval {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.approval-header {
    margin-bottom: 1.5rem;
}

    .approval-header h4 {
        font-size: 1.125rem;
        font-weight: 600;
        color: var(--accent-orange);
        margin-bottom: 0.5rem;
    }

    .approval-header p {
        font-size: 0.875rem;
        color: var(--text-secondary);
        margin: 0;
    }

.approval-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

    .approval-actions button {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem 1.25rem;
        border: none;
        border-radius: var(--radius-md);
        font-family: var(--font-mono);
        font-size: 0.875rem;
        font-weight: 600;
        cursor: pointer;
        transition: all var(--transition-base);
        box-shadow: var(--shadow-sm);
    }

.btn-approve {
    background: linear-gradient(135deg, var(--status-success), #22c55e);
    color: var(--text-inverse);
}

    .btn-approve:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

.btn-complete {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-pink));
}

.btn-edit {
    background: linear-gradient(135deg, var(--accent-blue), #3b82f6);
    color: var(--text-inverse);
}

    .btn-edit:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

.btn-save {
    background: linear-gradient(135deg, var(--accent-green), #22c55e);
    color: var(--text-inverse);
}

    .btn-save:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

.btn-regenerate {
    background: linear-gradient(135deg, var(--accent-orange), #f97316);
    color: var(--text-inverse);
}

    .btn-regenerate:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

.approval-help {
    background: var(--bg-secondary);
    border-left: 3px solid var(--accent-orange);
    padding: 1rem;
    border-radius: var(--radius-sm);
}

.help-item {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

    .help-item:last-child {
        margin-bottom: 0;
    }

    .help-item strong {
        color: var(--accent-orange);
        font-weight: 600;
    }

/* Editable Content */
.editable {
    border: 2px dashed var(--accent-orange) !important;
    padding: 1rem !important;
    min-height: 200px;
    cursor: text;
    background: var(--bg-secondary);
    animation: editablePulse 2s ease-in-out infinite;
}

@keyframes editablePulse {
    0%, 100% {
        border-color: var(--accent-orange);
    }

    50% {
        border-color: var(--accent-green);
    }
}

.editable:focus {
    outline: none;
    border-color: var(--accent-green) !important;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.1);
    animation: none;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-elevated);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    z-index: 10000;
    transform: translateY(150%);
    opacity: 0;
    transition: all var(--transition-base);
    border-left: 4px solid var(--accent-orange);
}

    .toast.show {
        transform: translateY(0);
        opacity: 1;
    }

.toast-success {
    border-left-color: var(--status-success);
}

.toast-error {
    border-left-color: var(--status-error);
}

.toast-info {
    border-left-color: var(--accent-blue);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .process-overview {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .process-connector {
        display: none;
    }
    
    .stage-indicators {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .welcome-card {
        padding: 2rem 1.5rem;
    }
    
    .progress-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .progress-stats {
        width: 100%;
        justify-content: space-between;
    }
    
    .results-tabs {
        flex-wrap: wrap;
    }
    
    .results-content {
        padding: 1rem;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .design-selector, .critique-selector {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .modal-content {
        max-width: 100%;
        margin: 0;
    }
}
