/* Import original app styles from _claude-grimoire */
/* === Color Palette === */
:root {
    --bg-deep: #0c0d14;
    --bg-base: #12131c;
    --bg-surface: #1a1c28;
    --bg-elevated: #232636;
    --bg-hover: #2b2f42;

    --border: #2a2d3e;
    --border-hover: #3a3e54;

    --text-primary: #e8ebf4;
    --text-secondary: #a4a9c0;
    --text-muted: #686e8a;
    --text-faint: #464c66;

    --accent: #7b6cf0;
    --accent-hover: #6a5bdf;
    --accent-subtle: #b0a4ff;
    --accent-bg: #1d1a33;

    --success: #4fd1a3;
    --success-bg: #132a22;
    --success-border: #256046;

    --error: #f07070;
    --error-bg: #2b1520;
    --error-border: #5a2a38;

    --warning: #e8a84c;

    --run: #3db87a;
    --run-hover: #4dca8a;

    --radius: 8px;
    --radius-sm: 5px;
}

.cco-app {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-transparent);
    color: var(--text-primary);
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
        Arial, sans-serif;
    -webkit-user-select: none;
    user-select: none;
}

.cco-app input,
.cco-app textarea,
.cco-app .commit-message,
.cco-app .success-message,
.cco-app .item-description,
.cco-app .info-section,
.cco-app code,
.cco-app pre {
    -webkit-user-select: text;
    user-select: text;
}

/* === Startup Dialogs (License / Directory Chooser) === */
.dir-dialog-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 9, 14, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1000;
}

