/* ================================================================
   AI Startup OS — Sprint Dashboard (Dark Premium)
   ================================================================ */

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

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: rgba(18, 18, 30, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(99, 102, 241, 0.3);
  --text-primary: #e8e8f0;
  --text-secondary: #8888a0;
  --text-muted: #55556a;
  --c-ceo: #6366f1; --c-planner: #8b5cf6; --c-developer: #06b6d4;
  --c-marketer: #f59e0b; --c-designer: #ec4899; --c-hr: #10b981;
  --accent-primary: #6366f1;
  --accent-glow: rgba(99, 102, 241, 0.4);
  --accent-success: #10b981;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;
  --header-h: 64px;
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px;
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;
}

html, body {
  height: 100%; font-family: var(--font-sans); font-size: 14px;
  color: var(--text-primary); background: var(--bg-primary);
  overflow: hidden; -webkit-font-smoothing: antialiased;
}

/* ── Background ── */
.bg-grid { position: fixed; inset: 0; z-index: 0; background-image: linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px); background-size: 40px 40px; pointer-events: none; }
.bg-glow { position: fixed; z-index: 0; border-radius: 50%; filter: blur(120px); pointer-events: none; animation: float 20s ease-in-out infinite; }
.bg-glow-1 { width: 500px; height: 500px; top: -100px; left: -100px; background: rgba(99,102,241,0.08); }
.bg-glow-2 { width: 400px; height: 400px; bottom: -50px; right: -50px; background: rgba(236,72,153,0.06); animation-delay: -7s; }
.bg-glow-3 { width: 350px; height: 350px; top: 50%; left: 50%; transform: translate(-50%,-50%); background: rgba(6,182,212,0.05); animation-delay: -14s; }
@keyframes float { 0%, 100% { transform: translate(0,0) scale(1); } 33% { transform: translate(30px,-20px) scale(1.05); } 66% { transform: translate(-20px,15px) scale(0.95); } }

/* ── Header ── */
.header { position: fixed; top: 0; left: 0; right: 0; height: var(--header-h); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; background: rgba(10,10,15,0.9); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border-subtle); z-index: 100; }
.header-left, .header-right { display: flex; align-items: center; gap: 8px; }
.header-center { display: flex; align-items: center; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon { font-size: 28px; filter: drop-shadow(0 0 8px var(--accent-glow)); }
.logo-text h1 { font-size: 18px; font-weight: 700; letter-spacing: -0.5px; background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.logo-sub { font-size: 11px; color: var(--text-muted); }
.status-pill { display: flex; align-items: center; gap: 8px; padding: 6px 16px; background: var(--bg-glass); border: 1px solid var(--border-subtle); border-radius: 100px; font-size: 12px; font-weight: 500; color: var(--text-secondary); transition: all 0.3s; }
.status-pill.active { border-color: var(--accent-primary); color: var(--accent-primary); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); transition: all 0.3s; }
.status-pill.active .status-dot { background: var(--accent-primary); box-shadow: 0 0 8px var(--accent-glow); animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.3); } }
.stat-chip { display: flex; flex-direction: column; align-items: center; padding: 4px 12px; background: var(--bg-glass); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); min-width: 60px; }
.stat-label { font-size: 10px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value { font-size: 18px; font-weight: 700; font-family: var(--font-mono); }

/* ── Layout ── */
.main { position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 280px 1fr 300px; gap: 0; z-index: 1; }
.panel { overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent; }
.panel::-webkit-scrollbar { width: 4px; }
.panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
.panel-left { border-right: 1px solid var(--border-subtle); }
.panel-right { border-left: 1px solid var(--border-subtle); }
.panel-center { padding: 0; display: flex; flex-direction: column; }

/* ── Cards ── */
.card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 16px; backdrop-filter: blur(10px); transition: border-color 0.3s; }
.card:hover { border-color: rgba(255,255,255,0.1); }
.card-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.card-icon { font-size: 16px; }

