/* designer.css - EASME.EVOLAB Designer Component Styles */

/* =========================================================================
   BROWSE TAB - Header & Layout
   ========================================================================= */

.designer .browse-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.designer .browse-header h3 {
    margin: 0 0 0.25rem 0;
}
.designer .browse-subtitle {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9em;
    line-height: 1.5;
    max-width: 600px;
}
.designer .browse-subtitle strong {
    color: var(--accent);
}
.designer .browse-quick-help {
    flex-shrink: 0;
}
.designer .help-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--text-secondary);
    cursor: help;
}

/* Category tabs */
.designer .operation-category-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    padding: 0.25rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    overflow-x: auto;
}
.designer .cat-tab {
    padding: 0.5rem 0.75rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    white-space: nowrap;
    transition: all 0.2s;
}
.designer .cat-tab:hover {
    background: var(--bg-tertiary);
    color: var(--text);
}
.designer .cat-tab.active {
    background: var(--accent);
    color: white;
}

/* Browse layout */
.designer .browse-layout {
    display: block;
}
.designer .operations-list-container {
    overflow-y: auto;
    max-height: 600px;
}

/* Compact operations grid */
.designer .operations-grid.compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

/* =========================================================================
   OPERATION CARDS WITH SLIDE VIEWS
   ========================================================================= */

.designer .operation-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0;
    cursor: default;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.designer .operation-card:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.designer .operation-card.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-light);
}

