/* Tasks Tab Styles */

/* Page header */
.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 24px; font-weight: 700; color: #1e293b; display: flex; align-items: center; gap: 12px; margin: 0 0 6px 0; }
.page-header h1 i { color: #6366f1; }
.page-subtitle { color: #64748b; font-size: 14px; margin: 0; }

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

.tasks-container {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    min-height: 400px;
}

.tasks-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}

.filter-buttons {
    display: flex;
    gap: 8px;
}

.filter-btn {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
}

.filter-btn:hover {
    background: #f1f5f9;
    color: #334155;
}

.filter-btn.active {
    background: #6366f1;
    border-color: #6366f1;
    color: #ffffff;
}

.task-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.task-item {
    border-bottom: 1px solid #b9c1c9;
    transition: background-color 0.15s ease;
    margin-bottom: 34px;
    border-top: 1px solid #b9c1c9;
    background: #fafbfc;
}

.task-item:last-child {
    border-bottom: none;
}

.task-item:hover {
    background-color: #fcfcfc;
}

.task-content {
    padding: 20px 24px;
}

.task-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.task-description {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
    color: #334155;
    word-break: break-word;
    overflow-wrap: break-word;
}

.task-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.status-pending { background: #fef3c7; color: #92400e; }
.status-in_progress { background: #dbeafe; color: #1e40af; }
.status-completed { background: #dcfce7; color: #166534; }
.status-cancelled { background: #f1f5f9; color: #64748b; }
.status-pending_approval { background: #ffedd5; color: #9a3412; }
.status-queued { background: #e0e7ff; color: #3730a3; }
.status-failed { background: #fee2e2; color: #991b1b; }

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.task-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
    padding: 4px 8px;
    background: #f8fafc;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.task-actions {
    display: flex;
    gap: 4px;
}

.task-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: #94a3b8;
    transition: all 0.15s;
}

.task-action-btn:hover {
    background: #f1f5f9;
    color: #475569;
}

.task-action-btn.edit:hover { color: #3b82f6; background: #eff6ff; }
.task-action-btn.delete:hover { color: #ef4444; background: #fef2f2; }
.task-action-btn.restart:hover { color: #f59e0b; background: #fffbeb; }
.task-action-btn.approve:hover { color: #10b981; background: #dcfce7; }
.task-action-btn.queue:hover { color: #6366f1; background: #e0e7ff; }

.subtask-list {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-left: 24px;
    border-left: 2px solid #e2e8f0;
}

.subtask-list .task-item {
    border-bottom: 1px solid #f1f5f9;
}

.task-buttons {
    display: flex;
    gap: 8px;
    padding: 12px 24px;
    border-top: 1px solid #f1f5f9;
    background: #fafbfc;
}

.task-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #475569;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.task-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

/* Tile Selector for Modal */
.tile-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
    padding: 4px;
}

/* Folder tiles green style */
.folder-tiles-container .selection-tile.folder-tile {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.folder-tiles-container .selection-tile.folder-tile:hover {
    border-color: #86efac;
    background: #dcfce7;
}

.folder-tiles-container .selection-tile.folder-tile i {
    color: #16a34a;
}

.folder-tiles-container .selection-tile.folder-tile span {
    color: #15803d;
}

.folder-tiles-container .selection-tile.folder-tile.selected {
    border-color: #16a34a;
    background: #dcfce7;
}

.folder-tiles-container .selection-tile.folder-tile.selected i {
    color: #15803d;
}

.selection-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.selection-tile:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.selection-tile.selected {
    border-color: #6366f1;
    background: #eef2ff;
}

.selection-tile i {
    font-size: 20px;
    margin-bottom: 8px;
    color: #64748b;
}

.selection-tile.selected i {
    color: #6366f1;
}

.selection-tile span {
    font-size: 11px;
    font-weight: 600;
    color: #334155;
    line-height: 1.2;
}

/* History Logs Containers */
.history-container {
    margin-top: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0;
    color: #334155;
    font-size: 13px;
    overflow-y: auto;
    display: none;
}

.history-loading {
    padding: 20px;
    text-align: center;
    color: #94a3b8;
}

.history-error {
    padding: 20px;
    text-align: center;
    color: #ef4444;
}

/* Terminal History Styles */
.terminal-window {
    background-color: #1a1a1a;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    overflow: hidden;
    margin: 10px;
}

.terminal-header {
    background-color: #333333;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    color: #ddd;
    font-weight: bold;
}

.terminal-content {
    padding: 10px 15px;
    color: #f9f9f9;
    min-height: 100px;
}

.terminal-section {
    margin-bottom: 15px;
}

.terminal-prompt {
    color: #f1f1f1;
    margin-bottom: 5px;
}

.terminal-user { color: #4ade80; }
.terminal-host { color: #60a5fa; }
.terminal-path { color: #c4b5fd; }
.terminal-command { font-weight: bold; }

.terminal-stdout {
    color: #f1f1f1;
    background-color: #2a2a2a;
    padding: 8px;
    border-radius: 4px;
    white-space: pre-wrap;
    margin: 5px 0;
}

.terminal-stderr {
    color: #ef4444;
    background-color: #2a2a2a;
    padding: 8px;
    border-radius: 4px;
    white-space: pre-wrap;
    margin: 5px 0;
}

/* Developer, Database, Presentation, Document, Video Panels */
.developer-panel, .database-panel, .presentation-panel, .document-panel, .video-panel {
    background-color: #f8fafc;
    margin: 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.developer-header, .database-header, .presentation-header, .document-header, .video-header {
    padding: 10px 15px;
    background-color: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 10px;
}

.developer-section, .database-section, .presentation-section, .document-section, .video-section {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.developer-action-header, .database-operation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.action-type, .operation-type {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-status, .operation-status {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.action-status.success, .operation-status.success { background: #dcfce7; color: #166534; }
.action-status.failure, .operation-status.failure { background: #fee2e2; color: #991b1b; }

.file-path, .database-value {
    font-family: monospace;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    color: #0f172a;
}

.content-toggle {
    background: #e2e8f0;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: #475569;
    width: 100%;
    text-align: left;
    margin-top: 10px;
}

.content-toggle:hover { background: #cbd5e1; }

.file-content-container, .sql-container, .result-container {
    display: none;
    margin-top: 10px;
}

.file-content-container.expanded, .sql-container.expanded, .result-container.expanded {
    display: block;
}

.code-content, .sql-content {
    background: #f8fafc;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-family: monospace;
    white-space: pre-wrap;
    overflow-x: auto;
}

/* QA History Styles */
.qa-panel {
    margin: 10px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.qa-header {
    background: #6366f1; /* Flat Indigo */
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.qa-section {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.qa-test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.test-type {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.test-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.test-status.success { background: #dcfce7; color: #166534; }
.test-status.failure { background: #fee2e2; color: #991b1b; }
.test-status.partial { background: #ffedd5; color: #9a3412; }

.qa-test-summary {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.test-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    text-align: center;
}

.qa-metric-label {
    display: block;
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.qa-metric-value {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

.qa-metric-value.success { color: #10b981; }
.qa-metric-value.error { color: #ef4444; }

.qa-issues-summary {
    background: #fff5f5;
    border-left: 4px solid #ef4444;
    padding: 15px;
    margin-top: 15px;
    border-radius: 4px;
}

.issues-breakdown {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.issue-metric { display: flex; align-items: center; gap: 6px; }
.issue-metric.critical .issue-value { color: #ef4444; font-weight: 700; }
.issue-metric.high .issue-value { color: #f97316; font-weight: 700; }

/* QA Report Styles */
.qa-report {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    margin: 20px 0;
    overflow: hidden;
}

.qa-report-header {
    background: #6366f1; /* Flat Indigo */
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
}

.qa-report-header h3 {
    margin: 0 0 15px 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.qa-report-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9rem;
}

.qa-scenarios {
    padding: 25px;
    background: #f8f9fa;
}

.qa-scenarios-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 20px;
}

.qa-scenario-item {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.qa-scenario-header {
    padding: 15px 20px;
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.qa-scenario-number {
    background: #4a6baf;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.qa-scenario-name {
    flex: 1;
    font-weight: 600;
    color: #2d3748;
}

.badge-success { background: #10b981; color: white; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge-error { background: #ef4444; color: white; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge-warning { background: #f59e0b; color: white; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; }

.qa-scenario-details { padding: 20px; }
.qa-scenario-description { color: #64748b; margin-bottom: 15px; line-height: 1.6; }

.qa-screenshots-gallery {
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.qa-screenshot-thumb {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 16/9;
    background: #f1f5f9;
}

.qa-screenshot-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qa-screenshot-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 6px;
    font-size: 10px;
}

/* Security Analysis Styles */
.security-panel {
    margin: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.security-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.security-controls {
    display: flex;
    align-items: center;
}

.security-icon {
    font-size: 32px;
    color: #7c3aed;
}

.security-title-section {
    flex: 1;
}

.security-session-id {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    font-family: 'Courier New', monospace;
    margin-bottom: 8px;
}

.security-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #666;
}

.security-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.security-meta i {
    color: #999;
}

.security-summary {
    margin-bottom: 25px;
}

.severity-counts {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.severity-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

.severity-badge.critical { background: #ef4444; }
.severity-badge.high { background: #f97316; }
.severity-badge.medium { background: #eab308; color: #334155; }
.severity-badge.low { background: #22c55e; }
.severity-badge.info { background: #3b82f6; }

.security-section-header {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    padding: 10px 15px;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.security-section-header i {
    color: #7c3aed;
}

/* Security Stages */
.security-stages {
    margin-bottom: 30px;
}

.security-stage {
    background: white;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid #e0e0e0;
}

.security-stage.completed { border-left-color: #22c55e; }
.security-stage.failed { border-left-color: #dc2626; }
.security-stage.in_progress, .security-stage.in-progress { border-left-color: #eab308; }
.security-stage.pending { border-left-color: #94a3b8; }

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

.stage-number {
    background: #7c3aed;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.stage-name {
    flex: 1;
    font-weight: 600;
    color: #333;
}

.stage-status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.stage-status-badge.completed { background: #dcfce7; color: #166534; }
.stage-status-badge.failed { background: #fee2e2; color: #991b1b; }
.stage-status-badge.in_progress, .stage-status-badge.in-progress { background: #fef3c7; color: #92400e; }
.stage-status-badge.pending { background: #f1f5f9; color: #475569; }
.stage-status-badge.skipped { background: #f1f5f9; color: #94a3b8; }

.stage-description {
    color: #666;
    font-size: 13px;
    margin-bottom: 10px;
    line-height: 1.5;
}

.stage-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #999;
}

.stage-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Security Filters */
.security-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.security-filter-btn {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.security-filter-btn:hover {
    border-color: #7c3aed;
    background: #f5f3ff;
}

.security-filter-btn.active {
    border-color: #7c3aed;
    background: #7c3aed;
    color: white;
}

/* Security Issues */
.security-issues {
    margin-bottom: 20px;
}

.security-issues-list {
    display: grid;
    gap: 15px;
}

.security-issue-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border-left: 6px solid #e0e0e0;
    transition: box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.security-issue-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.security-issue-card.critical { border-left-color: #ef4444; }
.security-issue-card.high { border-left-color: #f97316; }
.security-issue-card.medium { border-left-color: #eab308; }
.security-issue-card.low { border-left-color: #22c55e; }
.security-issue-card.info { border-left-color: #3b82f6; }

.issue-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.issue-id-title {
    flex: 1;
}

.issue-id {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    display: block;
    margin-bottom: 5px;
}

.issue-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.vulnerability-type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 12px;
}

.issue-description {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.affected-files-section {
    margin-bottom: 15px;
}

.section-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.affected-files-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.file-tag {
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    color: #475569;
}

.details-toggle {
    width: 100%;
    padding: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    transition: all 0.2s;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.details-toggle:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.issue-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.issue-details.collapsed {
    display: none;
}

.issue-detail-section {
    margin-bottom: 20px;
}

.detail-label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-label i {
    color: #7c3aed;
}

.detail-content {
    color: #555;
    font-size: 13px;
    line-height: 1.7;
    background: #f8fafc;
    padding: 12px;
    border-radius: 6px;
}

.code-snippet {
    background: #1e293b;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    overflow-x: auto;
    margin: 0;
    white-space: pre-wrap;
}

.standards-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.standard-tag {
    background: #7c3aed;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.security-no-issues {
    text-align: center;
    padding: 40px;
    color: #22c55e;
    font-size: 16px;
    font-weight: 600;
}

.security-no-issues i {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
}

.security-empty {
    padding: 40px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.affected-file {
    display: inline-block;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 11px;
    margin-right: 5px;
}

/* Analytical Styles */
.analytical-panel {
    margin: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.analytical-header {
    background: #6366f1; /* Flat Indigo */
    color: white;
    padding: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.analytical-summary {
    background: #f8fafc;
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.summary-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.metric-item { display: flex; align-items: center; gap: 8px; }
.metric-value { font-weight: 700; color: #1e293b; }

.iteration-item {
    background: #f8fafc;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #e2e8f0;
}

.iteration-header {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 8px;
    color: #6366f1;
}

.sql-query-item {
    background: white;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    margin-top: 8px;
}

.sql-query-text code {
    display: block;
    background: #1e293b;
    color: #e2e8f0;
    padding: 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    overflow-x: auto;
}

/* Database Details */
.database-details {
    margin: 10px 0;
    padding: 8px 12px;
    background-color: #f8fafc;
    border-radius: 4px;
    border-left: 3px solid #0ea5e9;
}

.database-info {
    display: flex;
    margin-bottom: 5px;
}

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

.database-label {
    font-weight: 600;
    width: 80px;
    flex-shrink: 0;
    color: #475569;
}

.database-value {
    color: #0f172a;
    font-family: monospace;
}

/* SQL Container */
.sql-container {
    margin-top: 10px;
}

.sql-query-section {
    margin: 10px 0;
}

.sql-header {
    font-weight: 600;
    margin-bottom: 5px;
    color: #64748b;
}

.sql-content {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 12px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
}

/* Result Summary */
.result-summary {
    margin: 10px 0;
    padding: 10px;
    background-color: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 4px;
}

.summary-header {
    font-weight: 600;
    color: #0ea5e9;
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.summary-header i {
    margin-right: 8px;
}

.summary-content {
    color: #0c4a6e;
    white-space: pre-line;
}

/* Result Table */
.result-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 13px;
}

.result-table th {
    background-color: #f1f5f9;
    color: #1e293b;
    font-weight: 600;
    text-align: left;
    padding: 10px;
    border: 1px solid #e2e8f0;
}

.result-table td {
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    color: #334155;
}

.result-table tr:nth-child(even) {
    background-color: #f8fafc;
}

.result-table tr:hover {
    background-color: #f1f5f9;
}

.empty-result {
    padding: 15px;
    text-align: center;
    color: #64748b;
    font-style: italic;
}

.result-raw {
    background-color: #f8fafc;
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
}

.result-raw pre {
    margin: 0;
    white-space: pre-wrap;
    color: #334155;
    font-family: monospace;
}

/* Schema Result Container */
.schema-result-container {
    background-color: #f8fafc;
    border-radius: 6px;
    padding: 0;
    margin: 15px 0;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.schema-section {
    margin-bottom: 1px;
}

.schema-section:last-child {
    margin-bottom: 0;
}

.schema-section-header {
    background-color: #f1f5f9;
    padding: 12px 15px;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
}

.schema-section-header i {
    margin-right: 10px;
    color: #3b82f6;
}

.schema-section-header.toggleable {
    cursor: pointer;
    transition: background-color 0.2s;
}

.schema-section-header.toggleable:hover {
    background-color: #e2e8f0;
}

.item-count {
    font-size: 0.85em;
    color: #64748b;
    margin-left: 8px;
}

.toggle-icon {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.schema-section-content {
    padding: 15px;
    background-color: #f8fafc;
    overflow: hidden;
    transition: max-height 0.3s ease;
    max-height: 2000px;
}

.schema-section-content.collapsed {
    max-height: 0;
    padding: 0 15px;
    display: none;
}

.schema-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.schema-list-item {
    padding: 16px 12px;
    margin-bottom: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    min-height: 60px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.schema-list-item:last-child {
    margin-bottom: 0;
}

.operation-tag {
    background-color: #e0f2fe;
    color: #0369a1;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
    margin-right: 12px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    min-width: 80px;
    justify-content: center;
}

.object-name {
    font-weight: 600;
    color: #1e293b;
    margin-right: 12px;
    font-family: monospace;
    font-size: 0.95em;
}

.change-description {
    color: #64748b;
    flex: 1;
    font-size: 0.9em;
    line-height: 1.4;
}

.sql-item {
    margin-bottom: 15px;
    background-color: #f8fafc;
    border-radius: 4px;
    overflow: hidden;
}

.sql-item:last-child {
    margin-bottom: 0;
}

.sql-item-header {
    background-color: #f1f5f9;
    padding: 6px 10px;
    font-size: 0.9em;
    display: flex;
    align-items: center;
}

.sql-item-number {
    background-color: #3b82f6;
    color: white;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.85em;
    font-weight: 600;
    margin-right: 10px;
}

.sql-item-table {
    font-family: monospace;
    font-weight: 600;
    color: #334155;
}

.sql-item-content {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 12px;
    margin: 0;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre-wrap;
}

.execution-order-list {
    padding-left: 20px;
    margin: 0;
}

.execution-order-list li {
    padding: 6px 0;
    color: #334155;
}

.considerations-list {
    padding-left: 20px;
    margin: 0;
}

.considerations-list li {
    padding: 6px 0;
    color: #334155;
}

/* Error Message */
.error-message {
    margin: 10px 0;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 4px;
    padding: 10px;
}

.error-header {
    font-weight: 600;
    color: #ef4444;
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.error-header i {
    margin-right: 8px;
}

.error-content {
    color: #b91c1c;
    white-space: pre-line;
}

/* Execution Meta */
.execution-meta {
    margin-top: 10px;
    font-size: 12px;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.execution-time, .execution-duration, .affected-rows {
    display: inline-flex;
    align-items: center;
}

.affected-rows {
    font-weight: 600;
    color: #475569;
}

.database-separator {
    height: 1px;
    background-color: #e2e8f0;
    margin: 15px 0 0 0;
}

.database-content {
    padding: 0;
    color: #334155;
}

/* Task Loading Animation */
.task-loading-animation {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 6px;
}

.task-loading-animation .dot {
    width: 4px;
    height: 4px;
    background-color: currentColor;
    border-radius: 50%;
    animation: taskPulse 1.4s infinite ease-in-out;
}

.task-loading-animation .dot:nth-child(1) { animation-delay: -0.32s; }
.task-loading-animation .dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes taskPulse {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* CodeMirror Merge View overrides */
.CodeMirror-merge {
    border: 1px solid #e2e8f0;
    height: 400px;
}
.CodeMirror-merge .CodeMirror {
    height: 400px;
}

/* History buttons in meta */
.history-btn {
    cursor: pointer;
    border: none;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.2s;
    color: white;
}

.history-btn.terminal { background: #475569; }
.history-btn.terminal:hover { background: #334155; }

.history-btn.developer { background: #2563eb; }
.history-btn.developer:hover { background: #1d4ed8; }

.history-btn.database { background: #0891b2; }
.history-btn.database:hover { background: #0e7490; }

.history-btn.presentation { background: #dc2626; }
.history-btn.presentation:hover { background: #b91c1c; }

.history-btn.document { background: #2563eb; }
.history-btn.document:hover { background: #1d4ed8; }

.history-btn.video { background: #7c3aed; }
.history-btn.video:hover { background: #6d28d9; }

.history-btn.qa { background: #7c3aed; }
.history-btn.qa:hover { background: #6d28d9; }

.history-btn.testcase { background: #0d9488; }
.history-btn.testcase:hover { background: #0f766e; }

.history-btn.security { background: #7c3aed; }
.history-btn.security:hover { background: #6d28d9; }

.history-btn.analytical { background: #4f46e5; }
.history-btn.analytical:hover { background: #4338ca; }

.task-result-explanation {
    margin-top: 12px;
    padding: 12px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    font-size: 13px;
    color: #0369a1;
    line-height: 1.5;
}

/* Test Case Agent Styles */
.testcase-panel {
    margin: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #c2cac8;
    overflow: hidden;
}

.testcase-header {
    background-color: #215c23;
    color: white;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-weight: 600;
}

.testcase-header-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.testcase-session-id {
    font-size: 12px;
    font-family: 'Courier New', monospace;
    opacity: 0.85;
}

.testcase-content {
    padding: 20px;
    color: #334155;
}

.testcase-summary {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.testcase-stat {
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 90px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.testcase-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #0f766e;
}

.testcase-stat-label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    margin-top: 4px;
}

.testcase-exec-info {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #666;
    margin-bottom: 20px;
    padding: 10px 15px;
    background: #f8fafc;
    border-radius: 6px;
    flex-wrap: wrap;
}

.testcase-exec-info span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.testcase-exec-info i {
    color: #999;
}

.testcase-group {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.testcase-group-header {
    padding: 14px 18px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.testcase-group-header:hover { background: #f1f5f9; }

/* Stage Section Styles */
.testcase-stage-section {
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.testcase-stage-header {
    padding: 14px 18px;
    background: #f0fdf4;
    border-bottom: 2px solid #bbf7d0;
    display: flex;
    align-items: center;
}

.testcase-stage-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #166534;
    font-size: 14px;
}

.testcase-stage-number {
    background: #166534;
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.testcase-stage-category {
    background: #dcfce7;
    color: #166534;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.testcase-stage-section .testcase-group {
    margin-bottom: 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: none;
}

.testcase-stage-section .testcase-group:last-child {
    border-bottom: none;
}

.testcase-group-title {
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.testcase-group-badge {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.testcase-group-toggle-icon {
    color: #94a3b8;
    transition: transform 0.2s;
}

.testcase-list {
    max-height: 0;
    overflow: hidden;
    padding: 0;
    transition: max-height 0.3s ease;
}

.testcase-list.expanded {
    max-height: 10000px;
    overflow: visible;
}

.testcase-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 16px;
    padding: 16px;
}

.testcase-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.testcase-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.testcase-card-header {
    padding: 14px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.testcase-card-badges {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    align-items: center;
}

.testcase-type-badge {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    background: #e0f2fe;
    color: #0369a1;
    flex-shrink: 0;
}

.testcase-preconditions {
    margin-bottom: 12px;
    padding: 10px;
    background: #fffbeb;
    border-radius: 6px;
    border-left: 3px solid #f59e0b;
}

.testcase-preconditions-label {
    font-size: 11px;
    color: #92400e;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
    font-weight: 600;
}

.testcase-preconditions-label i {
    margin-right: 4px;
}

.testcase-preconditions-text {
    font-size: 13px;
    color: #78350f;
    line-height: 1.4;
}

.testcase-card-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
    line-height: 1.4;
    flex: 1;
    margin-right: 10px;
}

.testcase-card-number {
    color: #64748b;
    font-weight: 700;
    margin-right: 8px;
}

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

.testcase-card-description {
    font-size: 13px;
    color: #475569;
    margin-bottom: 16px;
    line-height: 1.5;
}

.testcase-card-steps {
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.testcase-card-steps-title {
    font-weight: 600;
    color: #334155;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.testcase-card-steps-title i {
    color: #0d9488;
}

.testcase-step-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    gap: 12px;
}

.testcase-step-card:last-child {
    margin-bottom: 0;
}

.step-number-badge {
    background: #0d9488;
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
    min-width: 0;
}

.step-description-label {
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.step-description-text {
    font-size: 13px;
    color: #1e293b;
    line-height: 1.4;
    margin-bottom: 10px;
}

.step-expected-label {
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.step-expected-label i {
    color: #10b981;
}

.step-expected-text {
    font-size: 13px;
    color: #059669;
    background: #ecfdf5;
    padding: 8px 10px;
    border-radius: 4px;
    border-left: 3px solid #10b981;
    margin-top: 4px;
    line-height: 1.4;
}

.testcase-expected-outcome {
    margin-top: 12px;
    padding: 10px;
    background: #f0fdf4;
    border-radius: 6px;
    border-left: 3px solid #10b981;
}

.testcase-expected-outcome-label {
    font-size: 11px;
    color: #059669;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
    font-weight: 600;
}

.testcase-expected-outcome-label i {
    margin-right: 4px;
}

.testcase-expected-outcome-text {
    font-size: 13px;
    color: #065f46;
    line-height: 1.5;
}

.testcase-card-footer {
    padding: 12px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.testcase-tag {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.testcase-priority {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

.priority-critical { background: #fee2e2; color: #991b1b; }
.priority-high { background: #ffedd5; color: #9a3412; }
.priority-medium { background: #fef3c7; color: #92400e; }
.priority-low { background: #f1f5f9; color: #475569; }

.testcase-no-results {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
    font-size: 14px;
}

.testcase-no-results i {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
    color: #cbd5e1;
}

.testcase-empty {
    padding: 40px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* Responsive adjustments for test case cards */
@media (max-width: 850px) {
    .testcase-cards-container {
        grid-template-columns: 1fr;
    }
}