.reporting-workspace {
  --report-primary: #6366f1;
  --report-primary-deep: #4f46e5;
  --report-purple: #7c3aed;
  --report-surface: #ffffff;
  --report-surface-soft: #f8f7ff;
  --report-border: #e2e8f0;
  --report-border-purple: #ddd6fe;
  --report-text: #1e293b;
  --report-muted: #64748b;
  --report-subtle: #94a3b8;
  min-width: 0;
  color: var(--report-text);
  font-family: var(--pe-font-ui), sans-serif;
}

.reporting-workspace *,
.reporting-workspace *::before,
.reporting-workspace *::after {
  box-sizing: border-box;
}

.reporting-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
  padding: 24px;
  border: 1px solid var(--report-border-purple);
  border-radius: 16px;
  background:
    radial-gradient(circle at 10% 15%, rgba(124, 58, 237, .12), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #f5f3ff 100%);
  box-shadow: 0 8px 24px rgba(79, 70, 229, .07);
}

.reporting-page-heading {
  max-width: 720px;
  min-width: 0;
}

.reporting-eyebrow,
.reporting-pack-heading > div:first-child > span {
  display: block;
  margin-bottom: 6px;
  color: var(--report-purple);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}

.reporting-page-heading h2,
.reporting-pack-heading h2 {
  margin: 0;
  color: var(--report-text);
  line-height: 1.45;
}

.reporting-page-heading h2 {
  font-size: clamp(22px, 3vw, 30px);
}

.reporting-page-heading p,
.reporting-pack-heading p {
  margin: 8px 0 0;
  color: var(--report-muted);
  line-height: 1.9;
}

.reporting-header-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
  flex: 0 0 auto;
}

.reporting-availability {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #f0fdf4;
  color: #166534;
  font-size: 11px;
  font-weight: 700;
}

.reporting-availability > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
}

.reporting-export-button,
.reporting-apply-button,
.reporting-retry-button {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform .15s ease,
    box-shadow .15s ease,
    background .15s ease;
}

.reporting-export-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 150px;
  padding: 9px 16px;
  background: var(--report-primary);
  color: #fff;
}

.reporting-export-button svg {
  width: 17px;
  height: 17px;
}

.reporting-header-actions small {
  max-width: 220px;
  color: var(--report-subtle);
  font-size: 10px;
  line-height: 1.7;
  text-align: left;
}

.reporting-export-button:disabled,
.reporting-apply-button:disabled {
  border: 1px solid #d7dce5;
  background: #eef1f5;
  color: #8a94a5;
  cursor: not-allowed;
  box-shadow: none;
}

.reporting-export-button:not(:disabled):hover,
.reporting-apply-button:not(:disabled):hover,
.reporting-retry-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(79, 70, 229, .18);
}

.reporting-workspace button:focus-visible,
.reporting-workspace input:focus-visible,
.reporting-workspace select:focus-visible,
.reporting-pack-panel:focus-visible {
  outline: 3px solid rgba(99, 102, 241, .3);
  outline-offset: 2px;
}

.reporting-foundation-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid #c7d2fe;
  border-radius: 14px;
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  color: #3730a3;
  line-height: 1.75;
}

.reporting-foundation-notice strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #312e81;
}

.reporting-foundation-notice p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #4f46e5;
  line-height: 1.7;
  max-width: 52rem;
}

.reporting-foundation-notice span,
.reporting-notice-icon {
  color: #4f46e5;
  font-size: 12px;
  flex-shrink: 0;
}

.reporting-pack-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px;
  border: 1px solid var(--report-border);
  border-radius: 14px;
  background: #fff;
}

.reporting-pack-tab {
  min-width: 0;
  min-height: 58px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--report-muted);
  font-family: inherit;
  cursor: pointer;
  text-align: right;
  transition:
    border-color .15s ease,
    background .15s ease,
    color .15s ease;
}

.reporting-pack-tab span,
.reporting-pack-tab small {
  display: block;
  overflow-wrap: anywhere;
}