.dir-dialog {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 440px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.dir-dialog h2 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.dir-dialog p {
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.dir-dialog a {
    color: var(--accent-subtle);
    text-decoration: none;
}

.dir-dialog a:hover {
    text-decoration: underline;
}

.dir-dialog-default {
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-bottom: 16px;
}

.dir-dialog-path {
    font-family: "SF Mono", Menlo, Monaco, "Courier New", monospace;
    font-size: 13px;
    color: var(--text-primary);
    word-break: break-all;
}

.dir-dialog-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.dir-dialog-hint {
    margin-top: 14px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

.path-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    flex-shrink: 0;
}

.path-label {
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.path-change-btn,
.path-reset-btn {
    padding: 3px 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.path-change-btn:hover,
.path-reset-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.update-badge {
    margin-left: auto;
    padding: 3px 12px;
    background: linear-gradient(135deg, #e8a84c, #f0c060, #e8a84c);
    background-size: 200% 200%;
    animation: shimmer 2s ease-in-out infinite;
    border: 1px solid #e8a84c;
    border-radius: var(--radius-sm);
    color: #0c0d14;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    filter: brightness(.85) contrast(2);
}

.update-badge:hover {
    filter: brightness(1) contrast(2);
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.tab-header {
    display: flex;
    flex-wrap: wrap;
    flex-shrink: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.tab-button {
    flex: 1 1 0;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.tab-button:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.tab-button.active {
    color: var(--accent-subtle);
    border-bottom-color: var(--accent);
    background: var(--bg-hover);
}

.refresh-button {
    flex: 0 0 auto;
    border-left: 1px solid var(--border);
    color: var(--success);
    min-width: 100px;
}

.refresh-button:hover {
    background: var(--success-bg);
    color: var(--success);
}

.refresh-spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.sync-indicator {
    position: absolute;
    top: 60px;
    right: 20px;
    background: var(--accent);
    color: white;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    animation: pulse 1.5s infinite;
    z-index: 100;
}

@keyframes pulse {
    0% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.8;
    }
}

.tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    position: relative;
}

.refresh-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.refresh-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    backdrop-filter: blur(2.5px);
    -webkit-backdrop-filter: blur(2.5px);
    background: rgba(12, 13, 20, 0.25);
    filter: brightness(0.5);
}

.refresh-overlay-btn {
    position: relative;
    padding: 12px 28px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--success);
    font-size: 15px;
    font-weight: 500;
    cursor: default;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.tab-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.tab-header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.tab-header-controls h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 600;
}

.tab-subtitle {
    font-size: 14px;
    font-weight: 400;
    font-style: italic;
    color: var(--text-secondary);
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

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

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

.btn-primary:disabled {
    background: var(--bg-hover);
    color: var(--text-faint);
    cursor: not-allowed;
}

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

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

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-deep);
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
}

textarea {
    resize: vertical;
    font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
    line-height: 1.5;
}

/* Editor Panel */
.editor-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.editor-panel h3 {
    margin: 0 0 20px 0;
    color: var(--text-primary);
    font-size: 18px;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Advanced Accordion */
.advanced-accordion {
    margin-top: 16px;
    border-top: 1px solid var(--border);
    padding-top: 8px;
}

.advanced-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 0;
    transition: color 0.15s;
}

.advanced-toggle:hover {
    color: var(--text-secondary);
}

.advanced-arrow {
    display: inline-block;
    font-size: 10px;
    transition: transform 0.15s;
}

.advanced-arrow.open {
    transform: rotate(90deg);
}

.advanced-content {
    padding-top: 8px;
}

/* List Panel */
.list-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state p {
    margin: 0 0 20px 0;
    font-size: 16px;
}

.item-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.item-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    transition: all 0.2s;
    overflow: hidden;
}

.item-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.item-header h4 {
    margin: 0;
    color: var(--accent-subtle);
    font-size: 16px;
    font-weight: 600;
}

.item-actions {
    display: flex;
    gap: 8px;
}

.item-actions button {
    padding: 4px 10px;
    background: var(--bg-hover);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.item-actions button:hover {
    background: var(--border-hover);
    color: var(--text-primary);
}

.item-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 4px 0 0;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-meta {
    display: flex;
    gap: 16px;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-meta span {
    display: flex;
    align-items: center;
}

/* Prompt Preview */
.prompt-preview {
    background: var(--bg-deep);
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-top: 12px;
    color: var(--text-secondary);
    font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
    font-size: 13px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 150px;
    overflow-y: auto;
}

/* Export/Import Tab */
.export-import-container {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

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

.section h3 {
    margin: 0 0 16px 0;
    color: var(--text-primary);
    font-size: 18px;
}

.section p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 16px 0;
}

.divider {
    background: var(--border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-deep);
    border-radius: var(--radius-sm);
}

.stat-label {
    color: var(--text-muted);
    font-size: 13px;
}

.stat-value {
    color: var(--accent-subtle);
    font-weight: bold;
    font-size: 14px;
}

.input-group {
    display: flex;
    gap: 8px;
}

.input-group input {
    flex: 1;
}

.success-message {
    margin-top: 12px;
    padding: 8px 12px;
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    border-radius: var(--radius-sm);
    color: var(--success);
    font-size: 13px;
}

.warning {
    color: var(--warning);
    font-size: 13px;
    margin: 12px 0;
}

.info-section {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.info-section h3 {
    margin: 0 0 16px 0;
    color: var(--text-primary);
    font-size: 16px;
}

.info-section ul {
    margin: 0;
    padding-left: 24px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
}

.info-section li {
    margin-bottom: 8px;
}

/* Loading and Error States */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: var(--text-muted);
    font-size: 16px;
}

.error {
    padding: 20px;
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    border-radius: var(--radius);
    color: var(--error);
    text-align: center;
    font-size: 14px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* Run Button and Prompt Container */
.btn-run {
    background: var(--run) !important;
    color: white !important;
    font-weight: bold;
}

.btn-run:hover {
    background: var(--run-hover) !important;
}

.run-prompt-container {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-deep);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.run-prompt {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    resize: vertical;
    margin-bottom: 12px;
}

.run-prompt:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-deep);
}

.run-directory-picker {
    margin-bottom: 12px;
}

.run-directory-picker label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.run-directory-input {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    cursor: pointer;
}

.dir-save-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-self: stretch;
    gap: 2px;
}

.dir-save-option {
    display: flex;
    align-items: center;
    gap: 3px;
    color: var(--text-secondary);
    font-size: 11px;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1;
}

.dir-save-option input[type="radio"] {
    accent-color: var(--accent);
    margin: 0;
}

.skip-permissions-option {
    display: flex;
    align-items: center;
    gap: 6px;
    color: orange;
    font-size: 12px;
    cursor: pointer;
    margin-bottom: 8px;
}

.skip-permissions-option input[type="checkbox"] {
    accent-color: orange;
    margin: 0;
}

/* Agent Sequencer (Pipeline drag-and-drop) */
.agent-sequencer {
    margin-top: 16px;
}

.agent-seq-section {
    margin-bottom: 16px;
}

.agent-seq-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.agent-seq-item-joiner {
    border-color: rgba(123, 108, 240, 0.3);
    background: var(--accent-bg);
}

.agent-seq-joiner-badge {
    flex-shrink: 0;
    padding: 4px 10px;
    background: var(--accent);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.agent-seq-step-prompt {
    flex: 1;
    padding: 6px 10px;
    background: var(--bg-base);
    border: 1px solid rgba(123, 108, 240, 0.3);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    box-sizing: border-box;
    min-width: 0;
}

.agent-seq-step-prompt:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-deep);
}

.agent-seq-step-prompt::placeholder {
    color: var(--text-faint);
}

.agent-seq-add-joiner {
    background: var(--accent-bg) !important;
    border-color: var(--accent) !important;
    color: var(--accent-subtle) !important;
}

.agent-seq-add-joiner:hover {
    background: rgba(123, 108, 240, 0.15) !important;
}

.pipeline-joiner-badge {
    display: inline-block;
    padding: 2px 8px;
    background: var(--accent-bg);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    color: var(--accent-subtle);
    font-size: 12px;
    font-weight: 600;
}

.agent-seq-empty-inline {
    color: var(--text-faint);
    font-size: 13px;
    padding: 6px 0;
}

.agent-seq-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-faint);
    font-size: 13px;
    background: var(--bg-deep);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
}

