html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
:root{--bpo-primary:#0d6efd;--bpo-surface:#f4f7fb;}body{background:var(--bpo-surface);color:#263442}.btn-primary{background:var(--bpo-primary)}h1{font-size:1.7rem}.content{width:100%;max-width:none}.sidebar{background:#18344f!important}.top-row{background:#fff!important}

#blazor-error-ui{display:none;background:#fff3cd;padding:1rem;position:fixed;bottom:0;width:100%;z-index:1000}

/* Shared baseline: Billing Review Portal operational palette. */
:root{--portal-ink:#242424;--portal-blue:#0078d4;--portal-bg:#f5f5f5;--portal-border:#d1d1d1;--portal-muted:#5f5f5f;--bpo-primary:var(--portal-blue)}
html,body{font-family:"Segoe UI",Arial,sans-serif;background:var(--portal-bg);color:var(--portal-ink)}
.app-shell{width:100%;max-width:none;margin:0}.app-header{background:#fff;padding:14px 18px!important;border-bottom:2px solid var(--portal-blue)!important}.app-header h3{font-size:1.35rem;margin:0;font-weight:600}
.btn,.card,.form-control,.form-select{border-radius:2px;box-shadow:none}.card{background:#fff;border-color:var(--portal-border)}
.btn-primary{--bs-btn-bg:#0078d4;--bs-btn-border-color:#0078d4;--bs-btn-hover-bg:#106ebe;--bs-btn-hover-border-color:#106ebe;background:#0078d4}.btn-outline-primary{--bs-btn-color:#0078d4;--bs-btn-border-color:#0078d4;--bs-btn-hover-bg:#0078d4;--bs-btn-hover-border-color:#0078d4}
.account-card{max-width:440px;margin:36px auto 48px}.account-title{font-size:1.35rem;font-weight:600;margin-bottom:24px}.account-card .form-label{font-size:.875rem}.account-card .form-control{height:38px}.account-card .btn{margin-top:8px}footer{color:var(--portal-muted)}

.account-card{width:calc(100% - 24px);min-width:0}.account-card .form-select{width:100%;max-width:100%;min-width:0;text-overflow:ellipsis}.account-card p{overflow-wrap:anywhere}

.timezone-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap;margin-top:24px}.account-card .timezone-actions .btn{margin:0;min-height:var(--portal-button-height)}.account-card #browser-zone-hint{min-height:40px;margin-bottom:0}.account-card #zone{font-size:14px}@media(max-width:420px){.timezone-actions{flex-direction:column;align-items:stretch}.timezone-actions .btn{width:100%}}

/* Theme surfaces and component states; shared with the operational palette. */
:root{--portal-surface:#fff;--portal-control:#fff;--portal-control-border:#8a8886;--portal-hover:#deecf9}
:root[data-theme="dark"]{--portal-bg:#18191b;--portal-surface:#242629;--portal-ink:#f3f2f1;--portal-muted:#c8c6c4;--portal-border:#55585d;--portal-control:#1d1f22;--portal-control-border:#8a8886;--portal-hover:#263d50;--portal-blue:#66b5ff;--bs-body-bg:#18191b;--bs-body-color:#f3f2f1;--bs-secondary-color:#c8c6c4;--bs-border-color:#55585d;color-scheme:dark;}
@media(prefers-color-scheme:dark){:root[data-theme="system"]{--portal-bg:#18191b;--portal-surface:#242629;--portal-ink:#f3f2f1;--portal-muted:#c8c6c4;--portal-border:#55585d;--portal-control:#1d1f22;--portal-control-border:#8a8886;--portal-hover:#263d50;--portal-blue:#66b5ff;--bs-body-bg:#18191b;--bs-body-color:#f3f2f1;--bs-secondary-color:#c8c6c4;--bs-border-color:#55585d;color-scheme:dark;}}
html,body{background:var(--portal-bg);color:var(--portal-ink)}
.app-header,.top-row,.card,.workfocus{background:var(--portal-surface)!important;color:var(--portal-ink);border-color:var(--portal-border)}
.app-header h3,.form-label,label{color:var(--portal-ink)}
.form-control,.form-select{background-color:var(--portal-control);color:var(--portal-ink);border-color:var(--portal-control-border)}
.form-control::placeholder{color:var(--portal-muted)}.form-control:focus,.form-select:focus{background-color:var(--portal-control);color:var(--portal-ink);border-color:var(--portal-blue);box-shadow:0 0 0 1px var(--portal-blue)}
.text-muted,footer{color:var(--portal-muted)!important}a{color:var(--portal-blue)}
.btn-outline-primary{color:var(--portal-blue);border-color:var(--portal-blue)}.btn-outline-secondary{color:var(--portal-ink);border-color:var(--portal-control-border)}
.table{--bs-table-bg:var(--portal-surface);--bs-table-color:var(--portal-ink);--bs-table-border-color:var(--portal-border);--bs-table-hover-bg:var(--portal-hover)}
.table th{background:var(--portal-bg);color:var(--portal-ink)}.table tbody tr:hover{background:var(--portal-hover)}

/* Shared workbench header: compact theme action and account menu. */
.workbench-topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:4px 0 16px;margin-bottom:24px;flex-wrap:wrap}
.workbench-brand{font-size:20px;font-weight:600;text-decoration:none;color:var(--bs-body-color)}
.workbench-header-actions,.workbench-navigation,.user-operations{display:flex;align-items:center;gap:20px;flex-wrap:wrap}
.workbench-navigation a{font-size:14px;text-decoration:none}
.header-theme-toggle,.user-menu summary{display:flex;align-items:center;gap:8px;min-height:38px;padding:6px 10px;border:1px solid var(--bs-border-color);border-radius:4px;background:var(--bs-body-bg);color:var(--bs-body-color);font-size:14px;cursor:pointer}
.user-menu{position:relative}.user-menu summary{border-color:transparent;list-style:none}.user-menu summary::-webkit-details-marker{display:none}
.user-avatar{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#0078d4;color:white;font-size:13px;font-weight:600}
.user-menu-panel{position:absolute;right:0;top:calc(100% + 8px);z-index:1000;min-width:200px;padding:6px;background:var(--bs-body-bg);border:1px solid var(--bs-border-color);border-radius:4px;box-shadow:0 4px 12px #0002}
.user-menu-panel a,.user-menu-panel button{display:block;width:100%;padding:9px 12px;text-align:left;text-decoration:none;color:var(--bs-body-color);background:transparent;border:0;font-size:14px;border-radius:2px}
.user-menu-panel a:hover,.user-menu-panel button:hover{background:var(--bs-tertiary-bg)}
.user-menu-panel form{margin-top:4px;padding-top:4px;border-top:1px solid var(--bs-border-color)}
@media(max-width:600px){.workbench-header-actions{width:100%;gap:12px;justify-content:space-between}.user-operations{gap:8px}.header-theme-toggle{padding:6px}.workbench-navigation{gap:12px}.user-menu-panel{max-width:calc(100vw - 32px)}}

.workbench-clock{display:flex;flex-direction:column;justify-content:center;min-width:116px;min-height:38px;text-align:right;line-height:1.3;text-decoration:none;color:var(--bs-body-color)}
.clock-time{font-size:13px;font-weight:400;color:var(--portal-muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.clock-zone{font-size:11px;color:var(--bs-secondary-color);white-space:nowrap}
.workbench-clock:hover .clock-time{text-decoration:underline}
@media(max-width:600px){.workbench-clock{min-width:116px;text-align:left}.user-operations{justify-content:flex-end}}

.user-menu-panel{min-width:240px;padding:8px;max-height:calc(100dvh - 100px);overflow-y:auto}
.user-menu-group+.user-menu-group{margin-top:6px;padding-top:6px;border-top:1px solid var(--bs-border-color)}
.user-menu-heading{display:block;padding:7px 12px 3px;font-size:14px;font-weight:700;color:var(--bs-body-color)}
.user-menu summary:hover,.user-menu[open] summary{background:var(--portal-hover)}
.user-menu summary:focus-visible,.workbench-clock:focus-visible{outline:2px solid var(--portal-blue);outline-offset:3px}

/* Compact appearance action, matching the account control height. */
.header-theme-toggle{width:34px;height:34px;min-height:34px;flex:0 0 34px;justify-content:center;padding:0;border-color:transparent;background:transparent;font-size:20px;line-height:1;color:var(--portal-muted)}
.header-theme-toggle:hover{background:var(--portal-hover);color:var(--portal-ink)}
.header-theme-toggle:focus-visible{outline:2px solid var(--portal-blue);outline-offset:2px}

/* Work-first navigation inspired by familiar account and search patterns. */
.workbench-topbar{padding:10px 16px;margin-bottom:24px;gap:24px}
.workbench-brand-group{display:flex;align-items:center;gap:12px;flex-shrink:0}
.workbench-brand{font-size:18px;white-space:nowrap}
.workbench-header-actions{gap:0}.user-operations{gap:12px}
.workbench-search{display:flex;flex:1;min-width:200px;max-width:600px;height:38px;border:1px solid var(--portal-control-border);border-radius:4px;overflow:hidden;background:var(--portal-control)}
.workbench-search:focus-within{outline:2px solid var(--portal-blue);outline-offset:1px}
.workbench-search input{min-width:0;flex:1;border:0;padding:8px 12px;color:var(--portal-ink);background:transparent;font-size:14px;outline:none}
.workbench-search button{width:42px;border:0;background:#0078d4;color:white;font-size:24px}
.account-summary{display:flex;flex-direction:column;line-height:1.3;text-align:left}.account-greeting{font-size:11px;color:var(--portal-muted)}.account-label{font-size:13px;font-weight:600}
.work-menu{position:relative}.work-menu summary{display:grid;place-items:center;list-style:none;width:34px;height:38px;border:1px solid transparent;border-radius:3px;cursor:pointer;font-size:22px}.work-menu summary::-webkit-details-marker{display:none}.work-menu summary:hover{background:var(--portal-hover)}
.work-menu-panel{position:absolute;top:calc(100% + 16px);left:-16px;width:250px;z-index:1000;padding:12px;background:var(--portal-surface);border:1px solid var(--portal-border);box-shadow:0 4px 12px #0002;border-radius:4px}
.work-menu-title{padding:8px 12px;font-weight:600}.work-menu-panel a{display:block;padding:10px 12px;text-decoration:none;border-radius:3px;color:var(--portal-ink)}.work-menu-panel a:hover{background:var(--portal-hover)}
.queue-heading h1{font-size:24px;margin-bottom:6px}.queue-filter-bar{display:flex;align-items:end;gap:16px;padding:16px;margin:24px 0;background:var(--portal-surface);border:1px solid var(--portal-border);border-radius:4px;flex-wrap:wrap}.queue-filter-bar>div{min-width:180px}.queue-search-field{flex:1}.queue-filter-bar .form-label{font-size:13px}.queue-filter-bar .btn{height:var(--portal-button-height)}.queue-empty{text-align:center;padding:64px 24px;background:var(--portal-surface);border:1px solid var(--portal-border);border-radius:4px}.queue-empty-symbol{display:inline-grid;place-items:center;background:var(--portal-hover);color:var(--portal-blue);width:40px;height:40px;border-radius:50%;margin-bottom:16px;font-size:22px}.queue-empty h2{font-size:18px}.queue-empty p{font-size:14px;color:var(--portal-muted);margin-bottom:0}
@media(max-width:1000px){.workbench-topbar{gap:12px}.workbench-search{order:3;max-width:none;flex-basis:100%}.workbench-header-actions{margin-left:auto;width:auto}.workbench-clock{min-width:105px}.workbench-brand{font-size:16px}}
@media(max-width:600px){.workbench-topbar{padding:8px}.workbench-clock{display:none}.user-avatar{display:none}.user-operations{gap:4px}.queue-filter-bar>div{width:100%}.work-menu-panel{left:-8px}}

.mailbox-toolbar{display:flex;gap:12px;flex-wrap:wrap;margin:20px 0}.mailbox-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}.mailbox-fields>div{min-width:0}.mailbox-fields.user-name-fields{grid-template-columns:repeat(3,minmax(0,1fr))}.mailbox-fields .form-label{font-size:13px}@media(max-width:600px){.mailbox-fields,.mailbox-fields.user-name-fields{grid-template-columns:1fr}}

/* Consistent compact maintenance controls and discoverable theme action. */
.mailbox-maintenance .btn,.mailbox-maintenance summary.btn{min-height:36px;height:36px;padding:7px 12px;font-size:13px;line-height:20px;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap;box-sizing:border-box}
.mailbox-maintenance details{position:relative}.mailbox-maintenance summary{list-style:none}.mailbox-maintenance summary::-webkit-details-marker{display:none}
.mailbox-maintenance details[open]{display:block}.mailbox-more-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px;max-width:340px}
.header-theme-toggle{border:1px solid var(--portal-control-border);border-radius:4px;background:var(--portal-surface);width:34px;height:34px}
.header-theme-toggle:hover{border-color:var(--portal-blue);background:var(--portal-hover)}
.task-checkboxes{display:flex;flex-wrap:wrap;gap:20px;margin:16px 0}.task-checkboxes label{display:flex;align-items:center;gap:8px;font-size:14px}.task-checkboxes input{width:16px;height:16px;margin:0}
.task-switcher{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.task-switcher a{display:inline-flex;align-items:center;min-height:32px;padding:5px 12px;border:1px solid var(--portal-border);border-radius:4px;color:var(--portal-ink);text-decoration:none;background:var(--portal-surface)}.task-switcher a[aria-current="page"]{border-color:var(--portal-blue);background:var(--portal-hover)}

/* Standard interface text, matching the billing review grid's 0.875rem. */
:root{--portal-text-size:14px}
body,.form-control,.form-select,.btn,.form-label{font-size:var(--portal-text-size)}
.form-label{display:block;line-height:20px;margin-bottom:8px}.form-control:not(textarea),.form-select{min-height:38px}
.table th,.table td{font-size:var(--portal-text-size)}
.table th{font-weight:600}
.mailbox-maintenance .btn,.mailbox-maintenance summary.btn,.mailbox-fields .form-label,.queue-filter-bar .form-label,.account-card .form-label{font-size:var(--portal-text-size)}

/* Browse -> focused editor: shared administration layout. */
.browse-heading{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.browse-heading h1{font-size:24px;margin-bottom:6px}.browse-heading p{margin:0}
.browse-filters{display:flex;align-items:end;gap:12px;flex-wrap:wrap;padding:16px;background:var(--portal-surface);border:1px solid var(--portal-border);border-radius:4px}.browse-filters>div{min-width:130px}.browse-search{flex:1;min-width:200px!important}.browse-filters .form-label{margin-bottom:6px}.browse-summary{display:flex;align-items:center;justify-content:space-between;margin:16px 0 8px}
.user-browse-viewport{height:clamp(280px,60vh,680px);overflow:auto;border:1px solid var(--portal-border);background:var(--portal-surface)}.user-browse-table{width:100%;table-layout:fixed;margin:0;min-width:760px}.user-browse-table thead th{position:sticky;top:0;z-index:1;background:var(--portal-bg);height:44px}.user-browse-table th:nth-child(1){width:27%}.user-browse-table th:nth-child(2){width:12%}.user-browse-table th:nth-child(3){width:30%}.user-browse-table th:nth-child(4){width:20%}.user-browse-table th:nth-child(5){width:11%}.user-browse-row{height:56px}.user-browse-row td{vertical-align:middle}.browse-ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.browse-sort{border:0;background:transparent;color:inherit;font:inherit;font-weight:600;padding:0;cursor:pointer;display:flex;align-items:center;gap:6px}.browse-sort:focus-visible{outline:2px solid var(--portal-blue);outline-offset:3px}.user-browse-row .btn{height:36px;padding:7px 12px;line-height:20px}
.user-edit-card{max-width:760px}.editor-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:20px}.editor-actions .btn,.browse-heading .btn,.browse-filters .btn,.browse-summary .btn{min-height:36px;padding:6px 12px;font-size:14px}

/* Focused record workspace: anchored header/actions with a scrolling form. */
.record-page{height:calc(100dvh - 155px);min-height:340px;display:flex;flex-direction:column;gap:12px}
.record-header{position:sticky;top:0;z-index:2;flex-shrink:0;background:var(--portal-bg);margin:0;padding:4px 0 12px;border-bottom:1px solid var(--portal-border)}
.record-page>.user-edit-card.card{flex:1;min-height:0;width:100%;padding:0!important;overflow:hidden;display:flex;flex-direction:column}
.record-page>.user-edit-card.card>form{display:flex;flex-direction:column;flex:1;min-height:0;margin:0}
.record-body{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:16px}
.record-footer{position:sticky;bottom:0;z-index:2;flex-shrink:0;background:var(--portal-surface);border-top:1px solid var(--portal-border);padding:12px 16px;margin:0;align-items:center}
.record-page>.user-edit-card.card>div.mb-3,.record-page>.user-edit-card.card>form.mb-3{flex:0 0 auto;margin:0!important;padding:12px 16px;border-bottom:1px solid var(--portal-border)}
.record-page>.user-edit-card.card>form.mb-3{display:block}
@media(max-width:1000px){.record-page{height:calc(100dvh - 205px)}}
@media(max-width:600px){.record-page{height:calc(100dvh - 205px);min-height:300px}.record-header h1{font-size:20px}.record-header{gap:8px}.record-footer{padding:10px;gap:8px}.record-footer .btn{flex:1 1 auto}.record-body{padding:12px}}

/* Derive the record height from the actual wrapped portal header. */
.app-shell:has(.record-page){height:100dvh;display:flex;flex-direction:column;overflow:hidden}
.app-shell:has(.record-page)>.app-header,.app-shell:has(.record-page)>footer{flex-shrink:0}
.app-shell:has(.record-page)>main{flex:1;min-height:0}
.app-shell:has(.record-page) .record-page{height:100%;min-height:0}
.app-shell:has(.record-page)>footer{margin-top:12px!important}

/* Shared Excel-inspired column filters and alternating row bands. */
:root{--browse-band:#edf5fb;--browse-base:#fff}
:root[data-theme="dark"]{--browse-band:#293744;--browse-base:#242629}
@media(prefers-color-scheme:dark){:root[data-theme="system"]{--browse-band:#293744;--browse-base:#242629}}
.browse-banded tbody tr:not([aria-hidden]) td{background:var(--browse-base);color:var(--portal-ink)}
.browse-banded tbody tr:nth-child(even of :not([aria-hidden])) td{background:var(--browse-band)}
.browse-banded tbody tr:hover td{background:var(--portal-hover)}
.excel-trigger{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;border:0;background:transparent;color:inherit;font-size:14px;font-weight:600;padding:4px 0;text-align:left;cursor:pointer}
.excel-trigger.filtered{color:var(--portal-blue)}.excel-trigger:focus-visible{outline:2px solid var(--portal-blue);outline-offset:2px}
.filter-dismiss{position:fixed;inset:0;z-index:1090;background:transparent}
.excel-menu{position:fixed;top:150px;right:24px;z-index:1100;width:320px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 175px);overflow:auto;padding:14px;border:1px solid var(--portal-control-border);border-radius:6px;box-shadow:0 5px 18px #0003;background:var(--portal-surface);color:var(--portal-ink);font-size:14px;font-weight:400;text-align:left}
.excel-menu-heading{display:flex;justify-content:space-between;align-items:center;font-weight:600;margin-bottom:10px}.filter-close{border:0;background:transparent;color:inherit;font-size:22px}
.excel-sort{display:flex;gap:8px;margin-bottom:12px}.excel-sort button{flex:1;background:var(--portal-control);color:var(--portal-ink);border:1px solid var(--portal-control-border);padding:6px;font-size:14px;border-radius:4px}
.excel-choice{display:flex;gap:8px;align-items:center;padding:7px 2px;font-weight:400;cursor:pointer}.excel-choice input{width:16px;height:16px;flex-shrink:0;accent-color:var(--portal-blue)}.excel-choice span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.excel-values{max-height:240px;overflow:auto;border-top:1px solid var(--portal-border);border-bottom:1px solid var(--portal-border);margin-bottom:10px}.excel-actions{display:flex;gap:8px;flex-wrap:wrap}.excel-actions .btn{min-height:36px;padding:7px 12px}
.user-browse-table th:nth-child(1){width:24%}.user-browse-table th:nth-child(2){width:12%}.user-browse-table th:nth-child(3){width:15%}.user-browse-table th:nth-child(4){width:20%}.user-browse-table th:nth-child(5){width:20%}.user-browse-table th:nth-child(6){width:9%}
@media(max-height:500px){.excel-menu{top:12px;max-height:calc(100dvh - 24px)}}

.browse-toolbar-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.browse-summary{gap:12px;flex-wrap:wrap}
/* Keep toolbar focus within the button so it cannot overlap or clip at the grid edge. */
.browse-toolbar-actions>.btn:focus,.filter-reset-action>.btn:focus{box-shadow:none}
.browse-toolbar-actions>.btn:focus-visible,.filter-reset-action>.btn:focus-visible{outline:2px solid var(--portal-blue);outline-offset:-3px}


/* Full-width record border with readable inner fields. */
.record-page>.user-edit-card.card{max-width:none}
.record-body>.form-control,.record-body>.form-select,.record-body>.form-label,.record-body>fieldset:not(.settings-sections),.record-body>.mailbox-fields,.record-body>div:is(.mb-3,.mt-3):not(.card):has(>.form-control),.task-assignment-card>.mailbox-fields{max-width:760px}
.record-page>.user-edit-card.card>form.mb-3 .d-flex{max-width:760px}
.record-email-actions{padding:12px 16px;border-bottom:1px solid var(--portal-border);flex-shrink:0;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.record-page>.user-edit-card.card>form.record-email-actions{flex:0 0 auto;flex-direction:row}

.record-page>details.user-edit-card{flex:0 0 auto;max-width:none;max-height:40%;overflow:auto}

.record-content-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}
.record-content-scroll>.mb-3{padding:12px 16px;border-bottom:1px solid var(--portal-border);margin:0!important}
.record-content-scroll>form.mb-3 .d-flex{max-width:760px}
.record-content-scroll>form{margin:0}
.record-content-scroll .record-body{overflow:visible}

.smtp-test-panel{max-width:760px;margin-top:20px;padding:16px;border:1px solid var(--portal-border);border-radius:4px;background:var(--portal-surface)}.smtp-test-panel .editor-actions{margin-top:12px}

/* Shared action rhythm: text buttons stay aligned and wrap as whole controls. */
:root{--portal-button-height:38px;--portal-action-gap:8px}
.btn.btn{display:inline-flex;align-self:center;align-items:center;justify-content:center;gap:6px;min-height:var(--portal-button-height);height:auto;padding:7px 12px;font-size:var(--portal-text-size);line-height:20px;border-radius:4px;white-space:nowrap;vertical-align:middle;box-sizing:border-box}
.portal-actions,.mailbox-toolbar,.mailbox-actions,.editor-actions,.browse-toolbar-actions,.excel-actions,.record-email-actions,.timezone-actions{display:flex;align-items:center;flex-wrap:wrap;gap:var(--portal-action-gap)}
.portal-actions>.btn,.mailbox-toolbar>.btn,.mailbox-actions>.btn,.editor-actions>.btn,.browse-toolbar-actions>.btn,.excel-actions>.btn,.record-email-actions>.btn,.timezone-actions>.btn{margin:0;flex:0 0 auto}
.browse-heading>div{min-width:0}.browse-heading>.btn{flex:0 0 auto}
.mailbox-actions>details{flex:0 0 auto;align-self:flex-start}
.mailbox-more-actions{align-items:center;gap:var(--portal-action-gap)}
.mailbox-more-actions>.btn{margin:0}
.record-email-actions>span{flex:1 1 240px;min-width:0;overflow-wrap:anywhere}
.queue-filter-bar .btn{height:var(--portal-button-height)}
@media(max-width:600px){.browse-heading{gap:12px}.record-footer .btn{flex:0 0 auto}.portal-actions{row-gap:8px}}

/* Preserve readable mailbox columns; narrow screens scroll the grid locally. */
.mailbox-maintenance>.table-responsive>table{min-width:960px}
.mailbox-maintenance>.table-responsive>table th:last-child{min-width:290px}

/* Mailbox actions live outside the scrolling table. Native dialog handles focus/Escape. */
.mailbox-action-panel{width:min(420px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:0;border:1px solid var(--portal-control-border);border-radius:6px;background:var(--portal-surface);color:var(--portal-ink);overflow:auto}
.mailbox-action-panel::backdrop{background:#0005}
.mailbox-panel-heading{display:flex;align-items:flex-start;gap:12px;padding:16px;border-bottom:1px solid var(--portal-border)}
.mailbox-panel-heading>div{flex:1;min-width:0}.mailbox-panel-heading h2{font-size:18px;margin:0 0 4px}.mailbox-panel-heading p{font-size:14px;color:var(--portal-muted);overflow-wrap:anywhere;margin:0}
.mailbox-panel-body{display:flex;flex-direction:column;gap:8px;padding:16px}.mailbox-panel-body .btn{width:100%;justify-content:flex-start;white-space:normal;text-align:left}.mailbox-panel-body p{margin:4px 0 0}.mailbox-panel-divider{border-top:1px solid var(--portal-border);margin:4px 0}
@media(max-width:600px){.mailbox-action-panel{margin:0 0 0 auto;width:min(360px,100vw);height:100dvh;max-height:100dvh;border-radius:0;border-right:0}}

.catalog-table{width:100%;min-width:560px}.catalog-table thead th{position:sticky;top:0;background:var(--portal-bg);z-index:1}.catalog-table td{vertical-align:middle}

.queue-controls{display:flex;flex-wrap:wrap;align-items:end;gap:12px;padding:12px 0}.queue-controls>div{min-width:150px}.queue-controls .queue-search-field{flex:1}.queue-task-line{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:12px 0}.queue-task-line label{display:flex;gap:6px;align-items:center}.queue-alert,.work-readonly{padding:12px;background:var(--portal-hover);border-bottom:1px solid var(--portal-border)}.work-readonly{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.queue-table{width:100%;min-width:1150px;table-layout:fixed}.queue-table th:nth-child(1){width:85px}.queue-table th:nth-child(2){width:115px}.queue-table th:nth-child(3){width:160px}.queue-table th:nth-child(4){width:26%}.queue-table th:nth-child(5){width:130px}.queue-table th:nth-child(6){width:95px}.queue-table th:nth-child(7){width:130px}.queue-table th:last-child{width:170px}.queue-table thead th{position:sticky;top:0;z-index:1;background:var(--portal-bg)}.queue-row{height:66px}.queue-row td{vertical-align:middle;overflow-wrap:anywhere}.queue-viewport{height:clamp(280px,65dvh,900px)}
.queue-conflict{position:fixed;inset:0;background:#0005;z-index:1100;display:grid;place-items:center;padding:16px}.queue-conflict>.card{max-width:480px}
.work-record .record-header h1{font-size:20px;overflow-wrap:anywhere}.work-record .record-header>div{flex:1}.work-columns{display:grid;grid-template-columns:minmax(260px,38%) minmax(0,1fr);gap:20px;padding:16px}.work-columns h2{font-size:16px;margin-bottom:12px}.work-email{border-right:1px solid var(--portal-border);padding-right:16px;min-width:0}.work-message{padding:12px 0;border-bottom:1px solid var(--portal-border);overflow-wrap:anywhere}.work-message-id{overflow-wrap:anywhere}.work-form{min-width:0}.work-form fieldset{min-width:0}.work-form .mailbox-fields{max-width:none}.work-draft{min-height:160px}.work-management,.work-history{margin:0 16px 16px;padding:12px;border:1px solid var(--portal-border);border-radius:4px}
@media(max-width:800px){.work-columns{grid-template-columns:1fr}.work-email{border-right:0;border-bottom:1px solid var(--portal-border);padding:0 0 16px}.queue-controls>div{flex:1 1 160px}.work-record .record-header h1{font-size:18px}}

.queue-table td:nth-child(4)>a{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.queue-table td:nth-child(3){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.queue-table td:nth-child(3)>div{overflow:hidden;text-overflow:ellipsis}

/* Queue headings share one baseline, including non-filtered columns. */
.queue-table thead th{vertical-align:middle}.queue-table thead .excel-trigger,.queue-column-label{display:flex;align-items:center;min-height:28px;line-height:20px;padding:4px 0;margin:0;font-size:14px;font-weight:600}.queue-priority-check{width:16px;height:16px;vertical-align:middle;margin:0;accent-color:var(--portal-blue);cursor:pointer}.queue-priority-check:disabled{cursor:default}

/* Queue fills the available window; controls wrap above its scroll area. */
.app-shell:has(.queue-page){height:100dvh;display:flex;flex-direction:column;overflow:hidden}
.app-shell:has(.queue-page)>header,.app-shell:has(.queue-page)>footer{flex-shrink:0}
.app-shell:has(.queue-page)>main{flex:1;min-height:0;display:flex;flex-direction:column}
.queue-page{flex:1;min-height:0;display:flex;flex-direction:column;overflow:auto}
.queue-page>.queue-viewport{flex:1;min-height:180px;height:auto}
.queue-page>.record-footer{margin-top:auto}
.app-shell:has(.queue-page)>footer{margin-top:12px!important}
/* Accessible aging labels share the light/dark theme. */
.age-flag{display:inline-block;font-size:12px;line-height:18px;border:1px solid currentColor;border-radius:4px;padding:0 5px;margin:2px 0 2px 4px;white-space:nowrap}
.age-normal{color:#27643c;background:#edf7ef}.age-attention{color:#785400;background:#fff4cf}.age-overdue{color:#a32626;background:#ffe9e9}
:root[data-theme="dark"] .age-normal{color:#a5deb6;background:#183725}:root[data-theme="dark"] .age-attention{color:#f7d878;background:#423819}:root[data-theme="dark"] .age-overdue{color:#ffb0b0;background:#492626}
@media(prefers-color-scheme:dark){:root[data-theme="system"] .age-normal{color:#a5deb6;background:#183725}:root[data-theme="system"] .age-attention{color:#f7d878;background:#423819}:root[data-theme="system"] .age-overdue{color:#ffb0b0;background:#492626}}
.supervisor-table{min-width:1000px}.supervisor-table td{vertical-align:top}.supervisor-table tr{min-height:100px}.supervisor-table th:nth-child(1){width:20%}.supervisor-table th:nth-child(2){width:30%}
.sop-document-row{display:grid;grid-template-columns:minmax(120px,2fr) minmax(120px,1fr) auto auto;gap:8px;align-items:center;margin-top:8px}
@media(max-width:650px){.sop-document-row{grid-template-columns:1fr 1fr}}
/* Shared feedback: stable page layout, compact type, theme tokens. */
.portal-message{position:fixed;top:100px;right:24px;z-index:1200;display:flex;align-items:start;gap:10px;width:min(400px,calc(100vw - 32px));padding:14px;border:1px solid var(--portal-border);border-left:4px solid #367bbd;border-radius:6px;background:var(--portal-surface,#fff);color:var(--portal-ink,#212529);box-shadow:0 4px 18px #0003;font-size:14px;overflow-wrap:anywhere}.portal-message-success{border-left-color:#21854a}.portal-message-warning{border-left-color:#bd861b}.portal-message-error{border-left-color:#cc4545}.portal-message>div{flex:1}.portal-message button{border:0;background:transparent;color:inherit;padding:0 4px;font-size:20px;line-height:1}.portal-dialog{width:min(480px,calc(100vw - 32px));max-height:calc(100dvh - 48px);overflow:auto;padding:24px;border:1px solid var(--portal-border);border-radius:8px;background:var(--portal-surface,#fff);color:var(--portal-ink,#212529);font-size:14px;box-shadow:0 8px 32px #0005}.portal-dialog::backdrop{background:#0007}.portal-field-error{padding:10px;border:1px solid #cc4545;border-radius:4px;color:var(--portal-ink);font-size:14px}.portal-dialog .form-control,.portal-dialog .form-select{width:100%;max-width:none}@media(max-width:600px){.portal-message{top:84px;right:16px}.portal-dialog{padding:16px}}
.broker-add-panel { margin-top:8px; padding:12px; border:1px solid var(--portal-border); background:var(--portal-surface); border-radius:6px; font-size:14px; }

.email-addresses { display:grid; grid-template-columns:6rem minmax(0,1fr); gap:.35rem .75rem; font-size:14px; }
.email-addresses dt,.email-addresses dd { margin:0; overflow-wrap:anywhere; }
.email-attachments { display:flex; flex-wrap:wrap; gap:.5rem; margin:1rem 0; }
.email-body-frame { display:block; width:100%; height:65vh; min-height:320px; border:1px solid var(--border-color,#cbd5e1); background:white; }
.email-header { overflow-wrap:anywhere; margin:.25rem 0; }
@media (max-width:600px) { .email-addresses { grid-template-columns:4rem minmax(0,1fr); } .email-body-frame { height:60vh; min-height:240px; } }

.rich-email-editor .ql-editor{min-height:220px;font:inherit;color:var(--portal-text,var(--bs-body-color));overflow-wrap:anywhere}.rich-email-editor .ql-container,.rich-email-editor .ql-toolbar{border-color:var(--portal-border);background:var(--portal-bg,var(--bs-body-bg))}.rich-email-editor .ql-toolbar button{min-height:28px}.rich-email-editor .ql-stroke{stroke:var(--bs-body-color)}.rich-email-editor .ql-fill{fill:var(--bs-body-color)}.rich-email-editor .ql-picker{color:var(--bs-body-color)}.rich-email-editor .ql-disabled{opacity:.8}.reply-html-preview{width:100%;min-height:250px;border:1px solid var(--portal-border);background:white}

.broker-sync-page .sync-evidence{min-width:18rem;max-width:30rem}.broker-sync-page .record-footer{display:flex;flex-wrap:wrap;gap:8px}.broker-sync-page .record-content-scroll .table-responsive{overflow-x:auto}

/* Directory scrolling stays local after loading; fixed row content protects virtual spacing. */
.broker-directory-page .user-browse-viewport{flex:1;min-height:0;height:auto}
.broker-directory-page .user-browse-row td{height:56px;box-sizing:border-box;padding-top:7px;padding-bottom:7px}
.broker-directory-page .browse-ellipsis{line-height:20px;max-height:20px}

.assignment-browse-viewport{flex:1;min-height:0;overflow:auto;border:1px solid var(--portal-border)}
.assignment-browse-table{table-layout:fixed;min-width:1900px;width:100%;margin:0}
.assignment-browse-table th{position:sticky;top:0;z-index:1;background:var(--portal-bg);height:44px}
.assignment-browse-table th:last-child{width:225px}
.catalog-browse-row{height:56px}.catalog-browse-row td{height:56px;padding-top:7px;padding-bottom:7px;vertical-align:middle}.catalog-browse-row .browse-ellipsis{line-height:20px;max-height:20px}
.catalog-maintenance-actions{display:flex;align-items:center;gap:6px;white-space:nowrap}.catalog-maintenance-actions .btn{height:36px;padding:7px 10px;line-height:20px}
.broker-directory-page .user-browse-table{min-width:1600px}.broker-directory-page .user-browse-table th{width:auto}.broker-directory-page .user-browse-table th:first-child{width:25%}.broker-directory-page .user-browse-table th:last-child{width:225px}

/* Maintenance grids share the broker directory's available-height layout. */
.maintenance-browse-page .user-browse-viewport{flex:1;min-height:0;height:auto}
.maintenance-browse-page .browse-heading,.maintenance-browse-page .browse-summary{flex-shrink:0}
.maintenance-browse-page .user-browse-row td{height:56px;box-sizing:border-box;padding-top:7px;padding-bottom:7px}
.maintenance-browse-page .browse-ellipsis{line-height:20px;max-height:20px}
.users-maintenance-page .user-browse-table{min-width:1000px}
.users-maintenance-page .user-browse-table th:nth-child(1){width:25%}
.users-maintenance-page .user-browse-table th:nth-child(2){width:10%}
.users-maintenance-page .user-browse-table th:nth-child(3){width:20%}
.users-maintenance-page .user-browse-table th:nth-child(4){width:18%}
.users-maintenance-page .user-browse-table th:nth-child(5){width:18%}
.users-maintenance-page .user-browse-table th:nth-child(6){width:9%}

.maintenance-browse-page>.table-responsive{flex:1;min-height:0;overflow:auto;border:1px solid var(--portal-border)}
.maintenance-browse-page>.table-responsive>table{margin:0}
.maintenance-browse-page>.table-responsive>table>thead>tr>th,.maintenance-browse-page .catalog-table>thead>tr>th{position:sticky;top:0;z-index:1;background:var(--portal-bg);height:44px}
.maintenance-browse-page>p,.maintenance-browse-page>.mailbox-toolbar,.maintenance-browse-page>.record-footer{flex-shrink:0}

.browse-grid{display:flex;flex-direction:column;min-height:0;gap:12px}.maintenance-browse-page>.browse-grid{flex:1}.browse-grid-viewport{flex:1;min-height:0;max-height:65vh;border:1px solid var(--portal-border);overflow:auto}.maintenance-browse-page>.browse-grid>.browse-grid-viewport{max-height:none}.browse-grid table{margin:0;min-width:650px}.browse-grid thead th{position:sticky;top:0;z-index:1;height:44px;background:var(--portal-bg)}.browse-grid td{vertical-align:middle}.browse-grid td .btn{margin:0 4px 4px 0}.browse-grid .browse-summary{flex-shrink:0;margin:0}

.recovery-notice{position:fixed;right:16px;bottom:52px;z-index:1060;display:flex;align-items:center;gap:12px;max-width:min(620px,calc(100vw - 32px));padding:12px 16px;background:var(--portal-surface);color:var(--portal-ink);border:1px solid var(--portal-border);box-shadow:0 2px 8px #0002;font-size:14px}.recovery-notice .btn{flex-shrink:0}@media(max-width:600px){.recovery-notice{left:16px;right:16px;bottom:16px;flex-wrap:wrap}}
.queue-page>.browse-grid{flex:1}.supervisor-grid table{min-width:1450px}.supervisor-grid .browse-grid-viewport{max-height:none}.supervisor-grid td{vertical-align:top}
.record-page>.browse-grid{flex:1}.record-page>.browse-grid>.browse-grid-viewport{max-height:none}.broker-directory-page .browse-grid .user-browse-table{min-width:1600px}.assignment-browse-page .browse-grid .assignment-browse-table{min-width:1900px}

/* A lost session keeps the current page visible until the user chooses to reload. */
#components-reconnect-modal .components-reconnect-first-attempt-visible,#components-reconnect-modal .components-reconnect-repeated-attempt-visible,#components-reconnect-modal .components-reconnect-failed-visible,#components-reconnect-modal .components-pause-visible,#components-reconnect-modal .components-resume-failed-visible,#components-reconnect-modal .components-rejoining-animation{display:none}
#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible,#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible,#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible,#components-reconnect-modal.components-reconnect-paused .components-pause-visible,#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible{display:block}
#components-reconnect-modal:not([open]){display:none}

/* Keep menu actions visible; only the value list scrolls on short or narrow screens. */
.excel-menu{display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box}
.excel-menu>*:not(.excel-values){flex-shrink:0}
.excel-menu .excel-values{flex:1 1 240px;height:240px;min-height:0;overflow:auto}
.excel-menu .excel-actions{margin-top:auto;padding-top:8px}
.excel-date-menu{overflow:auto}

/* Keep report selection and export actions visible while the report itself scrolls. */
.app-shell:has(.report-page){height:100dvh;display:flex;flex-direction:column;overflow:hidden}
.app-shell:has(.report-page)>.app-header,.app-shell:has(.report-page)>footer{flex-shrink:0}
.app-shell:has(.report-page)>.app-header{position:relative;z-index:20}
.app-shell:has(.report-page)>main{flex:1;min-height:0}
.app-shell:has(.report-page)>footer{margin-top:12px!important}
.report-page{height:100%;min-height:0;display:flex;flex-direction:column}
.report-controls{flex-shrink:0;background:var(--portal-bg);padding:4px 0 12px;border-bottom:1px solid var(--portal-border);max-height:45dvh;overflow:auto}
.report-controls .browse-heading{margin:0 0 16px}
.report-filter-fields>div{min-width:0;justify-content:flex-start}
.report-filter-fields .form-label{white-space:normal}
.report-filter-fields #report-display-zone{width:100%}
.report-page>.record-footer{gap:8px}
@media(max-width:600px){.report-filter-fields{grid-template-columns:minmax(0,1fr)}.report-controls{max-height:40dvh}.report-controls .browse-heading{margin-bottom:12px}}
.report-controls>.small{margin-bottom:8px;overflow-wrap:anywhere}
.report-body{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding-top:12px;scrollbar-gutter:stable}
.report-body:focus-visible{outline:2px solid var(--portal-blue);outline-offset:-2px}
@media print{.app-shell:has(.report-page){height:auto;overflow:visible}.report-page{height:auto}.report-controls{max-height:none;overflow:visible}.report-body{overflow:visible}}

/* Management report: restrained typography, summary cards and progressive disclosure. */
.report-summary,.report-supporting{max-width:1440px;margin:0 auto}
.report-document{color:var(--portal-ink);font-size:14px;line-height:1.55;padding:8px 4px 20px}
.report-masthead{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:8px 0 24px}
.report-eyebrow{font-size:11px;letter-spacing:1.5px;font-weight:600;color:var(--portal-muted);margin-bottom:6px}
.report-masthead h2{font-size:25px;font-weight:600;margin:0 0 6px}.report-masthead p{margin:0;color:var(--portal-muted)}
.report-masthead img{width:220px;max-width:30%;height:auto}
.report-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:20px}
.report-kpi{background:var(--portal-surface);border:1px solid var(--portal-border);border-radius:8px;padding:20px}
.report-kpi>span{display:block;color:var(--portal-muted);font-size:13px}.report-kpi>strong{display:block;font-size:32px;font-weight:600;margin:4px 0;color:var(--portal-ink)}.report-kpi>small{display:block;color:var(--portal-muted);font-size:12px}
.report-context{padding:12px 16px;border-left:3px solid var(--portal-blue);background:var(--portal-surface);margin-bottom:24px;color:var(--portal-muted);font-size:13px}.report-context p{margin:2px 0}.report-context strong{font-weight:600;color:var(--portal-ink)}
.report-overview-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:20px}
.report-panel{background:var(--portal-surface);border:1px solid var(--portal-border);border-radius:8px;padding:22px;min-width:0}
.report-document h3{font-size:17px;font-weight:600;margin:0 0 8px}.report-document h4{font-size:15px;font-weight:600;margin:0 0 8px}
.report-note{font-size:12px;color:var(--portal-muted);margin:0 0 18px;max-width:1100px}.report-empty{color:var(--portal-muted);font-size:13px;padding:16px 0}
.report-bar-row{margin:22px 0}.report-bar-row>div:first-child{display:flex;justify-content:space-between;gap:20px;margin-bottom:8px}.report-bar-row strong{font-weight:600}.report-bar-track{height:8px;background:var(--portal-bg);border-radius:4px;overflow:hidden}.report-bar-track span{display:block;height:100%;background:#347aa5;border-radius:4px}
.report-timing-list>div{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:11px 0;border-bottom:1px solid var(--portal-border)}.report-timing-list>div:last-child{border-bottom:0}.report-timing-list strong{text-align:right;font-size:14px;font-weight:600;white-space:nowrap}.report-timing-list small{display:block;color:var(--portal-muted);font-size:11px;font-weight:400;margin-top:3px}
.report-table-scroll{overflow-x:auto}.report-data-table{width:100%;border-collapse:collapse;font-size:13px}.report-data-table th{font-size:12px;font-weight:600;color:var(--portal-muted);text-align:left;padding:12px 14px;background:var(--portal-bg);border-bottom:1px solid var(--portal-border);white-space:nowrap}.report-data-table td{padding:12px 14px;border-bottom:1px solid var(--portal-border);vertical-align:top}.report-data-table tr:last-child td{border-bottom:0}.report-data-table th.report-number,.report-data-table td.report-number{text-align:right}.report-data-table td:first-child{min-width:160px}.report-data-table tbody tr:hover{background:var(--portal-hover)}
.report-detail-heading{margin:28px 0 16px}.report-detail-heading p{font-size:13px;color:var(--portal-muted);margin:0}
.report-detail{border:1px solid var(--portal-border);border-radius:8px;background:var(--portal-surface);margin:10px 0;padding:0}.report-detail>summary{cursor:pointer;padding:16px 20px;color:var(--portal-ink);display:flex;align-items:center;justify-content:space-between;gap:16px;list-style:none}.report-detail>summary::-webkit-details-marker{display:none}.report-detail>summary::after{content:'+';font-size:22px;color:var(--portal-muted);font-weight:400}.report-detail[open]>summary::after{content:'−'}.report-detail>summary strong{font-size:14px;font-weight:600}.report-detail>summary small{display:block;font-size:12px;color:var(--portal-muted);margin-top:3px}.report-detail>summary:focus-visible{outline:2px solid var(--portal-blue);outline-offset:-2px}.report-detail-content{padding:8px 20px 20px}.report-analysis-table{margin:12px 0 28px}.report-detail-content>p{font-size:13px;color:var(--portal-muted)}
.report-export-note{font-size:12px;color:var(--portal-muted);margin:22px 0 8px}.report-alert{border:1px solid #d4a251;border-radius:6px;background:var(--portal-surface);padding:14px 16px;margin-bottom:18px;font-size:13px}
.report-supporting .card{border:0!important;margin:0!important}
@media(max-width:800px){.report-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.report-overview-grid{grid-template-columns:1fr}.report-masthead h2{font-size:21px}.report-masthead{gap:12px}.report-masthead img{width:170px}.report-panel{padding:16px}}
@media print{.report-detail-content{display:block!important}.report-detail{break-inside:avoid}.report-kpis{grid-template-columns:repeat(4,1fr)}}

.report-explanation{background:var(--portal-bg);border-left:2px solid var(--portal-border);padding:10px 14px;margin:12px 0 20px;font-size:12px;color:var(--portal-muted)}.report-explanation p{margin:4px 0}.report-explanation strong{display:block;color:var(--portal-ink);font-size:11px;font-weight:600;margin:6px 0 2px}.report-section-help{margin:12px 0}.report-section-help>summary{font-size:12px;color:var(--portal-muted);cursor:pointer}.report-section-help .report-explanation{margin-bottom:12px}
.report-settings{max-width:1440px;margin:0 auto}.report-settings>.card{padding:24px!important}.report-settings .mailbox-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px;align-items:start}.settings-page.report-settings .mailbox-fields .form-label{min-height:40px;display:flex;align-items:flex-end;margin-bottom:8px}.report-settings .form-control,.report-settings .form-select{min-height:38px}.report-settings .mailbox-fields .small{margin-top:8px}.report-settings #report-data-age{max-width:280px;margin-bottom:20px}.report-settings #report-holidays{max-width:580px}.report-settings .report-service-days{margin:4px 0 20px}.report-settings legend{font-size:14px;font-weight:600;margin-bottom:10px}.report-settings .queue-task-line{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:10px;margin:12px 0}.report-settings .queue-task-line label,.report-settings-toggle{display:flex;align-items:center;gap:9px;line-height:1.4}.report-settings .queue-task-line label{padding:10px;border:1px solid var(--portal-border);border-radius:4px;background:var(--portal-bg)}.report-settings input[type=checkbox]{width:16px;height:16px;margin:0;flex:0 0 16px;vertical-align:middle}.report-settings .report-wait-exclusions{grid-template-columns:repeat(auto-fit,minmax(245px,1fr))}.report-settings .table th,.report-settings .table td{vertical-align:middle;padding:12px}.report-settings .report-sla-targets th:not(:first-child),.report-settings .report-sla-targets td:not(:first-child){width:200px}.report-settings .report-sla-targets input{max-width:170px;text-align:right}.report-settings .report-recipients th:first-child,.report-settings .report-recipients td:first-child,.report-settings .report-schedules th:first-child,.report-settings .report-schedules td:first-child{text-align:center;width:80px}.report-settings .report-recipients td:nth-child(2){width:140px}.report-settings .report-recipients td:last-child{width:120px}.report-settings .report-schedules{min-width:1050px}.report-settings .report-schedules td:nth-child(2){width:145px}.report-settings .report-schedules td:nth-child(3){width:110px}.report-settings .report-schedules td:nth-child(4){width:170px}.report-settings .report-schedules td:nth-child(5){width:230px}.report-settings .report-schedules td:nth-child(6),.report-settings .report-schedules td:nth-child(7){width:105px;text-align:center}.report-settings .table .btn{white-space:nowrap;min-height:var(--portal-button-height)}.report-settings .small{color:var(--portal-muted)}
@media(max-width:1050px){.report-settings .mailbox-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.report-settings .mailbox-fields{grid-template-columns:1fr}.report-settings .mailbox-fields .form-label{min-height:0}.report-settings>.card{padding:16px!important}}

#report-display-zone{width:340px;max-width:100%}.report-timezone-note{font-size:12px;color:var(--portal-muted);padding:10px 14px;border:1px solid var(--portal-border);border-radius:6px;margin:0 0 20px}.report-email-timezone{max-width:650px}.report-controls .small{max-width:1300px}.report-settings #report-zone{width:100%}

/* Source review keeps the email and intake decisions together. */
.intake-review-columns{grid-template-columns:minmax(0,1.65fr) minmax(320px,1fr);align-items:start}
.intake-review-columns .work-email{padding-right:20px}
.work-management.intake-decision{margin:0 0 16px;padding:16px;background:var(--portal-surface,var(--bs-body-bg))}
.intake-decision>summary{font-weight:600;font-size:17px}
.intake-decision .portal-actions{align-items:flex-start}
.intake-decision .btn{white-space:normal}
.work-clearance-details{min-width:0}
.work-clearance-details>summary{font-weight:600;padding:12px 0}
.work-columns:not(.intake-review-columns) .work-clearance-details>summary{display:none}
.email-preview-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.email-preview-toolbar h2{margin:0;font-size:17px}
.email-preview-subject{font-size:15px;overflow-wrap:anywhere}
.work-email-preview{min-width:0}
.work-email-preview .email-attachments{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0}
.work-email-preview .email-attachments .btn{font-size:12px;overflow-wrap:anywhere;max-width:100%;text-align:left;white-space:normal}
.work-email-preview .email-body-frame{height:58vh;min-height:280px}
.email-preview-content .email-addresses{font-size:13px;overflow-wrap:anywhere}
.email-expanded-dialog{width:96vw;max-width:1500px;height:94dvh;max-height:94dvh;padding:20px;border:1px solid var(--portal-border);border-radius:6px;background:var(--bs-body-bg,#fff);color:var(--bs-body-color,#222);overflow:hidden}
.email-expanded-dialog[open]{display:flex;flex-direction:column}
.email-expanded-dialog::backdrop{background:rgba(0,0,0,.55)}
.email-expanded-content{display:flex;flex-direction:column;flex:1;min-height:0;overflow:auto}
.email-expanded-dialog>.email-preview-toolbar{flex-shrink:0}
.email-expanded-content>.email-preview-content{display:flex;flex-direction:column;flex:1;min-height:0}
.email-expanded-content .email-preview-subject,.email-expanded-content .email-addresses,.email-expanded-content .email-attachments{flex-shrink:0}
.email-expanded-content .email-attachments{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0}
.email-expanded-content .email-attachments .btn{white-space:normal;overflow-wrap:anywhere}
.email-expanded-content .email-body-frame{flex:1;min-height:160px;height:auto;margin-bottom:0}
@media(max-width:1000px){.intake-review-columns{grid-template-columns:1fr}.intake-review-columns .work-email{padding:0 0 16px;border-right:0;border-bottom:1px solid var(--portal-border)}.intake-review-columns .work-form{grid-row:1}.email-expanded-dialog{width:98vw;padding:12px}.email-preview-toolbar{flex-wrap:wrap}}

/* Virtualized queue restoration owns the scroll position while rows settle. */
.queue-viewport { overflow-anchor: none; }

/* Allocation matching uses the same screen space as expanded email. */
.allocation-link-dialog{width:96vw;max-width:1500px;height:94dvh;max-height:94dvh;overflow:auto}
.allocation-link-dialog[open]{display:flex;flex-direction:column;gap:0}
.allocation-link-dialog>h2,.allocation-link-dialog>p,.allocation-link-dialog>label,.allocation-link-dialog>.portal-actions,.allocation-link-dialog>input,.allocation-link-dialog>.portal-field-error{flex-shrink:0}
.allocation-link-dialog #allocation-search{flex:1;max-width:none;width:auto;min-width:120px}
.allocation-results{flex:1;min-height:180px;overflow:auto;margin-top:14px;border:1px solid var(--portal-border);border-radius:4px}
.allocation-results-table{width:100%;margin:0;table-layout:fixed}
.allocation-results-table th{position:sticky;top:0;z-index:1;background:var(--portal-surface,#fff)}
.allocation-results-table th:nth-child(1){width:65px}.allocation-results-table th:nth-child(2){width:120px}.allocation-results-table th:nth-child(3){width:40%}.allocation-results-table th:nth-child(5){width:120px}.allocation-results-table th:nth-child(6){width:135px}
.allocation-results-table td{vertical-align:top;overflow-wrap:anywhere;padding:12px 10px}
.allocation-results-table tr.allocation-selected>td{background:var(--portal-selected,#dcecff);color:var(--bs-body-color,#222)}
.allocation-subject{cursor:pointer;display:block}
@media(max-width:800px){.allocation-link-dialog{width:98vw;padding:12px}.allocation-results-table{min-width:850px}}



/* Queue filters share the same label baseline and control dimensions. */
.queue-controls>div{display:flex;flex-direction:column;justify-content:flex-end}
.queue-controls .form-label{display:block;margin:0 0 6px;font-size:var(--portal-text-size);line-height:20px}
.queue-controls .form-select,.queue-controls .form-control{box-sizing:border-box;height:38px;min-height:38px;margin:0;font-size:14px;line-height:20px}
.queue-controls #queue-period{width:150px}
.received-date-dialog{width:min(320px,calc(100vw - 32px));padding:20px}
@media(max-width:800px){.queue-controls #queue-period{width:100%}}



.search-field{position:relative;width:100%;min-width:0}.search-field .form-control{padding-right:36px;width:100%}.search-field-clear{position:absolute;right:5px;top:4px;width:30px;height:30px;padding:0;border:0;border-radius:3px;background:transparent;color:var(--portal-muted);font-size:22px;line-height:28px}.search-field-clear:hover,.search-field-clear:focus-visible{background:var(--portal-hover);color:var(--portal-ink)}

/* A primary browse fills its available page region; embedded lists keep their own bounds. */
.browse-fill-region{display:flex;flex-direction:column;min-height:0}
.browse-fill-region>.browse-grid{flex:1;min-height:0}
.browse-fill-region>.browse-grid>.browse-grid-viewport{max-height:none;min-height:120px}
.browse-fill-region>h2,.browse-fill-region>p,.browse-fill-region>button{flex-shrink:0}
.browse-fill-region>button{align-self:flex-start}
.report-body{display:flex;flex-direction:column}
.report-body>*{flex-shrink:0}
.report-body>.report-history{flex:1 0 360px;margin-bottom:0}
.maintenance-browse-page>h1,.maintenance-browse-page>h2,.maintenance-browse-page>section{flex-shrink:0}
@media print{.report-body{display:block}.report-history,.browse-fill-region>.browse-grid>.browse-grid-viewport{height:auto;min-height:0;max-height:none;overflow:visible}}

/* Attachment previews use the available viewport and retain the underlying work page. */
.attachment-viewer-toolbar{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-shrink:0;margin-bottom:12px}
.attachment-viewer-toolbar h2{font-size:18px;margin:0;overflow-wrap:anywhere;min-width:0}
.attachment-viewer-toolbar>div{display:flex;gap:8px;flex-shrink:0}
.attachment-viewer-frame{width:100%;flex:1;min-height:0;border:1px solid var(--portal-border);background:#fff}
.attachment-image-stage{flex:1;min-height:0;overflow:auto;display:flex;align-items:center;justify-content:center;background:#eee}
.attachment-image-stage img{max-width:100%;max-height:100%;object-fit:contain}
.attachment-preview-help{font-size:12px;margin:8px 0 0;flex-shrink:0}
@media(max-width:700px){.attachment-viewer-toolbar{align-items:flex-start;flex-direction:column}.attachment-viewer-toolbar>div{flex-wrap:wrap}}

.attachment-container-layout{display:flex;flex:1;min-height:0;gap:16px;overflow:auto}
.attachment-email-layout{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(360px,.8fr)}
.attachment-email-message,.attachment-container-files{display:flex;flex-direction:column;min-height:0;min-width:0;flex:1}
.attachment-container-layout h3{font-size:16px;margin:0 0 10px;overflow-wrap:anywhere}
.attachment-email-message .email-addresses{font-size:13px;flex-shrink:0;max-height:180px;overflow:auto}
.attachment-container-files .browse-grid{display:flex;flex-direction:column;flex:1;min-height:0}
.attachment-container-files .browse-grid-viewport{flex:1;min-height:120px}
.attachment-container-files td{overflow-wrap:anywhere}.attachment-container-files td:last-child{min-width:165px}
@media(max-width:900px){.attachment-email-layout{display:flex;flex-direction:column}.attachment-email-message{min-height:50vh}.attachment-container-files{min-height:240px}}

/* Keep help text from shifting adjacent work fields. */
.work-form .mailbox-fields{align-items:start}.work-form .mailbox-fields>div>.form-label{display:block;min-height:20px;line-height:20px;margin-bottom:8px}.response-template .form-select{flex:1;min-width:180px}.response-template .btn{white-space:nowrap}

/* Account settings use the same anchored actions and control sizes as maintenance. */
.account-settings.account-card{width:100%;max-width:none;margin:0;padding:0;overflow:hidden;gap:0}
.account-settings.account-onboarding{width:calc(100% - 24px);max-width:560px;margin:0 auto}
.account-settings .record-body{min-width:0}
.account-settings .record-body>p,.account-settings .record-body>.alert,.account-settings .mailbox-fields,.account-settings .account-field-group{max-width:760px}
.account-settings .account-field{max-width:360px}
.security-policy-page .record-body>p{max-width:760px}
.account-settings .record-header h1{font-size:24px;margin:0}
.account-settings :is(kbd,code){overflow-wrap:anywhere;word-break:break-word}
.account-settings .portal-actions .btn{margin:0}
@media(max-width:600px){.account-settings .record-header h1{font-size:20px}}
.account-settings>.record-header{padding:16px;border-bottom:1px solid var(--portal-border)}
.account-settings .account-title{margin:0}
.account-settings>form.account-auxiliary-form{display:none;flex:none}
.account-settings>form{display:flex;flex-direction:column;flex:1;min-height:0;margin:0}
.account-settings .form-control,.account-settings .form-select{height:38px;min-height:38px}
.account-settings .form-label{line-height:20px;margin-bottom:8px}
.account-settings .record-footer .btn{margin:0}
.account-settings-links{display:flex;flex-wrap:wrap;gap:16px;margin-top:24px}
.settings-checks{display:grid;gap:8px;max-width:760px}
.settings-checks>label{display:flex;align-items:flex-start;gap:8px;line-height:20px;margin:0}
.settings-checks input[type=checkbox]{width:16px;height:16px;flex:0 0 16px;margin:2px 0 0}
.settings-checks>p{margin:0 0 8px 24px}
.settings-confirmation{padding:12px;border:1px solid var(--portal-border);border-radius:4px}

.settings-page .mailbox-fields{align-items:start}
.settings-page .mailbox-fields .form-label{display:block;min-height:20px;margin-bottom:8px;line-height:20px}
.settings-page .mailbox-fields .form-control,.settings-page .mailbox-fields .form-select{min-height:38px}
.settings-page.report-settings{max-width:none;margin:0}
.settings-page .record-footer{display:flex;flex-wrap:wrap;gap:8px}
@media(max-width:600px){.settings-page .mailbox-fields .form-label,.settings-page.report-settings .mailbox-fields .form-label{min-height:0}}
.settings-page label:has(>input[type=checkbox]){display:inline-flex;align-items:flex-start;gap:8px;line-height:20px}
.settings-page label>input[type=checkbox]{width:16px;height:16px;flex:0 0 16px;margin:2px 0 0}
.activity-log-filters{grid-template-columns:minmax(140px,200px) minmax(140px,200px) minmax(180px,440px);gap:16px;flex-shrink:0}
.activity-log-viewport{flex:1;min-height:0;overflow:auto;border:1px solid var(--portal-border);background:var(--portal-surface)}
.activity-log-table{min-width:1200px;margin:0;table-layout:auto}.activity-log-table th{position:sticky;top:0;z-index:1;background:var(--portal-surface)}
.activity-log-table td{vertical-align:middle;max-width:300px;overflow-wrap:anywhere}.activity-log-table td:first-child{white-space:nowrap}.activity-log-table td:last-child{white-space:nowrap}
.activity-time-sort{font:inherit;font-weight:600;color:inherit;background:none;border:0;padding:0;min-height:36px}
.activity-pagination{flex-shrink:0}.activity-details{width:min(840px,calc(100vw - 32px));max-width:840px;height:min(760px,85dvh);max-height:85dvh;padding:0;overflow:hidden}.activity-details[open]{display:flex;flex-direction:column}.activity-details>.record-header{font-size:20px;margin:0;padding:16px;border-bottom:1px solid var(--portal-border);flex-shrink:0}.activity-details>.record-footer{position:static;flex-shrink:0}.activity-details dl{display:grid;grid-template-columns:180px minmax(0,1fr);gap:8px 16px}.activity-details dt,.activity-details dd{margin:0;overflow-wrap:anywhere}.activity-details .record-footer{margin-top:16px}
@media(max-width:600px){.activity-log-filters{grid-template-columns:1fr 1fr;gap:12px}.activity-log-filters>div:last-child{grid-column:1/-1}.activity-details dl{grid-template-columns:1fr;gap:4px}.activity-details dd{margin-bottom:12px}}
/* Keep column filter menus above anchored actions and their choices on separate rows. */
.settings-page th:has(.excel-menu),.settings-page thead:has(.excel-menu){z-index:1200}
.settings-page .excel-menu label.excel-choice{display:flex;align-items:center}

.activity-filter-toggle{display:none}
@media(max-width:600px){.activity-filter-toggle{display:flex;align-items:center;gap:12px;flex-shrink:0}.activity-log-filters:not(.filters-expanded){display:none}}

.activity-log-table .activity-log-row{height:60px}.activity-log-table .activity-log-row td{height:60px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:260px}

.activity-view{width:auto;max-width:100%;min-height:38px}

/* Optional actions share neutral default, hover, active and disabled states in both themes. */
.btn-outline-secondary{--bs-btn-color:var(--portal-ink);--bs-btn-bg:transparent;--bs-btn-border-color:var(--portal-control-border);--bs-btn-hover-color:var(--portal-ink);--bs-btn-hover-bg:var(--bs-tertiary-bg);--bs-btn-hover-border-color:var(--portal-control-border);--bs-btn-active-color:var(--portal-ink);--bs-btn-active-bg:var(--bs-tertiary-bg);--bs-btn-active-border-color:var(--portal-control-border);--bs-btn-disabled-color:var(--portal-muted);--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:var(--portal-border)}

/* Shared grid headers: plain labels and filter/sort controls share one vertical center. */
:is(.table,.report-data-table)>thead>tr>th{height:44px;padding:6px 8px;vertical-align:middle;font-size:var(--portal-text-size);font-weight:600;line-height:20px}
.table>thead>tr>th>:is(.excel-trigger,.browse-sort,.activity-time-sort,.queue-column-label){box-sizing:border-box;min-height:28px;margin:0;padding:4px 0;font:inherit;line-height:20px}

/* Keep return actions at the bottom, including loading and unavailable states. */
.record-page>.record-footer{margin-top:auto}
/* Supervisor content has one vertical scroll owner above the shared action footer. */
.supervisor-content{display:flex;flex-direction:column;gap:12px}
/* Keep results reachable when filters and assistance exceed a short viewport. */
.supervisor-content>*{flex-shrink:0}
.supervisor-content>.browse-grid{flex:0 0 auto}
.supervisor-content>.browse-grid>.browse-grid-viewport{flex:0 0 auto;min-height:0;max-height:none}

.my-settings-body>form{margin:0}.my-settings-password summary{font-weight:600;cursor:pointer}.my-settings-password .portal-actions{margin-top:16px}
.my-settings-body #password-settings:target{outline:2px solid var(--portal-blue);outline-offset:4px}

.my-settings-body .mailbox-fields{align-items:start}

.my-settings-password form{max-width:424px}

.email-envelope{flex-shrink:0}

/* AQUA comparison preserves the current work-item draft. */
.aqua-quote-dialog{width:min(960px,calc(100vw - 32px));padding:0;overflow:hidden}.aqua-quote-dialog[open]{display:flex;flex-direction:column;height:min(760px,calc(100dvh - 48px))}.aqua-quote-dialog .record-header,.aqua-quote-dialog .record-footer{flex-shrink:0;padding:16px}.aqua-quote-dialog .record-body{overflow:auto;min-height:0;padding:16px}.aqua-quote-dialog .form-control{min-height:38px}.aqua-quote-dialog h3,.aqua-quote-dialog p{overflow-wrap:anywhere}

/* Correspondence follows the shared browse controls and bounded preview pattern. */
.work-correspondence{min-width:0;padding:16px;border-bottom:1px solid var(--portal-border)}.work-correspondence h2{font-size:16px;display:flex;gap:8px;flex-wrap:wrap;align-items:baseline}
.correspondence-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:16px 0}.correspondence-controls>div{min-width:0}
.correspondence-controls .form-control,.correspondence-controls .form-select{min-height:38px}
.correspondence-grid{max-height:42vh;border:1px solid var(--portal-border)}.correspondence-grid table{min-width:1000px;margin-bottom:0}
.correspondence-grid th{position:sticky;top:0;background:var(--portal-bg);z-index:1}.correspondence-grid td{max-width:260px;overflow-wrap:anywhere;vertical-align:middle}.correspondence-date{white-space:nowrap}
.correspondence-grid tbody tr>td{background:var(--portal-surface);color:var(--portal-ink)}
.correspondence-grid .correspondence-selected>td{background:var(--portal-hover);color:var(--portal-ink)}
.correspondence-grid .correspondence-selected>td:first-child{box-shadow:inset 3px 0 var(--portal-blue)}
.correspondence-pagination{margin:12px 0}.correspondence-preview{border-top:1px solid var(--portal-border);padding-top:16px;margin-top:16px;min-width:0}
@media(max-width:600px){.correspondence-controls{grid-template-columns:1fr}.correspondence-grid{max-height:45vh}}

.correspondence-grid .correspondence-attachment{width:56px;min-width:56px;max-width:56px;text-align:center}.correspondence-attachment .excel-trigger{position:relative;justify-content:center}.correspondence-attachment .excel-trigger>svg{flex:none}.correspondence-attachment .excel-trigger>span{position:absolute;right:0}.correspondence-attachment>span{display:inline-flex;align-items:center;vertical-align:middle}

.work-help,.work-recovery{margin:12px 16px;padding:12px 16px;border:1px solid var(--portal-border);border-left:3px solid var(--portal-blue);background:var(--portal-hover);border-radius:4px;min-width:0}.work-help details{flex:1;min-width:0}.work-guidance-content{padding:16px 0 0}.work-guidance-content dt{margin-top:12px}.work-guidance-content dd{margin:4px 0}.work-draft-status{margin:8px 16px;font-size:13px;color:var(--portal-muted)}.work-stage-label,.assistance-pending{display:inline-block;padding:2px 8px;background:var(--portal-hover);border:1px solid var(--portal-border);border-radius:4px}.work-columns .work-form h2{padding:8px 12px;border-left:3px solid var(--portal-blue);background:var(--portal-hover)}.work-recovery td{max-width:300px;overflow-wrap:anywhere}.ownership-details{font-size:13px;margin-top:4px}.ownership-details p{max-width:250px;margin:6px 0}.supervisor-assistance{margin-bottom:16px}.supervisor-assistance table{min-width:800px}.supervisor-assistance td{max-width:350px;overflow-wrap:anywhere}

.work-help>.portal-actions>details{flex:1 1 260px;min-width:0}

.work-policy-dates{grid-column:1/-1}

/* Account lockouts reuse the maintenance layout and keep search controls aligned. */
.account-unlock-page{--portal-button-height:38px}.account-unlock-page .browse-filters{align-items:flex-end}.account-unlock-page .browse-filters>.btn{align-self:flex-end}.account-unlock-page .user-browse-viewport table{min-width:700px}.account-unlock-page .user-browse-viewport th{height:44px;position:sticky;top:0;background:var(--portal-bg)}

/* Shared bounded browse rows retain predictable virtual-scroll measurements. */
.record-page,.report-page,.browse-grid{--portal-button-height:38px}.server-browse tbody tr{height:56px}.server-browse tbody td{vertical-align:middle}

/* Keep history rows in view below the report filters at short and narrow sizes. */
.report-controls{max-height:30dvh}
@media(max-width:600px){.report-controls{max-height:26dvh}}

/* Executive overview uses the shared record shell and bounded scrolling regions. */
.exec-page{min-width:0}.exec-header{flex-shrink:0;max-height:36dvh;overflow:auto}.exec-header .browse-heading{margin-bottom:12px}.exec-controls{min-width:0}.exec-filter-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;align-items:start}.exec-filter-fields>div{min-width:0}.exec-filter-fields .form-control,.exec-filter-fields .form-select{height:38px;width:100%;min-width:0}.exec-compare{display:flex;align-items:center;gap:8px;margin:12px 0 4px}.exec-cutoff{margin:8px 0 0}.exec-body{min-height:0;min-width:0}.exec-loading{display:flex;align-items:center;gap:8px;margin:8px 0}.exec-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin-bottom:16px}.exec-kpi{padding:16px;text-align:left;color:var(--portal-ink);background:var(--portal-surface);border:1px solid var(--portal-border);border-radius:2px}.exec-kpi strong{font-size:28px;font-weight:600;line-height:1.4}.exec-kpi small{color:var(--portal-muted)}.exec-kpi:hover{border-color:var(--portal-blue)}.exec-timing-summary{display:flex;flex-wrap:wrap;gap:8px 20px;padding:12px 16px;border:1px solid var(--portal-border);margin-bottom:20px;background:var(--portal-surface)}.exec-chart-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.exec-chart{padding:16px;min-width:0;color:var(--portal-ink);background:var(--portal-surface)}.exec-chart h3{font-size:16px;font-weight:600;margin:0 0 8px}.exec-chart>p{min-height:38px;margin-bottom:12px}.exec-bars{display:grid;gap:10px}.exec-bar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;text-align:left;border:0;background:transparent;color:inherit;padding:4px;width:100%}.exec-bar-label{overflow-wrap:anywhere}.exec-bar-track{grid-column:1/-1;height:12px;background:var(--portal-bg);border:1px solid var(--portal-border);border-radius:2px}.exec-bar-track>span{display:block;height:100%;background:var(--portal-blue);min-width:0}.exec-bar small{grid-column:1/-1;color:var(--portal-muted)}.exec-bar:hover,.exec-value-link:hover,.exec-legend-item:hover{background:var(--portal-bg)}.exec-doughnut-layout{display:flex;align-items:center;gap:16px}.exec-doughnut{width:190px;flex:0 0 190px;max-width:45%}.exec-doughnut text,.exec-line text{fill:var(--portal-ink);font:12px Segoe UI,Arial,sans-serif}.exec-doughnut .exec-donut-total{font-size:24px;font-weight:600}.exec-legend{flex:1;min-width:0;display:grid;gap:8px}.exec-legend-item{display:grid;grid-template-columns:12px minmax(0,1fr) auto;align-items:center;gap:8px;border:0;background:transparent;color:inherit;text-align:left;padding:6px}.exec-swatch{width:12px;height:12px;background:currentColor}.exec-legend-item>span:nth-child(2){overflow-wrap:anywhere}.exec-color-0{color:var(--portal-series-0,#0078d4);stroke:var(--portal-series-0,#0078d4);fill:var(--portal-series-0,#0078d4)}.exec-color-1{color:var(--portal-series-1,#39845b);stroke:var(--portal-series-1,#39845b);fill:var(--portal-series-1,#39845b)}.exec-color-2{color:var(--portal-series-2,#a56b13);stroke:var(--portal-series-2,#a56b13);fill:var(--portal-series-2,#a56b13)}.exec-color-3{color:var(--portal-series-3,#8764b8);stroke:var(--portal-series-3,#8764b8);fill:var(--portal-series-3,#8764b8)}.exec-color-4{color:var(--portal-series-4,#d15f55);stroke:var(--portal-series-4,#d15f55);fill:var(--portal-series-4,#d15f55)}.exec-color-5{color:var(--portal-series-5,#008c95);stroke:var(--portal-series-5,#008c95);fill:var(--portal-series-5,#008c95)}.exec-color-6{color:var(--portal-series-6,#a25a89);stroke:var(--portal-series-6,#a25a89);fill:var(--portal-series-6,#a25a89)}.exec-color-7{color:var(--portal-series-7,#77818b);stroke:var(--portal-series-7,#77818b);fill:var(--portal-series-7,#77818b)}.exec-segment{fill:none;cursor:pointer}.exec-point{cursor:pointer;stroke:var(--portal-surface);stroke-width:2}.exec-line-series{fill:none}.exec-segment:hover,.exec-point:hover{opacity:.7}.exec-segment:focus,.exec-point:focus{outline:3px solid var(--portal-ink);outline-offset:3px}.exec-axis{stroke:var(--portal-border);stroke-width:1}.exec-trend-scroll{min-width:0;overflow-x:auto}.exec-line{display:block;width:100%;min-width:310px;height:220px}.exec-series-labels{display:flex;flex-wrap:wrap;gap:8px 20px;font-size:13px;margin-bottom:8px}.exec-values{max-height:220px;overflow:auto;display:grid;gap:4px;padding-top:8px}.exec-value-link{display:flex;justify-content:space-between;gap:12px;border:0;padding:8px;text-align:left;background:transparent;color:inherit}.exec-evidence-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:20px;padding-top:16px}.exec-evidence-grid>div{min-width:0}.exec-readiness .table-responsive{max-height:350px}.exec-readiness th{position:sticky;top:0;background:var(--portal-bg)}.exec-empty{padding:20px 0;color:var(--portal-muted)}
@media(max-width:800px){.exec-chart-grid{grid-template-columns:1fr}.exec-header{max-height:32dvh}.exec-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.exec-doughnut-layout{gap:8px}.exec-doughnut{flex-basis:150px}.exec-chart{padding:12px}.exec-readiness{min-width:0}.exec-page .record-footer{flex-wrap:wrap}}

.exec-filter-drawer>summary{font-weight:600;cursor:pointer;padding:8px 0}.exec-filter-drawer[open]>summary{margin-bottom:8px}.exec-filter-drawer .exec-controls{padding-bottom:8px!important}

/* Shared filters rise above sticky page actions; only their value list scrolls. */
th:has(.excel-menu),thead:has(.excel-menu){z-index:1200}
.excel-menu .excel-values{overscroll-behavior:contain;scrollbar-gutter:stable;scrollbar-width:auto;scrollbar-color:var(--portal-muted) var(--portal-surface)}
.excel-menu .excel-values:focus-visible{outline:2px solid var(--portal-blue);outline-offset:-2px}
.excel-menu .excel-values::-webkit-scrollbar{width:12px;height:12px}
.excel-menu .excel-values::-webkit-scrollbar-track{background:var(--portal-bg)}
.excel-menu .excel-values::-webkit-scrollbar-thumb{background:var(--portal-muted);border:3px solid var(--portal-bg);border-radius:6px}

/* Executive chart drilldown: bounded modal and virtualized snapshot rows. */
.exec-record-dialog{width:calc(100vw - 32px);max-width:1500px;height:calc(100dvh - 48px);max-height:100dvh;padding:0;overflow:hidden;color:var(--portal-ink);background:var(--portal-surface)}
.exec-record-dialog[open]{display:flex;flex-direction:column}.exec-dialog-header,.exec-dialog-footer{padding:16px;flex-shrink:0}.exec-dialog-header{border-bottom:1px solid var(--portal-border)}.exec-dialog-header p{margin:0}.exec-dialog-body{padding:16px;flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:12px}.exec-dialog-body>.browse-grid{flex:1;min-height:160px}.exec-dialog-body .browse-grid-viewport{max-height:none;min-height:140px}.exec-dialog-footer{border-top:1px solid var(--portal-border)}.browse-grid table.exec-record-table{width:2800px;min-width:2800px;table-layout:fixed}.exec-record-table tr{height:56px}.exec-record-table td{height:56px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.exec-record-table th:first-child{width:110px}.exec-dialog-body>.queue-controls{flex-shrink:0}.exec-dialog-body>details{flex-shrink:0;max-height:25dvh;overflow:auto}.exec-dialog-body>p{flex-shrink:0;margin:0}.exec-dialog-body .form-control,.exec-dialog-body .form-select{min-height:38px}
@media(max-width:600px){.exec-record-dialog{width:100vw;max-width:100vw;height:100dvh;margin:0;border-radius:0}.exec-dialog-header,.exec-dialog-footer,.exec-dialog-body{padding:12px}.exec-dialog-body .queue-controls{max-height:25dvh;overflow:auto}.exec-dialog-body>p{font-size:13px}}

.exec-record-table th:nth-child(8),.exec-record-table th:nth-child(11){width:240px}.exec-record-table th:nth-child(3),.exec-record-table th:nth-child(7),.exec-record-table th:nth-child(9),.exec-record-table th:nth-child(10){width:230px}.exec-record-table th:nth-child(5){width:210px}

.exec-dialog-body .queue-controls>button{align-self:flex-end;height:38px;min-height:38px}

.exec-dialog-body .queue-controls>div{flex:0 1 260px;min-width:150px;max-width:100%}.exec-dialog-body .queue-controls .form-label{font-size:14px}
@media(max-width:600px){.exec-dialog-body .queue-controls>div{flex:1 1 150px}}

.exec-record-dialog .browse-grid thead th:has(.excel-menu),.exec-record-dialog .browse-grid thead:has(.excel-menu){z-index:1200}

.header-sound-toggle[aria-pressed="true"]{color:var(--portal-blue);border-color:var(--portal-blue)}.header-sound-toggle svg{flex-shrink:0}

/* Operational mailbox health: separate from the mail sound bell. */
.connection-alerts{position:relative;display:flex;align-items:center}
.connection-alert-toggle{position:relative}.connection-alert-toggle.has-issues{color:var(--bs-danger)}
.connection-alert-count{position:absolute;top:-7px;right:-7px;min-width:18px;height:18px;padding:0 4px;border-radius:9px;background:var(--bs-danger);color:#fff;font-size:11px;line-height:18px;text-align:center}
.connection-alert-backdrop{position:fixed;inset:0;z-index:1498;background:transparent}
.connection-alert-panel{position:fixed;top:74px;right:16px;width:460px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 90px);display:flex;flex-direction:column;z-index:1499;background:var(--portal-surface);color:var(--portal-ink);border:1px solid var(--portal-control-border);border-radius:6px;box-shadow:0 8px 28px #0003;text-align:left;font-size:14px;line-height:1.45}
.connection-alert-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border-bottom:1px solid var(--bs-border-color)}
.connection-alert-filters{display:flex;gap:6px;padding:10px 12px;border-bottom:1px solid var(--bs-border-color)}
.connection-alert-list{overflow-y:auto;min-height:0;overscroll-behavior:contain;scrollbar-gutter:stable}.connection-alert-item{padding:12px;border-bottom:1px solid var(--bs-border-color);overflow-wrap:anywhere}.connection-alert-item:last-child{border-bottom:0}.connection-alert-address{user-select:text;overflow-wrap:anywhere}.connection-alert-footer{padding:10px 12px;border-top:1px solid var(--bs-border-color)}
@media(max-width:600px){.connection-alert-panel{top:68px;right:8px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 80px)}}

/* Reporting fields align independently of adjacent actions/help text. */
.reporting-activity .queue-controls>.btn{height:38px;min-height:38px;align-self:flex-end}
.reporting-activity .mailbox-fields{align-items:start}
.reporting-activity .mailbox-fields .form-label{display:block;margin:0 0 6px;line-height:20px}
.reporting-activity .form-select,.reporting-activity input.form-control{height:38px;min-height:38px}
.reporting-activity textarea.form-control{min-height:56px}

.reporting-activity .reporting-quality>div{flex:0 1 280px;min-width:0;max-width:100%}

.notification-sounds-page .sound-preview-level{max-width:280px}


/* Header action icons use identical boxes and center lines; badges do not change layout. */
.user-operations{align-items:center;gap:8px}
.user-operations .header-theme-toggle{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:34px;min-width:34px;height:34px;min-height:34px;padding:0;line-height:1;vertical-align:middle;flex-shrink:0;position:relative}
.user-operations .header-theme-toggle svg{display:block;width:19px;height:19px;flex-shrink:0}
.workflow-notifications{display:flex;align-items:center;gap:8px;position:relative}
.workflow-inbox-count{position:absolute;top:-7px;right:-7px;min-width:18px;height:18px;padding:0 4px;display:flex;align-items:center;justify-content:center;border-radius:10px;background:var(--portal-blue);color:#fff;font-size:11px;font-weight:600;line-height:18px;border:1px solid var(--portal-surface)}
.workflow-inbox-toggle.has-incoming{animation:notification-incoming .75s ease-in-out 4}
@keyframes notification-incoming{0%,100%{box-shadow:0 0 0 0 transparent}50%{box-shadow:0 0 0 4px var(--portal-hover);border-color:var(--portal-blue);color:var(--portal-blue)}}
@media(prefers-reduced-motion:reduce){.workflow-inbox-toggle.has-incoming{animation:none;border-color:var(--portal-blue);color:var(--portal-blue)}}
.workflow-inbox-panel{position:fixed;right:16px;top:74px;width:480px;max-width:calc(100vw - 32px);max-height:min(650px,calc(100dvh - 160px));display:flex;flex-direction:column;z-index:1499;background:var(--portal-surface);color:var(--portal-ink);border:1px solid var(--portal-border);border-radius:4px;box-shadow:0 4px 12px #0002;text-align:left}
.workflow-inbox-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border-bottom:1px solid var(--portal-border);flex-shrink:0}
.workflow-inbox-help{padding:10px 12px;margin:0;flex-shrink:0}.workflow-inbox-list{min-height:80px;overflow:auto;overscroll-behavior:contain;flex:1}
.workflow-inbox-item{padding:12px;border-top:1px solid var(--portal-border);overflow-wrap:anywhere}.workflow-inbox-item.unread{background:var(--portal-hover);border-left:3px solid var(--portal-blue)}
.workflow-inbox-footer{padding:12px;border-top:1px solid var(--portal-border);flex-shrink:0}
@media(max-width:600px){.workflow-inbox-panel{position:fixed;left:16px;right:16px;top:148px;width:auto;max-width:none;max-height:calc(100dvh - 164px)}.workflow-inbox-help{font-size:12px}.workflow-inbox-item .portal-actions>.btn{font-size:13px;padding-left:8px;padding-right:8px}}

.user-operations>.header-theme-toggle>span[aria-hidden]{display:flex;align-items:center;justify-content:center;width:19px;height:19px;font-size:19px;line-height:19px}

.workflow-inbox-pagination{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;border-top:1px solid var(--portal-border);flex-shrink:0}

.workflow-inbox-toggle.has-incoming.incoming-0{animation-name:notification-incoming-again}
@keyframes notification-incoming-again{0%,100%{box-shadow:0 0 0 0 transparent}50%{box-shadow:0 0 0 4px var(--portal-hover);border-color:var(--portal-blue);color:var(--portal-blue)}}
@media(prefers-reduced-motion:reduce){.workflow-inbox-toggle.has-incoming{animation:none!important}}

/* Queue history shares the work history table and standard dialog actions. */
.queue-history-dialog{width:min(1000px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:0;overflow:auto;}
.queue-history-dialog .record-header,.queue-history-content,.queue-history-dialog .record-footer{padding:16px;}
.queue-history-dialog .record-footer{position:sticky;bottom:0;background:var(--portal-surface);border-top:1px solid var(--portal-border);}
.queue-activity-hint{position:relative;display:inline-block;}
.queue-activity-hint>summary{cursor:help;list-style:none;text-decoration:underline dotted;text-underline-offset:3px;}
.queue-activity-hint>summary::-webkit-details-marker{display:none;}
.queue-activity-popup{display:none;position:absolute;z-index:20;right:0;top:100%;width:280px;max-width:calc(100vw - 40px);padding:10px;border:1px solid var(--portal-border);background:var(--portal-surface);color:var(--portal-ink);white-space:normal;box-shadow:0 2px 6px #0002;}
.queue-activity-hint:hover .queue-activity-popup,.queue-activity-hint:focus-within .queue-activity-popup,.queue-activity-hint[open] .queue-activity-popup{display:block;}
.queue-history-dialog .btn{min-height:38px;}
.queue-history-dialog .record-header h2{margin:0 0 8px;}
.queue-history-dialog table{min-width:760px;}

/* Keep page resets beside search/selection controls, column clearing with the grid. */
.filter-reset-action{display:flex;align-items:flex-end;justify-content:flex-start;min-width:0;}
.queue-controls>.filter-reset-action{flex:0 0 auto;min-width:0;margin-left:auto;}
.filter-reset-action .btn,.filter-search-reset>.btn{min-height:38px;white-space:nowrap;}
.filter-reset-action>.btn{align-self:flex-end;}
.filter-search-reset{display:flex;align-items:flex-end;gap:8px;flex-wrap:wrap;margin-bottom:16px;}
.filter-search-reset>.search-field{flex:1;min-width:200px;}
.correspondence-controls{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;align-items:end;}
.correspondence-controls>.filter-reset-action{justify-content:flex-end;}

@media(max-width:600px){.correspondence-controls{grid-template-columns:1fr;}}
.queue-paperclip{display:inline-flex;align-items:center;vertical-align:middle;margin-right:5px;color:var(--portal-ink);}
.queue-paperclip:focus-visible{outline:2px solid var(--portal-blue);outline-offset:2px;}

/* Queue row actions remain together; narrow screens scroll the existing grid. */
.queue-table{min-width:1250px;}
.queue-table th:last-child{width:240px;}
.queue-table td:last-child>.portal-actions{flex-wrap:nowrap;white-space:nowrap;}
.queue-table td:last-child>.portal-actions>.btn{min-height:38px;}
/* Notification timestamps retain their own sort, separate from email receipt. */
.queue-table{min-width:1450px;}
.queue-table th:nth-child(8){width:190px;}
.queue-notification>span{display:block;}

.queue-table thead th:has(.excel-menu){z-index:1200;}

.supervisor-role-filters{min-width:0;margin:0 0 12px;padding:0;border:0;}
.supervisor-role-filters legend{float:none;width:auto;margin:0 0 4px;font-size:14px;line-height:20px;}
.supervisor-role-filters .portal-actions{gap:8px 20px;}
.supervisor-role-filters label{display:flex;align-items:center;gap:8px;min-height:38px;margin:0;cursor:pointer;}
.supervisor-role-filters input{width:16px;height:16px;accent-color:var(--portal-blue);}
.supervisor-role-filters p{margin:4px 0 0;}

/* Reporting sections share the executive overview layout and theme. */
.performance-sections{margin:16px 0;flex-wrap:wrap}.overview-guide summary{cursor:pointer;font-weight:600}.overview-guide dd{margin:4px 0 12px}.overview-guide dl{margin-bottom:0}
.performance-sections + p{margin-top:12px}.exec-body .table .exec-value-link{padding:0;min-height:28px;white-space:nowrap}

/* Shared workforce settings: consistent fields and section-local actions. */
.performance-settings-sections{display:grid;gap:16px;border:0;margin:0;padding:0;min-width:0}
.performance-settings-sections>section{min-width:0}
.performance-settings .h5{margin-bottom:8px}
.performance-settings .form-label{display:block;line-height:20px;margin:0 0 8px}
.performance-calendar-fields{display:grid;grid-template-columns:repeat(2,minmax(0,420px));gap:20px 24px;align-items:start}
.performance-calendar-fields>div,.performance-workdays{min-width:0}
.performance-workdays{border:0;margin:0;padding:0}
.performance-workdays legend{float:none;width:auto;font-size:var(--portal-text-size)}
.performance-day-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.performance-day-options label,.performance-setting-toggle{display:flex;align-items:center;gap:8px;line-height:20px}
.performance-day-options label{min-height:38px}
.performance-settings input[type=checkbox]{width:16px;height:16px;flex:0 0 16px;margin:0}
.performance-setting-toggle{margin-bottom:8px}
.performance-field-help{margin:8px 0 0}
.performance-settings .table{margin-bottom:0;table-layout:fixed}
.performance-settings .table td{vertical-align:middle}
.performance-settings .form-control:not(textarea),.performance-settings .form-select{height:38px;min-height:38px}
.performance-settings .performance-number{width:144px;max-width:100%}
.performance-number-column{width:180px}.performance-role-column{width:160px}
.performance-target-table,.performance-effort-table{min-width:600px}
.performance-adjustment-table{min-width:780px}
.performance-adjustment-table th:first-child{width:36%}
.performance-adjustment-table th:nth-child(2){width:24%}
.performance-adjustment-table th:nth-child(3){width:24%}
.performance-adjustment-table th:last-child{width:16%}
.performance-settings .performance-section-actions{justify-content:flex-start;margin:0 0 16px}
.performance-empty{margin:0;padding:12px;border:1px solid var(--portal-border);background:var(--portal-bg)}
.performance-settings-help{margin-top:12px}
.performance-settings-help summary{cursor:pointer}
.performance-settings-help p{margin:8px 0 0}
@media(max-width:700px){.performance-calendar-fields{grid-template-columns:minmax(0,1fr)}.performance-day-options{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Executive, division reports and workforce performance share reporting controls. */
.analytics-page>.record-header{max-height:46dvh;overflow:auto;padding-top:4px;padding-bottom:12px}
.analytics-page .browse-heading{margin-bottom:12px}
.analytics-page .browse-heading p{color:var(--portal-muted)}
.analytics-page .analytics-filter-fields{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:start;gap:12px;padding:8px 0;width:100%}
.analytics-filter-fields>div{min-width:0}
.analytics-filter-fields .form-label{display:flex;align-items:flex-end;min-height:20px;line-height:20px;margin:0 0 8px;white-space:normal}
.analytics-filter-fields .form-control,.analytics-filter-fields .form-select{width:100%;min-width:0;height:38px}
.analytics-page .overview-guide{margin-bottom:16px}
.analytics-page .overview-guide+.performance-sections{margin-top:0}
.analytics-page .report-body> .portal-actions{margin-bottom:16px!important}

.analytics-page .report-body{padding:12px 0 0;min-width:0}
.analytics-page .report-summary,.analytics-page .report-supporting{width:100%;max-width:none;min-width:0;margin-left:0;margin-right:0}
.analytics-page .report-masthead>div{min-width:0;overflow-wrap:anywhere}
.report-footer-more{position:relative;align-self:center}
.report-footer-more>summary{list-style:none;cursor:pointer}
.report-footer-more>summary::-webkit-details-marker{display:none}
.report-footer-more-menu{position:absolute;left:0;bottom:calc(100% + 8px);z-index:20;display:grid;gap:8px;padding:12px;border:1px solid var(--portal-border);background:var(--portal-surface);min-width:230px}
.report-footer-more-menu>.btn{justify-content:flex-start}
@media(max-width:600px){.report-footer-more-menu{left:auto;right:0}}

/* Response composing uses available space; lookup and address fields stay compact. */
.record-body>fieldset.email-compose-surface{max-width:none;width:100%;min-width:0}
.email-composition{min-width:0}
.email-composition .email-subject,.email-composition .rich-email-editor{width:100%;max-width:none;min-width:0}
.email-composition .rich-email-editor .ql-container{height:clamp(320px,55dvh,1200px);min-height:320px;resize:vertical;overflow:auto}
.email-composition .rich-email-editor .ql-editor{min-height:100%;height:100%;overflow:auto}
.email-composition .rich-email-editor .ql-editor img,.email-signature-preview img{max-width:100%;height:auto}
.email-signature-preview{padding:12px;border:1px solid var(--portal-border);background:var(--portal-bg);overflow-wrap:anywhere;min-width:0}
.email-signature-preview p{margin-bottom:8px}
@media(max-width:600px){.email-composition .rich-email-editor .ql-container{height:clamp(240px,45dvh,420px);min-height:240px}}

/* Work and standalone replies fit the signature and initial typing space. */
.email-composition .rich-email-editor.fit-initial-content .ql-container{height:220px;min-height:200px;overflow:hidden}

.email-composition .rich-email-editor .ql-container:not(.ql-disabled){background:var(--portal-surface)}
.email-composition .rich-email-editor .ql-container.ql-disabled{background:var(--portal-bg)}

/* Account entry and legacy account pages share the standard form surface. */
.account-entry-card{max-width:440px;background:var(--portal-surface)}
.account-card:not(.account-settings) h1{font-size:24px;line-height:1.3;margin-bottom:12px}
.account-settings>.record-footer>form{margin:0}

/* Login keeps its established left alignment; attachment filter arrows do not offset the icon. */
.account-login-card{margin-left:0;margin-right:auto}
.reply-original-expanded{box-sizing:border-box;display:block;max-height:none;min-height:0;height:250px}

.work-claim-conflict{--portal-button-height:38px}.work-claim-conflict .btn{min-height:38px}

/* BPO queue is the shared reference: page reset at the filter row end,
   column clearing at the right above its table. */
.filter-reset-button{margin-left:auto;align-self:flex-end;}
.browse-summary>.browse-toolbar-actions,.browse-summary>.portal-actions{margin-left:auto;}
.browse-summary .btn{min-height:38px;}
.work-history-controls{align-items:flex-end;}
.work-history-controls>label{display:flex;align-items:center;gap:8px;margin:0 0 8px;}
.cabinet-filter-controls .cabinet-show-deleted{margin:0;align-self:center;}
.activity-log-filters{grid-template-columns:minmax(140px,200px) minmax(140px,200px) minmax(180px,1fr) minmax(160px,200px) auto;max-width:none;}
.activity-log-filters>.filter-reset-action{justify-content:flex-end;align-self:end;}
@media(max-width:1000px){.activity-log-filters{grid-template-columns:repeat(2,minmax(0,1fr));}.activity-log-filters>.filter-reset-action{grid-column:1/-1;}}
@media(max-width:600px){.analytics-page .analytics-filter-fields>.filter-reset-action{grid-column:1/-1;}.activity-log-filters{grid-template-columns:minmax(0,1fr);}}

/* Reporting filter hierarchy follows the shared queue/record layout. */
.analytics-filter-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:8px 0;}
.analytics-filter-actions>.btn{margin-left:auto;min-height:38px;flex:0 0 auto;}
.analytics-filter-actions .exec-compare{margin:0;min-height:38px;}
.analytics-filter-help{margin:4px 0;}
.analytics-pending{margin:8px 0;padding:8px 12px;border-left:3px solid var(--portal-blue);background:var(--portal-surface);}
.analytics-display-options>summary{cursor:pointer;padding:8px 0;}
.analytics-page .table{width:100%;}
@media(max-width:1100px){.analytics-page .analytics-filter-fields,.analytics-page .analytics-view-filters{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:800px){.analytics-page .analytics-filter-fields,.analytics-page .analytics-view-filters{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:600px){.analytics-page .analytics-filter-fields,.analytics-page .analytics-view-filters{grid-template-columns:minmax(0,1fr);}.analytics-filter-actions{flex-wrap:wrap;}.analytics-filter-actions .exec-compare{width:100%;}.analytics-page .exec-header,.analytics-page .report-controls{max-height:30dvh;}}

.analytics-page>.record-body{padding:16px 0;}

.analytics-display-options .analytics-filter-fields{grid-template-columns:minmax(0,420px);}

.settings-sections{min-width:0;width:100%;}

/* Filters and results share one content scroll area; titles and actions stay visible. */
.page-content-scroll{flex:1;min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;}
.page-content-scroll>.exec-header,.page-content-scroll>.report-controls{max-height:none;overflow:visible;}
.page-content-scroll>.record-body,.page-content-scroll>.report-body{height:auto;overflow:visible;min-height:0;}
.page-content-scroll>.record-body{padding:16px 0;}
/* Paged snapshot rows grow with their enclosing content instead of nesting vertical scrolling.
   Server and virtualized lists retain bounded viewports for incremental loading. */
:is(.record-body,.record-content-scroll,.report-body,.exec-dialog-body) .paged-browse{flex:0 0 auto;min-width:0;}
:is(.record-body,.record-content-scroll,.report-body,.exec-dialog-body) .paged-browse>.browse-grid-viewport{flex:0 0 auto;height:auto;min-height:0;max-height:none;}
@media print{.page-content-scroll{overflow:visible;}}

.page-content-scroll .exec-values,.page-content-scroll .exec-readiness .table-responsive{max-height:none;overflow-y:visible;}
.exec-dialog-body>.queue-controls,.exec-dialog-body>details{max-height:none;overflow:visible;}

.record-content-scroll .correspondence-grid,.queue-history-content .work-history-table{max-height:none;}

/* Virtualized root queues keep filters and rows as sibling scroll regions on short screens. */
.queue-page{overflow:hidden;}
.queue-page>.record-header,.queue-page>.browse-summary,.queue-page>.record-footer{flex-shrink:0;}
.queue-page>.queue-scope{flex:0 0 auto;min-height:34px;max-height:22dvh;overflow:auto;}
.queue-scope>summary{font-weight:600;cursor:pointer;padding:8px 0;}
.queue-scope .queue-controls{padding-top:8px;}
.queue-page>.queue-viewport{min-height:120px;}

/* Queue pattern: fixed heading, collapsible filters, results viewport and actions.
   Filter overflow is a sibling of results, never an enclosing page scrollbar. */
.queue-pattern-page{overflow:hidden;min-width:0;}
.queue-pattern-page>.record-header,.queue-pattern-page>.record-footer,.report-view-switch{flex-shrink:0;}
.queue-pattern-page>.exec-header,.queue-pattern-page>.report-controls,.queue-pattern-page>.supervisor-filters{flex:0 1 auto;min-height:0;max-height:32dvh;overflow:auto;overscroll-behavior:contain;}
.queue-pattern-page>.record-body{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;}
.analytics-page .exec-values,.analytics-page .exec-readiness .table-responsive{max-height:none;overflow-y:visible;}
.supervisor-results{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;padding-top:12px;}
.supervisor-results>.browse-grid{flex:1;min-height:0;}
.supervisor-results>.browse-grid>.browse-grid-viewport{flex:1;min-height:0;max-height:none;}
.supervisor-explanation>summary{cursor:pointer;padding:8px 0;}
.supervisor-activity-dialog{width:min(1100px,calc(100vw - 32px));height:min(760px,calc(100dvh - 48px));padding:0;overflow:hidden;color:var(--portal-ink);background:var(--portal-surface);}
.supervisor-activity-dialog[open]{display:flex;flex-direction:column;}
.supervisor-activity-dialog>.record-header,.supervisor-activity-dialog>.record-footer{padding:16px;flex-shrink:0;}
.supervisor-activity-body{display:flex;flex-direction:column;overflow:hidden;min-height:0;flex:1;padding:16px;}
.supervisor-activity-body>p{flex-shrink:0;}
.supervisor-activity-body>.paged-browse,.queue-pattern-dialog .exec-dialog-body>.paged-browse{flex:1;min-height:0;}
.supervisor-activity-body>.paged-browse>.browse-grid-viewport,.queue-pattern-dialog .exec-dialog-body>.paged-browse>.browse-grid-viewport{flex:1;height:auto;min-height:0;max-height:none;}
.queue-pattern-dialog .exec-dialog-body{overflow:hidden;}
.queue-pattern-dialog .exec-dialog-body>.queue-controls,.queue-pattern-dialog .exec-dialog-body>details{max-height:25dvh;overflow:auto;min-height:0;flex:0 1 auto;}
.queue-pattern-page>.report-body{flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column;}
.report-view-switch{gap:8px;padding:12px 0 0;}
.report-view-switch [aria-pressed=true]{background:var(--portal-blue);color:white;border-color:var(--portal-blue);}
.report-overview-pane{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;}
.report-records-pane,.report-view-history>.report-history{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;margin:0;}
.report-records-pane>.queue-controls{max-height:25dvh;min-height:0;overflow:auto;flex:0 1 auto;}
.report-records-pane>h2,.report-records-pane>.portal-actions,.report-records-pane>p,.report-history>h2,.report-history>p{flex-shrink:0;}
.report-records-pane>.paged-browse,.report-view-history>.report-history>.paged-browse{flex:1;min-height:0;}
.report-records-pane>.paged-browse>.browse-grid-viewport,.report-view-history>.report-history>.paged-browse>.browse-grid-viewport{flex:1;min-height:0;max-height:none;height:auto;}
@media(max-width:600px){.queue-pattern-page>.exec-header,.queue-pattern-page>.report-controls,.queue-pattern-page>.supervisor-filters{max-height:20dvh;}.supervisor-activity-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;}.report-view-switch{flex-wrap:wrap;}}
.report-record-filters{flex:0 1 auto;min-height:0;max-height:20dvh;overflow:auto;margin-bottom:12px;}
.report-record-filters>summary{cursor:pointer;padding:8px 0;font-weight:600;}
.report-page.queue-pattern-page>.report-controls{max-height:22dvh;}
@media(max-width:600px){.report-page.queue-pattern-page>.report-controls{max-height:12dvh;}.report-view-switch>.btn{flex:1 1 auto;}}
.report-view-select{display:none;}
@media(max-width:600px){.report-view-select{display:block;padding-top:12px;flex-shrink:0;}.report-view-select>.form-select{height:38px;}.report-view-switch{display:none;}.report-page.queue-pattern-page>.record-header .browse-heading p{display:none;}}
.report-export-menu{display:none;}
@media(max-width:600px){.report-export-menu{display:block;}.report-export-direct{display:none;}}
@media(max-width:600px){.report-page .record-footer>.report-export-direct{display:none;}.report-page .report-controls>.exec-cutoff{display:none;}}
/* Preserve readable supporting-record columns; narrow screens pan the table. */
.report-records-pane .browse-grid table{min-width:1800px;}

/* Report disclosure actions stay above the one scrolling overview region. */
.report-overview-view{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;}
.report-section-actions{flex-shrink:0;padding:0 0 12px;margin:0;}

/* Buttons share neutral mouse focus and an explicit keyboard focus indicator.
   Primary, destructive, selected and form-input states retain their colors. */
.btn:focus,.btn:active:focus,.btn-link.nav-link:focus{box-shadow:none;}
.btn:focus-visible,.btn-link.nav-link:focus-visible{outline:2px solid var(--portal-blue);outline-offset:-3px;box-shadow:none;}
.bounded-browse-page{overflow:hidden;}
.bounded-browse-page>.record-header,.bounded-browse-page>.record-footer{flex-shrink:0;}
.bounded-browse-page>.browse-grid{flex:1;min-height:0;}
.bounded-browse-page>.browse-grid>.browse-grid-viewport{flex:1;min-height:0;max-height:none;}
.bounded-browse-page>.queue-scope{flex:0 1 auto;max-height:30dvh;min-height:0;overflow:auto;}
.bounded-browse-page .task-assignment-card{margin-bottom:12px;}
.broker-preview-controls{position:sticky;top:0;z-index:5;background:var(--portal-surface);padding:8px 0;max-height:30dvh;overflow:auto;}
.activity-log-page>.activity-log-filters{max-height:25dvh;min-height:0;overflow:auto;flex:0 1 auto;}
@media(max-width:600px){.bounded-browse-page>.queue-scope{max-height:20dvh;}}
/* Queue and mail-folder history use the same fixed controls / rows / actions. */
.queue-history-dialog{height:min(800px,calc(100dvh - 32px));overflow:hidden;}
.queue-history-dialog[open]{display:flex;flex-direction:column;}
.queue-history-dialog>.record-header,.queue-history-dialog>.record-footer{flex-shrink:0;}
.queue-history-content{flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column;}
.work-history-bounded{display:flex;flex-direction:column;flex:1;min-height:0;gap:12px;overflow:hidden;}
.work-history-bounded>h3,.work-history-bounded>.browse-summary,.work-history-bounded>.d-flex{flex-shrink:0;margin:0;}
.work-history-bounded>.work-history-controls{flex:0 1 auto;max-height:25dvh;min-height:0;overflow:auto;padding:0;}
.work-history-bounded>.work-history-table{flex:1;min-height:0;overflow:auto;}
.work-history-bounded>.work-history-table th{position:sticky;top:0;background:var(--portal-bg);z-index:1;}
@media(max-width:600px){.queue-history-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;}.work-history-bounded>.d-flex{flex-wrap:wrap;gap:8px!important;}}
@media(max-width:600px){.activity-log-page>.activity-log-filters{max-height:12dvh;}.activity-log-page>.record-header p{display:none;}}
@media(max-width:600px){.bounded-browse-page>.queue-scope{max-height:12dvh;}}

/* Inline activity follows the shared 38px button sizing and keyboard focus. */
.action-spinner { margin-inline-end: .45rem; vertical-align: -.125em; flex-shrink: 0; }
[data-busy-download][aria-disabled="true"] { opacity: .65; cursor: wait; }

/* Session warning shares Workbench surfaces and 38px actions in both themes. */
.portal-dialog.workbench-status-dialog { width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--portal-border); border-radius: 2px; color: var(--portal-ink); background: var(--portal-surface); }
.workbench-status-dialog::backdrop { background: rgb(0 0 0 / 48%); }
.workbench-status-content { padding: 24px; }
.workbench-status-heading { display: flex; align-items: flex-start; gap: 12px; }
.workbench-status-heading h2 { margin: 0 0 5px; font-size: 20px; font-weight: 600; line-height: 1.3; letter-spacing: -.2px; }
.workbench-status-heading p { margin: 0; color: var(--portal-muted); font-size: 14px; line-height: 1.5; }
.workbench-status-icon { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border: 1px solid var(--portal-border); border-radius: 50%; color: var(--portal-ink); background: var(--portal-bg); }
.workbench-status-icon svg { width: 26px; height: 26px; }
.workbench-status-timer { margin: 24px 0 20px; padding: 18px 20px 20px; border: 1px solid var(--portal-border); border-radius: 2px; background: var(--portal-bg); text-align: center; }
.workbench-status-label { display: block; color: var(--portal-muted); font-size: 13px; line-height: 1.4; }
.workbench-status-timer strong { display: block; margin: 3px 0 15px; font-size: 42px; font-weight: 600; line-height: 1.2; letter-spacing: -1px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.workbench-status-track { height: 4px; width: 100%; overflow: hidden; background: var(--portal-border); border-radius: 2px; }
.workbench-status-track span { display: block; height: 100%; width: 100%; background: var(--portal-blue); transition: width .25s linear; }
.workbench-status-dialog[data-urgent="true"] .workbench-status-track span { background: #bd7a16; }
.workbench-status-description { margin: 0 0 10px; font-size: 14px; line-height: 1.55; }
.workbench-status-note { margin: 0; color: var(--portal-muted); font-size: 13px; line-height: 1.5; }
.workbench-status-dialog .workbench-status-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--portal-border); background: var(--portal-bg); }
.workbench-status-dialog form { margin: 0; }
@media(max-width:480px) { .workbench-status-content { padding: 20px; } .workbench-status-dialog .workbench-status-actions { padding: 16px 20px; } .workbench-status-heading h2 { font-size: 19px; } }
@media(prefers-reduced-motion:reduce) { .workbench-status-track span { transition: none; } }

.availability-page{min-height:100dvh;display:grid;place-items:center;margin:0;padding:16px;background:var(--portal-bg);color:var(--portal-ink)}
.availability-card{position:static;margin:auto;background:var(--portal-surface);color:var(--portal-ink);border:1px solid var(--portal-border)}
.availability-card h1{font-size:20px;font-weight:600;margin:0}

.email-importance-high{color:var(--bs-danger-text-emphasis,#a4262c);font-weight:600}

/* Account label opens the settings hub; the adjacent disclosure opens shortcuts. */
.account-navigation{display:flex;align-items:center;gap:8px;position:relative;min-width:0;margin-left:auto}.account-navigation .account-summary{align-items:flex-start;min-width:0}.account-action-row{display:flex;align-items:center;justify-content:flex-start;gap:2px}.account-home{display:inline-flex;align-items:center;min-height:24px;padding:2px 0;text-decoration:none;color:var(--bs-body-color);border-radius:4px;white-space:nowrap}.account-home:hover{background:var(--portal-hover)}.account-home:focus-visible{outline:2px solid var(--portal-blue);outline-offset:2px}.account-navigation .user-menu{position:static}.account-action-row .user-menu summary{width:24px;min-width:24px;min-height:24px;padding:2px;border:0;justify-content:center;line-height:1;background:transparent}.account-action-row .user-menu summary:hover,.account-action-row .user-menu[open] summary{background:var(--portal-hover)}.account-navigation .account-greeting{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;font-size:13px;color:var(--bs-body-color)}@media(max-width:600px){.account-navigation .account-greeting{max-width:150px}}

/* Client branding: shared role tokens, with contrast-derived text companions. */
.brand-home{display:inline-flex;align-items:center;min-height:38px;min-width:0}.brand-logo{display:block;width:200px;max-width:45vw;height:auto;max-height:48px;object-fit:contain}.brand-logo-white{filter:brightness(0) invert(1)}.brand-home [hidden]{display:none!important}
html,body{color:var(--portal-page-text,var(--portal-ink))}.app-header{background:var(--portal-header,var(--portal-surface))!important;color:var(--portal-header-text,var(--portal-ink))}.app-header .workbench-brand,.app-header .account-greeting,.app-header .account-home,.app-header .work-menu>summary{color:var(--portal-header-text,var(--portal-ink))}
a,.btn-link{color:var(--portal-link,var(--portal-blue))}.form-control,.form-select{color:var(--portal-control-text,var(--portal-ink))}.form-control::placeholder{color:var(--portal-placeholder,var(--portal-muted))}
.btn-primary{--bs-btn-bg:var(--portal-primary,#0078d4);--bs-btn-border-color:var(--portal-primary,#0078d4);--bs-btn-color:var(--portal-on-primary,#fff);--bs-btn-hover-bg:var(--portal-primary-hover,#106ebe);--bs-btn-hover-border-color:var(--portal-primary-hover,#106ebe);--bs-btn-hover-color:var(--portal-on-primary-hover,#fff);--bs-btn-active-bg:var(--portal-primary-hover,#106ebe);--bs-btn-active-border-color:var(--portal-primary-hover,#106ebe);--bs-btn-active-color:var(--portal-on-primary-hover,#fff);background:var(--portal-primary,#0078d4);color:var(--portal-on-primary,#fff);border-color:var(--portal-primary,#0078d4)}
.btn-primary:hover,.btn-primary:active{background:var(--portal-primary-hover,#106ebe);color:var(--portal-on-primary-hover,#fff);border-color:var(--portal-primary-hover,#106ebe)}
.btn-outline-primary{--bs-btn-color:var(--portal-link,var(--portal-blue));--bs-btn-border-color:var(--portal-blue);--bs-btn-hover-bg:var(--portal-primary);--bs-btn-hover-border-color:var(--portal-primary);--bs-btn-hover-color:var(--portal-on-primary);color:var(--portal-link,var(--portal-blue))}
.btn-outline-secondary:hover,.btn-outline-secondary:active{color:var(--portal-hover-text,var(--portal-ink));background:var(--portal-hover)}.btn:disabled,.btn.disabled{background:var(--portal-disabled,var(--portal-bg));color:var(--portal-disabled-text,var(--portal-muted));border-color:var(--portal-border);opacity:1}
.form-control:disabled,.form-select:disabled{background:var(--portal-disabled,var(--portal-bg));color:var(--portal-disabled-text,var(--portal-muted))}.form-control:focus,.form-select:focus{color:var(--portal-control-text,var(--portal-ink))}
.user-avatar,.workbench-search button{background:var(--portal-primary,#0078d4);color:var(--portal-on-primary,#fff)}.workflow-inbox-count{color:var(--portal-on-accent,#fff)}
.browse-banded tbody tr:nth-child(even of :not([aria-hidden])) td{color:var(--portal-band-text,var(--portal-ink))}.browse-banded tbody tr:hover td,.table tbody tr:hover,.work-help,.work-recovery,.queue-alert,.work-readonly{color:var(--portal-hover-text,var(--portal-ink))}
.correspondence-grid .correspondence-selected>td,.cabinet-grid tr.cabinet-selected>td,.allocation-results-table tr.allocation-selected>td{background:var(--portal-selected,var(--portal-hover));color:var(--portal-selected-text,var(--portal-ink))}.report-view-switch [aria-pressed=true]{background:var(--portal-primary,var(--portal-blue));color:var(--portal-on-primary,#fff);border-color:var(--portal-primary,var(--portal-blue))}
/* Theme editor samples inherit the exact runtime palette and Bootstrap appearance. */
.theme-sample{background:var(--portal-bg);color:var(--portal-ink);border:1px solid var(--portal-border);min-width:0;color-scheme:light}.theme-sample[data-bs-theme=dark]{color-scheme:dark}.theme-sample-caption{padding:8px 12px;background:var(--portal-surface);border-bottom:1px solid var(--portal-border);font-size:12px;color:var(--portal-muted)}.theme-sample-header{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:14px;background:var(--portal-header);color:var(--portal-header-text);border-bottom:2px solid var(--portal-blue)}.theme-sample-header img,.theme-signin-logo{width:180px;max-width:75%;height:auto}.theme-sample-content{padding:12px;display:grid;gap:14px}.theme-sample section{padding:14px;border:1px solid var(--portal-border);background:var(--portal-surface);min-width:0}.theme-sample h3{font-size:16px;font-weight:600;margin:0 0 12px}.theme-sample .mailbox-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.theme-sample table{min-width:650px}.theme-sample .form-label{color:var(--portal-ink)}.theme-sample .btn-outline-secondary{--bs-btn-color:var(--portal-ink);--bs-btn-disabled-color:var(--portal-muted)}.theme-sample .btn-primary.theme-button-hover{background:var(--portal-primary-hover);color:var(--portal-on-primary-hover);border-color:var(--portal-primary-hover)}.theme-sample .theme-button-selected,.theme-selected{background:var(--portal-selected);color:var(--portal-selected-text);border-color:var(--portal-blue)}.theme-sample .theme-keyboard-focus{outline:2px solid var(--portal-blue);outline-offset:-3px}.theme-selected{padding:9px;border-left:3px solid var(--portal-blue);margin-top:10px}.theme-sample-menu{padding:12px;border:1px solid var(--portal-control-border);background:var(--portal-surface);margin:10px 0}.theme-count{background:var(--portal-blue);color:var(--portal-on-accent);padding:2px 7px;border-radius:12px;font-size:11px}.theme-hover-row td{background:var(--portal-hover)!important;color:var(--portal-hover-text)!important}.theme-selected-row td{background:var(--portal-selected)!important;color:var(--portal-selected-text)!important}.theme-sample-highlight section{outline:2px dashed var(--portal-blue);outline-offset:-3px}.theme-toast{border:1px solid var(--portal-border);border-left:4px solid #367bbd;background:var(--portal-surface);color:var(--portal-ink);padding:10px;margin-top:8px}.theme-toast-success{border-left-color:#21854a}.theme-toast-warning{border-left-color:#bd861b}.theme-toast-error{border-left-color:#cc4545}.theme-guidance{padding:12px;border-left:3px solid var(--portal-blue);background:var(--portal-hover);color:var(--portal-hover-text)}.theme-mail-paper{background:white;color:#242424;font:14px Arial,sans-serif;padding:16px;border:1px solid var(--portal-border)}.theme-upload{padding:18px;text-align:center;border:2px dashed var(--portal-control-border);background:var(--portal-bg);color:var(--portal-page-text)}.theme-upload-active{background:var(--portal-hover);color:var(--portal-hover-text);outline:2px solid var(--portal-blue);border-color:var(--portal-blue)}.theme-settings-card{background:var(--portal-bg);color:var(--portal-page-text);border:1px solid var(--portal-border);padding:12px}.theme-chart-label{display:flex;justify-content:space-between;gap:10px}.theme-chart-label i{display:inline-block;width:10px;height:10px;margin-right:7px}.theme-chart-track{height:10px;background:var(--portal-bg);margin:6px 0 10px}.theme-chart-track span{display:block;height:100%}.theme-dialog-backdrop{background:rgb(0 0 0 / 48%);padding:18px}.theme-dialog{background:var(--portal-surface);color:var(--portal-ink);border:1px solid var(--portal-border);padding:16px}.theme-timer{background:var(--portal-bg);color:var(--portal-page-text);text-align:center;padding:14px;margin:12px 0}.theme-timer strong{font-size:24px}.theme-timer-track{height:4px;background:var(--portal-border);margin-top:8px}.theme-timer-track span{display:block;height:100%;width:80%;background:var(--portal-blue)}.theme-skeleton{height:12px;background:var(--portal-border);margin:12px 0}.theme-sample-footer{background:var(--portal-surface);border-top:1px solid var(--portal-border);padding:12px}.theme-sample[data-bs-theme=light] .age-normal{color:#27643c;background:#edf7ef}.theme-sample[data-bs-theme=light] .age-attention{color:#785400;background:#fff4cf}.theme-sample[data-bs-theme=light] .age-overdue{color:#a32626;background:#ffe9e9}.theme-sample[data-bs-theme=dark] .age-normal{color:#a5deb6;background:#183725}.theme-sample[data-bs-theme=dark] .age-attention{color:#f7d878;background:#423819}.theme-sample[data-bs-theme=dark] .age-overdue{color:#ffb0b0;background:#492626}@media(max-width:600px){.theme-sample .mailbox-fields{grid-template-columns:1fr}.theme-sample-content{padding:8px}.theme-sample section{padding:10px}.theme-dialog-backdrop{padding:8px}}
/* Shared contrast/branding coverage for validation, links and selected controls. */
.text-danger,.validation-message,.field-validation-error{color:var(--portal-danger-text,var(--bs-danger-text-emphasis))!important}.text-warning{color:var(--portal-warning-text,var(--bs-warning-text-emphasis))!important}.text-success{color:var(--portal-success-text,var(--bs-success-text-emphasis))!important}.text-info{color:var(--portal-info-text,var(--bs-info-text-emphasis))!important}
.text-primary{color:var(--portal-link,var(--portal-blue))!important}.bg-primary,.text-bg-primary{background-color:var(--portal-primary,var(--portal-blue))!important;color:var(--portal-on-primary,#fff)!important}
a:hover,.btn-link:hover{color:var(--bs-link-hover-color,var(--portal-link))}.btn-outline-primary:active,.btn-outline-primary.active{background:var(--portal-primary);border-color:var(--portal-primary);color:var(--portal-on-primary)}
input[type=checkbox],input[type=radio],progress{accent-color:var(--portal-primary,var(--portal-blue))}.form-check-input:checked{background-color:var(--portal-primary,var(--portal-blue));border-color:var(--portal-primary,var(--portal-blue))}.form-check-input:checked[type=checkbox]{--bs-form-check-bg-image:var(--portal-check-image)}.form-check-input:checked[type=radio]{--bs-form-check-bg-image:var(--portal-radio-image)}
.nav-pills{--bs-nav-pills-link-active-bg:var(--portal-primary);--bs-nav-pills-link-active-color:var(--portal-on-primary)}.pagination{--bs-pagination-color:var(--portal-link);--bs-pagination-hover-color:var(--portal-hover-text);--bs-pagination-hover-bg:var(--portal-hover);--bs-pagination-active-bg:var(--portal-primary);--bs-pagination-active-border-color:var(--portal-primary);--bs-pagination-active-color:var(--portal-on-primary)}
/* Apply foreground/background pairs together; color fades can briefly erase button text during appearance or busy-state changes. */
.btn,.btn-link{transition:none}

.reply-history-text{white-space:pre-wrap;overflow-wrap:anywhere;max-height:24rem;overflow:auto;}

/* Maintenance fields share label, control and help tracks so wrapping never offsets adjacent inputs. */
.maintenance-field-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));gap:8px 16px;align-items:start;max-width:1080px;width:100%;min-width:0}
.maintenance-field-grid>div{min-width:0}.maintenance-field-grid .form-label{display:block;line-height:20px;min-height:40px;margin:0 0 8px}.maintenance-field-grid :is(input:not([type=checkbox]),select){height:38px;min-height:38px;width:100%;min-width:0}.maintenance-field-grid .form-control,.maintenance-field-grid .form-select{min-width:0}.maintenance-field-grid textarea{height:auto}
.reply-tools-template-row{max-width:760px;grid-template-columns:minmax(0,1fr) auto}
@supports(grid-template-rows:subgrid){
 .maintenance-field-grid>div{display:grid;grid-template-rows:subgrid;grid-row:span 3;row-gap:8px}
 .maintenance-field-grid .form-label{grid-row:1;min-height:20px;margin:0}
 .maintenance-field-grid>div>:is(.form-control,.form-select){grid-row:2}
 .maintenance-field-grid>div>p{grid-row:3;margin:0}
 .maintenance-field-grid .maintenance-field-action{padding-top:0;align-self:stretch}
 .maintenance-field-grid .maintenance-field-action>.btn{grid-row:2;align-self:start;justify-self:start}
}
@media(max-width:600px){.maintenance-field-grid{grid-template-columns:minmax(0,1fr);gap:12px}.maintenance-field-grid>div{display:block;grid-row:auto}.maintenance-field-grid .form-label{min-height:0;margin-bottom:8px}.maintenance-field-grid .maintenance-field-action{padding-top:0}.reply-tools-template-row{grid-template-columns:minmax(0,1fr)}}
.portal-actions>.btn.filter-reset-button{margin-left:auto;}

.ai-log-detail{max-height:45dvh;overflow:auto;flex-shrink:0;overflow-wrap:anywhere;}

.work-help-actions{align-items:flex-start}.work-help-actions>div{flex:1 1 260px;min-width:0}.work-help-actions>.btn{align-self:flex-start}

.ai-activity-dialog{width:min(960px,calc(100vw - 32px));padding:0;overflow:hidden}.ai-activity-dialog[open]{display:flex;flex-direction:column}.ai-activity-dialog>.record-header,.ai-activity-dialog>.record-footer{padding:16px;flex-shrink:0}.ai-activity-dialog>.record-body{padding:16px;min-height:0;overflow:auto}.ai-activity-dialog h2{overflow-wrap:anywhere}
@media(max-width:600px){.reply-browse-filters:not(.filters-expanded){display:none}.reply-browse-filters.filters-expanded{max-height:30dvh;min-height:0;overflow:auto}.maintenance-browse-page>.activity-filter-toggle{margin-bottom:12px}}

.reply-attachment-list{display:flex;flex-wrap:wrap;gap:6px;list-style:none;margin:8px 0;padding:0}.reply-attachment-chip{display:flex;align-items:center;gap:6px;max-width:100%;padding:3px 6px 3px 10px;border:1px solid var(--portal-border);border-radius:4px;background:var(--portal-bg);font-size:13px}.reply-attachment-chip>span{min-width:0;overflow-wrap:anywhere}.reply-attachment-remove{display:inline-flex;align-items:center;justify-content:center;flex:0 0 30px;width:30px;height:30px;padding:0;border:0;border-radius:4px;background:transparent;color:var(--portal-ink);font-size:22px;line-height:1}.reply-attachment-remove:not(:disabled):hover{background:var(--portal-hover)}.reply-attachment-remove:focus-visible{outline:2px solid var(--portal-blue);outline-offset:1px}.file-dragging .file-upload-zone{border-color:var(--portal-blue);background:var(--portal-hover)}

.reply-default-instructions{margin-top:6px;font-size:13px}.reply-default-instructions>label{margin-top:8px}.reply-default-instructions>p{white-space:pre-wrap;margin:6px 0}

.reply-attachment-remove:disabled{opacity:.5;cursor:default}

/* Email content keeps a paper surface so sender-authored colors remain readable
   in either application theme, matching the original-email preview. */
.rich-email-editor .ql-editor{background:#fff;color:#242424;color-scheme:light}
.rich-email-editor .ql-editor a{color:#005ea8;text-decoration:underline}

/* Automatic maintenance filters: selectors/search and Reset form one bounded group. */
.maintenance-auto-filter-bar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;gap:12px 16px;align-items:end;min-width:0}
.maintenance-auto-filter-bar-four{grid-template-columns:repeat(4,minmax(0,1fr)) auto}
.maintenance-auto-filter-bar>div{min-width:0}.maintenance-auto-filter-bar .form-label{display:block;line-height:20px;min-height:40px;margin:0 0 8px}.maintenance-auto-filter-bar :is(.form-control,.form-select){height:38px;min-height:38px;width:100%}.maintenance-auto-filter-bar>.filter-reset-action{justify-content:flex-end}
@media(max-width:1000px){.maintenance-auto-filter-bar,.maintenance-auto-filter-bar-four{grid-template-columns:repeat(2,minmax(0,1fr))}.maintenance-auto-filter-bar>.filter-reset-action{grid-column:1/-1}.maintenance-auto-filter-bar:not(.maintenance-auto-filter-bar-four)>.filter-reset-action{grid-column:auto}}
@media(max-width:600px){.maintenance-auto-filter-bar,.maintenance-auto-filter-bar-four{grid-template-columns:minmax(0,1fr)}.maintenance-auto-filter-bar .form-label{min-height:20px}}

/* Managed signatures remain readable on email paper in either application theme. */
.reply-protected-signature{padding:12px 15px;background:#fff;color:#242424;color-scheme:light;border:1px solid var(--portal-border);border-top:0;overflow-wrap:anywhere}
.reply-protected-signature p:last-child{margin-bottom:0}
.reply-protected-signature img{max-width:100%;height:auto}

/* Reply paper shares a readable baseline with mailbox signatures. */
.email-composition .rich-email-editor.fit-initial-content .ql-container{height:96px;min-height:72px}
.email-composition .rich-email-editor.fit-initial-content .ql-editor{font-family:Arial,sans-serif;font-size:12pt;line-height:1.3}
.email-composition .rich-email-editor.fit-initial-content .ql-editor p{margin:0 0 8px}
.email-composition .rich-email-editor.fit-initial-content .ql-editor p:last-child{margin-bottom:0}

/* Long-form sections use the available width; concise fields retain readable limits. */
.record-body > fieldset.long-form-content { max-width: none; min-width: 0; width: 100%; }
.long-form-content > .mailbox-fields { max-width: 1080px; }
.long-form-content > input.form-control, .long-form-content > select.form-select { max-width: 760px; }
.saved-secret-control { display: flex; align-items: stretch; min-width: 0; gap: 0; }
.saved-secret-control > .form-control { min-width: 0; flex: 1; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.saved-secret-control > button { flex: 0 0 38px; padding: 0; font-size: 1.25rem; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.maintenance-field-grid > div > .saved-secret-control { grid-row: 2; }

/* Connection addresses need room for full endpoints; GUIDs keep readable paired fields. */
.connection-long-fields { display: grid; gap: 16px; width: 100%; min-width: 0; }
.connection-long-fields > div { min-width: 0; }
.connection-long-fields .form-label { display: block; }
.connection-long-fields .form-control { width: 100%; min-height: 38px; }
.record-body.connector-settings > .mailbox-fields { max-width: 1080px; }
.record-body.connector-settings > div.mt-3.connection-url-field { max-width: none; width: 100%; }

.ai-model-grid .browse-grid-viewport { max-height: min(42dvh, 440px); min-height: 140px; }
.ai-model-grid table { min-width: 920px; }
.ai-model-grid .ai-model-editing-row > td { background: var(--portal-selected, var(--portal-bg)); }

.ai-task-grid .browse-grid-viewport, .ai-price-grid .browse-grid-viewport { max-height: min(42dvh, 440px); min-height: 140px; }
.ai-task-grid table { min-width: 780px; }
.ai-price-grid table { min-width: 1480px; }
.ai-price-source { display: inline-block; max-width: 240px; overflow-wrap: anywhere; }

.maintenance-field-grid.ai-task-token-fields { max-width: 360px; }
.maintenance-field-grid.ai-model-options-fields { max-width: 760px; }

.ai-catalog-filters { grid-template-columns: minmax(0,360px) minmax(0,1fr) auto; }
.ai-task-filters { grid-template-columns: minmax(0,1fr) auto; }
.ai-task-filters > div:first-child { max-width: 760px; width: 100%; }
@media(max-width:1000px) { .ai-catalog-filters { grid-template-columns: repeat(2,minmax(0,1fr)); } .ai-catalog-filters.maintenance-auto-filter-bar > .filter-reset-action { grid-column: 1/-1; } }
@media(max-width:600px) { .ai-catalog-filters, .ai-task-filters { grid-template-columns: minmax(0,1fr); } }

.ai-catalog-filters .form-label, .ai-task-filters .form-label,
.ai-model-options-fields > div > .form-label, .ai-task-token-fields > div > .form-label { min-height: 20px; }

/* Compact maintenance forms reserve a help track only when a field has help.
   Separate field groups by 16px, labels from controls by 8px, and sections by 24px. */
.compact-field-grid { row-gap: 16px; }
.compact-field-grid > div { grid-row: span 2; }
.compact-field-grid > div:has(>p) { grid-row: span 3; }
.compact-field-grid .form-label { min-height: 20px; }
.maintenance-editor { border: 1px solid var(--portal-border); padding: 16px; margin-top: 24px; min-width: 0; }
.maintenance-check { display: flex; align-items: flex-start; gap: 8px; line-height: 20px; margin: 16px 0 8px; }
.maintenance-check > input[type=checkbox] { flex: 0 0 16px; width: 16px; height: 16px; margin: 2px 0; }
.maintenance-history { margin-top: 24px; min-width: 0; }
.maintenance-history > summary { line-height: 20px; padding: 8px 0; }
.maintenance-history > details { border-top: 1px solid var(--portal-border); padding-top: 8px; }
.maintenance-history pre { margin: 8px 0 16px; padding: 12px; background: var(--portal-surface); border: 1px solid var(--portal-border); }
.ai-section-tabs { margin-bottom: 24px; }
:is(.ai-settings-form,.maintenance-content-form) > h2, .maintenance-editor > h3 { margin: 0 0 8px; }
:is(.ai-settings-form,.maintenance-content-form) > p { margin: 0 0 16px; }
:is(.ai-settings-form,.maintenance-content-form) > .maintenance-field-grid + .connection-long-fields { margin-top: 16px !important; }
:is(.ai-settings-form,.maintenance-content-form) > .form-label { display: block; line-height: 20px; margin: 16px 0 8px !important; }
:is(.ai-settings-form,.maintenance-content-form) .connection-long-fields .form-label { line-height: 20px; margin: 0 0 8px; }
:is(.ai-settings-form,.maintenance-content-form) .connection-long-fields .saved-secret-control + p { margin: 8px 0 0; }
:is(.ai-settings-form,.maintenance-content-form) .maintenance-check + p, .maintenance-editor > p { margin: 0 0 16px; }
:is(.ai-settings-form,.maintenance-content-form) > .maintenance-auto-filter-bar { margin: 16px 0; }
.maintenance-editor > .form-label { display: block; line-height: 20px; margin: 16px 0 8px !important; }
.maintenance-editor > textarea + p { margin-top: 8px; }
.ai-activity-summary { margin: 16px 0 0; line-height: 20px; }
.ai-activity-dialog .record-body > p { margin: 0 0 16px; }
.ai-activity-dialog .record-body > details { margin-top: 16px; }
.ai-activity-dialog summary { line-height: 20px; padding: 4px 0; }
@media(max-width:600px) { .compact-field-grid > div, .compact-field-grid > div:has(>p) { grid-row: auto; } .ai-section-tabs { margin-bottom: 16px; } }
/* Related short settings form balanced rows instead of changing from four to two columns. */
:is(.ai-settings-form,.maintenance-content-form) .compact-field-grid:not(.ai-model-options-fields):not(.ai-task-token-fields) { grid-template-columns: repeat(3,minmax(0,1fr)); }
@media(max-width:1000px) { :is(.ai-settings-form,.maintenance-content-form) .compact-field-grid:not(.ai-model-options-fields):not(.ai-task-token-fields) { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { :is(.ai-settings-form,.maintenance-content-form) .compact-field-grid:not(.ai-model-options-fields):not(.ai-task-token-fields) { grid-template-columns: minmax(0,1fr); } }
:is(.ai-settings-form,.maintenance-content-form) > .browse-grid + p { margin-top: 8px; }
.maintenance-editor > p:last-child { margin-bottom: 0; }
.ai-activity-page .maintenance-auto-filter-bar .form-label { min-height: 20px; }

/* Template/guidance maintenance follows the same compact AI administration form rhythm. */
.maintenance-content-form > p { margin: 8px 0 16px; }
.maintenance-content-form > .form-label { display: block; line-height: 20px; margin: 16px 0 8px !important; }
.maintenance-content-form > .form-control { width: 100%; max-width: none !important; }
.maintenance-content-form > h2, .template-requirements > h2 { margin: 24px 0 8px !important; }
.maintenance-content-form .connection-long-fields .form-label { line-height: 20px; margin: 0 0 8px; }
.maintenance-content-form > .maintenance-field-grid.mt-3 { margin-top: 16px !important; }
.maintenance-content-form .guidance-source-field { max-width: 360px; grid-template-columns: minmax(0,1fr) !important; }
.template-requirements { margin: 24px 0; min-width: 0; }
.template-requirements > p { margin: 0 0 16px; }
.template-requirements > .maintenance-editor { margin: 0 0 16px; }
.template-requirements .portal-actions > .maintenance-check { margin: 0; }
.template-requirements .requirement-count-field { max-width: 360px; }
.template-requirements .requirement-count-field .form-label { display: block; margin-bottom: 8px; line-height: 20px; }
.template-maintenance .maintenance-auto-filter-bar .form-label { min-height: 20px; }
.maintenance-history > p { margin: 8px 0 16px; }
.maintenance-history > details > summary { line-height: 20px; overflow-wrap: anywhere; }
.audit-change { margin-top: 16px; min-width: 0; }
.audit-change > h3 { margin: 0 0 8px; }
.audit-comparison { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; min-width: 0; }
.audit-comparison > div { min-width: 0; }
.audit-comparison pre { margin: 8px 0 16px; padding: 12px; border: 1px solid var(--portal-border); background: var(--portal-surface); }
.guidance-maintenance .queue-task-line { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px 16px; margin: 16px 0; }
.guidance-maintenance .queue-task-line .maintenance-check { margin: 0; }
.guidance-maintenance .maintenance-content-form > details { margin-top: 24px !important; }
.guidance-maintenance .maintenance-content-form > details > p { margin: 8px 0 16px; }
.guidance-maintenance .maintenance-content-form > details > .btn { margin-top: 16px; }
@media(max-width:1000px) { .guidance-maintenance .queue-task-line { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { .audit-comparison, .guidance-maintenance .queue-task-line { grid-template-columns: minmax(0,1fr); } }

.maintenance-content-form .compact-field-grid.maintenance-two-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
@media(max-width:600px) { .maintenance-content-form .compact-field-grid.maintenance-two-fields { grid-template-columns: minmax(0,1fr); } }
.guidance-maintenance .queue-task-line:has(>label:only-child) { grid-template-columns: minmax(0,1fr); }
/* Routing remains a readable table on narrow screens, with scrolling inside its frame. */
.guidance-maintenance .table-responsive > table { min-width: 1040px; table-layout: fixed; }
.guidance-maintenance .table-responsive > table :is(th,td):last-child { width: 120px; }
.guidance-maintenance .table-responsive > table :is(th,td):nth-child(4) { width: 280px; }
.guidance-maintenance .table-responsive > table :is(.form-control,.form-select) { width: 100%; min-width: 0; }

.official-pricing-panel { margin: 24px 0; min-width: 0; }
.official-pricing-panel > h3 { margin: 0 0 8px; }
.official-pricing-panel > p { margin: 0 0 16px; }
.official-source-table { min-width: 850px; }
.ai-price-condition { display: inline-block; width: 280px; white-space: normal; overflow-wrap: anywhere; }
.official-pricing-panel .maintenance-history .maintenance-editor > p { margin-top: 16px; overflow-wrap: anywhere; }
/* Named maintenance toggles form separate aligned rows, overriding the generic inline checkbox label. */
.settings-page label.maintenance-check:has(>input[type=checkbox]) { display: flex; }

.excel-menu[popover]{inset:auto;margin:0}.excel-menu[popover]:popover-open{display:flex}.browse-grid-sort{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.browse-grid-sort .form-select{width:180px;max-width:100%;min-height:38px}.browse-grid-sort .btn{min-height:38px}

.excel-menu[popover]:not(:popover-open){display:none}

.excel-sort button{min-height:38px}

.scope-multi-select{text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-height:38px;height:38px;color:var(--portal-ink);}

.reply-from-summary{overflow-wrap:anywhere;}
/* Reserve results space on short displays, including expanded native details. */
.queue-page>.queue-arrival-dashboard::details-content{max-height:clamp(70px,calc(50dvh - 300px),460px);overflow:auto;scrollbar-gutter:stable;overscroll-behavior:contain}
.queue-page>.queue-arrival-dashboard .queue-arrival-content{max-height:none;overflow:visible;scrollbar-gutter:auto}
.queue-page>.queue-arrival-dashboard .arrival-chart-scroll{overflow-y:visible}
.queue-pattern-page>.supervisor-filters{max-height:clamp(100px,20dvh,220px);flex-shrink:0}
.queue-pattern-page>.exec-header{max-height:clamp(100px,22dvh,260px);flex-shrink:0}
@media(max-height:800px){
 .queue-page>.record-header,.queue-pattern-page>.record-header{padding-bottom:6px}
 .queue-page>.record-header h1,.queue-pattern-page>.record-header h1{margin-bottom:2px}
 .queue-page>.record-header{padding-top:0}
 .queue-page>.queue-scope{max-height:96px;min-height:34px}
 .queue-page>.queue-scope>summary{padding:4px 0}
 .queue-page>.queue-scope .queue-controls{padding:0}
 .queue-page>.record-footer,.queue-pattern-page>.record-footer{padding-top:8px;padding-bottom:8px}
 .queue-pattern-page{gap:8px}
}
@media(max-width:600px){
 .queue-page>.queue-scope{max-height:96px}
 .queue-page>.queue-arrival-dashboard::details-content{max-height:80px}
 .queue-pattern-page>.supervisor-filters,.queue-pattern-page>.exec-header{max-height:100px}
}

/* Wrapped tablet filters must also leave room for queue rows. */
.queue-page>.queue-scope{max-height:clamp(96px,14dvh,166px)}
.queue-page>.queue-viewport{min-height:0}
@media(max-height:800px),(max-width:600px){.queue-page>.queue-scope{max-height:96px}}
