/* Fotoshoot Page Specific Styles - ERWEITERTE VERSION MIT PROMPT-GRUPPEN */

.fotoshoot-workspace {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

/* Upload Section - ERWEITERT */
.upload-tabs {
    display: flex;
    gap: var(--space-sm);
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
}

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

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

.upload-tab-content {
    margin-top: var(--space-lg);
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-secondary);
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--accent-primary);
    background: rgba(255, 107, 53, 0.05);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.upload-icon {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.upload-hint {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Existing Images Filter */
.existing-images-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    gap: var(--space-md);
}

.filter-buttons {
    display: flex;
    gap: var(--space-xs);
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.8rem;
}

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

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

.search-box {
    position: relative;
    width: 250px;
}

.search-box input {
    padding-right: 2.5rem;
}

.search-box i {
    position: absolute;
    right: var(--space-sm);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* Existing Images Grid */
.existing-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--space-md);
    max-height: 400px;
    overflow-y: auto;
    padding: var(--space-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
}

.existing-image-item {
    position: relative;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-tertiary);
    aspect-ratio: 1;
}

.existing-image-item:hover {
    border-color: var(--accent-primary);
    transform: scale(1.02);
}

.existing-image-item.selected {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.existing-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.existing-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: var(--space-sm);
    font-size: 0.75rem;
    line-height: 1.2;
}

.existing-image-source {
    display: inline-block;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-size: 0.6rem;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.source-upload {
    background: var(--info);
    color: white;
}

.source-generated {
    background: var(--accent-primary);
    color: white;
}

.existing-image-name {
    font-weight: 500;
    margin-bottom: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.existing-image-meta {
    font-size: 0.6rem;
    opacity: 0.8;
}

.existing-image-prompt {
    font-size: 0.6rem;
    margin-top: 0.25rem;
    opacity: 0.7;
}

/* Empty Images State */
.empty-images-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-muted);
}

.empty-images-state i {
    font-size: 2rem;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

.uploaded-image {
    text-align: center;
}

.uploaded-image img {
    max-width: 100%;
    max-height: 400px;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-md);
}

.image-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* Image Info */
.image-info {
    padding: var(--space-sm);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin: var(--space-sm) 0;
}

.image-info p {
    margin: 0 0 var(--space-xs) 0;
    font-size: 0.875rem;
}

.image-info p:last-child {
    margin-bottom: 0;
}

/* Prompt Selection - ERWEITERT FÜR GRUPPEN */
.prompt-selection-description {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    font-size: 0.95rem;
}

.prompt-actions {
    display: flex;
    gap: var(--space-sm);
}

/* Group Selection */
.group-selection {
    margin-bottom: var(--space-xl);
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

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

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

.group-selection .form-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
    outline: none;
}

/* Prompts Container */
.prompts-container {
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 2px solid var(--border-color);
}

.prompts-container.hidden {
    display: none;
}

