/* SP05: a bounded, full-height admin workspace and coherent header controls. */
body.admin-page{height:100dvh;min-height:0;overflow:hidden}
body.admin-page>#app{display:flex!important;flex-direction:column;height:100dvh;min-height:0;overflow:hidden}
body.admin-page>#app>.site-header{flex:0 0 auto;position:relative!important;z-index:60}
body.admin-page #main.shell{flex:1 1 0;min-height:0;height:0;overflow:hidden;position:relative}
body.admin-page .admin-layout{height:100%!important;min-height:0;grid-template-rows:minmax(0,1fr)!important}
body.admin-page .admin-nav,body.admin-page .admin-main{height:100%;min-height:0;max-height:none!important;overflow-y:auto;overscroll-behavior:contain}
body.admin-page .admin-main>.stat-grid .stat{min-height:90px;padding:16px}
#admin-menu-toggle,#admin-nav-backdrop{display:none}
.sp8-header .header-tools{align-items:center}
body:not(.admin-page) .sp8-header .language-panel{height:36px;box-sizing:border-box}
body:not(.admin-page) .sp8-header .language-panel [data-lang]{height:28px;padding:5px 8px}
body:not(.admin-page) .sp8-header .header-tools>button:not(.primary){height:36px;min-height:36px}
body:not(.admin-page) .sp8-header .user-button{padding:4px}
.sp8-header .header-topic-picker .select-trigger,.sp8-header #mobile-language,.sp8-header #account.primary{height:36px!important;min-height:36px!important;border-radius:10px!important;border:1px solid #496e7b!important;box-sizing:border-box;font-weight:500!important}
.sp8-header .header-topic-picker .select-trigger{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px!important}
.header-topic-picker .select-trigger svg{width:14px;height:14px;flex:none}
.sp8-header #mobile-language{appearance:none;-webkit-appearance:none;padding:6px 20px 6px 8px!important;background:#112534 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23c8e9e7' stroke-width='1.5'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 5px center/14px;width:54px!important}
.sp8-header #account.primary{background:linear-gradient(135deg,#244b57,#193542)!important;color:#ceeee9!important;padding:7px 12px!important;box-shadow:none!important;font-size:12px}
.monitor-actions{justify-content:flex-start!important;gap:10px;flex-wrap:wrap}
.monitor-actions .primary{order:-1}
.monitor-job{padding:14px!important}
#monitor-clear{margin:12px 0;padding:7px 12px}
.monitor-progress{display:grid;gap:16px}
.monitor-progress h2{margin:0!important}
.monitor-progress dl{display:grid;grid-template-columns:auto 1fr;gap:8px 16px;margin:0}
.monitor-progress dt{color:var(--muted)}.monitor-progress dd{margin:0;overflow-wrap:anywhere}
.monitor-progress .progress-stage{padding:14px;border:1px solid #466775;border-radius:10px;background:#17404233}
.monitor-progress .progress-stage.running::before{content:'';display:inline-block;width:8px;height:8px;border-radius:50%;background:#9ed8cf;box-shadow:0 0 8px #8cdacc;margin-right:10px;animation:monitor-breathe 1.7s ease-in-out infinite}
@keyframes monitor-breathe{50%{opacity:.4}}
@media(prefers-reduced-motion:reduce){.monitor-progress .progress-stage.running::before{animation:none}}
@media(max-width:800px){
 #admin-menu-toggle{display:grid;place-items:center;width:34px;height:34px;padding:7px}#admin-menu-toggle svg{width:20px;height:20px}
 body.admin-page .admin-layout{grid-template-columns:minmax(0,1fr)!important;gap:0}
 body.admin-page .admin-nav{position:absolute!important;top:0;bottom:0;left:0;width:min(280px,80vw);height:100%;z-index:55;border-radius:0 14px 14px 0;background:#102332;visibility:hidden;transform:translateX(-100%)}
 body.admin-page.admin-nav-open .admin-nav{visibility:visible;transform:none}
 #admin-nav-backdrop:not([hidden]){display:block;position:absolute;inset:0;z-index:50;border:0;border-radius:0;background:#010914a6}
 body.admin-page .admin-main{padding:0 2px 20px}
 body.admin-page .header-tools{flex-wrap:nowrap!important;gap:5px!important}
 body.admin-page .header-tools>a{padding:7px 8px;white-space:nowrap}
 body.admin-page .admin-main .stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
}
@media(max-width:640px){
 .sp8-header .header-topic-picker{width:62px!important}
 .sp8-header .header-topic-picker .select-trigger{padding:7px!important;font-size:10px!important;gap:4px}
 .sp8-header #account.primary{font-size:10px!important;padding:7px 9px!important}
 .sp8-header .brand span{font-size:12px!important}
}
