/* Global Products table model. Native tables and dynamically inserted rows need no opt-in. */
@layer bdg-premium-tables { @media screen { body:is([data-page],[data-bdg-table-theme]) {--bdg-table-accent:#155eef;--bdg-table-head:#f0f4fc;--bdg-table-ink:#172b4d;--bdg-table-line:#e9edf5;--bdg-table-selected:#eaf2ff;--bdg-table-hover:#f5f8ff;--bdg-table-control-border:#dce5f3;} } }
/* All ERP data tables share the Products premium screen theme. Printing is unchanged. */
@layer bdg-premium-tables {
 @media screen {
  body:is([data-page],[data-bdg-table-theme]) {--bdg-sheet-accent:var(--bdg-table-accent)!important;--bdg-sheet-tint:var(--bdg-table-head)!important;--bdg-sheet-edge:#e3eaf3!important;--bdg-sheet-line:var(--bdg-table-line)!important;}
  body:is([data-page],[data-bdg-table-theme]) table:not(:where(.flatpickr-calendar table,.ui-datepicker-calendar,.calendar table,[role="presentation"],[data-print-root] table,.print-only table)) {color:var(--bdg-table-ink)!important;border-collapse:separate!important;border-spacing:0!important;border:0!important;box-shadow:none!important;font-variant-numeric:tabular-nums;}
  body:is([data-page],[data-bdg-table-theme]) table:not(:where(.flatpickr-calendar table,.ui-datepicker-calendar,.calendar table,[role="presentation"],[data-print-root] table,.print-only table)) > :is(thead,tbody,tfoot) > tr > :is(th,td) {border-left:0!important;border-right:0!important;border-top:0!important;border-bottom:1px solid var(--bdg-table-line)!important;padding:6px 12px!important;line-height:1.4!important;vertical-align:middle;}
  body:is([data-page],[data-bdg-table-theme]) table:not(:where(.flatpickr-calendar table,.ui-datepicker-calendar,.calendar table,[role="presentation"],[data-print-root] table,.print-only table)) > thead > tr > :is(th,td) {background:var(--bdg-table-head)!important;color:var(--bdg-table-ink)!important;font-weight:600!important;font-size:12px!important;box-shadow:none!important;text-transform:none!important;letter-spacing:normal!important;}
  body:is([data-page],[data-bdg-table-theme]) table:not(:where(.flatpickr-calendar table,.ui-datepicker-calendar,.calendar table,[role="presentation"],[data-print-root] table,.print-only table)) > tbody > tr > :is(th,td) {background:#fff!important;font-size:12px!important;}
  body:is([data-page],[data-bdg-table-theme]) table:not(:where(.flatpickr-calendar table,.ui-datepicker-calendar,.calendar table,[role="presentation"],[data-print-root] table,.print-only table)) > tbody > tr {height:auto!important;}
  body:is([data-page],[data-bdg-table-theme]) #candidatesListTable > tbody > tr > td {height:auto!important;}
  body:is([data-page],[data-bdg-table-theme]) #candidatesListTable td > div[style] {white-space:normal!important;max-height:96px!important;}
  body:is([data-page],[data-bdg-table-theme]) table:not(:where(.flatpickr-calendar table,.ui-datepicker-calendar,.calendar table,[role="presentation"],[data-print-root] table,.print-only table)) > tbody > tr:nth-child(even) > :is(th,td) {background:#fff!important;}
  body:is([data-page],[data-bdg-table-theme]) table:not(:where(.flatpickr-calendar table,.ui-datepicker-calendar,.calendar table,[role="presentation"],[data-print-root] table,.print-only table)) > tbody > tr:is(:hover,:focus-within) > :is(th,td),
  body:is([data-page],[data-bdg-table-theme]) table:not(:where(.flatpickr-calendar table,.ui-datepicker-calendar,.calendar table,[role="presentation"],[data-print-root] table,.print-only table)) > tbody > tr:has(:is([data-bdg-row-select],[data-grid-select],[data-contact-select],[data-sale-select],[data-bdg-selection-cell] input[type=checkbox]):checked) > :is(th,td) {background:var(--bdg-table-hover)!important;}
  body:is([data-page],[data-bdg-table-theme]) table:not(:where(.flatpickr-calendar table,.ui-datepicker-calendar,.calendar table,[role="presentation"],[data-print-root] table,.print-only table)) > tfoot > tr > :is(th,td) {background:var(--bdg-table-head)!important;font-weight:600!important;}
  body:is([data-page],[data-bdg-table-theme]) table:not(:where(.flatpickr-calendar table,.ui-datepicker-calendar,.calendar table,[role="presentation"],[data-print-root] table,.print-only table)) [data-bdg-selection-cell] {width:36px!important;min-width:36px!important;max-width:36px!important;padding:6px!important;}
  body:is([data-page],[data-bdg-table-theme]) table:not(:where(.flatpickr-calendar table,.ui-datepicker-calendar,.calendar table,[role="presentation"],[data-print-root] table,.print-only table)) input[type=checkbox] {accent-color:var(--bdg-table-accent);}
  body:is([data-page],[data-bdg-table-theme]) :is([data-bdg-list-filters],[data-bdg-list-toolbar],table) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]):not([type=color]):not([type=file]):not([type=submit]):not([type=button]),select,textarea) {background:#fff!important;border:1px solid var(--bdg-table-control-border)!important;border-radius:8px!important;color:var(--bdg-table-ink)!important;box-shadow:none!important;}
  body:is([data-page],[data-bdg-table-theme]) :is([data-bdg-list-filters],[data-bdg-list-toolbar]) :is(input,select):not([type=checkbox]):not([type=radio]):not([type=hidden]) {min-height:38px!important;padding:8px 12px!important;}
  body:is([data-page],[data-bdg-table-theme]) table:not(:where(.flatpickr-calendar table,.ui-datepicker-calendar,.calendar table,[role="presentation"],[data-print-root] table,.print-only table)) :is(.crm-row-action-select,.contact-row-action-select,.sales-row-action-select) {min-height:32px!important;border-radius:8px!important;}
  body:is([data-page],[data-bdg-table-theme]) :is([data-bdg-list-actions],.contacts-heading-actions,[data-bdg-list-filters]) :is(.crm-toolbar-primary-action,.contacts-create-action,.companies-new-button,button[type=submit]) {background:var(--bdg-table-selected)!important;border-color:#dbe8ff!important;color:#1248b8!important;-webkit-text-fill-color:#1248b8!important;box-shadow:none!important;}
  body:is([data-page],[data-bdg-table-theme]) [data-bdg-list-title] {color:var(--bdg-table-ink)!important;}
  body:is([data-page],[data-bdg-table-theme]) :is([data-bdg-list-toolbar],[data-bdg-list-filters],table) :is(button,a,input,select,textarea):focus-visible {outline:2px solid var(--bdg-table-accent)!important;outline-offset:2px!important;}
  @media(max-width:767px) {body:is([data-page],[data-bdg-table-theme]) table:not(:where(.flatpickr-calendar table,.ui-datepicker-calendar,.calendar table,[role="presentation"],[data-print-root] table,.print-only table)) > :is(thead,tbody,tfoot) > tr > :is(th,td) {padding:9px 10px!important;}body:is([data-page],[data-bdg-table-theme]) [data-bdg-list-filters] :is(input,select) {font-size:16px!important;min-height:44px!important;}}
 }
}

/* One density for every data table, including configuration and dialog tables. */
@layer bdg-premium-tables {
 @media screen and (min-width:768px) {
body:is([data-page],[data-bdg-table-theme]) table:not(:where(.flatpickr-calendar table,.ui-datepicker-calendar,.calendar table,[role="presentation"],[data-print-root] table,.print-only table)) > :is(thead,tbody,tfoot) > tr > :is(th,td) {padding:4px 12px!important;line-height:17px!important;vertical-align:middle!important;}
body:is([data-page],[data-bdg-table-theme]) table:not(:where(.flatpickr-calendar table,.ui-datepicker-calendar,.calendar table,[role="presentation"],[data-print-root] table,.print-only table)) > thead > tr > :is(th,td) {height:38px!important;font-size:12px!important;background:var(--bdg-table-head)!important;color:var(--bdg-table-ink)!important;}
body:is([data-page],[data-bdg-table-theme]) table:not(:where(.flatpickr-calendar table,.ui-datepicker-calendar,.calendar table,[role="presentation"],[data-print-root] table,.print-only table)) > tbody > tr > :is(th,td) {height:30px!important;font-size:12px!important;border-bottom-color:var(--bdg-table-line)!important;}
body:is([data-page],[data-bdg-table-theme]) table:not(:where(.flatpickr-calendar table,.ui-datepicker-calendar,.calendar table,[role="presentation"],[data-print-root] table,.print-only table)) > tbody > tr {height:auto!important;}
body:is([data-page],[data-bdg-table-theme]) table:not(:where(.flatpickr-calendar table,.ui-datepicker-calendar,.calendar table,[role="presentation"],[data-print-root] table,.print-only table)) :is(.crm-row-action-select,.contact-row-action-select,.sales-row-action-select) {height:30px!important;min-height:30px!important;line-height:16px!important;padding:4px 24px 4px 10px!important;border-radius:7px!important;font-size:11px!important;}
body:is([data-page],[data-bdg-table-theme]) table:not(:where(.flatpickr-calendar table,.ui-datepicker-calendar,.calendar table,[role="presentation"],[data-print-root] table,.print-only table)) td > :is(p,div) {line-height:17px!important;}
body:is([data-page],[data-bdg-table-theme]) table:not(:where(.flatpickr-calendar table,.ui-datepicker-calendar,.calendar table,[role="presentation"],[data-print-root] table,.print-only table)) td :is(.text-xs,.text-sm,.text-\[11px\],.text-\[10px\]) {line-height:16px!important;}
body:is([data-page],[data-bdg-table-theme]) table:not(:where(.flatpickr-calendar table,.ui-datepicker-calendar,.calendar table,[role="presentation"],[data-print-root] table,.print-only table)) td [class*="mt-"] {margin-top:2px!important;}
body:is([data-page],[data-bdg-table-theme]) table:not(:where(.flatpickr-calendar table,.ui-datepicker-calendar,.calendar table,[role="presentation"],[data-print-root] table,.print-only table)) td [data-bdg-selection-cell] {padding:4px!important;}
 body:is([data-page],[data-bdg-table-theme]) #productsListTable td:first-of-type {white-space:nowrap!important;}
 body:is([data-page],[data-bdg-table-theme]) #productsListTable td:nth-child(2) {white-space:nowrap!important;}
 }
 @media screen and (max-width:767px) {
body:is([data-page],[data-bdg-table-theme]) table:not(:where(.flatpickr-calendar table,.ui-datepicker-calendar,.calendar table,[role="presentation"],[data-print-root] table,.print-only table)) > :is(thead,tbody,tfoot) > tr > :is(th,td) {padding:6px 8px!important;line-height:18px!important;}
 }
}

@layer bdg-premium-tables {@media screen {
body:is([data-page],[data-bdg-table-theme]) #payablesListTable{min-width:1320px!important;table-layout:auto!important}
body:is([data-page],[data-bdg-table-theme]) #payablesListTable td{white-space:nowrap!important}
body:is([data-page],[data-bdg-table-theme]) #payablesListTable td:nth-child(3){min-width:250px!important}
body:is([data-page],[data-bdg-table-theme]) #payablesListTable .payable-row-tools{min-width:75px!important;margin:0!important;border:0!important;background:none!important;padding:0!important}
body:is([data-page],[data-bdg-table-theme]) #payablesListTable .payable-row-tools>summary{cursor:pointer!important;display:list-item!important;color:#356c97!important;font-size:11px!important;padding:4px 8px!important;border:1px solid #dbe6ef!important;border-radius:4px!important;background:#fff!important;min-height:26px!important;white-space:nowrap!important}
body:is([data-page],[data-bdg-table-theme]) #payablesListTable .payable-row-tools:not([open])>div{display:none!important}
body:is([data-page],[data-bdg-table-theme]) #payablesListTable .payable-row-tools[open]>div{width:380px!important;max-width:85vw!important;margin-top:5px!important;padding:8px!important}
}}

@layer bdg-premium-tables {@media screen and (min-width:768px){
body:is([data-page],[data-bdg-table-theme]) #productsListTable td select{height:30px!important;min-height:30px!important;line-height:16px!important;padding:4px 22px 4px 10px!important;border-radius:7px!important;font-size:11px!important}
body:is([data-page],[data-bdg-table-theme]) #productsListTable .products-stock-pill{height:20px!important;min-height:20px!important;line-height:16px!important;padding:2px 6px!important;white-space:nowrap!important;width:auto!important;min-width:60px!important}
body:is([data-page],[data-bdg-table-theme]) #salesHistoryTable :is(.sales-status-pill,.sales-origin-pill,.sales-production-chip,.sales-fiscal-flag){height:22px!important;min-height:22px!important;line-height:16px!important;padding:2px 7px!important}
}}

/* Shared chrome. No column widths, display modes, handlers or business states change. */
@layer bdg-premium-tables {
 @media screen {
  body:is([data-page],[data-bdg-table-theme]) [data-bdg-list-surface] {
   background:#fff!important;border:0!important;border-radius:0!important;
   padding:0!important;box-shadow:none!important;
  }
  body:is([data-page],[data-bdg-table-theme]) [data-bdg-table-scroll] {
   background:#fff!important;border:0!important;border-radius:0!important;box-shadow:none!important;scrollbar-color:#c8d5eb #f6f8fc;
  }
  body:is([data-page],[data-bdg-table-theme]) [data-bdg-list-heading] {gap:12px 20px!important;}
  body:is([data-page],[data-bdg-table-theme]) [data-bdg-list-title] {
   color:var(--bdg-table-ink)!important;font-size:23px!important;font-weight:750!important;
   letter-spacing:-.6px!important;line-height:1.25!important;
  }
  body:is([data-page],[data-bdg-table-theme]) :is([data-bdg-list-count],[data-bdg-list-count-static],.contacts-header-count) {
   background:var(--bdg-table-selected)!important;color:#34517d!important;border-radius:6px!important;
   padding:5px 9px!important;font-size:11px!important;font-weight:500!important;
  }
  body:is([data-page],[data-bdg-table-theme]) :is([data-bdg-list-filters],[data-bdg-list-toolbar]) :is(input,select):not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=submit]):not([type=button]) {
   min-height:42px!important;border-radius:10px!important;font-size:13px!important;
  }
  body:is([data-page],[data-bdg-table-theme]) [data-bdg-list-search-field] > :is(input[type=text],input[type=search]) {padding-left:36px!important;}
  body:is([data-page],[data-bdg-table-theme]) :is([data-bdg-list-actions],.contacts-heading-actions,[data-bdg-list-filters]) :is(a,button):not(.hidden):not([hidden]) {
   min-height:42px!important;padding:10px 14px!important;border-radius:10px!important;
   border:1px solid var(--bdg-table-control-border)!important;box-shadow:0 2px 5px #172b4d05!important;
   font-size:13px!important;font-weight:600!important;
  }
  body:is([data-page],[data-bdg-table-theme]) :is([data-bdg-list-actions],.contacts-heading-actions) :is(.crm-toolbar-primary-action,.contacts-create-action,.companies-new-button,.products-new-product-action) {
   background:var(--bdg-table-accent)!important;border-color:var(--bdg-table-accent)!important;color:#fff!important;
   -webkit-text-fill-color:#fff!important;box-shadow:0 3px 8px #155eef20!important;
  }
  body:is([data-page],[data-bdg-table-theme]) :is([data-bdg-list-actions],.contacts-heading-actions) :is(.crm-toolbar-primary-action,.contacts-create-action,.companies-new-button,.products-new-product-action) :is(span,svg) {color:inherit!important;-webkit-text-fill-color:currentColor!important;}
  body:is([data-page],[data-bdg-table-theme]) :is([data-bdg-list-actions],.contacts-heading-actions) :is(.crm-toolbar-primary-action,.contacts-create-action,.companies-new-button,.products-new-product-action):hover {background:#1248b8!important;}
  body:is([data-page],[data-bdg-table-theme]) table:not(:where(.flatpickr-calendar table,.ui-datepicker-calendar,.calendar table,[role="presentation"],[data-print-root] table,.print-only table)) > thead > tr > :is(th,td) {
   height:38px!important;font-weight:650!important;
  }
  body:is([data-page],[data-bdg-table-theme]) table:not(:where(.flatpickr-calendar table,.ui-datepicker-calendar,.calendar table,[role="presentation"],[data-print-root] table,.print-only table)) > thead > tr:first-child > :is(th,td):first-child {border-radius:9px 0 0 9px!important;}
  body:is([data-page],[data-bdg-table-theme]) table:not(:where(.flatpickr-calendar table,.ui-datepicker-calendar,.calendar table,[role="presentation"],[data-print-root] table,.print-only table)) > thead > tr:first-child > :is(th,td):last-child {border-radius:0 9px 9px 0!important;}
  body:is([data-page],[data-bdg-table-theme]) table :is(.crm-sort-button,.crm-sort-button-label) {font-size:12px!important;font-weight:650!important;color:inherit!important;}
  body:is([data-page],[data-bdg-table-theme]) table :is(.crm-row-primary,.contact-row-primary,.products-name-text) {font-size:13px!important;font-weight:650!important;line-height:1.35!important;}
  body:is([data-page],[data-bdg-table-theme]) table :is(.crm-row-secondary,.crm-row-muted,.contact-row-secondary) {font-size:11px!important;line-height:1.35!important;}
  body:is([data-page],[data-bdg-table-theme]) table td[data-bdg-column-role=code] {color:#53647e!important;font-size:12px!important;}
  body:is([data-page],[data-bdg-table-theme]) table td[data-bdg-column-role=number] {font-variant-numeric:tabular-nums;font-weight:600!important;}
  body:is([data-page],[data-bdg-table-theme]) table :is(.crm-row-action-select,.contact-row-action-select,.sales-row-action-select,.oq-row-actions,[data-product-action-select]) {
   background-color:#fff!important;border:1px solid var(--bdg-table-control-border)!important;border-radius:7px!important;
   color:var(--bdg-table-ink)!important;font-size:11px!important;font-weight:600!important;
   min-height:30px!important;box-shadow:0 2px 4px #172b4d05!important;
  }
  body:is([data-page],[data-bdg-table-theme]) table input[type=checkbox] {accent-color:var(--bdg-table-accent)!important;}
  body:is([data-page],[data-bdg-table-theme]) table > tbody > tr:is([aria-selected=true],[data-receipt-selected="1"]):not(.sales-row-cancelled) > :is(th,td),
  body:is([data-page],[data-bdg-table-theme]) table > tbody > tr:has(:is([data-bdg-row-select],[data-grid-select],[data-contact-select],[data-sale-select],[data-bdg-selection-cell] input[type=checkbox]):checked):not(.sales-row-cancelled) > :is(th,td) {background:var(--bdg-table-selected)!important;}
  body:is([data-page],[data-bdg-table-theme]) table > tbody > tr:has(:is([data-bdg-row-select],[data-grid-select],[data-contact-select],[data-sale-select],[data-bdg-selection-cell] input[type=checkbox]):checked):not(.sales-row-cancelled) > :is(th,td):first-child {box-shadow:inset 3px 0 var(--bdg-table-accent)!important;}
  body:is([data-page],[data-bdg-table-theme]) #contacts-directory-header h2[data-bdg-table-illustration] {background-image:none!important;padding-left:0!important;}
  /* Preserve the explicit cancellation state over hover/selection and older CSS layers. */
  body:is([data-page],[data-bdg-table-theme]) #salesHistoryTable > tbody > tr.sales-row-cancelled > td {
   background:#fff1f2!important;color:#9f1239!important;border-bottom-color:#fecdd3!important;
  }
  body:is([data-page],[data-bdg-table-theme]) #salesHistoryTable > tbody > tr.sales-row-cancelled:is(:hover,:focus-within) > td {background:#ffe4e6!important;}
  body:is([data-page],[data-bdg-table-theme]) #salesHistoryTable > tbody > tr.sales-row-cancelled > td:first-child {box-shadow:inset 4px 0 #e11d48!important;}
  body:is([data-page],[data-bdg-table-theme]) #salesHistoryTable tr.sales-row-cancelled :is(.crm-row-primary,.crm-row-secondary,.crm-row-muted) {color:#9f1239!important;-webkit-text-fill-color:currentColor!important;}
  body:is([data-page],[data-bdg-table-theme]) :is(.sales-pagination,.accounts-pagination,.products-table-caption) a {border-radius:7px!important;border-color:var(--bdg-table-control-border)!important;}
  body:is([data-page],[data-bdg-table-theme]) :is(table,[data-bdg-list-toolbar],[data-bdg-list-filters],[data-bdg-list-actions]) :is(a,button,input,select,textarea):focus-visible {outline:2px solid var(--bdg-table-accent)!important;outline-offset:3px!important;}
  @media(max-width:767px) {
   body:is([data-page],[data-bdg-table-theme]) [data-bdg-list-surface] {padding:0!important;border-radius:0!important;}
   body:is([data-page],[data-bdg-table-theme]) [data-bdg-list-title] {font-size:21px!important;}
   body:is([data-page],[data-bdg-table-theme]) :is([data-bdg-list-filters],[data-bdg-list-toolbar]) :is(input,select):not([type=checkbox]):not([type=radio]):not([type=hidden]) {font-size:16px!important;min-height:44px!important;}
   body:is([data-page],[data-bdg-table-theme]) :is([data-bdg-list-actions],.contacts-heading-actions,[data-bdg-list-filters]) :is(a,button):not(.hidden):not([hidden]) {min-height:44px!important;}
  }
 }
}

/* Existing module icons retain their own visibility and spacing. */
@layer bdg-universal-tables { @media screen {
  body:is([data-page],[data-bdg-table-theme]) [data-bdg-table-illustration] {padding-left:43px!important;background-image:var(--bdg-table-illustration)!important;background-repeat:no-repeat!important;background-position:left center!important;background-size:32px 32px!important;min-height:34px!important;display:flex;align-items:center;}
  body:is([data-page],[data-bdg-table-theme]) [data-bdg-action-illustration] {padding-left:33px!important;background-image:var(--bdg-action-illustration)!important;background-repeat:no-repeat!important;background-position:10px center!important;background-size:17px 17px!important;}
}}

@layer bdg-premium-tables { @media screen {
 body:is([data-page],[data-bdg-table-theme]) :is(.crm-toolbar-primary-action,.contacts-create-action,.companies-new-button,.products-new-product-action):not(.hidden):not([hidden]) {
  background:var(--bdg-table-accent)!important;border:1px solid var(--bdg-table-accent)!important;color:#fff!important;-webkit-text-fill-color:#fff!important;
  min-height:42px!important;height:auto!important;max-height:none!important;padding:10px 16px!important;border-radius:10px!important;
  font-size:13px!important;font-weight:650!important;box-shadow:0 3px 8px #155eef20!important;
 }
 body:is([data-page],[data-bdg-table-theme]) :is(.crm-toolbar-primary-action,.contacts-create-action,.companies-new-button,.products-new-product-action):not(.hidden):not([hidden]) :is(span,svg) {color:inherit!important;-webkit-text-fill-color:currentColor!important;}
 body:is([data-page],[data-bdg-table-theme]) :is(.crm-toolbar-primary-action,.contacts-create-action,.companies-new-button,.products-new-product-action):not(.hidden):not([hidden]):hover {background:#1248b8!important;}
}}

/* A continuous workspace, without nested card frames around spreadsheets. */
@layer bdg-premium-tables {
 @media screen {
  body:is([data-page],[data-bdg-table-theme]) :is(main,[data-app-page-content]):has(table) {
   background:#fff!important;background-image:none!important;border:0!important;box-shadow:none!important;border-radius:0!important;
  }
  body:is([data-page],[data-bdg-table-theme]) :where(main,[data-app-page-content],dialog,[role=dialog]) :is(section,article,div,form):has(table):not(:where(table *,[role=dialog],[aria-modal=true],.fixed,[class*="overlay"],[class*="modal"],[data-print-root],.print-only)) {
   border:0!important;border-radius:0!important;box-shadow:none!important;
  }
  body:is([data-page],[data-bdg-table-theme]) :is(.erp-beauty,.crm-panel,.crm-sheet,.products-sheet,.products-list-section,.sales-history-shell,.table-wrap,.table-scroll,.erp-grid-scroll,[data-bdg-list-surface],[data-bdg-table-scroll]):has(table) {
   background:#fff!important;background-image:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;
  }
  /* Column headings in legacy tables without a thead. */
  body:is([data-page],[data-bdg-table-theme]) table:not(:where(.flatpickr-calendar table,.ui-datepicker-calendar,.calendar table,[role=presentation],[data-print-root] table)) > tbody > tr:first-child:not(:has(td)) > th {
   background:var(--bdg-table-head)!important;color:var(--bdg-table-ink)!important;font-weight:650!important;height:38px!important;
  }
  /* Semantic grids use the same model without changing their layout or keyboard logic. */
  body:is([data-page],[data-bdg-table-theme]) :is([role=grid],[role=table]):not(:where(table,.calendar *,[aria-roledescription=calendar],.flatpickr-calendar *)) {
   color:var(--bdg-table-ink)!important;border:0!important;box-shadow:none!important;font-variant-numeric:tabular-nums;
  }
  body:is([data-page],[data-bdg-table-theme]) :is([role=grid],[role=table]):not(:where(table,.calendar *,[aria-roledescription=calendar],.flatpickr-calendar *)) [role=columnheader] {
   background:var(--bdg-table-head)!important;color:var(--bdg-table-ink)!important;
   border:0!important;border-bottom:1px solid var(--bdg-table-line)!important;padding:9px 12px!important;font-size:12px!important;font-weight:650!important;
  }
  body:is([data-page],[data-bdg-table-theme]) :is([role=grid],[role=table]):not(:where(table,.calendar *,[aria-roledescription=calendar],.flatpickr-calendar *)) :is([role=cell],[role=gridcell]) {
   border:0!important;border-bottom:1px solid var(--bdg-table-line)!important;padding:6px 12px!important;font-size:12px!important;line-height:1.4!important;
  }
  body:is([data-page],[data-bdg-table-theme]) :is([role=grid],[role=table]) [role=row][aria-selected=true] > :is([role=cell],[role=gridcell]) {background:var(--bdg-table-selected)!important;}
 }
}
