/* ==========================================================================
   Clinical SapBERT Tri-Linker - Modern Dark Glassmorphic Design System
   ========================================================================== */

:root {
  --bg-base: #090d16;
  --bg-surface: #0f172a;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.6);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --cyan-primary: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.25);
  --emerald-primary: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.25);
  --amber-primary: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.25);
  --purple-primary: #a855f7;
  --purple-glow: rgba(168, 85, 247, 0.25);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition-smooth: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  background-color: var(--bg-base);
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.08) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.pulse-indicator {
  position: relative;
  width: 14px;
  height: 14px;
}

.pulse-dot {
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--cyan-primary);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--cyan-primary);
}

.pulse-indicator::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--cyan-primary);
  animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(0.95); opacity: 0; }
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stats-bar {
  display: flex;
  gap: 0.75rem;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  font-weight: 500;
}

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

.snomed-dot { background: var(--cyan-primary); box-shadow: 0 0 8px var(--cyan-primary); }
.rxnorm-dot { background: var(--emerald-primary); box-shadow: 0 0 8px var(--emerald-primary); }
.loinc-dot { background: var(--amber-primary); box-shadow: 0 0 8px var(--amber-primary); }
.accuracy-dot { background: var(--purple-primary); box-shadow: 0 0 8px var(--purple-primary); }

.pill-label { color: var(--text-muted); }
.pill-val { font-family: var(--font-mono); font-weight: 600; color: var(--text-primary); }
.highlight-val { color: #c084fc; }

/* ==========================================================================
   Main Grid Layout
   ========================================================================== */
.main-content {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 1.5rem;
  padding: 1.75rem 2rem;
  flex: 1;
}

@media (max-width: 1080px) {
  .main-content { grid-template-columns: 1fr; }
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.panel-title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.panel-desc {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.custom-select {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.custom-select:hover, .custom-select:focus {
  border-color: var(--cyan-primary);
}

/* ==========================================================================
   Textarea Editor Card
   ========================================================================== */
.editor-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  transition: var(--transition-smooth);
}

.editor-wrap:focus-within {
  border-color: var(--cyan-primary);
  box-shadow: 0 0 0 1px var(--cyan-primary), 0 8px 30px rgba(6, 182, 212, 0.15);
}

.clinical-textarea {
  width: 100%;
  height: 280px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  padding: 1.25rem;
  resize: vertical;
  outline: none;
}

.clinical-textarea::placeholder {
  color: var(--text-muted);
}

.action-toolbar {
  display: flex;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition-smooth);
}

.btn-icon {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.45);
}

.btn-secondary {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background: rgba(51, 65, 85, 0.9);
  color: var(--text-primary);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
}

.btn-outline:hover {
  border-color: var(--cyan-primary);
  color: var(--cyan-primary);
}

/* ==========================================================================
   Quick Lookup Card
   ========================================================================== */
.quick-lookup-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quick-lookup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quick-title {
  font-size: 0.875rem;
  font-weight: 600;
}

.quick-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.quick-input-group {
  display: flex;
  gap: 0.5rem;
}

.quick-input {
  flex: 1;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.85rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  outline: none;
  transition: var(--transition-smooth);
}

.quick-input:focus {
  border-color: var(--cyan-primary);
}

.quick-result {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  font-size: 0.8125rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* ==========================================================================
   Metrics Overview Bar
   ========================================================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}

@media (max-width: 800px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: center;
}

.metric-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.metric-val {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
}

.text-cyan { color: var(--cyan-primary); }
.text-emerald { color: var(--emerald-primary); }
.text-amber { color: var(--amber-primary); }
.text-purple { color: #c084fc; }
.text-gold { color: #fbbf24; }

/* ==========================================================================
   Gold Standard Evaluation Panel
   ========================================================================== */
.gold-eval-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(30, 27, 75, 0.45) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  box-shadow: 0 4px 20px -5px rgba(245, 158, 11, 0.15);
  position: relative;
  overflow: hidden;
}

.gold-eval-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #f59e0b, #fbbf24);
}

.gold-eval-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gold-eval-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.gold-badge {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
}

.gold-eval-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #f8fafc;
}

.gold-status-pill {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.gold-metrics-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.gold-metrics-subrow {
  background: rgba(15, 23, 42, 0.4);
  border-top: 1px dashed rgba(245, 158, 11, 0.25);
  margin-top: 0.15rem;
}

@media (max-width: 800px) {
  .gold-metrics-row { grid-template-columns: repeat(2, 1fr); }
}

.gold-metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  text-align: center;
}

.gold-metric-num {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
}

.gold-metric-lbl {
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   Annotated Document Canvas
   ========================================================================== */
.canvas-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  min-height: 220px;
  overflow: hidden;
}

.canvas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background: rgba(15, 23, 42, 0.6);
  border-bottom: 1px solid var(--border-subtle);
}

.canvas-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.canvas-instruction {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.annotated-document {
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 2;
  white-space: pre-wrap;
  color: #cbd5e1;
  max-height: 320px;
  overflow-y: auto;
}

.placeholder-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 3rem 1rem;
  color: var(--text-muted);
  text-align: center;
  font-family: var(--font-sans);
}

.placeholder-icon {
  font-size: 2rem;
}

/* ==========================================================================
   Entity Highlights & Spans
   ========================================================================== */
