/* Capa final v9: densidad y proporciones del diseño definitivo (1672x941). Se carga la última. */

/* Barras de desplazamiento discretas */
.b-list, .b-phases, .b-grid, .b-panel-box, .sidebar, .sidebar * { scrollbar-width: thin; scrollbar-color: #1d5a43 transparent; }
.b-list::-webkit-scrollbar, .b-phases::-webkit-scrollbar, .b-grid::-webkit-scrollbar, .b-panel-box::-webkit-scrollbar, .sidebar *::-webkit-scrollbar { width: 5px; height: 5px; }
.b-list::-webkit-scrollbar-thumb, .b-phases::-webkit-scrollbar-thumb, .b-grid::-webkit-scrollbar-thumb, .b-panel-box::-webkit-scrollbar-thumb, .sidebar *::-webkit-scrollbar-thumb { background: #1d5a43; border-radius: 4px; }

/* Identificación de demostración: una sola insignia en la cabecera; las miniaturas conservan la suya */
.b-card:not(.b-hero) > header .b-tag.demo { display: none; }

/* Cabecera principal: insignia y selector de modo dentro de la tarjeta, sin recortes */
.b-hero { position: relative; }
.b-hero-in { overflow: visible; padding: 14px 26px 34px; }
.b-hero-in > .b-tag.demo { position: absolute; top: 10px; right: 14px; font-size: 9px; padding: 0 7px; line-height: 15px; z-index: 2; }
.b-quote { top: 34px; right: 22px; }
.b-mode { position: absolute; right: 14px; bottom: 10px; display: flex; gap: 4px; z-index: 2; }
.b-mode .b-chip { min-height: 22px; padding: 0 9px; font-size: 11px; background: rgba(2, 8, 5, 0.7); }
.b-mode .b-chip[aria-pressed='true'] { background: var(--b-accent); }
.b-actions { flex-wrap: nowrap; gap: 8px; }

/* Estado del sistema: indicador circular con etiquetas debajo, cuatro en fila */
.b-gauges { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.b-gauge { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "s" "l" "u"; justify-items: center; text-align: center; row-gap: 0; padding: 3px 2px; }
.b-gauge svg { width: 62px; height: 62px; }
.b-gauge strong { font-size: 12px; line-height: 1.2; }
.b-gauge > span { font-size: 10px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-gauge text { font-size: 19px; }
.b-kv { gap: 4px; }
.b-kv li { padding: 2px 8px; font-size: 12px; }

/* Proyectos recientes: miniatura, título, avance y botón en una tarjeta compacta */
.b-proj-row { grid-template-columns: 92px minmax(0, 1fr); align-items: center; padding: 5px 8px; }
.b-cover { width: 92px; height: 56px; }
.b-proj-row > .b-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; min-width: 0; }
.b-proj-row > .b-body > .b-line:first-child, .b-proj-row > .b-body > .b-pbar, .b-proj-row > .b-body > .b-small.b-muted:not(.b-line) { grid-column: 1 / -1; }
.b-proj-row > .b-body > .b-small.b-muted:not(.b-line) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-proj-row .b-btn.sm { min-height: 22px; padding: 0 9px; font-size: 11px; }

/* Cola de tareas: título, avance, duración y botón compactos */
.b-queue .b-list > .b-row { padding: 5px 8px 5px 40px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; }
.b-queue .b-list > .b-row::before { left: 8px; width: 22px; height: 22px; font-size: 11px; }
.b-queue .b-list > .b-row > * { grid-column: 1 / -1; min-width: 0; }
.b-queue .b-list > .b-row > :nth-child(4) { grid-column: 1; }
.b-queue .b-list > .b-row > :nth-child(5) { grid-column: 2; }
.b-queue .b-row .b-btn.sm { min-height: 22px; padding: 0 9px; font-size: 11px; }
.b-queue .b-row strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Agentes */
.b-agent { padding: 4px 8px; }
.b-agents .b-list { gap: 4px; }

/* Editor / salida: pestañas en una fila y registro con ajuste de línea */
.b-act .b-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.b-act .b-tabs::-webkit-scrollbar { display: none; }
.b-act .b-tab { flex: none; min-height: 22px; padding: 0 8px; font-size: 11px; }
.b-panel-box { overflow-x: hidden; }
.b-demo-out { white-space: pre-wrap; overflow-wrap: anywhere; margin: 4px 0 0; font-size: 11px; line-height: 1.4; }

/* Planificador: el punto de la línea de tiempo cabe dentro de la tarjeta */
.b-phases { padding-left: 22px; }
.b-phase::before { left: -30px; top: 7px; width: 14px; height: 14px; }
.b-phase { padding: 3px 8px; gap: 2px; }

/* 1366x768 */
@media (max-width: 1450px) {
  .b-gauge svg { width: 46px; height: 46px; }
  .b-gauge text { font-size: 17px; }
  .b-gauge > span { display: none; }
  .b-proj-row { grid-template-columns: 68px minmax(0, 1fr); }
  .b-cover { width: 68px; height: 44px; }
  .b-proj-row > .b-body > .b-small.b-muted:not(.b-line) { display: none; }
  .b-actions .b-btn { padding: 4px 10px; font-size: 12px; }
}
@media (max-height: 800px) {
  .b-hero-in { padding: 8px 22px 30px; }
  .b-ptasks { display: none; }
}