.reporting-pack-tab span {
  font-size: 13px;
  font-weight: 800;
}

.reporting-pack-tab small {
  margin-top: 3px;
  color: var(--report-subtle);
  font-family: system-ui, sans-serif;
  font-size: 9px;
  direction: ltr;
  text-align: right;
}

.reporting-pack-tab:hover {
  border-color: var(--report-border-purple);
  background: #faf9ff;
  color: var(--report-primary-deep);
}

.reporting-pack-tab.active {
  border-color: #c4b5fd;
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  color: var(--report-primary-deep);
  box-shadow: inset 0 -2px 0 var(--report-purple);
}

.reporting-security-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--report-border);
  border-radius: 14px;
  background: #fff;
}

.reporting-security-copy {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 240px;
}

.reporting-security-copy > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: #ede9fe;
  color: var(--report-purple);
}

.reporting-security-copy svg,
.reporting-section-icon svg,
.reporting-panel-heading > span svg {
  width: 19px;
  height: 19px;
}

.reporting-security-copy h3,
.reporting-section-heading h3,
.reporting-panel-heading h3 {
  margin: 0;
  color: var(--report-text);
  font-size: 13px;
}

.reporting-security-copy p,
.reporting-section-heading p,
.reporting-panel-heading p {
  margin: 3px 0 0;
  color: var(--report-muted);
  font-size: 10px;
  line-height: 1.7;
}

.reporting-access-list,
.reporting-pack-access {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.reporting-access-list > span,
.reporting-pack-access > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #d8dee9;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-family: system-ui, sans-serif;
  font-size: 10px;
  direction: ltr;
}

.reporting-access-list small,
.reporting-pack-access small {
  padding: 1px 5px;
  border-radius: 999px;
  background: #ede9fe;
  color: #6d28d9;
  font-family: var(--pe-font-ui), sans-serif;
  font-size: 8px;
  direction: rtl;
}

.reporting-filter-shell,
.reporting-pack-panel,
.reporting-panel {
  border: 1px solid var(--report-border);
  border-radius: 14px;
  background: var(--report-surface);
  box-shadow: 0 4px 16px rgba(79, 70, 229, .045);
}

.reporting-filter-shell {
  margin-bottom: 18px;
  padding: 16px;
}

.reporting-section-heading,
.reporting-panel-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reporting-section-icon,
.reporting-panel-heading > span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: #eef2ff;
  color: var(--report-primary);
}

.reporting-filter-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.reporting-filter-field {
  min-width: 0;
}

.reporting-filter-field label,
.reporting-filter-field small {
  display: block;
}

.reporting-filter-field label {
  margin-bottom: 6px;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
}

.reporting-filter-field input,
.reporting-filter-field select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid #d8dee9;
  border-radius: 9px;
  background: #fff;
  color: var(--report-text);
  font-family: inherit;
  font-size: 11px;
  padding: 8px 10px;
}

.reporting-filter-field input:disabled,
.reporting-filter-field select:disabled {
  background: #f8fafc;
  color: #8a94a5;
  cursor: not-allowed;
  opacity: 1;
}

.reporting-filter-field small {
  margin-top: 5px;
  color: var(--report-subtle);
  font-size: 9px;
  line-height: 1.6;
}

.reporting-filter-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #edf0f5;
}

.reporting-filter-footer p {
  margin: 0;
  color: var(--report-muted);
  font-size: 10px;
  line-height: 1.8;
}

.reporting-apply-button {
  min-width: 110px;
  padding: 9px 18px;
  background: var(--report-primary);
  color: #fff;
}

.reporting-pack-panel {
  min-width: 0;
  padding: 20px;
}

.reporting-pack-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.reporting-pack-heading > div:first-child {
  max-width: 740px;
  min-width: 0;
}

.reporting-pack-heading h2 {
  font-size: clamp(18px, 2.2vw, 23px);
}