/* Card views container */
.designer .card-views {
    position: relative;
    min-height: 90px;
    padding: 0.6rem;
}
.designer .card-view {
    display: none;
    animation: cardFadeIn 0.2s ease;
}
.designer .card-view.active {
    display: block;
}
@keyframes cardFadeIn {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* View 0: Default overview */
.designer .card-view[data-view="0"] .category-badge {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    font-size: 0.7em;
    background: var(--accent);
    color: white;
    border-radius: 3px;
    margin-bottom: 0.4rem;
}
.designer .card-view[data-view="0"] h5 {
    margin: 0 0 0.35rem 0;
    font-size: 0.95em;
    color: var(--accent);
}
.designer .card-view[data-view="0"] .description {
    font-size: 0.85em;
    line-height: 1.4;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* View 1: Developer/Code */
.designer .card-view[data-view="1"] .view-label {
    font-size: 0.6em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    margin-bottom: 0.4rem;
    font-weight: 500;
    text-align: center;
}
.designer .card-view[data-view="1"] .dev-syntax {
    background: var(--bg-tertiary);
    padding: 0.3rem 0.5rem;
    border-radius: 3px;
    margin-bottom: 0.3rem;
    text-align: center;
}
.designer .card-view[data-view="1"] .dev-syntax code {
    font-size: 0.7em;
    font-family: 'IBM Plex Mono', monospace;
    color: var(--accent);
    white-space: nowrap;
}
.designer .card-view[data-view="1"] .dev-module {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65em;
    color: var(--text-dim);
    text-align: center;
    word-break: break-all;
}

/* View 2: Evolution context */
.designer .card-view[data-view="2"] .view-label {
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.designer .card-view[data-view="2"] .evo-role {
    font-size: 0.85em;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* Navigation dots */
.designer .card-nav {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border);
}
.designer .nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: all 0.2s;
}
.designer .nav-dot:hover {
    background: var(--text-secondary);
    transform: scale(1.2);
}
.designer .nav-dot.active {
    background: var(--accent);
    transform: scale(1.1);
}

/* Add button */
.designer .card-add-btn {
    display: block;
    width: 100%;
    padding: 0.5rem;
    border: none;
    background: var(--accent);
    color: white;
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.designer .card-add-btn:hover {
    background: var(--accent-hover, #1976d2);
}
.designer .card-add-btn.added {
    background: var(--success, #4caf50);
}

/* =========================================================================
   CONFIGURE TAB - Compact Form Layout
   ========================================================================= */

.designer .config-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.designer .config-header h3 {
    margin: 0 0 0.25rem 0;
}
.designer .config-subtitle {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9em;
}
.designer .preset-quick-select {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.designer .preset-quick-select label {
    font-size: 0.9em;
    color: var(--text-secondary);
}
.designer .preset-quick-select select {
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-secondary);
    color: inherit;
    font-size: 0.9em;
    cursor: pointer;
    transition: border-color 0.2s;
}
.designer .preset-quick-select select:focus {
    outline: none;
    border-color: var(--accent);
}

/* Compact form styles */
.designer .compact-form .form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.designer .compact-form .form-group {
    margin-bottom: 0.75rem;
}
.designer .compact-form .flex-2 { flex: 2; }
.designer .compact-form .flex-3 { flex: 3; }

.designer .compact-form label {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.85em;
    font-weight: 500;
    color: var(--text-secondary);
}
.designer .compact-form input,
.designer .compact-form select {
    width: 100%;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-secondary);
    color: inherit;
    font-size: 0.95em;
}
.designer .compact-form input:focus,
.designer .compact-form select:focus {
    outline: none;
    border-color: var(--accent);
}

/* Form sections */
.designer .form-section {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 6px;
}
.designer .form-section h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.95em;
}
.designer .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.designer .section-header h4 {
    margin: 0;
}
.designer .btn-inline {
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s;
}
.designer .btn-inline:hover {
    background: var(--accent);
    color: white;
}

/* Input row */
.designer .input-row {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}
.designer .selected-proteins-compact {
    flex: 1;
    min-height: 36px;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-tertiary);
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
}
.designer .selected-proteins-compact .empty-hint {
    color: var(--text-muted);
    font-size: 0.9em;
    font-style: italic;
}
.designer .protein-input {
    flex: 1;
    min-width: 200px;
}

/* Param row - all inline */
.designer .param-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.designer .param-inline {
    display: flex;
    flex-direction: column;
    min-width: 100px;
    flex: 1;
}
.designer .param-inline label {
    font-size: 0.8em;
    margin-bottom: 0.15rem;
}
.designer .param-inline input,
.designer .param-inline select {
    padding: 0.35rem 0.5rem;
    font-size: 0.9em;
}

/* Pipeline section compact */
.designer .pipeline-section .section-header {
    display: flex;
    justify-content: space-between;
}
.designer .pipeline-count {
    font-size: 0.85em;
    color: var(--text-secondary);
    padding: 0.2rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
}
.designer .pipeline-config.compact {
    min-height: 60px;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 4px;
}
.designer .pipeline-config.compact .pipeline-stage {
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
}
.designer .pipeline-category-badge {
    font-size: 0.75em;
    padding: 0.15rem 0.4rem;
    background: var(--bg-secondary);
    border-radius: 3px;
    color: var(--text-secondary);
}

/* Actions bar */
.designer .actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    margin-top: 1rem;
}
.designer .action-group {
    display: flex;
    gap: 0.5rem;
}
.designer .btn-action {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    background: var(--bg-tertiary);
    color: inherit;
    transition: all 0.2s;
}
.designer .btn-action:hover {
    background: var(--bg-hover);
}
.designer .btn-action.primary {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}
.designer .btn-action.primary:hover {
    opacity: 0.9;
}
.designer .btn-action.secondary {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}
.designer .btn-action.secondary:hover {
    background: var(--accent);
    color: white;
}

/* Export group compact */
.designer .export-group-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.designer .export-sep {
    color: var(--border);
}
.designer .export-label {
    font-size: 0.85em;
    color: var(--text-secondary);
}
.designer .btn-export-sm {
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    color: inherit;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8em;
    transition: all 0.15s;
}
.designer .btn-export-sm:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Preview panel compact */
.designer .preview-panel {
    margin-top: 1rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    overflow: hidden;
}
.designer .preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}
.designer .preview-header h4 {
    margin: 0;
    font-size: 0.95em;
}
.designer .btn-copy {
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--border);
    background: transparent;
    color: inherit;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.85em;
}
.designer .btn-copy:hover {
    background: var(--bg-tertiary);
}
.designer .preview-panel pre {
    margin: 0;
    padding: 1rem;
    background: var(--bg-tertiary);
    max-height: 300px;
    overflow: auto;
    font-size: 0.85em;
}

/* =========================================================================
   ORIGINAL STYLES (preserved/updated)
   ========================================================================= */

