/* Centro de Control — Sprint UX-1 (jerarquía, grupos, tiles legibles) */

/* Host del launchpad (contiene spotlight + grupos; no es grid) */
#pg-exec #exec-hub-pg-grid {
  display: block;
}

/* —— Launchpad: grupos colapsables —— */
#pg-exec .exec-hub-launchpad {
  margin-top: 4px;
}

#pg-exec .exec-hub-intel-spotlight {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

@media (min-width: 640px) {
  #pg-exec .exec-hub-intel-spotlight {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

#pg-exec .exec-hub-intel-spot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #94a3b8;
  border-radius: 12px;
  background: linear-gradient(168deg, #f1f5f9 0%, #e2e8f0 55%, #dbe2ea 100%);
  text-align: left;
  cursor: pointer;
  min-height: 72px;
  box-shadow: var(--manto-serio-panel-drop, 0 2px 8px rgba(15, 23, 42, 0.06));
}

#pg-exec .exec-hub-intel-spot:focus-visible {
  outline: 2px solid #64748b;
  outline-offset: 2px;
}

#pg-exec .exec-hub-intel-spot__ico img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}

#pg-exec .exec-hub-intel-spot__tit {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--texto-fuerte, #0f172a);
  line-height: 1.25;
}

#pg-exec .exec-hub-intel-spot__cta {
  display: block;
  margin-top: auto;
  font-size: 10px;
  font-weight: 700;
  color: var(--texto-suave, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#pg-exec .exec-hub-groups {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#pg-exec .exec-hub-group {
  border: var(--manto-serio-panel-borde, 1px solid #cbd5e1);
  border-radius: 12px;
  background: var(--gris-0, #fff);
  overflow: hidden;
  box-shadow: var(--manto-serio-panel-drop, 0 1px 4px rgba(15, 23, 42, 0.05));
}

#pg-exec .exec-hub-group--intel {
  border-color: #94a3b8;
  background: var(--gris-50, #f8fafc);
}

#pg-exec .exec-hub-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: var(--gris-100, #f1f5f9);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

#pg-exec .exec-hub-group--intel .exec-hub-group__head {
  background: linear-gradient(168deg, #f1f5f9 0%, #e2e8f0 55%, #dbe2ea 100%);
}

#pg-exec .exec-hub-group__head:focus-visible {
  outline: 2px solid #64748b;
  outline-offset: -2px;
}

#pg-exec .exec-hub-group__head-tit {
  font-size: 13px;
  font-weight: 800;
  color: var(--texto-fuerte, #0f172a);
  letter-spacing: 0.02em;
}

#pg-exec .exec-hub-group__head-sub {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--texto-suave, #64748b);
  margin-top: 2px;
}

#pg-exec .exec-hub-group__chev {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #cbd5e1;
  font-size: 11px;
  color: var(--texto-base, #334155);
  transition: transform 0.15s ease;
}

#pg-exec .exec-hub-group__head[aria-expanded="true"] .exec-hub-group__chev {
  transform: rotate(180deg);
}

#pg-exec .exec-hub-group__body {
  padding: 8px;
  border-top: 1px solid var(--gris-300, #cbd5e1);
}

#pg-exec .exec-hub-group__body[hidden] {
  display: none;
}

/* —— Tiles (fix texto concatenado + jerarquía) —— */
#pg-exec .exec-hub-pg-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (min-width: 640px) {
  #pg-exec .exec-hub-pg-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

#pg-exec .exec-hub-group--intel .exec-hub-pg-grid {
  grid-template-columns: 1fr;
}

@media (min-width: 520px) {
  #pg-exec .exec-hub-group--intel .exec-hub-pg-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

#pg-exec .exec-hub-pg-tile {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 10px 8px;
  border: var(--manto-serio-panel-borde, 1px solid #cbd5e1);
  border-radius: 10px;
  background: var(--gris-0, #fff);
  text-align: left;
  cursor: pointer;
  min-height: 88px;
  width: 100%;
  font-family: inherit;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

#pg-exec .exec-hub-pg-tile:hover {
  border-color: var(--gris-400, #94a3b8);
  box-shadow: var(--manto-serio-panel-drop, 0 2px 6px rgba(15, 23, 42, 0.08));
}

#pg-exec .exec-hub-pg-tile:focus-visible {
  outline: 2px solid #64748b;
  outline-offset: 2px;
}

#pg-exec .exec-hub-pg-tile[aria-expanded="true"] {
  border-color: var(--gris-400, #94a3b8);
  box-shadow: inset 0 0 0 1px rgba(71, 85, 105, 0.15);
}

#pg-exec .exec-hub-pg-tile__ico {
  flex: 0 0 auto;
  line-height: 0;
}

#pg-exec .exec-hub-pg-tile__ico img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
}

#pg-exec .exec-hub-pg-tile__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

#pg-exec .exec-hub-pg-tile__tit {
  display: block;
  width: 100%;
  font-size: 13px;
  font-weight: 800;
  color: var(--texto-fuerte, #0f172a);
  line-height: 1.25;
}

#pg-exec .exec-hub-pg-tile__metric {
  display: block;
  width: 100%;
  font-size: 15px;
  font-weight: 900;
  color: var(--texto-fuerte, #0f172a);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

#pg-exec .exec-hub-pg-tile__desc {
  display: block;
  width: 100%;
  font-size: 11px;
  font-weight: 600;
  color: var(--texto-suave, #64748b);
  line-height: 1.35;
}

#pg-exec .exec-hub-pg-tile__cta {
  display: block;
  width: 100%;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--texto-base, #334155);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Copiloto destacado (fila completa) */
#pg-exec .exec-hub-copilot-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  margin-top: 8px;
  border: 1px solid #94a3b8;
  border-radius: 12px;
  background: linear-gradient(165deg, #0f172a 0%, #1e293b 55%, #334155 100%);
  color: #f8fafc;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
}

#pg-exec .exec-hub-copilot-card:focus-visible {
  outline: 2px solid #94a3b8;
  outline-offset: 2px;
}

#pg-exec .exec-hub-copilot-card__ico img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

#pg-exec .exec-hub-copilot-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

#pg-exec .exec-hub-copilot-card__tit {
  font-size: 14px;
  font-weight: 900;
}

#pg-exec .exec-hub-copilot-card__desc {
  font-size: 11px;
  opacity: 0.88;
  line-height: 1.35;
}

#pg-exec .exec-hub-copilot-card__cta {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #f8fafc;
}

/* Toolbar: CTA IA más visible cuando hay datos */
#pg-exec .exec-hub-toolbar .bitacora-btn--pri:not(:disabled) {
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

#pg-exec .exec-hub-sync-hint {
  font-size: 12px;
  color: var(--texto-suave, #64748b);
  margin: 0 0 8px;
}
