/* BoardRoom Review Dashboard Styles */

/* Root CSS Variables for Curated Harmonious Palette */
:root {
  --bg-main: #0b0f19;
  --bg-sidebar: #0f1322;
  --bg-card: #151c30;
  --bg-card-hover: #1e2844;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #3b82f6;
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dark: #64748b;

  /* Severity Colors (HSL Tailored) */
  --color-critical: #ef4444; /* Bright Red */
  --color-major: #f97316;    /* Orange */
  --color-minor: #eab308;    /* Gold/Yellow */
  --color-info: #64748b;     /* Slate Gray */

  /* Entity/Agent Colors */
  --color-net: #06b6d4;      /* Cyan */
  --color-comp: #a855f7;     /* Purple */
  --color-upheld: #22c55e;   /* Green */
  --color-overruled: #64748b;/* Muted Gray */
  --color-merged: #3b82f6;   /* Blue Accent */
  
  --color-prompt: #1e40af;
  --color-completion: #047857;

  /* Font Stack */
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sidebar-width: 280px;
  --transition-speed: 0.25s;
}

/* Light Theme Overrides (Optional - defaults to dark) */
body.light-theme {
  --bg-main: #f8fafc;
  --bg-sidebar: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --border-color: rgba(0, 0, 0, 0.08);
  --border-focus: #2563eb;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dark: #94a3b8;
  --color-info: #94a3b8;
}

/* Global Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  display: flex;
  height: 100vh;
  overflow: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Styled Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-dark);
}

/* --- SIDEBAR NAVIGATION --- */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  padding: 1.5rem;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
  color: var(--text-main);
}

.logo svg {
  color: #3b82f6;
  filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.4));
}

.badge {
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-weight: 600;
  text-transform: uppercase;
}

.green-badge {
  background-color: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

/* Project Info Card */
.project-info-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.project-info-card h2 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-meta {
  font-size: 0.75rem;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.meta-label {
  color: var(--text-muted);
}

.meta-value {
  font-weight: 500;
  color: var(--text-main);
}

/* Navigation Links */
.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  flex-grow: 1;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-speed);
}

.nav-btn:hover {
  background-color: var(--bg-card);
  color: var(--text-main);
}

.nav-btn.active {
  background-color: #3b82f6;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 700;
  background-color: rgba(239, 68, 68, 0.2);
  color: #f87171;
  padding: 0.125rem 0.375rem;
  border-radius: 9999px;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.nav-badge.hidden {
  display: none;
}

/* Sidebar Footer & Drag-n-Drop */
.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dropzone {
  position: relative;
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  padding: 0.75rem;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.01);
  transition: border-color var(--transition-speed), background-color var(--transition-speed);
  cursor: pointer;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--border-focus);
  background-color: rgba(59, 130, 246, 0.05);
}

.file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.dropzone-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  pointer-events: none;
}

.dropzone-text svg {
  color: var(--text-dark);
}

.system-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  color: var(--text-dark);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-dot.green {
  background-color: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

/* --- MAIN CONTENT PANELS --- */
.content-area {
  flex-grow: 1;
  height: 100%;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
}

.view-panel {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
  height: 100%;
  flex-direction: column;
}

.view-panel.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  flex-shrink: 0;
}

.panel-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.25rem;
}

.subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Card layout system */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

/* Placeholder for empty/not selected states */
.detail-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  padding: 2rem;
  color: var(--text-dark);
}

.detail-placeholder svg {
  margin-bottom: 1rem;
}

.detail-placeholder p {
  font-size: 0.85rem;
  max-width: 250px;
}

.hidden {
  display: none !important;
}

/* --- VIEW 1: BLAST-RADIUS GRAPH --- */
.graph-layout {
  display: flex;
  gap: 1.5rem;
  flex-grow: 1;
  min-height: 0; /* Important for scrollable flex columns */
}

.canvas-container {
  flex-grow: 1;
  background-color: #060913;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

#blastRadiusCanvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}

#blastRadiusCanvas:active {
  cursor: grabbing;
}

.graph-instructions {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background-color: rgba(11, 15, 25, 0.85);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.graph-legend {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  background-color: rgba(11, 15, 25, 0.85);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  display: flex;
  gap: 0.75rem;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-dot.finding { background-color: var(--color-critical); }
.legend-dot.net { background-color: var(--color-net); }
.legend-dot.component { background-color: var(--color-comp); }

.detail-sidebar {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  overflow-y: auto;
  min-height: 0;
}

/* Dynamic Details Content */
.detail-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.detail-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.node-type-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-dark);
}

.detail-id {
  font-family: monospace;
  font-weight: 700;
  font-size: 1.1rem;
}

.detail-claim {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
}

