/* Put finding and reading files before administrative detail. */
.page-heading .eyebrow,.profile-identity .eyebrow{display:none}
.page-heading p{font-size:12px;margin-top:9px}
.page-heading{margin-bottom:25px;align-items:center}
.page-heading h1{font-size:28px;letter-spacing:-.7px}
.stats{display:none}
.bottom-note,.sidebar-tip{display:none}
.sidebar-bottom{margin-top:auto}
.panel-toolbar{padding:20px 23px}
.search-field{width:min(380px,58%)}
.profile-panel{padding:23px 26px;margin-bottom:23px;align-items:center;border:0;background:transparent;box-shadow:none}
.profile-identity .person-avatar{width:50px;height:50px;font-size:21px}
.profile-identity h1{font-size:27px}
.profile-meta{margin-top:7px;gap:7px 15px}
.record-tabs{display:flex;gap:23px;border-bottom:1px solid #dddde6;margin-bottom:25px}
.record-tabs button{position:relative;border:0;background:none;color:#81818b;font-size:13px;font-weight:500;padding:12px 2px 15px}
.record-tabs button[aria-selected="true"]{color:#1d1d1f;font-weight:600}
.record-tabs button[aria-selected="true"]::after{content:"";position:absolute;bottom:-1px;left:0;right:0;height:2px;border-radius:2px;background:#0071e3}
.basic-profile-panel{margin-bottom:0;padding:25px}
.profile-detail-group h3{font-size:12px;color:#6e6e73;font-weight:600}
.profile-detail-group{padding:20px 0}
.profile-details-grid{margin-top:17px;gap:18px 24px}
.profile-form-group.common-fields{background:transparent;border:0;padding:2px 0 22px;margin:22px 0 0}
.common-fields h3{font-size:12px;color:#75757e;font-weight:500;margin-bottom:17px}
.profile-form-group.optional-fields{padding:0;border:0;border-top:1px solid #e3e3e9;border-radius:0;background:transparent;margin:0}
.optional-fields>summary{font-size:12px;font-weight:500;color:#50505a;padding:18px 1px;cursor:pointer;list-style-position:inside}
.optional-fields>summary::marker{color:#9b9ba5;font-size:10px}
.optional-fields>summary>span{float:right;font-size:10px;font-weight:400;color:#8d8d97}
.optional-fields>.profile-fields-grid{padding:3px 0 23px}
.profile-editor-intro{margin-bottom:19px;font-size:11px}
.profile-editor-body{background:#fff;padding-bottom:12px}
.profile-modal{width:760px}
.profile-modal .modal-heading .eyebrow{display:none}
.profile-editor-body>.identity-fields{padding-bottom:0}
.profile-fields-grid{gap:17px 20px}
.profile-fields-grid input,.profile-fields-grid select{padding:10px 12px}
.staff-contract-card{padding:24px}
.staff-contract-heading h3{margin:9px 0 7px;font-size:17px}
.staff-contract-overview{margin:21px 0 17px;padding:17px 20px}
.staff-contract-fields .basic-profile-panel{padding-top:17px}
.review-profile-details{margin-top:12px}
.review-profile-details>.field-hint{display:none}
.scan-toolbar{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:13px 15px;background:#f5f8fd;border:1px solid #e4ebf7;border-radius:11px}
.scan-toolbar strong{display:block;color:#48617e;font-size:12px;font-weight:500}
.scan-toolbar span:not(.ui-icon){display:block;color:#8190a3;font-size:10px;margin-top:4px}
.scan-toolbar .button{min-height:34px;padding:7px 11px;font-size:11px;flex-shrink:0}
.scan-message{font-size:11px;color:#6f8097;line-height:1.8;margin:9px 0 0}
.scan-message:empty{display:none}
.scan-panel{margin-bottom:21px}
.scan-evidence,.scan-original{border:1px solid #e5e9f0;border-radius:10px;margin-top:11px;padding:11px 13px}
.scan-evidence>summary,.scan-original>summary{font-size:11px;color:#6e7e94;cursor:pointer}
.scan-candidate{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #eeeef3;min-width:0}
.scan-candidate:last-child{border-bottom:0}
.scan-candidate>div{min-width:0;overflow-wrap:anywhere}
.scan-candidate span{display:block;font-size:10px;color:#86868b}
.scan-candidate strong{display:block;font-size:12px;font-weight:500;margin:5px 0}
.scan-candidate small{display:block;color:#8a8a94;font-size:10px;line-height:1.8}
.scan-candidate .scan-warning{color:#ac7b2f}
.scan-candidate button{flex-shrink:0;font-size:10px;color:#0071e3}
.scan-original img{display:block;width:100%;height:auto;margin-top:12px;border:1px solid #e5e5ea}
.review-form .scan-toolbar{flex-wrap:wrap;gap:9px}
.review-form .scan-toolbar>div>span{display:none}
.review-form .scan-panel{margin-bottom:0}
.review-profile-details .common-fields>.profile-fields-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.review-profile-details .optional-fields>.profile-fields-grid{grid-template-columns:1fr}
.review-submit{position:sticky;bottom:0;background:#fff;padding:13px 0 1px;box-shadow:0 -10px 14px #ffffffee}
.review-more{border-top:1px solid #e5e5ec;padding-top:15px;font-size:12px}
.review-more>summary{cursor:pointer;color:#7d7d87;font-size:11px;margin-bottom:13px}
.review-more>label{margin-top:15px}
.profile-actions{display:flex;gap:9px;flex-shrink:0}
.document-grid{display:flex;flex-direction:column;margin-top:0;gap:10px}
.document-card{display:flex;flex-direction:row;align-items:center;gap:17px;padding:20px 23px;border-radius:13px}
.file-glyph{display:grid;place-items:center;width:42px;height:49px;flex-shrink:0;background:#edf4fe;color:#5e88bd;border:1px solid #dce8f8;border-radius:10px}
.file-glyph .ui-icon{width:23px;height:23px}
.document-identity{min-width:0;flex:1}.document-card h3{font-size:14px;line-height:1.6}
.document-info{font-size:10px;margin-top:6px;line-height:1.9}
.document-actions{border:0;padding:0;margin:0;flex-shrink:0;gap:10px;max-width:290px;justify-content:flex-end}
.document-actions .text-button{font-size:11px}
.staff-contracts{margin-top:0}
@media(max-width:720px){
 main{padding:23px 17px}.page-heading{align-items:flex-start;gap:12px}.page-heading h1{font-size:25px}.page-heading p{font-size:10px}.page-heading>.button{margin-top:2px}.heading-actions{padding-top:0}
 .search-field{width:100%}.panel-toolbar{padding:18px 16px}.profile-panel{padding:2px 0 18px;gap:17px;margin-bottom:0}.profile-panel>.button{margin-left:0}.profile-identity .person-avatar{width:43px;height:43px}.profile-identity h1{font-size:25px}
 .record-tabs{margin-bottom:21px}.record-tabs button{font-size:12px}.basic-profile-panel{padding:22px 20px}.section-heading h2{font-size:15px}.staff-contract-card{padding:21px 19px}.staff-contract-overview{grid-template-columns:1fr 1fr;gap:17px;padding:16px}.staff-contract-overview>div:last-child{grid-column:1/-1}
 .profile-modal{max-width:calc(100vw - 20px)}.scan-toolbar{padding:12px;gap:10px}.scan-toolbar>div>span{max-width:155px;font-size:9px}.scan-toolbar .button{font-size:10px;padding:7px 8px}
 .profile-fields-grid{gap:16px}.common-fields h3{margin-bottom:15px}.optional-fields>summary{font-size:12px}.scan-candidate strong{font-size:11px}.scan-toolbar .button .ui-icon{width:13px;height:13px}
 .profile-actions{width:100%;margin-top:2px}.profile-panel{padding-bottom:21px}.profile-actions .button{flex:1;min-height:37px}
 .document-card{padding:18px 17px;gap:12px;flex-wrap:wrap}.document-actions{width:100%;max-width:none;border-top:1px solid #eeeef3;padding-top:10px;gap:15px}.document-card h3{font-size:13px}.file-glyph{width:34px;height:42px}
}
/* Resident portraits stay next to the identity they belong to. */
.person-avatar { position:relative; overflow:hidden; flex-shrink:0; }
.person-avatar img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; background:#eef1f5; }
.resident-photo-control { display:flex; flex-direction:column; align-items:center; gap:7px; flex-shrink:0; }
.profile-identity .resident-photo-control .person-avatar { width:68px; height:68px; }
.resident-photo-control .text-button { font-size:12px; white-space:nowrap; padding:0; }
.photo-target { font-size:16px; font-weight:600; margin:0 0 16px; overflow-wrap:anywhere; }
.photo-preview-area { display:flex; justify-content:center; margin-bottom:18px; }
.photo-preview-area img { max-width:100%; width:180px; height:210px; object-fit:contain; border-radius:12px; background:#f5f5f7; }
/* v0.4.2 visual refinement: quieter chrome, clearer surfaces, and more room for the record itself. */
:root{--background:#f3f5f9;--border:#e3e7ef;--green:#1677e8;--ink:#172033;--muted:#70798a}
body{background:radial-gradient(circle at 80% -10%,#e8f1ff 0,transparent 33%),linear-gradient(135deg,#f5f7fb 0%,#f1f3f7 100%);color:var(--ink)}
.sidebar{background:rgba(249,250,253,.84);border-right-color:#dfe4ed;box-shadow:10px 0 32px rgba(34,52,80,.035)}
.sidebar .brand{margin-bottom:52px}.brand-icon{box-shadow:0 7px 18px rgba(22,119,232,.23)}
.nav-item{border-radius:13px;padding:13px 14px}.nav-item.active{background:linear-gradient(100deg,#dcecff,#e8f2ff);box-shadow:inset 0 0 0 1px #cfe3fb;color:#126bd0}
.topbar{background:rgba(247,248,251,.72);border-bottom-color:#e1e5ed}.breadcrumb{font-size:11px}.account-avatar{background:#fff;box-shadow:0 2px 9px rgba(33,49,74,.08)}
main{max-width:1320px;padding-top:49px;padding-bottom:52px}.page-heading{margin-bottom:29px;align-items:flex-end}.page-heading .eyebrow{display:block;color:#7c94b2;font-size:9px;letter-spacing:2.1px;margin-bottom:10px}.page-heading h1{font-size:36px;letter-spacing:-1.4px;color:#172033}.page-heading p{color:#7a8494;font-size:12px;margin-top:9px}.heading-actions{gap:9px}.heading-actions .button{border-radius:13px;min-height:43px;box-shadow:0 5px 14px rgba(27,48,78,.06)}
.panel{border-color:#e0e5ee;border-radius:22px;box-shadow:0 18px 48px rgba(32,50,78,.065)}.panel-toolbar{padding:24px 28px;background:linear-gradient(180deg,#fff,#fbfcfe);border-bottom:1px solid #edf0f5}.panel-toolbar h2{font-size:15px;color:#202d42}.count-pill{background:#edf3fb;color:#66809f}.search-field{width:360px;border-color:#e1e6ef;background:#f7f9fc;border-radius:13px}.search-field:focus-within{border-color:#8ab9ef;box-shadow:0 0 0 4px rgba(22,119,232,.1)}
.archive-table th{background:#fbfcfe;color:#8994a4;border-top:0;padding:13px 28px;font-size:10px;letter-spacing:.15px}.archive-table td{padding:22px 28px;border-bottom-color:#edf0f5}.archive-table tbody tr{transition:background .18s}.archive-table tbody tr:hover{background:#f7faff}.person-cell{gap:14px}.person-avatar{width:44px;height:44px;border:3px solid #fff;background:linear-gradient(145deg,#eaf3ff,#dceafb);color:#5278a2;box-shadow:0 3px 11px rgba(55,88,125,.12);font-size:15px}.person-name{font-size:14px;color:#1f2b3e}.archive-number{color:#8b96a6;margin-top:4px}.table-action{padding:8px 12px;border:1px solid #d6e5f8;border-radius:9px;background:#f4f8fe;color:#1772d5;font-size:11px;transition:all .16s}.table-action:hover{background:#e8f2ff;border-color:#b7d3f4;color:#0b60bd}
.pagination{padding:15px 28px;background:#fff}.bottom-note{color:#8a94a3}
.profile-panel{padding:29px 32px;margin-bottom:26px;border:1px solid #e0e5ee;border-radius:23px;background:linear-gradient(115deg,rgba(255,255,255,.98),rgba(246,250,255,.94));box-shadow:0 18px 48px rgba(32,50,78,.06);align-items:center}.profile-identity{gap:18px}.profile-identity .resident-photo-control .person-avatar{width:78px;height:78px;border:4px solid #fff;box-shadow:0 8px 22px rgba(54,89,129,.16)}.profile-identity h1{font-size:32px;color:#172033;letter-spacing:-1.1px}.profile-meta{color:#7d899a;gap:8px 18px;margin-top:9px}.profile-meta span:first-child{color:#5680aa;font-weight:600}.resident-photo-control .text-button{color:#5e7895}.resident-photo-control .text-button:hover{color:#1677e8}.profile-actions{gap:10px}.profile-actions .button{border-radius:12px}.record-tabs{border-bottom-color:#e0e5ee}.record-tabs button{padding-top:13px;color:#8994a4}.record-tabs button[aria-selected="true"]{color:#1677e8}.record-tabs button[aria-selected="true"]::after{height:3px;background:#1677e8}
.document-card{border-color:#e0e5ee;border-radius:18px;background:rgba(255,255,255,.94);box-shadow:0 10px 28px rgba(32,50,78,.045);transition:transform .18s,box-shadow .18s}.document-card:hover{transform:translateY(-2px);box-shadow:0 16px 34px rgba(32,50,78,.09)}.file-glyph{background:#eef5ff;border-color:#d9e8fa;color:#4f8bd0;border-radius:12px}
.photo-preview-area img{box-shadow:0 12px 30px rgba(30,50,78,.12)}
.archive-filters{display:flex;align-items:center;gap:10px;min-width:0}.institution-filter{display:flex;align-items:center;gap:7px;flex-shrink:0;color:#7e8a9a;font-size:11px;font-weight:500}.institution-filter select{width:150px;margin:0;padding:10px 30px 10px 11px;border-color:#e1e6ef;border-radius:13px;background:#f7f9fc;color:#41536d;font-size:11px}.institution-filter select:focus{border-color:#8ab9ef;box-shadow:0 0 0 4px rgba(22,119,232,.1)}.filter-label{white-space:nowrap}#elder-list{position:relative}.is-loading{opacity:.62;transition:opacity .18s}.is-loading::after{content:"";display:block;position:absolute;left:50%;top:50%;width:20px;height:20px;margin:-10px;border:2px solid #dce8f8;border-top-color:#1677e8;border-radius:50%;animation:archive-spin .7s linear infinite}@keyframes archive-spin{to{transform:rotate(360deg)}}
.institution-mobile{display:none;color:#687c96;font-size:10px;margin-top:4px;overflow-wrap:anywhere}.archive-filters{max-width:100%;flex:0 1 570px}.archive-filters .search-field{min-width:0;flex:1}.institution-filter{min-width:0;flex-shrink:1}.institution-filter select{max-width:190px;text-overflow:ellipsis}#elder-list.is-loading{min-height:110px}
.ocr-progress{display:block;width:220px;max-width:100%;height:5px;margin-top:12px;border:0;border-radius:5px;overflow:hidden;accent-color:#1677e8}.ocr-progress::-webkit-progress-bar{background:#e8f0fa}.ocr-progress::-webkit-progress-value{background:#1677e8;border-radius:5px;transition:width .2s}.table-action:disabled,.text-button:disabled{cursor:wait}
.institution-table .person-name{overflow-wrap:anywhere}#org-list[aria-busy="true"]{opacity:.6}#institution-detail-view .profile-identity{min-width:0}#institution-detail-view h1{overflow-wrap:anywhere}#org-dialog .profile-editor-body{padding-bottom:24px}
@media(max-width:720px){.sidebar .nav-item{position:relative;flex-direction:column;gap:6px;padding:9px 4px;font-size:10px}.sidebar .nav-badge{position:absolute;top:3px;right:10px}.institution-table .person-avatar{display:none}.institution-table .person-name{font-size:12px}.institution-table td,.institution-table th{padding-inline:10px}#institution-detail-view .profile-panel{flex-wrap:wrap}}
@media(max-width:1100px){.panel-toolbar:has(.archive-filters){flex-wrap:wrap}.panel-toolbar .archive-filters{flex:1 1 100%}}
@media(max-width:950px){.institution-mobile{display:block}}
@media(max-width:950px) and (min-width:721px){
 .sidebar{width:190px}.workspace{margin-left:190px}.topbar{padding-inline:25px}main{padding:39px 24px 46px}.page-heading h1{font-size:32px}.archive-table .optional-column{display:none}.archive-table th,.archive-table td{padding-inline:20px}.panel-toolbar{padding-inline:22px}.search-field{width:min(340px,55vw)}.archive-filters{width:min(100%,530px)}.institution-filter{flex:1}.institution-filter select{width:100%}
}
@media(max-width:720px){
 body{background:linear-gradient(160deg,#f6f8fc,#f1f3f7)}.sidebar{box-shadow:0 5px 18px rgba(33,49,74,.05)}.sidebar .brand{margin-bottom:20px}.topbar{background:rgba(247,248,251,.9)}main{padding-top:30px;padding-inline:17px}.page-heading{margin-bottom:22px}.page-heading .eyebrow{font-size:8px;margin-bottom:8px}.page-heading h1{font-size:28px}.page-heading p{font-size:11px}.panel{border-radius:18px}.panel-toolbar{padding:17px 16px}.archive-filters{display:flex;flex-direction:column;align-items:stretch;gap:9px}.search-field{width:100%}.institution-filter{justify-content:space-between}.institution-filter select{flex:1;width:auto}.archive-table th,.archive-table td{padding-inline:13px}.person-avatar{width:36px;height:36px}.person-cell{gap:9px}.table-action{padding:7px 8px;font-size:10px}.profile-panel{padding:20px 18px 21px;border-radius:19px;box-shadow:0 10px 25px rgba(32,50,78,.06);align-items:flex-start}.profile-identity .resident-photo-control .person-avatar{width:58px;height:58px}.profile-identity{gap:12px}.profile-identity h1{font-size:27px}.profile-actions{margin-top:15px}.profile-actions .button{border-radius:10px}.document-card:hover{transform:none}
}
