:root {
  color-scheme: light;
  --background: #f3f5fa;
  --white: #fff;
  --nav: #14213b;
  --nav-muted: #9daac4;
  --ink: #182440;
  --muted: #5f6d86;
  --line: #e5eaf2;
  --accent: #3458ca;
  --accent-dark: #2847af;
  --radius: 14px;
  font-family: "Inter", "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--background);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:not(:disabled) { cursor: pointer; }
button:disabled { opacity: .62; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #4c6be1;
  outline-offset: 3px;
}
h1, h2, h3, p, dl, dd { margin: 0; }
small { font-size: .8125rem; }
.icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1.25em;
  height: 1.25em;
  line-height: 1;
  font-family: "Segoe UI Symbol", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.2em;
}
.icon-projects, .icon-customers, .icon-people, .icon-search { font-size: 1.36em; }
.icon-currency { font-family: inherit; }
.loading { display: grid; place-items: center; min-height: 100svh; color: var(--muted); padding: 24px; }

.shell { min-height: 100svh; display: grid; grid-template-columns: 228px minmax(0, 1fr); }
.sidebar {
  display: flex;
  flex-direction: column;
  height: 100svh;
  position: sticky;
  top: 0;
  z-index: 4;
  overflow-y: auto;
  padding: 25px 15px 17px;
  background: var(--nav);
  color: white;
}
.brand { display: flex; align-items: center; gap: 11px; font-size: 1.13rem; font-weight: 750; letter-spacing: .025em; white-space: nowrap; }
.sidebar .brand { margin: 0 7px 38px; }
.mark {
  display: inline-flex;
  align-items: end;
  justify-content: center;
  gap: 3px;
  width: 35px;
  height: 35px;
  padding-bottom: 9px;
  border-radius: 10px;
  background: #5274ed;
  box-shadow: inset 0 1px 0 #6a88fb;
}
.mark i { width: 4px; height: 8px; background: #fff; border-radius: 1px; }
.mark i:nth-child(2) { height: 12px; }
.mark i:nth-child(3) { height: 16px; }
.nav-label { margin: 0 12px 9px; color: var(--nav-muted); font-size: .75rem; letter-spacing: .08em; }
.section-label { margin-top: 28px; }
.nav-item {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  margin-bottom: 4px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #bdc9e1;
  text-align: left;
  font-size: .91rem;
}
.nav-item .icon { width: 25px; color: #95a7cb; }
.nav-item:hover { background: #1f3051; color: white; }
.nav-item.active { background: #294372; color: #fff; border-color: #385688; font-weight: 700; }
.nav-item.active .icon { color: #c0d0ff; }
.sidebar-bottom { margin-top: auto; padding-top: 22px; }
.demo-label { display: flex; align-items: center; gap: 7px; font-size: .75rem; color: #aebcda; padding: 0 8px 13px; }
.demo-label > span { width: 6px; height: 6px; border-radius: 50%; background: #83a3ff; }
.account {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 13px 5px 2px;
  border: 0;
  border-top: 1px solid #34425d;
  background: transparent;
  color: white;
  text-align: left;
  width: 100%;
}
.account:hover { color: #b9cdff; }
.account b, .account small { display: block; }
.account b { font-size: .91rem; }
.account small { margin-top: 3px; color: #aebcda; font-size: .75rem; }
.account .avatar { background: #364f88; color: #edf3ff; width: 36px; height: 36px; }
.account .icon { color: #aebcda; }

.main-area { min-width: 0; }
.topbar {
  min-height: 66px;
  padding: 12px clamp(20px, 3vw, 42px);
  border-bottom: 1px solid var(--line);
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.crumb, .top-actions, .today { display: flex; align-items: center; gap: 11px; font-size: .9rem; }
.crumb-base, .crumb-sep, .today { color: var(--muted); }
.crumb-sep { opacity: .65; }
.top-actions { gap: 17px; }
.today { gap: 5px; white-space: nowrap; }
.today .icon { color: #5d6f97; }
.content { max-width: 1600px; margin: 0 auto; padding: 29px clamp(20px, 3vw, 42px) 45px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.page-head h1 { font-size: clamp(1.58rem, 2.45vw, 2.04rem); letter-spacing: -.035em; line-height: 1.24; }
.page-head p { color: var(--muted); margin-top: 8px; line-height: 1.5; font-size: .9375rem; }
.head-actions { flex: 0 0 auto; }
.btn, .icon-btn, .text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 8px;
  background: white;
  padding: 0 14px;
  min-height: 39px;
  border: 1px solid #dce3ef;
  color: var(--ink);
  font-weight: 650;
  font-size: .875rem;
  white-space: nowrap;
}
.btn:hover, .icon-btn:hover { background: #f0f4fd; border-color: #b4c2ec; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: white; box-shadow: 0 2px 5px #2444a02a; }
.btn.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn.full { width: 100%; }
.icon-btn { padding: 0; width: 37px; min-height: 36px; font-size: 1.05rem; }
.text-btn { border: 0; min-height: 32px; padding: 0 2px; color: var(--accent-dark); background: transparent; }
.text-btn:hover, .record-title:hover { text-decoration: underline; text-underline-offset: 4px; }
.text-btn .icon { margin-left: -3px; }
.search-btn { min-height: 36px; color: var(--muted); font-weight: 500; }
.mobile-menu, .backdrop { display: none; }

.panel { background: white; border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; box-shadow: 0 2px 5px #17264506; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.metric { padding: 15px 16px 16px; }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: .875rem; color: var(--muted); font-weight: 650; }
.metric-icon, .attention-icon, .project-symbol {
  width: 35px;
  height: 35px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 1rem;
}
.tint-blue { color: #355ac4; background: #eaf0ff; }
.tint-green { color: #15705f; background: #e2f6ef; }
.tint-amber { color: #966009; background: #fff2d8; }
.tint-purple { color: #6945b3; background: #f0eafd; }
.tint-rose { color: #b43b54; background: #fceaf0; }
.metric > strong { display: block; margin: 4px 0 5px; font-size: clamp(1.32rem, 2.35vw, 1.94rem); font-variant-numeric: tabular-nums; letter-spacing: -.035em; overflow-wrap: anywhere; }
.metric > small { color: var(--muted); display: block; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 19px; margin-bottom: 20px; }
.panel-head { min-height: 61px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 17px; }
.panel-head h2 { font-size: 1.04rem; }
.project-stack, .attention { padding: 0 16px 11px; }
.project-mini, .attention button, .schedule-task, .search-result {
  border: 0;
  border-top: 1px solid var(--line);
  background: white;
  text-align: left;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 53px;
  padding: 7px 0;
}
.project-mini:hover, .attention button:hover, .schedule-task:hover, .search-result:hover { background: #f5f7ff; }
.project-symbol { background: #ecf1ff; color: #3c59b8; width: 33px; height: 33px; }
.project-mini-info { flex: 1; min-width: 0; }
.project-mini-info b, .attention b, .schedule-task b { display: block; font-size: .9rem; overflow-wrap: anywhere; }
.project-mini-info small, .attention small, .schedule-task small { display: block; color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }
.mini-progress { flex: 0 1 85px; min-width: 42px; }
.mini-progress small { display: block; margin-top: 3px; color: var(--muted); }
.project-date { min-width: 66px; font-size: .81rem; color: var(--muted); text-align: right; }
progress { display: block; width: 100%; height: 6px; appearance: none; border: 0; border-radius: 10px; background: #eaf0fb; }
progress::-webkit-progress-bar { background: #eaf0fb; border-radius: 10px; }
progress::-webkit-progress-value { background: #5b79e4; border-radius: 10px; }
progress::-moz-progress-bar { background: #5b79e4; border-radius: 10px; }
progress.complete::-webkit-progress-value { background: #3a9a83; }
progress.complete::-moz-progress-bar { background: #3a9a83; }
.attention button { min-height: 67px; }
.attention button > span:nth-child(2) { flex: 1; }
.attention button > strong { margin-right: 2px; font-size: 1.17rem; }

.table-wrap { overflow-x: auto; border-radius: 0 0 var(--radius) var(--radius); }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: .875rem; }
th { padding: 10px 17px; background: #f8f9fc; border-top: 1px solid var(--line); color: var(--muted); font-weight: 650; white-space: nowrap; }
td { padding: 11px 17px; border-top: 1px solid var(--line); min-width: 80px; }
td:first-child { min-width: 160px; }
tbody tr:hover { background: #fbfcff; }
.record-title { background: transparent; border: 0; padding: 0; font-weight: 700; text-align: left; color: #20365f; overflow-wrap: anywhere; }
.subline { display: block; color: var(--muted); margin-top: 3px; }
.late { color: #af2c48; }
.number { font-variant-numeric: tabular-nums; font-weight: 650; }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border-radius: 6px; font-size: .8125rem; line-height: 1.2; font-weight: 650; white-space: nowrap; }
.tone-muted { color: #56657b; background: #edf1f7; }
.tone-blue { color: #244aaa; background: #e9efff; }
.tone-green { color: #136c52; background: #e3f5ec; }
.tone-amber { color: #855607; background: #fff2d7; }
.tone-rose { color: #a6314c; background: #fce8ef; }
.avatar { display: inline-grid; place-items: center; color: #405b9b; background: #e9effb; border-radius: 50%; width: 28px; height: 28px; font-size: .64rem; font-weight: 750; flex: 0 0 auto; }
.person { display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; }
.table-progress { display: flex; gap: 9px; align-items: center; min-width: 100px; max-width: 180px; }
.table-progress small { color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 13px 17px; }
.filter-search { display: flex; align-items: center; min-height: 38px; padding: 0 9px; gap: 5px; width: min(100%, 280px); border: 1px solid #dce3ef; border-radius: 8px; color: var(--muted); }
.filter-search:focus-within { border-color: #5574d6; box-shadow: 0 0 0 2px #3458ca22; }
.filter-search input { min-width: 0; width: 100%; border: 0; background: transparent; color: var(--ink); padding: 7px 0; font-size: .875rem; outline: 0; }
.filter-search input:focus-visible { outline: 0; }
select {
  appearance: none;
  background-color: #fff;
  background-image: linear-gradient(45deg, transparent 48%, #667995 50%), linear-gradient(135deg, #667995 50%, transparent 52%);
  background-position: calc(100% - 15px) 54%, calc(100% - 10px) 54%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.toolbar select { min-width: 115px; padding: 0 27px 0 9px; min-height: 38px; border: 1px solid #dce3ef; border-radius: 8px; color: var(--ink); font-size: .875rem; }
.tabs { padding: 0 17px; border-bottom: 1px solid var(--line); display: flex; gap: 19px; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); min-height: 47px; padding: 3px 2px 0; font-size: .875rem; }
.tabs button.selected { border-bottom-color: var(--accent); color: var(--accent-dark); font-weight: 700; }
.empty { display: grid; justify-items: center; gap: 7px; color: var(--muted); border-top: 1px solid var(--line); padding: 35px 12px; }
.empty > span { display: grid; place-items: center; width: 40px; height: 40px; font-size: 1.17rem; background: #edf1fa; border-radius: 9px; color: #687aa4; }

.schedule { max-width: 920px; }
.schedule-group { display: grid; grid-template-columns: 75px minmax(0, 1fr); gap: 16px; border-top: 1px solid var(--line); padding: 8px 17px; }
.schedule-date { padding-top: 10px; }
.schedule-date b, .schedule-date small { display: block; }
.schedule-date small { margin-top: 3px; color: var(--muted); }
.schedule-task { justify-content: space-between; padding: 9px 8px; }
.schedule-task:first-child { border-top: 0; }

dialog {
  padding: 0;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  width: min(530px, calc(100% - 28px));
  max-height: calc(100svh - 30px);
  box-shadow: 0 20px 60px #101a3d3d;
}
dialog.wide { width: min(744px, calc(100% - 28px)); }
dialog::backdrop { background: #13203c75; }
.dialog-head { position: sticky; top: 0; z-index: 1; background: white; display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); gap: 10px; }
.dialog-head h2 { font-size: 1.2rem; overflow-wrap: anywhere; }
.dialog-body { padding: 17px 18px 19px; }
.dialog-body h3 { font-size: .98rem; margin: 16px 0 9px; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; margin-top: 12px; }
.dialog-actions:empty { display: none; }
.dialog-hint { margin-bottom: 13px; color: var(--muted); }
.details { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.details > div { padding: 10px; border-radius: 8px; background: #f5f7fb; min-width: 0; }
.details dt { color: var(--muted); font-size: .8125rem; margin-bottom: 5px; }
.details dd { font-size: .9rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.form-grid { display: grid; gap: 12px; }
.form-grid.two-col { grid-template-columns: 1fr 1fr; }
.span-2 { grid-column: 1 / -1; }
.field { display: grid; align-content: start; gap: 5px; font-size: .9rem; font-weight: 650; min-width: 0; }
.field em { color: #ad304a; font-style: normal; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; padding: 8px; min-height: 39px; border-radius: 7px; border: 1px solid #dce3ef; background-color: #fff; color: var(--ink); font-weight: 400; }
.field select { padding-right: 22px; }
.field textarea { resize: vertical; }
.field input[readonly] { color: var(--muted); background: #f5f7fb; }
.form-error { color: #a92641; font-size: .875rem; }
.form-error:empty { display: none; }
.event-list { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.event-list li { border-left: 2px solid #8ba3ef; padding: 6px 9px; background: #f8faff; font-size: .875rem; }
.event-list li div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px; }
.event-list p { margin-top: 5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.event-list small, .muted { color: var(--muted); }
.account-roles { display: flex; flex-wrap: wrap; gap: 7px; }
.global-search { width: 100%; margin-bottom: 12px; }
.search-result b { flex: 1; }
.todo-sections { display: grid; gap: 16px; }
.context-feedback { margin-top: 15px; border-top: 1px solid var(--line); padding-top: 12px; }
.context-feedback-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.dialog-body .context-feedback-head h3 { margin: 0; }
.context-feedback > p { font-size: .875rem; }
a.record-title { text-decoration-thickness: 1px; text-underline-offset: 3px; }
#toast { display: none; position: fixed; z-index: 10; bottom: 17px; right: 17px; max-width: min(380px, calc(100% - 34px)); border-radius: 8px; padding: 11px 15px; color: white; background: #243955; box-shadow: 0 6px 22px #12204424; font-size: .9rem; }
#toast.show { display: block; }
#toast.error { background: #982c45; }

.login-shell { min-height: 100svh; display: grid; grid-template-columns: 1fr .88fr; background: white; }
.login-brand { background: var(--nav); color: white; min-height: 100%; padding: 46px clamp(25px, 5vw, 72px); display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.login-brand .brand { position: absolute; top: 36px; left: clamp(25px, 5vw, 72px); }
.login-title { position: relative; z-index: 1; }
.login-title h1 { font-size: clamp(1.8rem, 4vw, 3.8rem); line-height: 1.24; letter-spacing: -.035em; }
.login-title p { max-width: 410px; font-size: 1rem; line-height: 1.7; color: #c8d4ed; margin-top: 18px; }
.login-art { width: 310px; height: 240px; position: absolute; bottom: -78px; right: -11px; transform: rotate(-28deg); display: flex; align-items: end; gap: 17px; opacity: .6; }
.login-art i { display: block; width: 49px; height: 50%; border-radius: 12px 12px 0 0; background: linear-gradient(180deg, #395997, #1d315b); }
.login-art i:nth-child(2) { height: 66%; }
.login-art i:nth-child(3) { height: 82%; }
.login-art i:nth-child(4) { height: 100%; }
.login-body { min-height: 100%; display: grid; align-items: center; justify-items: center; padding: 30px 26px; }
.login-form { width: min(100%, 370px); }
.login-form h2 { font-size: 1.65rem; }
.login-form p { color: var(--muted); margin: 8px 0 24px; }
.login-form .field input { min-height: 44px; }
.login-form .btn.full { min-height: 43px; margin: 3px 0 0; }
.login-form > .btn { margin-top: 10px; }
.demo-entry { border-top: 1px solid var(--line); margin-top: 25px; padding-top: 16px; }
.demo-entry > span { display: block; color: var(--muted); margin-bottom: 8px; font-size: .875rem; }
.demo-entry > div { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }

@media (max-width: 1120px) {
  .shell { grid-template-columns: 190px minmax(0, 1fr); }
  .metric { padding: 12px; }
  .metrics, .dashboard-grid { gap: 12px; }
  .project-date { display: none; }
}
@media (max-width: 850px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; position: fixed; width: min(240px, 80vw); inset: 0 auto 0 0; }
  .menu-open .sidebar { display: flex; }
  .mobile-menu { display: inline-flex; }
  .menu-open .backdrop { display: block; background: #17244266; border: 0; position: fixed; inset: 0; z-index: 3; }
}
@media (max-width: 620px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .project-date { display: inline; }
  .topbar { min-height: 56px; padding: 8px 12px; }
  .content { padding: 19px 12px 30px; }
  .top-actions { gap: 7px; }
  .today, .crumb-base, .crumb-sep { display: none; }
  .page-head { align-items: flex-start; margin-bottom: 16px; }
  .page-head p { font-size: .875rem; }
  .head-actions .btn { padding: 0 8px; }
  th, td { padding-left: 11px; padding-right: 11px; }
  .login-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-brand { padding: 18px 24px 24px; }
  .login-brand .brand { position: static; margin-bottom: 24px; }
  .login-title p { margin-top: 9px; }
  .login-body { align-items: start; }
}
@media (max-width: 380px) {
  .project-date { display: none; }
  .form-grid.two-col { grid-template-columns: 1fr; }
}
