/* A operação permanece familiar; a identidade é fornecida por cada portal. */
.admin-shell{--radius:10px}
.admin-shell .admin-nav{background:var(--navy)!important;border-right:1px solid var(--line)}
.admin-brand{padding:20px 12px!important;display:flex;justify-content:center;align-items:center;min-height:104px;background:var(--brand-surface,#fff);margin:16px;border-radius:8px}
.admin-shell .admin-brand{background:var(--brand-surface,#fff)!important}
.admin-shell .admin-brand img{max-width:188px;max-height:72px;object-fit:contain;width:auto;height:auto;mix-blend-mode:normal!important;filter:none!important}
.admin-top{background:var(--white);border-bottom:1px solid var(--line);min-height:68px}
.admin-heading h1{font-size:clamp(26px,3vw,36px);letter-spacing:-.025em}
.admin-shell h2,.login-shell h2{letter-spacing:-.025em}
.admin-nav-hint{display:none}
.admin-heading .eyebrow,.welcome-panel .eyebrow,.login-card .eyebrow{display:none}
.admin-main>main{max-width:1480px;margin-inline:auto}
.admin-nav nav button{border-radius:6px;margin-bottom:3px;min-height:44px}
.admin-shell .admin-nav nav button.active{background:#fff!important;color:var(--navy)!important;font-weight:700;border-color:transparent!important}
.admin-shell .admin-nav nav button svg{width:18px;height:18px;flex-shrink:0;color:inherit}
.admin-nav nav button:focus-visible,.admin-shell a:focus-visible,.login-shell a:focus-visible{outline:3px solid var(--cyan);outline-offset:3px}
.admin-shell .stats{gap:0;border:1px solid var(--line);border-radius:10px;overflow:hidden}
.admin-shell .stat{border:0;border-radius:0;box-shadow:none;border-right:1px solid var(--line);padding:24px}
.admin-shell .stat:last-child{border-right:0}
.admin-shell .stat strong{font-variant-numeric:tabular-nums}
.welcome-panel{background:var(--white)!important;border:1px solid var(--line);color:var(--ink)!important;padding:32px!important}
.welcome-panel h2{color:var(--ink)!important;font-size:clamp(25px,3vw,36px)!important;max-width:26ch}
.welcome-panel p{color:var(--muted)!important}
.login-brand{background:var(--navy)!important}
.login-shell .login-brand>img{background:var(--brand-surface,#fff)!important;border-radius:8px;padding:20px!important;max-width:300px;max-height:150px;object-fit:contain;box-sizing:content-box;mix-blend-mode:normal!important;filter:none!important}
.login-brand h1{font-size:clamp(30px,4vw,48px);letter-spacing:-.03em}
.login-card{border-radius:12px}
.login-shell input{min-height:48px}
.login-shell .primary{min-height:48px}
.admin-shell ::selection,.login-shell ::selection{background:var(--cyan);color:#121820}
.admin-shell input,.admin-shell textarea,.login-shell input{caret-color:var(--blue)}
.admin-shell{scrollbar-color:var(--blue) var(--soft)}
@media(max-width:760px){.admin-brand{margin:0;min-height:64px;padding:8px!important;align-self:flex-start}.admin-brand img{max-width:150px;max-height:45px}.admin-nav nav{gap:6px}.admin-shell .stat{padding:16px}.welcome-panel{padding:22px!important}.admin-heading .button-row{flex-wrap:wrap}.login-brand>img{max-width:200px}.admin-top{font-size:13px}.admin-main>main{padding:16px}}
@media(max-width:760px){.admin-nav-hint{display:block;font-size:12px;color:#fff;margin:4px 0 12px}.admin-shell .admin-brand img{max-width:150px;max-height:45px}}

/* Identidade do portal nas telas de acesso e da redação. */
html body:has(.login-shell,.admin-shell){
 --admin-brand-color:var(--portal-brand-nav);
 --admin-brand-light:var(--brand-surface,#fff);
 --admin-brand-ink:#20252b;
 --admin-night:color-mix(in srgb,var(--portal-brand-nav) 22%,#14161a);
}
.login-shell{background:#f0f1f3}
.login-shell .login-brand{background:var(--admin-brand-light)!important;color:var(--admin-brand-ink)}
.login-shell .login-brand :is(h1,p,a){color:inherit}
.login-shell .login-brand>img,.admin-shell .admin-brand img{
 background:transparent!important;padding:0!important;filter:none!important
}
.login-shell .login-brand>img{max-height:95px;margin-bottom:28px}
.login-shell .login-card{padding:28px 24px;background:#fff;color:#20252b;border:1px solid #d5d9de;border-radius:12px}
.login-shell .login-card .primary,.admin-shell .primary{
 background:var(--admin-brand-color);border-color:var(--admin-brand-color);color:#fff
}
.admin-shell .admin-nav{background:var(--admin-brand-color)!important;color:#fff}
.admin-shell .admin-nav nav button.active{color:var(--portal-brand-nav)!important}
.admin-shell .admin-brand{background:transparent!important}
.admin-shell .admin-brand img{filter:brightness(0) invert(1)!important}
html[data-theme=dark] body:has(.login-shell,.admin-shell){
 --ink:#f1f3f5;--muted:#c1c6cd;--line:#484e56;--soft:#22252a;--white:#22252a;--paper:#22252a;
 --blue:#c8d2de;background:var(--admin-night);color:var(--ink)
}
html[data-theme=dark] :is(.admin-main,.login-shell){background:var(--admin-night)}
html[data-theme=dark] .login-shell .login-brand{background:var(--admin-night)!important;color:var(--ink)}
html[data-theme=dark] .login-shell .login-brand>img{filter:brightness(0) invert(1)!important}
html[data-theme=dark] .admin-shell .admin-nav{background:color-mix(in srgb,var(--admin-brand-color) 34%,#22252a)!important}
html[data-theme=dark] :is(.admin-top,.login-card,.admin-shell .panel,.admin-shell .stat,.admin-shell .save-bar,.admin-shell .bulk-bar){
 background:#22252a;color:#f1f3f5;border-color:#484e56
}
html[data-theme=dark] :is(.admin-shell,.login-shell) :is(input,select,textarea){
 background:#191c20;color:#f1f3f5;border-color:#717781
}
html[data-theme=dark] :is(.admin-shell,.login-shell) :is(input,textarea)::placeholder{color:#afb5be}
html[data-theme=dark] :is(.admin-shell,.login-shell) .primary{
 background:#e6e9ee;color:#20252b;border-color:#e6e9ee
}
html[data-theme=dark] .admin-shell :is(.secondary,.upload,th,.ad-map>div,.docs pre,.welcome-panel){
 background:#2e3238;color:#f1f3f5;border-color:#555c65
}
@media(max-width:760px){
 .login-shell .login-brand>img{max-height:62px;margin-bottom:12px}
 .login-shell .login-card{margin-block:16px;padding:20px}
}

.login-shell .login-tools .theme-toggle,
.admin-shell .admin-top .theme-toggle {
 color: inherit;
 background: transparent;
 border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
 border-radius: 6px;
}
.login-shell .login-tools .theme-toggle:hover,
.admin-shell .admin-top .theme-toggle:hover {
 background: color-mix(in srgb, currentColor 10%, transparent);
}
.login-shell .login-tools .theme-toggle:focus-visible,
.admin-shell .admin-top .theme-toggle:focus-visible {
 outline: 2px solid currentColor;
 outline-offset: 2px;
}
