/* Canonical cross-site UI overrides. Keep runtime copies in sync with Sync-UiAssets.ps1. */
:root{
  --ui-control-radius:10px;
  --ui-control-radius-sm:8px;
  --ui-table-head-bg:rgba(15,23,42,.97);
  --ui-table-hover:rgba(255,255,255,.055);
  --ui-sticky-bg:rgba(15,23,42,.96);
}

/* Commands are rectangular; pills remain reserved for status, tags and filters. */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:38px;
  border-radius:var(--ui-control-radius);
  line-height:1.2;
  text-align:center;
  vertical-align:middle;
  letter-spacing:0;
}
.btn.small,.btn.sm{
  min-height:34px;
  border-radius:var(--ui-control-radius-sm);
}
.btn.secondary,.btn.ghost{
  background:rgba(255,255,255,.075);
  border-color:rgba(255,255,255,.16);
}
.btn.danger{
  color:rgba(255,235,235,.96);
  background:rgba(255,88,88,.14);
  border-color:rgba(255,88,88,.34);
}
.btn:disabled,.btn[aria-disabled="true"]{
  cursor:not-allowed;
  opacity:.5;
  transform:none;
}
.toolbar .sb-link,
.orders-tools .sb-link{
  min-height:38px;
  border-radius:var(--ui-control-radius);
  font-weight:600;
  background:rgba(255,255,255,.075);
}

/* Sticky surfaces avoid backdrop compositing seams in Chromium browsers. */
.toolbar--sticky,
.sticky-actions{
  background:var(--ui-sticky-bg);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}

/* Shared operational table behavior. */
.table-wrap,.data-table-wrap{
  width:100%;
  max-width:100%;
  overflow:auto;
  overscroll-behavior-inline:contain;
  scrollbar-gutter:stable;
}
.table-wrap > table,.data-table-wrap > table{
  display:table;
  width:100%;
  min-width:680px;
  overflow:visible;
  font-variant-numeric:tabular-nums;
}
.table-wrap > table thead th,
.data-table-wrap > table thead th{
  position:sticky;
  top:0;
  z-index:2;
  white-space:nowrap;
  background:var(--ui-table-head-bg);
  box-shadow:inset 0 -1px 0 rgba(255,255,255,.12);
}
.table-wrap > table tbody tr,
.data-table-wrap > table tbody tr{
  transition:background-color .12s ease;
}
.table-wrap > table tbody tr:hover td,
.data-table-wrap > table tbody tr:hover td{
  background-color:var(--ui-table-hover);
}
.table-wrap .num,.data-table-wrap .num{
  text-align:right;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
.table-wrap .table-actions,.data-table-wrap .table-actions{
  position:sticky;
  right:0;
  min-width:112px;
  box-shadow:-10px 0 18px rgba(0,0,0,.16);
}
.table-wrap th.table-actions,.data-table-wrap th.table-actions{
  z-index:3;
  background:var(--ui-table-head-bg);
}
.table-wrap td.table-actions,.data-table-wrap td.table-actions{
  z-index:1;
  background:rgba(24,32,46,.98);
}

@media(max-width:1100px){
  .table-wrap > table,.data-table-wrap > table{min-width:760px}
}
@media(max-width:860px){
  .toolbar{align-items:stretch}
  .toolbar .toolbar-mid,.toolbar .toolbar-right{width:100%}
  .toolbar .toolbar-right{justify-content:flex-start;margin-left:0}
  .table-wrap > table,.data-table-wrap > table{min-width:680px}
}
@media(max-width:640px){
  .btn{min-height:36px;padding:9px 11px}
  .toolbar .sb-link,.orders-tools .sb-link{min-height:36px}
}
