/* ============================================================================
   IESMAC ERP — Material skin over Phoenix Bootstrap 5.3
   SPRINT 4 · Tables, List-groups, Pagination, Empty states, Skeletons
   ----------------------------------------------------------------------------
   Depends on: material-skin.css (Sprint 1)
   Load order:
     1. theme.min.css        (Phoenix core)
     2. user.min.css         (empty Phoenix slot)
     3. style.css            (existing tweaks)
     4. material-skin.css           (Sprint 1)
     5. material-skin-surfaces.css  (Sprint 3)
     6. material-skin-data.css      ← THIS FILE

   Tenant theming: All brand color references use --md-* variables only.
   Override --md-primary-40 + tonal stops in a tenant <style> block.
   ============================================================================ */


/* ============================================================================
   1. TABLE BASE — compact density, MUI data table look
   ============================================================================ */

html body .table {
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  color: var(--md-neutral-10);
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  margin-bottom: 0;
  --bs-table-bg: transparent;
  --bs-table-color: var(--md-neutral-10);
  --bs-table-border-color: var(--md-surface-divider);
}

/* Wrap table inside a card automatically inherits card radius */
html body .card > .table-responsive,
html body .card > .table {
  margin-bottom: 0;
}

/* Header */
html body .table > thead {
  background-color: var(--md-surface-card-soft);
}

html body .table > thead > tr > th {
  font-size: 11px;
  font-weight: 500;
  color: var(--md-neutral-40);
  letter-spacing: 0.02em;
  text-transform: none;
  padding: 8px 8px;
  border-bottom: 1px solid var(--md-surface-divider);
  border-top: 0;
  vertical-align: middle;
  background-color: var(--md-surface-card-soft);
  white-space: nowrap;
}

html body .table > thead > tr > th:first-child {
  padding-left: 14px;
}

html body .table > thead > tr > th:last-child {
  padding-right: 14px;
}

/* Sortable header — button inside th */
html body .table > thead th .sort-btn,
html body .table > thead th button.sortable,
html body .table > thead th[data-sort] {
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}

html body .table > thead th[data-sort]:hover,
html body .table > thead th .sort-btn:hover {
  color: var(--md-neutral-10);
}

html body .table > thead th[data-sort].asc,
html body .table > thead th[data-sort].desc {
  color: var(--md-neutral-10);
}

html body .table > thead th[data-sort].asc::after {
  content: '';
  display: inline-block;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 5px solid var(--md-primary-40);
  margin-left: 4px;
}

html body .table > thead th[data-sort].desc::after {
  content: '';
  display: inline-block;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--md-primary-40);
  margin-left: 4px;
}

/* Body rows */
html body .table > tbody > tr > td {
  padding: 9px 8px;
  font-size: 12.5px;
  color: var(--md-neutral-30);
  border-top: 0;
  border-bottom: 1px solid var(--md-surface-divider);
  vertical-align: middle;
  background-color: transparent;
}

html body .table > tbody > tr > td:first-child {
  padding-left: 14px;
}

html body .table > tbody > tr > td:last-child {
  padding-right: 14px;
}

html body .table > tbody > tr:last-child > td {
  border-bottom: 0;
}

/* Primary cell content — names, etc */
html body .table > tbody > tr > td .cell-primary,
html body .table > tbody > tr > td strong,
html body .table > tbody > tr > td .fw-bold,
html body .table > tbody > tr > td .fw-500 {
  color: var(--md-neutral-10);
  font-weight: 500;
}

/* Tabular numbers for dates / amounts */
html body .table > tbody > tr > td.tabular,
html body .table .text-tabular,
html body .table td[data-type="date"],
html body .table td[data-type="number"],
html body .table td[data-type="currency"] {
  font-variant-numeric: tabular-nums;
}

/* Hover state */
html body .table.table-hover > tbody > tr:hover > td,
html body .table > tbody > tr:hover > td {
  background-color: var(--md-neutral-98);
}

/* Selected row state */
html body .table > tbody > tr.table-active,
html body .table > tbody > tr.selected,
html body .table > tbody > tr[aria-selected="true"] {
  background-color: var(--md-primary-95);
}

html body .table > tbody > tr.table-active > td,
html body .table > tbody > tr.selected > td {
  background-color: var(--md-primary-95);
  color: var(--md-neutral-10);
}

/* Hover over selected — slightly darker */
html body .table.table-hover > tbody > tr.table-active:hover > td,
html body .table.table-hover > tbody > tr.selected:hover > td {
  background-color: var(--md-primary-90);
}

