:root {
  color-scheme: light;
  --bg: #f3f5f7;
  --surface: #fff;
  --ink: #17212b;
  --muted: #687482;
  --line: #dde2e7;
  --brand: #157c6a;
  --brand-dark: #0e6254;
  --blue: #2769c7;
  --amber: #b86909;
  --red: #c53d3d;
  --green-soft: #e5f4ef;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 14px; }
body:has(.login-screen:not([hidden])) { overflow: hidden; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 228px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 22px 16px; background: #16242a; color: #fff; display: flex; flex-direction: column; }
.brand { display: grid; gap: 12px; padding: 0 4px 24px; }
.brand-logo { display: block; width: 100%; height: 68px; object-fit: contain; padding: 7px; background: #fff; border-radius: 6px; }
.brand-product { padding: 0 7px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; }.brand small { color: #9cb0b8; margin-top: 4px; font-size: 12px; }
nav { display: grid; gap: 5px; }
.nav-item { text-align: left; border: 0; padding: 11px 12px; color: #b7c5ca; background: transparent; border-radius: 5px; }
.nav-item:hover, .nav-item.active { color: #fff; background: #263941; }
.mode { margin-top: auto; padding: 10px; color: #a7bac1; border-top: 1px solid #2c4149; font-size: 12px; }
main { min-width: 0; padding: 0 30px 40px; }
.topbar { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }.topbar-actions span { color: var(--muted); font-size: 13px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 22px; margin-bottom: 5px; } .topbar p { margin-bottom: 0; color: var(--muted); }
.primary, .secondary { min-height: 38px; border-radius: 5px; padding: 0 16px; border: 1px solid transparent; font-weight: 600; }
.primary { color: #fff; background: var(--brand); }.primary:hover { background: var(--brand-dark); }
.secondary { background: #fff; border-color: var(--line); color: var(--ink); }.secondary:hover { border-color: #b9c2ca; }
.view { display: none; }.view.active { display: block; }
.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); gap: 12px; margin-bottom: 16px; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 17px; min-height: 100px; }
.metric span { color: var(--muted); font-size: 13px; }.metric strong { display: block; font-size: 29px; margin: 12px 0 0; }.metric.danger strong { color: var(--red); }
.split-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr); gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.panel-head { padding: 17px 19px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; }
.panel-head h2 { margin: 0; font-size: 16px; }.panel-head span { color: var(--muted); font-size: 12px; }
.risk-item, .pulse-item { padding: 14px 19px; border-bottom: 1px solid #edf0f2; display: grid; align-items: center; gap: 12px; }
.risk-item { grid-template-columns: minmax(0, 1fr) auto; }.risk-item:last-child, .pulse-item:last-child { border-bottom: 0; }
.risk-item strong, .risk-item small { display: block; }.risk-item small { margin-top: 5px; color: var(--muted); }
.risk-item button { border: 0; background: transparent; color: var(--blue); padding: 8px; }
.pulse-item { grid-template-columns: 34px minmax(0, 1fr) auto; }.avatar { width: 32px; height: 32px; display: grid; place-items: center; background: #e9edf1; border-radius: 50%; font-weight: 700; }
.pulse-item b, .pulse-item small { display: block; }.pulse-item small { color: var(--muted); margin-top: 3px; }.pulse-count { font-weight: 700; color: var(--brand); }
.empty { padding: 36px 18px; text-align: center; color: var(--muted); }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; min-height: 40px; }
.segmented { display: flex; flex-wrap: wrap; border: 1px solid var(--line); background: #fff; border-radius: 5px; overflow: hidden; }
.segmented button { border: 0; border-right: 1px solid var(--line); background: #fff; min-height: 36px; padding: 0 13px; color: var(--muted); }.segmented button:last-child { border-right: 0; }.segmented button.active { background: #e7f3ef; color: var(--brand-dark); font-weight: 700; }
.table-panel { overflow: hidden; }.table-wrap { overflow: auto; } table { width: 100%; border-collapse: collapse; min-width: 760px; }
th { text-align: left; color: var(--muted); background: #fafbfc; font-size: 12px; font-weight: 600; } th, td { padding: 13px 15px; border-bottom: 1px solid #e8ecef; } tbody tr { cursor: pointer; } tbody tr:hover { background: #fafcfc; }
.task-title { font-weight: 650; }.task-id { color: var(--muted); font-size: 11px; margin-left: 5px; }
.tag { display: inline-flex; align-items: center; min-height: 24px; border-radius: 4px; padding: 2px 8px; background: #edf0f2; color: #4f5b66; font-size: 12px; white-space: nowrap; }.tag.doing { background: #e5eefc; color: #245ba7; }.tag.blocked, .tag.overdue { background: #fce8e8; color: #a93232; }.tag.review { background: #fff0d9; color: #9a5908; }.tag.done { background: var(--green-soft); color: #146d5c; }
.progress-track { width: 100px; height: 7px; background: #e7ebee; border-radius: 4px; overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 7px; }.progress-track i { height: 100%; display: block; background: var(--brand); }
.report-toolbar { justify-content: flex-start; gap: 10px; }.report-toolbar input { min-height: 38px; border: 1px solid var(--line); border-radius: 5px; padding: 0 10px; background: #fff; }
.report-grid { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 13px; }.report-card { background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 17px; }.report-card h3 { font-size: 15px; margin-bottom: 12px; }.report-card pre { white-space: pre-wrap; font: inherit; line-height: 1.75; color: #3c4853; margin: 0; }
.settings-band { max-width: 850px; background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 24px; }.settings-band h2 { font-size: 18px; }
.steps { display: grid; gap: 1px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }.steps div { min-height: 62px; display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 12px; padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--line); }.steps div:last-child { border-bottom: 0; }.steps b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #e4f2ee; color: var(--brand-dark); }
.command-box { margin-top: 20px; padding: 18px; background: #f5f7f8; border-radius: 6px; }.command-box h3 { font-size: 14px; }.command-box code { display: block; margin: 10px 0 0; overflow-wrap: anywhere; }
dialog { width: min(620px, calc(100vw - 28px)); border: 0; border-radius: 8px; padding: 0; box-shadow: 0 18px 70px rgba(20,35,40,.3); } dialog::backdrop { background: rgba(15,28,32,.55); }
dialog form { padding: 22px; }.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }.dialog-head h2 { margin-bottom: 3px; font-size: 19px; }.dialog-head p { margin: 0; color: var(--muted); }.close { border: 0; background: transparent; font-size: 25px; line-height: 1; color: var(--muted); }
label { display: grid; gap: 7px; color: #46525e; font-size: 13px; margin-bottom: 14px; } input, select, textarea { width: 100%; border: 1px solid #cfd6dc; border-radius: 5px; padding: 9px 10px; color: var(--ink); background: #fff; } input, select { min-height: 39px; } textarea { resize: vertical; } input:focus, select:focus, textarea:focus { outline: 2px solid rgba(21,124,106,.17); border-color: var(--brand); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 7px; }
.toast { position: fixed; right: 22px; bottom: 22px; max-width: 360px; padding: 12px 16px; background: #17272d; color: #fff; border-radius: 5px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s; }.toast.show { opacity: 1; transform: translateY(0); }
.editable { border-bottom: 1px dashed #9aa6af; cursor: text; }
.login-screen { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: rgba(243,245,247,.98); }.login-screen[hidden] { display: none; }.login-card { width: min(390px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 28px; box-shadow: 0 16px 50px rgba(23,33,43,.12); }.login-card img { display: block; width: 100%; height: 72px; object-fit: contain; margin-bottom: 18px; }.login-card h1 { margin-bottom: 7px; }.login-card p { color: var(--muted); margin-bottom: 22px; }.login-card button { width: 100%; }.login-error { min-height: 22px; margin-top: 12px; color: var(--red); }
@media (max-width: 1060px) { .metric-grid { grid-template-columns: repeat(3, 1fr); }.report-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .app-shell { display: block; }.sidebar { position: static; width: 100%; height: auto; padding: 12px; }.brand { grid-template-columns: 154px minmax(0, 1fr); align-items: center; gap: 12px; padding: 0 2px 12px; }.brand-logo { height: 55px; }.brand-product { padding: 0; } nav { display: flex; overflow-x: auto; }.nav-item { flex: 0 0 auto; text-align: center; }.mode { display: none; } main { padding: 0 13px 30px; }.topbar { min-height: 82px; align-items: flex-start; padding-top: 14px; }.topbar h1 { font-size: 19px; }.topbar-actions { flex-wrap: wrap; justify-content: flex-end; }.metric-grid { grid-template-columns: repeat(2, 1fr); }.split-layout { grid-template-columns: 1fr; }.report-grid { grid-template-columns: 1fr; }.form-grid { grid-template-columns: 1fr; gap: 0; }.segmented { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }.segmented button { flex: 0 0 auto; }.primary, .secondary { padding: 0 12px; } }
