/* Hub v239: one compact Command Center with no repeated KPI or assistant surface. */
.hub-command-dashboard-v228[data-release="hub-command-dashboard-v228"] { gap: 14px; }

.hub-command-attention-v239 { margin: 0; }

.hub-command-history-v239 {
  border-top: 1px solid var(--line);
  padding-top: 2px;
}

.hub-command-history-v239 > summary {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 4px;
  cursor: pointer;
  list-style: none;
}

.hub-command-history-v239 > summary::-webkit-details-marker { display: none; }
.hub-command-history-v239 > summary span { display: grid; gap: 1px; }
.hub-command-history-v239 > summary small { color: #3977b5; font-size: 9px; font-weight: 950; letter-spacing: .08em; }
.hub-command-history-v239 > summary strong { color: var(--text); font-size: 15px; }
.hub-command-history-v239 > summary > b { color: #1765ad; font-size: 18px; transition: transform .18s ease; }
.hub-command-history-v239[open] > summary > b { transform: rotate(180deg); }
.hub-command-history-v239 > summary:focus-visible { outline: 3px solid #55a5ea; outline-offset: 3px; border-radius: 10px; }

.hub-command-history-v239 .shipping-daily-summary {
  display: block;
  margin: 2px 0 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 94%, #edf5ff);
  box-shadow: none;
  color: var(--text);
  backdrop-filter: none;
}

.hub-command-history-v239 .shipping-daily-empty { padding: 14px; border-color: var(--line); color: var(--muted); }
.hub-command-history-v239 .shipping-daily-head { display: flex; align-items: baseline; gap: 8px; }
.hub-command-history-v239 .shipping-daily-head > span { color: #2a71b7; }
.hub-command-history-v239 .shipping-daily-head > b { color: var(--text); }
.hub-command-history-v239 .shipping-daily-head > small { color: var(--muted); }
.hub-command-history-v239 .shipping-daily-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; margin-top: 9px; }
.hub-command-history-v239 .shipping-daily-days > a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; align-content: start; min-width: 0; padding: 9px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface2); color: var(--text); }
.hub-command-history-v239 .shipping-daily-days > a:hover { border-color: #4c8ed0; transform: none; }
.hub-command-history-v239 .shipping-daily-days > a.is-today { border-color: #d2a63d; background: color-mix(in srgb, var(--surface2) 84%, #fff2bf); }
.hub-command-history-v239 .shipping-day-label { color: var(--muted); font-size: 10px; font-weight: 900; }
.hub-command-history-v239 .shipping-day-total { color: #185eae; font-size: 19px; font-weight: 950; line-height: 1; }
.hub-command-history-v239 .shipping-day-total small { color: var(--muted); font-size: 8px; }
.hub-command-history-v239 .shipping-day-routes { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.hub-command-history-v239 .shipping-day-routes b { display: flex; align-items: center; justify-content: space-between; gap: 3px; min-width: 0; padding: 4px 5px; border-radius: 7px; font-size: 8px; font-weight: 850; white-space: nowrap; }
.hub-command-history-v239 .shipping-day-routes em { color: currentColor; font-size: 11px; font-style: normal; }
.hub-command-history-v239 .route-digital { color: #5b21b6; background: #ede9fe; }
.hub-command-history-v239 .route-courier { color: #92400e; background: #fef3c7; }
.hub-command-history-v239 .route-partner { color: #7e22ce; background: #f3e8ff; }
.hub-command-history-v239 .route-manual { color: #047857; background: #d1fae5; }

html[data-dark="true"] .hub-command-history-v239 .shipping-daily-days > a.is-today { background: #392f17; }

@media (max-width: 1100px) {
  .hub-command-history-v239 .shipping-daily-days { grid-template-columns: repeat(7, minmax(145px, 1fr)); overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
}

@media (max-width: 700px) {
  .hub-command-dashboard-v228 { gap: 11px; }
  .hub-command-history-v239 > summary { min-height: 50px; }
  .hub-command-history-v239 .shipping-daily-summary { padding: 9px; }
  .hub-command-history-v239 .shipping-daily-days { grid-template-columns: repeat(7, minmax(142px, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .hub-command-history-v239 > summary > b { transition: none; }
}