.detail-section {
  margin-bottom: 1.25rem;
}

.detail-section h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.evidence-card {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}

.evidence-tool {
  font-family: monospace;
  font-weight: 600;
  color: #60a5fa;
  margin-bottom: 0.15rem;
  display: block;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag-badge {
  font-family: monospace;
  font-size: 0.75rem;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
}

.tag-badge.net-tag {
  color: var(--color-net);
  background-color: rgba(6, 182, 212, 0.08);
  border-color: rgba(6, 182, 212, 0.15);
}

.tag-badge.comp-tag {
  color: var(--color-comp);
  background-color: rgba(168, 85, 247, 0.08);
  border-color: rgba(168, 85, 247, 0.15);
}

/* Severity Labels */
.severity-badge {
  font-size: 0.7rem;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
}

.sev-critical { background-color: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.2); }
.sev-major { background-color: rgba(249, 115, 22, 0.15); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.2); }
.sev-minor { background-color: rgba(234, 179, 8, 0.15); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.2); }
.sev-info { background-color: rgba(148, 163, 184, 0.15); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.2); }

/* --- VIEW 2: DEBATE VIEWER --- */
.debate-layout {
  display: flex;
  gap: 1.5rem;
  flex-grow: 1;
  min-height: 0;
}

.debate-list-sidebar {
  width: 250px;
  flex-shrink: 0;
  padding: 1.25rem;
  overflow-y: auto;
}

.debate-list-sidebar h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.debate-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.debate-item-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-speed);
}

.debate-item-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-dark);
}

.debate-item-btn.active {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--border-focus);
}

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

.debate-item-id {
  font-family: monospace;
  font-weight: 700;
  font-size: 0.85rem;
}

.debate-item-title {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.debate-transcript {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  overflow: hidden;
}

.debate-topic-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.topic-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.finding-id-badge {
  font-family: monospace;
  font-weight: 700;
  font-size: 0.9rem;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
}

.topic-title h2 {
  font-size: 1.1rem;
  font-weight: 600;
}

.topic-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.debate-chat-container {
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-right: 0.5rem;
  margin-bottom: 1rem;
}

.debate-round-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-dark);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0.5rem 0;
}

.debate-round-divider::before, .debate-round-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.debate-round-divider:not(:empty)::before {
  margin-right: .5em;
}

.debate-round-divider:not(:empty)::after {
  margin-left: .5em;
}

.chat-bubble-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  max-width: 80%;
}

.chat-bubble-row.si-bubble { align-self: flex-start; }
.chat-bubble-row.pi-bubble { align-self: flex-end; flex-direction: row-reverse; }
.chat-bubble-row.dfm-bubble { align-self: flex-start; }

