/* Section/card wrappers and list-page layout blocks */
.section-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.section-card:has(.filter-panel) {
  overflow: visible;
}

/* Section card với filter - tối ưu không gian */
.section-card:has(.filter-panel) .section-card-header {
  padding: 10px 16px;
}

.section-card:has(.filter-panel) .section-card-body {
  gap: 8px;
  padding: 0 16px 12px;
}

.section-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid #edf2f7;
}

.section-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: #111827;
  letter-spacing: -0.3px;
  font-family: var(--app-font, 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans');
  padding-left: 12px;
  border-left: 3px solid var(--primary-500);
}

.section-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-card-actions-full {
  width: 100%;
  margin-left: 0;
}

.section-card-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.list-page-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.list-page-stats-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 16px;
}

.list-page-table-card {
  padding: 0 !important;
}

.list-page-table-card .section-card-header {
  padding: 10px 20px;
  border-bottom: 1px solid #edf2f7;
}

.list-page-table-card .section-card-body {
  padding: 0;
}

/* Bulk actions inline - hiển thị cùng hàng với title trong header, đẩy sang phải */
.list-page-table-card .section-card-actions-full {
  width: auto;
  margin-left: auto;
}

.bulk-actions-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
}

.bulk-actions-inline .bulk-selection-label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
}

.bulk-actions-inline .bulk-selection-count {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-600);
}

.bulk-actions-inline .bulk-action-btn {
  height: 34px;
  padding: 7px 12px;
  font-size: 12px;
}

.list-page-card {
  padding: 0;
}

/* List page card có filter - giảm padding */
.list-page-card:has(.filter-panel) {
  padding: 0;
}

.list-page-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 20px;
}

.list-page-inline-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.list-page-table-actions {
  margin-left: auto;
  row-gap: 10px;
}

.list-page-pagination {
  margin-top: 0;
}

@media (min-width: 768px) {
  .list-page-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .list-page-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Section summary - dùng cho header thông tin tổng quan của trang/section */
.section-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
}

.section-summary-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.section-title-lg {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.4px;
  font-family: var(--app-font, 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans');
}

.section-subtitle {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
}

/* Section metrics - wrapper cho các khối thống kê */
.section-metrics {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (max-width: 767px) {
  .section-card-header {
    padding: 14px 16px;
  }

  .list-page-table-card .section-card-header {
    padding: 10px 16px;
  }

  .list-page-card {
    padding: 16px;
  }

  .list-page-toolbar .btn {
    flex: 1 1 100%;
  }

  .list-page-table-actions {
    margin-left: 0;
    width: 100%;
  }

  .list-page-table-actions .search-input {
    width: 100%;
  }
}