.workbench-grid {
  --wg-border: #c9d2dc;
  --wg-ink: #24313c;
  --wg-muted: #4e5d69;
  --wg-focus: #087f8c;
  --wg-accent: #e6f3ef;
  color: var(--wg-ink);
  background: #fff;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  container-type: inline-size;
  font: 13px/1.4 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
}

.workbench-grid *, .workbench-grid *::before, .workbench-grid *::after { box-sizing: border-box; letter-spacing: 0; }
.workbench-grid [hidden] { display: none !important; }
.workbench-grid .wg-toolbar, .workbench-grid .wg-views, .workbench-grid .wg-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 8px;
  border-bottom: 1px solid var(--wg-border);
  min-width: 0;
  max-width: 100%;
}
.workbench-grid .wg-toolbar { background: #f5f7f8; }
.workbench-grid .wg-toolbar > select { width:110px; flex:0 0 110px; }
.workbench-grid .wg-active-filters { display:flex; flex-wrap:wrap; gap:6px; padding:8px; border-bottom:1px solid var(--wg-border); background:#fafcfc; }
.workbench-grid .wg-active-filters button { max-width:100%; overflow-wrap:anywhere; text-align:left; }
.workbench-grid .wg-active-filters button:not(:last-child) { background:#e6f3ef; border-color:#9bbfb2; }
.workbench-grid[data-grid-density="comfortable"] tbody td { padding-top:12px; padding-bottom:12px; }
.workbench-grid .wg-column-list > input, .workbench-grid .wg-choices > input { width:100%; margin-bottom:6px; }
.workbench-grid .wg-views { padding-top: 6px; padding-bottom: 6px; }
.workbench-grid label { display: flex; align-items: center; gap: 6px; margin: 0; min-width: 0; font-size: inherit; font-weight: 400; }
.workbench-grid button, .workbench-grid select, .workbench-grid input, .workbench-grid summary {
  font: inherit;
  color: var(--wg-ink);
  min-height: 30px;
  min-width: 24px;
  max-width: 100%;
  border-radius: 4px;
  margin: 0;
}
.workbench-grid button, .workbench-grid select, .workbench-grid input:not([type="checkbox"]) {
  border: 1px solid var(--wg-border);
  background: #fff;
  padding: 4px 7px;
}
.workbench-grid button { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.workbench-grid button:hover:not(:disabled), .workbench-grid summary:hover { background: #edf4f2; border-color: #55786f; }
.workbench-grid button:disabled { opacity: 0.5; cursor: default; }
.workbench-grid :is(button, input, select, summary, a, [tabindex]):focus-visible { outline: 3px solid var(--wg-focus); outline-offset: 2px; }
.workbench-grid input[type="checkbox"] { width: 24px; height: 24px; min-height: 24px; flex: 0 0 24px; accent-color: #17654f; cursor: pointer; }
.workbench-grid .wg-icon { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; flex: 0 0 16px; font-size: 17px; line-height: 1; }
.workbench-grid .wg-icon svg, .workbench-grid .wg-icon i { width: 16px; height: 16px; }
.workbench-grid .wg-button { width: 30px; height: 30px; min-width: 30px; flex: 0 0 30px; padding: 5px; }
.workbench-grid .wg-search { position: relative; flex: 1 1 180px; max-width: 360px; }
.workbench-grid .wg-search > .wg-icon { position: absolute; left: 8px; pointer-events: none; }
.workbench-grid .wg-search input { width: 100%; padding-left: 30px; }
.workbench-grid .wg-export, .workbench-grid .wg-footer nav { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.workbench-grid .wg-export { margin-left: auto; }
.workbench-grid .wg-export > span { color: var(--wg-muted); }
.workbench-grid .wg-group-select select { width: 150px; }
.workbench-grid .wg-views > select, .workbench-grid .wg-views > input { width: 170px; }
.workbench-grid .wg-command { white-space: normal; text-align: left; margin-left: auto; }
.workbench-grid details { margin: 0; min-width: 0; }
.workbench-grid summary { cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid var(--wg-border); padding: 4px 7px; background: #fff; list-style: none; }
.workbench-grid summary::-webkit-details-marker { display: none; }
.workbench-grid details[open] > summary { background: var(--wg-accent); border-color: #55786f; }
.workbench-grid .wg-columns { position: relative; }
.workbench-grid .wg-column-list { position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; width: min(400px, 90cqw); max-height: 360px; overflow: auto; background: #fff; border: 1px solid var(--wg-border); padding: 6px; box-shadow: 0 5px 16px #24313c26; }
.workbench-grid .wg-column-setting { display: grid; grid-template-columns: minmax(60px, 1fr) 30px 30px 80px; gap: 5px; padding: 4px 0; align-items: center; }
.workbench-grid .wg-column-setting span { overflow-wrap: anywhere; }
.workbench-grid .wg-column-setting select { width: 80px; padding-left: 3px; }
.workbench-grid .wg-scroll { overflow: auto; width: 100%; min-width: 0; max-width: 100%; max-height: min(68vh, 720px); min-height: 230px; overscroll-behavior: contain; scrollbar-width: thin; border-bottom: 1px solid var(--wg-border); }
.workbench-grid table { border-collapse: separate; border-spacing: 0; table-layout: fixed; width: max-content; min-width: 100%; margin: 0; }
.workbench-grid th, .workbench-grid td { padding: 5px 8px; border: 0; border-bottom: 1px solid #e1e6eb; color: var(--wg-ink); vertical-align: middle; text-align: left; font-size: 13px; font-weight: 400; text-transform: none; }
.workbench-grid thead { position: sticky; top: 0; z-index: 2; }
.workbench-grid thead th { background: #edf1f4; font-weight: 600; }
.workbench-grid .wg-filters th { background: #f6f8fa; padding-top: 4px; padding-bottom: 4px; }
.workbench-grid .wg-sort { border: 0; padding: 2px 0; border-radius: 0; width: 100%; min-height: 28px; background: transparent; justify-content: space-between; text-align: left; font-weight: 600; }
.workbench-grid .wg-sort > span:first-child { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; word-break: normal; }
.workbench-grid .wg-filter { display: flex; align-items: center; gap: 4px; min-width: 0; }
.workbench-grid .wg-filter > input { width: 100%; min-width: 0; }
.workbench-grid .wg-filter details { position: relative; flex: 0 0 auto; }
.workbench-grid .wg-filter summary { padding: 4px; min-width: 30px; }
.workbench-grid .wg-choices { position: absolute; top: calc(100% + 4px); right: 0; z-index: 6; min-width: 170px; width: max-content; max-width: 280px; max-height: 180px; overflow: auto; padding: 6px; border: 1px solid var(--wg-border); background: #fff; box-shadow: 0 5px 16px #24313c26; }
.workbench-grid .wg-choices fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.workbench-grid .wg-choices legend { font-weight: 600; padding: 2px 4px; }
.workbench-grid .wg-choices label { padding: 3px 4px; }
.workbench-grid .wg-choices label span { overflow-wrap: anywhere; }
.workbench-grid .wg-cell { overflow-wrap: anywhere; max-height: 100px; overflow: auto; }
.workbench-grid .wg-cell pre { white-space: pre-wrap; margin: 0; }
.workbench-grid tbody tr:hover td { background: #f1f6f5; }
.workbench-grid tbody tr.wg-selected td { background: #e8f3ef; }
.workbench-grid .wg-select { width: 42px; min-width: 42px; max-width: 42px; padding: 4px 8px; }
.workbench-grid .wg-actions { width: 120px; min-width: 120px; max-width: 120px; }
.workbench-grid .wg-record-actions { display: flex; align-items: center; flex-wrap: nowrap; gap: 4px; max-width: 100%; overflow-x: auto; padding: 2px; }
.workbench-grid .wg-record-actions .table-actions { display: flex; align-items: center; flex-wrap: nowrap; gap: 4px; }
.workbench-grid .wg-record-actions button { min-width: 28px; min-height: 28px; padding: 3px 5px; }
.workbench-grid .wg-record-actions .icon-button { width: 28px; height: 28px; min-width: 28px; min-height: 28px; flex: 0 0 28px; padding: 4px; }
.workbench-grid .wg-record-actions .icon-button .lucide { width: 16px; height: 16px; flex: 0 0 16px; }
.workbench-grid .wg-group th { background: #e8eeeb; font-weight: 600; border-left: 3px solid #39705e; }
.workbench-grid .wg-group span { color: var(--wg-muted); }
.workbench-grid .wg-empty { padding: 30px 12px; color: var(--wg-muted); text-align: center; }
.workbench-grid .wg-footer { justify-content: flex-end; background: #f7f9fa; }
.workbench-grid .wg-footer > span { margin-right: auto; color: var(--wg-muted); }
.workbench-grid .wg-footer select { width: 72px; }
.workbench-grid .wg-error { color: #8f2118; background: #fff2f0; margin: 0; padding: 8px; border-bottom: 1px solid #d48b82; }
.workbench-grid .wg-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.workbench-grid .wg-w-80 { width: 80px; min-width: 80px; max-width: 80px; }
.workbench-grid .wg-w-120 { width: 120px; min-width: 120px; max-width: 120px; }
.workbench-grid .wg-w-160 { width: 160px; min-width: 160px; max-width: 160px; }
.workbench-grid .wg-w-200 { width: 200px; min-width: 200px; max-width: 200px; }
.workbench-grid .wg-w-240 { width: 240px; min-width: 240px; max-width: 240px; }
.workbench-grid .wg-w-320 { width: 320px; min-width: 320px; max-width: 320px; }
.workbench-grid .wg-w-480 { width: 480px; min-width: 480px; max-width: 480px; }
@container (max-width: 600px) {
  .workbench-grid .wg-search { max-width: none; flex-basis: 100%; }
  .workbench-grid .wg-columns { position: static; }
  .workbench-grid .wg-toolbar { position: relative; }
  .workbench-grid .wg-column-list { left: 8px; width: calc(100cqw - 16px); }
  .workbench-grid .wg-export { margin-left: 0; }
  .workbench-grid .wg-command { margin-left: 0; }
  .workbench-grid .wg-footer > span { flex-basis: 100%; }
}
@media (forced-colors: active) {
  .workbench-grid tbody tr.wg-selected td { border-bottom: 2px solid Highlight; }
  .workbench-grid :is(button, summary, input, select) { border-color: ButtonText; }
}