/* ── Controls ── */
.controls-grid { display: flex; flex-direction: column; gap: 8px; }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); font-family: var(--font-sans); font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; position: relative; overflow: hidden; }
.btn-primary { background: linear-gradient(135deg, var(--accent-primary), #818cf8); border-color: var(--accent-primary); color: white; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 20px var(--accent-glow); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-glow::before { content: ''; position: absolute; inset: -2px; background: linear-gradient(135deg, var(--accent-primary), #ec4899, var(--accent-primary)); background-size: 200% 200%; border-radius: inherit; z-index: -1; animation: glow-rotate 3s linear infinite; opacity: 0; transition: opacity 0.3s; }
.btn-glow:hover::before { opacity: 0.6; }
@keyframes glow-rotate { 0% { background-position: 0% 0%; } 100% { background-position: 200% 200%; } }
.btn-secondary { background: var(--bg-glass); color: var(--text-secondary); }
.btn-secondary:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.btn-secondary.active { background: rgba(16,185,129,0.15); border-color: var(--accent-success); color: var(--accent-success); }
.auto-status { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.2); border-radius: var(--radius-sm); font-size: 11px; color: var(--accent-success); margin-top: 4px; }
.auto-status.paused { background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.2); color: var(--accent-warning); }
.auto-status.paused .pulse-dot { background: var(--accent-warning); animation: none; }
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-success); animation: pulse-dot 1.5s infinite; }

/* ── Project Card ── */
.card-project { border-color: rgba(99,102,241,0.2); background: linear-gradient(135deg, rgba(99,102,241,0.05), var(--bg-card)); }
.project-info { margin-bottom: 10px; }
.project-name { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; background: linear-gradient(135deg, #e8e8f0, var(--accent-primary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.project-meta { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--text-muted); }
.project-meta strong { color: var(--text-primary); font-family: var(--font-mono); }
.project-status-badge { font-size: 9px; padding: 2px 8px; border-radius: 100px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.project-status-badge.active { background: rgba(99,102,241,0.15); color: var(--accent-primary); }
.project-status-badge.completed { background: rgba(16,185,129,0.15); color: var(--accent-success); }
.project-status-badge.none { background: rgba(255,255,255,0.05); color: var(--text-muted); }
.project-actions { display: flex; gap: 6px; }
.btn-sm { padding: 6px 12px; font-size: 11px; }
.btn-danger-outline { background: transparent; border: 1px solid rgba(239,68,68,0.3); color: var(--accent-danger); }
.btn-danger-outline:hover { background: rgba(239,68,68,0.1); border-color: var(--accent-danger); }
.btn-outline { background: transparent; border: 1px solid var(--border-subtle); color: var(--text-secondary); }
.btn-outline:hover { background: rgba(255,255,255,0.05); border-color: var(--accent-primary); color: var(--accent-primary); }

/* ── Sprint Progress ── */
.sprint-progress { display: flex; flex-direction: column; gap: 0; }
.progress-phase { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.phase-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--bg-glass); border: 2px solid var(--text-muted); flex-shrink: 0; transition: all 0.3s; }
.phase-info { display: flex; justify-content: space-between; flex: 1; }
.phase-name { font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.phase-status { font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); }
.progress-line { width: 2px; height: 8px; background: var(--border-subtle); margin-left: 5px; }
.progress-phase.active .phase-dot { border-color: var(--accent-primary); background: var(--accent-primary); box-shadow: 0 0 10px var(--accent-glow); animation: pulse-dot 2s infinite; }
.progress-phase.active .phase-name { color: var(--accent-primary); font-weight: 600; }
.progress-phase.active .phase-status { color: var(--accent-primary); }
.progress-phase.done .phase-dot { border-color: var(--accent-success); background: var(--accent-success); }
.progress-phase.done .phase-name { color: var(--accent-success); }
.progress-phase.done .phase-status { color: var(--accent-success); }
.progress-line.done { background: var(--accent-success); }

/* ── Agent Cards ── */
.agents-list { display: flex; flex-direction: column; gap: 6px; }
.agent-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--bg-glass); border: 1px solid transparent; transition: all 0.3s; }
.agent-card.speaking { border-color: var(--agent-color); background: color-mix(in srgb, var(--agent-color) 8%, transparent); animation: agent-glow 2s ease-in-out infinite; }
@keyframes agent-glow { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 50% { box-shadow: 0 0 15px -5px var(--agent-color); } }
.agent-emoji { font-size: 22px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: var(--bg-glass); border-radius: var(--radius-sm); }
.agent-info { flex: 1; }
.agent-name { font-size: 13px; font-weight: 600; }
.agent-title { font-size: 11px; color: var(--text-muted); }
.agent-score { font-family: var(--font-mono); font-size: 14px; font-weight: 700; color: var(--text-muted); }

