/* Compact application theme. Font and spacing reference: wf-crm-saas. */
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-display: swap; font-weight: 400; src: url("fonts/plus-jakarta-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-display: swap; font-weight: 500; src: url("fonts/plus-jakarta-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-display: swap; font-weight: 600; src: url("fonts/plus-jakarta-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-display: swap; font-weight: 700; src: url("fonts/plus-jakarta-sans-latin-700-normal.woff2") format("woff2"); }

:root {
    --ink: #2d3748;
    --muted: #5b6b80;
    --surface: #fff;
    --surface-soft: #f7f8fa;
    --surface-blue: #edf3fa;
    --line: #dde3eb;
    --brand: #21538f;
    --brand-deep: #1a2744;
    --brand-light: #bccfe5;
    --accent: #a8c4eb;
    --focus: #21538f;
    --shadow: 0 1px 3px rgb(26 39 68 / 4%);
    --sidebar-width: 14rem;
    --footer-font-size: .75rem;
}

html { font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif; line-height: 1.55; scrollbar-gutter: stable; }
body { display: flex; flex-direction: column; min-height: 100svh; font-size: .9rem; background: var(--surface-soft); }
[hidden] { display: none !important; }
a { color: var(--brand); text-underline-offset: .18em; }
a:hover { color: #173d6b; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.skip-link { z-index: 100; }
h1, h2, h3 { color: var(--brand-deep); font-family: inherit; font-weight: 700; letter-spacing: -.025em; }
h1, .auth-card h1, .page-heading h1, .portal-heading h1, .error-panel h1 { max-width: none; margin-bottom: .45rem; font-size: 1.75rem; line-height: 1.25; }
h2, .settings-card h2 { margin-bottom: 1rem; font-size: 1.25rem; line-height: 1.4; }
h3 { margin-bottom: .4rem; font-size: 1rem; }
p { margin-bottom: 1rem; }
.lead, .form-intro { color: var(--muted); font-size: .875rem; line-height: 1.6; }
.form-intro { margin-bottom: 1rem; }
.eyebrow { margin-bottom: .4rem; font-size: .68rem; letter-spacing: .07em; font-weight: 700; }
.page-heading, .portal-heading { min-height: 0; margin-bottom: 1.4rem; gap: 1rem; }
.portal-heading > div { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.main-content { flex: 1 0 auto; padding-block: 1.75rem 2.5rem; }
.app-workspace { display: flex; flex: 1 0 auto; flex-direction: column; min-width: 0; margin-left: var(--sidebar-width); }
.app-page .main-content { width: 100%; max-width: 92rem; padding: 1.65rem 1.75rem 3rem; }

/* Shared attribution stays in document flow, never over forms or archive pages. */
.portal-footer { flex: 0 0 auto; padding: .5rem 1rem .75rem; color: var(--muted); font-size: var(--footer-font-size); line-height: 1.5; text-align: center; overflow-wrap: anywhere; }
.portal-footer small { font-size: inherit; }
.portal-footer a { display: inline-block; min-height: 1.5rem; padding-block: .2rem; color: inherit; text-decoration: underline; }
.portal-footer a:hover { color: var(--brand); }

/* Fixed application navigation, independent of the current page content. */
.app-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; display: flex; flex-direction: column; width: var(--sidebar-width); padding: 0 .7rem; overflow-y: auto; color: #d5dfed; background: var(--brand-deep); border-right: 1px solid #263653; }
.sidebar-heading { display: flex; align-items: center; min-height: 5.65rem; padding: 1rem .6rem; }
.brand { gap: .6rem; color: inherit; font-size: 1rem; font-weight: 700; white-space: nowrap; }
.brand:hover { color: inherit; }
.app-sidebar .brand { color: #fff; }
.brand-icon { width: 1.85rem; height: 1.85rem; flex: 0 0 auto; color: var(--accent); }
.brand small { display: block; margin-top: .1rem; color: #a8b7ce; font-size: .67rem; letter-spacing: .045em; font-weight: 400; }
.account-nav { display: block; margin: 0; padding-bottom: 1.5rem; }
.navigation-group + .navigation-group { margin-top: 1.6rem; }
.navigation-label { margin: 0 .75rem .45rem; color: #a8b7ce; font-size: .62rem; font-weight: 600; letter-spacing: .075em; text-transform: uppercase; }
.navigation-group ul { margin: 0; padding: 0; list-style: none; }
.navigation-group li + li { margin-top: .15rem; }
.account-nav a { display: flex; align-items: center; gap: .65rem; min-height: 2.6rem; padding: .55rem .75rem; color: #d5dfed; font-size: .81rem; font-weight: 500; line-height: 1.3; text-decoration: none; border: 1px solid transparent; border-radius: .4rem; }
.account-nav a svg { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; color: #a8b7ce; }
.account-nav a:hover { color: #fff; background: #253652; }
.account-nav a[aria-current="page"] { color: #fff; background: #2c456a; border-color: #3c5679; }
.account-nav a[aria-current="page"] svg { color: #c2d9f8; }
.app-sidebar a:focus-visible, .app-sidebar button:focus-visible { outline-color: #b8d9ff; }
.sidebar-footer { display: flex; align-items: center; gap: .5rem; margin-top: auto; padding: 1rem .65rem; color: #a8b7ce; border-top: 1px solid #34415b; font-size: .62rem; }
.sidebar-footer svg { flex: 0 0 auto; width: .85rem; height: .85rem; }
.app-topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; padding: .55rem 1.75rem; background: #fff; border-bottom: 1px solid var(--line); }
.workspace-location, .utility-nav { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.workspace-location { color: var(--muted); font-size: .75rem; }
.workspace-name { white-space: nowrap; }
.workspace-separator { color: #a6b2c4; }
.workspace-section { overflow: hidden; color: var(--brand-deep); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.utility-nav { flex: 0 0 auto; gap: 1rem; }
.user-menu-link { display: flex; align-items: center; gap: .6rem; min-width: 0; color: var(--ink); text-decoration: none; }
.user-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 2rem; height: 2rem; color: var(--brand); background: var(--surface-blue); border: 1px solid #d7e3f1; border-radius: 50%; font-size: .8rem; font-weight: 700; }
.user-menu-label { display: block; max-width: 14rem; overflow: hidden; font-size: .72rem; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-label small { display: block; color: var(--muted); font-size: .62rem; }
.utility-nav form { margin: 0; }
.nav-logout, .icon-button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2.15rem; padding: .4rem .6rem; color: #495a72; background: #fff; border: 1px solid var(--line); border-radius: .4rem; font: inherit; font-size: .72rem; font-weight: 500; white-space: nowrap; cursor: pointer; }
.nav-logout:hover, .icon-button:hover { color: var(--brand-deep); background: #f0f4f8; border-color: #b8c4d4; }
.nav-logout svg { width: 1rem; height: 1rem; }
.icon-button { width: 2.25rem; height: 2.25rem; padding: .45rem; }
.icon-button svg { width: 1.25rem; height: 1.25rem; }
.navigation-toggle, .sidebar-close, .navigation-backdrop { display: none; }

/* Forms, actions and data tables share the compact CRM scale. */
.button { --button-color: #fff; --button-bg: var(--brand); --button-border: var(--brand); --button-hover-color: var(--button-color); --button-hover-bg: #1a4270; --button-hover-border: var(--button-hover-bg); min-width: 0; max-width: 100%; min-height: 1.875rem; gap: .35rem; padding: .375rem .75rem; color: var(--button-color); background: var(--button-bg); border-color: var(--button-border); font-size: .85rem; font-weight: 500; line-height: 1.2; border-width: 1px; border-radius: .45rem; white-space: normal; overflow-wrap: anywhere; text-align: center; }
.button:hover { color: var(--button-hover-color); background: var(--button-hover-bg); border-color: var(--button-hover-border); }
.button-secondary { --button-color: #48566c; --button-bg: #fff; --button-border: #c7d0dc; --button-hover-color: #2d3748; --button-hover-bg: #f0f3f7; --button-hover-border: #a5b2c3; }
.button-info { --button-bg: #0e7490; --button-border: #0e7490; --button-hover-bg: #155e75; }
.button-success { --button-bg: #26734d; --button-border: #26734d; --button-hover-bg: #1f5f40; }
.button-warning { --button-color: #92400e; --button-bg: #fff7ed; --button-border: #d97706; --button-hover-color: #78350f; --button-hover-bg: #ffedd5; --button-hover-border: #b45309; }
.button-danger { --button-bg: #a33939; --button-border: #a33939; --button-hover-bg: #852b2b; }
button:disabled { opacity: .55; cursor: not-allowed; }
.button:disabled, .button[aria-disabled="true"] { color: var(--button-color); background: var(--button-bg); border-color: var(--button-border); opacity: .55; cursor: not-allowed; }
form label { margin: .85rem 0 .3rem; color: #48566c; font-size: .75rem; font-weight: 600; }
form input, form select, form textarea { width: 100%; min-height: 2.45rem; padding: .5rem .7rem; color: var(--ink); font: inherit; font-size: .875rem; line-height: 1.4; background: #fff; border: 1px solid #c7d0dc; border-radius: .45rem; }
form textarea { resize: vertical; }
form select { appearance: auto; cursor: pointer; }
form input:disabled, form select:disabled { color: #607086; background: #f0f3f7; border-color: #d5dce6; cursor: not-allowed; }
form input[readonly], form textarea[readonly] { background: #f8fafc; }
form input:focus, form select:focus, form textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgb(33 83 143 / 8%); }
form .button { margin-top: 1rem; }
.form-actions { gap: .6rem; margin-top: 1.25rem; }
.form-actions + p { margin-top: .75rem; }
.form-actions > form, .action-row > form { min-width: 0; max-width: 100%; }
.form-actions .button, .filter-bar .button { margin-top: 0; }
.field-help { margin-top: .35rem; font-size: .75rem; line-height: 1.55; }
.button + span.field-help { display: inline-block; margin-inline-start: .5rem; }
fieldset { min-width: 0; margin-top: 1.15rem; padding: .85rem; border-radius: .45rem; }
legend { color: var(--brand-deep); font-size: .8rem; font-weight: 600; }
.reauthentication { margin-block: 1.25rem; }
.reauthentication p { color: var(--muted); font-size: .8rem; }
.checkbox-label { display: flex; align-items: flex-start; gap: .6rem; }
.checkbox-label input[type="checkbox"], .checkbox-list input[type="checkbox"] { width: 1.1rem; min-height: 1.1rem; height: 1.1rem; flex: 0 0 auto; margin: .2rem 0 0; padding: 0; accent-color: var(--brand); }
.checkbox-list { gap: .45rem; }
.checkbox-list label { padding: .6rem; }
.action-row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.account-actions { margin-top: 1.25rem; }
.retention-settings { margin-block: 1.25rem; }
.retention-settings summary { cursor: pointer; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem; margin-bottom: 1rem; padding: .9rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: .5rem; }
.filter-bar > div { min-width: 9rem; }
.filter-bar > div:first-child { flex: 1; }
.filter-bar label { margin: 0 0 .3rem; }
.filter-bar input, .filter-bar select { margin: 0; }
.filter-bar > a:not(.button) { padding-block: .6rem; font-size: .8rem; white-space: nowrap; }
.table-shell { border-radius: .5rem; box-shadow: none; }
th { padding: .75rem; color: #52627a; font-size: .65rem; font-weight: 700; letter-spacing: .04em; background: #f8fafc; border-bottom: 1px solid var(--line); }
td { padding: .6rem .75rem; color: var(--ink); font-size: .8rem; vertical-align: middle; border-color: #e9edf3; }
.table-shell td { overflow-wrap: anywhere; }
tbody tr:hover { background: #f8fafc; }
td .button { min-height: 1.75rem; padding: .25rem .6rem; }
td small { color: var(--muted); }
.activity-table { width: 100%; }
.activity-table td { overflow-wrap: anywhere; vertical-align: top; }
.status-badge { padding: .15rem .4rem; font-size: .67rem; font-weight: 600; line-height: 1.4; border-radius: .3rem; }
.status-badge-active, .status-badge-completed { color: #24613e; background: #eef7f1; border-color: #c1ddca; }
.status-badge-inactive { color: #735322; background: #fcf7eb; border-color: #e8d9b6; }
.status-badge-open { color: var(--brand); background: #edf3fa; border-color: #c7d7eb; }
.status-badge-revoked, .status-badge-expired { color: #983c3c; background: #fcf0f0; border-color: #ebc9c9; }
.pagination-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; padding-block: .9rem; }
.pagination-count { margin: 0; color: var(--muted); font-size: .75rem; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.pagination a, .pagination > span { display: inline-flex; align-items: center; justify-content: center; min-height: 2rem; min-width: 2rem; padding: .3rem .55rem; font-size: .75rem; border-radius: .35rem; }
.pagination a { color: var(--brand); text-decoration: none; background: #fff; border: 1px solid #ccd7e5; }
.pagination a:hover { background: #edf3fa; border-color: #93aecf; }
.pagination [aria-current="page"] { color: #fff; background: var(--brand); font-weight: 600; }

/* Clear hierarchy with smaller cards, no website hero typography. */
.card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.card, .settings-card, .auth-card, .error-panel { padding: 1.3rem; border-radius: .6rem; box-shadow: var(--shadow); }
.card { min-height: 0; }
.card h2, .portal-cards h2 { margin-bottom: .5rem; font-size: 1rem; }
.card p { font-size: .82rem; }
.card-icon { width: 1.5rem; height: 1.5rem; margin-bottom: .85rem; }
.settings-grid, .detail-grid { gap: 1rem; }
.settings-card { min-width: 0; }
.customer-form-card { width: min(100%, 44rem); }
.metadata-list div { gap: .8rem; padding-block: .55rem; grid-template-columns: minmax(7rem, .8fr) minmax(0, 1.2fr); }
.metadata-list dt, .metadata-list dd { font-size: .8rem; }
.metadata-list dt { font-weight: 500; }
.metadata-list dd { overflow-wrap: anywhere; }
.customer-reference { padding-bottom: .75rem; font-size: .8rem; }
.section-heading { gap: .75rem; margin-bottom: .8rem; }
.section-heading h2 { font-size: 1.15rem; }
.notice { margin: .9rem 0 1.15rem; padding: .7rem .85rem; font-size: .8rem; line-height: 1.6; border-left-width: 3px; border-radius: .4rem; }
.notice p:last-child, .notice ul:last-child { margin-bottom: 0; }
.notice-error { color: #8a3030; background: #fcf1f1; border-color: #dfbbbb; }
.notice-success { color: #24613e; background: #eef7f1; border-color: #bdd9c6; }
.notice-warning { color: #735322; background: #fcf7eb; border-color: #e1d0a8; }
.empty-state { padding: 1.5rem; border-radius: .6rem; }
.empty-state h2 { margin-bottom: .4rem; font-size: 1.1rem; }
.empty-state p { font-size: .85rem; }
.advisor-list span, .file-list span, .session-list span { font-size: .78rem; }
.advisor-list li, .plain-list li, .file-list li, .session-list li { padding-block: .6rem; }
.file-list strong { font-size: .82rem; }
.file-list form { margin-top: .45rem; }
.file-list .button { margin-top: .4rem; }
.secret-box { margin: 1rem 0; padding: .9rem; }
.secret-box span { font-size: .72rem; font-weight: 600; }
.secret-box code { font-size: .95rem; }
.secret-box textarea { resize: vertical; font-size: .82rem; }
.code-input { font-size: 1.1rem; }
.large-code { font-size: 1.4rem !important; }
.recovery-panel { margin-top: 1.25rem; padding-top: 1rem; }
.recovery-panel summary { font-size: .8rem; font-weight: 600; }
.setup-steps { font-size: .85rem; }
.mfa-qr { display: flex; justify-content: center; margin: 1.25rem 0; padding: .75rem; background: #fff; border: 1px solid var(--line); border-radius: .5rem; }
.mfa-qr img { display: block; width: 260px; max-width: 100%; height: auto; }
.mfa-manual, .security-action { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.mfa-manual summary, .security-action summary { color: var(--brand); font-size: .8rem; font-weight: 600; cursor: pointer; }
.mfa-manual[open] summary, .security-action[open] summary { margin-bottom: .75rem; }
.account-protected-fields { margin-block: 1rem; padding: .85rem; background: #f5f7fa; border: 1px solid var(--line); border-radius: .45rem; }
.account-protected-fields dl { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem .75rem; margin: 0; font-size: .8rem; }
.account-protected-fields dt { color: var(--muted); }
.account-protected-fields dd { margin: 0; font-weight: 500; }
.request-id { font-size: .75rem; }
progress { width: 100%; margin-top: 1rem; accent-color: var(--brand); }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.message-compose { max-width: 56rem; }
.message-history { margin-top: 1.5rem; max-width: 64rem; }
.message-card { margin-bottom: .8rem; padding: 1rem 1.15rem; background: #fff; border: 1px solid var(--line); border-radius: .5rem; scroll-margin-top: 1rem; }
.message-own { border-left: 3px solid #7294bf; }
.message-heading { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .6rem; margin-bottom: .75rem; padding-bottom: .6rem; border-bottom: 1px solid #edf0f5; }
.message-heading strong { display: inline; font-size: .8rem; }
.message-heading span { margin-left: .5rem; color: var(--muted); font-size: .7rem; }
.message-heading time { color: var(--muted); font-size: .72rem; }
.message-body { margin: 0; color: var(--ink); font-size: .85rem; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.portal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); align-items: start; gap: 1rem; }
.portal-card { min-width: 0; padding: 1.3rem; background: #fff; border: 1px solid var(--line); border-radius: .6rem; box-shadow: var(--shadow); }
.portal-card h2 { margin-bottom: .55rem; font-size: 1rem; }
.portal-card p { color: var(--muted); font-size: .82rem; }
.archive-page { max-width: 64rem; margin: 1rem auto; padding: .75rem; background: #fff; border: 1px solid var(--line); border-radius: .4rem; }
.archive-page img { display: block; max-width: 100%; height: auto; margin-inline: auto; }
.archive-page figcaption { margin-top: .7rem; color: var(--muted); font-size: .72rem; text-align: center; }
.archive-viewer-toolbar .action-row { justify-content: flex-end; }

/* Public entry points have no system navigation or marketing content. */
.login-page { min-height: 100svh; background: #f4f6fa; }
.login-page .main-content { display: grid; align-items: center; min-height: 0; padding-block: 2rem; }
.login-page .auth-shell { width: 100%; min-height: 0; margin: 0 auto; }
.login-page .auth-card { width: min(100%, 26rem); padding: 2rem; border: 1px solid #d8e0eb; border-top: 3px solid var(--brand); box-shadow: 0 5px 24px rgb(26 39 68 / 6%); }
.login-page .auth-card h1 { margin-bottom: .6rem; font-size: 1.6rem; }
.login-page .eyebrow { margin-bottom: .9rem; color: #596e8b; }
.login-page .form-intro { font-size: .8rem; }
.login-page .button { width: 100%; margin-top: 1.2rem; }
.guest-page .site-header { border-bottom: 0; }
.guest-page .header-inner { min-height: 4rem; }
.guest-page .brand { color: #fff; }
.guest-page .environment-badge { padding: .25rem .55rem; font-size: .65rem; font-weight: 500; border-radius: .35rem; }
.guest-page .auth-shell { min-height: min(36rem, calc(100svh - 10rem)); }
.guest-page .auth-card { width: min(100%, 28rem); padding: 1.75rem; }
.guest-page .auth-card-wide { width: min(100%, 42rem); }

@media (min-width: 960px) and (max-width: 1199px) {
    :root { --sidebar-width: 12.75rem; }
    .app-topbar { padding-inline: 1.25rem; }
    .app-page .main-content { padding-inline: 1.25rem; }
    .workspace-name, .workspace-separator { display: none; }
    .user-menu-label { max-width: 9rem; }
    .filter-bar { flex-wrap: wrap; }
    .filter-bar > div:first-child { min-width: 12rem; }
}
@media (max-width: 959px) {
    .app-workspace { margin-left: 0; }
    .app-topbar { min-height: 3.8rem; padding-inline: 1.25rem; }
    .app-page .main-content { padding: 1.4rem 1.25rem 2.5rem; }
    .app-sidebar { position: static; width: 100%; padding: 0 1rem 1rem; }
    .sidebar-heading { min-height: 4.5rem; padding-block: .8rem; }
    .account-nav { display: flex; flex-wrap: wrap; gap: 1rem 2rem; padding-bottom: 0; }
    .navigation-group + .navigation-group { margin-top: 0; }
    .sidebar-footer { display: none; }
    .navigation-enhanced .app-sidebar { position: fixed; width: 16rem; max-width: calc(100vw - 3rem); height: 100dvh; padding-inline: .7rem; transform: translateX(-100%); visibility: hidden; box-shadow: 4px 0 24px rgb(0 0 0 / 15%); }
    .navigation-enhanced .account-nav { display: block; padding-block: .6rem 1.5rem; }
    .navigation-enhanced .navigation-group + .navigation-group { margin-top: 1.5rem; }
    .navigation-enhanced .sidebar-footer { display: flex; }
    .navigation-enhanced .navigation-toggle { display: inline-flex; }
    .navigation-enhanced .sidebar-close { display: inline-flex; margin-left: auto; color: #fff; background: transparent; border-color: #52617c; }
    .navigation-open { overflow: hidden; }
    .navigation-open .app-sidebar { visibility: visible; transform: translateX(0); }
    .navigation-open .navigation-backdrop { display: block; position: fixed; inset: 0; z-index: 30; padding: 0; background: rgb(15 23 42 / 48%); border: 0; }
    .navigation-enhanced .sidebar-heading { gap: .5rem; padding-inline: .5rem; }
    .filter-bar { flex-wrap: wrap; }
    .filter-bar > div:first-child { min-width: 14rem; }
}
@media (max-width: 760px) {
    .app-topbar { gap: .6rem; padding-inline: 1rem; }
    .app-page .main-content { padding: 1.25rem 1rem 2rem; }
    .workspace-location { gap: .55rem; font-size: .72rem; }
    .workspace-name, .workspace-separator, .user-menu-label { display: none; }
    .utility-nav { gap: .6rem; }
    .nav-logout { min-height: 2.5rem; padding: .45rem .55rem; font-size: .72rem; }
    .card-grid, .settings-grid, .detail-grid { grid-template-columns: 1fr; }
    h1, .auth-card h1, .page-heading h1, .portal-heading h1, .error-panel h1 { font-size: 1.5rem; }
    .portal-heading, .section-heading { gap: .8rem; }
    .page-heading, .portal-heading { margin-bottom: 1.15rem; }
    .button, td .button, .pagination a, .pagination > span { min-height: 2.75rem; }
    .pagination a, .pagination > span { min-width: 2.75rem; }
    form input, form select, form textarea { min-height: 2.75rem; font-size: 1rem; }
    .filter-bar { gap: .7rem; padding: .9rem; }
    .filter-bar > div, .filter-bar > div:first-child { width: 100%; min-width: 0; flex-basis: 100%; }
    .card, .settings-card, .error-panel { padding: 1.15rem; }
    .table-shell { background: transparent; border: 0; }
    tbody tr { padding: .45rem .85rem; margin-bottom: .7rem; border-radius: .5rem; }
    tbody tr:hover { background: #fff; }
    td { padding: .55rem 0; grid-template-columns: minmax(6rem, .7fr) minmax(0, 1.3fr); gap: .65rem; font-size: .8rem; }
    td::before { color: var(--muted); font-size: .7rem; font-weight: 500; text-transform: none; }
    .guest-page .header-inner { flex-direction: row; align-items: center; padding-block: .6rem; }
    .login-page .main-content { padding-inline: 1rem; }
    .login-page .auth-card { padding: 1.5rem; }
    .guest-page .auth-card { padding: 1.25rem; }
}
@media (max-width: 380px) {
    .app-topbar { padding-inline: .75rem; }
    .app-page .main-content { padding-inline: .75rem; }
    .user-avatar { width: 1.75rem; height: 1.75rem; }
    .nav-logout svg { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
    .button, .nav-logout, .account-nav a { transition: background-color .15s, border-color .15s, color .15s; }
}
@media print {
    .app-sidebar, .app-topbar, .site-header, .skip-link, .navigation-backdrop,
    .archive-viewer-toolbar, .archive-no-print, .portal-footer { display: none !important; }
    body, .app-workspace { display: block; min-height: 0; }
    .app-workspace { margin: 0; }
    .app-page .main-content { width: 100%; max-width: none; margin: 0; padding: 0; }
    body { background: #fff; }
    .archive-print .archive-page { max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; break-after: page; break-inside: avoid; }
    .archive-print .archive-page:last-child { break-after: auto; }
    .archive-print .archive-page img { width: 100%; max-height: 270mm; object-fit: contain; }
    .archive-print figcaption { margin: 0; font-size: 9pt; }
}