/* Density modifiers */
html body .table.table-sm > tbody > tr > td,
html body .table.table-sm > thead > tr > th {
  padding: 6px 8px;
  font-size: 12px;
}

html body .table.table-lg > tbody > tr > td,
html body .table.table-lg > thead > tr > th {
  padding: 12px 10px;
  font-size: 13px;
}

/* Sticky header — opt-in via .table-sticky-header */
html body .table.table-sticky-header > thead > tr > th {
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: var(--md-surface-card-soft);
}

/* Borderless table variant */
html body .table.table-borderless > tbody > tr > td,
html body .table.table-borderless > thead > tr > th {
  border-bottom: 0;
}


/* ============================================================================
   2. TABLE CHECKBOXES — header indeterminate + row select
   ============================================================================ */

html body .table .form-check-input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  border: 1.5px solid var(--md-neutral-60);
  border-radius: 3px;
  cursor: pointer;
}

html body .table .form-check-input[type="checkbox"]:checked {
  background-color: var(--md-primary-40);
  border-color: var(--md-primary-40);
}

html body .table .form-check-input[type="checkbox"]:indeterminate {
  background-color: var(--md-primary-40);
  border-color: var(--md-primary-40);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e");
}

html body .table .form-check-input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--md-primary-40);
  outline-offset: 2px;
  box-shadow: none;
}


/* ============================================================================
   3. TABLE ACTION COLUMN — icon-only 3-dot menu
   ============================================================================ */

html body .table td .btn-action,
html body .table td .table-action,
html body .table td .btn-icon {
  width: 26px;
  height: 26px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  border-radius: var(--md-radius-md) !important;
  color: var(--md-neutral-30) !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: none !important;
}

html body .table td .btn-action:hover,
html body .table td .table-action:hover,
html body .table td .btn-icon:hover {
  background-color: var(--md-neutral-95) !important;
  color: var(--md-neutral-10) !important;
}

/* Row hover reveals action button when invisible by default */
html body .table.table-actions-reveal td .btn-action,
html body .table.table-actions-reveal td .table-action {
  opacity: 0;
  transition: opacity 120ms ease;
}

html body .table.table-actions-reveal tbody tr:hover td .btn-action,
html body .table.table-actions-reveal tbody tr:hover td .table-action {
  opacity: 1;
}


/* ============================================================================
   4. TABLE TOOLBAR — search, filters, export, primary CTA
   ============================================================================ */

html body .table-toolbar,
html body .card > .toolbar,
html body .card-header.toolbar {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--md-surface-divider);
  background-color: var(--md-surface-card);
  flex-wrap: wrap;
}

html body .table-toolbar .search-input,
html body .card > .toolbar .search-input {
  height: 30px;
  background-color: var(--md-neutral-98);
  border: 1px solid var(--md-surface-border);
  border-radius: var(--md-radius-md);
  padding: 0 10px 0 28px;
  font-size: 12px;
  color: var(--md-neutral-10);
  max-width: 280px;
  width: 100%;
}

html body .table-toolbar .search-input:focus,
html body .card > .toolbar .search-input:focus {
  background-color: var(--md-surface-card);
  border-color: var(--md-primary-40);
  outline: none;
  box-shadow: 0 0 0 3px rgba(22, 127, 146, 0.10);
}

html body .table-toolbar .btn,
html body .card > .toolbar .btn {
  height: 30px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
}

html body .table-toolbar .filter-count {
  background-color: var(--md-primary-90);
  color: var(--md-primary-10);
  padding: 1px 6px;
  border-radius: var(--md-radius-pill);
  font-size: 10px;
  font-weight: 600;
  margin-left: 4px;
}


/* ============================================================================
   5. BULK ACTION BAR — slides in when ≥1 row selected
   ============================================================================ */