.designer .browse-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 4px;
}
.designer .browse-filters label {
    font-weight: 500;
    margin: 0;
}
.designer .browse-filters select {
    padding: 0.4rem;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--bg-tertiary);
    color: inherit;
}
.designer .operations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}
.designer .pipeline-config .empty {
    color: var(--text-secondary);
    font-style: italic;
}
.designer .pipeline-stage {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
}
.designer .pipeline-stage-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.designer .pipeline-stage-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.9em;
}
.designer .pipeline-stage-title {
    flex: 1;
    font-weight: 600;
    font-size: 1.05em;
}
.designer .pipeline-stage-remove {
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 3px;
    cursor: pointer;
    color: var(--text-secondary);
}
.designer .pipeline-stage-remove:hover {
    background: var(--color-danger);
    color: var(--text-inverse);
    border-color: var(--color-danger);
}
.designer .pipeline-stage-params {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.75rem;
}
.designer .pipeline-stage-params .form-group {
    margin-bottom: 0;
}
.designer .pipeline-stage-params label {
    font-size: 0.9em;
}
.designer .config-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}
.designer .config-actions button {
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}
.designer .config-actions button.primary {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}
.designer .config-actions button.primary:hover {
    opacity: 0.9;
}
.designer .config-actions button.secondary {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}
.designer .config-actions button.secondary:hover {
    background: var(--accent);
    color: white;
}
.designer .config-actions button:not(.primary):not(.secondary) {
    background: var(--bg-secondary);
}
.designer .config-actions button:not(.primary):not(.secondary):hover {
    background: var(--bg-hover);
}
.designer .export-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 4px;
    padding: 1rem;
}
.designer .export-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.designer .export-label {
    min-width: 140px;
    font-weight: 500;
    color: var(--text-secondary);
}
.designer .btn-export {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    background: var(--accent);
    color: white;
    transition: all 0.2s;
}
.designer .btn-export:hover {
    opacity: 0.9;
}
.designer .btn-export.secondary {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}
.designer .btn-export.secondary:hover {
    background: var(--accent);
    color: white;
}
.designer .preview-panel {
    margin-top: 1rem;
    background: var(--bg-secondary);
    border-radius: 4px;
    padding: 1rem;
}
.designer .preview-panel pre {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}
.designer .presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.designer .preset-card {
    background: var(--bg-secondary);
    border-radius: 4px;
    padding: 1rem;
    border: 1px solid var(--border);
}
.designer .preset-card h4 {
    margin: 0 0 0.5rem 0;
}
.designer .preset-card .stages {
    font-family: monospace;
    font-size: 0.9em;
    margin: 0.5rem 0;
}
.designer .preset-card button {
    width: 100%;
    margin-top: 0.5rem;
}

/* protein selector modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}
.modal.active {
    display: flex;
}
.modal-content {
    background: var(--bg);
    border-radius: 8px;
    width: 90%;
    max-width: 900px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 {
    margin: 0;
}
.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}
.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}
.protein-search {
    margin-bottom: 1.5rem;
}
.protein-search input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
}
.protein-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}
.protein-card {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}
.protein-card:hover {
    background: var(--bg-secondary);
    border-color: var(--accent);
}
.protein-card.selected {
    background: var(--accent-light);
    border-color: var(--accent);
}
.protein-card .accession {
    font-family: monospace;
    font-weight: bold;
    font-size: 1.1em;
    color: var(--accent);
    margin-bottom: 0.5rem;
}
.protein-card .name {
    font-size: 0.9em;
    margin-bottom: 0.5rem;
}
.protein-card .organism {
    font-size: 0.85em;
    color: var(--text-muted);
    font-style: italic;
}
.protein-card .meta {
    font-size: 0.8em;
    color: var(--text-muted);
    margin-top: 0.5rem;
    display: flex;
    justify-content: space-between;
}
.selected-proteins {
    min-height: 60px;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.75rem;
}
.selected-proteins .empty {
    margin: 0;
    color: var(--text-muted);
    font-style: italic;
}
.protein-tag {
    display: inline-block;
    background: var(--accent-light);
    border: 1px solid var(--accent);
    border-radius: 16px;
    padding: 0.25rem 0.75rem;
    margin: 0.25rem;
    font-size: 0.9em;
}
.protein-tag .remove {
    margin-left: 0.5rem;
    cursor: pointer;
    font-weight: bold;
    color: var(--danger);
}

/* Small protein tags for compact display */
.protein-tag-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--accent);
    color: white;
    border-radius: 12px;
    padding: 0.15rem 0.5rem;
    font-size: 0.8em;
    font-family: monospace;
}
.protein-tag-sm .remove {
    cursor: pointer;
    font-weight: bold;
    opacity: 0.7;
    font-size: 1.1em;
    line-height: 1;
}
.protein-tag-sm .remove:hover {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .designer .browse-layout {
        grid-template-columns: 1fr;
    }
    .designer .browse-header {
        flex-direction: column;
    }
    .designer .config-header {
        flex-direction: column;
    }
    .designer .actions-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .designer .action-group,
    .designer .export-group-compact {
        justify-content: center;
        flex-wrap: wrap;
    }
    .designer .param-row {
        flex-direction: column;
    }
    .designer .param-inline {
        width: 100%;
    }
}

/* Runtime-sourced parameters */
.designer .runtime-param-group {
    opacity: 0.7;
}

.designer .runtime-param {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.designer .runtime-param input.runtime-sourced {
    background: var(--bg-secondary);
    border: 1px dashed var(--border);
    color: var(--text-secondary);
    cursor: not-allowed;
    font-style: italic;
}

.designer .runtime-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75em;
    color: var(--accent);
    background: var(--accent-light);
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 0.15rem 0.5rem;
    white-space: nowrap;
    font-weight: 500;
}

.designer .runtime-param-group label {
    color: var(--text-secondary);
}

/* ========================================================================= */
/* Run Experiment Modal */
/* ========================================================================= */

