/* Institution brand tokens. Financial status roles never inherit institution colors. */
:root{--brand-primary:#4F2683;--brand-deep:#351653;--brand-background:#F5F0FA;--brand-gold:#D4A84F;--brand-on-primary:#fff;--brand-on-deep:#fff;--brand-link:#4F2683;--brand-soft:color-mix(in srgb,var(--brand-primary) 7%,white);--brand-border:color-mix(in srgb,var(--brand-primary) 18%,white);--brand-secondary:#0F766E;--status-success:#16A34A;--status-warning:#D97706;--status-error:#DC2626;--status-info:#2563EB;--ui-background:var(--brand-background);--ui-surface:#FFFFFF;--ui-raised:#FAF8FC;--ui-text:#251B30;--ui-muted:#675B72;--ui-border:#E5DDEC;--ui-link:var(--brand-link);--brand:var(--brand-primary);--green:var(--brand-primary);--orange:var(--brand-gold);--ink:var(--ui-text);--color-brand:var(--brand-primary);--color-brand-50:var(--brand-soft);--color-brand-100:var(--brand-soft);--color-brand-200:var(--brand-border);--color-brand-300:#C6AEDF;--color-brand-400:#A07AC6;--color-brand-500:var(--brand-primary);--color-brand-600:var(--brand-primary);--color-brand-700:var(--brand-link);--color-brand-900:var(--brand-deep)}
html[data-theme=dark]{--ui-background:#15101D;--ui-surface:#21182C;--ui-raised:#2B2037;--ui-text:#F6F0FC;--ui-muted:#C4B6D2;--ui-border:#4B3A5B;--ui-link:#DBC2F4;--brand-soft:#2B2037;--brand-border:#4B3A5B;--brand-link:#DBC2F4}
body,body.admin-theme,body.member-portal-theme{background:var(--ui-background)!important;color:var(--ui-text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,sans-serif!important;line-height:1.5}
.admin-theme,.member-portal-theme{--brand:var(--brand-primary);--color-brand:var(--brand-primary);--color-brand-50:var(--brand-soft);--color-brand-100:var(--brand-soft);--color-brand-200:var(--brand-border);--color-brand-500:var(--brand-primary);--color-brand-600:var(--brand-primary);--color-brand-700:var(--brand-primary);--color-brand-900:var(--brand-deep)}
body .sidebar,body .p-sidebar,body.member-portal-theme .p-sidebar{background:var(--brand-deep)!important;color:var(--brand-on-deep)!important}
body .sidebar .sidebar-nav-link,body .p-sidebar .p-navlink{color:var(--brand-on-deep)!important;opacity:.88}
body .sidebar .sidebar-nav-link:is(:hover,.is-active),body .p-sidebar .p-navlink:is(:hover,.is-active){background:color-mix(in srgb,var(--brand-on-deep) 13%,transparent)!important;color:var(--brand-on-deep)!important;opacity:1}
body .sidebar .sidebar-nav-link.is-active .sidebar-icon-wrap,body .p-sidebar .p-navlink.is-active .p-navicon{background:color-mix(in srgb,var(--brand-on-deep) 14%,transparent)!important;color:var(--brand-on-deep)!important;box-shadow:none}
.sidebar-active-mark,.member-expanded-menu .is-active>span:first-child{background:var(--brand-gold)!important}
body .admin-topbar,body .member-topbar,body .portal-topbar{background:var(--ui-surface)!important;border-color:var(--ui-border)!important;color:var(--ui-text)!important}
body :is(.admin-card,.settings-card,.login-panel,.form-wrap,.form-card){background-color:var(--ui-surface);border-color:var(--ui-border);color:var(--ui-text)}
.admin-card::before,.settings-card::before{background:var(--brand-primary)!important;height:2px}
body :is(.member-centre-hero,.portal-hero,.portal-page-hero){background:var(--brand-deep)!important;color:var(--brand-on-deep)!important}
body :is(.member-centre-hero,.portal-hero,.portal-page-hero) :is(h1,h2,h3,p,small,strong){color:var(--brand-on-deep)!important}
body :is(.dashboard-eyebrow,.section-label,.form-brand strong,.brand-text){color:var(--ui-link)!important}
body :is(.staff-primary,.sign-in,.btn-primary,.brand-bg,.bg-brand,.bg-brand-600,.bg-brand-700){background:var(--brand-primary)!important;border-color:var(--brand-primary)!important;color:var(--brand-on-primary)!important}
body :is(.staff-primary,.sign-in,.btn-primary,.brand-bg):hover{filter:brightness(.93)}
body :is(.staff-secondary,.btn-secondary){border-color:var(--brand-secondary);color:var(--brand-secondary);background:var(--ui-surface)}
body :is(.settings-nav-btn.is-active,.settings-nav-btn.active){background:var(--brand-soft)!important;color:var(--ui-link)!important;box-shadow:inset 0 0 0 1px var(--ui-border)}
body :is(.admin-input,.field input,.field select,.field textarea,.input-wrap input){background-color:var(--ui-surface)!important;border-color:var(--ui-border)!important;color:var(--ui-text)!important}
body :is(input,textarea,select):focus{border-color:var(--brand-primary)!important;outline:2px solid var(--ui-link);outline-offset:2px;box-shadow:none!important}
body :is(a,button,input,select,textarea):focus-visible{outline:2px solid var(--ui-link);outline-offset:3px}
body :is(input,textarea)::placeholder{color:var(--ui-muted)!important;opacity:1}
body :is(input[type=checkbox],input[type=radio]){accent-color:var(--brand-primary)}
body :is(.admin-table,table) th{background:var(--ui-raised);color:var(--ui-muted);font-weight:600}
body :is(.admin-table,table) :is(td,th){border-color:var(--ui-border)}
body :is(.admin-table,table) tbody tr:hover{background:var(--brand-soft)}
body .appearance-control{color:var(--ui-muted)!important}body .appearance-control select{background:var(--ui-surface)!important;color:var(--ui-text)!important;border-color:var(--ui-border)!important}
body .accent-line{background:var(--brand-gold)!important}
body .story{background-color:var(--brand-deep);background-blend-mode:normal}
body .story::after{background:linear-gradient(0deg,color-mix(in srgb,var(--brand-deep) 86%,transparent),transparent)}
body .welcome h2,body .field label{color:var(--ui-text)}
body :is(.welcome p,.field-hint,.access-help,.login-footer,.form-note){color:var(--ui-muted)}
body :is(.form-options,.access-help,.login-footer) a{color:var(--ui-link)}
/* Semantic statuses retain text labels/icons. Darker text ensures readable small badges. */
body :is(.text-green-600,.text-green-700,.text-emerald-600,.text-emerald-700){color:#166534!important}
body :is(.bg-green-50,.bg-green-100,.bg-emerald-50,.bg-emerald-100){background-color:#F0FDF4!important}
body :is(.text-amber-600,.text-amber-700,.text-orange-600,.text-orange-700,.text-yellow-700){color:#92400E!important}
body :is(.bg-amber-50,.bg-amber-100,.bg-orange-50,.bg-orange-100,.bg-yellow-50,.bg-yellow-100){background-color:#FFFBEB!important}
body :is(.text-red-600,.text-red-700){color:#B91C1C!important}
body :is(.bg-red-50,.bg-red-100){background-color:#FEF2F2!important}
body :is(.text-blue-600,.text-blue-700){color:#1D4ED8!important}
body :is(.bg-blue-50,.bg-blue-100){background-color:#EFF6FF!important}
html[data-theme=dark] body :is(.text-green-600,.text-green-700,.text-emerald-600,.text-emerald-700){color:#86EFAC!important}
html[data-theme=dark] body :is(.bg-green-50,.bg-green-100,.bg-emerald-50,.bg-emerald-100){background:#123421!important}
html[data-theme=dark] body :is(.text-amber-600,.text-amber-700,.text-orange-600,.text-orange-700,.text-yellow-700){color:#FCD34D!important}
html[data-theme=dark] body :is(.bg-amber-50,.bg-amber-100,.bg-orange-50,.bg-orange-100,.bg-yellow-50,.bg-yellow-100){background:#392A10!important}
html[data-theme=dark] body :is(.text-red-600,.text-red-700){color:#FCA5A5!important}
html[data-theme=dark] body :is(.bg-red-50,.bg-red-100){background:#3D191F!important}
html[data-theme=dark] body :is(.text-blue-600,.text-blue-700){color:#93C5FD!important}
html[data-theme=dark] body :is(.bg-blue-50,.bg-blue-100){background:#182A45!important}
@media(max-width:640px){.appearance-control{gap:4px}body .admin-card,body .settings-card{border-radius:14px}}
@media print{body,html[data-theme=dark] body{background:#fff!important;color:#17121f!important}.sidebar,.p-sidebar,.appearance-control{display:none!important}}
:root{--chart-primary:var(--brand-primary);--chart-secondary:#0F766E}
html[data-theme=dark]{--chart-primary:#C7A0ED;--chart-secondary:#5EEAD4}
html[data-theme=dark] body :is(.text-brand,.text-brand-600,.text-brand-700,[class*="text-[var(--brand-primary)]"]),html[data-theme=dark] body svg[style*="var(--brand-primary)"]{color:var(--ui-link)!important}
html[data-theme=dark] body .sidebar :is(.sidebar-nav-link,.sidebar-icon-wrap),html[data-theme=dark] body .p-sidebar .p-navlink{background-color:transparent!important}
html[data-theme=dark] body .sidebar .sidebar-nav-link.is-active,html[data-theme=dark] body .p-sidebar .p-navlink.is-active{background:color-mix(in srgb,var(--brand-on-deep) 13%,transparent)!important}
body :is(.bg-green-600,.bg-emerald-600){background-color:var(--status-success)!important;color:#102716!important}
body :is(.bg-amber-600,.bg-orange-600){background-color:var(--status-warning)!important;color:#261609!important}
body .bg-red-600{background-color:var(--status-error)!important;color:#fff!important}
body .bg-blue-600{background-color:var(--status-info)!important;color:#fff!important}
body .welcome-date,body .welcome-date span{color:inherit}
body .story::before{background:linear-gradient(180deg,color-mix(in srgb,var(--brand-deep) 12%,transparent) 0%,transparent 35%,color-mix(in srgb,var(--brand-deep) 94%,transparent) 100%)}
body .dashboard-welcome-copy{background:var(--brand-deep);color:var(--brand-on-deep)}
body .dashboard-welcome-copy :is(.welcome-kicker,.welcome-date,.welcome-date span){color:var(--brand-on-deep)!important}
body .dashboard-welcome-copy .welcome-kicker>span{background:var(--brand-gold)}

.live-search-toolbar{display:flex;align-items:end;flex-wrap:wrap;gap:12px;background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:14px;padding:18px;margin:18px 0}.live-search-toolbar label{flex:1;min-width:200px}.live-search-toolbar label>span{display:block;margin-bottom:7px;font-size:13px;font-weight:600}.live-search-toolbar small{flex-basis:100%;color:var(--ui-muted);font-size:12px}.live-search-toolbar .staff-secondary,.live-search-toolbar .staff-primary{min-height:42px;display:inline-flex;align-items:center;padding:9px 16px;border-radius:9px}.member-filters{display:flex!important}.member-filters input[name=q]{min-width:0;width:100%}@media(max-width:640px){.live-search-toolbar{padding:14px}.live-search-toolbar label{flex-basis:100%}.member-filters>div{min-width:0!important}}
