/* Admin-only visual system. Fixed dialogs retain the viewport as their containing block. */
body.nsf-admin-shell{isolation:isolate;--admin-glass:linear-gradient(140deg,#c1e5ff28,#3e669b20 45%,#10213cbd);--admin-rim:#d3edff42}
body.nsf-admin-shell::before{content:"";position:fixed;inset:-25vh -15vw;z-index:-1;pointer-events:none;background:radial-gradient(ellipse at 18% 25%,#4b9ee54a,transparent 38%),radial-gradient(ellipse at 80% 55%,#7774e535,transparent 40%),radial-gradient(ellipse at 55% 85%,#32c7da20,transparent 35%);animation:nsf-aurora 28s ease-in-out infinite alternate;will-change:transform}
@keyframes nsf-aurora{from{transform:translate3d(-2%,0,0) scale(1)}to{transform:translate3d(3%,-4%,0) scale(1.08)}}
@keyframes nsf-page-in{from{opacity:.65}to{opacity:1}}
@keyframes nsf-chart-in{from{transform:scaleY(.06);opacity:.5}to{transform:scaleY(1);opacity:1}}
body.nsf-admin-shell main,body.nsf-admin-shell>.nsf-shell{animation:nsf-page-in .45s ease-out}
body.nsf-admin-shell :is(.glass-panel,.nsf-loan-kpis>div,.nsf-loan-table,.nsf-tier-grid>div,.nsf-membership-table,main .bg-surface-container-low,main div.bg-surface-dim.rounded-xl){background:var(--admin-glass)!important;border:1px solid var(--admin-rim)!important;border-top-color:#e1f4ff70!important;box-shadow:inset 0 1px 0 #ffffff24,inset 0 -1px 0 #07102066,0 12px 30px -12px #020b2099!important;backdrop-filter:blur(18px) saturate(135%);-webkit-backdrop-filter:blur(18px) saturate(135%)}
body.nsf-admin-shell :is(main,.nsf-shell,.app-layout-wrapper){min-width:0}
body.nsf-admin-shell :is(h1,h2,h3){text-wrap:balance;overflow-wrap:anywhere}
body.nsf-admin-shell :is(input,select,textarea){max-width:100%;min-width:0}
body.nsf-admin-shell button:not(.leaflet-control-zoom-in):not(.leaflet-control-zoom-out){transition:background-color .18s,border-color .18s,box-shadow .18s,translate .18s;touch-action:manipulation}
body.nsf-admin-shell button:not(:disabled):not([role=switch]):not(.leaflet-control-zoom-in):not(.leaflet-control-zoom-out){box-shadow:inset 0 1px 0 #e4f5ff2e,0 3px 0 #030d1b55,0 6px 15px #030a181c}
body.nsf-admin-shell button:focus-visible,body.nsf-admin-shell a:focus-visible{outline:2px solid #bdeaff;outline-offset:3px}
body.nsf-admin-shell button:disabled{cursor:not-allowed}
@media(hover:hover){body.nsf-admin-shell button:not(:disabled):hover{translate:0 -1px;border-color:#d9eeff80;box-shadow:inset 0 1px 0 #fff5,0 4px 0 #020a1b55,0 8px 24px #529bff25}#nsf-admin-rail nav a:hover{background:#a7dfff18}}
body.nsf-admin-shell button:not(:disabled):active{translate:0 1px}
body.nsf-admin-shell [id^=bar-w]{transform-origin:center bottom;animation:nsf-chart-in .8s cubic-bezier(.2,.8,.2,1) both;border:1px solid #c9ecff55;box-shadow:inset 2px 0 2px #d8f2ff66,inset -2px 0 3px #07142a55,0 0 12px #4ea9ff30;border-radius:6px 6px 2px 2px;transition:height .35s ease}
body.nsf-admin-shell #chart-bars-container{border-radius:16px;background:linear-gradient(180deg,#b2dfff05,#234f7820)}
body.nsf-admin-shell #nsf-admin-rail{border-right-color:#d0edff45!important}
body.nsf-admin-shell .nsf-rail-icon{color:#b9dfff;width:22px;height:22px;flex-shrink:0}
body.nsf-admin-shell .nsf-rail-icon svg{width:21px;height:21px}
body.nsf-chat main>aside,body.nsf-chat main>section{background:var(--admin-glass)!important;border-color:var(--admin-rim)!important}
body.nsf-chat div:has(>#dossier-score){width:auto;min-width:84px;min-height:48px;height:auto;padding:8px;border-radius:14px;gap:4px}
body.nsf-chat #dossier-score{line-height:1.3;text-align:center;overflow-wrap:anywhere}
body.nsf-chat div:has(>div>#dossier-score){flex-shrink:0}
body.nsf-chat div:has(>div>div>#dossier-score){flex-wrap:wrap;gap:12px}
#nsf-motion-toggle{margin-bottom:10px!important;color:#cce6ff!important;background:#6e9ec918!important;border-color:#c8e7ff33!important;font-size:12px!important}
body.nsf-motion-off::before,body.nsf-motion-paused::before{animation-play-state:paused;will-change:auto}
body.nsf-motion-off :is(main,.nsf-shell,[id^=bar-w]){animation:none!important}
body.nsf-motion-off button{transition:none!important}
/* Long Contacts tab labels must wrap rather than enlarge the phone viewport. */
body.nsf-admin-shell :is(#tab-btn-phonebook,#tab-btn-emergency){min-width:0;max-width:100%;white-space:normal;flex-wrap:wrap;justify-content:flex-start}
@media(max-width:767px){body.nsf-admin-shell .nsf-topbar{gap:16px;align-items:flex-start}body.nsf-admin-shell .nsf-shell{padding-inline:16px}body.nsf-admin-shell :is(.nsf-content,.glass-panel){max-width:100%;box-sizing:border-box}body.nsf-admin-shell .map-toolbar{align-items:flex-start}body.nsf-admin-shell .nsf-loan-kpis{gap:14px}body.nsf-admin-shell .decision-actions{display:grid;grid-template-columns:1fr}body.nsf-admin-shell .decision-actions button{width:100%}}
@media(prefers-reduced-motion:reduce){body.nsf-admin-shell::before{animation:none;will-change:auto}body.nsf-admin-shell *,body.nsf-admin-shell *::before,body.nsf-admin-shell *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}body.nsf-admin-shell button{translate:none!important}}
@supports not(backdrop-filter:blur(1px)){body.nsf-admin-shell :is(.glass-panel,.nsf-loan-kpis>div,.nsf-loan-table,.nsf-tier-grid>div,main .bg-surface-container-low,main div.bg-surface-dim.rounded-xl){background:#19314c!important}}

@media(max-width:640px){body.nsf-admin-shell div:has(>#tab-btn-phonebook){flex-direction:column;align-items:stretch}body.nsf-admin-shell div:has(>#tab-btn-phonebook)>button{width:100%;justify-content:flex-start;min-height:48px}}

.nsf-location-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin:24px 0}.nsf-location-metrics article{padding:22px;min-width:0;border-radius:20px}.nsf-location-metrics p{font-size:12px;color:#bdd2e8;font-weight:600}.nsf-location-metrics strong{display:block;font-size:30px;line-height:1.4;margin:12px 0;color:#f4f9ff;font-variant-numeric:tabular-nums}.nsf-location-metrics small{display:block;color:#b5c9e1;line-height:1.5}@media(max-width:1200px){.nsf-location-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.nsf-location-metrics{grid-template-columns:1fr}}
/* Admin liquid glass: quiet reading surfaces over two independent light fields. */
body.nsf-admin-shell{background:#0c192b!important;color:#f3f7ff;--muted:#c4d3e5;--admin-glass:linear-gradient(135deg,rgba(73,103,135,.66),rgba(27,47,72,.82) 60%,rgba(22,38,62,.86));--admin-rim:#c6e5ff59}
body.nsf-admin-shell::before{inset:-22vh -20vw;background:radial-gradient(ellipse at 22% 30%,#679dce88,transparent 44%),radial-gradient(ellipse at 74% 64%,#7579b16b,transparent 44%);filter:blur(38px);animation:nsf-aurora 12s ease-in-out infinite alternate}
body.nsf-admin-shell::after{content:"";position:fixed;inset:-20vh -20vw;z-index:-1;pointer-events:none;background:radial-gradient(ellipse at 68% 25%,#68b6ca55,transparent 36%),radial-gradient(ellipse at 28% 78%,#5678c766,transparent 40%);filter:blur(48px);animation:nsf-glass-light 16s ease-in-out infinite alternate;will-change:transform}
@keyframes nsf-aurora{from{transform:translate3d(-8%,-5%,0) scale(1)}to{transform:translate3d(9%,8%,0) scale(1.08)}}
@keyframes nsf-glass-light{from{transform:translate3d(8%,-6%,0)}to{transform:translate3d(-10%,7%,0)}}
body.nsf-admin-shell :is(.glass-panel,.nsf-loan-table,.nsf-membership-table,.nsf-tier-grid>div,.nsf-location-metrics article){border-radius:22px;box-shadow:inset 0 1px 0 #f0f8ff57,inset 0 -1px 0 #a4ceef18,0 16px 38px -20px #020a21b3!important}
body.nsf-admin-shell #nsf-admin-rail{background:linear-gradient(150deg,#47617bba,#182c45dc 60%,#12243ce8)!important;backdrop-filter:blur(28px) saturate(130%);-webkit-backdrop-filter:blur(28px) saturate(130%);box-shadow:inset -1px 0 #e5f5ff24,8px 0 32px #020b202b}
body.nsf-admin-shell #nsf-admin-rail nav a{color:#d5e2f1}
body.nsf-admin-shell #nsf-admin-rail nav a[aria-current=page]{background:linear-gradient(125deg,#c5e7ff4d,#558fba66)!important;border-color:#e0f2ff8c!important;color:#fff;box-shadow:inset 0 1px #fff8,0 5px 18px #05112944!important}
body.nsf-admin-shell :is(.nsf-muted,.text-slate-400,.text-gray-400,.text-on-surface-variant,.text-slate-500,.text-gray-500){color:#c4d3e5!important}
body.nsf-admin-shell :is(input:not([type=checkbox]):not([type=radio]),select,textarea){background-color:#152b43ed!important;color:#f3f7ff!important;border-color:#b5d4f15c!important;color-scheme:dark}
body.nsf-admin-shell :is(input,textarea)::placeholder{color:#afc2d8!important;opacity:1}
body.nsf-admin-shell select option{background:#18304b;color:#f3f7ff}
body.nsf-admin-shell :is(th,thead){color:#e4effc;background-color:#203a55!important}
body.nsf-admin-shell tbody tr{border-color:#b8d8ed26}
body.nsf-admin-shell tbody tr:hover{background-color:#bedfff12}
body.nsf-admin-shell :is(.nsf-content,.glass-panel) p{line-height:1.6}
body.nsf-admin-shell :is(input,select,textarea):focus-visible{outline:2px solid #bfe9ff;outline-offset:3px}
body.nsf-motion-off::after,body.nsf-motion-paused::after{animation-play-state:paused;will-change:auto}
@media(prefers-reduced-motion:reduce){body.nsf-admin-shell::after{animation:none;will-change:auto}}
@supports not(backdrop-filter:blur(1px)){body.nsf-admin-shell :is(.glass-panel,.nsf-loan-table,.nsf-membership-table){background:#233b55!important}}
body.nsf-motion-off::before,body.nsf-motion-paused::before{animation-play-state:paused;will-change:auto}
@media(prefers-reduced-motion:reduce){body.nsf-admin-shell::before{animation:none;will-change:auto}}
body.nsf-admin-shell>div.group\/design-root{background:transparent!important}
body.nsf-admin-shell :is(main,.app-layout-wrapper) [class*="bg-surface-container"][class*="rounded-"]{background:var(--admin-glass)!important;border:1px solid var(--admin-rim)!important;border-top-color:#e1f4ff70!important;backdrop-filter:blur(22px) saturate(130%);-webkit-backdrop-filter:blur(22px) saturate(130%)}
body.nsf-admin-shell :is(.text-on-surface-variant,[class~="text-[#92a4c8]"],[class~="text-[#8e9eb5]"]){color:#c4d3e5!important}
/* Dialogs stay opaque enough to read above the moving light. */
body.nsf-admin-shell :is(#modal-content,[role=dialog]){background:#1d344ded!important;color:#f3f7ff}
@media(max-width:600px){body.nsf-admin-shell .app-header{height:auto!important;min-height:64px;padding-block:12px}body.nsf-admin-shell .app-header h1{font-size:15px!important;line-height:1.3;white-space:nowrap}}
body.nsf-admin-shell :is(.text-text-secondary,.text-text-tertiary,[class*="text-on-surface-variant/"]){color:#c4d3e5!important}
/* Compact desktop density, matching the 75% reference without browser zoom. */
@media(min-width:1024px){
 html:has(body.nsf-admin-shell){font-size:12px}
 body.nsf-admin-shell{--admin-rail:198px}
 body.nsf-admin-shell #nsf-admin-rail{font-size:12px}
 body.nsf-admin-shell .nsf-rail-brand{padding:18px 13px;gap:9px}
 body.nsf-admin-shell .nsf-rail-brand img{width:32px;height:32px}
 body.nsf-admin-shell .nsf-rail-brand small{font-size:8px}
 body.nsf-admin-shell #nsf-admin-rail nav{gap:3px;padding:12px 9px}
 body.nsf-admin-shell #nsf-admin-rail nav a{padding:9px;min-height:36px;gap:9px;border-radius:11px}
 body.nsf-admin-shell .nsf-rail-icon,body.nsf-admin-shell .nsf-rail-icon svg{width:18px;height:18px}
 body.nsf-admin-shell .nsf-rail-footer{padding:10px 12px}
 body.nsf-admin-shell .nsf-rail-footer :is(button,select){min-height:34px!important;font-size:12px!important;padding:6px!important}
 body.nsf-admin-shell .app-header{height:48px!important;min-height:48px}
 body.nsf-admin-shell .app-layout-wrapper{padding-top:48px!important}
 body.nsf-admin-shell .nsf-shell{padding:18px}
 body.nsf-admin-shell .nsf-content{padding:24px}
 body.nsf-admin-shell .nsf-content h2{font-size:23px}
 body.nsf-admin-shell .nsf-muted{font-size:12px}
 body.nsf-admin-shell :is(input:not([type=checkbox]):not([type=radio]),select,textarea){font-size:13px!important}
 body.nsf-admin-shell .nsf-fields{gap:14px;margin-block:20px}
 body.nsf-admin-shell .nsf-button{min-height:36px}
}
/* More localized light makes movement visible instead of a nearly uniform wash. */
body.nsf-admin-shell::before{background:radial-gradient(ellipse 27% 31% at 24% 32%,#69b9e5a6,transparent 100%),radial-gradient(ellipse 30% 35% at 75% 68%,#7c7ec585,transparent 100%);animation-duration:8s;filter:blur(32px)}
body.nsf-admin-shell::after{background:radial-gradient(ellipse 25% 30% at 70% 24%,#66c1cc80,transparent 100%),radial-gradient(ellipse 30% 32% at 30% 80%,#537bc48c,transparent 100%);animation-duration:11s}
@keyframes nsf-aurora{from{transform:translate3d(-13%,-9%,0) scale(1)}to{transform:translate3d(13%,10%,0) scale(1.08)}}
@keyframes nsf-glass-light{from{transform:translate3d(12%,-9%,0)}to{transform:translate3d(-14%,10%,0)}}
/* Smoked glass surfaces: neutral dark tint, with color supplied by the moving light. */
body.nsf-admin-shell{--admin-glass:linear-gradient(135deg,rgba(35,43,55,.78),rgba(13,23,36,.86));--admin-rim:rgba(202,223,241,.26)}
body.nsf-admin-shell #nsf-admin-rail{background:linear-gradient(155deg,rgba(34,43,55,.81),rgba(12,22,35,.9))!important;backdrop-filter:blur(30px) saturate(115%);-webkit-backdrop-filter:blur(30px) saturate(115%);border-right-color:#d7e9fa38!important}
body.nsf-admin-shell #nsf-admin-rail nav a[aria-current=page]{background:linear-gradient(135deg,#d9edff26,#8ab6db18)!important;border-color:#dfedff66!important;box-shadow:inset 0 1px #fff4,0 5px 18px #0003!important}
body.nsf-admin-shell #chart-bars-container{background:linear-gradient(180deg,#0a142438,#18253566)!important;border:1px solid #c8e4ff12}
body.nsf-admin-shell :is(th,thead){background-color:#192839!important}
body.nsf-admin-shell :is(input:not([type=checkbox]):not([type=radio]),select,textarea){background-color:#111f30e6!important}
body.nsf-admin-shell :is(#modal-content,[role=dialog]){background:#172433f5!important}
body.nsf-admin-shell #nsf-motion-toggle{background:#e1efff0d!important}
@supports not(backdrop-filter:blur(1px)){body.nsf-admin-shell :is(.glass-panel,.nsf-loan-table,.nsf-membership-table){background:#1b2939!important}}
/* One slim blue scrollbar for the document, rail, tables and dialogs. */
html:has(body.nsf-admin-shell),body.nsf-admin-shell,body.nsf-admin-shell *{scrollbar-width:thin!important;scrollbar-color:#315b86 #122235!important}
html:has(body.nsf-admin-shell)::-webkit-scrollbar,body.nsf-admin-shell::-webkit-scrollbar,body.nsf-admin-shell *::-webkit-scrollbar{width:6px!important;height:6px!important}
html:has(body.nsf-admin-shell)::-webkit-scrollbar-track,body.nsf-admin-shell::-webkit-scrollbar-track,body.nsf-admin-shell *::-webkit-scrollbar-track{background:#122235!important}
html:has(body.nsf-admin-shell)::-webkit-scrollbar-thumb,body.nsf-admin-shell::-webkit-scrollbar-thumb,body.nsf-admin-shell *::-webkit-scrollbar-thumb{background:#315b86!important;border:0!important;border-radius:8px!important}
html:has(body.nsf-admin-shell)::-webkit-scrollbar-thumb:hover,body.nsf-admin-shell::-webkit-scrollbar-thumb:hover,body.nsf-admin-shell *::-webkit-scrollbar-thumb:hover{background:#4e7da9!important}
html:has(body.nsf-admin-shell)::-webkit-scrollbar-button,body.nsf-admin-shell::-webkit-scrollbar-button,body.nsf-admin-shell *::-webkit-scrollbar-button{display:none!important;width:0!important;height:0!important}
html:has(body.nsf-admin-shell)::-webkit-scrollbar-corner,body.nsf-admin-shell *::-webkit-scrollbar-corner{background:#122235!important}
/* Chromium supports the custom no-arrow scrollbar; Firefox uses the standard thin fallback. */
@supports selector(::-webkit-scrollbar){html:has(body.nsf-admin-shell),body.nsf-admin-shell,body.nsf-admin-shell *{scrollbar-width:auto!important;scrollbar-color:auto!important}}