.agent-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.si-bubble .agent-icon { color: #3b82f6; border-color: rgba(59, 130, 246, 0.3); }
.pi-bubble .agent-icon { color: #f59e0b; border-color: rgba(245, 158, 11, 0.3); }
.dfm-bubble .agent-icon { color: #a855f7; border-color: rgba(168, 85, 247, 0.3); }

.chat-bubble {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  position: relative;
}

.si-bubble .chat-bubble { border-top-left-radius: 2px; }
.pi-bubble .chat-bubble { border-top-right-radius: 2px; background-color: rgba(255, 255, 255, 0.04); }
.dfm-bubble .chat-bubble { border-top-left-radius: 2px; }

.bubble-sender {
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  display: block;
}

.si-bubble .bubble-sender { color: #60a5fa; }
.pi-bubble .bubble-sender { color: #fbbf24; text-align: right; }
.dfm-bubble .bubble-sender { color: #c084fc; }

.bubble-text {
  font-size: 0.85rem;
}

.bubble-evidence {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border-color);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.bubble-evidence span {
  font-family: monospace;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  margin-right: 0.35rem;
}

/* Moderator Ruling Panel */
.moderator-ruling-panel {
  background: rgba(34, 197, 94, 0.03);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 12px;
  padding: 1.25rem;
  flex-shrink: 0;
}

.ruling-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.moderator-avatar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: #22c55e;
}

.ruling-decision-badge {
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
}

.status-upheld { background-color: rgba(34, 197, 94, 0.15); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
.status-overruled { background-color: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.status-merged { background-color: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }

.ruling-body {
  font-size: 0.85rem;
}

.ruling-citations {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.citation-badge {
  font-family: monospace;
  background-color: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: #4ade80;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
}

/* --- VIEW 3: BOARD OVERLAY --- */
.board-layout {
  display: flex;
  gap: 1.5rem;
  flex-grow: 1;
  min-height: 0;
}

.board-viewer-card {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #060913;
  padding: 1.5rem;
  overflow: hidden;
  position: relative;
}

.board-canvas-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#boardOverlayCanvas {
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
}

.board-sidebar {
  width: 300px;
  flex-shrink: 0;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.board-sidebar h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.sidebar-help {
  font-size: 0.75rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.board-finding-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.board-finding-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-speed);
}

.board-finding-btn:hover {
  background: var(--bg-card-hover);
}

.board-finding-btn.active {
  border-color: var(--border-focus);
  background: rgba(59, 130, 246, 0.08);
}

.board-finding-btn-title {
  display: flex;
  justify-content: space-between;
  font-family: monospace;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.board-finding-btn-claim {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* --- VIEW 4: FINDINGS TABLE --- */
.table-filters {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
  align-items: center;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.filter-group select {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  outline: none;
}

.filter-group select:focus {
  border-color: var(--border-focus);
}

.table-container {
  flex-grow: 1;
  overflow-y: auto;
  min-height: 0;
}

.findings-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.findings-table th, .findings-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.findings-table th {
  background-color: rgba(255, 255, 255, 0.02);
  font-weight: 600;
  color: var(--text-muted);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(4px);
}

.findings-table tbody tr.row-main {
  cursor: pointer;
  transition: background-color var(--transition-speed);
}

.findings-table tbody tr.row-main:hover {
  background-color: var(--bg-card-hover);
}

.findings-table tbody tr.row-main.expanded {
  background-color: rgba(255, 255, 255, 0.01);
}

.row-main td {
  vertical-align: middle;
}

.expander-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  transition: transform var(--transition-speed);
  color: var(--text-dark);
}

.expanded .expander-icon {
  transform: rotate(90deg);
  color: var(--text-main);
}

.table-finding-id {
  font-family: monospace;
  font-weight: 700;
}

.agent-text {
  text-transform: capitalize;
  font-weight: 500;
}

.status-badge {
  display: inline-block;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-open { background-color: rgba(96, 165, 250, 0.15); color: #93c5fd; border: 1px solid rgba(96, 165, 250, 0.2); }
.status-contested { background-color: rgba(245, 158, 11, 0.15); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.2); }

/* Details Row */
.row-details td {
  padding: 1.25rem 2rem;
  background-color: rgba(0, 0, 0, 0.15);
}

.details-content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

.details-block {
  margin-bottom: 1rem;
}

.details-block:last-child {
  margin-bottom: 0;
}

.details-block h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-dark);
  margin-bottom: 0.35rem;
}

.details-recommendation {
  background-color: rgba(37, 99, 235, 0.05);
  border-left: 3px solid #3b82f6;
  padding: 0.75rem 1rem;
  border-radius: 0 6px 6px 0;
  font-weight: 500;
}

.table-evidence-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.table-evidence-item {
  font-size: 0.8rem;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 0.5rem;
}

.table-evidence-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.evidence-id-label {
  font-family: monospace;
  font-weight: 700;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  margin-right: 0.35rem;
}

/* --- VIEW 5: TOKEN PANEL --- */
.token-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-shrink: 0;
}

.stat-card {
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
}

.stat-card h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.25rem;
}

.stat-help {
  font-size: 0.75rem;
  color: var(--text-dark);
}

.text-green {
  color: #22c55e;
}

.token-charts-layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 1.5rem;
  flex-grow: 1;
  min-height: 0;
}

.chart-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.chart-card h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.bar-chart-container {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stacked-bar-chart {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex-grow: 1;
  justify-content: center;
}

.bar-chart-row {
  display: grid;
  grid-template-columns: 140px 1fr 70px;
  align-items: center;
  gap: 1rem;
}

.bar-label {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: capitalize;
}

.bar-wrapper {
  height: 20px;
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  border: 1px solid var(--border-color);
}

.bar-prompt {
  background-color: var(--color-prompt);
  height: 100%;
  transition: width 0.5s ease-out;
}

.bar-completion {
  background-color: var(--color-completion);
  height: 100%;
  transition: width 0.5s ease-out;
}

.bar-value {
  font-size: 0.8rem;
  font-weight: 600;
  text-align: right;
  font-family: monospace;
}

.chart-legend-horizontal {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  font-size: 0.75rem;
  margin-top: 1.25rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.legend-dot.prompt-token { background-color: var(--color-prompt); }
.legend-dot.completion-token { background-color: var(--color-completion); }

.coverage-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.coverage-card h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.coverage-notes-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
  flex-grow: 1;
}

.coverage-note-item {
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.8rem;
}

.coverage-note-item h5 {
  font-weight: 600;
  margin-bottom: 0.25rem;
  text-transform: capitalize;
}

.coverage-note-item p {
  color: var(--text-muted);
  line-height: 1.4;
}