.prompts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.prompt-option {
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.prompt-checkbox {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    margin: 0;
    min-height: 120px;
}

.prompt-checkbox:hover {
    border-color: var(--border-hover);
    background: var(--bg-hover);
}

.prompt-checkbox input[type="checkbox"] {
    display: none;
}

.prompt-checkbox input[type="checkbox"]:checked + .checkmark + .prompt-content {
    opacity: 1;
}

.prompt-checkbox input[type="checkbox"]:not(:checked) + .checkmark + .prompt-content {
    opacity: 0.6;
}

.prompt-checkbox input[type="checkbox"]:checked ~ .prompt-content .prompt-number {
    background: var(--accent-primary);
    color: white;
}

.prompt-checkbox input[type="checkbox"]:not(:checked) ~ .prompt-content .prompt-number {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
    transition: var(--transition);
}

.prompt-checkbox input[type="checkbox"]:checked + .checkmark {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.prompt-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
}

.prompt-content {
    flex: 1;
    display: flex;
    gap: var(--space-md);
    transition: var(--transition);
}

.prompt-number {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.prompt-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.prompt-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: var(--space-xs);
}

.prompt-text {
    color: var(--text-primary);
    line-height: 1.4;
    font-size: 0.9rem;
    margin-bottom: var(--space-xs);
}

.prompt-description {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-style: italic;
    line-height: 1.3;
}

.prompt-text-preview {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-style: italic;
    line-height: 1.4;
    margin-top: 0.25rem;
}

.selection-summary {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--space-lg);
    padding: var(--space-sm);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.generate-actions {
    display: flex;
    justify-content: center;
}

/* Generation Status */
.generation-status {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.status-badge {
    background: var(--accent-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Images Grid - 3 COLUMNS */
.images-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.image-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-secondary);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    cursor: pointer;
    aspect-ratio: 1;
}

.image-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: white;
    padding: var(--space-md);
    transform: translateY(100%);
    transition: var(--transition);
}

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

.image-prompt {
    font-size: 0.8rem;
    margin-bottom: var(--space-sm);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.image-overlay .btn {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    backdrop-filter: blur(10px);
    font-size: 0.8rem;
    padding: var(--space-xs) var(--space-sm);
}

.image-overlay .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Image Modal */
.image-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
}

.image-preview {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.image-preview img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.image-details {
    text-align: center;
}

.image-prompt-text {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

/* Save Section */
.save-form {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    flex-wrap: wrap;
}

.save-form .form-input {
    flex: 1;
    min-width: 200px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-muted);
    grid-column: 1 / -1;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-muted);
    grid-column: 1 / -1;
}

/* Fotoshoot List Grid */
.fotoshoots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.fotoshoot-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.fotoshoot-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.fotoshoot-card .fotoshoot-thumbnail {
    height: 180px;
    overflow: hidden;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fotoshoot-card .fotoshoot-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fotoshoot-card .placeholder-thumb {
    color: var(--text-muted);
    font-size: 2rem;
}

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

.fotoshoot-card .fotoshoot-info h3 {
    margin: 0 0 var(--space-xs) 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.fotoshoot-stats {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0 0 var(--space-xs) 0;
}

.fotoshoot-date {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0 0 var(--space-sm) 0;
}

.fotoshoot-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-draft {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.status-generating {
    background: var(--warning);
    color: var(--bg-primary);
}

.status-completed {
    background: var(--success);
    color: var(--bg-primary);
}

.status-failed {
    background: var(--error);
    color: white;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--accent-primary);
    font-weight: 600;
}

.fotoshoot-actions {
    display: flex;
    gap: var(--space-xs);
    padding: 0 var(--space-md) var(--space-md);
}

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

.btn-danger:hover {
    background: #cc3333;
    border-color: #cc3333;
}

.page-actions {
    margin-top: var(--space-md);
}

.header-nav {
    margin-bottom: var(--space-md);
}

/* Modal Styles */
.modal-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
    margin-top: var(--space-lg);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .images-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .storyboards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .prompts-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .fotoshoot-workspace {
        gap: var(--space-lg);
    }
    
    .upload-area {
        padding: var(--space-lg);
    }
    
    .upload-icon {
        font-size: 2rem;
    }
    
    .prompts-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }
    
    .prompt-checkbox {
        padding: var(--space-sm);
        min-height: auto;
    }
    
    .prompt-content {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .prompt-number {
        align-self: flex-start;
    }
    
    .images-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }
    
    .image-item {
        border-radius: var(--radius-sm);
    }
    
    .image-overlay {
        position: static;
        transform: none;
        background: var(--bg-tertiary);
        color: var(--text-primary);
        padding: var(--space-sm);
    }
    
    .save-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .image-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .prompt-actions {
        flex-direction: column;
        gap: var(--space-xs);
    }
    
    .image-modal-content {
        margin: var(--space-sm);
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 2rem);
    }
    
    .storyboards-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .fotoshoot-actions {
        flex-wrap: wrap;
    }
    
    .existing-images-filter {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-sm);
    }
    
    .search-box {
        width: 100%;
    }
    
    .filter-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .existing-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: var(--space-sm);
    }
    
    .upload-tabs {
        justify-content: center;
    }
    
    .group-selection {
        padding: var(--space-md);
    }
    
    .prompts-container {
        padding-top: var(--space-lg);
    }
}

