/*
  Table component layer.
  Loaded after tabs.css to stabilize table rows, ticket states and table-enhance actions.
*/

body.has-app-sidebar,
body.client-portal-body{
  --mhd-table-font: var(--display-font, "Rajdhani", "Segoe UI", system-ui, -apple-system, sans-serif);
  --mhd-table-cell-pad-y: 9px;
  --mhd-table-cell-pad-x: 10px;
  --mhd-table-body-size: .88rem;
  --mhd-table-body-weight: 500;
  --mhd-table-strong-weight: 600;
  --mhd-table-value-weight: 700;
  --mhd-table-total-weight: 700;
  --mhd-table-muted-size: .82rem;
  --mhd-table-head-size: .72rem;
  --mhd-table-head-weight: 800;
  --table-row-bg: #ffffff;
  --table-row-bg-alt: #f8fafc;
  --table-row-bg-hover: #f3f7f6;
  --table-row-border: #d8e3e8;
  --table-row-selected-bg: #e8f8f0;
  --table-row-selected-accent: #0f9f6e;
  --ticket-row-closed-bg: #f3f5f7;
  --ticket-row-closed-bg-hover: #e9edf1;
  --ticket-row-closed-border: #cfd8df;
  --ticket-row-closed-accent: #64748b;
  --ticket-row-canceled-bg: #fff1f2;
  --ticket-row-canceled-bg-hover: #ffe4e6;
  --ticket-row-canceled-border: #fecdd3;
  --ticket-row-canceled-accent: #dc2626;
  --dock-action-height: 40px;
  --dock-action-radius: 8px;
}

html[data-theme="dark"] body.has-app-sidebar,
html[data-theme="dark"] body.client-portal-body{
  --table-row-bg: #151515;
  --table-row-bg-alt: #181818;
  --table-row-bg-hover: #1d1d1d;
  --table-row-border: #2a2a2a;
  --table-row-selected-bg: #10241d;
  --table-row-selected-accent: #00bc7d;
  --ticket-row-closed-bg: #222222;
  --ticket-row-closed-bg-hover: #282828;
  --ticket-row-closed-border: #3a3a3a;
  --ticket-row-closed-accent: #94a3b8;
  --ticket-row-canceled-bg: #351515;
  --ticket-row-canceled-bg-hover: #421919;
  --ticket-row-canceled-border: rgb(239 68 68 / .42);
  --ticket-row-canceled-accent: #ef4444;
}

/* Data tables keep the product font and use lighter weights plus compact spacing for readability. */
body:is(.has-app-sidebar, .client-portal-body) :is(.table, .mhd-table-sticky-head__table){
  font-family: var(--mhd-table-font) !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0 !important;
}

body:is(.has-app-sidebar, .client-portal-body) :is(.table, .mhd-table-sticky-head__table) :is(th, td){
  font-family: var(--mhd-table-font) !important;
  letter-spacing: 0 !important;
}

body:is(.has-app-sidebar, .client-portal-body) :is(.table, .mhd-table-sticky-head__table) thead th{
  padding: var(--mhd-table-cell-pad-y) var(--mhd-table-cell-pad-x) !important;
  font-size: var(--mhd-table-head-size) !important;
  font-weight: var(--mhd-table-head-weight) !important;
  letter-spacing: .03em !important;
  line-height: 1.15 !important;
  text-transform: uppercase;
}

