.record-page-actions{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin:6px 0 12px}.record-recovery{font-size:12px}.record-action-menu{display:inline-block;margin:0 0 0 6px;vertical-align:middle;text-align:left}.record-action-menu>summary{list-style:none;cursor:pointer;border:1px solid var(--ui-border,#d6e0e8);border-radius:6px;padding:6px 10px;font-size:12px;font-weight:600;color:var(--ui-text,#193346);background:var(--ui-surface,#fff);white-space:nowrap}.record-action-menu>summary::-webkit-details-marker{display:none}.record-action-menu>summary:focus-visible{outline:2px solid #00887d;outline-offset:2px}.record-action-options{position:fixed;z-index:10000;width:216px;box-sizing:border-box;padding:5px;background:var(--ui-surface,#fff);color:var(--ui-text,#193346);border:1px solid var(--ui-border,#d6e0e8);border-radius:8px;box-shadow:0 8px 26px #001a3033;max-height:calc(100dvh - 16px);overflow:auto}.record-action-menu:not([open])>.record-action-options{display:none}.record-action-options>a,.record-action-options>span{display:block;padding:9px 10px;font-size:13px;line-height:1.4;white-space:normal}.record-action-options>a:hover,.record-action-options>a:focus{background:var(--ui-soft,#e9f5f2);border-radius:4px}.chat-history .record-action-menu{margin:2px 8px 8px}.record-action-menu a{color:inherit;text-decoration:none}@media(max-width:700px){.record-page-actions{justify-content:space-between}.record-action-menu>summary{padding:9px 12px}.record-action-options>a{min-height:40px;padding:10px;box-sizing:border-box}.record-recovery{font-size:11px}}

/* Keep essential actions inside the visible table viewport. */
.record-actions-cell{position:sticky!important;right:0;z-index:2;min-width:82px;background:var(--ui-surface);box-shadow:-2px 0 0 var(--ui-border);text-align:center!important;white-space:nowrap}
th.record-actions-cell{z-index:3;background:var(--ui-soft)}
.record-actions-cell .record-action-menu{margin:0}
.record-archive-direct{border:1px solid var(--ui-border,#d6e0e8);border-radius:6px;padding:7px 12px;background:var(--ui-surface,#fff);color:var(--ui-text,#193346);font-weight:600}
.bp-register .bp-row-menu[open] .bp-row-actions{position:fixed;z-index:10000;min-width:200px;max-height:calc(100vh - 24px);overflow:auto;border:1px solid var(--ui-border);box-shadow:0 8px 25px #0003}

.record-action-options[popover],.bp-register .bp-row-actions[popover]{position:fixed!important;inset:auto;margin:0;color:var(--ui-text)}
.record-action-options[popover],.bp-register .bp-row-actions[popover]{height:max-content!important;min-height:0!important;bottom:auto!important;right:auto!important;align-content:start}
.bp-register .bp-row-actions[popover]{display:block;width:216px;box-sizing:border-box}
.bp-register .bp-row-actions[popover] a{display:block;margin:0;padding:8px 9px;line-height:1.4}

th.record-actions-cell{width:88px!important;min-width:88px!important}

/* Shared controls retain readable targets in compact module headers and tables. */
.record-action-menu>summary{display:inline-flex;align-items:center;justify-content:center;min-width:34px;min-height:32px;box-sizing:border-box}
.record-detail-controls{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}
.record-page-actions .record-recovery,.universal-archive-register>nav a{color:var(--ui-primary,#006b62)}
.chat-header .record-page-actions{margin:0;padding:0;flex-wrap:wrap;flex:none}
.chat-header .record-recovery{display:none}
.ds-actions .record-page-actions{margin:0;padding:0;flex-wrap:wrap}
.archive-view-filter a{color:var(--ui-text);background:var(--ui-surface)}

/* Make room for the existing essential columns when adding the shared action cell. */
.rm-table:has(.record-actions-cell) th:nth-child(1){width:12%}
.rm-table:has(.record-actions-cell) th:nth-child(2){width:22%}
.rm-table:has(.record-actions-cell) th:nth-child(3){width:14%}
.rm-table:has(.record-actions-cell) th:nth-child(4){width:12%}
.rm-table:has(.record-actions-cell) th:nth-child(5){width:11%}
.rm-table:has(.record-actions-cell) th:nth-child(6){width:10%}
.rm-table:has(.record-actions-cell) th:nth-child(7){width:4%}
.rm-table .rm-status{white-space:nowrap;overflow-wrap:normal}

.rm-table:has(.record-actions-cell) td:first-child{white-space:normal;overflow-wrap:anywhere}
.cw-directory th.record-actions-cell{width:68px!important;min-width:68px!important}
.cw-directory .cw-table th{white-space:normal;overflow-wrap:normal}

.pm-record-with-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:8px}
.pm-record-with-actions[hidden]{display:none}

.record-action-menu>summary{min-width:34px!important;min-height:32px!important}

.workbook-page header .record-archive-direct{color:var(--ui-text,#193346)}

/* One shared control, including the existing billing menu and local mail rows. */
body.command-shell .record-action-menu>summary{font-size:12px!important;line-height:1.2;color:var(--ui-text,#193346);background:var(--ui-surface,#fff);border:1px solid var(--ui-border,#d6e0e8);border-radius:6px;padding:6px 10px;text-align:center}
body.command-shell .record-action-menu>summary::after{content:none!important}
body.command-shell .record-action-options{width:216px!important;min-width:0;box-sizing:border-box;text-align:left;color:var(--ui-text,#193346);background:var(--ui-surface,#fff);border:1px solid var(--ui-border,#d6e0e8);border-radius:8px;padding:5px}
body.command-shell .record-action-options>a{display:block;margin:0;padding:9px 10px;font-size:13px;line-height:1.4;text-align:left;white-space:normal;color:inherit;overflow-wrap:anywhere}
.record-list-item{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;position:relative}
.record-list-item>.record-action-menu{grid-column:2;grid-row:1;margin:8px 6px 0 0}
.record-list-item>.mail-row{grid-column:1;grid-row:1;min-width:0}

/* Reserve real column space: sticky actions must never cover business status. */
body.command-shell .bp-register .bp-register-table{table-layout:fixed;min-width:0;width:100%}
body.command-shell .bp-register .bp-register-table :is(th,td){min-width:0;overflow-wrap:anywhere;white-space:normal;padding:10px 6px}
body.command-shell .bp-register .bp-register-table th{font-size:11px}
body.command-shell .bp-register .bp-register-table th:nth-child(1){width:13%}
body.command-shell .bp-register .bp-register-table th:nth-child(2){width:17%}
body.command-shell .bp-register .bp-register-table th:nth-child(3){width:9%}
body.command-shell .bp-register .bp-register-table th:nth-child(4),body.command-shell .bp-register .bp-register-table th:nth-child(5){width:9%}
body.command-shell .bp-register .bp-register-table th:nth-child(6){width:10%}
body.command-shell .bp-register .bp-register-table th:nth-child(7){width:8%}
body.command-shell .bp-register .bp-register-table th:nth-child(8),body.command-shell .bp-register .bp-register-table th:nth-child(9){width:9%}
body.command-shell .bp-register .bp-register-table th.record-actions-cell{width:7%!important;min-width:0!important}
body.command-shell .bp-register .bp-register-table td.record-actions-cell{min-width:0}
body.command-shell .bp-register .bp-register-table td:first-child>a{white-space:normal}
body.command-shell .bp-register .bp-register-table :is(.bp-pill,.bp-type){max-width:100%;box-sizing:border-box;white-space:normal;overflow-wrap:normal}
body.command-shell .cw-client-split .cw-directory .cw-table th{overflow-wrap:anywhere;white-space:normal;line-height:1.35}
body.command-shell .be-table:has(.record-actions-cell) :is(th,td){overflow-wrap:anywhere;white-space:normal}
body.command-shell .be-table:has(.record-actions-cell) .be-status{max-width:100%;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere}
body.command-shell :is(.be-table,.pw-directory-table):has(.record-actions-cell){table-layout:fixed;width:100%;min-width:0}
body.command-shell :is(.be-table,.pw-directory-table):has(.record-actions-cell) :is(th,td){min-width:0;white-space:normal;overflow-wrap:anywhere}
body.command-shell :is(.be-table,.pw-directory-table) th.record-actions-cell{width:12%!important;min-width:0!important}
body.command-shell :is(.be-table,.pw-directory-table) td.record-actions-cell{min-width:0}
body.command-shell .be-table:has(.record-actions-cell) th:nth-child(1){width:18%}
body.command-shell .be-table:has(.record-actions-cell) th:nth-child(2){width:22%}
body.command-shell .be-table:has(.record-actions-cell) th:nth-child(3){width:14%}
body.command-shell .be-table:has(.record-actions-cell) th:nth-child(4){width:18%}
body.command-shell .be-table:has(.record-actions-cell) th:nth-child(5){width:16%}
body.command-shell .pw-directory-table:has(.record-actions-cell) th:nth-child(1){width:26%}
body.command-shell .pw-directory-table:has(.record-actions-cell) th:nth-child(2){width:14%}
body.command-shell .pw-directory-table:has(.record-actions-cell) th:nth-child(3){width:14%}
body.command-shell .pw-directory-table:has(.record-actions-cell) th:nth-child(4){width:16%}
body.command-shell .pw-directory-table:has(.record-actions-cell) th:nth-child(5){width:18%}
body.command-shell .pw-directory-table :is(.pw-status,.tag){max-width:100%;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere}
body.command-shell .cw-client-split .cw-directory .cw-table{table-layout:fixed;width:100%}
body.command-shell .cw-client-split .cw-directory .cw-table :is(th,td){min-width:0}
body.command-shell .cw-client-split .cw-directory .cw-table th{font-size:10px;padding-inline:4px;overflow-wrap:normal}
body.command-shell .cw-client-split .cw-directory .cw-table th:nth-child(1),body.command-shell .cw-client-split .cw-directory .cw-table th:nth-child(2){width:23%}
body.command-shell .cw-client-split .cw-directory .cw-table th:nth-child(3){width:6%}
body.command-shell .cw-client-split .cw-directory .cw-table th:nth-child(4),body.command-shell .cw-client-split .cw-directory .cw-table th:nth-child(5){width:10%}
body.command-shell .cw-client-split .cw-directory .cw-table th:nth-child(6),body.command-shell .cw-client-split .cw-directory .cw-table th:nth-child(7){width:9%}
body.command-shell .cw-client-split .cw-directory .cw-table th.record-actions-cell{width:10%!important;min-width:0!important}

body.command-shell .be-table:has(.record-actions-cell) td.be-money{white-space:nowrap;overflow-wrap:normal;font-size:11px}
body.command-shell .pw-directory-table td:nth-child(5)>span{max-width:100%;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere}
.record-action-options{max-height:calc(100vh - 24px);overflow-y:auto;overscroll-behavior:contain}.record-action-options .record-menu-group{font-size:10px;font-weight:700;color:var(--ui-muted);display:block;padding:7px 12px 3px;border-top:1px solid var(--ui-border)}
