:root {
  color-scheme: light;
  --ink: #162438; --muted: #56677c; --line: #dce3ec; --canvas: #f5f7fa;
  --accent: #205aba; --accent-hover: #174996; --pale: #edf4ff; --nav: #15263e;
  color: var(--ink); background: var(--canvas);
  font: 16px/1.55 Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: .2em; }
:where(a, button, input, textarea, select, summary):focus-visible { outline: 3px solid #6398ee; outline-offset: 3px; }
.icon { display: inline-block; width: 1.2rem; height: 1.2rem; flex: none; vertical-align: middle; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.7rem, 3vw, 2.35rem); line-height: 1.25; letter-spacing: -.045em; }
h2 { font-size: 1.16rem; line-height: 1.45; letter-spacing: -.025em; }
h3 { font-size: 1.06rem; line-height: 1.45; }
.skip-link { position: absolute; z-index: 4; top: .25rem; left: .75rem; padding: .6rem 1rem; background: white; transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.topbar {
  position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  min-height: 68px; padding: .35rem clamp(1rem, 2.1vw, 2rem); background: white; border-bottom: 1px solid var(--line);
}
.brand, .userbar, .identity, .entry-label, .text-button { display: inline-flex; align-items: center; }
.brand { gap: .7rem; min-height: 44px; color: var(--ink); text-decoration: none; }
.brand-logo { display: block; position: relative; width: 53px; height: 41px; flex: none; overflow: hidden; }
.brand-logo img { position: absolute; display: block; width: 131%; height: auto; max-width: none; left: -15.5%; top: 50%; transform: translateY(-50%); }
.brand-label { display: grid; line-height: 1.15; gap: .18rem; }
.brand-label strong { font: 780 .96rem/1.1 Inter, "Segoe UI", sans-serif; letter-spacing: .025em; }
.brand-label > span { color: var(--muted); font-size: .77rem; font-weight: 600; letter-spacing: .08em; }
.entry-label { gap: .45rem; color: var(--muted); font-size: .875rem; }
.entry-label .icon { width: 16px; height: 16px; }
.userbar { min-width: 0; gap: 1rem; }
.identity { gap: .5rem; min-width: 0; font-size: .9rem; font-weight: 650; }
.identity > span:last-child { max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; color: #20519a; background: #e3efff; }
.shell { min-height: calc(100svh - 68px); }
.shell:has(.sidebar) { display: grid; grid-template-columns: 204px minmax(0, 1fr); }
.sidebar { min-width: 0; background: var(--nav); color: #e8eef9; }
.workspace-nav { position: sticky; top: 0; display: grid; align-content: start; gap: 1.65rem; padding: 1.65rem .75rem; }
.nav-group { display: grid; gap: .25rem; }
.nav-group + .nav-group { padding-top: 1.4rem; border-top: 1px solid #324057; }
.nav-caption { padding: 0 .85rem .35rem; color: #b2c2d8; font-size: .8rem; font-weight: 550; }
.workspace-nav a { display: flex; align-items: center; gap: .7rem; min-height: 44px; padding: .55rem .8rem; border-radius: 6px; color: #edf3fc; text-decoration: none; font-size: .94rem; }
.workspace-nav a:hover { background: #223853; }
.workspace-nav a[aria-current] { background: #264a78; box-shadow: inset 3px 0 #77aaff; font-weight: 700; }
.workspace-nav .icon { width: 18px; height: 18px; }

.layout { width: 100%; max-width: 1360px; min-width: 0; margin: 0 auto; padding: clamp(1.7rem, 3.6vw, 3.3rem) clamp(1.15rem, 3.6vw, 3.8rem) 3.5rem; }
.layout.narrow { max-width: 600px; padding-top: clamp(2rem, 6vh, 4.25rem); }
.shell:has(.sidebar) > .narrow { max-width: 840px; margin-inline: 0; }
.panel { min-width: 0; background: white; border: 1px solid var(--line); border-radius: 10px; }
.card, .auth-panel { padding: clamp(1.15rem, 2.2vw, 1.65rem); }
.compact { max-width: 720px; }
.spaced { margin-top: 1rem; }
.crumb { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; margin-bottom: .7rem; color: var(--muted); font-size: .875rem; }
.crumb a { display: inline-flex; align-items: center; min-height: 24px; color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--accent); text-decoration: underline; }
.crumb [aria-current] { color: var(--ink); }
.crumb > * + *::before { content: '/'; margin-inline-end: .55rem; color: #a0adbd; }
.desk-heading { padding-bottom: 1.35rem; margin-bottom: clamp(1.2rem, 2.4vw, 2rem); border-bottom: 1px solid var(--line); }
.desk-heading p { margin-top: .35rem; color: var(--muted); }
.desk-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(15rem, .9fr); gap: clamp(.9rem, 2vw, 1.4rem); align-items: start; }
.company-tools { margin-top: clamp(.9rem, 2vw, 1.4rem); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 1.3rem; border-bottom: 1px solid var(--line); }
.section-title h2 { font-size: 1.05rem; }
.section-title > span { color: var(--muted); font-size: .84rem; }
.section-title > .icon { color: #6c809a; }
.department-card, .tool-card, .empty-panel { display: flex; align-items: center; gap: 1rem; min-width: 0; margin: 1.1rem 1.25rem; padding: 1.15rem; }
.department-card { position: relative; color: var(--ink); text-decoration: none; border-radius: 7px; background: #eef4fd; border: 1px solid #d5e3f7; }
.department-card:hover { background: #e6effc; border-color: #a7c3eb; }
.department-icon, .tool-icon { display: grid; place-items: center; flex: none; width: 50px; height: 50px; border-radius: 9px; }
.department-icon { background: #2259a8; color: white; }
.tool-icon { background: #e8f1ff; color: var(--accent); }
.department-icon .icon, .tool-icon .icon { width: 24px; height: 24px; }
.department-name { display: grid; gap: .15rem; min-width: 0; }
.department-name strong { font-size: 1.5rem; line-height: 1.1; letter-spacing: -.03em; }
.department-name > span, .empty-panel p, .tool-name p { color: var(--muted); font-size: .9rem; }
.department-go { display: inline-flex; align-items: center; gap: .25rem; margin-left: auto; white-space: nowrap; font-size: .875rem; color: var(--accent); font-weight: 650; }
.department-go .icon { width: 16px; }
.empty-panel { padding-inline: 0; }
.empty-panel > .icon { color: #70859e; }
.tool-card { margin: 0; padding: 1.25rem 1.3rem; }
.tool-card + .tool-card { border-top: 1px solid var(--line); }
.tool-card form, .tool-status { margin-left: auto; }
.tool-status { padding: .24rem .55rem; white-space: nowrap; border: 1px solid #d6dee9; border-radius: 5px; color: #52677f; font-size: .8rem; }
.account-facts { margin: 0; }
.account-facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .7rem 0; margin: 0 1.3rem; border-bottom: 1px solid #edf0f5; }
.account-facts > div:last-child { border-bottom: 0; }
.account-facts dt { flex: none; color: var(--muted); font-size: .875rem; }
.account-facts dd { margin: 0; text-align: right; font-size: .94rem; font-weight: 600; overflow-wrap: anywhere; }

.login-layout { max-width: 1000px; padding-top: clamp(2.4rem, 10vh, 6.5rem); }
.login-card { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr); overflow: hidden; border: 1px solid #d9e2ef; border-radius: 12px; background: white; box-shadow: 0 12px 40px #172e4d0c; }
.login-box, .login-guidance { padding: clamp(1.65rem, 3.8vw, 3.25rem); }
.login-symbol { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 1.2rem; background: #eaf2ff; color: var(--accent); border-radius: 9px; }
.login-box h1 { font-size: 1.95rem; }
.login-intro { margin-top: .5rem; color: var(--muted); font-size: .94rem; }
.login-form { display: grid; gap: 1.1rem; margin-top: 1.7rem; }
.login-form label { margin-bottom: .4rem; }
.input-shell { position: relative; }
.input-shell > .icon { position: absolute; pointer-events: none; width: 17px; left: .85rem; top: 50%; transform: translateY(-50%); color: #73839a; }
.login-field .input-shell input { min-height: 46px; padding-inline-start: 2.55rem; }
.login-field .has-toggle input { padding-inline-end: 3.15rem; }
.login-form .login-submit { min-height: 46px; margin-top: .25rem; }
.login-guidance { align-content: center; color: #f4f7fc; background: #172d4c; }
.login-guidance h2 { font-size: 1.17rem; }
.login-guidance dl { margin: 1.1rem 0 0; }
.login-guidance dl > div { border-top: 1px solid #3a4e68; padding: .95rem 0; }
.login-guidance dl > div:last-child { padding-bottom: 0; }
.login-guidance dt { display: flex; align-items: center; gap: .52rem; font-size: .94rem; font-weight: 650; }
.login-guidance dt .icon { width: 16px; height: 16px; color: #9dc2ff; }
.login-guidance dd { margin: .3rem 0 0 1.55rem; font-size: .875rem; line-height: 1.65; color: #c6d5e8; }

.stack { display: grid; gap: 1rem; }
label { display: block; font-size: .9rem; font-weight: 620; }
.stack p > label { margin-bottom: .35rem; }
input:not([type=checkbox], [type=radio], [type=hidden]), textarea, select { width: 100%; min-height: 44px; padding: .55rem .72rem; color: var(--ink); background: white; border: 1px solid #b8c5d5; border-radius: 6px; font: inherit; }
input::placeholder, textarea::placeholder { color: #77879b; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
.actions, .page-header { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.2rem; }
.page-header { justify-content: space-between; margin-bottom: 1.3rem; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .55rem 1rem; color: white; border: 1px solid transparent; background: var(--accent); border-radius: 6px; font-family: inherit; line-height: 1.4; font-size: .93rem; font-weight: 650; text-decoration: none; cursor: pointer; }
button:hover, .button:hover { background: var(--accent-hover); }
.stack > button { justify-self: start; }
.text-button, .password-toggle { background: transparent; color: var(--muted); }
.text-button { padding: .42rem .65rem; border-color: var(--line); font-size: .85rem; }
.text-button:hover, .password-toggle:hover { color: var(--accent); background: #edf3fb; }
.password-toggle { position: absolute; right: 1px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; min-height: 44px; padding: 0; }
.password-toggle .icon { width: 17px; height: 17px; }
.password-toggle span { display: inline-flex; }
.password-toggle[aria-pressed=false] .eye-hide, .password-toggle[aria-pressed=true] .eye-show { display: none; }
.messages { padding: .7rem 1rem; margin-bottom: 1rem; border: 1px solid #bbd9c7; border-radius: 6px; background: #ecf6ef; color: #254f36; }
.error, .errorlist { color: #9b263e; font-size: .9rem; }
.errorlist { margin: .35rem 0; padding-left: 1.2rem; }
.intro, .helptext { color: var(--muted); }
@view-transition { navigation: auto; }
@keyframes arrive { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes leave { to { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  main { animation: arrive 175ms ease-out; }
  ::view-transition-old(root) { animation: leave 105ms ease-in both; }
  ::view-transition-new(root) { animation: arrive 175ms ease-out both; }
  :where(button, .button, .department-card, .workspace-nav a, summary) { transition: transform 135ms ease-out, opacity 135ms ease-out; }
  :where(button:not(.password-toggle), .button, .department-card, .workspace-nav a, summary):active { transform: scale(.985); }
  .password-toggle:active { transform: translateY(-50%) scale(.95); }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none; }
}
@media (max-width: 1000px) {
  .shell:has(.sidebar) { grid-template-columns: 174px minmax(0,1fr); }
  .desk-grid { grid-template-columns: minmax(0,1.35fr) minmax(12rem,.85fr); }
}
@media (max-width: 760px) {
  .topbar { min-height: 60px; padding-inline: .9rem; }
  .brand-logo { width: 44px; height: 34px; }
  .brand { gap: .42rem; }
  .brand-label strong { font-size: .82rem; }
  .brand-label > span { font-size: .72rem; }
  .userbar { gap: .4rem; }
  .identity { gap: .35rem; font-size: .83rem; }
  .identity > span:last-child { max-width: 5.2rem; }
  .avatar { width: 27px; height: 27px; }
  .text-button { min-width: 44px; padding-inline: .38rem; }
  .text-button .icon { display: none; }
  .shell:has(.sidebar) { display: block; }
  .sidebar { border-bottom: 1px solid #d5dce7; }
  .workspace-nav { display: flex; flex-wrap: wrap; gap: .25rem; padding: .35rem .75rem .2rem; }
  .nav-group { display: grid; gap: 0; }
  .nav-group + .nav-group { padding: 0; border: 0; }
  .nav-caption { padding: 0 .65rem; font-size: .72rem; line-height: 1.3; }
  .workspace-nav a { min-height: 44px; padding: .5rem .65rem; gap: .38rem; font-size: .84rem; }
  .workspace-nav a[aria-current] { box-shadow: inset 0 -2px #77aaff; }
  .workspace-nav .icon { width: 16px; height: 16px; }
  .layout { padding: 1.35rem 1rem 2.5rem; }
  .crumb a, .actions a, summary { min-height: 44px; }
  .crumb { margin: -.3rem 0 .35rem; }
  .desk-heading { padding-bottom: .95rem; margin-bottom: 1rem; }
  .desk-grid { grid-template-columns: 1fr; }
  .section-title { padding: .8rem 1rem; }
  .department-card, .empty-panel { margin: .85rem; padding: .85rem; }
  .tool-card { padding: 1rem; flex-wrap: wrap; gap: .75rem; }
  .department-icon, .tool-icon { width: 43px; height: 43px; }
  .department-name strong { font-size: 1.35rem; }
  .login-layout { max-width: 560px; padding-top: 1.2rem; }
  .login-card { grid-template-columns: 1fr; }
  .login-box { padding: 1.45rem 1.25rem; }
  .login-symbol { width: 36px; height: 36px; margin-bottom: .65rem; }
  .login-form { margin-top: 1.2rem; }
  .login-guidance { padding: 1.05rem 1.25rem; }
  .login-guidance dl { margin-top: .5rem; }
  .login-guidance dl > div { padding: .6rem 0; }
  .login-guidance dd { margin-top: .1rem; }
  input:not([type=checkbox], [type=radio], [type=hidden]), textarea, select { font-size: 16px; }
}
@media (max-width: 370px) {
  .workspace-nav { padding-inline: .3rem; }
  .workspace-nav a { padding-inline: .42rem; }
  .entry-label { font-size: .8rem; }
  .department-go { font-size: .8rem; }
  .tool-card form { margin: 0; width: 100%; }
  .tool-card form button { width: 100%; }
}
