.workbench { margin: 0 0 20px; padding: 20px; background: #fff; border-block: 1px solid #e2e8ef; min-width: 0; }
.workbench-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.workbench-header h2 { margin: 0; color: #243e53; font-size: 20px; }
.workbench-header > div { display: flex; flex-wrap: wrap; gap: 8px; }
.workbench button, .draft-item button, .draft-status-bar button, .draft-list + button { padding: 8px 14px; min-height: 40px; border: 1px solid #cddbe7; border-radius: 4px; background: #fff; color: #126dab; cursor: pointer; font: inherit; }
.workbench button:disabled { opacity: .55; cursor: default; }
.workbench-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-bottom: 1px solid #dce5ed; }
[data-agent-workbench] .workbench-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.workbench-tabs button { min-width: 0; padding: 12px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: #f7f9fb; color: #556879; text-align: left; }
.workbench-tabs button[aria-pressed="true"] { border-bottom-color: #1481ce; background: #eef7ff; color: #116196; }
.workbench-tabs button strong { display: block; margin-top: 8px; font-size: 26px; font-weight: 600; }
.workbench-items { min-width: 0; }
.workbench-item { display: grid; grid-template-columns: minmax(0, 2fr) minmax(120px, 1fr) auto; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid #edf0f3; }
.workbench-item strong { font-size: 16px; font-weight: 600; }
.workbench-item p { margin: 6px 0 0; color: #687b8c; font-size: 14px; }
.workbench-item > div { min-width: 0; overflow-wrap: anywhere; }
.workbench-empty { margin: 0; padding: 20px 0; color: #697c8c; font-size: 15px; }
.workbench-note, .draft-location { font-size: 14px; color: #746b48; background: #fcfaee; padding: 10px 12px; line-height: 1.6; }
.workbench-pages { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 12px; }
.draft-status-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 20px; background: #eff7fc; border-bottom: 1px solid #dfe8f0; }
.draft-status-bar span { flex: 1; min-width: 160px; color: #48677d; font-size: 14px; overflow-wrap: anywhere; }
.draft-item { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; border-bottom: 1px solid #dfe8ef; }
.draft-item > div { min-width: 0; }
.draft-item h3 { margin: 0 0 8px; font-size: 18px; overflow-wrap: anywhere; }
.draft-item p { margin: 0 0 8px; overflow-wrap: anywhere; }
.draft-item small { font-size: 14px; color: #6e7d89; }
.draft-item > div:last-child { display: flex; flex: 0 0 auto; gap: 8px; }
.record-mobile-toggle, .record-more { display: none; }
.record-desktop-actions { display: contents; }

@media (max-width: 760px) {
  .workbench { padding: 14px; margin-bottom: 12px; }
  .workbench-header { flex-wrap: wrap; gap: 10px; }
  .workbench-header h2 { font-size: 18px; }
  .workbench button, .draft-item button, .draft-status-bar button { min-height: 44px; }
  .workbench-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workbench-tabs button { padding: 10px 8px; font-size: 14px; overflow-wrap: anywhere; }
  .workbench-tabs button strong { font-size: 22px; }
  .workbench-item { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .workbench-item > div:first-child { grid-column: 1 / -1; }
  .draft-item { display: block; padding: 16px 0; }
  .draft-item > div:last-child { margin-top: 14px; }
  .draft-item button { flex: 1; }
  .draft-status-bar { padding: 12px; }
  .draft-status-bar span { flex: 1 0 100%; }
}

@media (max-width: 600px) {
  .agent-module-table tr:not(.record-expanded) td:not([data-mobile-summary]):not(.mobile-record-actions):not([colspan]),
  .channel-table tr:not(.record-expanded) td:not([data-mobile-summary]):not(.mobile-record-actions):not([colspan]) { display: none; }
  .mobile-record-actions .record-desktop-actions { display: none; }
  .mobile-record-actions .record-mobile-toggle { display: block; }
  .mobile-record-actions .record-more { display: block; flex: 1 0 100%; min-width: 0; }
  .record-more summary { display: list-item; cursor: pointer; padding: 12px 8px; min-height: 44px; color: #226da0; font-size: 14px; }
  .record-more > div { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 4px; }
}
/* Keep pagination compact on both desktop and mobile. */
.channel-module-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.channel-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.channel-pager button { min-width: 32px; height: 36px; padding: 0 8px; border: 1px solid #d5dae1; border-radius: 4px; background: #fff; color: #374151; cursor: pointer; }
.channel-pager button.active { background: #1677d2; color: #fff; border-color: #1677d2; }
.channel-pager button:disabled { opacity: .45; cursor: default; }
[data-channel-view="module"] { scroll-margin-top: 88px; }