/* ── Perf ── */
.perf-bars { display: flex; flex-direction: column; gap: 10px; }
.perf-empty, .history-empty, .eval-empty { padding: 20px; text-align: center; font-size: 12px; color: var(--text-muted); }
.perf-item { display: flex; flex-direction: column; gap: 4px; }
.perf-label { display: flex; justify-content: space-between; font-size: 11px; }
.perf-label-name { color: var(--text-secondary); font-weight: 500; }
.perf-label-score { font-family: var(--font-mono); font-weight: 700; }
.perf-bar-track { height: 6px; background: rgba(255,255,255,0.05); border-radius: 3px; overflow: hidden; }
.perf-bar-fill { height: 100%; border-radius: 3px; transition: width 0.8s cubic-bezier(0.22,1,0.36,1); width: 0; }

/* ── Tabs ── */
.center-tabs { display: flex; border-bottom: 1px solid var(--border-subtle); background: rgba(10,10,15,0.6); backdrop-filter: blur(10px); flex-shrink: 0; }
.tab-btn { flex: 1; padding: 12px; border: none; background: none; color: var(--text-muted); font-family: var(--font-sans); font-size: 13px; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.2s; }
.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active { color: var(--accent-primary); border-bottom-color: var(--accent-primary); }
.tab-content { display: none; flex: 1; flex-direction: column; overflow: hidden; }
.tab-content.active { display: flex; }

/* ── Meeting Stream ── */
.meeting-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border-subtle); background: rgba(10,10,15,0.6); flex-shrink: 0; }
.meeting-title-area { display: flex; align-items: center; gap: 10px; }
.meeting-title { font-size: 15px; font-weight: 600; }
.meeting-badge { font-size: 10px; padding: 3px 8px; border-radius: 100px; background: rgba(99,102,241,0.15); color: var(--accent-primary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.meeting-time { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }
.meeting-stream { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.08) transparent; }
.meeting-stream::-webkit-scrollbar { width: 4px; }
.meeting-stream::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }
.meeting-placeholder { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; color: var(--text-muted); }
.placeholder-icon { font-size: 64px; opacity: 0.3; animation: float 6s ease-in-out infinite; }
.meeting-placeholder h3 { font-size: 20px; font-weight: 700; background: linear-gradient(135deg, var(--text-secondary), var(--accent-primary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.meeting-placeholder p { font-size: 13px; max-width: 320px; line-height: 1.6; }
.placeholder-hint { font-size: 12px; color: var(--accent-primary); opacity: 0.7; }

/* ── Message Bubbles ── */
.msg-bubble { display: flex; gap: 12px; padding: 14px 16px; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); border-left: 3px solid var(--agent-color); animation: msg-enter 0.4s cubic-bezier(0.22,1,0.36,1); }
@keyframes msg-enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.msg-avatar { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 22px; background: var(--bg-glass); border-radius: var(--radius-sm); flex-shrink: 0; }
.msg-body { flex: 1; min-width: 0; }
.msg-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.msg-name { font-size: 13px; font-weight: 600; color: var(--agent-color); }
.msg-role { font-size: 11px; color: var(--text-muted); }
.msg-phase-tag { font-size: 9px; padding: 2px 6px; border-radius: 100px; background: rgba(99,102,241,0.15); color: var(--accent-primary); font-weight: 600; }
.msg-model { font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); margin-left: auto; }
.msg-content { font-size: 13px; line-height: 1.7; color: var(--text-primary); white-space: pre-wrap; word-break: break-word; }
.msg-typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.msg-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--agent-color); animation: typing-bounce 1.4s infinite; }
.msg-typing span:nth-child(2) { animation-delay: 0.2s; }
.msg-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-bounce { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; } 40% { transform: scale(1); opacity: 1; } }

/* System messages */
.msg-system { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 16px; font-size: 12px; color: var(--text-muted); background: var(--bg-glass); border-radius: var(--radius-md); }
.msg-system.success { color: var(--accent-success); background: rgba(16,185,129,0.08); }
.msg-system.warning { color: var(--accent-warning); background: rgba(245,158,11,0.08); }
.msg-system.error { color: var(--accent-danger); background: rgba(239,68,68,0.08); }