.agent-seq-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.agent-seq-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: grab;
    transition:
        border-color 0.15s,
        background 0.15s;
}

.agent-seq-item:active {
    cursor: grabbing;
}

.agent-seq-item.dragging {
    opacity: 0.4;
}

.agent-seq-item.drag-over {
    border-color: var(--accent);
    background: var(--accent-bg);
}

.agent-seq-handle {
    color: var(--text-faint);
    font-size: 14px;
    flex-shrink: 0;
}

.agent-seq-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.agent-seq-info {
    flex: 1;
    min-width: 0;
}

.agent-seq-name {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.agent-seq-desc {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-seq-pipe {
    color: var(--accent);
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
}

.agent-seq-remove {
    background: none;
    border: none;
    color: var(--text-faint);
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.15s;
}

.agent-seq-remove:hover {
    color: var(--error);
}

.agent-seq-available {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.agent-seq-add-btn {
    padding: 6px 12px;
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    border-radius: var(--radius-sm);
    color: var(--success);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}

.agent-seq-add-btn:hover {
    background: rgba(79, 209, 163, 0.15);
    border-color: var(--success);
}

/* Pipeline agent display in list view */
.pipeline-agents-display {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.pipeline-agent-badge {
    display: inline-block;
    padding: 2px 8px;
    background: var(--accent-bg);
    border: 1px solid rgba(123, 108, 240, 0.3);
    border-radius: var(--radius-sm);
    color: var(--accent-subtle);
    font-size: 12px;
}

.pipeline-arrow {
    color: var(--text-faint);
    margin: 0 2px;
    font-size: 12px;
}

/* Backup History Tab */
.backup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.backup-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.backup-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.backup-toggle-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--accent);
}

.backup-toggle-label input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.backup-status {
    font-size: 13px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}

.backup-status.status-ok {
    color: var(--success);
    background: var(--success-bg);
}

.backup-status.status-off {
    color: var(--text-muted);
    background: var(--bg-hover);
}

.backup-actions {
    display: flex;
    gap: 8px;
}

.btn-danger {
    color: var(--error) !important;
    border: 1px solid var(--error-border);
}

.btn-danger:hover {
    background: var(--error-bg) !important;
}

.commit-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

.commit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s;
}

.commit-item:hover {
    border-color: var(--border-hover);
}

.commit-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
    margin-right: 12px;
}

.commit-message {
    color: var(--text-primary);
    font-size: 14px;
    font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.commit-date {
    color: var(--text-muted);
    font-size: 12px;
}

/* === Demo-specific resets === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  background: var(--bg-deep);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-primary);
  overflow-x: hidden;
}
/* === Particles background (same as original app's index.css) === */
#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: var(--bg-base, #12131c);
  filter: brightness(1.45) saturate(0.65) contrast(1.15);
}
#root {
  position: relative;
  z-index: 1;
}
/* === Override .cco-app for iframe/demo context === */
.cco-app {
  position: relative;
  z-index: 1;
  height: auto;
  min-height: 100vh;
  background: transparent;
  overflow: visible;
  -webkit-user-select: auto;
  user-select: auto;
}
/* === Popup success styling === */
.popup-dialog {
  text-align: center;
}
.popup-dialog h2 {
  font-size: 24px;
}
/* === Confetti canvas === */
#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2000;
}
/* === Mobile: 768px === */
@media (max-width: 768px) {
  .tab-content {
    padding: 14px;
  }
  .tab-header-controls h2 {
    font-size: 20px;
  }
  .item-card {
    padding: 10px 12px;
  }
  .item-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .item-actions {
    width: 100%;
  }
  .item-actions button {
    flex: 1;
    text-align: center;
  }
  .form-group textarea {
    min-height: 100px;
  }
}
/* === Mobile: 640px === */
@media (max-width: 640px) {
  .tab-button {
    padding: 10px 8px;
    font-size: 12px;
  }
  .tab-header-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .tab-header-controls .btn-primary {
    width: 100%;
  }
  .tab-header-controls h2 {
    font-size: 18px;
  }
  .item-meta {
    flex-direction: column;
    gap: 2px;
  }
  .item-description {
    white-space: normal;
  }
  .pipeline-agents-display {
    flex-wrap: wrap;
    gap: 6px;
  }
  .editor-panel {
    padding: 12px;
  }
  .button-group {
    flex-direction: column;
  }
  .button-group button {
    width: 100%;
  }
}
