/* ═══════════════════════════════════════════════════════════════════
   Sidebar Command Panel — New widget styles
   File: assets/css/sidebar-panel.css
   Enqueue on: is_singular()
   ═══════════════════════════════════════════════════════════════════ */

/* ── 0. CONTROL DE MISION ──────────────────────────────────────────── */

.sidebar-widget--mision-ctrl {
  border-color: rgba(34, 197, 94, 0.2);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.04), rgba(0, 0, 0, 0.15));
}

.mc-body {
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Progress bar */
.mc-progress__bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.mc-progress__fill {
  height: 100%;
  width: 0%;
  background: var(--ufo-green);
  border-radius: 2px;
  transition: width 120ms ease-out;
  box-shadow: 0 0 6px var(--ufo-green-glow);
}

.mc-progress__meta {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}

.mc-progress__pct,
.mc-progress__time {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.mc-progress__pct {
  color: var(--ufo-green);
}

/* Last updated */
.mc-updated {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.65rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.mc-updated svg {
  color: var(--text-dim);
  flex-shrink: 0;
}

/* Quick actions row */
.mc-actions {
  display: flex;
  gap: 4px;
}

.mc-action {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.6rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mc-action:hover {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.2);
  color: var(--ufo-green);
}

.mc-action--ok {
  background: rgba(34, 197, 94, 0.15) !important;
  border-color: rgba(34, 197, 94, 0.4) !important;
  color: var(--ufo-green) !important;
}

/* Jump links */
.mc-jumps {
  display: flex;
  gap: 4px;
}

.mc-jump {
  flex: 1;
  text-align: center;
  padding: 5px 4px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.mc-jump:hover {
  color: var(--ufo-green);
  border-color: rgba(34, 197, 94, 0.2);
  background: rgba(34, 197, 94, 0.06);
}

/* ── 1. INDICE OPERATIVO (TOC extras) ──────────────────────────────── */

.toc-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 6px 12px;
  list-style: none;
}

.toc-item--checkpoint {
  list-style: none;
}

.toc-link--checkpoint {
  font-family: var(--font-mono);
  font-size: 0.7rem !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.7;
}

.toc-link--checkpoint:hover {
  opacity: 1;
}

.toc-marker--cp {
  width: 5px;
  height: 5px;
  border: 1px solid var(--text-dim);
  background: transparent;
  border-radius: 2px;
}

.toc-link--active .toc-marker--cp,
.toc-link--checkpoint:hover .toc-marker--cp {
  border-color: var(--ufo-green);
  background: var(--ufo-green);
  box-shadow: 0 0 6px var(--ufo-green);
}

/* ── 3. SEMAFORO DEL CASO ──────────────────────────────────────────── */

.semaforo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 16px;
}

.semaforo-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
}

.semaforo-chip__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.semaforo-chip--green  { color: var(--ufo-green); border-color: rgba(34, 197, 94, 0.3); }
.semaforo-chip--cyan   { color: #06b6d4; border-color: rgba(6, 182, 212, 0.3); }
.semaforo-chip--amber  { color: #f59e0b; border-color: rgba(245, 158, 11, 0.3); }
.semaforo-chip--red    { color: #ef4444; border-color: rgba(239, 68, 68, 0.3); }
.semaforo-chip--purple { color: #a855f7; border-color: rgba(168, 85, 247, 0.3); }
.semaforo-chip--dim    { color: var(--text-dim); }

/* ── 4. EVIDENCIA RAPIDA ───────────────────────────────────────────── */

.ev-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ev-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.ev-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ufo-green);
}

.ev-key {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
}

.ev-key__icon {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  flex-shrink: 0;
}

.ev-key__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ev-key__name {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.ev-actions {
  display: flex;
  gap: 6px;
}

.ev-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: 5px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.ev-btn--view {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: var(--ufo-green);
}

.ev-btn--view:hover {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
}

.ev-btn--dl {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.ev-btn--dl:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.ev-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin: 0;
  padding: 4px 0;
}

.ev-empty svg {
  flex-shrink: 0;
  opacity: 0.5;
}

/* ── 5. RED EXPRESS ────────────────────────────────────────────────── */

.sidebar-widget__badge {
  margin-left: auto;
  padding: 1px 7px;
  background: rgba(34, 197, 94, 0.12);
  border-radius: 100px;
  font-size: 0.65rem;
  color: var(--ufo-green);
}

.red-body {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.red-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.red-row__head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.red-row__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.red-row__dot--green  { background: var(--ufo-green); }
.red-row__dot--cyan   { background: #06b6d4; }
.red-row__dot--amber  { background: #f59e0b; }
.red-row__dot--red    { background: #ef4444; }

.red-row__label {
  flex: 1;
}

.red-row__count {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
}

.red-row__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-left: 11px;
}

.red-chip {
  display: inline-block;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
  transition: all var(--transition-fast);
}

.red-chip:hover {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.2);
  color: var(--ufo-green);
}

.red-chip--more {
  background: rgba(34, 197, 94, 0.06);
  border-color: rgba(34, 197, 94, 0.15);
  color: var(--ufo-green);
  font-family: var(--font-mono);
}

.red-explore {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ufo-green);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.red-explore:hover {
  opacity: 1;
}

/* ── 6. FUENTES Y TRAZABILIDAD ─────────────────────────────────────── */

.osint-body {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.osint-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.osint-row:last-of-type {
  border-bottom: none;
}

.osint-row__label {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.osint-row__value {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.osint-row__value--green  { color: var(--ufo-green); }
.osint-row__value--cyan   { color: #06b6d4; }
.osint-row__value--amber  { color: #f59e0b; }
.osint-row__value--red    { color: #ef4444; }

.osint-note {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-style: italic;
  line-height: 1.5;
  margin: 2px 0 0;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.2);
  border-left: 2px solid rgba(34, 197, 94, 0.3);
  border-radius: 0 4px 4px 0;
}

.osint-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ufo-green);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.osint-link:hover {
  opacity: 1;
}

/* ── 7. UNIDAD DE INVESTIGACION ─────────────────────────────────────── */

.sidebar-widget--unidad {
  border-color: rgba(34, 197, 94, 0.15);
  overflow: hidden;
}

.unidad-scanline {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ufo-green), transparent);
  opacity: 0.6;
  animation: unidad-scan 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes unidad-scan {
  0%, 100% { top: 0; opacity: 0.3; }
  50% { top: 100%; opacity: 0.6; }
}

.unidad-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Rank header */
.unidad-rank {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.unidad-rank__label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ufo-green);
  text-transform: uppercase;
}

.unidad-rank__clearance {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  padding: 2px 8px;
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 3px;
  background: rgba(34, 197, 94, 0.06);
}

/* Agent card */
.unidad-agent {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.unidad-agent:hover {
  background: rgba(34, 197, 94, 0.06);
  border-color: rgba(34, 197, 94, 0.15);
}

.unidad-agent--lead {
  background: rgba(34, 197, 94, 0.03);
  border: 1px solid rgba(34, 197, 94, 0.1);
}

.unidad-agent--lead:hover {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.25);
}

/* Avatar */
.unidad-agent__avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.unidad-agent__avatar-wrap--sm {
  width: 32px;
  height: 32px;
}

.unidad-agent__avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(34, 197, 94, 0.25);
}

.unidad-agent--lead .unidad-agent__avatar {
  border-color: rgba(34, 197, 94, 0.5);
}

.unidad-agent__avatar-wrap--sm .unidad-agent__avatar {
  border-width: 1.5px;
  border-color: rgba(255, 255, 255, 0.1);
}

.unidad-agent__ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid rgba(34, 197, 94, 0.15);
  animation: ring-pulse 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ring-pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.06); }
}

.unidad-agent__status {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  border: 2px solid var(--bufo-surface-1, #0a0e14);
}

.unidad-agent__status--active {
  background: var(--ufo-green);
  box-shadow: 0 0 6px var(--ufo-green);
}

.unidad-agent__avatar-wrap--sm .unidad-agent__status {
  width: 6px;
  height: 6px;
  border-width: 1.5px;
  bottom: 0;
  right: 0;
}

/* Agent info */
.unidad-agent__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.unidad-agent__name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.unidad-agent--sub .unidad-agent__name {
  font-size: 0.75rem;
  font-weight: 500;
}

.unidad-agent__meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.unidad-agent__callsign {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
}

.unidad-agent__callsign svg {
  color: var(--ufo-green);
  opacity: 0.6;
}

.unidad-agent__revision {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.unidad-agent__revision svg {
  color: var(--ufo-cyan, #06b6d4);
  opacity: 0.6;
}

.unidad-agent__arrow {
  color: var(--text-dim);
  opacity: 0;
  transition: opacity var(--transition-fast);
  flex-shrink: 0;
}

.unidad-agent:hover .unidad-agent__arrow {
  opacity: 0.5;
}

/* Principal bio */
.unidad-principal__bio {
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin: 6px 0 0;
  padding: 0 12px;
  font-style: italic;
}

/* Divider between ranks */
.unidad-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 8px;
  padding: 0 4px;
}

.unidad-divider__line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}

.unidad-divider__label {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  white-space: nowrap;
}

/* Subordinates list */
.unidad-subordinates {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ── 8. CANAL ABIERTO CTA ─────────────────────────────────────────── */

.sidebar-widget--canal {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 136, 0.2);
  background: linear-gradient(135deg,
    rgba(0, 255, 136, 0.03) 0%,
    rgba(0, 0, 0, 0.25) 40%,
    rgba(0, 212, 255, 0.03) 100%);
}

.canal-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent,
    var(--ufo-green),
    var(--ufo-cyan, #00d4ff),
    transparent);
  opacity: 0.7;
  pointer-events: none;
}

.canal-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  opacity: 0.5;
}

.canal-noise {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.5;
  pointer-events: none;
}

.canal-body {
  position: relative;
  z-index: 1;
  padding: 22px 18px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

/* Signal icon with pulse rings */
.canal-signal {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
}

.canal-signal__icon {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 50%;
  color: var(--ufo-green);
}

.canal-signal__pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(0, 255, 136, 0.25);
  animation: canal-pulse 2.5s ease-out infinite;
}

.canal-signal__pulse--2 {
  animation-delay: 1.25s;
}

@keyframes canal-pulse {
  0% { transform: scale(0.7); opacity: 0.8; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* Header text */
.canal-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.canal-freq {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  color: var(--ufo-green);
  opacity: 0.7;
}

.canal-freq__dot {
  width: 4px;
  height: 4px;
  background: var(--ufo-green);
  border-radius: 50%;
  animation: freq-blink 1.5s step-end infinite;
}

@keyframes freq-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

.canal-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: 0.02em;
}

.canal-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

/* Prompt lines */
.canal-prompts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.canal-prompt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: left;
}

.canal-prompt svg {
  flex-shrink: 0;
  color: var(--ufo-green);
  opacity: 0.6;
}

/* Action buttons */
.canal-actions {
  display: flex;
  gap: 8px;
  width: 100%;
}

.canal-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: all var(--transition-base);
  cursor: pointer;
  border: 1px solid transparent;
}

.canal-btn--primary {
  background: var(--ufo-green);
  color: var(--bufo-space, #050508);
  border-color: var(--ufo-green);
  box-shadow: 0 0 16px rgba(0, 255, 136, 0.2);
}

.canal-btn--primary:hover {
  background: var(--ufo-green-bright, #4ade80);
  box-shadow: 0 0 24px rgba(0, 255, 136, 0.35);
  transform: translateY(-1px);
}

.canal-btn--secondary {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
}

.canal-btn--secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

/* Encrypted footer */
.canal-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  opacity: 0.6;
}

.canal-footer svg {
  color: var(--ufo-green);
  opacity: 0.5;
}

/* ── Sidebar ficha (for normalized dossier_data) ───────────────────── */

.sidebar-ficha__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar-ficha__row:last-child {
  border-bottom: none;
}

.sidebar-ficha__label {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.sidebar-ficha__value {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR MINI TERMINAL
   ═══════════════════════════════════════════════════════════════════════════ */

@keyframes sb-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

@keyframes sb-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

.sidebar-widget--terminal {
  border-color: rgba(34, 197, 94, 0.15);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.03), rgba(0, 0, 0, 0.2));
}

.sb-terminal {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(34, 197, 94, 0.15);
  margin: 0 -1px -1px;
  font-family: var(--bufo-mono);
}

.sb-terminal__header {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  background: rgba(34, 197, 94, 0.04);
  border-bottom: 1px solid rgba(34, 197, 94, 0.08);
}

.sb-terminal__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.sb-terminal__dot--r { background: #ff5f56; }
.sb-terminal__dot--y { background: #ffbd2e; }
.sb-terminal__dot--g { background: #27c93f; }

.sb-terminal__title {
  margin-left: 6px;
  font-size: 0.58rem;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sb-terminal__status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.5rem;
  color: var(--bufo-green);
  letter-spacing: 0.1em;
  font-weight: 600;
}

.sb-terminal__status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--bufo-green);
  animation: sb-pulse 2s ease-in-out infinite;
}

.sb-terminal__body {
  padding: 8px 10px;
  max-height: 260px;
  min-height: 120px;
  overflow-y: auto;
  font-size: 0.68rem;
  line-height: 1.65;
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 197, 94, 0.35) rgba(255, 255, 255, 0.03);
  cursor: text;
}

.sb-terminal__welcome {
  margin-bottom: 8px;
}

.sb-terminal__system {
  display: block;
  color: rgba(34, 197, 94, 0.6);
  font-size: 0.62rem;
  line-height: 1.6;
}

.sb-terminal__cmd-hint {
  color: var(--bufo-green);
  font-weight: 600;
}

.sb-terminal__line {
  margin-bottom: 2px;
  word-break: break-word;
  color: rgba(255, 255, 255, 0.7);
}

.sb-terminal__line--system {
  color: rgba(34, 197, 94, 0.7);
}

.sb-terminal__line--error {
  color: rgba(239, 68, 68, 0.85);
}

.sb-terminal__line--prompt {
  color: rgba(255, 255, 255, 0.85);
}

.sb-terminal__line--dim {
  opacity: 0.5;
}

.sb-terminal__line a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  border-bottom: 1px solid rgba(34, 197, 94, 0.2);
  transition: color 0.2s, border-color 0.2s;
}

.sb-terminal__line a:hover {
  color: var(--bufo-green);
  border-bottom-color: rgba(34, 197, 94, 0.5);
}

.sb-terminal__interactive {
  margin-top: 4px;
}

.sb-terminal__prompt {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.sb-terminal__user {
  color: var(--bufo-green);
  font-weight: 600;
}

.sb-terminal__path {
  color: var(--bufo-cyan, #22d3ee);
}

.sb-terminal__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--bufo-mono);
  font-size: 0.68rem;
  caret-color: var(--bufo-green);
  padding: 0;
  min-width: 0;
}

.sb-terminal__input::placeholder {
  color: rgba(34, 197, 94, 0.2);
}

.sb-terminal__scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.06) 2px, rgba(0, 0, 0, 0.06) 4px);
  pointer-events: none;
  opacity: 0.4;
}
