.hpmgr-page {
  --hpmgr-bg: var(--app-bg);
  --hpmgr-surface: var(--app-surface);
  --hpmgr-surface-muted: var(--app-surface-muted);
  --hpmgr-border: var(--app-border);
  --hpmgr-accent: var(--app-accent);
  --hpmgr-accent-strong: var(--app-accent-strong);
  --hpmgr-text: var(--app-text);
  --hpmgr-text-muted: var(--app-text-muted);
  --hpmgr-text-soft: var(--app-text-soft);
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 20px 22px;
  background: var(--hpmgr-bg);
  color: var(--hpmgr-text);
}

.hpmgr-hero,
.hpmgr-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.hpmgr-empty {
  align-items: flex-start;
  flex-direction: column;
}

.hpmgr-kicker,
.hpmgr-card__kicker {
  margin: 0 0 4px;
  color: var(--hpmgr-text-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hpmgr-title {
  margin: 0;
  color: var(--hpmgr-text);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.hpmgr-copy {
  max-width: 680px;
  margin: 4px 0 0;
  color: var(--hpmgr-text-muted);
  font-size: 13px;
}

.hpmgr-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 1.9rem;
  padding: 0 0.75rem;
  border: 1px solid var(--hpmgr-accent);
  border-radius: var(--app-radius-xs);
  background: var(--hpmgr-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.22);
}

.hpmgr-filterbar__shortcut.is-active {
  border-color: var(--app-accent);
  background: var(--app-accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.22);
}

.hpmgr-filterbar__shortcut.is-active:hover {
  border-color: var(--app-accent-strong);
  background: var(--app-accent-strong);
  color: #fff;
}

.hpmgr-user-filter {
  position: relative;
  min-width: 14rem;
}

.hpmgr-select-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  width: 100%;
  min-height: 1.9rem;
  padding: 0 0.65rem;
  border: 1px solid var(--app-border);
  border-radius: 0.4rem;
  background: #fff;
  color: var(--app-text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hpmgr-select-btn:hover,
.hpmgr-select-btn[aria-expanded="true"] {
  border-color: var(--app-accent);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.1);
}

.hpmgr-select-btn .material-symbols-outlined {
  color: var(--app-text-soft);
  font-size: 0.9rem;
}

.hpmgr-select-btn__label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.hpmgr-menu-dropdown {
  position: absolute;
  z-index: 40;
  top: calc(100% + 3px);
  left: 0;
  width: 100%;
  max-height: 260px;
  overflow-y: auto;
  padding: 0.3rem;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-sm);
  background: #fff;
  box-shadow: var(--app-shadow-lg);
}

.hpmgr-menu-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.5rem;
  border-radius: var(--app-radius-xs);
  color: var(--app-text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}

.hpmgr-menu-item:hover {
  background: var(--app-surface-muted);
  color: var(--app-text);
}

.hpmgr-menu-divider {
  height: 1px;
  margin: 0.25rem 0;
  background: var(--app-border);
}

.hpmgr-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 12px;
  border: 1px solid var(--hpmgr-border);
  border-radius: var(--app-radius-sm);
  background: var(--hpmgr-surface);
  box-shadow: var(--app-shadow-sm);
  overflow: hidden;
}

.hpmgr-card {
  border: 1px solid var(--hpmgr-border);
  border-radius: var(--app-radius-sm);
  background: var(--hpmgr-surface);
  box-shadow: var(--app-shadow-sm);
}

.hpmgr-kpi {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 10px;
  row-gap: 2px;
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid var(--hpmgr-border);
}

.hpmgr-kpi:last-child {
  border-right: 0;
}

.hpmgr-kpi__label,
.hpmgr-kpi__note {
  display: block;
  color: var(--hpmgr-text-muted);
  font-size: 11px;
  font-weight: 600;
}

.hpmgr-kpi__label {
  grid-column: 1 / -1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hpmgr-kpi__value {
  display: block;
  margin: 0;
  color: var(--hpmgr-accent-strong);
  font-size: 22px;
  line-height: 1;
}

.hpmgr-kpi__note {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hpmgr-charts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.hpmgr-charts--paired {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hpmgr-card {
  min-width: 0;
  padding: 16px;
}

.hpmgr-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.hpmgr-card__title {
  margin: 0;
  color: var(--hpmgr-text);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hpmgr-card__badge {
  padding: 4px 8px;
  border: 1px solid var(--hpmgr-border);
  border-radius: var(--app-radius-xs);
  background: var(--hpmgr-surface-muted);
  color: var(--hpmgr-accent-strong);
  font-size: 11px;
  font-weight: 800;
}

.hpmgr-chart {
  position: relative;
  height: 360px;
}

.hpmgr-chart--compact {
  height: 360px;
}

.hpmgr-table-wrap {
  overflow-x: auto;
}

.hpmgr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.hpmgr-table th,
.hpmgr-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--hpmgr-border);
  text-align: left;
}

.hpmgr-table th {
  color: var(--hpmgr-text-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hpmgr-table td {
  color: var(--hpmgr-text);
  font-weight: 600;
}

@media (max-width: 1100px) {
  .hpmgr-kpis,
  .hpmgr-charts--paired {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .hpmgr-page {
    padding: 14px;
  }

  .hpmgr-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .hpmgr-kpis,
  .hpmgr-charts,
  .hpmgr-charts--paired {
    grid-template-columns: 1fr;
  }

  .hpmgr-chart,
  .hpmgr-chart--compact {
    height: 300px;
  }

  .hpmgr-kpi {
    border-right: 0;
    border-bottom: 1px solid var(--hpmgr-border);
  }

  .hpmgr-kpi:last-child {
    border-bottom: 0;
  }
}