.reporting-pack-heading p {
  font-size: 12px;
}

.reporting-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

/* BIG_002 — plan mode banner (observe vs enforce) */
.reporting-plan-mode-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--report-border, #e2e8f0);
  border-radius: 12px;
  background: #f8fafc;
  font-size: 12px;
}
.reporting-plan-mode-banner small {
  color: var(--report-muted, #64748b);
  line-height: 1.5;
}
.reporting-status-chip.is-error {
  background: #fee2e2;
  color: #991b1b;
}

/* PLAN-003 — read-only plan capability matrix panel */
.reporting-plan-matrix {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--report-border-purple, #ddd6fe);
  border-radius: 14px;
  background: linear-gradient(180deg, #faf9ff 0%, #fff 100%);
}
.reporting-plan-matrix > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  font-weight: 700;
  color: var(--report-text, #1e293b);
}
.reporting-plan-matrix > summary::-webkit-details-marker { display: none; }
.reporting-plan-matrix-title { font-size: 14px; }
.reporting-plan-matrix > summary small {
  color: var(--report-muted, #64748b);
  font-weight: 600;
  font-size: 11px;
}
.reporting-plan-matrix-body { margin-top: 12px; }
.reporting-plan-matrix-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.reporting-plan-matrix-table th[scope="row"] {
  text-align: start;
  vertical-align: top;
  min-width: 160px;
}
.reporting-plan-matrix-table th[scope="row"] code {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #4338ca;
}
.reporting-plan-matrix-table th[scope="row"] small {
  display: block;
  margin-top: 2px;
  color: var(--report-muted, #64748b);
  font-weight: 500;
  font-size: 11px;
}
.reporting-plan-matrix-table td.plan-level span {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #f1f5f9;
  color: #334155;
}
.reporting-plan-matrix-table td.plan-level.is-yes span { background: #dcfce7; color: #166534; }
.reporting-plan-matrix-table td.plan-level.is-limited span { background: #fef9c3; color: #854d0e; }
.reporting-plan-matrix-table td.plan-level.is-no span { background: #fee2e2; color: #991b1b; }
.reporting-plan-matrix-table td.plan-level.is-target span { background: #e0e7ff; color: #3730a3; }
.reporting-plan-matrix-table td.plan-level.is-future span { background: #f3e8ff; color: #6b21a8; }
.reporting-plan-matrix-notes {
  margin: 10px 0 0;
  padding-inline-start: 18px;
  color: var(--report-muted, #64748b);
  font-size: 12px;
  line-height: 1.7;
}
.reporting-plan-matrix-hint {
  margin: 0;
  color: var(--report-muted, #64748b);
  font-size: 12px;
  line-height: 1.7;
}

.reporting-kpi-card {
  position: relative;
  min-width: 0;
  min-height: 132px;
  padding: 15px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(30, 41, 59, .035);
}

.reporting-kpi-card::before {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 4px;
  background: var(--report-primary);
  content: '';
}

.reporting-kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.reporting-kpi-head > span {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #cbd5e1;
}

.reporting-kpi-head small {
  color: var(--report-subtle);
  font-size: 9px;
}

.reporting-kpi-card > strong {
  display: block;
  margin-top: 17px;
  color: #475569;
  font-size: 24px;
  font-weight: 850;
  line-height: 1;
  overflow-wrap: anywhere;
}

.reporting-kpi-card > h4 {
  margin: 10px 0 0;
  color: var(--report-text);
  font-size: 12px;
  line-height: 1.7;
}

.reporting-kpi-card.is-loading .reporting-kpi-head > span {
  background: #a5b4fc;
  animation: reportPulse 1.4s ease-in-out infinite;
}

.reporting-kpi-card.is-error::before,
.reporting-kpi-card.is-permission-denied::before {
  background: #ef4444;
}

.reporting-kpi-card.is-ready .reporting-kpi-head > span {
  background: #22c55e;
}

.reporting-visual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.reporting-panel {
  min-width: 0;
  padding: 16px;
  box-shadow: none;
}

.reporting-chart-shell {
  position: relative;
  display: grid;
  min-height: 270px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid #edf0f5;
  border-radius: 12px;
  background: linear-gradient(180deg, #fdfdff, #fafaff);
}

.reporting-chart-grid {
  position: absolute;
  inset: 18px;
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  pointer-events: none;
}

.reporting-chart-grid span {
  border-bottom: 1px dashed #e5e7eb;
}

.reporting-data-state {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: min(100%, 540px);
  margin: auto;
  padding: 24px 20px;
  color: var(--report-muted);
  text-align: right;
}

.reporting-data-state p {
  margin: 6px 0 0;
  line-height: 1.7;
  font-size: 12px;
}

.reporting-data-state.is-empty,
.reporting-data-state.is-unavailable {
  background: #fafbff;
  border-radius: 12px;
}

.reporting-state-icon,
.reporting-spinner {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  background: #eef2ff;
  color: var(--report-primary);
  font-family: system-ui, sans-serif;
  font-size: 22px;
  font-weight: 700;
}

.reporting-data-state strong {
  display: block;
  color: #334155;
  font-size: 13px;
}

.reporting-data-state p {
  margin: 5px 0 0;
  color: var(--report-muted);
  font-size: 11px;
  line-height: 1.8;
}

.reporting-data-state small {
  display: inline-block;
  margin-top: 7px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f0fdf4;
  color: #166534;
  font-size: 9px;
  font-weight: 700;
}

.reporting-spinner {
  border: 3px solid #ddd6fe;
  border-top-color: var(--report-purple);
  border-radius: 50%;
  background: transparent;
  animation: reportSpin .8s linear infinite;
}

.reporting-data-state.is-error .reporting-state-icon,
.reporting-data-state.is-permission-denied .reporting-state-icon {
  border-color: #fecaca;
  background: #fef2f2;
  color: #dc2626;
}

.reporting-retry-button {
  min-height: 36px;
  margin-top: 10px;
  padding: 7px 12px;
  background: #ede9fe;
  color: #6d28d9;
}

.reporting-table-panel {
  margin-top: 0;
}

.reporting-table-scroll {
  margin-top: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border: 1px solid #edf0f5;
  border-radius: 11px;
}

/* Hidden on desktop/tablet grid; shown as chip row on small screens (UI-001) */
.reporting-mobile-sort-bar {
  display: none;
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #edf0f5;
  border-radius: 11px;
  background: #f8fafc;
}

.reporting-mobile-sort-label {
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}

.reporting-mobile-sort-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.reporting-mobile-sort-actions .reporting-sort-button {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 11px;
}

.reporting-metric-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.reporting-metric-table th,
.reporting-metric-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #edf0f5;
  color: #475569;
  font-size: 11px;
  text-align: right;
}

.reporting-metric-table th {
  background: #f8fafc;
  color: #334155;
  font-weight: 800;
}

.reporting-table-state {
  display: grid;
  min-height: 150px;
  margin-top: -1px;
  border: 1px solid #edf0f5;
  border-radius: 0 0 11px 11px;
  background: #fff;
}

.reporting-data-slot {
  min-height: 100%;
}

@keyframes reportSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes reportPulse {
  50% {
    opacity: .4;
  }
}

@media (max-width: 1180px) {
  .reporting-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .reporting-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reporting-security-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .reporting-access-list {
    justify-content: flex-start;
  }
}

@media (max-width: 820px) {
  .reporting-page-header,
  .reporting-pack-heading {
    flex-direction: column;
  }

  .reporting-header-actions {
    width: 100%;
    justify-items: stretch;
  }

  .reporting-header-actions small {
    max-width: none;
    text-align: right;
  }

  .reporting-pack-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reporting-pack-access {
    justify-content: flex-start;
  }
}

/* UI-001: stacked data-list cards + mobile sort (phones / small tablets) */
@media (max-width: 768px) {
  .reporting-mobile-sort-bar {
    display: flex;
  }

  .reporting-table-scroll {
    overflow: visible;
    border: 0;
    margin-top: 10px;
  }

  .reporting-metric-table {
    min-width: 0;
  }

  .reporting-metric-table thead {
    display: none;
  }

  .reporting-metric-table tbody,
  .reporting-metric-table tr,
  .reporting-metric-table td {
    display: block;
    width: 100%;
  }

  .reporting-metric-table tr {
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid var(--report-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(30, 41, 59, .04);
  }

  .reporting-metric-table tr:last-child {
    margin-bottom: 0;
  }

  .reporting-metric-table td {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    border-bottom: 1px solid #f1f5f9;
    text-align: start;
    overflow-wrap: anywhere;
  }

  .reporting-metric-table td:last-child {
    border-bottom: 0;
  }

  .reporting-metric-table td::before {
    flex: 0 1 42%;
    max-width: 46%;
    color: #334155;
    content: attr(data-label);
    font-weight: 800;
    text-align: start;
  }

  .reporting-metric-table td:not([data-label])::before,
  .reporting-metric-table td[data-label='']::before {
    content: none;
  }

  .reporting-table-state {
    border-radius: 11px;
  }

  .reporting-pagination {
    margin-top: 12px;
  }
}

@media (max-width: 560px) {
  .reporting-page-header,
  .reporting-filter-shell,
  .reporting-pack-panel,
  .reporting-panel {
    padding: 14px;
    border-radius: 12px;
  }

  .reporting-pack-tabs,
  .reporting-filter-grid,
  .reporting-kpi-grid {
    grid-template-columns: 1fr;
  }

  .reporting-pack-tab {
    min-height: 52px;
  }

  .reporting-security-copy {
    min-width: 0;
    align-items: flex-start;
  }

  .reporting-filter-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .reporting-apply-button,
  .reporting-export-button {
    width: 100%;
  }

  .reporting-chart-shell {
    min-height: 230px;
  }

  .reporting-data-state {
    align-items: center;
    flex-direction: column;
    padding: 18px 12px;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reporting-workspace *,
  .reporting-workspace *::before,
  .reporting-workspace *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Reporting workspace Phase 2 */
.command-center-nav .reporting-foundation-link {
  opacity: 1;
}

#nav-report-center > svg {
  width: 15px;
  height: 15px;
}

.reporting-workspace {
  width: 100%;
  max-width: 1680px;
  margin-inline: auto;
  overflow: clip;
}

.reporting-page-header {
  align-items: center;
  padding: 26px 28px;
}

.reporting-page-heading {
  max-width: 780px;
}

.reporting-page-heading p {
  max-width: 720px;
}

.reporting-header-statuses {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.reporting-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #d8dee9;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 10px;
  font-weight: 750;
}

.reporting-status-chip > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
}

.reporting-status-chip.is-ready {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.reporting-status-chip.is-ready > span {
  background: #22c55e;
}

.reporting-status-chip.is-unavailable {
  border-color: #ddd6fe;
  background: #f5f3ff;
  color: #6d28d9;
}

.reporting-status-chip.is-unavailable > span {
  background: #8b5cf6;
}

.reporting-header-actions {
  width: min(260px, 100%);
}

.reporting-header-actions small {
  max-width: none;
  text-align: right;
}

.reporting-export-format-hint {
  color: #64748b !important;
}

.reporting-export-button.is-denied:disabled {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b91c1c;
}

.reporting-foundation-notice {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
  padding: 13px 16px;
}

.reporting-foundation-notice p {
  margin: 2px 0 0;
  color: #4f46e5;
  font-size: 11px;
  line-height: 1.8;
}

.reporting-notice-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: rgba(99, 102, 241, .1);
  color: #4f46e5;
}

.reporting-notice-icon svg {
  width: 19px;
  height: 19px;
}

.reporting-pack-tabs {
  position: sticky;
  top: 68px;
  z-index: 20;
  box-shadow: 0 6px 18px rgba(30, 41, 59, .055);
}

.reporting-pack-tab {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
}

.reporting-pack-tab small {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #64748b;
  font-family: var(--pe-font-ui), sans-serif;
  direction: rtl;
}

.reporting-pack-tab small i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
}

.reporting-pack-tab.is-ready small i {
  background: #22c55e;
}

.reporting-pack-tab.is-loading small i {
  background: #6366f1;
  animation: reportPulse 1.4s ease-in-out infinite;
}

.reporting-pack-tab.is-error small i,
.reporting-pack-tab.is-permission-denied small i {
  background: #ef4444;
}

.reporting-pack-panel {
  padding: 22px;
}

.reporting-pack-heading {
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid #edf0f5;
}

.reporting-pack-title > span {
  display: block;
  margin-bottom: 6px;
  color: #7c3aed;
  font-size: 10px;
  font-weight: 800;
}

.reporting-pack-access {
  display: grid;
  justify-items: end;
  gap: 9px;
  min-width: min(360px, 100%);
}

.reporting-pack-access-copy {
  display: flex;
  align-items: center;
  gap: 9px;
}

.reporting-pack-access-copy > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: #ede9fe;
  color: #7c3aed;
}

.reporting-pack-access-copy svg,
.reporting-restriction-notice svg {
  width: 17px;
  height: 17px;
}

.reporting-pack-access-copy strong,
.reporting-pack-access-copy small {
  display: block;
  text-align: left;
}

.reporting-pack-access-copy strong {
  color: #334155;
  font-size: 11px;
}

.reporting-pack-access-copy small {
  margin-top: 2px;
  color: #94a3b8;
  font-size: 9px;
  line-height: 1.6;
}

.reporting-pack-access-chips {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.reporting-access-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 29px;
  padding: 4px 8px;
  border: 1px solid #d8dee9;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 9px;
}

.reporting-access-chip small {
  padding: 2px 6px;
  border-radius: 999px;
  background: #ede9fe;
  color: #6d28d9;
  font-size: 8px;
}

.reporting-access-chip.is-allowed {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.reporting-access-chip.is-allowed small {
  background: #dcfce7;
  color: #166534;
}

.reporting-access-chip.is-restricted {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.reporting-access-chip.is-restricted small {
  background: #fef3c7;
  color: #92400e;
}

.reporting-access-chip.is-denied {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b91c1c;
}

.reporting-access-chip.is-denied small {
  background: #fee2e2;
  color: #b91c1c;
}

.reporting-restriction-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 11px 13px;
  border: 1px solid #fde68a;
  border-radius: 10px;
  background: #fffbeb;
  color: #92400e;
}

.reporting-restriction-notice > span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.reporting-restriction-notice p {
  margin: 0;
  font-size: 10px;
  line-height: 1.8;
}

.reporting-filter-shell {
  margin-bottom: 18px;
  background: linear-gradient(180deg, #fff, #fdfdff);
}

.reporting-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.reporting-filter-scope-note {
  max-width: 420px;
  color: #64748b;
  font-size: 9px;
  line-height: 1.8;
  text-align: left;
}

.reporting-filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.reporting-filter-field input,
.reporting-filter-field select {
  min-height: 44px;
  transition:
    border-color .15s ease,
    box-shadow .15s ease,
    background .15s ease;
}

.reporting-filter-field input:not(:disabled):hover,
.reporting-filter-field select:not(:disabled):hover {
  border-color: #c4b5fd;
}

.reporting-input-with-icon {
  position: relative;
}

.reporting-input-with-icon svg {
  position: absolute;
  top: 50%;
  inset-inline-start: 10px;
  width: 16px;
  height: 16px;
  color: #94a3b8;
  pointer-events: none;
  transform: translateY(-50%);
}

.reporting-input-with-icon input {
  padding-inline-start: 34px;
}

.reporting-filter-footer {
  align-items: flex-end;
}

.reporting-filter-footer > small {
  color: #94a3b8;
  font-size: 9px;
  line-height: 1.7;
  text-align: left;
}

.reporting-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reporting-reset-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid #d8dee9;
  border-radius: 10px;
  background: #fff;
  color: #475569;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.reporting-reset-button svg {
  width: 16px;
  height: 16px;
}

.reporting-reset-button:not(:disabled):hover {
  border-color: #c4b5fd;
  background: #faf9ff;
  color: #6d28d9;
}

.reporting-reset-button:disabled {
  background: #f8fafc;
  color: #9aa3b2;
  cursor: not-allowed;
}

.reporting-content-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 11px;
}

.reporting-content-heading h3 {
  margin: 0;
  color: #1e293b;
  font-size: 14px;
}

.reporting-content-heading p {
  margin: 3px 0 0;
  color: #64748b;
  font-size: 10px;
}

.reporting-kpi-section {
  margin-bottom: 14px;
}

.reporting-kpi-card {
  min-height: 148px;
  transition:
    border-color .15s ease,
    box-shadow .15s ease,
    transform .15s ease;
}

.reporting-kpi-card:hover {
  border-color: #ddd6fe;
  box-shadow: 0 8px 20px rgba(79, 70, 229, .07);
  transform: translateY(-1px);
}

.reporting-kpi-head {
  min-height: 24px;
}

.reporting-kpi-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 9px;
  font-weight: 700;
}

.reporting-kpi-state i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #cbd5e1;
}

.reporting-kpi-card.is-value .reporting-kpi-state i {
  background: #22c55e;
}

.reporting-kpi-card.is-loading .reporting-kpi-state i {
  background: #6366f1;
  animation: reportPulse 1.4s ease-in-out infinite;
}

.reporting-kpi-card.is-error .reporting-kpi-state i,
.reporting-kpi-card.is-permission-denied .reporting-kpi-state i {
  background: #ef4444;
}

.reporting-kpi-card.is-value::before {
  background: #22c55e;
}

.reporting-kpi-card.is-permission-denied::before {
  background: #ef4444;
}

.reporting-kpi-card > p {
  margin: 6px 0 0;
  color: #94a3b8;
  font-size: 9px;
  line-height: 1.7;
}

.reporting-kpi-trend {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 9px;
  font-weight: 700;
}

.reporting-kpi-trend.is-up {
  background: #dcfce7;
  color: #166534;
}

.reporting-kpi-trend.is-down {
  background: #fee2e2;
  color: #b91c1c;
}

.reporting-chart-shell,
.reporting-chart-mount {
  position: relative;
  min-height: 300px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid #edf0f5;
  border-radius: 12px;
  background: linear-gradient(180deg, #fdfdff, #fafaff);
}

.reporting-chart-mount {
  display: block;
}

.reporting-chart-skeleton {
  position: absolute;
  inset: 30px 34px 28px;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 8%;
  opacity: .5;
}

.reporting-chart-skeleton i {
  width: 9%;
  min-width: 22px;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(180deg, #c7d2fe, #ede9fe);
  animation: reportPulse 1.5s ease-in-out infinite;
}

.reporting-chart-skeleton i:nth-child(1) {
  height: 36%;
}

.reporting-chart-skeleton i:nth-child(2) {
  height: 58%;
}

.reporting-chart-skeleton i:nth-child(3) {
  height: 44%;
}

.reporting-chart-skeleton i:nth-child(4) {
  height: 70%;
}

.reporting-chart-skeleton i:nth-child(5) {
  height: 52%;
}

.reporting-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.reporting-table-heading {
  justify-content: flex-start;
}

.reporting-sort-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  cursor: pointer;
}

.reporting-sort-button svg {
  width: 14px;
  height: 14px;
  color: #94a3b8;
}

.reporting-sort-button:not(:disabled):hover,
.reporting-sort-button.active {
  color: #4f46e5;
}

.reporting-sort-button:disabled {
  cursor: not-allowed;
  opacity: .72;
}

.reporting-loading-row td {
  height: 48px;
}

.reporting-cell-skeleton {
  display: block;
  width: min(100%, 120px);
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #eef2f7, #e0e7ff, #eef2f7);
  background-size: 200% 100%;
  animation: reportShimmer 1.35s linear infinite;
}

.reporting-table-state {
  min-height: 140px;
  margin-top: 0;
  border-top: 0;
}

.reporting-data-state.is-compact {
  padding-block: 18px;
}

.reporting-data-state.is-compact .reporting-state-icon,
.reporting-data-state.is-compact .reporting-spinner {
  width: 36px;
  height: 36px;
  font-size: 18px;
}

.reporting-pagination {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.reporting-pagination button {
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid #d8dee9;
  border-radius: 9px;
  background: #fff;
  color: #475569;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.reporting-pagination button:not(:disabled):hover {
  border-color: #c4b5fd;
  background: #faf9ff;
  color: #6d28d9;
}

.reporting-pagination button:disabled {
  background: #f8fafc;
  color: #a1a9b6;
  cursor: not-allowed;
}

.reporting-pagination > span {
  color: #64748b;
  font-size: 10px;
  text-align: center;
}

@keyframes reportShimmer {
  to {
    background-position: -200% 0;
  }
}

@media (max-width: 1100px) {
  .reporting-pack-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    position: static;
  }

  .reporting-pack-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .reporting-pack-access {
    justify-items: start;
    width: 100%;
  }

  .reporting-pack-access-copy strong,
  .reporting-pack-access-copy small {
    text-align: right;
  }

  .reporting-pack-access-chips {
    justify-content: flex-start;
  }

  .reporting-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .reporting-page-header {
    align-items: stretch;
  }

  .reporting-header-actions {
    width: 100%;
  }

  .reporting-pack-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reporting-filter-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .reporting-filter-scope-note {
    max-width: none;
    text-align: right;
  }

  .reporting-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reporting-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .reporting-workspace {
    overflow: visible;
  }

  .reporting-page-header {
    padding: 17px;
  }

  .reporting-foundation-notice {
    align-items: flex-start;
  }

  .reporting-pack-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reporting-pack-tab {
    min-height: 62px;
    padding: 8px 9px;
  }

  .reporting-pack-tab:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .reporting-pack-access-copy {
    align-items: flex-start;
  }

  .reporting-pack-access-chips {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .reporting-access-chip {
    justify-content: space-between;
    border-radius: 9px;
  }

  .reporting-filter-grid,
  .reporting-kpi-grid {
    grid-template-columns: 1fr;
  }

  .reporting-filter-footer {
    gap: 10px;
  }

  .reporting-filter-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .reporting-reset-button,
  .reporting-apply-button {
    width: 100%;
  }

  .reporting-chart-shell,
  .reporting-chart-mount {
    min-height: 250px;
  }

  .reporting-metric-table td {
    align-items: flex-start;
    overflow-wrap: anywhere;
  }

  .reporting-loading-row td::before {
    content: attr(data-label);
  }

  .reporting-pagination {
    grid-template-columns: 1fr 1fr;
  }

  .reporting-pagination > span {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .reporting-mobile-sort-actions .reporting-sort-button {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 44px;
  }
}

/* Tablet: keep table grid with softer min-width + touch scroll (UI-001) */
@media (min-width: 769px) and (max-width: 1100px) {
  .reporting-metric-table {
    min-width: 540px;
  }

  .reporting-table-scroll {
    scrollbar-gutter: stable;
  }
}

.reporting-status-chip.is-loading{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe}
.reporting-status-chip.is-error{background:#fef2f2;color:#b91c1c;border-color:#fecaca}
.reporting-status-chip.is-permission-denied{background:#fff7ed;color:#c2410c;border-color:#fed7aa}
.reporting-kpi-card.is-value .reporting-kpi-state{color:#047857}