body:is(.has-app-sidebar, .client-portal-body) :is(.table, .mhd-table-sticky-head__table) td{
  padding: var(--mhd-table-cell-pad-y) var(--mhd-table-cell-pad-x) !important;
  font-size: var(--mhd-table-body-size) !important;
  font-weight: var(--mhd-table-body-weight) !important;
  line-height: 1.28 !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

body:is(.has-app-sidebar, .client-portal-body) :is(.table, .mhd-table-sticky-head__table) td :where(span, small, a, strong, b, em, .muted, .pill, .chip){
  font-family: inherit !important;
  letter-spacing: 0 !important;
}

body:is(.has-app-sidebar, .client-portal-body) :is(.table, .mhd-table-sticky-head__table) td :where(strong, b){
  font-weight: var(--mhd-table-strong-weight) !important;
}

body:is(.has-app-sidebar, .client-portal-body) :is(.table, .mhd-table-sticky-head__table) td :where(small, .muted){
  font-size: var(--mhd-table-muted-size) !important;
  line-height: 1.25 !important;
}

body:is(.has-app-sidebar, .client-portal-body) :is(.table, .mhd-table-sticky-head__table) td :where(.pill, .chip){
  font-size: .78rem !important;
  font-weight: 600 !important;
}

body:is(.has-app-sidebar, .client-portal-body) :is(.table, .mhd-table-sticky-head__table) td:is(.mhd-table-money, .mhd-table-value, .mhd-table-amount, .mhd-table-currency),
body:is(.has-app-sidebar, .client-portal-body) :is(.table, .mhd-table-sticky-head__table) td :where(
  .mhd-table-money,
  .mhd-table-value,
  .mhd-table-amount,
  .mhd-table-currency,
  .fin-money-paid,
  .fin-money-open,
  .fin-money-muted,
  .fin-installments-total,
  .fin-dre-money--pos,
  .fin-dre-money--neg,
  [class^="fin-move-amount--"],
  [class*=" fin-move-amount--"]
){
  font-weight: var(--mhd-table-value-weight) !important;
}

body:is(.has-app-sidebar, .client-portal-body) :is(.table.fin-titles-table, .table.report-table--financial){
  --mhd-table-cell-pad-y: 8px;
  --mhd-table-cell-pad-x: 9px;
  --mhd-table-body-size: .84rem;
  --mhd-table-body-weight: 500;
  --mhd-table-strong-weight: 600;
  --mhd-table-muted-size: .78rem;
  --mhd-table-head-size: .68rem;
  min-width: 1280px !important;
}

body:is(.has-app-sidebar, .client-portal-body) #financeControlPage .fin-titles-table :is(
  .fin-title-party,
  .fin-title-desc,
  .fin-title-plan__item
){
  font-weight: 600 !important;
}

body:is(.has-app-sidebar, .client-portal-body) #financeControlPage .fin-titles-table :is(.fin-title-meta, .fin-title-meta span, .fin-title-plan__group){
  font-size: .74rem !important;
  font-weight: 500 !important;
  line-height: 1.15 !important;
}

body:is(.has-app-sidebar, .client-portal-body) #financeControlPage .fin-titles-table .fin-title-meta span{
  padding: 1px 5px !important;
  border-radius: 6px !important;
}

body:is(.has-app-sidebar, .client-portal-body) #financeControlPage .fin-titles-table .fin-due{
  min-width: 88px !important;
  padding: 5px 7px !important;
  border-radius: 7px !important;
  font-weight: 600 !important;
}

body:is(.has-app-sidebar, .client-portal-body) #financeControlPage .fin-titles-table .fin-status{
  min-width: 72px !important;
  padding: 5px 7px !important;
  border-radius: 7px !important;
  font-size: .68rem !important;
  font-weight: 700 !important;
  letter-spacing: .02em !important;
}

body:is(.has-app-sidebar, .client-portal-body) :is(.table, .mhd-table-sticky-head__table) tfoot td{
  font-weight: var(--mhd-table-total-weight) !important;
}

body:is(.has-app-sidebar, .client-portal-body) :is(.table, .mhd-table-sticky-head__table) tfoot td :where(span, small, strong, b, em, .muted){
  font-weight: var(--mhd-table-total-weight) !important;
}

body:is(.has-app-sidebar, .client-portal-body) :is(.table, .mhd-table-sticky-head__table) tbody tr{
  background-image: none !important;
}

body:is(.has-app-sidebar, .client-portal-body) :is(.table, .mhd-table-sticky-head__table) tbody tr:nth-child(even):not(.is-selected):not(.mhd-action-row-selected):not(.tk-row--closed){
  background: var(--table-row-bg-alt) !important;
  background-image: none !important;
}

body:is(.has-app-sidebar, .client-portal-body) :is(.table, .mhd-table-sticky-head__table) tbody tr:hover:not(.is-selected):not(.mhd-action-row-selected):not(.mhd-row-placeholder){
  background: var(--table-row-bg-hover) !important;
  background-image: none !important;
}