html body .bulk-action-bar,
html body .table-bulk-bar {
  background-color: var(--md-primary-95);
  border-bottom: 1px solid var(--md-primary-90);
  padding: 7px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

html body .bulk-action-bar .bulk-count {
  color: var(--md-primary-10);
  font-weight: 500;
}

html body .bulk-action-bar .bulk-divider {
  height: 14px;
  width: 1px;
  background-color: var(--md-primary-80);
}

html body .bulk-action-bar .bulk-action-btn,
html body .bulk-action-bar .btn {
  background: transparent !important;
  border: 0 !important;
  color: var(--md-primary-40) !important;
  padding: 2px 8px !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  border-radius: var(--md-radius-md) !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: auto !important;
  box-shadow: none !important;
}

html body .bulk-action-bar .bulk-action-btn:hover,
html body .bulk-action-bar .btn:hover {
  background-color: rgba(22, 127, 146, 0.08) !important;
}

html body .bulk-action-bar .bulk-action-btn.danger,
html body .bulk-action-bar .btn-danger,
html body .bulk-action-bar .text-danger {
  color: var(--md-error-600) !important;
}

html body .bulk-action-bar .clear-selection {
  margin-left: auto;
  color: var(--md-neutral-30) !important;
}


/* ============================================================================
   6. LIST GROUP — MUI list with leading icon, text, trailing
   ============================================================================ */

html body .list-group {
  border-radius: var(--md-radius-xl);
  background-color: var(--md-surface-card);
  overflow: hidden;
  --bs-list-group-bg: var(--md-surface-card);
  --bs-list-group-border-color: var(--md-surface-divider);
  --bs-list-group-border-width: 1px;
  --bs-list-group-border-radius: var(--md-radius-xl);
  --bs-list-group-color: var(--md-neutral-10);
}

html body .list-group-item {
  background-color: var(--md-surface-card);
  border: 0;
  border-bottom: 1px solid var(--md-surface-divider);
  padding: 11px 13px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--md-neutral-10);
  transition: background-color 120ms ease;
}

html body .list-group-item:last-child {
  border-bottom: 0;
}

html body .list-group-item:first-child {
  border-radius: var(--md-radius-xl) var(--md-radius-xl) 0 0;
}

html body .list-group-item:last-child {
  border-radius: 0 0 var(--md-radius-xl) var(--md-radius-xl);
}

/* Hover state */
html body .list-group-item-action:hover,
html body .list-group-item.cursor-pointer:hover {
  background-color: var(--md-neutral-98);
  color: var(--md-neutral-10);
}

/* Active / selected */
html body .list-group-item.active,
html body .list-group-item[aria-selected="true"] {
  background-color: var(--md-primary-95);
  color: var(--md-primary-10);
  border-color: var(--md-surface-divider);
}

/* Disabled */
html body .list-group-item.disabled,
html body .list-group-item:disabled {
  background-color: var(--md-surface-card);
  color: var(--md-neutral-60);
  opacity: 0.6;
}

/* Flush variant — no outer border/radius */
html body .list-group.list-group-flush {
  border-radius: 0;
  background: transparent;
}

html body .list-group.list-group-flush .list-group-item {
  border-radius: 0;
}


/* List-group item internals — leading icon, two-line content, trailing meta */

