/* Shared list surfaces and server-backed navigation retain the existing Commands workspace. */
#content { min-width: 0; }
#content > .page-heading { margin-bottom: 22px; gap: 16px; flex-wrap: wrap; }
#content > .page-heading h1 { margin: 0; font-size: clamp(24px, 2.1vw, 32px); letter-spacing: -.7px; }
#content > .toolbar, #content > .legal-entity-search {
    display: flex; flex-wrap: wrap; align-items: end; gap: 12px;
    padding: 18px 20px; margin: 0 0 20px; border: 1px solid var(--border);
    background: #fff; border-radius: 12px; box-shadow: 0 2px 10px #1b407404;
}
#content > .toolbar label { display: grid; gap: 7px; color: #52647a; font-size: 12px; font-weight: 600; }
#content > .toolbar label:first-child { flex: 1 1 230px; max-width: 420px; }
#content > .toolbar :is(input, select) { min-height: 40px; width: 100%; background: #fff; }
#content > .toolbar :is(button, .button) { min-height: 40px; }
#content .table-card, #content .legal-entity-radzen-grid {
    min-width: 0; border: 1px solid var(--border); border-radius: 12px;
    background: #fff; box-shadow: 0 3px 18px #1b407405;
}
#content .table-card { padding: 0; overflow: hidden; }
#content .rz-data-grid { border: 0; border-radius: 12px; }
#content .rz-data-grid-data { max-height: var(--list-grid-height, min(58vh, 640px)); overflow: auto; }
#content .rz-grid-table { font-size: 13px; }
#content .rz-grid-table thead th {
    background: #f7f9fc; color: #53657d; font-weight: 600; font-size: 12px;
    padding: 13px 16px; border-bottom: 1px solid var(--border); white-space: nowrap;
    position: sticky; top: 0; z-index: 2;
}
#content .rz-grid-table tbody td { padding: 12px 16px; border-color: #edf1f6; vertical-align: middle; }
#content .rz-grid-table tbody tr:nth-child(even) td { background-color: #fbfcfe; }
#content .rz-grid-table tbody tr:hover td { background-color: #f0f5fd; }
#content .rz-grid-table tbody tr.command-selected td { background-color: #eaf2ff; }
#content .rz-grid-table a.button { display: inline-flex; align-items: center; padding: 5px 9px; font-size: 12px; min-height: 30px; margin: 2px 4px 2px 0; box-shadow: none; }
#content .rz-grid-table .rz-button-sm { min-height: 30px; border-radius: 7px; }
#content .grid-sort-scope, #content [data-component-grid] > .muted { margin: 0; padding: 11px 16px; border-top: 1px solid #edf1f6; font-size: 11px; background: #fbfcfe; }
#content .rz-datatable-emptymessage td { padding: 48px 20px; color: #65758a; text-align: center; }
#content > [role="alert"], #content .legal-entity-message { padding: 14px 18px; border: 1px solid #efd5d5; border-radius: 10px; background: #fff8f8; color: #963333; }
body.compact-rows #content .rz-grid-table tbody td { padding-top: 7px; padding-bottom: 7px; }
.record-pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 18px; margin: 12px 0 22px; background: #fff; border: 1px solid var(--border); border-radius: 12px; }
.record-pager-summary { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.record-pager-count { color: #30435c; font-size: 13px; font-weight: 600; }
.record-pager-size { color: #65758a; font-size: 12px; padding: 4px 8px; border-radius: 6px; background: #f5f7fa; }
.record-pager-controls { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.record-pager .pager-button { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 8px; box-sizing: border-box; border: 1px solid transparent; border-radius: 8px; text-decoration: none; color: #3a506b; background: #f7f9fc; font-size: 13px; }
.record-pager a.pager-button:hover { background: #edf3fc; border-color: #c6d6ee; }
.record-pager .pager-current { background: var(--primary); color: #fff; font-weight: 700; }
.record-pager [aria-disabled="true"] { opacity: .35; }
.record-pager .rz-icon { font-size: 19px; }
.record-pager-position { font-size: 12px; color: #65758a; margin-left: 8px; }
.record-pager-hint { flex-basis: 100%; margin: 0; font-size: 12px; color: #65758a; }
.legal-entity-list-footer { display: block; }
.legal-entity-list-footer > .record-pager { margin-bottom: 0; }
.pager-button:focus-visible { outline: 3px solid #8db4f0; outline-offset: 2px; }
#navigation-feedback[hidden] { display: none; }
.navigation-progress { position: fixed; z-index: 1100; top: 0; left: 0; width: 100%; height: 3px; overflow: hidden; background: #dce7f8; }
.navigation-progress::after { content: ''; display: block; width: 35%; height: 100%; background: #285ecb; animation: page-progress 1.2s ease-in-out infinite; }
.navigation-feedback-label { position: fixed; z-index: 1100; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 12px 18px; border: 1px solid #dce5f1; border-radius: 12px; background: #fff; color: #304b71; font-size: 13px; box-shadow: 0 8px 32px #16366120; }
.navigation-spinner { width: 16px; height: 16px; border: 2px solid #dce5f1; border-top-color: #285ecb; border-radius: 50%; animation: page-spin .8s linear infinite; }
@keyframes page-progress { from { transform: translateX(-110%); } to { transform: translateX(390%); } }
@keyframes page-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .navigation-progress::after, .navigation-spinner { animation: none; } }
@media (max-width: 700px) {
    .record-pager { padding: 14px; gap: 12px; }
    .record-pager-controls { width: 100%; gap: 4px; }
    .record-pager-position { flex-basis: 100%; margin: 6px 0 0; }
    #content > .toolbar, #content > .legal-entity-search { padding: 14px; }
    #content > .toolbar label:first-child { max-width: none; }
    .navigation-feedback-label { bottom: 16px; max-width: calc(100vw - 64px); }
}

/* Keep the workspace dense while preserving readable rows and touch targets. */
body:not(.login) #content { padding: 12px 20px 18px; }
body:not(.login) #shell > header { min-height: 38px; padding: 8px 20px 0; }
#content > .page-heading { margin-bottom: 12px; gap: 10px; }
#content > .page-heading h1, #content > h1 { font-size: clamp(23px, 1.8vw, 28px); margin-top: 0; margin-bottom: 12px; }
#content > .toolbar, #content > .legal-entity-search { padding: 10px 14px; margin-bottom: 12px; gap: 10px; }
#content > .toolbar :is(input, select, button, .button) { min-height: 36px; }
#content .rz-data-grid-data { max-height: var(--list-grid-height, min(68vh, 960px)); }
#content .rz-grid-table { font-size: 14px; }
#content .rz-grid-table thead th { padding: 10px 12px; font-size: 12px; }
#content .rz-grid-table tbody td { padding: 9px 12px; }
#content .rz-grid-table tbody tr[data-record-id], #content .rz-grid-table tbody tr[data-entity-id] { cursor: pointer; }
#content #records tr[tabindex="0"]:focus-visible { outline: 2px solid #648ed0; outline-offset: -2px; }
#content .rz-grid-table :is(td,th).grid-record-actions { white-space: nowrap; }
#content .grid-sort-scope, #content [data-component-grid] > .muted { padding: 6px 12px; }
.record-pager { padding: 10px 14px; margin: 8px 0 12px; gap: 10px; }
@media (max-width: 700px) {
    body:not(.login) #content { padding: 10px 12px 16px; }
    body:not(.login) #shell > header { padding-left: 12px; padding-right: 12px; }
}