body:is(.has-app-sidebar, .client-portal-body) :is(.table, .mhd-table-sticky-head__table) tbody tr:is(.is-selected, .mhd-action-row-selected){
  background: var(--table-row-selected-bg) !important;
  background-image: none !important;
  box-shadow: inset 3px 0 0 var(--table-row-selected-accent) !important;
}

body:is(.has-app-sidebar, .client-portal-body) :is(.table, .mhd-table-sticky-head__table) tbody tr:is(.is-selected, .mhd-action-row-selected) > td{
  background: transparent !important;
}

body:is(.has-app-sidebar, .client-portal-body) #ticketsPage.page-chamados-list .table tbody tr.tk-row--closed,
body:is(.has-app-sidebar, .client-portal-body) #ticketsPage.page-chamados-list .table tbody tr[data-is-closed="1"]{
  background: var(--ticket-row-closed-bg) !important;
  background-image: none !important;
  border-color: var(--ticket-row-closed-border) !important;
  box-shadow: inset 3px 0 0 var(--ticket-row-closed-accent) !important;
}

body:is(.has-app-sidebar, .client-portal-body) #ticketsPage.page-chamados-list .table tbody tr.tk-row--closed:hover,
body:is(.has-app-sidebar, .client-portal-body) #ticketsPage.page-chamados-list .table tbody tr[data-is-closed="1"]:hover{
  background: var(--ticket-row-closed-bg-hover) !important;
  background-image: none !important;
}

body:is(.has-app-sidebar, .client-portal-body) #ticketsPage.page-chamados-list .table tbody tr:is(.tk-row--closed, [data-is-closed="1"]) > td{
  background: transparent !important;
  border-bottom-color: var(--ticket-row-closed-border) !important;
}

body:is(.has-app-sidebar, .client-portal-body) #ticketsPage.page-chamados-list .table tbody tr[data-is-canceled="1"]{
  background: var(--ticket-row-canceled-bg) !important;
  background-image: none !important;
  border-color: var(--ticket-row-canceled-border) !important;
  box-shadow: inset 3px 0 0 var(--ticket-row-canceled-accent) !important;
}

body:is(.has-app-sidebar, .client-portal-body) #ticketsPage.page-chamados-list .table tbody tr[data-is-canceled="1"]:hover{
  background: var(--ticket-row-canceled-bg-hover) !important;
  background-image: none !important;
}

body:is(.has-app-sidebar, .client-portal-body) #ticketsPage.page-chamados-list .table tbody tr[data-is-canceled="1"] > td{
  background: transparent !important;
  border-bottom-color: var(--ticket-row-canceled-border) !important;
}

body:is(.has-app-sidebar, .client-portal-body) #ticketsPage.page-chamados-list .table.table-mobile-card--tickets tbody tr:is(.tk-row--closed, [data-is-closed="1"], [data-is-canceled="1"]){
  background-image: none !important;
}

body:is(.has-app-sidebar, .client-portal-body) #ticketsPage.page-chamados-list .table.table-mobile-card--tickets tbody tr[data-is-closed="1"]::before{
  background: var(--ticket-row-closed-accent) !important;
}

body:is(.has-app-sidebar, .client-portal-body) #ticketsPage.page-chamados-list .table.table-mobile-card--tickets tbody tr[data-is-canceled="1"]::before{
  background: var(--ticket-row-canceled-accent) !important;
}

body:is(.has-app-sidebar, .client-portal-body) .mhd-table-action-dock__actions{
  align-items: center !important;
  gap: 8px !important;
  overflow: visible !important;
}

body:is(.has-app-sidebar, .client-portal-body) .mhd-table-action-dock__actions :is(a, button, input[type="submit"]).mhd-dock-action{
  aspect-ratio: auto !important;
  border-radius: var(--dock-action-radius) !important;
  display: inline-flex !important;
  flex: 0 0 auto !important;
  gap: 8px !important;
  height: var(--dock-action-height) !important;
  line-height: 1.15 !important;
  max-height: none !important;
  max-width: min(320px, calc(100vw - 72px)) !important;
  min-height: var(--dock-action-height) !important;
  min-width: var(--dock-action-height) !important;
  overflow: visible !important;
  padding: 0 13px !important;
  text-overflow: clip !important;
  transform: none !important;
  width: auto !important;
}

