/* NWE admin identity. The DOCflow product owns its complete light/dark palette.
   .topbar is exclusive to the admin document; never override DOCflow root tokens. */
@font-face{font-family:Inter;src:url('/docflow/brand/inter-variable.woff2') format('woff2');font-weight:100 900;font-display:swap}
:root:has(body>.topbar){--red:#2d56b2;--red-dark:#234490;--accent:#2d56b2;--focus:#2d56b2;--paper:#f5f7fb;--ink:#18243d;--muted:#626d80;--line:#dce3ee;--soft:#e8effc}
html[data-theme=dark]:has(body>.topbar){--red:#a5bfff;--red-dark:#bad0ff;--accent:#a5bfff;--focus:#a5bfff;--paper:#111a2a;--ink:#edf2ff;--muted:#b2bfd5;--line:#2e3c54;--soft:#22375a}
body:has(>.topbar){font-family:Inter,system-ui,sans-serif;background:var(--paper);color:var(--ink)}
.topbar{border-bottom:1px solid var(--line);background:#fff}
.topbar>a:first-child{display:flex;align-items:center;background:#234490;border-radius:14px;padding:10px 16px;line-height:0;flex-shrink:0}
.topbar>a:first-child img{object-fit:contain;width:136px;height:53px}
.topbar .header-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
body:has(>.topbar) .primary{background:#2d56b2;color:#fff}
body:has(>.topbar) .primary:hover{background:#234490}
.login-layout .intro{background:radial-gradient(ellipse at 10% 20%,#e5ecff,transparent 75%);border-radius:32px;padding:44px 36px}
.login-layout h1{font-size:clamp(2.8rem,5vw,4.4rem);letter-spacing:-.055em;line-height:1.05}
.intro .eyebrow span,.portal-heading .eyebrow span{background:#2d56b2}
body:has(>.topbar) .intro-services span{color:#234490;background:#e5ecff;border-color:#cddafa}
body:has(>.topbar) :is(.login-card,.surface,.app-card){border-radius:24px;box-shadow:0 12px 36px #1c315b07}
#panel-apps .cards{grid-template-columns:minmax(0,720px);justify-content:start}
#panel-apps .app-card{border-color:#d9e1ef;padding:30px}
#panel-apps .app-card:hover{border-color:#97b0e7;box-shadow:0 18px 44px #244c9e14;transform:translateY(-3px)}
#panel-apps .app-card .card-bottom{color:#234490}
body:has(>.topbar) .status-pill{color:#235c43;background:#e6f5ed}

/* Shared theme control inherits the current application's palette. */
.ws-theme{display:inline-flex;align-items:center;justify-content:center;gap:8px;font:inherit;font-size:14px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:transparent;color:var(--ink);min-width:44px;min-height:44px}
.ws-theme:hover{background:var(--soft);border-color:var(--accent,var(--red))}
.ws-theme:focus-visible{outline:2px solid var(--accent,var(--red));outline-offset:3px}

html[data-theme=dark] .topbar{background:#152035;border-color:#29364d}
html[data-theme=dark] .topbar img{content:normal}
html[data-theme=dark] .login-layout .intro{background:radial-gradient(ellipse at 10% 20%,#1e3158,transparent 75%)}
html[data-theme=dark] body:has(>.topbar) :is(.login-card,.surface,.app-card,.user-row,.more-menu,dialog,input:not([type=checkbox]),select){background:#182339;border-color:var(--line);color:var(--ink)}
html[data-theme=dark] body:has(>.topbar) :is(.quiet,.ws-theme){background:#182339;border-color:var(--line);color:var(--ink)}
html[data-theme=dark] body:has(>.topbar) :is(.quiet,.ws-theme):hover{background:#22375a}
html[data-theme=dark] #panel-apps .app-card .card-bottom{color:#a5bfff}
html[data-theme=dark] body:has(>.topbar) :is(.intro-services span,.tags span,.avatar,.role-chip,.state-chip,details,.install-banner,.install-symbol,input:disabled){background:#22304a;border-color:#334563;color:#bacfff}
html[data-theme=dark] body:has(>.topbar) :is(.state-chip.ok,.status-pill,.notice){background:#203b32;color:#a3e0bd;border-color:#365546}
html[data-theme=dark] body:has(>.topbar) :is(.state-chip.off,.notice.bad){background:#40262d;color:#ffabb3;border-color:#69414b}
html[data-theme=dark] body:has(>.topbar) .workspace-nav button[aria-current=page]{background:#253c63;color:#dce8ff}
html[data-theme=dark] body:has(>.topbar) .primary{background:#2d56b2;color:#fff}
html[data-theme=dark] body:has(>.topbar) .primary:hover{background:#3768cf}

/* Maintain readable controls without altering either application's layout. */
body{font-size:16px}
p,.login-card>p,.intro>p,.surface p{font-size:16px}
label,.quiet,.error,.header-label,.workspace-nav button,.help-copy{font-size:14px!important}
.login-layout .intro h1{font-size:clamp(2.5rem,5vw,4.4rem)}
@media(max-width:680px){
 .topbar{padding:14px 18px;gap:12px;align-items:center}
 .topbar>a:first-child{padding:6px 10px}
 .topbar>a:first-child img{width:98px;height:38px}
 .header-label{display:none}
 .topbar .header-actions{margin-left:auto}
 .login-layout .intro{padding:24px 22px}
 .login-layout .intro h1{font-size:2.5rem}
 .intro .eyebrow,.step-label{font-size:12px}
 .intro .intro-services,.intro-proof{display:none}
 #panel-apps .app-card{padding:24px}
 .workspace-nav{overflow:auto;justify-content:flex-start;scrollbar-width:thin}
 .workspace-nav button{flex-shrink:0}
 .ws-theme-label{display:none}
 .ws-theme{width:44px;padding:10px}
 .install-header{font-size:11px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