html body .list-group-item .list-item-icon,
html body .list-group-item > .icon,
html body .list-group-item > .ti:first-child {
  width: 30px;
  height: 30px;
  border-radius: var(--md-radius-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

html body .list-group-item .list-item-icon.bg-primary-soft,
html body .list-group-item .list-item-icon.bg-soft-primary {
  background-color: var(--md-primary-90);
  color: var(--md-primary-10);
}

html body .list-group-item .list-item-icon.bg-success-soft,
html body .list-group-item .list-item-icon.bg-soft-success {
  background-color: var(--md-success-50);
  color: var(--md-success-800);
}

html body .list-group-item .list-item-icon.bg-warning-soft,
html body .list-group-item .list-item-icon.bg-soft-warning {
  background-color: var(--md-warning-50);
  color: var(--md-warning-800);
}

html body .list-group-item .list-item-icon.bg-danger-soft,
html body .list-group-item .list-item-icon.bg-soft-danger {
  background-color: var(--md-error-50);
  color: var(--md-error-800);
}

html body .list-group-item .list-item-icon.bg-neutral-soft,
html body .list-group-item .list-item-icon.bg-soft-secondary {
  background-color: var(--md-neutral-95);
  color: var(--md-neutral-30);
}

/* Two-line text inside list item */
html body .list-group-item .list-item-primary {
  font-size: 13px;
  font-weight: 500;
  color: var(--md-neutral-10);
  line-height: 1.4;
}

html body .list-group-item .list-item-supporting,
html body .list-group-item .list-item-supporting-text {
  font-size: 11px;
  color: var(--md-neutral-40);
  line-height: 1.4;
  margin-top: 1px;
}

/* Trailing status indicator pattern */
html body .list-group-item .list-item-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

html body .list-group-item .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

html body .list-group-item .status-dot.success { background-color: var(--md-success-400); }
html body .list-group-item .status-dot.warning { background-color: var(--md-warning-400); }
html body .list-group-item .status-dot.danger  { background-color: var(--md-error-400); }
html body .list-group-item .status-dot.info    { background-color: var(--md-info-400); }
html body .list-group-item .status-dot.pending { background-color: var(--md-neutral-80); }
html body .list-group-item .status-dot.primary { background-color: var(--md-primary-40); }


/* ============================================================================
   7. PAGINATION — MUI pill style
   ============================================================================ */

html body .pagination {
  --bs-pagination-bg: transparent;
  --bs-pagination-border-color: transparent;
  --bs-pagination-color: var(--md-neutral-30);
  --bs-pagination-hover-color: var(--md-primary-10);
  --bs-pagination-hover-bg: var(--md-primary-95);
  --bs-pagination-hover-border-color: transparent;
  --bs-pagination-active-color: #FFFFFF;
  --bs-pagination-active-bg: var(--md-primary-40);
  --bs-pagination-active-border-color: var(--md-primary-40);
  --bs-pagination-disabled-color: var(--md-neutral-70);
  --bs-pagination-disabled-bg: transparent;
  gap: 2px;
  margin-bottom: 0;
}

html body .pagination .page-item .page-link {
  border: 0;
  background: transparent;
  color: var(--md-neutral-30);
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: var(--md-radius-pill);
  font-size: 11.5px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 120ms ease;
}

html body .pagination .page-item .page-link:hover {
  background-color: var(--md-primary-95);
  color: var(--md-primary-10);
  box-shadow: none;
}

html body .pagination .page-item.active .page-link {
  background-color: var(--md-primary-40);
  color: #FFFFFF;
  font-weight: 500;
}

html body .pagination .page-item.disabled .page-link {
  color: var(--md-neutral-70);
  background-color: transparent;
  cursor: not-allowed;
}

/* Prev / next as icon-only */
html body .pagination .page-item:first-child .page-link,
html body .pagination .page-item:last-child .page-link {
  width: 28px;
  padding: 0;
}

/* Ellipsis */
html body .pagination .page-item .page-link[aria-label="ellipsis"],
html body .pagination .page-item.ellipsis .page-link,
html body .pagination .page-item .page-link.ellipsis {
  color: var(--md-neutral-60);
  cursor: default;
  background: transparent !important;
  pointer-events: none;
}


/* ============================================================================
   8. PAGINATION FOOTER — toolbar with rows-per-page + count + nav
   ============================================================================ */

html body .pagination-footer,
html body .table-pagination,
html body .card > .card-footer.pagination-footer {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--md-surface-card-soft);
  border-top: 1px solid var(--md-surface-divider);
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  color: var(--md-neutral-40);
  gap: 10px;
  flex-wrap: wrap;
}

html body .pagination-footer .rows-per-page,
html body .pagination-footer .page-size-selector {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

html body .pagination-footer .rows-per-page .form-select,
html body .pagination-footer .page-size-selector .form-select,
html body .pagination-footer .page-size-btn {
  height: 26px;
  padding: 0 8px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--md-neutral-10);
  background-color: var(--md-surface-card);
  border: 1px solid var(--md-surface-border);
  border-radius: var(--md-radius-md);
  min-width: 56px;
}

html body .pagination-footer .pagination-info,
html body .pagination-footer .results-count {
  color: var(--md-neutral-40);
  font-size: 11.5px;
}


/* ============================================================================
   9. EMPTY STATE
   ============================================================================ */

html body .empty-state,
html body .table-empty-state,
html body .no-data {
  text-align: center;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  font-family: 'Inter', sans-serif;
}

html body .empty-state .empty-icon,
html body .empty-state > .icon-wrapper,
html body .empty-state > .ti:first-child,
html body .table-empty-state > .icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--md-surface-tinted);
  color: var(--md-primary-40);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-size: 24px;
}

html body .empty-state .empty-title,
html body .empty-state h3,
html body .empty-state h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--md-neutral-10);
  margin-bottom: 4px;
  letter-spacing: -0.1px;
}

html body .empty-state .empty-description,
html body .empty-state .empty-text,
html body .empty-state p {
  font-size: 12px;
  color: var(--md-neutral-40);
  max-width: 280px;
  line-height: 1.5;
  margin-bottom: 14px;
}

html body .empty-state .empty-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

html body .empty-state .empty-actions .btn {
  height: 30px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
}

/* Empty state inside a table body — span all columns */
html body .table tbody tr.empty-row td {
  padding: 0 !important;
  border-bottom: 0 !important;
}