body:is(.has-app-sidebar, .client-portal-body) .mhd-table-action-dock__actions .mhd-dock-action__label{
  display: inline-block !important;
  max-width: 220px !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body:is(.has-app-sidebar, .client-portal-body) .mhd-table-action-dock__actions .mhd-dock-action :is(i[data-lucide], svg){
  flex: 0 0 auto !important;
  height: 16px !important;
  width: 16px !important;
}

body:is(.has-app-sidebar, .client-portal-body) .mhd-table-action-dock__close{
  height: var(--dock-action-height) !important;
  min-height: var(--dock-action-height) !important;
  min-width: var(--dock-action-height) !important;
  width: var(--dock-action-height) !important;
}

@media (max-width: 720px){
  body:is(.has-app-sidebar, .client-portal-body) .mhd-table-action-dock{
    width: calc(100vw - 24px) !important;
  }

  body:is(.has-app-sidebar, .client-portal-body) .mhd-table-action-dock__actions{
    justify-content: flex-start !important;
    width: 100%;
  }

  body:is(.has-app-sidebar, .client-portal-body) .mhd-table-action-dock__actions :is(a, button, input[type="submit"]).mhd-dock-action{
    max-width: 100% !important;
  }
}

/* Ticket list state rows: beat legacy dark selectors that miss the current data attributes. */
html[data-theme="dark"] body.has-app-sidebar.has-app-sidebar #ticketsPage.page-chamados-list.page-chamados-list .table.table-mobile-card--tickets tbody tr.tk-row--closed[data-is-closed="1"],
html[data-theme="dark"] body.has-app-sidebar.has-app-sidebar #ticketsPage.page-chamados-list.page-chamados-list .table.table-mobile-card--tickets tbody tr[data-is-closed="1"],
html[data-theme="dark"] body.client-portal-body.client-portal-body #ticketsPage.page-chamados-list.page-chamados-list .table.table-mobile-card--tickets tbody tr.tk-row--closed[data-is-closed="1"],
html[data-theme="dark"] body.client-portal-body.client-portal-body #ticketsPage.page-chamados-list.page-chamados-list .table.table-mobile-card--tickets tbody tr[data-is-closed="1"]{
  background: var(--ticket-row-closed-bg) !important;
  background-image: none !important;
  border-color: var(--ticket-row-closed-border) !important;
  box-shadow: inset 3px 0 0 var(--ticket-row-closed-accent) !important;
}

html[data-theme="dark"] body.has-app-sidebar.has-app-sidebar #ticketsPage.page-chamados-list.page-chamados-list .table.table-mobile-card--tickets tbody tr.tk-row--closed[data-is-closed="1"]:hover,
html[data-theme="dark"] body.has-app-sidebar.has-app-sidebar #ticketsPage.page-chamados-list.page-chamados-list .table.table-mobile-card--tickets tbody tr[data-is-closed="1"]:hover,
html[data-theme="dark"] body.client-portal-body.client-portal-body #ticketsPage.page-chamados-list.page-chamados-list .table.table-mobile-card--tickets tbody tr.tk-row--closed[data-is-closed="1"]:hover,
html[data-theme="dark"] body.client-portal-body.client-portal-body #ticketsPage.page-chamados-list.page-chamados-list .table.table-mobile-card--tickets tbody tr[data-is-closed="1"]:hover{
  background: var(--ticket-row-closed-bg-hover) !important;
  background-image: none !important;
}

html[data-theme="dark"] body.has-app-sidebar.has-app-sidebar #ticketsPage.page-chamados-list.page-chamados-list .table.table-mobile-card--tickets tbody tr[data-is-canceled="1"],
html[data-theme="dark"] body.client-portal-body.client-portal-body #ticketsPage.page-chamados-list.page-chamados-list .table.table-mobile-card--tickets tbody tr[data-is-canceled="1"]{
  background: var(--ticket-row-canceled-bg) !important;
  background-image: none !important;
  border-color: var(--ticket-row-canceled-border) !important;
  box-shadow: inset 3px 0 0 var(--ticket-row-canceled-accent) !important;
}