/* CEO Decision */
.msg-decision { padding: 16px; border-radius: var(--radius-lg); animation: msg-enter 0.4s; }
.msg-decision.approved { background: linear-gradient(135deg, rgba(16,185,129,0.1), rgba(99,102,241,0.05)); border: 1px solid rgba(16,185,129,0.3); }
.msg-decision.rejected { background: linear-gradient(135deg, rgba(245,158,11,0.1), rgba(239,68,68,0.05)); border: 1px solid rgba(245,158,11,0.3); }
.msg-decision .decision-header { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.msg-decision.approved .decision-header { color: var(--accent-success); }
.msg-decision.rejected .decision-header { color: var(--accent-warning); }
.msg-decision .decision-content { font-size: 13px; line-height: 1.6; color: var(--text-primary); }

/* ── Screenshot Preview ── */
.preview-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border-subtle); background: rgba(10,10,15,0.6); flex-shrink: 0; }
.preview-header h2 { font-size: 15px; font-weight: 600; }
.version-selector { display: flex; gap: 4px; }
.version-btn { padding: 4px 10px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--bg-glass); color: var(--text-muted); font-size: 11px; font-weight: 600; cursor: pointer; font-family: var(--font-mono); transition: all 0.2s; }
.version-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.version-btn.active { background: rgba(99,102,241,0.15); border-color: var(--accent-primary); color: var(--accent-primary); }
.preview-container { flex: 1; overflow: auto; padding: 20px; display: flex; align-items: flex-start; justify-content: center; }
.preview-placeholder { padding: 40px; text-align: center; color: var(--text-muted); font-size: 13px; }
.preview-img { max-width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--border-subtle); box-shadow: 0 8px 32px rgba(0,0,0,0.4); transition: transform 0.3s; }
.preview-img:hover { transform: scale(1.02); }

/* ── HR Eval ── */
.msg-hr-eval { padding: 16px; background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(99,102,241,0.08)); border: 1px solid rgba(16,185,129,0.2); border-radius: var(--radius-lg); animation: msg-enter 0.4s; }
.msg-hr-eval .eval-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--accent-success); margin-bottom: 12px; }
.eval-scores { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.eval-score-card { padding: 10px; background: var(--bg-glass); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); }
.eval-score-card .eval-agent { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.eval-score-card .eval-total { font-family: var(--font-mono); font-size: 20px; font-weight: 800; }
.eval-score-card .eval-comment { font-size: 10px; color: var(--text-muted); margin-top: 4px; line-height: 1.4; }
.eval-score-card.mvp { border-color: var(--accent-warning); background: rgba(245,158,11,0.08); }
.eval-score-card.mvp::after { content: '🏆 MVP'; display: block; font-size: 10px; font-weight: 700; color: var(--accent-warning); margin-top: 6px; }
.eval-team-feedback { margin-top: 10px; padding: 10px 12px; background: var(--bg-glass); border-radius: var(--radius-sm); font-size: 12px; color: var(--text-secondary); line-height: 1.6; }
.eval-content { display: flex; flex-direction: column; gap: 8px; }

/* ── History ── */
.history-list { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }
.history-item { padding: 10px 12px; background: var(--bg-glass); border: 1px solid transparent; border-radius: var(--radius-md); cursor: pointer; transition: all 0.2s; }
.history-item:hover { background: rgba(255,255,255,0.05); border-color: var(--border-subtle); }
.history-item-title { font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.history-item-meta { font-size: 10px; color: var(--text-muted); display: flex; gap: 8px; }
.history-item-status { font-size: 9px; font-weight: 600; padding: 2px 6px; border-radius: 100px; }
.history-item-status.interrupted { background: rgba(239,68,68,0.15); color: var(--accent-danger); }
.history-item-status.failed { background: rgba(239,68,68,0.15); color: var(--accent-danger); }
.history-list::-webkit-scrollbar { width: 3px; }
.history-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

/* ── Sprint Detail Overlay ── */
.detail-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); display: none; justify-content: flex-end; }
.detail-overlay.open { display: flex; animation: overlay-in 0.3s ease; }
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }
.detail-panel { width: min(680px, 90vw); height: 100%; background: var(--bg-secondary); border-left: 1px solid var(--border-subtle); display: flex; flex-direction: column; animation: panel-slide 0.3s cubic-bezier(0.22,1,0.36,1); box-shadow: -8px 0 40px rgba(0,0,0,0.5); }
@keyframes panel-slide { from { transform: translateX(100%); } to { transform: translateX(0); } }
.detail-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid var(--border-subtle); background: rgba(10,10,15,0.8); flex-shrink: 0; }
.detail-title { font-size: 16px; font-weight: 700; }
.detail-close { width: 32px; height: 32px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--bg-glass); color: var(--text-secondary); font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.detail-close:hover { background: rgba(239,68,68,0.15); border-color: var(--accent-danger); color: var(--accent-danger); }
.detail-body { flex: 1; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.08) transparent; }
.detail-body::-webkit-scrollbar { width: 4px; }
.detail-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