/* ============================================================================
   10. LOADING SKELETON — shimmer animation
   ============================================================================ */

@keyframes md-skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

html body .skeleton,
html body .placeholder-glow .placeholder,
html body .skeleton-block {
  background: linear-gradient(
    90deg,
    var(--md-neutral-95) 0%,
    var(--md-neutral-98) 50%,
    var(--md-neutral-95) 100%
  );
  background-size: 200% 100%;
  animation: md-skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--md-radius-sm);
  display: block;
}

html body .skeleton-text {
  height: 10px;
  width: 100%;
  border-radius: 3px;
}

html body .skeleton-text-sm { height: 8px; }
html body .skeleton-text-lg { height: 14px; }

html body .skeleton-circle {
  border-radius: 50%;
}

html body .skeleton-pill {
  height: 18px;
  border-radius: var(--md-radius-lg);
}

html body .skeleton-row {
  padding: 9px 14px;
  border-bottom: 1px solid var(--md-surface-divider);
  display: grid;
  gap: 8px;
  align-items: center;
}

html body .skeleton-row + .skeleton-row { opacity: 0.7; }
html body .skeleton-row + .skeleton-row + .skeleton-row { opacity: 0.5; }
html body .skeleton-row + .skeleton-row + .skeleton-row + .skeleton-row { opacity: 0.3; }

/* Bootstrap's .placeholder element — same treatment */
html body .placeholder {
  background: linear-gradient(
    90deg,
    var(--md-neutral-95) 0%,
    var(--md-neutral-98) 50%,
    var(--md-neutral-95) 100%
  );
  background-size: 200% 100%;
  animation: md-skeleton-shimmer 1.5s ease-in-out infinite;
  opacity: 1;
}


/* ============================================================================
   11. STATUS PILL HELPERS — used inside tables
   For completeness; badges in Sprint 1 cover .badge-* variants
   ============================================================================ */

html body .status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--md-radius-lg);
  font-size: 10.5px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  line-height: 1.4;
  white-space: nowrap;
}

html body .status-pill.status-success { background-color: var(--md-success-50); color: var(--md-success-800); }
html body .status-pill.status-warning { background-color: var(--md-warning-50); color: var(--md-warning-800); }
html body .status-pill.status-danger  { background-color: var(--md-error-50);   color: var(--md-error-800); }
html body .status-pill.status-info    { background-color: var(--md-info-50);    color: var(--md-info-800); }
html body .status-pill.status-primary { background-color: var(--md-primary-90); color: var(--md-primary-10); }
html body .status-pill.status-neutral { background-color: var(--md-neutral-95); color: var(--md-neutral-20); }


/* ============================================================================
   12. AVATAR IN TABLE — sized for compact rows
   ============================================================================ */

html body .table td .avatar,
html body .table td .table-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  flex-shrink: 0;
}

html body .table td .avatar img,
html body .table td .table-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}


/* ============================================================================
   13. RESPONSIVE — mobile collapsing
   ============================================================================ */

@media (max-width: 768px) {
  html body .table-toolbar,
  html body .card > .toolbar {
    padding: 10px 12px;
    gap: 6px;
  }
  html body .table-toolbar .search-input {
    max-width: 100%;
    flex: 1 1 100%;
  }

  html body .table > thead > tr > th,
  html body .table > tbody > tr > td {
    padding: 8px 6px;
    font-size: 12px;
  }

  /* Hide non-essential columns on mobile (opt-in) */
  html body .table .d-mobile-none,
  html body .table .hide-mobile {
    display: none;
  }

  /* Pagination collapses to prev/next only on mobile (opt-in) */
  html body .pagination-footer.pagination-mobile-simple .pagination .page-item:not(:first-child):not(:last-child):not(.active) {
    display: none;
  }
}

@media (max-width: 576px) {
  html body .pagination-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  html body .pagination-footer .pagination {
    justify-content: center;
  }
}


/* ============================================================================
   14. REDUCED MOTION
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
  html body .skeleton,
  html body .placeholder,
  html body .skeleton-block,
  html body .skeleton-text {
    animation: none;
    background: var(--md-neutral-95);
  }
}


/* ============================================================================
   END OF SPRINT 4
   Coming next:
   · Sprint 5: tabs, stepper, breadcrumb extensions, nav-pills
   · Sprint 6: charts (ECharts theme), sparklines, gauges
   · Sprint 7: kanban, calendar, file manager, wizard, timeline
   · Sprint 8: Flatpickr, TinyMCE, Choices.js, Dropzone polish
   ============================================================================ */