html[data-theme="dark"] body.has-app-sidebar.has-app-sidebar #ticketsPage.page-chamados-list.page-chamados-list .table.table-mobile-card--tickets tbody tr[data-is-canceled="1"]:hover,
html[data-theme="dark"] body.client-portal-body.client-portal-body #ticketsPage.page-chamados-list.page-chamados-list .table.table-mobile-card--tickets tbody tr[data-is-canceled="1"]:hover{
  background: var(--ticket-row-canceled-bg-hover) !important;
  background-image: none !important;
}

html[data-theme="dark"] body.has-app-sidebar.has-app-sidebar #ticketsPage.page-chamados-list.page-chamados-list .table.table-mobile-card--tickets tbody tr:is([data-is-closed="1"], [data-is-canceled="1"]) > td,
html[data-theme="dark"] body.client-portal-body.client-portal-body #ticketsPage.page-chamados-list.page-chamados-list .table.table-mobile-card--tickets tbody tr:is([data-is-closed="1"], [data-is-canceled="1"]) > td{
  background: transparent !important;
}

html[data-theme="dark"] body.has-app-sidebar.has-app-sidebar #ticketsPage.page-chamados-list.page-chamados-list .table.table-mobile-card--tickets tbody tr[data-is-closed="1"] > td,
html[data-theme="dark"] body.client-portal-body.client-portal-body #ticketsPage.page-chamados-list.page-chamados-list .table.table-mobile-card--tickets tbody tr[data-is-closed="1"] > td{
  border-bottom-color: var(--ticket-row-closed-border) !important;
}

html[data-theme="dark"] body.has-app-sidebar.has-app-sidebar #ticketsPage.page-chamados-list.page-chamados-list .table.table-mobile-card--tickets tbody tr[data-is-canceled="1"] > td,
html[data-theme="dark"] body.client-portal-body.client-portal-body #ticketsPage.page-chamados-list.page-chamados-list .table.table-mobile-card--tickets tbody tr[data-is-canceled="1"] > td{
  border-bottom-color: var(--ticket-row-canceled-border) !important;
}

/*
  Component-level guard: table footers stay attached to the listing.
  Several migrated views reuse tk-foot/tk-pager with different data attributes,
  so this layer owns the visual standard without changing JS contracts.
*/
body:is(.has-app-sidebar, .client-portal-body){
  --mhd-table-footer-bg: #f8fafc;
  --mhd-table-footer-border: #d8e3e8;
  --mhd-table-footer-text: #64748b;
  --mhd-table-footer-strong: #17202a;
  --mhd-table-footer-control-bg: #ffffff;
  --mhd-table-footer-control-hover: #eef6f2;
  --mhd-table-footer-active-bg: #e8f8f0;
  --mhd-table-footer-active-border: #0f9f6e;
  --mhd-table-footer-active-text: #063f2d;
}

html[data-theme="dark"] body:is(.has-app-sidebar, .client-portal-body){
  --mhd-table-footer-bg: #151515;
  --mhd-table-footer-border: #2a2a2a;
  --mhd-table-footer-text: #9ca3af;
  --mhd-table-footer-strong: #e5e7eb;
  --mhd-table-footer-control-bg: #111111;
  --mhd-table-footer-control-hover: #1c1c1c;
  --mhd-table-footer-active-bg: #10241d;
  --mhd-table-footer-active-border: #00bc7d;
  --mhd-table-footer-active-text: #d1fae5;
}

body:is(.has-app-sidebar, .client-portal-body) .table-wrap:has(+ .tk-foot),
body:is(.has-app-sidebar, .client-portal-body) .table-wrap:has(+ .tk-foot--auto){
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  box-shadow: none !important;
}

body:is(.has-app-sidebar, .client-portal-body) :is(.tk-foot, .tk-foot--auto){
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px 16px !important;
  flex-wrap: wrap !important;
  margin-top: 10px !important;
  min-height: 52px;
  padding: 9px 12px !important;
  border: 1px solid var(--mhd-table-footer-border) !important;
  border-radius: 8px !important;
  background: var(--mhd-table-footer-bg) !important;
  background-image: none !important;
  box-shadow: none !important;
  color: var(--mhd-table-footer-text) !important;
}