.entity-span {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  margin: 0 0.15rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.entity-span:hover {
  transform: translateY(-2px);
}

.span-snomed {
  background: rgba(6, 182, 212, 0.18);
  color: #22d3ee;
  border-bottom: 2px solid var(--cyan-primary);
}

.span-snomed:hover, .span-snomed.active {
  background: rgba(6, 182, 212, 0.35);
  box-shadow: 0 0 12px var(--cyan-glow);
}

.span-rxnorm {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border-bottom: 2px solid var(--emerald-primary);
}

.span-rxnorm:hover, .span-rxnorm.active {
  background: rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 12px var(--emerald-glow);
}

.span-loinc {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border-bottom: 2px solid var(--amber-primary);
}

.span-loinc:hover, .span-loinc.active {
  background: rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 12px var(--amber-glow);
}

/* Legend dots */
.legend-wrap {
  display: flex;
  gap: 0.85rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.badge-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.25rem;
}

.snomed-bg { background: var(--cyan-primary); }
.rxnorm-bg { background: var(--emerald-primary); }
.loinc-bg { background: var(--amber-primary); }

/* ==========================================================================
   Inspector Card & Candidate Table
   ========================================================================== */
.inspector-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.inspector-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.inspector-badge-row {
  display: flex;
  gap: 0.5rem;
}

.ontology-badge, .category-badge {
  font-size: 0.6875rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.snomed-badge { background: rgba(6, 182, 212, 0.2); color: #38bdf8; border: 1px solid rgba(6, 182, 212, 0.4); }
.rxnorm-badge { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
.loinc-badge { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.category-badge { background: rgba(255, 255, 255, 0.08); color: var(--text-secondary); }

.inspect-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.detail-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding: 0.85rem;
  background: rgba(15, 23, 42, 0.6);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

@media (max-width: 768px) {
  .detail-row { grid-template-columns: 1fr; }
}

.detail-label {
  display: block;
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.detail-val {
  font-size: 0.875rem;
  font-weight: 600;
}

.detail-val.highlight { color: #38bdf8; }
.detail-val.mono { font-family: var(--font-mono); }

/* Progress bar */
.confidence-container {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.confidence-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
}

.confidence-title { color: var(--text-secondary); }
.confidence-pct { font-family: var(--font-mono); font-weight: 700; color: #a855f7; }

.progress-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #a855f7, #06b6d4);
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Candidates Table */
.candidates-table-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.candidates-heading {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.candidates-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.candidates-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.candidates-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.candidates-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.empty-table {
  text-align: center;
  color: var(--text-muted);
  padding: 1.5rem !important;
}

/* ==========================================================================
   Modal Overlay
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1.5rem;
}

.modal-card {
  background: #0f172a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 720px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  font-size: 1rem;
  font-weight: 700;
}

.btn-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-close:hover { color: var(--text-primary); }

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.code-block {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: #090d16;
  padding: 1rem;
  border-radius: var(--radius-md);
  color: #38bdf8;
  white-space: pre-wrap;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

/* ==========================================================================
   Active Learning & Human-in-the-Loop (HITL) Mode
   ========================================================================== */
.mode-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  cursor: pointer;
}

.switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 18px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #334155;
  transition: .3s;
  border-radius: 18px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background: linear-gradient(135deg, #10b981, #06b6d4);
}

input:checked + .slider:before {
  transform: translateX(16px);
}

.mode-toggle-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

.mode-toggle-wrap.active .mode-toggle-label {
  color: #34d399;
}

.al-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  gap: 1rem;
}

.al-stat-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 500;
}

.al-stat-label {
  color: var(--text-secondary);
}

.al-stat-val {
  font-family: var(--font-mono);
  font-weight: 700;
}

.priority-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.priority-high {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.priority-medium {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.priority-low {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

/* HITL Action Bar in Inspector */
.hitl-actions-container {
  margin-top: 1.25rem;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

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

.hitl-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #f8fafc;
}

.hitl-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
}

.btn-xs {
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
  border-radius: var(--radius-sm);
}

.btn-success {
  background: linear-gradient(135deg, #059669, #10b981);
  color: white;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.btn-success:hover {
  background: linear-gradient(135deg, #047857, #059669);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: white;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #b91c1c, #dc2626);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.btn-accent {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border: 1px solid rgba(99, 102, 241, 0.4);
}

.btn-accent:hover {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

.hitl-feedback-msg {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hitl-feedback-msg.success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.hitl-feedback-msg.triplet {
  background: rgba(139, 92, 246, 0.15);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Assertion Badges */
.assertion-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
}

.assertion-confirmed {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.assertion-negated {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  text-decoration: line-through;
}

.assertion-uncertain {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.assertion-historical {
  background: rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

/* Inline Assertion Tag on Entity Pills in Note */
.entity-pill.is-negated {
  opacity: 0.75;
  border-bottom: 2px dashed #f87171 !important;
  text-decoration: line-through;
}

.entity-pill.is-uncertain {
  border-bottom: 2px dotted #fbbf24 !important;
}

.entity-pill.is-historical {
  border-bottom: 2px dotted #94a3b8 !important;
}

/* Hotkey Hints */
.hotkey-tag {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  font-size: 0.62rem;
  font-family: var(--font-mono);
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  margin-left: 0.3rem;
  vertical-align: middle;
}

/* Batch Queue Bar */
.batch-queue-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
}

.batch-queue-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cyan-primary);
  white-space: nowrap;
}

.batch-select {
  flex: 1;
  font-size: 0.75rem;
  padding: 0.3rem 0.5rem;
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}

/* Hotkey Help Modal Content */
.hotkey-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.hotkey-table th, .hotkey-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}

.hotkey-table th {
  color: var(--text-secondary);
  font-weight: 600;
}

.hotkey-kbd {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  color: var(--cyan-primary);
}

