* { box-sizing: border-box; }
:root {
  color: #17243a;
  background: #f3f6fb;
  font-family: "Geist", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  font-size: 16px;
  font-synthesis: none;
  --text: #17243a;
  --muted: #52627a;
  --subtle: #64758c;
  --line: #dde5f0;
  --blue: #2456cf;
  --blue-dark: #1c42aa;
  --navy: #101d34;
  --surface: #fff;
  --radius: 14px;
}
body { margin: 0; min-width: 320px; }
a { text-decoration: none; color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
p { margin: 0; line-height: 1.6; }
h1, h2 { margin: 0; line-height: 1.28; letter-spacing: -.025em; }
h1 { font-size: clamp(1.65rem, 3.5vw, 2.35rem); font-weight: 720; }
h2 { font-size: 1.12rem; font-weight: 700; }
small { font-size: .8125rem; color: var(--muted); display: block; line-height: 1.55; }
.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; }
.grow { flex: 1; min-width: 0; }
.app-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { background: var(--navy); color: #f1f6ff; display: flex; flex-direction: column; gap: 1.9rem; padding: 1.55rem 1rem; position: sticky; top: 0; height: 100dvh; overflow: auto; }
.brand { display: flex; align-items: center; gap: .78rem; font-weight: 730; letter-spacing: .01em; padding: .1rem .4rem; }
.brand small { color: #aebdd5; margin-top: .15rem; font-weight: 450; }
.brand-mark { display: flex; gap: 3px; align-items: end; justify-content: center; padding-bottom: 11px; width: 41px; height: 41px; flex: 0 0 41px; border-radius: 12px; background: #3769e9; }
.brand-mark i { display: block; background: #fff; width: 4px; border-radius: 2px; height: 8px; }
.brand-mark i:nth-child(2) { height: 13px; }
.brand-mark i:nth-child(3) { height: 19px; }
.navigation { display: grid; gap: 5px; }
.nav-label { color: #a4b5d1; font-size: .8125rem; padding: .6rem .72rem .25rem; }
.nav-label:not(:first-child) { margin-top: 16px; }
.navigation a { display: flex; align-items: center; gap: .68rem; color: #cdd8ee; min-height: 43px; padding: .58rem .7rem; font-size: .9375rem; border-radius: 8px; }
.navigation a:hover { background: #23334e; }
.navigation a[aria-current="page"] { background: #294679; color: white; box-shadow: inset 3px 0 #82a4ff; }
.nav-icon { font-size: 1.05rem; text-align: center; display: inline-block; flex: 0 0 21px; }
.sidebar-account { border-top: 1px solid #30425f; margin-top: auto; padding: 1rem .3rem 0; display: flex; align-items: center; gap: .62rem; }
.sidebar-account small { color: #adbcd2; }
.avatar { height: 35px; width: 35px; flex: 0 0 35px; display: grid; place-items: center; border-radius: 11px; background: #375785; color: #fff; font-size: .875rem; font-weight: 700; }
.avatar.light { color: #294b9d; background: #e9efff; }
.workspace { min-width: 0; }
.topbar { display: flex; align-items: center; gap: .8rem; min-height: 64px; border-bottom: 1px solid var(--line); padding: .75rem clamp(1rem, 3vw, 2rem); background: var(--surface); position: sticky; top: 0; z-index: 2; }
.topbar-caption, .topbar-actions { display: flex; gap: .85rem; align-items: center; }
.topbar-caption { font-weight: 680; font-size: .9375rem; flex: 1; }
.top-tag { font-weight: 550; font-size: .8125rem; color: #37517d; border-radius: 6px; background: #eef3fc; padding: .18rem .47rem; white-space: nowrap; }
.text-action { font-size: .875rem; font-weight: 600; color: var(--muted); display: inline-flex; gap: .35rem; align-items: center; border: 0; background: transparent; padding: .45rem .2rem; }
.text-action:hover { color: var(--blue); }
.dot-count { min-width: 20px; padding: 0 5px; text-align: center; line-height: 20px; font-size: .75rem; color: white; border-radius: 11px; background: var(--blue); }
.mobile-menu { display: none; }
.main-content { max-width: 1480px; margin: 0 auto; padding: 1.9rem clamp(1rem, 3vw, 2rem) 2.6rem; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.4rem; }
.page-heading p, .panel-heading p { color: var(--muted); margin-top: .42rem; font-size: .9rem; }
.eyebrow { font-size: .875rem; color: var(--muted); font-weight: 620; margin-bottom: .45rem; }
.button-group { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; min-height: 40px; padding: .45rem .85rem; border-radius: 8px; font-weight: 650; font-size: .875rem; text-align: center; white-space: nowrap; }
.button.primary { background: var(--blue); color: white; }
.button.primary:hover { background: var(--blue-dark); }
.button.quiet { background: #fff; color: #27436c; border-color: #d3deee; }
.button.quiet:hover { background: #edf3ff; border-color: #9db4df; }
.button.wide { width: 100%; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #668cf0; outline-offset: 2px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; margin-bottom: 1rem; }
.kpi-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi-card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 6px #1d315b08; min-width: 0; }
.kpi-card { padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .2rem; }
a.kpi-card:hover { border-color: #9db4df; }
.kpi-card strong { font-size: clamp(1.7rem, 3vw, 2.55rem); line-height: 1.25; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.stat-label { font-size: .9rem; font-weight: 650; }
.stat-caption { font-size: .8125rem; color: var(--muted); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2.25fr) minmax(260px, 1fr); gap: 1rem; }
.dashboard-grid.balanced { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-grid.detail-grid { grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr); }
.panel { margin-bottom: 1rem; overflow: hidden; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: 1rem 1.15rem; min-height: 58px; }
.panel-heading.inset { padding-top: .15rem; }
.panel-body { padding: .95rem 1.15rem 1.15rem; }
.side-content { padding: .1rem 1.15rem 1.1rem; }
.feature-rate { background: linear-gradient(115deg, #edf2ff, #e5f0ff); color: #1d479f; border: 1px solid #dae5ff; padding: .8rem; border-radius: 10px; margin-bottom: .55rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .7rem; }
.feature-rate strong { font-size: 1.85rem; letter-spacing: -.05em; }
.feature-rate strong span { font-size: 1.05rem; margin-left: 2px; }
.feature-rate > span { font-size: .875rem; font-weight: 600; }
.side-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; border-bottom: 1px solid var(--line); min-height: 48px; font-size: .875rem; }
.side-content > .button { margin-top: .85rem; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th { color: #465775; background: #f4f7fc; font-weight: 650; text-align: left; }
th, td { padding: .66rem .83rem; border-bottom: 1px solid #e8eef5; line-height: 1.45; }
th:first-child, td:first-child { padding-left: 1.15rem; }
th:last-child, td:last-child { padding-right: 1.15rem; }
th { white-space: nowrap; }
td { vertical-align: middle; }
td small { margin-top: .16rem; }
td:not(.empty) { min-width: 56px; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover:not(:has(.empty)) { background: #f9fbfe; }
.empty { text-align: center; color: var(--muted); padding: 1.7rem 1rem; }
.person { display: flex; align-items: center; gap: .55rem; white-space: nowrap; }
.person .avatar { width: 30px; height: 30px; flex-basis: 30px; border-radius: 8px; }
.link { color: var(--blue-dark); font-weight: 650; font-size: .875rem; white-space: nowrap; }
.link:hover { text-decoration: underline; }
.badge { display: inline-flex; align-items: center; padding: .22rem .48rem; font-weight: 650; border-radius: 6px; font-size: .8125rem; white-space: nowrap; }
.badge.blue { background: #eaf0ff; color: #264ea9; }
.badge.green { background: #def5e9; color: #166647; }
.badge.amber { background: #fff0d8; color: #825015; }
.badge.red { background: #fce8eb; color: #a4263c; }
.badge.neutral { background: #ebeff5; color: #42536d; }
.filterbar { display: flex; align-items: end; flex-wrap: wrap; gap: .65rem; padding: .95rem 1.15rem; }
.filterbar label, .form-stack label { color: #324762; display: flex; flex-direction: column; gap: .28rem; font-size: .875rem; font-weight: 650; }
.filterbar .search-field { flex: 1 1 220px; max-width: 430px; }
input:not([type="checkbox"]):not([type="hidden"]), select, textarea {
  background: #fff; color: var(--text); border: 1px solid #cbd7e7; border-radius: 8px; padding: .55rem .62rem; min-height: 41px; width: 100%; font-size: 1rem;
}
input::placeholder, textarea::placeholder { color: #66788f; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #526480 50%), linear-gradient(135deg, #526480 50%, transparent 50%); background-position: calc(100% - 15px) 53%, calc(100% - 10px) 53%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 1.6rem; }
textarea { resize: vertical; }
label:has(input[type="checkbox"]) { display: flex; flex-direction: row; align-items: center; }
.form-stack { display: grid; gap: .86rem; }
.form-stack > div > label { margin-bottom: .28rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem 1rem; }
.form-grid .full { grid-column: 1 / -1; }
.form-panel { max-width: 870px; }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: .9rem; margin: 0; }
legend { font-weight: 680; color: #324761; padding: 0 .35rem; }
.form-footer { display: flex; align-items: center; gap: .65rem; }
.form-errors, .errorlist, .import-errors { color: #9d2940; font-size: .875rem; }
.import-errors { margin: 0 1.15rem 1rem; }
.messages { display: grid; gap: .55rem; margin-bottom: 1rem; }
.message { display: flex; flex-wrap: wrap; gap: .55rem; border-radius: 9px; padding: .65rem .85rem; background: #e9efff; color: #1c4495; margin-bottom: .55rem; }
.message.success { background: #e5f6eb; color: #1d6349; }
.message.error { background: #fdebed; color: #9d2940; }
.message.amber-message { background: #fff1dc; color: #78501d; }
.details { display: grid; grid-template-columns: repeat(2,minmax(0, 1fr)); gap: .85rem; margin: 0; }
.details div { min-width: 0; }
.details .full { grid-column: 1 / -1; }
dt { color: var(--muted); font-size: .875rem; margin-bottom: .3rem; }
dd { margin: 0; overflow-wrap: anywhere; font-weight: 570; }
.timeline { display: grid; gap: .9rem; }
.timeline > div { border-left: 2px solid #c8d9fb; padding-left: .72rem; }
.timeline small { margin-top: .16rem; }
.task-list { padding: 0 1.05rem; }
.task-item { min-height: 58px; display: flex; align-items: center; gap: .7rem; padding: .65rem .1rem; border-bottom: 1px solid var(--line); }
.task-item:last-child { border-bottom: 0; }
.task-item:hover strong { color: var(--blue); }
.segmented { margin-bottom: 1rem; display: inline-flex; gap: .18rem; border: 1px solid var(--line); border-radius: 9px; background: #eaf0fa; padding: .24rem; }
.segmented a { font-size: .875rem; font-weight: 650; padding: .42rem .85rem; border-radius: 6px; color: #415575; }
.segmented .selected { background: #fff; color: var(--blue-dark); box-shadow: 0 1px 3px #1d315b18; }
.tabs { display: flex; overflow-x: auto; gap: .9rem; align-items: center; padding: 0 1.15rem; border-bottom: 1px solid var(--line); }
.tabs a { display: block; white-space: nowrap; padding: .8rem .2rem; color: var(--muted); font-weight: 620; font-size: .9rem; border-bottom: 2px solid transparent; }
.tabs a[aria-current="page"] { color: var(--blue-dark); border-color: var(--blue); }
.login-layout { min-height: 100dvh; display: grid; grid-template-columns: minmax(320px, 1fr) minmax(350px, 1fr); }
.login-intro { color: #f1f6ff; background: radial-gradient(ellipse at 105% 80%, #344f88 0%, transparent 57%), #101e36; padding: clamp(1.6rem, 6vw, 5.5rem); display: flex; flex-direction: column; justify-content: space-between; gap: 2.6rem; }
.login-headline h1 { font-size: clamp(2rem, 4.5vw, 3.6rem); }
.login-headline p { max-width: 31rem; color: #c5d2ec; margin-top: 1rem; }
.login-steps { display: flex; flex-wrap: wrap; gap: .55rem; }
.login-steps span { color: #e1ebff; border: 1px solid #5b73a5; border-radius: 7px; padding: .35rem .62rem; font-size: .875rem; }
.login-main { display: grid; place-items: center; padding: 2rem 1rem; }
.login-form { width: min(410px, 100%); background: white; padding: clamp(1.3rem, 4vw, 2.2rem); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: 0 12px 30px #26365312; }
.login-form h2 { font-size: 1.45rem; }
.login-form p { margin: .5rem 0 1.1rem; }
.demo-options { margin-top: 1.15rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.demo-options strong { display: block; margin-bottom: .55rem; font-size: .875rem; }
@media (max-width: 1040px) {
  .app-shell { grid-template-columns: 190px minmax(0, 1fr); }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .dashboard-grid.balanced, .dashboard-grid.detail-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; }
}
@media (max-width: 720px) {
  .app-shell { display: block; }
  .sidebar { display: none; position: fixed; left: 0; top: 56px; z-index: 4; height: calc(100dvh - 56px); width: min(240px, 81vw); box-shadow: 12px 9px 30px #15233a55; }
  .sidebar.open { display: flex; }
  .topbar { min-height: 56px; padding-top: .5rem; padding-bottom: .5rem; }
  .mobile-menu { display: inline-grid; place-items: center; min-width: 37px; min-height: 37px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #f4f7fe; color: #243a65; }
  .topbar-caption { gap: .35rem; }
  .topbar-actions { gap: .55rem; }
  .main-content { padding-top: 1.3rem; }
  .page-heading { align-items: start; flex-direction: column; }
  .kpi-grid, .kpi-grid.three { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; }
  .kpi-card { padding: .75rem; }
  .dashboard-grid.balanced, .dashboard-grid.detail-grid { grid-template-columns: minmax(0,1fr); gap: 0; }
  .login-layout { grid-template-columns: 1fr; }
  .login-intro { gap: 1.5rem; padding: 1.35rem; }
  .login-headline p { margin-top: .6rem; }
  .login-steps { display: none; }
}
@media (max-width: 410px) {
  .form-grid { grid-template-columns: minmax(0,1fr); }
  .form-footer { flex-direction: column; align-items: stretch; }
  .top-tag { display: none; }
}
.assignment-step { border-top: 1px solid var(--line); }
.endpoint { overflow-wrap: anywhere; }