body:is(.has-app-sidebar, .client-portal-body) .table-wrap + :is(.tk-foot, .tk-foot--auto){
  margin-top: -1px !important;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}

body:is(.has-app-sidebar, .client-portal-body) :is(.tk-foot, .tk-foot--auto) > .muted{
  display: block !important;
  min-height: 0 !important;
  margin: 0 !important;
  color: var(--mhd-table-footer-text) !important;
  font-size: .82rem !important;
  font-weight: 750 !important;
  letter-spacing: 0 !important;
  line-height: 1.35 !important;
}

body:is(.has-app-sidebar, .client-portal-body) :is(.tk-foot, .tk-foot--auto) > .muted strong{
  color: var(--mhd-table-footer-strong) !important;
  font-size: .86rem !important;
  font-weight: 900 !important;
}

body:is(.has-app-sidebar, .client-portal-body) .mhd-table-totalizer{
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  color: var(--mhd-table-footer-text) !important;
  font-size: .82rem !important;
  font-weight: 750 !important;
  box-shadow: none !important;
}

body:is(.has-app-sidebar, .client-portal-body) .mhd-table-totalizer strong{
  color: var(--mhd-table-footer-strong) !important;
  font-size: .86rem !important;
  font-weight: 900 !important;
}

body:is(.has-app-sidebar, .client-portal-body) .tk-foot__right{
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px 12px !important;
  flex-wrap: wrap !important;
  margin-left: auto !important;
}

body:is(.has-app-sidebar, .client-portal-body) .tk-perpage{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px 8px !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
}

