:root {
  --bg: #f8fafc; --bg-card: #ffffff; --bg-hover: #f1f5f9; --bg-code: #f8fafc;
  --border: #e2e8f0; --border-light: #f1f5f9;
  --text: #1e293b; --text-secondary: #64748b; --text-muted: #94a3b8;
  --accent: #6366f1; --accent-light: #818cf8; --accent-bg: #eef2ff;
  --green: #059669; --green-bg: #d1fae5; --green-text: #065f46;
  --red: #e11d48; --red-bg: #ffe4e6; --red-text: #9f1239;
  --amber: #d97706; --amber-bg: #fef3c7; --amber-text: #92400e;
  --purple: #7c3aed; --purple-bg: #f3e8ff; --purple-text: #5b21b6;
  --blue: #2563eb; --blue-bg: #dbeafe; --blue-text: #1e40af;
  --orange: #ea580c; --orange-bg: #fff7ed; --orange-text: #9a3412;
  --slate: #64748b; --slate-bg: #f1f5f9;
  --radius: 10px; --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'SF Mono', 'Cascadia Code', 'Fira Code', Menlo, monospace;
  --transition: 0.15s ease;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
.topbar { background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); color: #e2e8f0; padding: 0 28px; display: flex; align-items: center; gap: 20px; position: sticky; top: 0; z-index: 100; height: 52px; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.topbar .logo { display: flex; align-items: center; gap: 10px; cursor: pointer; flex-shrink: 0; }
.topbar .logo:hover .logo-text { color: #c7d2fe; }
.topbar .logo-icon { width: 28px; height: 28px; background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #fff; }
.topbar .logo-text { font-size: 14px; font-weight: 700; color: #e2e8f0; transition: color var(--transition); }
.breadcrumb { font-size: 12.5px; color: var(--text-muted); display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.breadcrumb a { color: #94a3b8; text-decoration: none; padding: 2px 4px; border-radius: 4px; transition: all var(--transition); }
.breadcrumb a:hover { color: #e2e8f0; background: rgba(255,255,255,0.08); }
.breadcrumb .sep { color: #475569; font-size: 11px; }
.breadcrumb .current { color: #f1f5f9; font-weight: 600; }
.topbar-user { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.topbar-user .username { font-size: 12px; font-weight: 600; color: #c7d2fe; }
.topbar-user .btn-logout { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); color: #e2e8f0; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: var(--radius-sm); cursor: pointer; }
.topbar-user .btn-logout:hover { background: rgba(255,255,255,0.15); }
.topbar-nav { display: flex; gap: 4px; }
.topbar-nav a { color: #94a3b8; text-decoration: none; font-size: 12.5px; font-weight: 500; padding: 6px 12px; border-radius: var(--radius-sm); transition: all var(--transition); }
.topbar-nav a:hover { color: #e2e8f0; background: rgba(255,255,255,0.08); }
.topbar-nav a.active { color: #e2e8f0; background: rgba(255,255,255,0.12); font-weight: 600; }
.main { max-width: 1800px; margin: 0 auto; padding: 16px 12px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 20px 22px; cursor: pointer; transition: all var(--transition); box-shadow: var(--shadow); position: relative; }
.card:hover { border-color: var(--accent-light); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card h3 { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 8px; word-break: break-all; }
.card .card-meta { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 12px; }
.card .card-meta span { display: flex; align-items: center; gap: 4px; }
.card .badge-row { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: 10.5px; padding: 3px 9px; border-radius: 20px; font-weight: 600; display: inline-block; }
.b-llm { background: var(--purple-bg); color: var(--purple-text); }
.b-tool { background: var(--green-bg); color: var(--green-text); }
.b-agent { background: var(--blue-bg); color: var(--blue-text); }
.b-framework { background: var(--amber-bg); color: var(--amber-text); }
.b-network { background: var(--slate-bg); color: var(--slate); }
.b-aws { background: var(--orange-bg); color: var(--orange-text); }
.b-annotated { background: var(--green-bg); color: var(--green-text); }
.b-pending { background: var(--amber-bg); color: var(--amber-text); }
.tree-container { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: auto; max-height: 600px; }
.tree-node { border-bottom: 1px solid var(--border-light); }
.tree-node:last-child { border-bottom: none; }
.tree-row { display: flex; align-items: center; gap: 8px; padding: 7px 12px; cursor: pointer; transition: background var(--transition); min-height: 36px; }
.tree-row:hover { background: var(--bg-hover); }
.tree-row.selected { background: var(--accent-bg); border-left: 3px solid var(--accent); }
.tree-toggle { width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; font-size: 9px; color: var(--text-muted); cursor: pointer; flex-shrink: 0; transition: transform var(--transition); }
.tree-toggle.open { transform: rotate(90deg); }
.tree-toggle.leaf { visibility: hidden; }
.tree-cat { font-size: 9px; padding: 2px 6px; border-radius: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; flex-shrink: 0; }
.tree-name { font-size: 12.5px; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-dur { font-size: 11px; color: var(--text-muted); margin-left: auto; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.tree-tokens { font-size: 10px; color: var(--purple); margin-left: 4px; flex-shrink: 0; }
.tree-children { display: none; }
.tree-children.open { display: block; }
.timeline-container { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: auto; max-height: 600px; }
.timeline-header { display: flex; border-bottom: 1px solid var(--border); background: #f8fafc; position: sticky; top: 0; z-index: 5; }
.timeline-label-col { width: 260px; min-width: 260px; padding: 8px 12px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); border-right: 1px solid var(--border); }
.timeline-bar-col { flex: 1; padding: 8px 12px; display: flex; align-items: center; position: relative; }
.timeline-tick { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--border-light); }
.timeline-tick-label { position: absolute; top: 2px; font-size: 9px; color: var(--text-muted); transform: translateX(-50%); }
.timeline-row { display: flex; border-bottom: 1px solid var(--border-light); cursor: pointer; transition: background var(--transition); min-height: 30px; }
.timeline-row:hover { background: var(--bg-hover); }
.timeline-row.selected { background: var(--accent-bg); }
.timeline-row .tl-label { width: 260px; min-width: 260px; padding: 5px 8px; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-right: 1px solid var(--border-light); display: flex; align-items: center; gap: 4px; }
.timeline-row .tl-bar-area { flex: 1; position: relative; padding: 4px 0; }
.timeline-row .tl-bar { position: absolute; top: 4px; bottom: 4px; border-radius: 3px; min-width: 2px; opacity: 0.85; transition: opacity var(--transition); }
.timeline-row:hover .tl-bar { opacity: 1; }
.tl-bar-label { position: absolute; top: 50%; transform: translateY(-50%); left: calc(100% + 4px); font-size: 9.5px; color: var(--text-muted); white-space: nowrap; }
.user-prompt-banner { background: var(--accent-bg); border: 1px solid #c7d2fe; border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px; }
.user-prompt-banner .label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--accent); font-weight: 700; margin-bottom: 6px; }
.user-prompt-banner .content { font-size: 13.5px; color: var(--text); line-height: 1.5; }
.trace-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.trace-header .stats { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.stat-pill { font-size: 11.5px; padding: 4px 12px; border-radius: 20px; font-weight: 600; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-secondary); }
.stat-pill strong { color: var(--text); }
.view-tabs { display: flex; gap: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; }
.view-tabs button { background: none; border: none; padding: 8px 16px; cursor: pointer; color: var(--text-muted); font-size: 12.5px; font-weight: 500; transition: all var(--transition); font-family: var(--font); }
.view-tabs button:hover { color: var(--text); background: var(--bg-hover); }
.view-tabs button.active { background: var(--accent-bg); color: var(--accent); font-weight: 700; }
.trace-body { display: grid; grid-template-columns: 1fr 380px; gap: 16px; margin-bottom: 20px; }
@media (max-width: 1100px) { .trace-body { grid-template-columns: 1fr; } }
.detail-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: auto; max-height: calc(100vh - 120px); }
.detail-empty { padding: 40px 20px; text-align: center; color: var(--text-muted); font-size: 13px; }
.detail-header { padding: 14px 16px; border-bottom: 1px solid var(--border); background: linear-gradient(to right, #f8fafc, #f1f5f9); }
.detail-header h3 { font-size: 13.5px; font-weight: 700; color: var(--text); margin-bottom: 4px; word-break: break-all; }
.detail-header .detail-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.detail-section { padding: 12px 16px; border-bottom: 1px solid var(--border-light); }
.detail-section:last-child { border-bottom: none; }
.detail-section h4 { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--accent); font-weight: 700; margin-bottom: 8px; }
.detail-grid { display: grid; grid-template-columns: 140px 1fr; gap: 4px 12px; font-size: 12px; }
.detail-grid .dk { color: var(--text-muted); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.detail-grid .dv { color: var(--text); word-break: break-all; font-family: var(--font-mono); font-size: 11.5px; }
.detail-grid .dv.long { max-height: 150px; overflow-y: auto; white-space: pre-wrap; background: var(--bg-code); padding: 6px 8px; border-radius: var(--radius-sm); border: 1px solid var(--border); margin: 2px 0; resize: vertical; cursor: ns-resize; }
.detail-grid .dv.long.expanded { max-height: none; }
.detail-grid .dv.long:hover { border-color: var(--accent-light); }
.annotation-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow); }
.annotation-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.annotation-header h3 { font-size: 13px; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: 0.3px; margin: 0; }
.annotation-progress { font-size: 11.5px; color: var(--text-muted); font-weight: 600; background: var(--bg); padding: 3px 10px; border-radius: 12px; border: 1px solid var(--border); }
.annotation-tabs { display: flex; gap: 0; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 16px; }
.annotation-tabs button { background: none; border: none; padding: 9px 16px; cursor: pointer; color: var(--text-muted); font-size: 12px; font-weight: 500; transition: all var(--transition); font-family: var(--font); white-space: nowrap; }
.annotation-tabs button:hover { color: var(--text); background: var(--bg-hover); }
.annotation-tabs button.active { background: var(--accent-bg); color: var(--accent); font-weight: 700; }
.annotation-tab-content { display: none; }
.annotation-tab-content.active { display: block; }
.annotation-dimensions { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 16px; }
.annotation-dimension { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; }
.annotation-dimension label { font-size: 12px; font-weight: 600; color: var(--text); display: block; margin-bottom: 6px; }
.annotation-dimension .dim-desc { font-size: 10.5px; color: var(--text-muted); margin-bottom: 8px; line-height: 1.4; }
.annotation-dimension select { background: var(--bg-card); border: 1px solid var(--border); color: var(--text); padding: 7px 10px; border-radius: var(--radius-sm); font-size: 12.5px; font-family: var(--font); width: 100%; cursor: pointer; }
.annotation-dimension select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
.reasoning-toggle { font-size: 10.5px; color: var(--accent); cursor: pointer; margin-top: 6px; display: inline-block; font-weight: 500; }
.reasoning-toggle:hover { text-decoration: underline; }
.reasoning-textarea { width: 100%; margin-top: 6px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; font-family: var(--font); resize: vertical; min-height: 60px; max-height: 150px; background: var(--bg-card); color: var(--text); display: none; }
.reasoning-textarea.open { display: block; }
.reasoning-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
.annotation-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.btn { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-secondary); padding: 8px 18px; border-radius: var(--radius-sm); cursor: pointer; font-size: 12.5px; font-family: var(--font); font-weight: 600; transition: all var(--transition); }
.btn:hover { background: var(--bg-hover); border-color: #cbd5e1; color: var(--text); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-light); border-color: var(--accent-light); color: #fff; }
.btn-success { background: var(--green); border-color: var(--green); color: #fff; }
.btn-success:hover { background: #047857; }
.save-status { font-size: 11.5px; color: var(--green); font-weight: 600; }
.topology-layout { display: grid; grid-template-columns: 1fr 320px; gap: 16px; min-height: 600px; }
@media (max-width: 1000px) { .topology-layout { grid-template-columns: 1fr; } }
.topology-graph { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; position: relative; min-height: 500px; }
.topology-graph svg { width: 100%; height: 100%; display: block; cursor: grab; position: absolute; top: 0; left: 0; }
.topology-graph svg:active { cursor: grabbing; }
.topology-graph svg text { font-family: var(--font); user-select: none; }
.topo-toolbar { position: absolute; top: 10px; right: 10px; z-index: 10; display: flex; flex-direction: column; gap: 4px; }
.topo-toolbar button { width: 32px; height: 32px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text); font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); }
.topo-toolbar button:hover { background: var(--bg-hover); }
.topo-sidebar { display: flex; flex-direction: column; gap: 12px; }
.topo-ir-select { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.topo-ir-select label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); display: block; margin-bottom: 6px; }
.topo-ir-select select { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12.5px; font-family: var(--font); background: var(--bg); color: var(--text); cursor: pointer; }
.topo-trace-list { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); flex: 1; overflow: auto; max-height: 300px; }
.topo-trace-list-header { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); background: var(--bg); position: sticky; top: 0; }
.topo-trace-item { padding: 8px 14px; border-bottom: 1px solid var(--border-light); cursor: pointer; transition: background var(--transition); display: flex; align-items: center; gap: 8px; }
.topo-trace-item:hover { background: var(--bg-hover); }
.topo-trace-item.active { background: var(--accent-bg); border-left: 3px solid var(--accent); }
.topo-trace-item .trace-radio { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border); flex-shrink: 0; }
.topo-trace-item.active .trace-radio { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 2px #fff; }
.topo-trace-item .trace-info { font-size: 11.5px; color: var(--text); overflow: hidden; }
.topo-trace-item .trace-info .trace-dur { color: var(--text-muted); margin-left: 6px; }
.topo-node-detail { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.topo-node-detail h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 10px; }
.topo-node-detail .node-name { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.topo-node-detail .node-type { font-size: 11px; margin-bottom: 8px; }
.topo-node-detail .node-attrs { font-size: 11.5px; color: var(--text-secondary); }
.topo-node-detail .node-attrs div { margin-bottom: 3px; }
.graph-node { cursor: pointer; transition: opacity 0.2s; }
.graph-node rect { stroke-width: 2; transition: stroke 0.2s, stroke-width 0.2s, filter 0.2s; }
.graph-node.highlighted rect { stroke-width: 3; filter: drop-shadow(0 0 6px currentColor); }
.graph-node.dimmed { opacity: 0.25; }
.graph-node text { font-size: 11px; font-weight: 600; fill: var(--text); pointer-events: none; }
.graph-edge { transition: opacity 0.2s; }
.graph-edge path { fill: none; stroke-width: 1.5; stroke: #94a3b8; }
.graph-edge.highlighted path { stroke-width: 3; stroke: var(--accent); }
.graph-edge.dimmed { opacity: 0.15; }
.graph-edge polygon { fill: #94a3b8; }
.graph-edge.highlighted polygon { fill: var(--accent); }
.edge-label { font-size: 9px; fill: var(--text-muted); pointer-events: none; }
.sequence-badge { font-size: 9px; font-weight: 700; fill: white; }
.topo-annotation-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.topo-annotation-panel h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 10px; }
.topo-type-select { margin-bottom: 12px; }
.topo-type-select label { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); display: block; margin-bottom: 4px; }
.topo-type-select select { width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; font-family: var(--font); background: var(--bg-card); color: var(--text); cursor: pointer; }
.topo-type-select select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
.topo-verdict-label { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.topo-verdict-group { display: flex; gap: 8px; margin-bottom: 12px; }
.topo-verdict-group label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 12.5px; font-weight: 500; color: var(--text); padding: 6px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); transition: all var(--transition); }
.topo-verdict-group label:hover { border-color: var(--accent-light); }
.topo-verdict-group input[type="radio"] { accent-color: var(--accent); }
.topo-verdict-group label.selected-correct { background: var(--green-bg); border-color: var(--green); color: var(--green-text); }
.topo-verdict-group label.selected-incorrect { background: var(--red-bg); border-color: var(--red); color: var(--red-text); }
.topo-verdict-detail { display: none; margin-bottom: 12px; }
.topo-verdict-detail.open { display: block; }
.topo-verdict-detail label { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); display: block; margin-bottom: 4px; }
.topo-verdict-detail textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; font-family: var(--font); resize: vertical; min-height: 60px; max-height: 120px; background: var(--bg-card); color: var(--text); }
.topo-verdict-detail textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
.topo-annotation-panel .btn { margin-top: 8px; }
.topo-save-status { font-size: 11px; color: var(--green); font-weight: 600; margin-left: 8px; }
.topo-download-group { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.topo-download-group .btn { font-size: 11.5px; margin-top: 0; }
.subgraph-annotation-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.subgraph-annotation-panel h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 10px; }
.subgraph-verdict-badge { display: inline-block; font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 600; margin-left: 6px; }
.subgraph-verdict-badge.correct { background: var(--green-bg); color: var(--green-text); }
.subgraph-verdict-badge.incorrect { background: var(--red-bg); color: var(--red-text); }
.loading { padding: 60px; text-align: center; color: var(--text-muted); font-size: 14px; }
.loading::before { content: ''; display: block; width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
.page-header { margin-bottom: 20px; }
.page-header h2 { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; margin-bottom: 4px; }
.page-header p { font-size: 13px; color: var(--text-secondary); }
/* Login */
.login-container { max-width: 380px; margin: 80px auto; padding: 32px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md); }
.login-container h2 { font-size: 18px; margin-bottom: 20px; text-align: center; }
.login-container input { width: 100%; padding: 10px 12px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; font-family: var(--font); }
.login-container input:focus { outline: none; border-color: var(--accent); }
.login-container .btn { width: 100%; padding: 10px; }
.login-error { color: var(--red); font-size: 12px; margin-bottom: 10px; }
/* Upload */
.upload-area { display: inline-flex; align-items: center; gap: 8px; }
/* Toggle */
.toggle-completed { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-secondary); cursor: pointer; }
.toggle-completed input { accent-color: var(--accent); }
.validation-error { border-color: #e53e3e !important; box-shadow: 0 0 0 3px rgba(229,62,62,0.15) !important; background: #fff5f5 !important; }
/* === Utility classes replacing inline styles === */
.d-none { display: none; }
.d-flex { display: flex; }
.d-grid { display: grid; }
.flex-1 { flex: 1; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-16 { gap: 16px; }
.gap-8 { gap: 8px; }
.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }
.pos-relative { position: relative; }
.text-ellipsis { overflow: hidden; text-overflow: ellipsis; }
.ml-auto { margin-left: auto; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mt-8 { margin-top: 8px; }
.text-muted { color: var(--text-muted); }
.text-green { color: var(--green); }
.text-blue { color: var(--blue); }
.text-amber { color: var(--amber); }
.text-red { color: var(--red); }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--accent); }
.text-xs { font-size: 12px; }
.text-xxs { font-size: 11px; }
.text-13 { font-size: 13px; }
.font-bold { font-weight: bold; }
.fw-600 { font-weight: 600; }
/* Page header layout */
.page-header-flex { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
/* Task summary */
.task-summary { display: flex; gap: 16px; margin-bottom: 16px; font-size: 13px; }
/* Badge variants for inline-style removal */
.badge-inprogress { background: var(--blue-bg); color: var(--blue-text); }
.badge-locked { background: var(--amber-bg); color: var(--amber-text); }
.badge-duration { background: var(--border); color: var(--text-secondary); }
.badge-event { background: var(--red-bg); color: var(--red-text); }
.badge-type-agent { background: var(--blue); color: #fff; }
.badge-type-tool { background: var(--green); color: #fff; }
.badge-type-llm { background: var(--purple); color: #fff; }
.badge-type-default { background: var(--slate); color: #fff; }
/* Release button */
.btn-release { font-size: 10px; padding: 2px 8px; margin-left: 6px; }
.btn-release-task { font-size: 11px; color: var(--red); }
/* Expand button */
.btn-expand { margin-left: 8px; cursor: pointer; border: 1px solid var(--border); background: var(--bg); border-radius: 4px; padding: 2px 8px; font-size: 11px; }
/* Main grid layout */
.main-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; min-height: 500px; }
/* Panel styling */
.panel-box { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; position: relative; }
.panel-header { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.panel-header-titled { padding: 8px 12px; border-bottom: 1px solid var(--border); font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
/* Split handle */
.split-handle { width: 5px; cursor: col-resize; background: var(--border); flex-shrink: 0; }
/* Detail panel inline */
.detail-panel-inline { width: 350px; overflow: auto; border-left: 1px solid var(--border); }
/* Topology layout full height */
.topo-layout-full { height: 100%; }
/* Node detail placeholder */
.node-detail-placeholder { color: var(--text-muted); font-size: 12px; }
/* Topo save row */
.topo-save-row { display: flex; align-items: center; }
/* Timeline bar col (position context) */
.timeline-bar-col { position: relative; min-height: 24px; }
/* Timeline label indent + badge */
.tl-badge-sm { font-size: 8px; padding: 1px 5px; }
/* Time spent display */
.time-spent-display { margin-left: auto; font-size: 13px; font-weight: bold; color: var(--accent); }
/* Status error */
.status-error { color: var(--red); }
/* Event item */
.event-item { margin-bottom: 8px; }
/* No topo data */
.no-topo-data { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
/* Topo explanation label */
.label-mt { margin-top: 8px; }
