.reports-module {
  --reports-panel-padding: clamp(18px, 2vw, 24px);
}

.reports-module .reports-module-shell {
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.reports-module .module-header {
  margin-bottom: 16px;
  padding: 0;
  border: 0;
}

.reports-module .report-navigation {
  width: 100%;
  margin-bottom: 16px;
  padding: 5px;
  border: 1px solid var(--core-border);
  border-radius: var(--core-radius-md);
  background: var(--core-surface);
  box-shadow: var(--core-shadow-sm);
}

.reports-module .report-navigation .subtab-button {
  flex: 0 0 auto;
  min-height: 42px;
  padding-inline: 18px;
  font-size: 0.76rem;
}

.reports-module .report-view {
  min-width: 0;
  padding: var(--reports-panel-padding);
  border: 1px solid var(--core-border);
  border-radius: var(--core-radius-md);
  background: var(--core-surface);
  box-shadow: var(--core-shadow-sm);
}

.reports-module .report-filter-panel {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--core-border);
  border-radius: var(--core-radius-sm);
  background: var(--core-surface-subtle);
}

.reports-module .filters-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.reports-module .filters-grid label,
.reports-module .comp-filters label {
  gap: 6px;
  color: var(--core-text-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.reports-module .filters-grid input,
.reports-module .filters-grid select,
.reports-module .comp-filters input,
.reports-module .comp-filters select,
.reports-module .scope-state-button {
  min-height: 40px;
  border-color: var(--core-border);
  border-radius: var(--core-radius-sm);
  background: var(--core-surface);
  font-size: 0.84rem;
}

.reports-module .scope-control {
  align-self: end;
}

.reports-module .scope-control .scope-state-button {
  width: 100%;
}

.reports-module .filter-actions {
  gap: 8px;
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid var(--core-border);
}

.reports-module .filter-actions button,
.reports-module .comp-actions button {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 0.78rem;
}

.reports-module .report-summary-bar {
  min-height: 48px;
  margin: 14px 0;
  padding: 10px 12px;
  border: 1px solid var(--core-border);
  border-radius: var(--core-radius-sm);
  background: var(--core-surface-subtle);
}

.reports-module .report-summary-bar strong {
  color: var(--core-text);
  font-size: 0.84rem;
}

.reports-module .report-summary-bar span {
  color: var(--core-text-muted);
  font-size: 0.76rem;
}

.reports-module .empty-state {
  margin: 0;
  padding: 22px 16px;
  border-color: var(--core-border);
  border-style: dashed;
  border-radius: var(--core-radius-sm);
  background: var(--core-surface-subtle);
  color: var(--core-text-muted);
}

.reports-module .table-wrapper {
  overflow: auto;
  border: 1px solid var(--core-border);
  border-radius: var(--core-radius-sm);
  background: var(--core-surface);
}

.reports-module .table-wrapper:has(.data-table.hidden) {
  display: none;
}

.reports-module .data-table {
  width: 100%;
  margin: 0;
  border: 0;
}

.reports-module .comp-table {
  min-width: 960px;
  table-layout: fixed;
}

.reports-module .data-table th {
  padding: 11px 12px;
  background: var(--core-surface-subtle);
  color: var(--core-text-muted);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.reports-module .data-table td {
  padding: 12px;
  vertical-align: middle;
}

.reports-module .data-table tbody tr:last-child td {
  border-bottom: 0;
}

.reports-module .pagination-bar {
  margin-top: 14px;
}

.reports-module .comp-filters {
  grid-template-columns:
    minmax(145px, 170px) minmax(145px, 170px) minmax(210px, 1fr)
    minmax(210px, 1fr);
  gap: 12px;
  align-items: end;
}

.reports-module .comp-groupby-wrap {
  grid-column: 1 / span 2;
  gap: 7px;
}

.reports-module .comp-groupby-label {
  color: var(--core-text-muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.reports-module .comp-groupby-wrap .subtabs {
  width: fit-content;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--core-border);
  border-radius: var(--core-radius-sm);
  background: var(--core-surface);
}

.reports-module .comp-groupby-wrap .subtab-button {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 0.76rem;
}

.reports-module .comp-actions {
  grid-column: 3 / -1;
  justify-content: flex-end;
  margin: 0;
}

.reports-module .comp-kpi-grid {
  gap: 12px;
  margin: 14px 0;
}

.reports-module .comp-kpi-card {
  padding: 15px 16px;
  border: 1px solid var(--core-border);
  border-radius: var(--core-radius-sm);
  background: var(--core-surface-subtle);
  box-shadow: none;
}

.reports-module .comp-kpi-card.accent {
  border-color: #b8d8cf;
  background: var(--core-surface-selected);
}

.reports-module .comp-kpi-label {
  color: var(--core-text-muted);
  font-size: 0.68rem;
}

.reports-module .comp-kpi-card strong {
  color: var(--core-text);
  font-size: 1.5rem;
}

.reports-module .comp-kpi-card.accent strong {
  color: var(--core-brand-strong);
}

.reports-module .comp-shift-badge {
  background: var(--core-brand-soft);
  color: var(--core-brand-strong);
}

.reports-module .comp-shift-badge.absent {
  background: var(--core-surface-subtle);
  color: var(--core-text-muted);
}

.reports-module tr.comp-date-row td {
  border-color: #b8d8cf;
  background: var(--core-surface-selected);
}

.reports-module tr.comp-total-row td {
  border-color: var(--core-border-strong);
  background: var(--core-surface-subtle);
}

@media print {
  .reports-module .comp-table {
    min-width: 0;
    table-layout: auto;
  }
}

@media (max-width: 1050px) {
  .reports-module .filters-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .reports-module .comp-filters {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .reports-module .comp-groupby-wrap,
  .reports-module .comp-actions {
    grid-column: 1 / -1;
  }

  .reports-module .comp-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .reports-module .report-navigation {
    padding: 4px;
  }

  .reports-module .report-navigation .subtab-button {
    flex: 1 1 calc(33.333% - 4px);
    min-width: 0;
    padding-inline: 10px;
  }

  .reports-module .filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reports-module .filter-actions {
    grid-column: 1 / -1;
  }

  .reports-module .report-summary-bar {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .reports-module {
    --reports-panel-padding: 15px;
  }

  .reports-module .filters-grid,
  .reports-module .comp-filters {
    grid-template-columns: 1fr;
  }

  .reports-module .comp-groupby-wrap,
  .reports-module .comp-actions {
    grid-column: 1;
  }

  .reports-module .filter-actions button,
  .reports-module .comp-actions button {
    flex: 1 1 100%;
    width: 100%;
  }
}
