.report-ops-page,
.report-movement-page,
.report-ops-page *,
.report-movement-page * {
  box-sizing: border-box;
}

.report-ops-page,
.report-movement-page {
  width: auto !important;
  max-width: min(100%, calc(100vw - 24px)) !important;
  margin-inline: 0 !important;
  overflow-x: clip;
}

.report-ops-page :where(
  .page-header,
  .page-header__left,
  .page-header__actions,
  .report-filter-card,
  .report-filter-toolbar,
  .report-table-help,
  .report-filter-grid,
  .report-filter-grid .field,
  .report-range-buttons,
  .report-kpi-grid,
  .report-kpi-card,
  .report-split-grid,
  .report-table-card,
  .report-inline-metric,
  .table-wrapper,
  .report-grid-body,
  .report-list-state,
  .report-list-state__metrics,
  .report-grid-host
),
.report-movement-page :where(
  .page-header,
  .page-header__left,
  .page-header__actions,
  .report-filter-card,
  .report-filter-toolbar,
  .mov-filter,
  .mov-filter .field,
  .mov-actions,
  .mov-grid-host,
  .mov-summary,
  .mov-plan-card,
  .mov-check,
  .mov-check__text
) {
  min-width: 0;
  max-width: 100%;
}

.report-ops-page :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea, .input, .btn),
.report-movement-page :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea, .input, .btn) {
  max-width: 100%;
}

.report-ops-page :where(.page-header__title, .subtle, .card__title, .report-list-state, .tabulator-cell),
.report-movement-page :where(.page-header__title, .subtle, .card__title, .mov-check, .mov-summary__metric, .tabulator-cell) {
  overflow-wrap: anywhere;
}

.report-grid-body {
  padding: 0 !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.report-list-state {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 14px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--ops-border, var(--border));
  background: rgba(2, 6, 23, 0.20);
  color: var(--ops-muted-2, var(--muted));
  font-size: 12px;
}

.report-list-state strong {
  color: var(--ops-text, var(--text));
  font-variant-numeric: tabular-nums;
}

.report-list-state__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-list-state__metrics span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.10);
  white-space: nowrap;
}

.report-ops-page .report-grid-host {
  overflow: visible;
}

.report-ops-page .card > .card__body {
  min-width: 0;
}

.report-kpi-page .report-filter-card > .card__body {
  display: grid;
  gap: 12px;
}

.report-filter-card,
.report-grid-card,
.report-table-card,
.report-movement-page .mov-plan-card {
  overflow: hidden;
}

.report-kpi-page .report-filter-toolbar {
  align-items: end;
}

.report-filter-toolbar,
.report-link-actions,
.report-range-buttons {
  flex-wrap: wrap;
  min-width: 0;
}

.report-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  align-items: end;
  width: 100%;
  min-width: 0;
}

.report-filter-grid .field,
.report-filter-grid .btn {
  min-width: 0;
}

.report-filter-grid .input,
.report-filter-grid .btn {
  width: 100%;
}

.report-filter-grid__wide {
  min-width: 0;
}

.report-kpi-page .report-kpi-grid {
  margin: 0;
}

.report-kpi-page .report-kpi-card {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 92px;
}

.report-kpi-page .report-kpi-card .h2 {
  font-size: clamp(21px, 2.4vw, 28px);
  overflow-wrap: anywhere;
}

.report-kpi-page .report-table-card {
  display: grid;
  gap: 8px;
}

.report-kpi-page .table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
}

.report-kpi-page .report-table-card table {
  min-width: 420px;
}

.report-kpi-page .report-table-card table th,
.report-kpi-page .report-table-card table td {
  vertical-align: top;
}

.report-ops-page .report-grid-host.tabulator,
.report-movement-page .mov-grid-host.tabulator {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.report-ops-page .report-grid-host .tabulator-tableholder,
.report-movement-page .mov-grid-host .tabulator-tableholder {
  overflow-x: auto !important;
}

.report-movement-page .report-filter-card > .card__body {
  min-width: 0;
}

.report-movement-page .mov-grid-host {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.report-movement-page .mov-plan-card .card__body {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.report-movement-page .mov-plan-card .wms-table-shell,
.report-ops-page .report-grid-card .wms-table-shell {
  max-width: 100%;
}

.report-movement-page .mov-summary {
  max-width: 100%;
}

.report-movement-page .mov-summary__metric {
  min-width: 0;
}

html[data-theme="light"] .report-list-state {
  background: #f8fafc;
}

html[data-theme="light"] .report-list-state__metrics span {
  background: #eef4ff;
  border-color: #d6deea;
}

@media (max-width: 980px) {
  .report-ops-page .page-header,
  .report-movement-page .page-header {
    display: grid;
    align-items: stretch;
  }

  .report-ops-page .page-header__actions,
  .report-movement-page .page-header__actions {
    justify-content: stretch;
  }

  .report-ops-page .page-header__actions .btn,
  .report-movement-page .page-header__actions .btn {
    flex: 1 1 160px;
    justify-content: center;
  }

  .report-ops-page .report-filter-toolbar,
  .report-movement-page .report-filter-toolbar {
    align-items: stretch;
  }

  .report-kpi-page .report-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-kpi-page .report-filter-grid__wide {
    grid-column: 1 / -1;
  }

  .report-kpi-page .report-filter-grid .btn-primary {
    width: 100%;
  }

  .report-kpi-page .report-range-buttons {
    justify-content: flex-start;
  }

  .report-kpi-page .report-split-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .report-ops-page,
  .report-movement-page {
    max-width: calc(100vw - 20px) !important;
  }

  .report-list-state,
  .report-list-state__metrics {
    display: grid;
  }

  .report-list-state__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-list-state__metrics span {
    justify-content: center;
  }

  .report-kpi-page .report-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .report-ops-page .page-header__actions,
  .report-movement-page .page-header__actions,
  .report-movement-page .mov-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .report-ops-page .page-header__actions .btn,
  .report-movement-page .page-header__actions .btn,
  .report-movement-page .mov-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .report-list-state__metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .report-kpi-page .report-filter-grid,
  .report-kpi-page .report-kpi-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .report-kpi-page .report-range-buttons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .report-kpi-page .report-range-buttons .btn {
    width: 100%;
    justify-content: center;
    padding-inline: 8px;
  }
}
