/* GILCHRIST RESEARCH — MISSION CONTROL */
:root {
  --bg: #0a0a0a;
  --bg-card: #111111;
  --bg-card-hover: #1a1a1a;
  --border: #222222;
  --text: #e0e0e0;
  --text-dim: #666666;
  --text-bright: #ffffff;
  --accent: #ff3333;
  --green: #00cc66;
  --yellow: #ffaa00;
  --red: #ff3333;
  --blue: #3399ff;
  --mono: 'SF Mono', 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 13px; line-height: 1.5; overflow-x: hidden; }

.header { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg); z-index: 100; }
.header-title { font-family: var(--mono); font-size: 14px; font-weight: 600; letter-spacing: 2px; color: var(--text-bright); }
.header-title span { color: var(--accent); }
.header-right { display: flex; align-items: center; gap: 16px; font-family: var(--mono); font-size: 12px; color: var(--text-dim); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; animation: pulse 2s infinite; }
.status-dot.warning { background: var(--yellow); }
.status-dot.error { background: var(--red); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.section-title { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-dim); padding: 16px 24px 8px; border-bottom: 1px solid var(--border); }

.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1px; background: var(--border); border-bottom: 1px solid var(--border); }
.agent-card { background: var(--bg-card); padding: 12px 16px; transition: background 0.15s; }
.agent-card:hover { background: var(--bg-card-hover); }
.agent-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.agent-name { font-weight: 600; font-size: 12px; color: var(--text-bright); }
.agent-meta { font-family: var(--mono); font-size: 10px; color: var(--text-dim); margin-bottom: 4px; }
.agent-summary { font-size: 11px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent-card.pending { opacity: 0.4; }

.main-grid { display: grid; grid-template-columns: 1fr 1.2fr 1fr; border-bottom: 1px solid var(--border); min-height: 300px; }
.main-grid > div { border-right: 1px solid var(--border); padding: 16px 20px; overflow-y: auto; max-height: 400px; }
.main-grid > div:last-child { border-right: none; }

.gh-item { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px solid #1a1a1a; font-size: 12px; }
.gh-icon { flex-shrink: 0; width: 18px; text-align: center; font-size: 11px; }
.gh-title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gh-time { font-family: var(--mono); font-size: 10px; color: var(--text-dim); flex-shrink: 0; }

.sprint-header { font-family: var(--mono); font-size: 11px; color: var(--text-dim); margin-bottom: 12px; }
.priority-group { margin-bottom: 16px; }
.priority-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.priority-tag { font-family: var(--mono); font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 3px; }
.priority-tag.p0 { background: var(--red); color: #fff; }
.priority-tag.p1 { background: var(--yellow); color: #000; }
.priority-tag.p2 { background: var(--blue); color: #fff; }
.progress-bar { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; margin-bottom: 8px; }
.progress-fill { height: 100%; border-radius: 2px; transition: width 0.5s ease; }
.p0 .progress-fill { background: var(--red); }
.p1 .progress-fill { background: var(--yellow); }
.p2 .progress-fill { background: var(--blue); }
.sprint-item { display: flex; align-items: center; gap: 6px; font-size: 11px; padding: 3px 0; }
.sprint-item-status { font-size: 10px; flex-shrink: 0; }
.sprint-item-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.scan-stat { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #1a1a1a; }
.scan-label { font-size: 11px; color: var(--text-dim); }
.scan-value { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--text-bright); }
.scan-value.good { color: var(--green); }
.scan-value.warn { color: var(--yellow); }
.findings-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.finding-box { text-align: center; padding: 8px 4px; background: #1a1a1a; border-radius: 4px; }
.finding-count { font-family: var(--mono); font-size: 18px; font-weight: 700; }
.finding-label { font-size: 9px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dim); }
.finding-box.critical .finding-count { color: var(--red); }
.finding-box.high .finding-count { color: #ff6644; }
.finding-box.medium .finding-count { color: var(--yellow); }
.finding-box.low .finding-count { color: var(--text-dim); }

.attention-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: var(--border); border-bottom: 1px solid var(--border); }
.attention-stat { background: var(--bg-card); padding: 16px 20px; text-align: center; }
.attention-number { font-family: var(--mono); font-size: 28px; font-weight: 700; color: var(--text-bright); }
.attention-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dim); margin-top: 4px; }

.log-ticker { padding: 8px 24px; max-height: 200px; overflow-y: auto; font-family: var(--mono); font-size: 11px; }
.log-entry { display: flex; gap: 12px; padding: 3px 0; border-bottom: 1px solid #111; }
.log-time { color: var(--text-dim); flex-shrink: 0; width: 50px; }
.log-agent { flex-shrink: 0; width: 140px; font-weight: 600; }
.log-message { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-entry.warn .log-agent { color: var(--yellow); }
.log-entry.info .log-agent { color: var(--green); }
.log-entry.error .log-agent { color: var(--red); }

.refresh-indicator { font-family: var(--mono); font-size: 10px; color: var(--text-dim); }
.col-title { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-dim); margin-bottom: 12px; }

@media (max-width: 900px) {
  .main-grid { grid-template-columns: 1fr; }
  .main-grid > div { border-right: none; border-bottom: 1px solid var(--border); max-height: none; }
  .agent-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .header { flex-direction: column; gap: 8px; text-align: center; }
}
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
