/* Shared project chrome; business workfaces keep their own layout and authority. */
/* Entry validation is a viewport state, never a flex item beside the rail. */
body.workbench-entry-pending>.workbench-entry-status{position:fixed;inset:0;z-index:1000;width:100%;height:100dvh;background:var(--paper,#f3f6f7)}
body.workbench-entry-pending>.rail.project-shell-rail,
body.workbench-entry-pending>.workspace,
body.workbench-entry-pending>#project-navigation-drawer{display:none!important}
body.control-tower-mode .rail.project-shell-rail,
body.standalone-project-page .project-shell-rail{box-sizing:border-box;width:244px;flex-shrink:0;position:sticky;top:0;height:100dvh;display:flex;flex-direction:column;min-width:0;padding:24px 18px;background:#102d45;color:#fff;overflow:hidden;font-family:"Microsoft YaHei UI","Microsoft YaHei",sans-serif}
.project-shell-rail .brand{display:flex;align-items:center;gap:12px;color:inherit;text-decoration:none;flex:none}
.project-shell-rail .brand-logo{width:58px;height:auto;object-fit:contain;flex:none}
.project-shell-rail .brand b,.project-shell-rail .brand strong{display:block;font-size:19px;line-height:1.4}
.project-shell-rail .brand small{display:block;margin-top:4px;font-size:12px;letter-spacing:0;color:#a7cbdc}
.project-shell-rail .rail-context{margin:18px 0 4px;padding:8px 0;border:0;border-radius:0;background:none}
.project-shell-rail .rail-context strong{font-size:16px;margin:0}.project-shell-rail .rail-context p{margin:4px 0;color:#abc5d6}
body .project-shell-rail .project-navigation{display:flex;flex-direction:column;flex:1;min-height:0;overflow:auto;gap:3px;margin:12px 0 0;padding:0 4px 8px 0;flex-wrap:nowrap}
.project-shell-rail .project-nav-group{flex:none;margin:10px 0 3px;padding:0 8px;color:#8fb3c9;font-size:12px;line-height:1.5;letter-spacing:.04em}
body .project-shell-rail .project-navigation .project-nav-entry{box-sizing:border-box;display:flex;align-items:flex-start;gap:10px;flex:none;min-width:0;width:100%;min-height:44px;margin:0;padding:10px 9px;border:0;border-left:3px solid transparent;border-radius:0 6px 6px 0;background:transparent;color:#c4d8e6;font:inherit;text-align:left;text-decoration:none;cursor:pointer}
body .project-shell-rail .project-navigation .project-nav-entry>span:last-child{min-width:0}
body .project-shell-rail .project-navigation .project-nav-entry .nav-index{display:block;width:20px;flex:none;padding-top:2px;color:#8db4c9;font-size:11px;line-height:1.6}
body .project-shell-rail .project-navigation .project-nav-entry strong{display:block;color:inherit;font-size:15px;font-weight:650;line-height:1.5}
body .project-shell-rail .project-navigation .project-nav-entry small{display:block;margin-top:3px;color:#a9c3d3;font-size:12px;font-weight:400;line-height:1.5}
body .project-shell-rail .project-navigation .project-nav-entry:hover,body .project-shell-rail .project-navigation .project-nav-entry.is-active{background:#1b465e;color:#fff}
body .project-shell-rail .project-navigation .project-nav-entry.is-active{border-left-color:#70ddd2}
body .project-shell-rail .project-navigation .project-nav-entry:focus-visible,.project-shell-rail .project-nav-retry:focus-visible{outline:3px solid #70ddd2;outline-offset:1px}
body .project-shell-rail .project-navigation .project-nav-entry:disabled{opacity:.55;cursor:default}
.project-shell-rail .project-nav-status{color:#c4d8e6;overflow-wrap:anywhere;font-size:13px}
.project-shell-rail .project-nav-status.error{color:#ffd4c9}
.project-shell-rail .project-nav-retry{border:1px solid #7295ab;border-radius:6px;background:transparent;color:#fff;padding:9px 12px;font:inherit;cursor:pointer}
body.standalone-project-page .shell{grid-template-columns:244px minmax(0,1fr)}
body.standalone-project-page .project-page-shell{display:grid;grid-template-columns:244px minmax(0,1fr);min-height:100dvh}
.project-page-content{min-width:0;display:flex;flex-direction:column}
.project-page-content>main{box-sizing:border-box;min-width:0;width:100%;max-width:none;flex:1}
.project-page-content>.top{position:static;min-height:76px;height:auto;padding:16px 28px;background:#fff;color:#173e53;border-bottom:1px solid #cbdce4;gap:16px}
.project-page-content>.top a{color:#245c78}
@media(max-width:760px){
 body.control-tower-mode{display:block}
 body.control-tower-mode>.workspace{min-width:0;width:100%;margin:0}
 body.control-tower-mode .rail.project-shell-rail,body.standalone-project-page .project-shell-rail{position:static;width:auto;height:auto;min-height:0;padding:16px;overflow:visible}
 body.control-tower-mode .rail.project-shell-rail{max-width:100%}
 .project-shell-rail .rail-context{display:none}
 body .project-shell-rail .project-navigation{display:flex;flex-direction:row;flex:none;min-width:0;max-width:100%;gap:6px;margin:14px 0 0;padding:4px 2px 8px;overflow-x:auto;overflow-y:hidden}
 .project-shell-rail .project-nav-group{display:none}
 body .project-shell-rail .project-navigation .project-nav-entry{width:156px;align-items:center;padding:10px 9px;min-height:44px;border-left:0;border-bottom:3px solid transparent;border-radius:5px}
 body .project-shell-rail .project-navigation .project-nav-entry.is-active{border-left:0;border-bottom-color:#70ddd2}
 body .project-shell-rail .project-navigation .project-nav-entry small{display:none}
 body .project-shell-rail .project-navigation .project-nav-entry .nav-index{width:18px;padding:0}
 body.standalone-project-page .project-page-shell{display:block}
 .project-page-content>.top{padding:12px 16px;flex-wrap:wrap}
}

/* One responsive side navigation across authenticated project surfaces. */
#project-navigation-toggle{display:none;white-space:nowrap}
.project-navigation-drawer{inset:0 auto 0 0;width:min(310px,calc(100vw - 36px));height:100dvh;max-height:none;max-width:none;padding:0;margin:0;border:0;background:var(--navy);color:#fff}
.project-navigation-drawer::backdrop{background:rgb(12 34 48 / .4)}
.project-navigation-close{display:block;margin:12px 12px 0 auto;padding:7px 12px;border:1px solid #638091;border-radius:4px;background:transparent;color:#fff;font:inherit;min-height:40px}
.project-navigation-drawer .rail{position:static!important;width:100%!important;height:calc(100dvh - 56px)!important;min-height:0;padding:16px 18px!important}
.project-navigation-drawer .rail-section{display:block;margin-top:20px}
.project-navigation-drawer .rail-project-navigation{display:flex!important;flex-direction:column!important;overflow:auto;max-height:none;min-height:0;flex:1;gap:2px}
.project-navigation-drawer .rail-project-navigation .project-nav-group{display:block!important}
.project-navigation-drawer .rail-project-navigation>button{width:100%!important;max-width:none;flex-shrink:0;text-align:left}
.project-navigation-drawer .rail footer{display:block;margin-top:10px;padding-top:10px}
.project-navigation-drawer .rail-note{display:none}

.project-side-navigation-active #project-navigation-toggle{display:none;white-space:nowrap}
.project-navigation-drawer :is(.rail,.project-shell-rail){box-sizing:border-box;position:static!important;width:100%!important;height:calc(100dvh - 56px)!important;min-height:0;padding:16px 18px!important}
.project-navigation-drawer .project-navigation{display:flex!important;flex-direction:column!important;overflow:auto!important;max-height:none;min-height:0;flex:1!important;gap:2px}
.project-navigation-drawer .project-navigation .project-nav-group{display:block!important}
.project-navigation-drawer .project-navigation .project-nav-entry{width:100%!important;max-width:none;flex-shrink:0;text-align:left;border-bottom:0!important;border-left:3px solid transparent!important}
.project-navigation-drawer .project-navigation .project-nav-entry.is-active{border-left-color:#70ddd2!important}
@media(max-width:900px){
 .project-side-navigation-active #project-navigation-toggle{display:inline-flex;align-items:center;justify-content:center;min-height:40px;font:inherit;padding:7px 12px;border:1px solid #becfd8;border-radius:5px;background:#fff;color:#173e53}
 body.standalone-project-page.project-side-navigation-active .shell,
 body.standalone-project-page.project-side-navigation-active .project-page-shell{grid-template-columns:minmax(0,1fr)}
 .project-side-navigation-active .project-page-content>.top{display:flex;align-items:center;flex-wrap:wrap}
}

/* Retained specialist editors share the project rail, never a second menu. */
body.retained-project-page .app-shell{grid-template-columns:244px minmax(0,1fr)}
body.retained-project-page .sidebar>:not(.brand):not(.project-navigation){display:none!important}
body.retained-project-page .main-area{min-width:0;width:100%}
body.retained-project-page :is(.mobile-navigation-toggle,.workspace-tabs){display:none!important}
body.retained-project-page .content-wrap{width:100%;max-width:none;padding:24px 28px}
body.retained-project-page .topbar{height:auto;min-height:76px;padding:16px 28px;gap:12px;flex-wrap:wrap}
body.retained-project-page .project-navigation{flex:1}
@media(max-width:900px){
 body.retained-project-page .app-shell{grid-template-columns:minmax(0,1fr)}
 body.retained-project-page .content-wrap{padding:18px 16px}
 body.retained-project-page .topbar{padding:12px 16px}
}
