/* 正式 V4 全局外壳：顶部一级导航、上下文栏和左侧二级导航。 */
body.desktop-mode:not(.auth-mode) #app{height:calc(100vh - 35px);margin-top:35px}
body.desktop-mode:not(.auth-mode) .desktop-titlebar{height:35px;min-height:35px;background:#fff;color:#172640;border-bottom:1px solid #e0e6ef;box-shadow:none}
body.desktop-mode:not(.auth-mode) .desktop-titlebar-brand{display:flex;align-items:center;gap:8px;font-size:13px}
body.desktop-mode:not(.auth-mode) .desktop-app-icon{position:relative;width:20px;height:20px;padding:4px;border:1px solid #1769e8;border-radius:3px;background:#fff;display:grid;flex:0 0 20px;box-sizing:border-box;grid-template-columns:5px 2px;grid-template-rows:10px;align-items:center;gap:3px;margin:0}
body.desktop-mode:not(.auth-mode) .desktop-app-icon i,
body.desktop-mode:not(.auth-mode) .desktop-app-icon b{display:block;width:100%;height:10px;border-radius:0;background:#1769e8}
body.desktop-mode:not(.auth-mode) .desktop-app-icon b{opacity:.85}
body.desktop-mode:not(.auth-mode) .desktop-app-icon::before,
body.desktop-mode:not(.auth-mode) .desktop-app-icon::after{display:none}
body.desktop-mode:not(.auth-mode) .desktop-titlebar-actions button{color:#172640}
body.desktop-mode:not(.auth-mode) .desktop-titlebar-actions button:hover{background:#f0f4fa}
body.desktop-mode:not(.auth-mode) .desktop-titlebar-actions .desktop-titlebar-close:hover{background:#ef4e4e;color:#fff}
.workbench.v5-global-shell{height:100%;min-height:100%;display:grid;grid-template-columns:236px minmax(0,1fr);grid-template-rows:54px 48px minmax(0,1fr);overflow:hidden;background:#f6f8fc;color:#18263d;font-family:"Microsoft YaHei","Noto Sans CJK SC",Arial,sans-serif}
.v5-global-shell>.global-header{grid-column:1 / -1;grid-row:1;display:flex;align-items:stretch;min-width:0;border-bottom:1px solid #e0e6ef;background:#fff}
.v5-global-shell>.global-header>.global-brand{display:none}
.global-brand{display:flex;align-items:center;gap:10px;width:236px;flex:0 0 236px;padding:0 20px;border:0;background:#fff;color:#18263d;font:700 16px/1 "Microsoft YaHei","Noto Sans CJK SC",Arial,sans-serif;text-align:left;white-space:nowrap;cursor:pointer}
.global-brand-mark{display:grid;place-items:center;width:25px;height:25px;border-radius:8px;background:#1769e8;color:#fff;font-size:13px;font-weight:700;line-height:1}
.global-primary-nav{display:flex;align-items:stretch;gap:4px;min-width:0;padding-left:26px}
.global-primary-item{position:relative;height:54px;padding:0 18px;border:0;background:transparent;color:#435169;font:600 14px/1 "Microsoft YaHei","Noto Sans CJK SC",Arial,sans-serif;cursor:pointer}
.global-primary-item:hover{color:#1769e8;background:#f7faff}
.global-primary-item.active{color:#1769e8}
.global-primary-item.active::after{content:"";position:absolute;right:10px;bottom:-1px;left:10px;height:3px;border-radius:3px 3px 0 0;background:#1769e8}
.global-user{display:flex;align-items:center;gap:9px;margin-left:auto;padding:0 20px 0 12px;color:#26354b;white-space:nowrap}
.global-avatar{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#1769e8;color:#fff;font-size:14px;font-weight:700}
.global-user-copy{display:grid;gap:2px;min-width:0}
.global-user-copy b{overflow:hidden;max-width:132px;font-size:13px;line-height:1.2;text-overflow:ellipsis}
.global-user-copy small{overflow:hidden;max-width:132px;color:#7b8799;font-size:11px;line-height:1.2;text-overflow:ellipsis}
.global-user-chevron{margin-left:2px;color:#52617a;font-size:16px;line-height:1}
.v5-global-shell>.global-context-bar{grid-column:1 / -1;grid-row:2;display:flex;align-items:center;padding:0 24px;border-bottom:1px solid #e1e7ef;background:#fafcff;color:#40516a;font-size:14px}
.global-context-bar span{display:inline-flex;align-items:center;min-height:30px;padding:0 12px;border-radius:7px;background:#f0f5ff;color:#344e77;font-weight:600}
.v5-global-shell>.side{grid-column:1;grid-row:3;width:auto;min-width:0;display:flex;flex-direction:column;overflow:auto;border-right:1px solid #dce5f0;background:#fff;color:#33445d;box-shadow:none}
.v5-global-shell .side-brand{height:66px;min-height:66px;display:flex;align-items:center;padding:0 22px;border-bottom:0;background:#fff;color:#172640;font-size:17px;font-weight:700}
.v5-global-shell .side-sign{display:none}
.v5-global-shell .side nav{display:grid;gap:4px;flex:1;padding:0 10px 14px}
.v5-global-shell .side-bottom{display:grid;gap:4px;padding:0 10px 14px;border-top:1px solid #edf1f6;background:#fff}
.v5-global-shell .side-item{position:relative;width:100%;height:46px;min-height:46px;display:flex;align-items:center;gap:11px;padding:0 14px;border:0;border-radius:8px;background:transparent;color:#435169;font:600 14px/1 "Microsoft YaHei","Noto Sans CJK SC",Arial,sans-serif;text-align:left;cursor:pointer}
.v5-global-shell .side-item:hover{background:#f5f8fd;color:#1769e8}
.v5-global-shell .side-item.active{background:#eaf2ff;color:#1769e8;box-shadow:none;font-weight:700}
.v5-global-shell .side-item.active::before{content:"";position:absolute;top:8px;bottom:8px;left:0;width:3px;border-radius:0 3px 3px 0;background:#1769e8}
.v5-global-shell .side-item.disabled{opacity:.48;cursor:not-allowed}
.v5-global-shell .side-item-icon{display:inline-flex;width:20px;flex:0 0 20px;align-items:center;justify-content:center;color:#6d7f99;font-size:17px;font-weight:400;line-height:1}
.v5-global-shell .side-item>span:not(.side-item-icon){display:block;width:auto;height:auto;min-width:0;padding:0;border:0;border-radius:0;background:transparent;line-height:1.2}
.v5-global-shell .side-item-icon{height:20px;min-height:20px;padding:0;border:0;border-radius:0;background:transparent}
.v5-global-shell .side-item.active .side-item-icon,.v5-global-shell .side-item:hover .side-item-icon{color:#1769e8}
.v5-global-shell .side-collapse-glyph{display:none;align-items:center;justify-content:center;min-height:46px;color:#60718c;font-size:20px;line-height:1}
.v5-global-shell>.work-main{grid-column:2;grid-row:3;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden;background:#f6f8fc}
.v5-global-shell>.work-main>.work-top{display:none}
.v5-global-shell .workspace{min-width:0;min-height:0;flex:1 1 auto;overflow:auto;padding:26px 28px 36px;background:#f6f8fc}
.v5-global-shell .page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin:0 0 18px;padding:0}
.v5-global-shell .page-title{margin:0;color:#172640;font-size:28px;line-height:1.25;letter-spacing:.1px}
.v5-global-shell .page-sub{margin:8px 0 0;color:#718099;font-size:13px;line-height:1.55}
.v5-global-shell .head-actions{display:flex;flex:0 0 auto;gap:10px}
.v5-global-shell .btn{min-height:36px;border-color:#d5dfec;border-radius:6px;background:#fff;color:#40516a;font-size:13px;font-weight:600;box-shadow:none}
.v5-global-shell .btn:hover{border-color:#9db9e6;background:#f7faff;color:#145fc9}
.v5-global-shell .btn.primary{border-color:#1769e8;background:#1769e8;color:#fff;box-shadow:0 4px 10px rgba(23,105,232,.16)}
.v5-global-shell .btn.primary:hover{border-color:#0e5edc;background:#0e5edc;color:#fff}
.v5-global-shell .text-btn{color:#1769e8;font-weight:600}
.v5-global-shell .danger-text{color:#d54b50}
@media(max-width:1180px){.workbench.v5-global-shell{grid-template-columns:220px minmax(0,1fr)}.global-brand{width:220px;flex-basis:220px;padding-left:16px;padding-right:14px;font-size:15px}.global-primary-item{padding-left:14px;padding-right:14px}.v5-global-shell .workspace{padding-left:20px;padding-right:20px}}
@media(max-width:900px){.workbench.v5-global-shell{grid-template-columns:74px minmax(0,1fr)}.global-brand{width:74px;flex-basis:74px;justify-content:center;padding:0}.global-brand>span:last-child{display:none}.global-primary-nav{padding-left:0}.v5-global-shell .side-brand{justify-content:center;padding:0;font-size:0}.v5-global-shell .side nav,.v5-global-shell .side-bottom{padding-left:8px;padding-right:8px}.v5-global-shell .side-item{justify-content:center;padding:0;font-size:0}.v5-global-shell .side-item-icon{width:22px;flex-basis:22px;font-size:18px}.v5-global-shell .global-user-copy,.v5-global-shell .global-user-chevron{display:none}.v5-global-shell .global-user{padding-right:14px}}
@media(max-width:640px){.workbench.v5-global-shell{grid-template-columns:1fr;grid-template-rows:54px 48px minmax(0,1fr)}.v5-global-shell>.side{display:none}.global-primary-item{padding-left:11px;padding-right:11px;font-size:13px}.v5-global-shell .workspace{padding:20px 14px 28px}.v5-global-shell .page-head{flex-direction:column}.v5-global-shell .head-actions{width:100%}.v5-global-shell .head-actions .btn{flex:1}}

/* Match the project-list reference's native chrome and content rhythm without
   changing the desktop authentication window. */
body.desktop-mode:not(.auth-mode):has(#app .project-list-standard-page.v5-global-shell) #app {
  height: calc(100vh - 35px);
  margin-top: 35px;
}

body.desktop-mode:not(.auth-mode):has(#app .project-list-standard-page.v5-global-shell) .desktop-titlebar {
  height: 35px;
  min-height: 35px;
}

#app .project-list-standard-page.v5-global-shell {
  grid-template-columns: 234px minmax(0, 1fr);
  grid-template-rows: 51px 51px minmax(0, 1fr);
}

#app .project-list-standard-page.v5-global-shell .global-primary-item {
  height: 51px;
}

#app .project-list-standard-page.v5-global-shell .workspace {
  padding: 27px 28px 26px 30px;
}

#app .project-list-standard-page.v5-global-shell .project-list-page-head {
  margin-bottom: 22px;
}

#app .project-list-standard-page.v5-global-shell .project-list-layout {
  grid-template-columns: minmax(0, 1fr) 304px;
}

body.desktop-mode:not(.auth-mode):has(#app .v5-global-shell) .desktop-titlebar-brand {
  padding-left: 28px;
  font-size: 14px;
  font-weight: 700;
}

/* 登录与系统主界面使用同一套“双竖栏”图标，仅按浅色标题栏调整前景色。 */
body.desktop-mode:not(.auth-mode):has(#app .v5-global-shell) .desktop-app-icon {
  position: relative;
  width: 20px;
  height: 20px;
  padding: 4px;
  border: 1px solid #1769e8;
  border-radius: 3px;
  background: #fff;
  display: grid;
  flex: 0 0 20px;
  box-sizing: border-box;
  grid-template-columns: 5px 2px;
  grid-template-rows: 10px;
  align-items: center;
  gap: 3px;
  margin: 0;
}
body.desktop-mode:not(.auth-mode):has(#app .v5-global-shell) .desktop-app-icon i,
body.desktop-mode:not(.auth-mode):has(#app .v5-global-shell) .desktop-app-icon b {
  display: block;
  width: 100%;
  height: 10px;
  border-radius: 0;
  background: #1769e8;
}
body.desktop-mode:not(.auth-mode):has(#app .v5-global-shell) .desktop-app-icon b{opacity:.85}
body.desktop-mode:not(.auth-mode):has(#app .v5-global-shell) .desktop-app-icon::before,
body.desktop-mode:not(.auth-mode):has(#app .v5-global-shell) .desktop-app-icon::after { display: none; }

/* The sample keeps the project-center sidebar compact, with the secondary
   item directly below the active item and a bottom collapse affordance. */
#app .project-list-standard-page.v5-global-shell > .side {
  margin-left: 4px;
  border: 1px solid #dce5f0;
  border-radius: 8px;
  background: linear-gradient(180deg, #f6f9ff 0%, #fff 58%);
}
#app .project-list-standard-page.v5-global-shell > .side nav {
  flex: 0 0 auto;
  align-content: start;
  padding-left: 6px;
  padding-right: 6px;
}
#app .project-list-standard-page.v5-global-shell > .side .side-bottom {
  min-height: 52px;
  margin-top: auto;
  padding: 0 6px 8px;
  border-top: 1px solid #edf1f6;
  background: transparent;
  place-items: center;
}
#app .project-list-standard-page.v5-global-shell > .side .side-bottom #logout { display: none; }
#app .project-list-standard-page.v5-global-shell > .side .side-collapse-glyph { display: flex; }
#app .project-list-standard-page.v5-global-shell .global-user-copy small { display: none; }
