.company-current{margin:4px 0 14px;padding:12px 14px;border:1px solid #42685c;border-radius:7px;color:#fff;display:grid;gap:6px;font-size:12px}.company-current>span{color:#afc9bd}.company-current strong{font-size:13px;font-weight:500;line-height:1.5;overflow-wrap:anywhere}.company-current a{color:#d8eb96;font-size:12px;text-decoration:none}.company-page-body{display:block!important;margin:0;background:#f3f6f3;color:#19312c;font:14px/1.5 -apple-system,BlinkMacSystemFont,'PingFang SC',sans-serif}.company-page{max-width:960px;margin:56px auto;padding:0 28px}.company-page h1{font-size:24px;margin:24px 0 8px}.company-page header{display:block}.company-page p{color:#71857a}.company-brand{font-size:30px;font-weight:700;color:#153f35}.company-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px;margin:28px 0}.company-card{font:inherit;text-align:left;border:1px solid #dfe7df;background:white;border-radius:8px;padding:24px;display:grid;gap:12px;color:#19312c;cursor:pointer}.company-card:hover{border-color:#1d6651}.company-card strong{font-size:17px}.company-card span{color:#71857a;font-size:12px;overflow-wrap:anywhere}.company-card small{color:#1d6651}.company-create{padding:18px 22px;background:#fff;border:1px solid #dfe7df;border-radius:8px}.company-create summary{cursor:pointer;color:#1d6651}.company-create form{display:grid;gap:16px;grid-template-columns:repeat(3,minmax(0,1fr));margin-top:18px}.company-create label{display:grid;gap:6px;font-size:13px}.company-create input{width:100%;box-sizing:border-box;height:40px;border:1px solid #dfe7df;border-radius:5px;padding:8px;font:inherit}.company-create button{background:#1d6651;border:0;border-radius:5px;color:#fff;font:inherit;padding:10px 20px;justify-self:start}.company-page #company-error{color:#be4444}@media(max-width:680px){.company-page{margin:28px auto;padding:0 18px}.company-create form{grid-template-columns:1fr}}
@media(min-width:721px){aside .company-current{flex:0 0 auto}aside .brand{flex-direction:row}}
@media(min-width:721px) and (max-height:760px){aside{padding-top:12px;padding-bottom:12px}aside .brand{height:48px;min-height:48px;flex-basis:48px;margin-bottom:8px}aside .workspace-switch{gap:4px;margin-bottom:10px;padding-bottom:8px}aside .workspace-switch a,aside .workspace-switch a:last-child{min-height:32px;padding:6px;font-size:13px}aside .company-current{padding:7px 10px;margin:0 0 10px;gap:3px}aside .company-current>span{display:none}aside .company-current strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}aside nav{gap:2px}aside nav a,aside nav button{min-height:34px;padding:7px 12px;font-size:14px;border-radius:6px}aside nav a.selected,aside nav a.active,aside nav button.selected{padding-left:12px}aside .aside-bottom,aside .sidebar-bottom{padding-top:8px;font-size:11px}aside>p{display:none}}

