/* Direction A dashboard. Original React data, charts and navigation stay in place. */
.hb-home-a-active .dashboard { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 22px; width: 100%; min-width: 0; padding: 30px 32px 24px !important; background: transparent; transition: none; }
.hb-home-a-active .dashboard > .ant-row, .hb-home-a-active .dashboard > .ant-row > .ant-col { display: contents !important; }
.hb-home-a-intro { grid-column: 1 / -1; order: 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 4px; }
.hb-home-a-intro h1 { margin: 0; color: #172846; font-size: 29px; font-weight: 650; line-height: 1.4; letter-spacing: -.5px; }
.hb-home-a-intro p { margin: 8px 0 0; color: #8594ad; font-size: 12px; line-height: 1.8; }
.hb-home-a-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; }
.hb-home-a-date { display: flex; align-items: center; justify-content: center; height: 42px; padding: 0 18px; border: 1px solid #e6ebf5; border-radius: 9px; background: #fff; color: #42516d; font-size: 12px; font-variant-numeric: tabular-nums; }
.hb-home-a-link { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 0 20px; border: 1px solid var(--hb-primary); border-radius: 9px; background: var(--hb-primary); color: #fff !important; font-size: 12px; text-decoration: none; }
.hb-home-a-link:hover { background: var(--hb-primary-hover); border-color: var(--hb-primary-hover); }
.hb-home-a-link svg { width: 16px; height: 16px; }
.hb-home-a-active .dashboard .ant-card, .hb-home-a-health, .hb-home-a-active .system-message-panel { min-width: 0; border: 1px solid #e6ebf5; border-radius: 16px; background: #fff; box-shadow: none; overflow: hidden; }
.hb-home-a-active .dashboard .overview { grid-column: 1 / -1; order: 1; border: 0; border-radius: 0; background: transparent; overflow: visible; }
.hb-home-a-active .dashboard .overview > .ant-card-head { display: none; }
.hb-home-a-active .dashboard .ant-card.overview > .ant-card-body { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 0; background: transparent; }
.hb-home-a-active .dashboard .overview > .ant-card-body::before, .hb-home-a-active .dashboard .overview > .ant-card-body::after { display: none; }
.hb-home-a-active .dashboard .overview-card { position: relative; float: none; width: auto !important; min-height: 154px; padding: 20px 21px 17px !important; border: 1px solid #e6ebf5; border-radius: 16px; background: #fff !important; box-shadow: none; }
.hb-home-a-active .overview-item { gap: 0; overflow: visible; }
.hb-home-a-active .overview-item__title { margin: 0 44px 16px 0; color: #8594ad; font-size: 13px; line-height: 20px; }
.hb-home-a-active .overview-item__content { display: block; }
.hb-home-a-active .overview-item__count { display: block; color: #172846; font: 600 35px/1.15 "Segoe UI", sans-serif; letter-spacing: -.7px; font-variant-numeric: tabular-nums; }
.hb-home-a-active .overview-item__info-list { display: flex; flex-direction: row; justify-content: flex-start; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 17px; }
.hb-home-a-active .overview-item__info { width: auto; color: #8594ad; font-size: 10px; line-height: 17px; }
.hb-home-a-active .overview-item__info-text { text-align: left; word-break: normal; }
.hb-home-a-active .overview-item__info svg { display: none; }
.hb-home-a-metric-icon { position: absolute; right: 20px; top: 20px; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 11px; background: #edf1ff; color: var(--hb-primary); }
.hb-home-a-metric-icon svg { width: 19px; height: 19px; }
.hb-home-a-active .overview-card:nth-child(3) .hb-home-a-metric-icon { color: #d89a42; background: #fff6e9; }
.hb-home-a-health { grid-column: span 4; order: 3; min-height: 318px; padding: 21px 24px 20px; }
.hb-home-a-active .dashboard .device-message-ranking-card { grid-column: span 8; order: 2; min-height: 232px; height: auto !important; }
.hb-home-a-active .dashboard .system-message-panel { grid-column: 1 / -1; order: 6; position: static; width: auto !important; height: auto; min-height: 232px; z-index: auto; transition: none; }
.hb-home-a-active .dashboard > .ant-row:nth-of-type(3) > .ant-col:first-child > .ant-card { grid-column: span 8; order: 4; height: auto !important; min-height: 280px; }
.hb-home-a-active .dashboard > .ant-row:nth-of-type(3) > .ant-col:last-child > .ant-card { grid-column: span 4; order: 5; height: auto !important; min-height: 280px; }
.hb-home-a-active .dashboard .ant-card > .ant-card-head { min-height: 62px; padding: 16px 24px 10px; border: 0; }
.hb-home-a-active .dashboard .ant-card-head h3 { margin: 0 !important; color: #172846; font-size: 16px !important; font-weight: 600; line-height: 25px; }
.hb-home-a-active .dashboard .ant-card > .ant-card-body { padding: 12px 24px 20px; }
.hb-home-a-active .dashboard .ant-card-extra .ant-space { gap: 0 !important; }
.hb-home-a-active .dashboard .ant-radio-group { display: inline-flex; gap: 3px; padding: 3px; border-radius: 8px; background: #f3f6fd; }
.hb-home-a-active .dashboard .ant-radio-button-wrapper { height: 28px; line-height: 28px; padding: 0 10px; border: 0 !important; border-radius: 5px !important; color: #8594ad; background: transparent; font-size: 10px; }
.hb-home-a-active .dashboard .ant-radio-button-wrapper::before { display: none !important; }
.hb-home-a-active .dashboard .ant-radio-button-wrapper-checked { background: #fff !important; color: var(--hb-primary) !important; box-shadow: 0 1px 4px #1728460a; }
.hb-home-a-active .device-message-ranking__list { gap: 12px; justify-content: center; }
.hb-home-a-active .device-message-ranking__item { display: grid; grid-template-columns: minmax(0, 140px) minmax(0, 1fr) max-content; align-items: center; gap: 18px; min-width: 0; min-height: 32px; padding: 4px 0; }
.hb-home-a-active .device-message-ranking__device-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: #42516d; }
.hb-home-a-active .device-message-ranking__progress-wrapper { min-width: 0; width: 100%; }
.hb-home-a-active .device-message-ranking__progress-wrapper .ant-progress { display: block; width: 100%; min-width: 0; margin: 0; line-height: 1; }
.hb-home-a-active .device-message-ranking__count { min-width: 60px; color: #42516d; font-size: 13px; font-weight: 600; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hb-home-a-active .device-message-ranking__count-unit { margin-left: 4px; color: #8594ad; font-size: 11px; font-weight: 400; }
/* Keep the TOP-50 title and close button visible while the ranking scrolls. */
.hb-home-a-ranking-modal .ant-modal-content { display: flex; flex-direction: column; max-height: min(600px, calc(100vh - 48px)); max-height: min(600px, calc(100dvh - 48px)); overflow: hidden; }
.hb-home-a-ranking-modal .ant-modal-header { flex-shrink: 0; }
.hb-home-a-ranking-modal .ant-modal-body { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.hb-home-a-ranking-list { min-height: 0; padding: 20px 10px; overflow-y: auto; overscroll-behavior: contain; }
.hb-home-a-active .system-message-panel__toggle { display: none; }
.hb-home-a-active .system-message-panel__content { padding: 20px 24px; height: auto; min-height: 232px; }
.hb-home-a-active .system-message-panel__title { margin: 0 0 16px !important; color: #172846; font-size: 16px !important; line-height: 25px; }
.hb-home-a-active .system-message-panel__content .ant-list { max-height: 290px; padding: 0; }
.hb-home-a-active .system-message-panel__item { padding: 12px 0 !important; border-bottom: 1px solid #edf1f8 !important; }
.hb-home-a-active .system-message-panel .ant-list-empty-text { padding: 42px 0; color: #98a6bc; font-size: 12px; }
.hb-home-a-active .dashboard > .ant-row:nth-of-type(3) > .ant-col:last-child .ant-card-body > div:first-child { margin-top: -20px !important; }
.hb-home-a-active .dashboard > .ant-row:nth-of-type(3) > .ant-col:last-child .ant-card-body > div:last-child { color: #98a6bc !important; font-size: 10px !important; }
.hb-home-a-health-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hb-home-a-health h2 { margin: 0; color: #172846; font-size: 16px; font-weight: 600; line-height: 25px; }
.hb-home-a-badge { padding: 4px 10px; border-radius: 6px; background: #f0f3ff; color: var(--hb-primary-muted); font-size: 10px; }
.hb-home-a-health-body { display: flex; align-items: center; justify-content: center; gap: 23px; min-height: 206px; }
.hb-home-a-ring { --hb-online-angle: 0deg; position: relative; display: flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 154px; height: 154px; border-radius: 50%; background: conic-gradient(var(--hb-primary) var(--hb-online-angle), #edf1fc 0); }
.hb-home-a-ring::before { position: absolute; inset: 11px; border-radius: 50%; background: #fff; content: ""; }
.hb-home-a-ring > div { position: relative; display: flex; align-items: center; flex-direction: column; gap: 6px; }
.hb-home-a-ring strong { color: #172846; font-size: 28px; line-height: 1.3; font-weight: 600; }
.hb-home-a-ring small { color: #98a6bc; font-size: 10px; }
.hb-home-a-health dl { flex: 1; min-width: 80px; margin: 0; }
.hb-home-a-health dl > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0; }
.hb-home-a-health dt { display: flex; align-items: center; gap: 7px; color: #8594ad; font-size: 11px; }
.hb-home-a-health dt::before { width: 6px; height: 6px; border-radius: 50%; background: var(--hb-primary); content: ""; }
.hb-home-a-health dl > div:nth-child(2) dt::before { background: #b5c2dc; }
.hb-home-a-health dl > div:nth-child(3) dt::before { background: #27aabd; }
.hb-home-a-health dd { margin: 0; color: #42516d; font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }
.hb-home-a-health-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 7px; background: #f5f7fd; color: #98a6bc; font-size: 10px; line-height: 18px; }
.hb-home-a-health-foot a { flex: 0 0 auto; color: var(--hb-primary); text-decoration: none; }
.hb-home-a-empty { display: flex; align-items: center; flex-direction: column; justify-content: center; gap: 12px; min-height: 123px; color: #98a6bc; font-size: 12px; }
.hb-home-a-empty[hidden] { display: none; }
.hb-home-a-empty svg { width: 32px; height: 32px; color: #c1cbed; }
.hb-home-a-footer { grid-column: 1 / -1; order: 7; display: flex; align-items: center; justify-content: space-between; gap: 18px; color: #98a6bc; font-size: 10px; line-height: 20px; }
.hb-home-a-link:focus-visible, .hb-home-a-health-foot a:focus-visible { outline: 3px solid var(--hb-primary-focus); outline-offset: 3px; }
@media (max-width: 1300px) {
  .hb-home-a-active .dashboard { padding: 25px 24px 20px !important; gap: 18px; }
  .hb-home-a-active .dashboard .ant-card.overview > .ant-card-body { gap: 14px; }
  .hb-home-a-active .dashboard .overview-card { padding: 18px 17px 16px !important; }
  .hb-home-a-metric-icon { right: 16px; top: 16px; width: 32px; height: 32px; }
  .hb-home-a-intro h1 { font-size: 26px; }
  .hb-home-a-health { padding: 20px 18px; }
  .hb-home-a-health-body { gap: 15px; }
  .hb-home-a-ring { width: 124px; height: 124px; }
  .hb-home-a-ring strong { font-size: 25px; }
  .hb-home-a-health dl { min-width: 68px; }
  .hb-home-a-health dd { font-size: 16px; }
  .hb-home-a-health-foot { flex-wrap: wrap; gap: 3px; }
  .hb-home-a-active .dashboard .ant-card > .ant-card-head { padding-left: 20px; padding-right: 20px; }
  .hb-home-a-active .dashboard .ant-card > .ant-card-body { padding-left: 20px; padding-right: 20px; }
  .hb-home-a-actions { gap: 8px; }
  .hb-home-a-date { padding: 0 12px; }
  .hb-home-a-link { padding: 0 14px; }
}
@media (max-width: 1100px) {
  .hb-home-a-active .dashboard .device-message-ranking-card, .hb-home-a-active .dashboard > .ant-row:nth-of-type(3) > .ant-col:first-child > .ant-card { grid-column: span 7; }
  .hb-home-a-health, .hb-home-a-active .dashboard > .ant-row:nth-of-type(3) > .ant-col:last-child > .ant-card { grid-column: span 5; }
  .hb-home-a-active .dashboard .ant-card-head-wrapper { flex-wrap: wrap; gap: 10px; }
  .hb-home-a-active .dashboard .ant-card-extra { margin-left: 0; }
  .hb-home-a-actions .hb-home-a-date { display: none; }
  .hb-home-a-active .device-message-ranking__item { grid-template-columns: minmax(0, 1fr) max-content; gap: 8px 12px; }
  .hb-home-a-active .device-message-ranking__device-name { grid-column: 1; grid-row: 1; }
  .hb-home-a-active .device-message-ranking__count { grid-column: 2; grid-row: 1; }
  .hb-home-a-active .device-message-ranking__progress-wrapper { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 760px) {
  .hb-home-a-active .dashboard { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 22px 16px 18px !important; }
  .hb-home-a-intro { display: block; margin: 0 0 2px; }
  .hb-home-a-intro h1 { font-size: 25px; }
  .hb-home-a-intro p { margin-top: 7px; font-size: 11px; }
  .hb-home-a-actions { margin-top: 16px; justify-content: space-between; }
  .hb-home-a-actions .hb-home-a-date { display: flex; height: 38px; font-size: 11px; }
  .hb-home-a-link { min-height: 38px; font-size: 11px; }
  .hb-home-a-active .dashboard .ant-card.overview > .ant-card-body { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .hb-home-a-active .dashboard .overview-card:last-child { grid-column: 1 / -1; }
  .hb-home-a-active .dashboard .overview-card { min-height: 148px; padding: 16px 14px 14px !important; border-radius: 13px; }
  .hb-home-a-active .overview-item__title { margin-right: 25px; margin-bottom: 14px; font-size: 11px; }
  .hb-home-a-active .overview-item__count { font-size: 30px; }
  .hb-home-a-active .overview-item__info-list { margin-top: 13px; gap: 3px 10px; }
  .hb-home-a-active .overview-item__info { font-size: 9px; }
  .hb-home-a-metric-icon { top: 14px; right: 12px; width: 27px; height: 27px; border-radius: 8px; }
  .hb-home-a-metric-icon svg { width: 16px; height: 16px; }
  .hb-home-a-health, .hb-home-a-active .dashboard .device-message-ranking-card, .hb-home-a-active .dashboard .system-message-panel, .hb-home-a-active .dashboard > .ant-row:nth-of-type(3) > .ant-col:first-child > .ant-card, .hb-home-a-active .dashboard > .ant-row:nth-of-type(3) > .ant-col:last-child > .ant-card { grid-column: 1 / -1; }
  .hb-home-a-health { min-height: 300px; padding: 20px; }
  .hb-home-a-ring { width: 154px; height: 154px; }
  .hb-home-a-health-body { gap: 25px; min-height: 205px; }
  .hb-home-a-health dl { max-width: 120px; }
  .hb-home-a-active .dashboard .ant-card-head h3, .hb-home-a-health h2, .hb-home-a-active .system-message-panel__title { font-size: 15px !important; }
  .hb-home-a-active .dashboard .ant-radio-button-wrapper { padding: 0 9px; }
  .hb-home-a-active .dashboard .ant-card-head-wrapper { display: block; }
  .hb-home-a-active .dashboard .ant-card-extra { margin-top: 10px; }
  .hb-home-a-footer { flex-wrap: wrap; gap: 0; font-size: 9px; }
}
@media (max-width: 360px) {
  .hb-home-a-ring { width: 124px; height: 124px; }
  .hb-home-a-health-body { gap: 16px; }
}

