/* Version 32: demo-inspired interface on the existing authenticated Supabase workspace.
   UI only: data and access controls remain those of the tested V31 application. */
:root{--navy:#102338;--navy2:#172e45;--gold:#c6a15c;--text:#182736;--sub:#788797;--line:#e7eaf0;--bg:#f7f8fa}
body{background:#f7f8fa;font-family:Inter,"DM Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:#182736}
.nh-shell{display:grid;grid-template-columns:255px minmax(0,1fr);min-height:100vh}
.nh-sidebar{background:#001235;color:#d5dfea;min-height:100vh;padding:24px 18px 18px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh;overflow-y:auto}
.nh-sidebar-top{flex:none}.nh-official{padding:0 9px;min-height:64px;display:flex;align-items:center}.nh-official img{display:block;width:195px;height:auto;max-height:80px;object-fit:contain;object-position:left center}
.nh-side-rule{margin:18px 6px 24px;border-top:1px solid #263953}.nh-side-caption{font-size:10px;letter-spacing:2px;font-weight:800;color:#7c91aa;margin:0 15px 10px}
.nh-sidebar .side{background:none;border-radius:0;position:static;display:flex;flex-direction:column;gap:3px;padding:0;top:auto;overflow:visible}
.nh-sidebar .side button{padding:11px 12px;color:#aebed1;border-radius:10px;display:flex;align-items:center;gap:12px;font-size:13px;font-weight:650;transition:background .15s;line-height:1.45;letter-spacing:.02px}
.nh-sidebar .side button:hover{background:#1b334d;color:#fff}.nh-sidebar .side button.selected{background:#253c54;color:white;box-shadow:inset 3px 0 0 var(--gold)}
.nh-side-icon{flex:0 0 22px;width:22px;color:#b6c7d7;font-family:system-ui,sans-serif;font-size:19px;text-align:center;line-height:1}.nh-sidebar .side button.selected .nh-side-icon{color:#e1c992}
.nh-sidebar-bottom{margin-top:auto;padding-top:20px}.nh-help{border:1px solid #33485d;padding:13px 14px;border-radius:9px;margin-bottom:17px;display:grid;gap:5px;font-size:12px}.nh-help b{color:#e1c992}.nh-help span{color:#b5c3d1}
.nh-user{display:flex;align-items:center;gap:9px;border-top:1px solid #314459;padding:17px 4px 0}.nh-user>div{min-width:0;flex:1}.nh-user b{display:block;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px}.nh-user small{display:block;color:#95a5b8;font-size:11px;text-transform:capitalize}.nh-avatar{display:grid;place-items:center;background:#324e6b;border-radius:50%;width:34px;height:34px;flex-shrink:0;color:#e3bd76;font-size:12px;font-weight:800}.nh-logout{border:0;background:transparent;color:#94a8bd;font-size:23px;padding:0 5px;cursor:pointer}.nh-logout:hover{color:#fff}
.nh-work{min-width:0}.nh-topbar{height:76px;background:#fff;border-bottom:1px solid #e7eaf0;display:flex;justify-content:space-between;align-items:center;gap:20px;padding:0 38px;position:sticky;top:0;z-index:20}
.nh-breadcrumb{font-size:13px;color:#8a96a4;white-space:nowrap}.nh-breadcrumb strong{font-weight:800;color:#2c3a48}.nh-breadcrumb .slash{margin:0 12px;color:#cbd3dc}
.nh-top-actions{display:flex;align-items:center;gap:14px;min-width:0}.nh-search{height:37px;display:flex;align-items:center;gap:8px;color:#9ba7b6;background:#fafbfc;border:1px solid #e8ebef;border-radius:8px;padding:0 12px;position:relative;min-width:270px}.nh-search>span{font-size:22px;line-height:1}.nh-search input{width:240px;min-width:0;background:transparent;border:0!important;outline:0;box-shadow:none!important;padding:7px 0;font-size:12px}.nh-search-results{position:absolute;left:0;top:43px;width:max(360px,100%);max-width:calc(100vw - 30px);padding:5px;background:white;border:1px solid var(--line);border-radius:10px;box-shadow:0 15px 45px #18273635;z-index:90;max-height:400px;overflow:auto}.nh-search-results button{background:white;width:100%;text-align:left;display:grid;gap:3px;border:0;border-bottom:1px solid #edf0f3;padding:10px 12px;cursor:pointer;color:#24384d}.nh-search-results button:hover{background:#fffaf0}.nh-search-results b{font-size:12px}.nh-search-results small{font-size:11px;color:#7e8c9a}.nh-no-results{padding:16px;font-size:12px;color:#8694a2}
.nh-company-label{display:block;min-width:170px;max-width:225px;margin:0}.nh-company-label select{border:1px solid #e6e9ee;border-radius:8px;padding:9px 12px;max-width:225px;font-size:12px;color:#415266;font-weight:650;background:white}.nh-icon-button{border:1px solid var(--line);border-radius:8px;background:#fff;color:#465c6f;font-size:21px;min-width:35px;height:35px;cursor:pointer}.nh-icon-button:hover{border-color:var(--gold)}.nh-avatar-top{background:#f3eadb;color:#95723a}
.nh-content{max-width:1620px;padding:25px 42px 65px;margin:0 auto;min-width:0}.nh-safety{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:11px 15px;background:#fff9ec;border:1px solid #f0e2c4;border-left:3px solid var(--gold);color:#6b593f;font-size:11px;margin-bottom:23px;border-radius:5px}.nh-safety strong{color:#775823;letter-spacing:.05em}.nh-safety span{flex:1;min-width:270px}.nh-safety a{font-weight:800;color:#886534;text-decoration:underline}
.nh-intro{align-items:center;margin:0 0 23px}.nh-intro h1{font:600 29px/1.2 Georgia,"Times New Roman",serif;color:#152a3b;margin:5px 0 7px}.nh-intro p{margin:0}.nh-section-label{letter-spacing:2.2px;font-size:10px;font-weight:800;color:#bd9350!important}.nh-intro #identity{font-size:12px;color:#8290a0}.nh-top-inline{display:flex;align-items:center;gap:6px;color:#6e7f91;font-size:11px}.nh-connection-dot{background:#37a57b;width:7px;height:7px;border-radius:50%}
.nh-content .module-head{margin:5px 0 14px}.nh-content .module-head h2{font-size:17px;font-weight:750}.nh-content .module-head .subtle{font-size:12px;color:#99a3af}.nh-content .module-head .btn.gold{font-size:12px}
.btn{border-radius:8px;font-size:12px;padding:10px 14px}.btn.gold{background:#c6a15c;border-color:#c6a15c;color:#102338}.btn.gold:hover{background:#d3ae67;border-color:#d3ae67}.btn.ghost{background:#fff;border:1px solid #dfe5ec}.btn.small{font-size:11px}
.panel{border:1px solid var(--line);background:#fff;border-radius:12px;box-shadow:0 7px 26px #1424340b;padding:20px 22px}
.nh-quick-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 22px}.nh-quick{background:#fff;border:1px solid #e5e8ec;border-radius:11px;cursor:pointer;text-align:left;padding:18px 14px;display:flex;align-items:center;gap:13px;min-width:0}.nh-quick:hover{border-color:var(--gold);background:#fffbf4}.nh-quick-symbol{display:grid;place-items:center;flex:none;border-radius:10px;background:#f9f2e5;color:#987b45;width:40px;height:40px;font-size:21px}.nh-quick b{display:block;color:#273b50;font-size:12px}.nh-quick small{display:block;font-size:11px;margin-top:3px;color:#8b98a6}
.stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:0 0 22px}.stats .stat{background:white;border:1px solid var(--line);border-radius:12px;padding:22px;box-shadow:0 7px 26px #1424340b;color:#183047}.stat .stat-label{display:flex;align-items:center;justify-content:space-between;font-weight:650;color:#687889;font-size:12px;line-height:1}.stat .stat-label span{font-size:19px;color:#c6a15c}.stats .stat b{display:block;color:#152d41;font:600 34px Georgia,"Times New Roman",serif;margin:14px 0 6px}.stats .stat small{font-size:11px;color:#99a3ae}
.nh-dashboard-grid{gap:18px}.nh-dashboard-grid .panel{padding:0;overflow:hidden}.nh-panel-head{padding:18px 22px;border-bottom:1px solid #edf0f3;display:flex;justify-content:space-between;align-items:center;gap:10px}.nh-panel-head h3{font-size:15px;margin:0;font-weight:750}.nh-panel-head small{font-size:11px;color:#a4afb9}.nh-panel-body{padding:18px 22px;min-height:180px}.nh-panel-body .record:first-child{border-top:0}.nh-panel-body .record:last-child{border-bottom:0}
.nh-checks p{margin:0 0 10px}.nh-checks .small-print{margin-top:14px}
.record{padding:15px 0}.record-open{font-weight:800;color:#25384b}.record-open:hover{color:#947139}.record small{font-size:11px;color:#90a0ae;margin-top:4px}.record .buttons{gap:6px}.record .btn{font-size:11px}.record .btn.view-action{background:#fffaf0;border:1px solid #e2c99a;color:#674f21}.tag{font-size:10px;font-weight:700;border-radius:20px;padding:4px 9px;background:#f0f3f6}.tag.warn{background:#fff3de;color:#946719;border:1px solid #f0d09b}
.toolbar label{font-weight:650}.toolbar input{font-size:12px}.count{font-size:12px}
/* Read-only cards styled like the original detailed record banner/tabs. */
#viewer{width:min(1160px,calc(100% - 35px));max-width:1160px;border-radius:12px}.viewer-controls{box-shadow:0 2px 8px #16283a12}.viewer-body{padding:0 26px 28px}.view-heading{background:#fff;position:relative;padding:26px 0 22px;border-bottom:1px solid #e9edf2}.view-eyebrow{color:#bf9452;font-size:10px;letter-spacing:2px;font-weight:800}.view-heading h2{font:600 28px/1.2 Georgia,"Times New Roman",serif;color:#152a3b}.view-badge{background:#fff5e3;border:1px solid #e8d4ad;font-size:11px;border-radius:22px}.nh-card-tabs{display:flex;gap:5px;overflow-x:auto;padding:8px 6px;background:#fff;border:1px solid #e7eaf0;border-radius:10px;margin:18px 0 6px}.nh-card-tabs button{white-space:nowrap;background:transparent;color:#7b8795;border:0;border-radius:7px;font-size:11px;font-weight:750;padding:11px 12px;cursor:pointer}.nh-card-tabs button:first-child,.nh-card-tabs button:hover{background:#f5eee3;color:#745324}.view-sections{gap:16px;margin-top:18px}.view-section{scroll-margin-top:90px;background:white;border-color:#e7eaf0}.view-section:first-child{background:white}.view-section h3{font-size:14px}.view-fact dt{font-size:10px;font-weight:750;color:#8998a6;text-transform:uppercase;letter-spacing:.03em}.view-fact dd{font-size:13px;color:#203348}.linked-record{background:#fcfdfe}.linked-record:hover{background:#fffaf1}
.nh-login{display:grid;grid-template-columns:minmax(330px,43%) minmax(350px,57%);min-height:100vh;background:#fff}.nh-login-brand{background:#001235;color:#d3be94;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;padding:clamp(35px,6vw,100px)}.nh-login-brand img{width:min(270px,90%);max-height:130px;object-fit:contain;object-position:left center;margin-bottom:43px}.nh-kicker{font-size:11px;font-weight:800;letter-spacing:2px;color:#bc9959;margin:0 0 16px}.nh-gold-rule{background:#c6a15c;width:66px;height:3px;margin:8px 0 27px}.nh-login-brand h2{font:500 clamp(25px,3vw,43px)/1.15 Georgia,"Times New Roman",serif;color:white;margin:0 0 22px}.nh-login-brand>p:not(.nh-kicker){font-size:15px;color:#bbcadb;line-height:1.7}.nh-login-brand small{margin-top:40px;color:#7e96af;font-size:10px;letter-spacing:2px}.nh-login-right{display:flex;align-items:center;justify-content:center;padding:40px 20px}.nh-login .auth{width:min(450px,100%);max-width:none;border:0;box-shadow:none;margin:0}.nh-login .auth h1{font:600 36px Georgia,"Times New Roman",serif;margin-bottom:16px}.nh-login .auth p{color:#6d7f91}.nh-login .auth label{font-size:12px;margin-top:18px}.nh-login .auth input{padding:12px}.nh-login .auth .btn{padding:13px;margin-top:22px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:1350px){.nh-topbar{padding:0 22px}.nh-content{padding:25px 25px 50px}.nh-search{min-width:220px}.nh-search input{width:190px}}
@media(max-width:1050px){.nh-shell{grid-template-columns:222px minmax(0,1fr)}.nh-sidebar{padding:20px 11px}.nh-top-actions{gap:7px}.nh-search{min-width:180px}.nh-search input{width:150px}.nh-company-label{min-width:145px}.nh-content{padding:20px}.nh-quick-actions{grid-template-columns:1fr}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.nh-shell{display:block}.nh-sidebar{height:auto;min-height:0;position:relative;padding:14px 15px}.nh-sidebar-top{display:flex;flex-direction:column}.nh-official{min-height:0}.nh-official img{height:49px;width:140px}.nh-side-rule,.nh-side-caption,.nh-sidebar-bottom{display:none}.nh-sidebar .side{display:flex;flex-direction:row;overflow-x:auto;gap:5px;margin-top:12px;white-space:nowrap}.nh-sidebar .side button{font-size:11px;white-space:nowrap;flex-shrink:0;padding:8px 12px}.nh-side-icon{display:none}.nh-topbar{height:auto;min-height:58px;padding:8px 12px;flex-wrap:wrap;position:relative}.nh-breadcrumb{font-size:11px}.nh-top-actions{width:100%;justify-content:space-between;gap:8px}.nh-search{flex:1;min-width:0}.nh-search input{width:100%}.nh-company-label{max-width:160px;min-width:120px}.nh-company-label select{width:100%;font-size:11px}.nh-avatar-top{display:none}.nh-content{padding:17px 13px 44px}.nh-intro h1{font-size:25px}.nh-top-inline{display:none}.nh-safety span{min-width:200px}.stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.stats .stat{padding:17px}.nh-quick-actions{grid-template-columns:1fr}.nh-quick{padding:13px}.nh-login{grid-template-columns:1fr}.nh-login-brand{min-height:280px;padding:35px}.nh-login-brand img{max-height:70px;margin-bottom:14px}.nh-login-brand>p:not(.nh-kicker),.nh-login-brand small{display:none}.nh-gold-rule{margin-bottom:14px}.nh-login-brand h2{font-size:26px;margin-bottom:0}.nh-login-right{padding:30px 16px}.nh-login .auth{padding:15px}}
@media(max-width:480px){.nh-company-label{max-width:130px}.nh-panel-body{min-height:0}.nh-panel-head{padding:14px}.nh-panel-body{padding:12px}.nh-safety a{width:100%}.nh-content .module-head{gap:8px}.view-heading h2{font-size:22px}}

/* V33 multi-agency UI */
.nh-neutral-brand{font-family:Georgia,serif;font-size:34px;color:#c9a351;letter-spacing:.08em;font-weight:700}
.nh-agency-wordmark{font-family:Georgia,serif;font-size:20px;color:#c9a351;line-height:1.3;font-weight:600;display:block;max-width:220px;overflow-wrap:anywhere}
.nh-agency-wordmark[hidden]{display:none!important}
.nh-company-label select{min-width:150px;max-width:210px}
.nh-agency-select-label[hidden]{display:none!important}
@media(max-width:780px){.nh-company-label select{min-width:120px;max-width:160px}}