/* Current company replaces the old brand at the top of every workbench. */
aside.company-workspace .brand{display:none!important}
aside.company-workspace .company-current{box-sizing:border-box;border:1px solid #42685c;border-radius:7px;background:transparent;display:grid;gap:5px;margin:4px 0 18px;padding:10px 12px;flex:0 0 auto;text-align:left;box-shadow:inset 0 0 0 1px #ffffff03}
aside.company-workspace .company-current strong{font-size:12px;font-weight:600;line-height:1.5;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;text-wrap:pretty;color:#edf4ef}
aside.company-workspace .company-current a{justify-self:start;font-size:12px;line-height:1.5;color:#d8eb96;padding:0;text-decoration:none}
aside.company-workspace .company-current a:hover{color:#eef6c6;text-decoration:underline}
@media(min-width:721px) and (max-height:760px){aside.company-workspace .company-current{margin:4px 0 12px;padding:9px 12px;gap:4px}}

/* Finance is the common reference for all module logout footers. */
aside.company-workspace>.aside-bottom,aside.company-workspace>.storage{display:none}
aside.company-workspace .sidebar-bottom{margin-top:auto;padding:16px 12px 0;border-top:1px solid #386052;display:flex;flex-direction:column;gap:10px;color:#a6c0b6;font-size:12px;flex:0 0 auto}
aside.company-workspace .sidebar-bottom small{font-size:10px;color:#a6c0b6}
aside.company-workspace .sidebar-bottom .connection:before{content:'';display:inline-block;width:6px;height:6px;background:#a4c3a4;border-radius:50%;margin-right:7px}
aside.company-workspace .sidebar-bottom button{display:flex;align-items:center;justify-content:center;width:100%;min-height:34px;margin:0;padding:6px;border:1px solid #527264;border-radius:6px;background:transparent;color:#e5eee9;font:inherit;line-height:20px;cursor:pointer}
aside.company-workspace .sidebar-bottom button:hover{background:#28564b;border-color:#7a9c8c}
aside.company-workspace .sidebar-bottom button:disabled{opacity:.5;cursor:wait}
@media(min-width:721px) and (max-height:760px){aside.company-workspace .sidebar-bottom{padding-top:8px;font-size:11px;gap:8px}}
@media(min-width:721px){aside.company-workspace{display:flex!important;flex-direction:column}aside.company-workspace nav{flex:1 1 auto;min-height:0;overflow-y:auto}}
/* Keep the shared footer focused on signing out. */
aside.company-workspace .sidebar-bottom>.connection,aside.company-workspace .sidebar-bottom>small{display:none}
aside.company-workspace .sidebar-bottom button{font-size:15px;font-weight:500;min-height:38px;padding:8px 10px}
/* Override legacy module rules so the three logout controls are identical. */
aside.company-workspace .sidebar-bottom{display:flex!important;flex-direction:column!important;align-items:stretch!important;flex:0 0 auto!important;gap:0!important;height:auto!important;margin: auto 0 0!important;padding:10px 12px 0!important;border-top:1px solid #386052!important}
aside.company-workspace .sidebar-bottom>.connection,aside.company-workspace .sidebar-bottom>small{display:none!important}
aside.company-workspace .sidebar-bottom button{appearance:none!important;box-sizing:border-box!important;display:flex!important;align-items:center!important;justify-content:center!important;flex:0 0 40px!important;width:100%!important;height:40px!important;min-height:40px!important;max-height:40px!important;margin:0!important;padding:9px 10px!important;border:1px solid #527264!important;border-radius:6px!important;background:transparent!important;color:#e5eee9!important;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif!important;font-size:15px!important;font-weight:500!important;line-height:20px!important;letter-spacing:0!important;text-align:center!important;box-shadow:none!important}
aside.company-workspace .sidebar-bottom button:hover{background:#28564b!important;border-color:#7a9c8c!important}
@media(min-width:721px){aside.company-workspace{box-sizing:border-box!important;padding-bottom:12px!important}}

/* Hide the legacy brand before authentication/company lookup finishes. Reserve
   the same card space so module links do not jump when the company arrives. */
html.workspace-company-shell aside .brand{display:none!important}
html.workspace-company-shell aside:not(.company-ready)::before{content:'正在载入公司…';box-sizing:border-box;display:flex;align-items:center;flex:0 0 63px;min-height:63px;margin:4px 0 18px;padding:10px 12px;border:1px solid #42685c;border-radius:7px;color:#afc9bd;font:12px/1.5 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif}
html.workspace-company-shell aside .sidebar-bottom>.connection,html.workspace-company-shell aside .sidebar-bottom>small{display:none!important}
@media(min-width:721px) and (max-height:760px){html.workspace-company-shell aside:not(.company-ready)::before{flex-basis:60px;min-height:60px;margin:4px 0 12px;padding:9px 12px}}

/* Keep the sidebar visually stationary across same-origin module navigation. */
html.workspace-company-shell{background:#f3f6f3}
html.workspace-company-shell aside>.logout-button{display:none}
@view-transition{navigation:auto}
html.workspace-company-shell aside{view-transition-name:workspace-sidebar}
html.workspace-company-shell #main,html.workspace-company-shell body>main,html.workspace-company-shell .shell>.main{view-transition-name:workspace-content}
::view-transition-group(workspace-sidebar){animation-duration:0s}
::view-transition-old(workspace-sidebar),::view-transition-new(workspace-sidebar){animation:none;mix-blend-mode:normal}
::view-transition-old(workspace-content){animation:workspace-leave .08s ease-out both}
::view-transition-new(workspace-content){animation:workspace-enter .12s ease-out both}
@keyframes workspace-leave{to{opacity:0}}
@keyframes workspace-enter{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none!important}}

/* Four-module navigation: equal 2x2 entries, including legacy last-child rules. */
html.workspace-company-shell aside .workspace-switch{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;position:static}
html.workspace-company-shell aside .workspace-switch a,html.workspace-company-shell aside .workspace-switch a:last-child{grid-column:auto;box-sizing:border-box;min-height:44px;padding:9px 6px;display:flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:6px;color:#c7dacf;background:transparent;text-align:center;text-decoration:none;font-size:13px;font-weight:500;line-height:1.4}
html.workspace-company-shell aside .workspace-switch a:hover{background:#ffffff0d;color:#fff}
html.workspace-company-shell aside .workspace-switch a.active,html.workspace-company-shell aside .workspace-switch a.selected{background:#315e4e;border-color:#61877366;color:#fff;font-weight:600;box-shadow:inset 3px 0 0 #b6d8c0}
html.workspace-company-shell aside .workspace-switch a:focus-visible{outline:2px solid #b6d8c0;outline-offset:2px}
/* Company context retains its identity while sharing the same brand mark. */
html.workspace-company-shell aside.company-workspace .company-current{grid-template-columns:30px minmax(0,1fr);column-gap:8px}
html.workspace-company-shell aside.company-workspace .company-current::before{content:'星';grid-column:1;grid-row:1/3;align-self:center;display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:6px;background:#d8eb96;color:#153f35;font-size:20px;font-weight:700}
html.workspace-company-shell aside.company-workspace .company-current strong,html.workspace-company-shell aside.company-workspace .company-current a{grid-column:2}

/* Stack the shared shell on phones; legacy customs body remains flex otherwise. */
@media(max-width:720px){
 html.workspace-company-shell body{display:block}
 html.workspace-company-shell aside{box-sizing:border-box;width:100%!important;max-width:none;min-width:0;height:auto;position:relative;top:auto;left:auto;bottom:auto}
 html.workspace-company-shell body>main,html.workspace-company-shell #shell>main,html.workspace-company-shell .shell>.main{box-sizing:border-box;margin-left:0;width:100%;min-width:0}
}