body:is(.has-app-sidebar, .client-portal-body) .tk-perpage > :is(.label, label){
  margin: 0 !important;
  color: var(--mhd-table-footer-text) !important;
  font-size: .68rem !important;
  font-weight: 850 !important;
  letter-spacing: .06em !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

body:is(.has-app-sidebar, .client-portal-body) .tk-perpage :is(.tk-perpage-select, select.input){
  width: auto !important;
  min-width: 76px !important;
  max-width: 104px !important;
  min-height: 34px !important;
  height: 34px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-color: var(--mhd-table-footer-border) !important;
  background: var(--mhd-table-footer-control-bg) !important;
  color: var(--mhd-table-footer-strong) !important;
  font-size: .82rem !important;
  font-weight: 850 !important;
  box-shadow: none !important;
}

body:is(.has-app-sidebar, .client-portal-body) .tk-perpage .searchselect[data-native="1"]{
  width: auto !important;
  min-width: 76px !important;
  max-width: 104px !important;
}

body:is(.has-app-sidebar, .client-portal-body) .tk-perpage .searchselect[data-native="1"] .ss-input{
  min-height: 34px !important;
  height: 34px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-color: var(--mhd-table-footer-border) !important;
  background: var(--mhd-table-footer-control-bg) !important;
  color: var(--mhd-table-footer-strong) !important;
  font-size: .82rem !important;
  font-weight: 850 !important;
  text-align: center !important;
  box-shadow: none !important;
}

body:is(.has-app-sidebar, .client-portal-body) .tk-perpage .pp-options{
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  flex-wrap: wrap !important;
}

body:is(.has-app-sidebar, .client-portal-body) .tk-perpage .pp-item{
  margin: 0 !important;
}

body:is(.has-app-sidebar, .client-portal-body) .tk-perpage .pp-item span{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 34px !important;
  height: 34px !important;
  padding: 0 9px !important;
  border: 1px solid var(--mhd-table-footer-border) !important;
  border-radius: 8px !important;
  background: var(--mhd-table-footer-control-bg) !important;
  background-image: none !important;
  color: var(--mhd-table-footer-strong) !important;
  font-size: .8rem !important;
  font-weight: 850 !important;
  box-shadow: none !important;
}

body:is(.has-app-sidebar, .client-portal-body) .tk-perpage .pp-item input:checked + span{
  border-color: var(--mhd-table-footer-active-border) !important;
  background: var(--mhd-table-footer-active-bg) !important;
  color: var(--mhd-table-footer-active-text) !important;
  box-shadow: none !important;
}

body:is(.has-app-sidebar, .client-portal-body) .tk-pager,
body:is(.has-app-sidebar, .client-portal-body) .tk-page-list{
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
}

body:is(.has-app-sidebar, .client-portal-body) .tk-pager :is(.btn.ghost, .tk-page-btn, .tk-page-info),
body:is(.has-app-sidebar, .client-portal-body) .tk-pager > .pill{
  min-width: 34px !important;
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 10px !important;
  border: 1px solid var(--mhd-table-footer-border) !important;
  border-radius: 8px !important;
  background: var(--mhd-table-footer-control-bg) !important;
  background-image: none !important;
  color: var(--mhd-table-footer-strong) !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: .78rem !important;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  text-shadow: none !important;
  transition: background .14s ease, border-color .14s ease, color .14s ease, opacity .14s ease;
}

body:is(.has-app-sidebar, .client-portal-body) .tk-pager :is(.btn.ghost){
  width: 34px !important;
  padding: 0 !important;
}

body:is(.has-app-sidebar, .client-portal-body) .tk-pager :is(.btn.ghost, .tk-page-btn, .tk-page-info):is(:hover, :focus-visible),
body:is(.has-app-sidebar, .client-portal-body) .tk-pager > .pill:is(:hover, :focus-visible){
  border-color: var(--mhd-table-footer-active-border) !important;
  background: var(--mhd-table-footer-control-hover) !important;
  color: var(--mhd-table-footer-strong) !important;
  transform: none !important;
  box-shadow: none !important;
}

body:is(.has-app-sidebar, .client-portal-body) .tk-pager .tk-page-btn.is-active{
  border-color: var(--mhd-table-footer-active-border) !important;
  background: var(--mhd-table-footer-active-bg) !important;
  color: var(--mhd-table-footer-active-text) !important;
  cursor: default !important;
}

body:is(.has-app-sidebar, .client-portal-body) .tk-pager .tk-page-info,
body:is(.has-app-sidebar, .client-portal-body) .tk-pager > .pill{
  min-width: auto !important;
  padding-inline: 12px !important;
  white-space: nowrap !important;
}

body:is(.has-app-sidebar, .client-portal-body) .tk-pager :is(.btn.ghost, .tk-page-btn, .tk-page-info)[aria-disabled="true"],
body:is(.has-app-sidebar, .client-portal-body) .tk-pager > .pill[aria-disabled="true"],
body:is(.has-app-sidebar, .client-portal-body) .tk-pager :is(.btn.ghost, .tk-page-btn, .tk-page-info):disabled,
body:is(.has-app-sidebar, .client-portal-body) .tk-pager > .pill:disabled{
  opacity: .45 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

body:is(.has-app-sidebar, .client-portal-body) .tk-pager :is(i[data-lucide], svg){
  width: 15px !important;
  height: 15px !important;
  color: currentColor !important;
  stroke: currentColor !important;
}

body:is(.has-app-sidebar, .client-portal-body) :is(.mhd-page-summary__embed-body, .mhd-page-summary__embed) :is(.tk-foot--auto, .mhd-table-totalizer){
  display: none !important;
}

@media (max-width: 780px){
  body:is(.has-app-sidebar, .client-portal-body) :is(.tk-foot, .tk-foot--auto){
    align-items: stretch !important;
    padding: 10px !important;
  }

  body:is(.has-app-sidebar, .client-portal-body) .tk-foot__right{
    width: 100% !important;
    margin-left: 0 !important;
    justify-content: flex-start !important;
  }

  body:is(.has-app-sidebar, .client-portal-body) .tk-perpage{
    justify-content: flex-start !important;
  }

  body:is(.has-app-sidebar, .client-portal-body) .tk-pager{
    width: 100% !important;
    justify-content: flex-start !important;
  }

  body:is(.has-app-sidebar, .client-portal-body) .tk-page-list{
    max-width: 100% !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    padding-bottom: 2px !important;
  }
}