#run-modal .modal-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

#run-modal .form-group {
    margin-bottom: 1rem;
}

#run-modal label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

#run-modal select,
#run-modal input[type="text"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface);
    color: var(--text-primary);
}

#run-modal .field-hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

#run-modal .form-inline {
    display: flex;
    align-items: center;
}

#run-modal .checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

#run-modal .form-checkbox {
    margin-right: 0.5rem;
    width: auto;
}

#run-modal .alert {
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 1px solid;
}

#run-modal .alert-warning {
    background: var(--color-warning-lt);
    color: var(--color-warning);
    border-color: rgba(191,117,24,0.35);
}

#run-modal .alert strong {
    display: block;
    margin-bottom: 0.25rem;
}

#run-modal .alert p {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
}

.run-status {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.run-status.loading {
    background: var(--color-info-lt);
    color: var(--color-info);
    border: 1px solid rgba(48,104,160,0.30);
}

.run-status.success {
    background: var(--color-success-lt);
    color: var(--color-success);
    border: 1px solid rgba(42,122,74,0.30);
}

.run-status.error {
    background: var(--color-danger-lt);
    color: var(--color-danger);
    border: 1px solid rgba(179,57,40,0.30);
}

.btn-action.primary-alt {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.btn-action.primary-alt:hover {
    background: linear-gradient(135deg, #5568d3 0%, #63408a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* =========================================================================
   VALIDATION RESULTS PANEL (T-VIEW-003B)
   ========================================================================= */

.designer .validation-panel {
    margin-top: 1rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.designer .validation-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    font-weight: 500;
}

.designer .validation-header.valid {
    background: linear-gradient(90deg, rgba(42,122,74,0.12) 0%, transparent 100%);
}

.designer .validation-header.invalid {
    background: linear-gradient(90deg, rgba(179,57,40,0.12) 0%, transparent 100%);
}

.designer .validation-header .status-icon {
    font-size: 1.2em;
}

.designer .validation-header .status-text {
    flex: 1;
}

.designer .validation-header .status-source {
    font-size: 0.8em;
    color: var(--text-secondary);
    font-weight: normal;
}

.designer .validation-header .close-btn {
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1.2em;
    line-height: 1;
}

.designer .validation-header .close-btn:hover {
    color: var(--text);
}

.designer .validation-summary {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
}

.designer .validation-summary .count {
    font-size: 0.85em;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.designer .validation-summary .count.errors {
    background: rgba(179,57,40,0.15);
    color: var(--color-danger);
}

.designer .validation-summary .count.warnings {
    background: rgba(191,117,24,0.15);
    color: var(--color-warning);
}

.designer .validation-section {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.designer .validation-section:last-child {
    border-bottom: none;
}

.designer .validation-section h5 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9em;
}

.designer .validation-section ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.designer .validation-section li {
    padding: 0.35rem 0;
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.designer .validation-section .check-name {
    font-weight: 500;
    min-width: 120px;
    flex-shrink: 0;
}

.designer .validation-section .check-message {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.designer .validation-section .check-icon {
    flex-shrink: 0;
}

.designer .validation-section.errors li {
    color: var(--color-danger);
}

.designer .validation-section.warnings li {
    color: var(--color-warning);
}

.designer .validation-section.checks .check-item.pass {
    color: var(--color-success);
}

.designer .validation-section.checks .check-item.fail {
    color: var(--color-danger);
}

.designer .validation-section.checks .check-item.warning {
    color: var(--color-warning);
}

/* =========================================================================
   RESOLVED PREVIEW PANEL (T-VIEW-002B)
   ========================================================================= */

.designer .resolved-preview {
    padding: 1rem;
}

.designer .resolved-preview h5 {
    margin: 0 0 0.75rem 0;
    font-size: 1em;
    color: var(--accent);
}

.designer .resolved-preview .preview-section {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.designer .resolved-preview .preview-section:last-of-type {
    margin-bottom: 0;
}

.designer .resolved-preview .preview-section strong {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.9em;
    color: var(--text);
}

.designer .resolved-preview .preview-section ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.designer .resolved-preview .preview-section li {
    padding: 0.2rem 0;
    font-size: 0.85em;
    color: var(--text-secondary);
}

.designer .resolved-preview .preview-section code {
    background: var(--bg-secondary);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-size: 0.9em;
    color: var(--accent);
}

.designer .resolved-preview .bindings-status li {
    display: flex;
    gap: 0.5rem;
}

.designer .resolved-preview hr {
    margin: 1rem 0;
    border: none;
    border-top: 1px solid var(--border);
}

.designer .resolved-preview + pre {
    margin: 0;
    padding: 1rem;
    background: var(--bg-tertiary);
    font-size: 0.85em;
    max-height: 200px;
    overflow: auto;
}
