/* Compact detail table; only its body scrolls. */
#commerceModal:has(.sy-records-dialog){padding:20px}
.sy-admin #commerceModal .commerce-modal.sy-records-dialog{
  box-sizing:border-box;display:flex;flex-direction:column;width:1240px!important;max-width:calc(100vw - 40px)!important;
  height:auto!important;max-height:min(84dvh,850px)!important;min-height:0;padding:0;overflow:hidden;
  border:1px solid var(--sy-border,#e6eaf1);border-radius:12px;background:var(--sy-surface,#fff);color:var(--sy-text,#303849)
}
.sy-admin #commerceModal .sy-records-dialog>.modal-h{flex:none;padding:15px 20px;min-width:0}
.sy-admin #commerceModal .sy-records-dialog>.modal-b{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;min-width:0;overflow:hidden;padding:16px 20px}
#commerceModal .an-record-view{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;min-width:0;gap:12px}
#commerceModal .an-record-view *{box-sizing:border-box}
#commerceModal .an-record-view .an-detail-toolbar{flex:none;gap:12px;margin:0}
#commerceModal .an-record-view .an-detail-toolbar>div{min-width:0}
#commerceModal .an-record-view .an-detail-toolbar p{overflow-wrap:anywhere}
#commerceModal .an-record-view .an-detail-toolbar strong{font-size:18px;line-height:26px;font-variant-numeric:tabular-nums}
#commerceModal .an-record-filters{display:flex;flex:none;gap:12px;align-items:center}
#commerceModal .an-record-filters label{display:flex;align-items:center;gap:8px;min-width:0;color:var(--sy-text-secondary,#647187);font-size:12px}
#commerceModal .an-record-filters .an-record-search{flex:1;min-width:140px}
#commerceModal .an-record-search .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
#commerceModal .an-record-filters input,#commerceModal .an-record-filters select{margin:0;min-height:34px;border:1px solid var(--sy-border,#e6eaf1);border-radius:6px;padding:6px 10px;background:var(--sy-surface,#fff);color:var(--sy-text,#303849);font:inherit;max-width:100%}
#commerceModal .an-record-search input{width:100%}
#commerceModal .an-record-result{flex:none;font-size:11px;color:var(--sy-muted,#7e899b);margin:0;font-variant-numeric:tabular-nums}
#commerceModal .an-record-scroll{position:relative;flex:1 1 auto;max-height:min(49dvh,500px);min-height:0;min-width:0;width:100%;overflow:auto;overscroll-behavior:contain;border:1px solid var(--sy-border,#e6eaf1);border-radius:8px;scrollbar-width:thin}
.sy-admin #commerceModal table.an-record-table{width:100%;min-width:1130px;table-layout:fixed;border-collapse:separate!important;border-spacing:0;margin:0;background:var(--sy-surface,#fff);font-size:var(--sy-body-size,13px)}
.sy-admin #commerceModal table.an-record-table :is(th,td){max-width:none;padding:10px 12px!important;height:auto;border:0!important;border-bottom:1px solid var(--sy-border,#e6eaf1)!important;vertical-align:middle;text-align:left;color:var(--sy-text,#303849);background:var(--sy-surface,#fff);font-family:inherit;font-size:13px!important;line-height:20px!important;white-space:normal;overflow-wrap:anywhere}
.sy-admin #commerceModal table.an-record-table th{position:sticky;top:0;z-index:2;background:var(--sy-surface-alt,#f7f9fc);color:var(--sy-text-secondary,#647187);font-size:12px!important;font-weight:500;white-space:nowrap}
.sy-admin #commerceModal table.an-record-table tbody tr:hover td{background:color-mix(in srgb,var(--sy-primary,#6175fc) 4%,var(--sy-surface,#fff))}
.sy-admin #commerceModal table.an-record-table :is(th,td):is(:nth-child(5),:nth-child(6)){text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.sy-admin #commerceModal table.an-record-table .an-record-number{font-weight:550;color:var(--sy-primary,#6175fc)}
.sy-admin #commerceModal table.an-record-table .an-record-cost{font-weight:400;color:var(--sy-text-secondary,#647187)}
.sy-admin #commerceModal table.an-record-table small{display:block;margin-top:3px;color:var(--sy-muted,#7e899b);font-size:11px!important;line-height:17px!important;word-break:normal;overflow-wrap:anywhere}
.sy-admin #commerceModal table.an-record-table .an-record-code{word-break:normal;font-size:11px!important;font-variant-numeric:tabular-nums}
.sy-admin #commerceModal table.an-record-table .an-record-empty{text-align:center!important;padding:36px 16px!important;color:var(--sy-muted,#7e899b)}
#commerceModal .an-record-pagination{display:flex;flex:none;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:11px;color:var(--sy-text-secondary,#647187)}
#commerceModal .an-record-pagination>div{display:flex;gap:7px}
#commerceModal .an-record-view button.ghost-btn{width:auto;min-height:32px;padding:5px 10px;margin:0;white-space:nowrap;font-size:12px;line-height:20px;flex:none}
#commerceModal .an-record-view button:disabled{opacity:.45;cursor:default}
#commerceModal .an-record-definition{flex:none;margin:0;color:var(--sy-muted,#7e899b);font-size:11px;line-height:1.8}
#commerceModal .an-record-definition summary{width:fit-content;cursor:pointer}
#commerceModal .an-record-definition p{margin:7px 0 0;max-height:80px;overflow:auto}
#commerceModal .an-record-view :is(button,input,select,summary,[tabindex]):focus-visible{outline:2px solid var(--sy-primary,#6175fc);outline-offset:2px}
@media(max-width:700px){
  #commerceModal:has(.sy-records-dialog){padding:10px}
  .sy-admin #commerceModal .commerce-modal.sy-records-dialog{max-width:calc(100vw - 20px)!important;max-height:90dvh!important}
  .sy-admin #commerceModal .sy-records-dialog>.modal-h{padding:13px 14px}
  .sy-admin #commerceModal .sy-records-dialog>.modal-b{padding:13px 14px}
  #commerceModal .an-record-filters{flex-wrap:wrap;gap:8px}
  #commerceModal .an-record-search{flex-basis:100%!important}
  #commerceModal .an-record-filters label:not(.an-record-search){width:100%}
  #commerceModal .an-record-filters label:not(.an-record-search) :is(select,.sy-select-wrap){flex:1;min-width:0}
  #commerceModal .an-record-scroll{max-height:43dvh}
}
