/* ===== Eos — OmegaHermes ===== */
/* Cárgalo en el host HTML (<link rel="stylesheet" href="eos.css">)
   o inyéctalo con StyleInjector. Prefijo de clases: .eos-  */

.eos-root {
  display: flex;
  height: 100%;
  min-height: 520px;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1f2937;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}

/* ----- columna izquierda ----- */
.eos-side {
  width: 240px;
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  background: #f1f5f9;
  border-right: 1px solid #e5e7eb;
}
.eos-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #e5e7eb;
}
.eos-side-title { font-weight: 600; font-size: 14px; }
.eos-btn-new {
  border: none; background: #2563eb; color: #fff;
  border-radius: 6px; padding: 5px 10px; font-size: 12px; cursor: pointer;
}
.eos-btn-new:hover { background: #1d4ed8; }
.eos-conv-list { flex: 1; overflow-y: auto; padding: 8px; }
.eos-conv-item {
  padding: 8px 10px; border-radius: 6px; font-size: 13px; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px;
}
.eos-conv-item:hover { background: #e2e8f0; }
.eos-conv-item-sel { background: #dbeafe; color: #1d4ed8; font-weight: 600; }

/* ----- columna central ----- */
.eos-center { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.eos-thread { flex: 1; overflow-y: auto; padding: 18px; }
.eos-thread-inner { display: flex; flex-direction: column; gap: 10px; }
.eos-msg {
  max-width: 80%; padding: 10px 14px; border-radius: 14px;
  font-size: 14px; line-height: 1.45; word-wrap: break-word;
}
.eos-msg-user { align-self: flex-end; background: #2563eb; color: #fff; border-bottom-right-radius: 4px; }
.eos-msg-bot  { align-self: flex-start; background: #fff; border: 1px solid #e5e7eb; border-bottom-left-radius: 4px; }
.eos-msg-thinking { color: #94a3b8; font-style: italic; }

.eos-input {
  display: flex; gap: 8px; padding: 12px;
  border-top: 1px solid #e5e7eb; background: #fff;
}
.eos-textarea {
  flex: 1; resize: none; height: 44px; padding: 10px 12px;
  border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; font-family: inherit;
}
.eos-textarea:focus { outline: none; border-color: #2563eb; }
.eos-btn-send {
  border: none; background: #2563eb; color: #fff;
  border-radius: 8px; padding: 0 18px; font-size: 14px; cursor: pointer;
}
.eos-btn-send:hover { background: #1d4ed8; }
.eos-btn-send:disabled { background: #93c5fd; cursor: default; }

/* ----- columna derecha (render) ----- */
.eos-panel {
  width: 380px; flex: 0 0 380px;
  display: flex; flex-direction: column;
  background: #fff; border-left: 1px solid #e5e7eb;
}
.eos-panel-head {
  padding: 12px 16px; font-weight: 600; font-size: 14px;
  border-bottom: 1px solid #e5e7eb;
}
.eos-panel-body { flex: 1; overflow-y: auto; padding: 16px; }
.eos-render-foot { margin-top: 10px; font-size: 12px; color: #64748b; text-align: right; }
.eos-render-text { font-size: 14px; line-height: 1.5; }

/* ----- gráficos / render ----- */
.eos-chart { font-size: 13px; }
.eos-chart-title { font-weight: 600; font-size: 14px; margin-bottom: 12px; }

.eos-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.eos-bar-label { width: 120px; flex: 0 0 120px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eos-bar-track { flex: 1; background: #eef2f7; border-radius: 4px; height: 18px; overflow: hidden; }
.eos-bar-fill { display: block; height: 100%; border-radius: 4px; transition: width .3s ease; }
.eos-bar-value { width: 64px; flex: 0 0 64px; text-align: right; font-variant-numeric: tabular-nums; font-size: 12px; }

.eos-donut-wrap { display: flex; align-items: center; gap: 18px; }
.eos-donut {
  width: 130px; height: 130px; border-radius: 50%; flex: 0 0 130px; position: relative;
}
.eos-donut::after {
  content: ""; position: absolute; inset: 26px; background: #fff; border-radius: 50%;
}
.eos-legend { display: flex; flex-direction: column; gap: 6px; }
.eos-legend-item { font-size: 12px; display: flex; align-items: center; gap: 6px; }
.eos-legend-dot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

.eos-svg { width: 100%; height: 200px; }
.eos-axis { stroke: #cbd5e1; stroke-width: 1; }

.eos-compare { display: flex; align-items: center; gap: 12px; }
.eos-compare-card { flex: 1; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px; text-align: center; }
.eos-compare-dim { font-size: 11px; color: #64748b; text-transform: uppercase; }
.eos-compare-val { font-size: 18px; font-weight: 700; margin-top: 4px; }
.eos-compare-vs { color: #94a3b8; font-weight: 600; }

.eos-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.eos-table th, .eos-table td { border-bottom: 1px solid #e5e7eb; padding: 6px 8px; text-align: left; }
.eos-table th { color: #64748b; font-weight: 600; }

.eos-kpi { text-align: center; padding: 18px; }
.eos-kpi-title { font-size: 13px; color: #64748b; }
.eos-kpi-value { font-size: 34px; font-weight: 700; margin-top: 6px; }

.eos-pivot-placeholder p { color: #64748b; font-size: 13px; line-height: 1.5; }
.eos-pivot-placeholder code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; }