@media (max-width: 480px) {
    .upload-area {
        padding: var(--space-md);
    }
    
    .upload-placeholder {
        gap: var(--space-sm);
    }
    
    .uploaded-image img {
        max-height: 300px;
    }
    
    .prompt-checkbox {
        flex-direction: column;
        text-align: center;
        padding: var(--space-sm);
    }
    
    .checkmark {
        align-self: center;
    }
    
    .prompt-content {
        align-items: center;
        text-align: center;
    }
    
    .group-selection .form-select {
        padding: var(--space-sm);
    }
}

/* Multi-Reference Image Upload System */
.card-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: normal;
    margin-top: var(--space-xs);
}

.multi-upload-area {
    text-align: center;
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.reference-images-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.reference-image-item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    align-items: start;
}

.reference-image-item.primary {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.1);
}

.reference-image-thumb {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.reference-image-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    flex: 1;
}

.reference-image-label-group {
    display: grid;
    grid-template-columns: 1fr 150px;
    gap: var(--space-sm);
}

.reference-label-input {
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
}

.reference-label-input:focus {
    border-color: var(--accent-primary);
    outline: none;
}

.reference-type-select {
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.85rem);
}

.reference-description-input {
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-style: italic;
    resize: vertical;
    min-height: 50px;
}

.reference-image-meta {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.reference-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

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

.reference-badge.character {
    background: #3498db;
    color: white;
}

.reference-badge.location {
    background: #2ecc71;
    color: white;
}

.reference-badge.object {
    background: #f39c12;
    color: white;
}

.reference-badge.scene {
    background: #9b59b6;
    color: white;
}

.reference-image-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.reference-action-btn {
    padding: var(--space-xs);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.reference-action-btn.primary {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.reference-action-btn.danger {
    background: var(--error);
    border-color: var(--error);
    color: white;
}

/* Variable Mapping */
.variable-mapping-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.variable-mapping-item {
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.variable-mapping-item label {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: var(--space-xs);
    font-size: 0.9rem;
}

.variable-mapping-item .variable-placeholder {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 0.25rem;
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--accent-primary);
    margin-bottom: var(--space-sm);
}

.variable-mapping-item select {
    width: 100%;
    padding: var(--space-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.context-input-group {
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

.context-input-group label {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.context-input-group textarea {
    width: 100%;
    padding: var(--space-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

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

/* Responsive für Multi-Image */
@media (max-width: 768px) {
    .reference-image-item {
        grid-template-columns: 80px 1fr;
        gap: var(--space-sm);
    }

    .reference-image-thumb {
        width: 80px;
        height: 80px;
    }

    .reference-image-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: flex-end;
    }

    .reference-image-label-group {
        grid-template-columns: 1fr;
    }

    .variable-mapping-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   MODE SELECTOR (Single vs Multi)
   ============================================================================ */

.mode-selector {
    margin-bottom: var(--space-md);
}

.mode-tabs {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-sm);
}

.mode-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-md);
    background: var(--bg-elevated);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-tab:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
}

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

.mode-tab svg {
    width: 20px;
    height: 20px;
}

/* ============================================================================
   SINGLE IMAGE MODE
   ============================================================================ */

.upload-actions {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.single-image-preview {
    position: relative;
    max-width: 600px;
    margin: var(--space-lg) auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.single-image-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.single-image-preview .remove-btn {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 38, 38, 0.9);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.single-image-preview .remove-btn:hover {
    background: rgb(220, 38, 38);
    transform: scale(1.1);
}

.existing-images-section h3 {
    margin-bottom: var(--space-md);
    font-size: 1.1rem;
}

.existing-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--space-md);
}

.existing-image-card {
    background: var(--bg-elevated);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.existing-image-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.existing-image-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.existing-image-card .image-info {
    padding: var(--space-sm);
}

.existing-image-card .image-name {
    display: block;
    font-size: 0.85rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: var(--space-xs);
}

.existing-image-card .image-meta {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
}
