/* Local institutional theme. Deliberately system fonts only. */
:root {
  --app-teal: #0b716b;
  --app-teal-dark: #075c58;
  --app-teal-soft: #e5f3f0;
  --app-ink: #24383d;
  --app-muted: #63767d;
  --app-line: #dfe7e8;
  --app-surface: #f5f8f9;
  --tblr-primary: #0b716b;
  --tblr-primary-rgb: 11, 113, 107;
  --tblr-body-bg: #f5f8f9;
  --tblr-body-color: #24383d;
  --tblr-font-sans-serif: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --tblr-border-color: #dfe7e8;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--app-surface); color: var(--app-ink); font-family: var(--tblr-font-sans-serif); font-size: 14px; line-height: 1.6; }
a { color: var(--app-teal); text-decoration: none; }
a:hover { color: var(--app-teal-dark); }
h1, h2, h3 { color: var(--app-ink); letter-spacing: -.025em; }
h1 { font-size: clamp(1.55rem, 2.5vw, 2rem); line-height: 1.25; font-weight: 650; margin: 0 0 10px; overflow-wrap: anywhere; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #248b82; outline-offset: 3px; }
.ui-icon { display: inline-block; flex-shrink: 0; width: 20px; height: 20px; vertical-align: middle; }
.btn { min-height: 40px; gap: 8px; border-radius: 7px; font-weight: 600; white-space: normal; }
.btn-sm { min-height: 34px; }
.btn-primary { background: var(--app-teal); border-color: var(--app-teal); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: var(--app-teal-dark); border-color: var(--app-teal-dark); color: #fff; }
.btn-outline-primary { color: var(--app-teal); border-color: #9ec9c2; }
.btn-outline-primary:hover { background: var(--app-teal); border-color: var(--app-teal); color: #fff; }
.btn-outline-secondary { color: #425b63; border-color: #cad7da; background: #fff; }
.btn-outline-secondary:hover { background: #edf3f4; border-color: #adbdc1; color: var(--app-ink); }
.btn-link { color: var(--app-teal); }
.form-control, .form-select { min-height: 42px; border-color: #cad7da; border-radius: 6px; background-color: #fff; color: var(--app-ink); }
.form-control:focus, .form-select:focus { border-color: #3c978f; box-shadow: 0 0 0 3px #0b716b14; }
.form-label { font-size: .85rem; font-weight: 600; }
.form-hint { color: var(--app-muted); font-size: .8rem; line-height: 1.6; margin-top: 8px; }
textarea.form-control { resize: vertical; min-height: 90px; }
.text-secondary { color: var(--app-muted) !important; }
.badge { font-weight: 600; letter-spacing: 0; line-height: 1.5; white-space: normal; text-align: left; }
.bg-teal-lt { color: #08645d !important; background: var(--app-teal-soft) !important; }
.status-badge { font-size: 11px; }
.alert { border-radius: 8px; overflow-wrap: anywhere; }
.alert > strong { display: block; margin-bottom: 5px; }
.skip-link { position: fixed; top: -60px; left: 12px; padding: 10px 18px; z-index: 1100; background: #fff; border: 2px solid var(--app-teal); border-radius: 5px; }
.skip-link:focus { top: 12px; }
.app-sidebar { position: fixed; inset: 0 auto 0 0; width: 252px; z-index: 100; background: #fff; border-right: 1px solid var(--app-line); padding: 30px 20px 20px; display: flex; flex-direction: column; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--app-ink); font-size: 21px; font-weight: 700; letter-spacing: -.04em; line-height: 1.25; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 39px; height: 42px; flex-shrink: 0; color: #fff; background: var(--app-teal); border-radius: 10px 10px 10px 3px; font-size: 24px; letter-spacing: -.06em; }
.brand-logo { display: block; width: 39px; height: 42px; flex-shrink: 0; object-fit: contain; }
.brand small { display: block; font-weight: 400; color: var(--app-muted); font-size: 11px; letter-spacing: .01em; margin-top: 5px; }
.sidebar-brand { margin-bottom: 42px; align-items: flex-start; }
.sidebar-brand > span { min-width: 0; }
.sidebar-brand .brand-logo { margin-top: 2px; }
.sidebar-brand small { line-height: 1.5; }
.sidebar-label { font-size: 10px; color: #788b91; letter-spacing: .12em; font-weight: 700; margin: 0 12px 13px; }
.sidebar-nav { display: grid; gap: 7px; }
.sidebar-nav .nav-link { display: flex; gap: 12px; align-items: center; color: #536b73; padding: 12px; min-height: 46px; border-radius: 7px; font-size: 13px; font-weight: 550; line-height: 1.5; }
.sidebar-nav .nav-link:hover { background: #f2f7f6; color: var(--app-teal); }
.sidebar-nav .nav-link.active { background: var(--app-teal-soft); color: #08645d; font-weight: 650; }
.sidebar-bottom { margin-top: auto; padding: 32px 8px 0; display: grid; gap: 5px; overflow-wrap: anywhere; }
.sidebar-bottom strong { font-size: 13px; margin-top: 6px; }
.sidebar-bottom small { color: var(--app-muted); margin-bottom: 12px; }
.role-chip { color: var(--app-teal); background: var(--app-teal-soft); border-radius: 4px; width: fit-content; font-size: 10px; font-weight: 700; padding: 3px 8px; text-transform: uppercase; letter-spacing: .07em; }
.app-main { margin-left: 252px; min-height: 100vh; display: flex; flex-direction: column; min-width: 0; }
.desktop-header { background: #fff; border-bottom: 1px solid var(--app-line); min-height: 73px; display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 16px 32px; font-size: 12px; color: var(--app-muted); }
.breadcrumb-separator { margin: 0 12px; color: #bccacc; }
.mobile-header { display: none; }
.page-content { padding: 32px; width: 100%; max-width: 1680px; margin: 0 auto; flex: 1; min-width: 0; }
.page-content:focus { outline: none; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-heading > div:first-child { min-width: 0; }
.page-heading p:last-child { margin-bottom: 0; max-width: 760px; }
.eyebrow { font-size: 10px; font-weight: 750; letter-spacing: .13em; color: var(--app-teal); margin: 0 0 10px; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; flex-shrink: 0; }
.app-footer { display: flex; justify-content: space-between; gap: 12px; padding: 22px 32px; color: #7a8b91; font-size: 11px; }
.card { border: 1px solid var(--app-line); border-radius: 10px; box-shadow: 0 2px 4px #20383d02; min-width: 0; }
.card-header { min-height: 62px; border-bottom: 1px solid var(--app-line); padding: 18px 24px; background: #fff; }
.card-title { font-weight: 650; font-size: 1rem; margin-bottom: 12px; letter-spacing: -.02em; }
.card-header .card-title { margin: 0; }
.card-body { padding: 24px; }
.card-footer { padding: 18px 24px; background: #fff; border-top: 1px solid var(--app-line); }
.policy-card { background: #edf5f3; border-color: #d9e9e4; }
.two-column { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.compact-columns { grid-template-columns: minmax(0, 1.5fr) minmax(250px, .9fr); max-width: 1120px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 28px; }
.metric-card { color: var(--app-ink); transition: border-color .15s; }
.metric-card:hover { color: var(--app-ink); border-color: #8dbeb5; }
.metric-card .card-body { position: relative; }
.metric-card p { font-size: 12px; margin: 0 40px 8px 0; }
.metric-value { display: block; font-size: 32px; line-height: 1.2; font-weight: 650; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.metric-icon { display: flex; justify-content: center; align-items: center; position: absolute; top: 22px; right: 22px; width: 36px; height: 36px; color: var(--app-teal); background: #eff7f5; border-radius: 9px; }
.metric-link { display: block; margin-top: 20px; font-size: 11px; color: var(--app-muted); }
.metric-link .ui-icon { width: 14px; height: 14px; margin-left: 6px; }
.action-link { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; margin-top: 10px; }
.readable-list { padding-left: 20px; margin-bottom: 0; }
.readable-list li { margin-bottom: 12px; }
.filter-grid { display: grid; grid-template-columns: minmax(150px, 2fr) minmax(100px, .75fr) minmax(160px, 1.3fr) minmax(100px, .7fr); gap: 16px; align-items: end; }
.filter-buttons { display: flex; gap: 6px; grid-column: span 2; }
.filter-archive { grid-column: span 2; justify-self: end; margin: 0 0 8px; }
.queue-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--app-line); margin-bottom: 24px; overflow-x: auto; }
.queue-tabs a { font-size: 13px; font-weight: 550; color: var(--app-muted); padding: 10px 0 15px; white-space: nowrap; border-bottom: 2px solid transparent; }
.queue-tabs a.active { border-color: var(--app-teal); color: var(--app-teal); }
/* Contain absolutely positioned accessible labels inside horizontal scroll. */
.table-responsive { position: relative; max-width: 100%; }
.table { margin-bottom: 0; --tblr-table-border-color: #e6edee; }
.table > :not(caption) > * > * { padding: 16px 20px; }
.table thead th { font-size: 10px; text-transform: uppercase; letter-spacing: .055em; color: #6d8087; background: #f8fafb; font-weight: 650; }
.table td { font-size: 12px; }
.table-title { display: block; color: var(--app-teal); font-weight: 650; margin-bottom: 4px; }
.requests-table { min-width: 1000px; }
.requests-table td:nth-child(2) { min-width: 220px; max-width: 320px; }
.table-description { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; color: var(--app-muted); }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 550; }
.identity-value { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.total-amount { color: var(--app-teal); font-size: 15px !important; font-weight: 700; }
.status-stack { display: grid; gap: 8px; }
.status-stack > span { display: flex; align-items: flex-start; gap: 7px; }
.status-stack small { color: #7b8e95; width: 36px; flex-shrink: 0; font-size: 10px; padding-top: 3px; }
.list-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 12px; flex-wrap: wrap; }
.page-link { color: var(--app-teal); min-width: 36px; min-height: 36px; border-radius: 5px; }
.page-item.active .page-link { background: var(--app-teal); color: #fff; border-color: var(--app-teal); }
.empty-state { padding: 45px 20px; text-align: center; color: var(--app-muted); }
.empty-state > .ui-icon { width: 32px; height: 32px; margin-bottom: 14px; color: #7caaa3; }
.empty-state h2 { font-size: 15px; margin-bottom: 8px; }
.empty-state p { margin-bottom: 0; }
.form-columns, .detail-columns { grid-template-columns: minmax(0, 1fr) 310px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-span-full { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.item-row { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(100px, .55fr) auto; align-items: end; gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--app-line); }
.item-row:first-child { padding-top: 0; }
.item-row .remove-item { margin-bottom: 1px; min-height: 42px; font-size: 12px; }
.item-footer { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding-top: 20px; }
.rows-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 0 4px; font-weight: 600; }
.rows-total .draft-total { margin-top: 0; }
.draft-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.draft-card { display: grid; gap: 8px; min-width: 0; padding: 18px; border: 1px solid var(--app-line); border-radius: 8px; color: var(--app-ink); overflow-wrap: anywhere; }
.draft-card:hover, .draft-card:focus-visible { border-color: var(--app-teal); background: var(--app-teal-soft); }
.draft-card span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.draft-card small, .auth-message { color: var(--app-muted); font-size: 12px; }
.draft-card .draft-continue { display: inline-flex; align-items: center; justify-self: start; gap: 6px; padding: 6px 10px; border-radius: 6px; background: var(--app-teal-soft); color: var(--app-teal-dark); font-size: 12px; font-weight: 600; line-height: 1.4; -webkit-line-clamp: unset; overflow: visible; }
.draft-continue svg { width: 15px; height: 15px; }
[data-autosave-status] { min-height: 1.6em; overflow-wrap: anywhere; }
[data-autosave-status][data-save-state] { position: sticky; top: 16px; z-index: 5; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 12px 16px; margin: 0 0 20px; border: 1px solid var(--app-line); border-radius: 8px; background: #fff; color: var(--app-muted); box-shadow: 0 3px 12px #24383d08; }
[data-autosave-status][data-save-state]::before { content: ''; display: block; flex: 0 0 18px; width: 18px; height: 18px; border: 2px solid #bdcdce; border-radius: 50%; box-sizing: border-box; }
[data-autosave-status][data-save-state="pending"] { border-color: #e7d8b7; background: #fffcf5; color: #775922; }
[data-autosave-status][data-save-state="pending"]::before { border: 5px solid #fffcf5; background: #b88527; box-shadow: 0 0 0 1px #dcc498; animation: draft-pulse 1.4s ease-in-out infinite; }
[data-autosave-status][data-save-state="saving"] { border-color: #b9dad2; background: #f3faf8; color: var(--app-teal-dark); }
[data-autosave-status][data-save-state="saving"]::before { border-color: #c5e2db; border-top-color: var(--app-teal); animation: draft-spin .7s linear infinite; }
[data-autosave-status][data-save-state="saved"] { border-color: #b9dad2; background: #f3faf8; color: var(--app-teal-dark); }
[data-autosave-status][data-save-state="saved"]::before { width: 9px; height: 14px; flex-basis: 9px; margin: 0 5px 5px 3px; border: solid var(--app-teal); border-width: 0 2px 2px 0; border-radius: 0; transform: rotate(45deg); }
[data-autosave-status][data-save-state="error"] { border-color: #e7b7b7; background: #fff6f6; }
[data-autosave-status][data-save-state="error"]::before { content: '!'; border-color: currentColor; color: #ad3333; font-size: 12px; font-weight: 700; line-height: 14px; text-align: center; }
@keyframes draft-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes draft-spin { to { transform: rotate(360deg); } }
.draft-total { display: block; font-size: 22px; font-weight: 650; color: var(--app-teal); letter-spacing: -.025em; margin-top: 8px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.metadata-list { display: grid; grid-template-columns: minmax(80px, .7fr) minmax(0, 1fr); gap: 12px; margin: 22px 0; font-size: 12px; }
.metadata-list dt { color: var(--app-muted); font-weight: 400; }
.metadata-list dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }
.document-metadata { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 28px; }
.document-metadata dt { color: var(--app-muted); font-size: 11px; font-weight: 400; margin-bottom: 4px; }
.document-metadata dd { font-weight: 550; margin: 0; overflow-wrap: anywhere; }
.section-label { font-size: 11px; font-weight: 650; color: var(--app-muted); margin-bottom: 8px; }
.preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; }
.wrap-cell { white-space: normal; overflow-wrap: anywhere; min-width: 140px; }
.version-notice { padding: 12px 18px; border: 1px solid #c8e3db; background: #eef8f4; color: #2e6456; border-radius: 7px; margin-bottom: 20px; }
.signature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.signature-block { text-align: center; min-width: 0; }
.signature-image { display: block; width: 100%; height: 110px; object-fit: contain; margin: 12px auto; background: #fff; }
.signature-empty { display: flex; height: 110px; align-items: center; justify-content: center; font-size: 11px; color: #8a9b9e; border: 1px dashed var(--app-line); border-radius: 5px; margin: 12px 0; }
.signature-name { display: block; font-size: 11px; border-top: 1px solid var(--app-line); padding-top: 8px; overflow-wrap: anywhere; }
.approval-timeline { list-style: none; padding: 0 0 0 16px; border-left: 2px solid #d7e8e3; margin: 22px 0 26px; }
.approval-timeline li { position: relative; margin-bottom: 26px; }
.approval-timeline li:last-child { margin-bottom: 0; }
.approval-timeline li::before { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--app-teal); left: -21px; top: 6px; }
.approval-timeline h3 { font-size: 12px; margin: 0 0 10px; }
.approval-timeline p { font-size: 12px; }
.decision-card { border-top: 3px solid var(--app-teal); }
.decision-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.archive-card summary { padding: 17px 24px; font-size: 12px; color: #92504b; cursor: pointer; }
.version-entry { border: 1px solid var(--app-line); border-radius: 7px; margin-bottom: 12px; }
.version-entry:last-child { margin-bottom: 0; }
.version-entry summary { display: flex; align-items: center; gap: 14px; padding: 16px; cursor: pointer; flex-wrap: wrap; }
.version-entry summary::after { content: "+"; margin-left: auto; color: var(--app-muted); font-size: 20px; }
.version-entry[open] summary::after { content: "−"; }
.version-number { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: #edf4f3; color: var(--app-teal); font-weight: 700; border-radius: 6px; }
.version-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.version-content { padding: 0 20px 20px; font-size: 12px; }
.legacy-entry { border-top: 1px solid var(--app-line); padding: 16px 0 0; margin-top: 16px; }
.legacy-entry > span { margin-right: 10px; }
.legacy-entry p { margin-top: 10px; }
.users-table { min-width: 950px; }
.account-actions { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; min-width: 180px; }
.reset-details { max-width: 250px; }
.reset-details summary { cursor: pointer; }
.reset-confirmation { background: #fff8f7; border: 1px solid #ecd3ce; border-radius: 7px; padding: 12px; margin-top: 10px; width: 230px; }
.reset-confirmation p { margin-bottom: 10px; }
.profile-name { font-size: 1.4rem; font-weight: 650; overflow-wrap: anywhere; }
.profile-signature { padding: 16px; border: 1px solid var(--app-line); border-radius: 8px; }
.profile-signature .signature-image { max-width: 300px; height: 140px; }
.signature-placeholder { border: 1px dashed var(--app-line); border-radius: 8px; padding: 32px 20px; margin-bottom: 20px; }
.guide-steps { list-style: none; counter-reset: guide; padding: 0; margin: 20px 0 0; }
.guide-steps li { counter-increment: guide; position: relative; padding: 0 0 24px 46px; }
.guide-steps li::before { content: counter(guide, decimal-leading-zero); position: absolute; left: 0; top: 0; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 7px; background: var(--app-teal-soft); color: var(--app-teal); font-size: 11px; font-weight: 700; }
.guide-steps h3 { font-size: 14px; padding-top: 3px; }
.guide-steps p { font-size: 13px; color: var(--app-muted); margin-bottom: 0; }
.guide-steps li:last-child { padding-bottom: 0; }
.error-state { max-width: 620px; margin: 7vh auto; text-align: center; padding: 32px 20px; }
.error-code { font-size: 90px; font-weight: 750; color: #c1dcd7; line-height: 1; letter-spacing: -.06em; margin-bottom: 30px; }
.error-state .btn { margin-top: 16px; }
.auth-main { min-height: 100vh; }
.auth-main > .alert { max-width: 620px; margin: 16px auto; }
.login-grid { min-height: 100vh; display: grid; grid-template-columns: 47% 53%; }
.login-story { background: #0b5b57; color: #d5ebe6; display: flex; flex-direction: column; justify-content: space-between; padding: 48px clamp(30px, 5.5vw, 90px); }
.brand-light { color: #fff; }
.brand-light .brand-mark { background: #ffffff1a; border: 1px solid #ffffff30; }
.login-story .eyebrow { color: #90c9bc; margin-bottom: 24px; }
.login-story h1 { font-size: clamp(2rem, 3.4vw, 3.4rem); color: #fff; font-weight: 550; letter-spacing: -.04em; line-height: 1.18; margin-bottom: 24px; }
.login-story p:not(.eyebrow) { max-width: 380px; font-size: 15px; line-height: 1.8; color: #badbd1; }
.login-story small { color: #9cc7ba; font-size: 11px; }
.login-steps { list-style: none; padding: 0; margin: 40px 0 25px; display: grid; gap: 20px; font-size: 12px; }
.login-steps span { display: inline-block; margin-right: 12px; color: #82b9ac; font-size: 10px; border-bottom: 1px solid #5e9e8b; padding-bottom: 3px; }
.login-panel { display: flex; justify-content: center; align-items: center; padding: 50px 32px; background: #fff; }
.login-story-visual { position: relative; overflow: hidden; }
.login-story-visual .brand { position: relative; z-index: 1; }
.login-artwork { width: calc(100% + 60px); max-width: 580px; margin: 20px -30px; align-self: center; }
.login-artwork img { display: block; width: 100%; height: auto; aspect-ratio: 1; mask-image: radial-gradient(ellipse at center, #000 52%, transparent 73%); }
.login-story-visual > small { letter-spacing: .08em; }
.auth-card { width: 100%; max-width: 390px; }
.auth-card h2 { font-size: 27px; font-weight: 650; margin-bottom: 12px; letter-spacing: -.04em; }
.auth-card .form-control-lg { min-height: 48px; font-size: 14px; }
.auth-card .btn-lg { min-height: 48px; font-size: 14px; }
.auth-note { font-size: 11px; color: var(--app-muted); padding-top: 28px; margin-top: 32px; border-top: 1px solid var(--app-line); }
.password-field { display: flex; position: relative; }
.password-field input { padding-right: 90px; min-width: 0; }
.password-toggle { position: absolute; top: 1px; bottom: 1px; right: 1px; border: 0; background: transparent; color: var(--app-teal); font-size: 11px; font-weight: 600; padding: 0 12px; border-radius: 0 6px 6px 0; }
@media (min-width: 1550px) { .stats-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } .metric-card .card-body { padding: 20px; } .metric-icon { display: none; } }
@media (max-width: 1199px) {
  .page-content { padding: 26px; }
  .page-heading { flex-wrap: wrap; }
  .form-columns, .detail-columns { grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; }
  .card-body, .card-header { padding: 20px; }
  .item-row { grid-template-columns: minmax(100px, 1fr) minmax(100px, .7fr); }
  .item-row .remove-item { grid-column: 2; justify-self: end; min-height: 34px; }
}
@media (max-width: 991px) {
  .mobile-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; min-height: 65px; background: #fff; border-bottom: 1px solid var(--app-line); position: relative; z-index: 103; }
  .mobile-header .brand { font-size: 18px; }
  .mobile-header .brand-mark { width: 31px; height: 34px; font-size: 20px; }
  .app-sidebar { width: 280px; top: 65px; transform: translateX(-100%); visibility: hidden; transition: transform .2s ease; z-index: 102; box-shadow: 10px 0 40px #1a393412; }
  .app-sidebar.is-open { transform: translateX(0); visibility: visible; }
  .app-sidebar .sidebar-brand { display: none; }
  .app-sidebar .sidebar-label { margin-top: 0; }
  .menu-open { overflow: hidden; }
  .menu-open::before { content: ""; position: fixed; inset: 65px 0 0; background: #183f3c55; z-index: 101; }
  .app-main { margin-left: 0; min-height: calc(100vh - 65px); }
  .desktop-header { display: none; }
  .app-footer { padding: 22px 26px; }
  .login-story { padding: 36px; }
  .login-story h1 { font-size: 2.3rem; }
}
@media (max-width: 767px) {
  .two-column, .compact-columns, .form-columns, .detail-columns { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .page-content { padding: 24px 18px; }
  .page-heading { gap: 18px; margin-bottom: 22px; }
  .page-heading > .page-actions { width: 100%; }
  .page-heading .page-actions .btn { flex: 1; min-width: 120px; }
  .page-heading p { font-size: 13px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
  .metric-icon { display: none; }
  .metric-card p { margin-right: 0; }
  .metric-value { font-size: 28px; }
  .metric-link { margin-top: 12px; }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .filter-search { grid-column: 1 / -1; }
  .filter-buttons { grid-column: auto; }
  .filter-archive { grid-column: 1 / -1; justify-self: start; margin-top: 4px; }
  .card-body, .card-header, .card-footer { padding: 20px; }
  .table > :not(caption) > * > * { padding: 14px 18px; }
  .app-footer { flex-direction: column; padding: 18px; gap: 4px; }
  .login-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 100vh; background: #fff; }
  .login-story { padding: 24px; gap: 30px; }
  .login-story h1 { font-size: 1.8rem; margin-bottom: 0; }
  .login-story .eyebrow { margin-bottom: 12px; }
  .login-story p:not(.eyebrow), .login-steps, .login-story > small { display: none; }
  .login-story-visual { min-height: 112px; justify-content: center; }
  .login-story-visual .login-artwork { display: none; }
  .login-panel { align-items: flex-start; padding: 34px 24px 40px; }
  .auth-card { max-width: 480px; }
  .auth-card h2 { font-size: 24px; }
  .auth-note { padding-top: 20px; margin-top: 25px; }
  .list-footer { gap: 14px; }
  .pagination { gap: 4px; flex-wrap: wrap; }
  .page-link { padding: 7px 10px; font-size: 11px; }
}
@media (max-width: 420px) {
  .page-content { padding: 20px 14px; }
  .card-body, .card-header, .card-footer { padding: 17px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .item-row { grid-template-columns: minmax(0, 1fr); }
  .item-row .remove-item { grid-column: 1; }
  .document-metadata { gap: 16px; }
  .signature-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .signature-image, .signature-empty { max-width: 230px; margin-left: auto; margin-right: auto; }
  .form-actions .btn { width: 100%; }
  .filter-grid { grid-template-columns: minmax(0, 1fr); }
  .filter-search, .filter-archive { grid-column: 1; }
  .version-entry summary { gap: 10px; }
  .version-badges { width: 100%; }
  .version-content { padding: 0 16px 16px; }
  .stats-grid { gap: 10px; }
  .metric-card .card-body { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print {
  body { background: #fff; font-size: 11px; }
  .app-sidebar, .mobile-header, .desktop-header, .app-footer, .page-actions, .decision-card, .archive-card, .skip-link { display: none !important; }
  .app-main { margin: 0; }
  .page-content { padding: 0; }
  .card { break-inside: avoid; box-shadow: none; }
  .detail-columns { display: block; }
  .table-responsive { overflow: visible; }
}
