/* ========================================
   DESIGN SYSTEM - CSS CUSTOM PROPERTIES
   ======================================== */
:root {
    /* Background colors */
    --bg-primary: #FFECCB;
    --bg-surface: #FFFFFF;

    /* Text colors */
    --text-primary: #1A1A1A;
    --text-secondary: #6B6B6B;
    --text-muted: #9B9B9B;

    /* Border & dividers */
    --border-color: #E5E5E5;
    --border-light: #F0F0F0;

    /* Accent colors */
    --accent-primary: #E07A5F;
    --accent-hover: #C86A4F;

    /* Button colors */
    --btn-primary: #1A1A1A;
    --btn-primary-hover: #7DB07D;

    /* Semantic colors */
    --color-success: #7DB07D;
    --color-error: #D97373;
    --color-warning: #F4B845;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 40px;
    --space-2xl: 60px;

    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-pill: 50px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    padding: var(--space-lg);
    color: var(--text-primary);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.header {
    background: var(--bg-surface);
    color: var(--text-primary);
    padding: var(--space-xl);
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.dashboard-link {
    color: var(--text-secondary);
    text-decoration: underline;
    font-size: 0.95rem;
    padding: var(--space-sm) var(--space-md);
    transition: all 0.2s;
}

.dashboard-link:hover {
    color: var(--text-primary);
}

.language-switcher {
    display: flex;
    gap: var(--space-xs);
}

.lang-btn {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    transition: all 0.2s;
}

.lang-btn:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.lang-btn.active {
    background: var(--btn-primary);
    color: white;
    border-color: var(--btn-primary);
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: var(--space-sm);
    font-weight: 700;
}

.header p {
    font-size: 1.1em;
    color: var(--text-secondary);
}
        
.status-bar {
    background: var(--bg-surface);
    padding: var(--space-md) var(--space-xl);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 14px;
    color: var(--text-secondary);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-error);
}

.status-dot.active {
    background: var(--color-success);
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0;
    min-height: calc(100vh - 200px);
}

.sidebar {
    background: var(--bg-surface);
    padding: var(--space-xl);
    border-right: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-group select {
    width: 100%;
    padding: var(--space-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 16px;
    background: var(--bg-surface);
    color: var(--text-primary);
}

.form-group select:focus {
    outline: none;
    border-color: var(--text-primary);
}

/* Custom input for "Other" option */
.custom-input {
    margin-top: var(--space-sm);
    width: 100%;
    padding: var(--space-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: border-color 0.2s;
}

.custom-input.hidden {
    display: none;
}

.custom-input:focus {
    outline: none;
    border-color: var(--text-primary);
}

.custom-input::placeholder {
    color: var(--text-muted);
}

/* Textarea for requirements */
.form-group textarea {
    width: 100%;
    padding: var(--space-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--text-primary);
}

.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-hint {
    display: block;
    margin-top: var(--space-xs);
    font-size: 0.85em;
    color: var(--text-muted);
}

.btn {
    width: 100%;
    padding: var(--space-md);
    background: var(--btn-primary);
    color: white;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn:hover {
    background: var(--btn-primary-hover);
    color: var(--text-primary);
}

.btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
}

.workspace {
    padding: var(--space-xl);
    background: var(--bg-surface);
}

.project-status {
    background: var(--bg-primary);
    border-left: 4px solid var(--accent-primary);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.project-status h3 {
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
    font-weight: 700;
}
        
.conversation {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: var(--space-lg);
}

.message {
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    max-width: 85%;
}

.message.client {
    background: var(--bg-primary);
    margin-left: auto;
}

.message.creative-director {
    background: var(--border-light);
}

.message .sender {
    font-weight: 700;
    margin-bottom: var(--space-xs);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.message.client .sender {
    color: var(--accent-primary);
}

.message.creative-director .sender {
    color: var(--text-primary);
}

.brief {
    background: var(--bg-primary);
    border-left: 4px solid var(--color-warning);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.brief h3 {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.brief-field {
    margin-bottom: var(--space-sm);
}

.brief-field strong {
    color: var(--text-primary);
}

.designs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.design-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-surface);
}

.design-card img {
    width: 100%;
    display: block;
}

.design-card .info {
    padding: var(--space-md);
}

.design-card .iteration {
    background: var(--btn-primary);
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-pill);
    font-size: 12px;
    display: inline-block;
    margin-bottom: var(--space-sm);
}

.design-card .feedback {
    font-size: 14px;
    color: var(--text-secondary);
}

.loading {
    text-align: center;
    padding: var(--space-xl);
}

.spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--btn-primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-lg);
}

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

.progress-bar {
    background: var(--border-color);
    height: 30px;
    border-radius: var(--radius-pill);
    overflow: hidden;
    margin-top: var(--space-lg);
}

.progress-fill {
    height: 100%;
    background: var(--btn-primary);
    transition: width 0.5s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.completed {
    background: var(--bg-primary);
    border-left: 4px solid var(--color-success);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    text-align: center;
}

.completed h2 {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: var(--space-lg);
}

.completed img {
    max-width: 500px;
    width: 100%;
    border-radius: var(--radius-md);
    margin: var(--space-lg) 0;
}

/* ========================================
   CHECKPOINT MODAL STYLES
   ======================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

.modal-content.modal-small {
    max-width: 500px;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    background: var(--bg-surface);
    color: var(--text-primary);
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.modal-subtitle {
    font-size: 0.9em;
    color: var(--text-secondary);
}

.modal-body {
    padding: var(--space-xl);
    overflow-y: auto;
    flex: 1;
}

.modal-body .warning-text {
    color: var(--color-error);
    font-weight: 500;
    font-size: 0.95em;
    margin-top: var(--space-md);
}

.modal-footer {
    background: var(--bg-surface);
    padding: var(--space-lg) var(--space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
    border-top: 1px solid var(--border-color);
}

.modal-footer-right {
    display: flex;
    gap: var(--space-md);
}

.modal-footer .btn {
    width: auto;
    min-width: 150px;
}

#checkpoint-return-btn {
    min-width: 100px;
}

.btn-primary {
    background: var(--btn-primary);
}

.btn-primary:hover {
    background: var(--btn-primary-hover);
    color: white;
}

.btn-secondary {
    background: var(--text-muted);
}

.btn-secondary:hover {
    background: var(--text-secondary);
    color: white;
}

.btn-success {
    background: var(--color-success);
}

.btn-success:hover {
    background: #6a9a6a;
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.btn-danger {
    background: var(--color-error);
}

.btn-danger:hover {
    background: #c46060;
    color: white;
}

/* ========================================
   GENERATION PROGRESS MODAL
   ======================================== */

.generation-modal {
    background: rgba(0, 0, 0, 0.5);
}

.generation-modal-content {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    width: 90%;
    max-width: 500px;
    animation: slideUp 0.3s ease-out;
}

.generation-modal-content h3 {
    color: var(--text-primary);
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.generation-modal-content p {
    color: var(--text-secondary);
    font-size: 0.95em;
    margin-bottom: var(--space-lg);
}

.generation-progress-bar {
    background: var(--border-color);
    height: 36px;
    border-radius: var(--radius-pill);
    overflow: hidden;
    position: relative;
}

.generation-progress-fill {
    height: 100%;
    background: var(--btn-primary);
    transition: width 0.3s ease-out;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 600;
            font-size: 14px;
            min-width: 50px;
            border-radius: 18px;
        }

        /* ========================================
           BRIEF REVIEW FORM STYLES
           ======================================== */

        .brief-review-form {
            display: grid;
            gap: 20px;
        }

        .brief-review-field {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .brief-review-field label {
            font-weight: 600;
            color: var(--text-primary);
            font-size: 14px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .brief-review-field input,
        .brief-review-field textarea {
            padding: 12px;
            border: 2px solid var(--border-color);
            border-radius: 8px;
            font-size: 15px;
            font-family: inherit;
            transition: border-color 0.2s, box-shadow 0.2s;
        }

        .brief-review-field input:focus,
        .brief-review-field textarea:focus {
            outline: none;
            border-color: var(--accent-primary);
            box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
        }

        .brief-review-field textarea {
            min-height: 100px;
            resize: vertical;
        }

        /* ========================================
           PROMPT VARIATION SELECTOR STYLES
           ======================================== */

        .prompt-variations {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .prompt-variation-card {
            border: 2px solid var(--border-color);
            border-radius: 12px;
            overflow: hidden;
            transition: border-color 0.2s, box-shadow 0.2s;
            cursor: pointer;
        }

        .prompt-variation-card:hover {
            border-color: var(--accent-primary);
        }

        .prompt-variation-card.selected {
            border-color: var(--color-success);
            box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
        }

        .prompt-variation-header {
            background: var(--bg-surface);
            padding: 15px 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid var(--border-color);
        }

        .prompt-variation-header input[type="radio"] {
            width: 20px;
            height: 20px;
            margin-right: 12px;
        }

        .prompt-variation-title {
            font-weight: 600;
            font-size: 16px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .prompt-variation-badge {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
        }

        .quality-score {
            background: var(--bg-surface);
            color: var(--text-secondary);
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 14px;
            font-weight: 600;
        }

        .quality-score.high {
            background: var(--bg-surface);
            color: var(--color-success);
        }

        .prompt-variation-body {
            padding: 20px;
        }

        .prompt-text {
            background: var(--bg-surface);
            padding: 15px;
            border-radius: 8px;
            font-family: monospace;
            font-size: 13px;
            line-height: 1.6;
            white-space: pre-wrap;
            margin-bottom: 15px;
        }

        .prompt-variation-body textarea {
            width: 100%;
            box-sizing: border-box;
            padding: 15px;
            border: 2px solid var(--border-color);
            border-radius: 8px;
            font-family: monospace;
            font-size: 13px;
            line-height: 1.6;
            min-height: 180px;
            resize: vertical;
        }

        .prompt-reasoning {
            margin-top: 10px;
            padding: 12px;
            background: var(--bg-primary);
            border-radius: 8px;
            font-size: 13px;
            color: var(--text-primary);
        }

        .prompt-reasoning strong {
            color: var(--accent-primary);
        }

        /* ========================================
           BILINGUAL PROMPT DISPLAY STYLES
           ======================================== */

        .prompt-bilingual {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .prompt-english,
        .prompt-french {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .prompt-language-label {
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--text-secondary);
            padding: 4px 8px;
            background: var(--bg-surface);
            border-radius: 4px;
            display: inline-block;
            width: fit-content;
        }

        .prompt-english .prompt-language-label {
            color: var(--accent-primary);
            background: var(--bg-primary);
        }

        .prompt-french .prompt-language-label {
            color: var(--color-success);
            background: var(--bg-primary);
        }

        .prompt-translation-text {
            background: var(--bg-surface);
            border: 1px solid var(--border-color);
            border-left: 3px solid var(--color-success);
            padding: 12px 15px;
            border-radius: 6px;
            font-size: 14px;
            color: var(--text-primary);
            line-height: 1.6;
            font-style: italic;
        }

        /* Generation Review Bilingual Styles */
        .prompt-bilingual-review {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .prompt-english-review,
        .prompt-french-review {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .generation-review-prompt.translation {
            background: var(--bg-surface);
            border-left: 3px solid var(--color-success);
            font-style: italic;
        }

        /* ========================================
           BRIEF BILINGUAL DISPLAY STYLES
           ======================================== */

        .brief-bilingual {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .brief-english,
        .brief-french {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .brief-language-label {
            font-size: 10px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--text-secondary);
            padding: 3px 6px;
            background: var(--bg-surface);
            border-radius: 3px;
            display: inline-block;
            width: fit-content;
        }

        .brief-english .brief-language-label {
            color: var(--accent-primary);
            background: var(--bg-primary);
        }

        .brief-french .brief-language-label {
            color: var(--color-success);
            background: var(--bg-primary);
        }

        .brief-translation-text {
            background: var(--bg-surface);
            border: 1px solid var(--border-color);
            border-left: 3px solid var(--color-success);
            padding: 10px 12px;
            border-radius: 6px;
            font-size: 13px;
            color: var(--text-primary);
            line-height: 1.5;
            font-style: italic;
        }

        /* Inline bilingual for short fields */
        .brief-bilingual-inline {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .brief-translation-inline {
            font-size: 12px;
            color: var(--color-success);
            font-style: italic;
            padding: 4px 8px;
            background: var(--bg-primary);
            border-radius: 4px;
            border-left: 2px solid var(--color-success);
        }

        /* ========================================
           REJECTION MODAL STYLES
           ======================================== */

        #rejection-feedback {
            width: 100%;
            padding: 15px;
            border: 2px solid var(--border-color);
            border-radius: 8px;
            font-size: 15px;
            font-family: inherit;
            resize: vertical;
            min-height: 100px;
            margin-top: 15px;
        }

        #rejection-feedback:focus {
            outline: none;
            border-color: var(--color-error);
            box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
        }

        /* ========================================
           CHECKPOINT PENDING STATE
           ======================================== */

        .checkpoint-pending-notice {
            background: var(--bg-surface);
            border: 2px solid var(--color-warning);
            border-radius: 12px;
            padding: 20px;
            margin-bottom: 30px;
            text-align: center;
        }

        .checkpoint-pending-notice h3 {
            color: var(--text-secondary);
            margin-bottom: 10px;
        }

        .checkpoint-pending-notice p {
            color: var(--text-secondary);
        }

        /* ========================================
           GENERATION REVIEW FORM STYLES
           ======================================== */

        .generation-review-form {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .generation-review-section {
            background: var(--bg-surface);
            border-radius: 12px;
            padding: 20px;
        }

        .generation-review-section h4 {
            color: var(--text-primary);
            font-size: 14px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 12px;
        }

        .generation-review-prompt {
            background: var(--bg-surface);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 15px;
            font-family: monospace;
            font-size: 13px;
            line-height: 1.6;
            white-space: pre-wrap;
            word-break: break-word;
        }

        .generation-review-prompt.negative {
            background: #fff5f5;
            border-color: #f5c6cb;
        }

        .generation-review-settings {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 12px;
        }

        .setting-item {
            background: var(--bg-surface);
            padding: 10px 15px;
            border-radius: 8px;
            border: 1px solid var(--border-color);
        }

        .setting-item strong {
            color: var(--text-secondary);
            font-size: 12px;
            text-transform: uppercase;
        }

        .generation-review-info {
            background: var(--bg-primary);
            border: 1px solid #b8daff;
            border-radius: 8px;
            padding: 15px;
            text-align: center;
        }

        .generation-review-info p {
            color: #004085;
            margin: 0;
        }

        /* Collapsible section for platform optimizations */
        .generation-review-section.collapsible .collapsible-content {
            display: none;
            margin-top: 15px;
        }

        .generation-review-section.collapsible.expanded .collapsible-content {
            display: block;
        }

        .collapsible-header {
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .collapsible-header:hover {
            color: var(--accent-primary);
        }

        .collapse-icon {
            transition: transform 0.2s;
            font-size: 12px;
        }

        .generation-review-section.expanded .collapse-icon {
            transform: rotate(90deg);
        }

        .collapsible-content pre {
            background: var(--bg-surface);
            padding: 15px;
            border-radius: 8px;
            font-size: 12px;
            overflow-x: auto;
            margin: 0;
        }

        /* Button styles for generation review */
        .btn-generate {
            background: var(--color-success) !important;
        }

        .btn-generate:hover {
            background: var(--color-success) !important;
            border-color: var(--color-success) !important;
            color: white;
        }

        .btn-export {
            background: #17a2b8 !important;
        }

        .btn-export:hover {
            background: #138496 !important;
            color: var(--color-warning) !important;
        }

        /* Prompts exported status */
        .completed.prompts-exported {
            background: var(--bg-primary);
            border-color: var(--accent-primary);
        }

        .completed.prompts-exported h2 {
            color: #004085;
        }

        .project-status.prompts-exported {
            background: var(--bg-primary);
            border-color: var(--accent-primary);
        }

        .project-status.prompts-exported h3 {
            color: #004085;
        }

        /* ========================================
           PHASE 2: DELIVERABLE SELECTION STYLES
           ======================================== */

        .deliverable-selection {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .deliverable-option {
            position: relative;
            background: var(--bg-surface);
            border: 2px solid var(--border-color);
            border-radius: 12px;
            padding: 20px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .deliverable-option:hover {
            border-color: var(--text-muted);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .deliverable-option.selected {
            border-color: var(--accent-primary);
            background: linear-gradient(135deg, var(--bg-primary) 0%, #ffffff 100%);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
        }

        .recommended-badge {
            position: absolute;
            top: -10px;
            right: 15px;
            background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-hover) 100%);
            color: white;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
        }

        .deliverable-option-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 8px;
        }

        .deliverable-icon {
            font-size: 24px;
        }

        .deliverable-label {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-primary);
        }

        .deliverable-description {
            color: var(--text-secondary);
            font-size: 14px;
            margin: 0;
            padding-left: 36px;
        }

        .selection-summary {
            background: var(--bg-surface);
            border-radius: 8px;
            padding: 15px;
            text-align: center;
        }

        .selection-summary p {
            margin: 0;
            color: var(--text-primary);
        }

        /* ========================================
           PHASE 2: TAGLINE REVIEW STYLES
           ======================================== */

        .tagline-review {
            display: flex;
            flex-direction: column;
            gap: 25px;
        }

        .tagline-section h4,
        .value-prop-section h4,
        .mission-section h4 {
            color: var(--text-primary);
            font-size: 14px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 10px;
        }

        .section-description {
            color: var(--text-secondary);
            font-size: 13px;
            margin-bottom: 15px;
        }

        .tagline-options {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .tagline-option {
            background: var(--bg-surface);
            border: 2px solid var(--border-color);
            border-radius: 12px;
            padding: 15px 20px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .tagline-option:hover {
            border-color: var(--text-muted);
        }

        .tagline-option.selected {
            border-color: var(--accent-primary);
            background: linear-gradient(135deg, var(--bg-primary) 0%, #ffffff 100%);
        }

        .tagline-option-header {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 8px;
        }

        .tagline-style-label {
            font-weight: 600;
            color: var(--text-primary);
        }

        .tagline-style-badge {
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 10px;
            font-weight: 600;
        }

        .badge-bold { background: #ffe0b2; color: #e65100; }
        .badge-clever { background: #e1bee7; color: #7b1fa2; }
        .badge-emotional { background: #ffcdd2; color: #c62828; }
        .badge-minimalist { background: #e0e0e0; color: #424242; }
        .badge-action { background: #c8e6c9; color: #2e7d32; }

        .tagline-text {
            font-size: 18px;
            font-weight: 500;
            color: var(--text-primary);
            font-style: italic;
        }

        .tagline-reasoning {
            margin-top: 10px;
            font-size: 13px;
            color: var(--text-secondary);
            padding-left: 26px;
        }

        .copy-textarea {
            width: 100%;
            padding: 15px;
            border: 2px solid var(--border-color);
            border-radius: 8px;
            font-size: 14px;
            font-family: inherit;
            line-height: 1.6;
            resize: vertical;
        }

        .copy-textarea:focus {
            outline: none;
            border-color: var(--accent-primary);
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
        }

        /* ========================================
           PHASE 2: COPY REVIEW STYLES
           ======================================== */

        .copy-review {
            display: flex;
            flex-direction: column;
            gap: 25px;
        }

        .copy-section {
            background: var(--bg-surface);
            border-radius: 12px;
            padding: 20px;
        }

        .copy-section h4 {
            color: var(--text-primary);
            font-size: 14px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 8px;
        }

        .copy-field {
            margin-bottom: 15px;
        }

        .copy-field:last-child {
            margin-bottom: 0;
        }

        .copy-field label {
            display: block;
            font-size: 13px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 6px;
        }

        .copy-field input[type="text"],
        .copy-field textarea {
            width: 100%;
            padding: 12px 15px;
            border: 2px solid var(--border-color);
            border-radius: 8px;
            font-size: 14px;
            font-family: inherit;
            transition: border-color 0.2s, box-shadow 0.2s;
        }

        .copy-field input[type="text"]:focus,
        .copy-field textarea:focus {
            outline: none;
            border-color: var(--accent-primary);
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
        }

        .copy-field textarea {
            min-height: 100px;
            resize: vertical;
            line-height: 1.6;
        }

        /* ========================================
           IMAGE REVIEW CHECKPOINT STYLES
           ======================================== */

        .image-review-form {
            display: flex;
            flex-direction: column;
            gap: 25px;
        }

        .image-review-image-container {
            text-align: center;
        }

        .image-review-image-container h4 {
            color: var(--text-primary);
            font-size: 14px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 15px;
        }

        .image-review-image-wrapper {
            background: var(--bg-surface);
            border-radius: 12px;
            padding: 15px;
            display: inline-block;
        }

        .image-review-image {
            max-width: 100%;
            max-height: 400px;
            border-radius: 8px;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
        }

        .image-review-image:hover {
            transform: scale(1.02);
            box-shadow: 0 4px 20px rgba(0,0,0,0.15);
        }

        .image-click-hint {
            font-size: 12px;
            color: var(--text-secondary);
            margin-top: 10px;
        }

        .image-review-feedback {
            background: var(--bg-surface);
            border-radius: 12px;
            padding: 20px;
        }

        .image-review-feedback h4 {
            color: var(--text-primary);
            font-size: 14px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 8px;
        }

        .feedback-hint {
            font-size: 13px;
            color: var(--text-secondary);
            margin-bottom: 20px;
            font-style: italic;
        }

        .feedback-field {
            margin-bottom: 15px;
        }

        .feedback-field:last-child {
            margin-bottom: 0;
        }

        .feedback-field label {
            display: block;
            font-size: 13px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 6px;
        }

        .feedback-field select,
        .feedback-field textarea {
            width: 100%;
            padding: 12px 15px;
            border: 2px solid var(--border-color);
            border-radius: 8px;
            font-size: 14px;
            font-family: inherit;
            transition: border-color 0.2s, box-shadow 0.2s;
        }

        .feedback-field select:focus,
        .feedback-field textarea:focus {
            outline: none;
            border-color: var(--accent-primary);
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
        }

        .feedback-field textarea {
            min-height: 80px;
            resize: vertical;
            line-height: 1.5;
        }

        /* Warning button style for Request Changes */
        .btn-warning {
            background: var(--color-warning);
            color: var(--text-primary);
        }

        .btn-warning:hover {
            background: #e0a33d;
            color: var(--text-primary);
        }

        /* Iteration info banner for refined prompts */
        .iteration-info-banner {
            background: linear-gradient(135deg, var(--accent-primary)15 0%, var(--accent-hover)15 100%);
            border: 1px solid var(--accent-primary)40;
            border-radius: 8px;
            padding: 12px 16px;
            margin-bottom: 16px;
        }

        .iteration-badge {
            display: inline-block;
            background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-hover) 100%);
            color: white;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .refinement-reason {
            margin: 8px 0 0 0;
            color: var(--text-primary);
            font-size: 14px;
            font-style: italic;
        }

        /* Editable prompt textareas in generation review */
        .generation-review-prompt-edit {
            width: 100%;
            min-height: 150px;
            padding: 12px 15px;
            border: 2px solid var(--border-color);
            border-radius: 8px;
            font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
            font-size: 13px;
            line-height: 1.6;
            resize: vertical;
            transition: border-color 0.2s, box-shadow 0.2s;
            background: var(--bg-surface);
        }

        .generation-review-prompt-edit:focus {
            outline: none;
            border-color: var(--accent-primary);
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
            background: var(--bg-surface);
        }

        .generation-review-prompt-edit.negative {
            min-height: 60px;
            background: #fff8f8;
            border-color: #f5c6cb;
        }

        .generation-review-prompt-edit.negative:focus {
            border-color: var(--color-error);
            box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
            background: var(--bg-surface);
        }

        /* Enhanced Deliverable Selection Styles */
        .enhanced-deliverable-selection {
            padding: 0;
        }

        .deliverable-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 16px;
            border-bottom: 1px solid var(--border-color);
        }

        .detected-type-badge {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: linear-gradient(135deg, var(--accent-primary)15 0%, var(--accent-hover)15 100%);
            border: 1px solid var(--accent-primary)40;
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 14px;
        }

        .detected-type-badge strong {
            color: var(--accent-primary);
        }

        .mode-toggle {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 14px;
            color: var(--text-secondary);
        }

        .mode-toggle input[type="checkbox"] {
            width: 18px;
            height: 18px;
            cursor: pointer;
        }

        .deliverable-type-selector {
            margin-bottom: 24px;
            padding: 16px;
            background: var(--bg-surface);
            border-radius: 12px;
        }

        .deliverable-type-selector label {
            display: block;
            font-weight: 600;
            margin-bottom: 8px;
            color: var(--text-primary);
        }

        .deliverable-type-selector select {
            width: 100%;
            padding: 12px 16px;
            border: 2px solid var(--border-color);
            border-radius: 8px;
            font-size: 14px;
            font-family: inherit;
            background: var(--bg-surface);
            cursor: pointer;
            transition: border-color 0.2s;
        }

        .deliverable-type-selector select:focus {
            outline: none;
            border-color: var(--accent-primary);
        }

        .deliverable-columns {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 24px;
        }

        @media (max-width: 768px) {
            .deliverable-columns {
                grid-template-columns: 1fr;
            }
        }

        .deliverable-column {
            background: var(--bg-surface);
            border-radius: 12px;
            padding: 20px;
        }

        .deliverable-column h4 {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
            padding-bottom: 12px;
            border-bottom: 2px solid var(--border-color);
            color: var(--text-primary);
        }

        .deliverable-column h4 .count-badge {
            font-size: 12px;
            background: var(--accent-primary);
            color: white;
            padding: 2px 8px;
            border-radius: 12px;
            font-weight: 600;
        }

        .checkbox-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
            max-height: 300px;
            overflow-y: auto;
        }

        .checkbox-item {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            padding: 12px;
            background: var(--bg-surface);
            border-radius: 8px;
            border: 1px solid var(--border-color);
            cursor: pointer;
            transition: all 0.2s;
        }

        .checkbox-item:hover {
            border-color: var(--accent-primary);
            background: var(--bg-primary);
        }

        .checkbox-item input[type="checkbox"] {
            width: 18px;
            height: 18px;
            margin-top: 2px;
            cursor: pointer;
            flex-shrink: 0;
        }

        .checkbox-label {
            flex: 1;
        }

        .checkbox-label .name {
            font-weight: 600;
            color: var(--text-primary);
            display: block;
            margin-bottom: 4px;
        }

        .checkbox-label .description {
            font-size: 13px;
            color: var(--text-secondary);
            line-height: 1.4;
        }

        .checkbox-label .meta {
            display: flex;
            gap: 12px;
            margin-top: 6px;
            font-size: 12px;
            color: #868e96;
        }

        .selection-summary {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 24px;
            padding: 16px 20px;
            background: linear-gradient(135deg, var(--accent-primary)08 0%, var(--accent-hover)08 100%);
            border: 1px solid var(--accent-primary)20;
            border-radius: 12px;
        }

        .selection-summary .summary-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 14px;
            color: var(--text-primary);
        }

        .selection-summary .summary-count {
            font-weight: 700;
            color: var(--accent-primary);
        }

        /* Legacy deliverable selection styles */
        .legacy-deliverable-selection .deliverable-option {
            padding: 16px 20px;
            border: 2px solid var(--border-color);
            border-radius: 12px;
            margin-bottom: 12px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .legacy-deliverable-selection .deliverable-option:hover {
            border-color: var(--accent-primary);
            background: var(--bg-primary);
        }

        .legacy-deliverable-selection .deliverable-option.selected {
            border-color: var(--accent-primary);
            background: linear-gradient(135deg, var(--accent-primary)10 0%, var(--accent-hover)10 100%);
        }

        .legacy-deliverable-selection .deliverable-option input[type="radio"] {
            margin-right: 12px;
        }

        .legacy-deliverable-selection .deliverable-option .option-label {
            font-weight: 600;
            color: var(--text-primary);
        }

        .legacy-deliverable-selection .deliverable-option .option-description {
            margin-top: 4px;
            font-size: 14px;
            color: var(--text-secondary);
            margin-left: 24px;
        }
        /* Array field styles for copy review */
        .array-field .array-items {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .array-field .array-item {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .array-field .array-item input {
            flex: 1;
        }

        .array-field .item-style {
            font-size: 12px;
            color: var(--text-secondary);
            white-space: nowrap;
        }


        /* ========================================
           TABBED MODAL STYLES
           ======================================== */

        .tabbed-modal {
            display: flex;
            flex-direction: column;
        }

        .section-tabs {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 20px;
            padding-bottom: 16px;
            border-bottom: 2px solid var(--border-color);
        }

        .section-tab {
            padding: 10px 18px;
            border: 2px solid var(--border-color);
            border-radius: 8px;
            background: var(--bg-surface);
            color: var(--text-primary);
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
        }

        .section-tab:hover {
            background: var(--border-color);
            border-color: var(--text-muted);
        }

        .section-tab.active {
            background: var(--btn-primary);
            border-color: var(--btn-primary);
            color: white;
        }

        .section-tab.active:hover {
            background: var(--btn-primary-hover);
            border-color: var(--btn-primary-hover);
            color: white;
        }

        .section-panels {
            flex: 1;
        }

        .section-panel {
            display: none;
        }

        .section-panel.active {
            display: block;
        }

        /* Ensure copy sections inside panels don't have extra margin */
        .section-panel .copy-section {
            margin-bottom: 0;
        }

        /* ========================================
           PLATFORM SELECTOR STYLES
           ======================================== */

        .platform-selector-section {
            margin-bottom: 20px;
            padding: 16px;
            background: linear-gradient(135deg, var(--bg-surface) 0%, var(--border-color) 100%);
            border-radius: 12px;
            border: 1px solid var(--border-color);
        }

        .platform-selector-section h4 {
            margin: 0 0 12px 0;
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .platform-tabs {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .platform-tab {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 10px 16px;
            border: 2px solid var(--border-color);
            border-radius: 10px;
            background: var(--bg-surface);
            color: var(--text-primary);
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .platform-tab:hover {
            background: var(--bg-surface);
            border-color: var(--text-muted);
            transform: translateY(-1px);
        }

        .platform-tab.active {
            background: var(--btn-primary);
            border-color: var(--btn-primary);
            color: white;
        }

        .platform-tab.active:hover {
            background: var(--btn-primary-hover);
            border-color: var(--btn-primary-hover);
            color: white;
        }

        .platform-tab .platform-icon {
            font-size: 16px;
        }

        .platform-tab .platform-name {
            white-space: nowrap;
        }

        /* SD-only sections hidden by default for non-SD platforms */
        .sd-only-section {
            transition: opacity 0.2s ease, max-height 0.3s ease;
        }

        .sd-only-section[style*="display: none"] {
            opacity: 0;
        }

        /* Copy button success state */
        .btn-copy {
            background: var(--btn-primary) !important;
            border-color: var(--btn-primary) !important;
            color: white !important;
        }

        .btn-copy:hover {
            background: var(--btn-primary-hover) !important;
            color: white !important;
        }

        .btn-success {
            background: var(--color-success) !important;
            border-color: var(--color-success) !important;
            color: white !important;
        }

        .btn-success:hover {
            background: #6a9a6a !important;
            color: white !important;
        }

        /* ========================================
           ENHANCED GENERATION REVIEW STYLES
           ======================================== */

        .enhanced-generation-review .generation-summary-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 16px;
            background: var(--bg-surface);
            border-radius: 8px;
            margin-bottom: 16px;
        }

        .enhanced-generation-review .summary-count {
            font-weight: 600;
            color: var(--text-primary);
        }

        .enhanced-generation-review .select-all-toggle {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
        }

        .image-type-generation-panel .generate-toggle {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px;
            background: #e8f4f8;
            border-radius: 8px;
            margin-bottom: 16px;
        }

        .generate-checkbox {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            font-weight: 500;
        }

        .generate-checkbox input[type="checkbox"] {
            width: 18px;
            height: 18px;
        }

        .aspect-badge,
        .variation-badge {
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 500;
        }

        .aspect-badge {
            background: var(--border-color);
            color: var(--text-primary);
        }

        .variation-badge {
            background: var(--accent-primary);
            color: white;
        }

        .model-settings-shared {
            background: var(--bg-surface);
            border-radius: 8px;
            padding: 16px;
            margin-top: 16px;
        }

        /* Iteration banner for prompt refinement */
        .iteration-banner {
            display: flex;
            align-items: center;
            gap: 16px;
            padding: 16px;
            background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-hover) 100%);
            border-radius: 8px;
            margin-bottom: 16px;
            color: white;
        }

        .iteration-badge-large {
            font-size: 1.2em;
            font-weight: 700;
        }

        .iteration-message {
            font-size: 0.95em;
            opacity: 0.9;
        }

        /* Refinement reason box */
        .refinement-reason-box {
            display: flex;
            flex-direction: column;
            gap: 4px;
            padding: 12px 16px;
            background: var(--bg-surface);
            border-left: 4px solid var(--color-warning);
            border-radius: 0 8px 8px 0;
            margin-bottom: 16px;
        }

        .refinement-label {
            font-weight: 600;
            color: var(--text-secondary);
            font-size: 0.9em;
        }

        .refinement-text {
            color: #664d03;
        }

        /* Original prompt collapsible */
        .original-prompt-section {
            margin: 12px 0;
        }

        .original-prompt-section details {
            background: var(--bg-surface);
            border-radius: 8px;
            padding: 8px 12px;
        }

        .original-prompt-section summary {
            cursor: pointer;
            font-size: 0.9em;
            color: var(--text-secondary);
            font-weight: 500;
        }

        .original-prompt-section summary:hover {
            color: var(--text-primary);
        }

        .original-prompt-text {
            margin-top: 8px;
            padding: 12px;
            background: var(--bg-surface);
            border-radius: 6px;
            font-size: 0.9em;
            color: var(--text-secondary);
            white-space: pre-wrap;
        }

        /* ========================================
           ENHANCED IMAGE REVIEW STYLES
           ======================================== */

        .enhanced-image-review .image-review-progress {
            padding: 12px 16px;
            background: var(--bg-surface);
            border-radius: 8px;
            margin-bottom: 16px;
        }

        .enhanced-image-review .progress-text {
            display: block;
            font-weight: 600;
            margin-bottom: 8px;
            color: var(--text-primary);
        }

        .enhanced-image-review .progress-bar {
            height: 8px;
            background: var(--border-color);
            border-radius: 4px;
            overflow: hidden;
        }

        .enhanced-image-review .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--accent-primary), var(--accent-hover));
            transition: width 0.3s ease;
        }

        .image-review-panel .image-header {
            display: flex;
            gap: 12px;
            margin-bottom: 12px;
        }

        .image-review-panel .iteration-badge {
            padding: 4px 10px;
            background: var(--accent-primary);
            color: white;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 500;
        }

        .image-review-panel .status-badge {
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 500;
        }

        .image-review-panel .status-badge.status-approved {
            background: var(--bg-surface);
            color: var(--color-success);
        }

        .image-review-panel .status-badge.status-pending_review {
            background: var(--bg-surface);
            color: var(--text-secondary);
        }

        .image-review-panel .prompt-used {
            background: var(--bg-surface);
            padding: 12px;
            border-radius: 8px;
            margin: 12px 0;
        }

        .image-review-panel .prompt-used label {
            font-weight: 600;
            color: var(--text-primary);
            display: block;
            margin-bottom: 4px;
        }

        .image-review-panel .prompt-text {
            font-family: monospace;
            font-size: 12px;
            color: var(--text-secondary);
            margin: 0;
        }

        .image-review-panel .image-action-buttons {
            margin: 16px 0;
        }

        .image-review-panel .image-status-select {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .image-review-panel .image-status-select span {
            font-weight: 600;
        }

        .image-review-panel .image-status-dropdown {
            padding: 8px 16px;
            border: 2px solid var(--border-color);
            border-radius: 8px;
            font-size: 14px;
        }

        .image-review-panel .image-feedback-section {
            margin-top: 12px;
        }

        .image-review-panel .image-feedback-section label {
            font-weight: 600;
            display: block;
            margin-bottom: 8px;
        }

        .image-review-panel .image-feedback-textarea {
            width: 100%;
            padding: 12px;
            border: 2px solid var(--border-color);
            border-radius: 8px;
            font-size: 14px;
            resize: vertical;
            box-sizing: border-box;
        }

        /* Enhanced Prompt Selector Styles */
        .enhanced-prompt-selector {
            padding: 10px 0;
        }

        .enhanced-prompt-selector .prompt-intro {
            margin-bottom: 20px;
            color: var(--text-secondary);
        }

        .image-type-prompts {
            margin-bottom: 24px;
            background: var(--bg-surface);
            border-radius: 12px;
            padding: 16px;
        }

        .image-type-header {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 16px;
            padding-bottom: 12px;
            border-bottom: 1px solid var(--border-color);
            color: var(--text-primary);
        }

        .image-type-header .prompt-count {
            font-size: 12px;
            color: var(--text-secondary);
            font-weight: normal;
        }

        .prompt-card {
            background: var(--bg-surface);
            border: 2px solid var(--border-color);
            border-radius: 8px;
            margin-bottom: 12px;
            transition: border-color 0.2s;
        }

        .prompt-card:hover {
            border-color: var(--accent-primary);
        }

        .prompt-card.selected {
            border-color: var(--accent-primary);
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
        }

        .prompt-card-header {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 16px;
            background: var(--bg-surface);
            border-bottom: 1px solid var(--border-color);
            border-radius: 6px 6px 0 0;
        }

        .prompt-card-header input[type="radio"] {
            width: 18px;
            height: 18px;
        }

        .prompt-label {
            font-weight: 600;
            color: var(--text-primary);
        }

        .aspect-ratio-badge, .style-badge {
            font-size: 11px;
            padding: 2px 8px;
            border-radius: 12px;
            background: var(--border-color);
            color: var(--text-primary);
        }

        /* Analysis text for image types */
        .image-type-analysis {
            background: #fff9e6;
            border-left: 3px solid var(--color-warning);
            padding: 12px 16px;
            margin-bottom: 16px;
            border-radius: 0 8px 8px 0;
        }

        .image-type-analysis .analysis-text {
            margin: 0;
            color: var(--text-secondary);
            font-size: 13px;
            line-height: 1.5;
        }

        /* Variation badges */
        .variation-badge {
            font-size: 10px;
            font-weight: 600;
            padding: 2px 8px;
            border-radius: 12px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .badge-conservative {
            background: var(--bg-surface);
            color: var(--color-success);
        }

        .badge-balanced {
            background: #cce5ff;
            color: #004085;
        }

        .badge-creative {
            background: #f8d7da;
            color: #721c24;
        }

        .badge-default {
            background: var(--border-color);
            color: var(--text-primary);
        }

        /* Quality score display */
        .quality-score {
            margin-left: auto;
            font-size: 12px;
            color: var(--text-secondary);
        }

        .quality-score.high {
            color: var(--color-success);
            font-weight: 600;
        }

        /* Prompt reasoning */
        .prompt-reasoning {
            margin-top: 12px;
            padding: 10px 12px;
            background: var(--bg-surface);
            border-radius: 6px;
            font-size: 13px;
            color: var(--text-secondary);
            line-height: 1.5;
        }

        .prompt-reasoning strong {
            color: var(--text-primary);
        }

        .prompt-card-body {
            padding: 16px;
        }

        .prompt-field {
            margin-bottom: 12px;
        }

        .prompt-field:last-child {
            margin-bottom: 0;
        }

        .prompt-field label {
            display: block;
            font-weight: 500;
            margin-bottom: 6px;
            color: var(--text-primary);
        }

        .prompt-field.negative label {
            color: var(--color-error);
        }

        .prompt-field textarea,
        .prompt-card-body textarea {
            width: 100%;
            box-sizing: border-box;
            padding: 12px;
            border: 2px solid var(--border-color);
            border-radius: 8px;
            font-family: monospace;
            font-size: 13px;
            line-height: 1.6;
            min-height: 150px;
            resize: vertical;
        }

        .prompt-field textarea:focus,
        .prompt-card-body textarea:focus {
            border-color: var(--accent-primary);
            outline: none;
        }

        /* Nested object field styles */
        .nested-object .nested-fields {
            background: var(--bg-surface);
            border-radius: 8px;
            padding: 12px;
        }

        .nested-field {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 8px;
        }

        .nested-field:last-child {
            margin-bottom: 0;
        }

        .nested-label {
            font-weight: 500;
            color: var(--text-secondary);
            min-width: 120px;
            font-size: 13px;
        }

        .nested-field input {
            flex: 1;
        }

        /* ========================================
           RESPONSIVE STYLES - MOBILE FIRST
           ======================================== */

        /* Small devices (phones, 576px and below) */
        @media (max-width: 576px) {
            body {
                padding: 0;
                background: var(--bg-surface);
            }

            .container {
                border-radius: 0;
                box-shadow: none;
                max-width: 100%;
                width: 100%;
                margin: 0;
            }

            .header {
                padding: 20px 16px;
            }

            .header h1 {
                font-size: 1.75em;
            }

            .header p {
                font-size: 1em;
            }

            .header-top {
                flex-direction: column;
                gap: 12px;
                align-items: stretch;
            }

            .header-top > * {
                justify-content: center;
            }

            .dashboard-link {
                text-align: center;
                padding: 10px 16px;
            }

            .language-switcher {
                justify-content: center;
            }

            .status-bar {
                padding: 12px 16px;
                flex-wrap: wrap;
                gap: 12px;
            }

            .main-content {
                grid-template-columns: 1fr;
                min-height: auto;
            }

            .sidebar {
                padding: 20px 16px;
                border-right: none;
                border-bottom: 2px solid var(--border-color);
            }

            .workspace {
                padding: 20px 16px;
            }

            .form-group {
                margin-bottom: 20px;
            }

            .btn {
                padding: 14px;
                font-size: 16px;
            }

            /* Conversation */
            .conversation {
                padding: 15px;
                max-height: 400px;
            }

            .message {
                max-width: 95%;
                padding: 12px;
            }

            /* Brief */
            .brief {
                padding: 16px;
            }

            /* Designs grid */
            .designs {
                grid-template-columns: 1fr;
            }

            /* Progress bar */
            .progress-bar {
                height: 24px;
            }

            .progress-fill {
                font-size: 12px;
            }

            /* Completed section */
            .completed {
                padding: 20px 16px;
            }

            .completed img {
                max-width: 100%;
            }

            /* Modal styles */
            .modal-content {
                width: 95%;
                max-height: 95vh;
                border-radius: 12px;
            }

            .modal-header {
                padding: 20px 16px;
            }

            .modal-header h2 {
                font-size: 1.25em;
            }

            .modal-body {
                padding: 20px 16px;
            }

            .modal-footer {
                padding: 16px;
                flex-direction: column;
                gap: 12px;
            }

            .modal-footer-right {
                width: 100%;
                flex-direction: column;
            }

            .modal-footer .btn {
                width: 100%;
                min-width: auto;
            }

            /* Generation modal */
            .generation-modal-content {
                padding: 20px;
                width: 95%;
            }

            /* Brief review */
            .brief-review-form {
                gap: 16px;
            }

            .brief-review-field input,
            .brief-review-field textarea {
                padding: 10px;
                font-size: 14px;
            }

            /* Prompt variations */
            .prompt-variation-header {
                padding: 12px 16px;
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
            }

            .prompt-variation-body {
                padding: 16px;
            }

            .prompt-text {
                font-size: 12px;
                padding: 12px;
            }

            /* Deliverable selection */
            .deliverable-columns {
                grid-template-columns: 1fr;
                gap: 16px;
            }

            .deliverable-column {
                padding: 16px;
            }

            .checkbox-list {
                max-height: 250px;
            }

            .checkbox-item {
                padding: 10px;
            }

            .deliverable-header {
                flex-direction: column;
                gap: 12px;
                align-items: stretch;
            }

            .detected-type-badge {
                justify-content: center;
            }

            .mode-toggle {
                justify-content: center;
            }

            /* Tagline review */
            .tagline-option {
                padding: 12px 16px;
            }

            .tagline-text {
                font-size: 16px;
            }

            .tagline-reasoning {
                padding-left: 0;
                margin-top: 8px;
            }

            /* Copy review */
            .copy-section {
                padding: 16px;
            }

            /* Image review */
            .image-review-image {
                max-height: 300px;
            }

            /* Tabbed modal */
            .section-tabs {
                gap: 6px;
            }

            .section-tab {
                padding: 8px 12px;
                font-size: 13px;
            }

            /* Platform selector */
            .platform-tabs {
                gap: 6px;
            }

            .platform-tab {
                padding: 8px 12px;
                font-size: 12px;
            }

            .platform-tab .platform-name {
                display: none;
            }

            .platform-tab .platform-icon {
                font-size: 18px;
            }

            /* Generation review settings */
            .generation-review-settings {
                grid-template-columns: 1fr;
            }

            /* Selection summary */
            .selection-summary {
                flex-direction: column;
                gap: 12px;
                text-align: center;
            }

            /* Image type prompts */
            .image-type-prompts {
                padding: 12px;
            }

            .prompt-card-header {
                padding: 10px 12px;
                flex-wrap: wrap;
            }

            .prompt-card-body {
                padding: 12px;
            }

            .prompt-field textarea,
            .prompt-card-body textarea {
                min-height: 120px;
                font-size: 12px;
            }
        }

        /* Medium devices (tablets, 577px to 768px) */
        @media (min-width: 577px) and (max-width: 768px) {
            body {
                padding: 15px;
            }

            .header {
                padding: 30px 24px;
            }

            .header h1 {
                font-size: 2.25em;
            }

            .status-bar {
                padding: 15px 24px;
            }

            .main-content {
                grid-template-columns: 1fr;
            }

            .sidebar {
                padding: 30px 24px;
                border-right: none;
                border-bottom: 2px solid var(--border-color);
            }

            .workspace {
                padding: 30px 24px;
            }

            .modal-content {
                width: 90%;
            }

            .modal-footer {
                flex-wrap: wrap;
            }

            .deliverable-columns {
                grid-template-columns: 1fr;
            }

            .designs {
                grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            }
        }

        /* Large devices (desktops, 769px to 1024px) */
        @media (min-width: 769px) and (max-width: 1024px) {
            .header h1 {
                font-size: 2.5em;
            }

            .sidebar {
                padding: 30px;
            }

            .workspace {
                padding: 30px;
            }
        }

        /* Touch device optimizations */
        @media (hover: none) and (pointer: coarse) {
            .btn {
                min-height: 48px;
            }

            .lang-btn {
                min-height: 44px;
                padding: 10px 14px;
            }

            .platform-tab {
                min-height: 44px;
            }

            .section-tab {
                min-height: 44px;
            }

            .checkbox-item {
                min-height: 48px;
            }

            .tagline-option,
            .deliverable-option,
            .prompt-variation-card {
                min-height: 48px;
            }

            /* Larger touch targets for inputs */
            input[type="checkbox"],
            input[type="radio"] {
                min-width: 20px;
                min-height: 20px;
            }

            select {
                min-height: 48px;
            }
        }

        /* Landscape phone orientation */
        @media (max-width: 896px) and (orientation: landscape) {
            .modal-content {
                max-height: 90vh;
            }

            .modal-body {
                max-height: 50vh;
                overflow-y: auto;
            }

            .image-review-image {
                max-height: 200px;
            }
        }

        /* Print styles - hide non-essential elements */
        @media print {
            .header-top,
            .status-bar,
            .sidebar,
            .modal-overlay,
            .btn {
                display: none !important;
            }

            .main-content {
                display: block;
            }

            .workspace {
                padding: 0;
            }
        }