/* Detail sections */
.detail-section { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 16px; }
.detail-section-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.detail-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.detail-meta-item { display: flex; flex-direction: column; gap: 2px; }
.detail-meta-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.detail-meta-value { font-size: 13px; font-weight: 600; }
.detail-status-badge { display: inline-block; padding: 3px 8px; border-radius: 100px; font-size: 10px; font-weight: 600; }
.detail-status-badge.completed { background: rgba(16,185,129,0.15); color: var(--accent-success); }
.detail-status-badge.interrupted { background: rgba(239,68,68,0.15); color: var(--accent-danger); }
.detail-status-badge.failed { background: rgba(239,68,68,0.15); color: var(--accent-danger); }

/* Detail messages */
.detail-msg { display: flex; gap: 10px; padding: 10px 12px; background: var(--bg-glass); border-radius: var(--radius-md); border-left: 3px solid var(--agent-color, var(--text-muted)); }
.detail-msg-avatar { font-size: 18px; width: 28px; text-align: center; flex-shrink: 0; }
.detail-msg-body { flex: 1; min-width: 0; }
.detail-msg-name { font-size: 12px; font-weight: 600; color: var(--agent-color, var(--text-secondary)); margin-bottom: 4px; }
.detail-msg-content { font-size: 12px; line-height: 1.6; color: var(--text-primary); white-space: pre-wrap; word-break: break-word; max-height: 120px; overflow-y: auto; }
.detail-msg-content::-webkit-scrollbar { width: 2px; }
.detail-msg-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); }

/* Detail documents */
.detail-doc { padding: 12px; background: var(--bg-glass); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); cursor: pointer; transition: all 0.2s; }
.detail-doc:hover { border-color: var(--accent-primary); }
.detail-doc-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.detail-doc-title { font-size: 12px; font-weight: 600; }
.detail-doc-type { font-size: 9px; padding: 2px 6px; border-radius: 100px; background: rgba(139,92,246,0.15); color: #8b5cf6; font-weight: 600; }
.detail-doc-preview { font-size: 11px; color: var(--text-muted); line-height: 1.5; max-height: 60px; overflow: hidden; }
.detail-doc.expanded .detail-doc-preview { max-height: none; }

/* Detail screenshot thumbnails */
.detail-screenshots { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.detail-ss-thumb { border-radius: var(--radius-md); border: 1px solid var(--border-subtle); overflow: hidden; cursor: pointer; transition: all 0.2s; position: relative; }
.detail-ss-thumb:hover { border-color: var(--accent-primary); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
.detail-ss-thumb img { width: 100%; display: block; }
.detail-ss-label { position: absolute; bottom: 0; left: 0; right: 0; padding: 6px 8px; background: linear-gradient(transparent, rgba(0,0,0,0.8)); font-size: 11px; font-weight: 600; color: white; }

/* Feedback round in detail */
.detail-feedback { padding: 10px 12px; background: var(--bg-glass); border-radius: var(--radius-md); border-left: 3px solid var(--accent-warning); }
.detail-feedback-header { font-size: 11px; font-weight: 600; color: var(--accent-warning); margin-bottom: 6px; }
.detail-feedback-item { font-size: 11px; color: var(--text-secondary); margin-bottom: 4px; line-height: 1.5; }

/* ── Responsive ── */
@media (max-width: 1200px) { .main { grid-template-columns: 240px 1fr 260px; } }
@media (max-width: 900px) { .main { grid-template-columns: 1fr; } .panel-left, .panel-right { display: none; } .detail-panel { width: 100vw; } }
