:root {
  font-family: "Microsoft YaHei", Arial, sans-serif;
  color: #0d2e49;
  background: #eef4f9;
  font-synthesis: none;
  --blue-950: #07345c;
  --blue-900: #084778;
  --blue-800: #075c9e;
  --blue-700: #0874c9;
  --blue-600: #168ee0;
  --blue-100: #e8f4ff;
  --line: #d7e4ef;
  --muted: #647c91;
  --green: #129267;
  --orange: #e7841a;
  --red: #d74646;
  --shadow: 0 12px 35px rgba(27, 70, 107, .09);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #eef4f9; color: #0d2e49; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.login-view { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 10%, #dcedfc 0, transparent 35%), linear-gradient(135deg, #f8fbfe 0%, #e9f2f9 100%); }
.login-brand { position: absolute; top: 28px; left: 36px; display: flex; align-items: center; gap: 12px; }
.login-brand strong, .sidebar-brand strong { display: block; font-size: 17px; }
.login-brand small, .sidebar-brand small { color: var(--muted); }
.brand-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; color: white; background: linear-gradient(145deg, var(--blue-700), var(--blue-950)); box-shadow: 0 10px 24px rgba(8, 116, 201, .25); font-weight: 800; font-size: 22px; }
.brand-mark.small { width: 38px; height: 38px; border-radius: 12px; font-size: 18px; }
.login-card { width: min(430px, 100%); background: rgba(255,255,255,.96); border: 1px solid rgba(205, 222, 236, .9); border-radius: 24px; box-shadow: 0 24px 70px rgba(21, 61, 96, .14); padding: 38px; }
.login-card h1 { margin: 4px 0 26px; font-size: 29px; }
.eyebrow { margin: 0; color: var(--blue-700); font-weight: 700; font-size: 13px; letter-spacing: 1px; }
label { display: grid; gap: 8px; font-size: 14px; font-weight: 700; margin-bottom: 16px; }
input, select, textarea { width: 100%; border: 1px solid #cbdbe8; background: #fff; color: #102f49; border-radius: 10px; padding: 11px 12px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(22, 142, 224, .12); }
textarea { min-height: 100px; resize: vertical; line-height: 1.65; }
.button { border: 1px solid #b9d5ea; color: #0865a9; background: #fff; border-radius: 10px; padding: 10px 15px; font-weight: 700; }
.button:hover { border-color: var(--blue-600); background: #f5fbff; }
.button.primary { border-color: var(--blue-700); background: var(--blue-700); color: #fff; box-shadow: 0 7px 16px rgba(8,116,201,.19); }
.button.danger { border-color: #efb7b7; color: #b72e2e; }
.button.success { border-color: #9ddac4; color: #08724d; }
.button.wide { width: 100%; padding: 12px; }
.form-message { min-height: 22px; margin: 12px 0 0; color: var(--red); font-size: 13px; }
.login-tip { margin: 10px 0 0; color: var(--muted); text-align: center; font-size: 12px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 226px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; z-index: 20; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.sidebar-brand { height: 78px; padding: 17px 18px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.main-nav { padding: 14px 10px; display: grid; gap: 4px; overflow: auto; }
.nav-button { border: 0; background: transparent; color: #31526d; text-align: left; border-radius: 10px; padding: 12px 13px; display: flex; align-items: center; gap: 11px; font-weight: 700; }
.nav-button:hover { background: #f1f7fc; }
.nav-button.active { background: var(--blue-100); color: #086bb7; }
.nav-icon { width: 22px; text-align: center; font-size: 17px; }
.sidebar-foot { margin: auto 12px 14px; padding: 12px; border: 1px solid #cfe4f5; border-radius: 12px; background: #f2f9ff; font-size: 12px; }
.sidebar-foot small { display: block; color: var(--muted); margin-top: 5px; }
.status-dot { display: inline-block; width: 8px; height: 8px; background: #19a46e; border-radius: 50%; margin-right: 6px; }
.workspace { min-width: 0; }
.topbar { height: 78px; position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 18px; padding: 12px 24px; background: rgba(246, 250, 253, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 22px; margin: 0; }
.topbar p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.notification-button, .text-button, .icon-button { border: 0; background: transparent; color: #32536e; font-weight: 700; }
.notification-button { border: 1px solid #d3e2ed; border-radius: 10px; padding: 8px 10px; background: #fff; }
.count-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin-left: 4px; border-radius: 10px; color: #fff; background: var(--red); font-size: 11px; }
.user-chip { display: flex; align-items: center; gap: 8px; }
.user-chip > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #dceeff; color: #096fbf; font-weight: 800; }
.user-chip strong, .user-chip small { display: block; white-space: nowrap; }
.user-chip small { color: var(--muted); font-size: 11px; }
.menu-button { display: none; font-size: 22px; }
.content { padding: 20px 24px 34px; }
.page-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.page-tools .search { min-width: 260px; flex: 1; }
.page-tools select { width: auto; min-width: 130px; }
.filter-chip { padding: 8px 11px; border-radius: 20px; background: #fff4e5; color: #a85a00; border: 1px solid #f5d4a6; font-size: 13px; font-weight: 700; }
.grid { display: grid; gap: 16px; }
.metrics { grid-template-columns: repeat(6, minmax(120px, 1fr)); margin-bottom: 16px; }
.metric-card, .panel { background: #fff; border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); }
.metric-card { padding: 17px; position: relative; overflow: hidden; }
.metric-card.clickable { text-align: left; color: inherit; cursor: pointer; }
.metric-card.clickable:hover { border-color: #72b6e6; transform: translateY(-1px); }
.metric-card::after { content: ""; position: absolute; right: -24px; bottom: -30px; width: 85px; height: 85px; border-radius: 50%; background: rgba(22,142,224,.07); }
.metric-card small { color: var(--muted); }
.metric-card strong { display: block; margin-top: 8px; font-size: 28px; }
.metric-card.alert strong { color: var(--red); }
.metric-card.pending strong { color: var(--orange); }
.metric-card.done strong { color: var(--green); }
.panel { overflow: hidden; }
.panel-header { min-height: 52px; padding: 13px 16px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.panel-header h2 { font-size: 16px; margin: 0; }
.panel-header small { margin-left: auto; color: var(--muted); }
.panel-body { padding: 16px; }
.dashboard-grid { grid-template-columns: 1.25fr .75fr; }
.issue-list { display: grid; gap: 9px; }
.issue-card { width: 100%; border: 1px solid #d7e5ef; background: #fff; border-radius: 12px; padding: 13px 14px; text-align: left; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; color: inherit; }
.issue-card:hover { border-color: #72b6e6; box-shadow: 0 8px 22px rgba(20, 96, 150, .09); }
.issue-card.major { border-left: 5px solid var(--red); }
.issue-card.urgent { border-left: 5px solid var(--orange); }
.issue-card.normal { border-left: 5px solid #40a3d9; }
.issue-main strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.issue-main small { display: block; color: var(--muted); margin-top: 5px; }
.issue-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.todo-section { margin-top: 16px; }
.link-todo-list, .link-task-list { display: grid; gap: 10px; }
.link-todo-card { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; border: 1px solid #d7e5ef; border-left: 5px solid #31a3d7; border-radius: 12px; padding: 12px 14px; background: #fff; }
.link-todo-card.review { border-left-color: var(--orange); background: #fffdf8; }
.link-todo-main { min-width: 0; border: 0; background: transparent; padding: 0; text-align: left; color: inherit; }
.link-todo-main strong, .link-todo-main span { display: block; }
.link-todo-main strong { margin-bottom: 5px; }
.link-todo-main span { color: var(--muted); font-size: 12px; line-height: 1.55; }
.link-todo-status { display: grid; gap: 6px; justify-items: start; min-width: 150px; }
.link-todo-status small { color: var(--muted); }
.link-todo-status .danger-text { color: var(--red); font-weight: 700; }
.link-todo-action { min-width: 126px; text-align: right; }
.main-todo-card { overflow: hidden; border-radius: 12px; }
.main-todo-card.waiting { border: 1px solid #f0c783; background: #fffaf2; }
.main-todo-card.overdue { border: 1px solid #e89b9b; background: #fff4f4; }
.main-todo-card .issue-card { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.schedule-todo-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 13px; border-top: 1px solid rgba(210, 150, 65, .25); color: #855413; font-size: 12px; }
.main-todo-card.overdue .schedule-todo-strip { color: #943636; border-color: rgba(190, 70, 70, .22); }
.tag { display: inline-flex; align-items: center; border-radius: 14px; padding: 4px 8px; background: #edf6fd; color: #0872bf; font-size: 12px; font-weight: 700; }
.tag.major { color: #b52222; background: #ffeded; }
.tag.urgent { color: #a95b00; background: #fff2df; }
.tag.success { color: #08744e; background: #e8f8f1; }
.tag.warning { color: #9c5700; background: #fff1db; }
.tag.danger { color: #b42525; background: #ffebeb; }
.empty { padding: 40px 18px; text-align: center; color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 780px; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; vertical-align: middle; }
th { color: #587187; font-size: 12px; background: #fbfdff; }
tbody tr[data-clickable] { cursor: pointer; }
tbody tr[data-clickable]:hover { background: #f5faff; }
.number-hot { font-size: 16px; font-weight: 800; color: var(--blue-700); }
.number-hot.level-1 { color: #108861; }
.number-hot.level-2 { color: var(--orange); }
.number-hot.level-3 { color: var(--red); }
.kanban { display: grid; grid-template-columns: repeat(5, minmax(240px, 1fr)); gap: 13px; overflow-x: auto; padding-bottom: 8px; }
.kanban-column { background: #e8f0f6; border-radius: 14px; min-height: 430px; padding: 10px; }
.kanban-column h3 { margin: 4px 5px 11px; font-size: 14px; display: flex; justify-content: space-between; }
.kanban .issue-card { grid-template-columns: 1fr; }
.kanban .issue-meta { justify-content: flex-start; }
.chart-list { display: grid; gap: 11px; }
.chart-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) 45px; align-items: center; gap: 10px; font-size: 13px; }
.chart-track { height: 12px; border-radius: 8px; background: #e8eff5; overflow: hidden; }
.chart-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue-700), #35b3df); min-width: 4px; }
.chart-fill.orange { background: linear-gradient(90deg, #e07118, #f6aa45); }
.chart-fill.green { background: linear-gradient(90deg, #13906c, #4ac2a9); }
.analytics-grid { grid-template-columns: 1fr 1fr; }
.donut-wrap { display: flex; align-items: center; justify-content: center; gap: 34px; min-height: 250px; }
.donut { width: 178px; height: 178px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#1375c4 0 45%, #31a0d7 45% 72%, #55bad9 72% 94%, #a9bdcb 94% 100%); position: relative; }
.donut::after { content: ""; width: 96px; height: 96px; border-radius: 50%; background: white; position: absolute; }
.donut strong { z-index: 1; font-size: 28px; }
.legend { display: grid; gap: 10px; }
.legend span { display: flex; justify-content: space-between; gap: 20px; font-size: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-3 { grid-column: 1 / -1; }
.priority-options { display: flex; gap: 10px; margin-bottom: 16px; }
.priority-options label { margin: 0; display: flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line); }
.priority-options input { width: auto; }
.priority-options .major { border-color: #f0b3b3; color: #b52d2d; background: #fff5f5; }
.priority-options .urgent { border-color: #f3cc94; color: #a45d00; background: #fff9ef; }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(7, 32, 53, .44); display: grid; place-items: center; padding: 20px; }
.modal { width: min(1040px, 100%); max-height: 92vh; overflow: auto; background: #fff; border-radius: 18px; box-shadow: 0 30px 80px rgba(5,35,59,.3); }
.modal.small { width: min(560px, 100%); }
.modal-header { position: sticky; top: 0; z-index: 2; background: #fff; border-bottom: 1px solid var(--line); padding: 17px 20px; display: flex; align-items: flex-start; gap: 12px; }
.modal-header h2 { margin: 0; font-size: 20px; }
.modal-header p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.modal-close { margin-left: auto; border: 0; width: 34px; height: 34px; border-radius: 50%; background: #edf3f7; font-size: 20px; }
.modal-body { padding: 20px; }
.modal-footer { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 13px 20px; display: flex; gap: 10px; justify-content: flex-end; }
.modal-footer .modal-close { margin-left: 0; width: auto; height: auto; min-width: 70px; border: 1px solid #b9d5ea; border-radius: 10px; background: #fff; color: #0865a9; padding: 10px 15px; font-size: 14px; white-space: nowrap; }
.modal-footer .modal-close:hover { border-color: var(--blue-600); background: #f5fbff; }
.upload-help { margin: -7px 0 0; color: var(--muted); font-size: 12px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .7fr); gap: 18px; }
.detail-section { border-bottom: 1px solid var(--line); padding: 0 0 17px; margin-bottom: 17px; }
.detail-section h3 { font-size: 14px; margin: 0 0 11px; }
.section-help { margin: -3px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.section-help.schedule-empty { margin: 12px 0 0; }
.eta-conflict-note { margin: 2px 0 12px; border: 1px solid #efb1b1; border-radius: 9px; background: #fff0f0; color: #b32626; padding: 9px 11px; font-size: 12px; font-weight: 700; }
.discussion-list { display: grid; gap: 9px; margin-top: 12px; }
.discussion-item { border-left: 4px solid var(--blue-600); border-radius: 9px; background: #f5faff; padding: 10px 12px; }
.discussion-item strong { font-size: 12px; }
.discussion-item span { float: right; color: var(--muted); font-size: 11px; }
.discussion-item p { clear: both; margin: 7px 0 0; color: #466078; font-size: 12px; line-height: 1.6; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.info-box { background: #f4f8fb; border-radius: 10px; padding: 11px; }
.info-box small { display: block; color: var(--muted); margin-bottom: 5px; }
.action-card { border-radius: 14px; background: linear-gradient(145deg, #0a4f89, #086ab4); color: #fff; padding: 17px; }
.action-card h3 { margin-top: 0; }
.action-list { display: grid; gap: 8px; margin-top: 13px; }
.action-card .button { background: white; }
.action-card .button.primary { border-color: #fff; background: #0874c9; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.38), 0 7px 16px rgba(0,0,0,.16); }
.action-card .button.primary:hover { background: #075fa5; }
.action-wait { border: 1px solid rgba(255,255,255,.45); border-radius: 10px; background: rgba(255,255,255,.12); color: #fff; padding: 11px 12px; line-height: 1.55; font-weight: 700; }
.timeline { position: relative; padding-left: 24px; display: grid; gap: 17px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 5px; bottom: 5px; width: 2px; background: #cae1f1; }
.timeline-item { position: relative; }
.timeline-item::before { content: ""; position: absolute; left: -22px; top: 4px; width: 11px; height: 11px; border-radius: 50%; background: var(--blue-700); box-shadow: 0 0 0 3px #e8f4ff; }
.timeline-item strong { display: block; font-size: 13px; }
.timeline-item p { margin: 5px 0; color: #466078; line-height: 1.6; font-size: 13px; }
.timeline-item time { color: #8297a9; font-size: 11px; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 8px; }
.attachment-link { border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; color: var(--blue-700); text-decoration: none; font-size: 12px; background: #f8fbfd; }
.link-task-card { border: 1px solid #d7e5ef; border-radius: 12px; padding: 13px; background: #fbfdff; }
.link-task-card.focused { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(231,132,26,.16); background: #fffaf2; }
.link-task-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.link-task-card header p { margin: 7px 0 0; color: #466078; line-height: 1.6; }
.link-task-meta { display: grid; gap: 5px; margin-top: 10px; color: #466078; font-size: 12px; }
.link-task-evidence { margin-top: 11px; padding-top: 10px; border-top: 1px dashed #cbdce8; }
.link-task-evidence > strong { display: block; margin-bottom: 8px; font-size: 12px; }
.link-task-history { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #cbdce8; }
.link-task-history summary { cursor: pointer; color: #176daa; font-size: 12px; font-weight: 700; }
.timeline.compact { margin-top: 12px; gap: 11px; }
.timeline.compact .timeline-item p { margin: 3px 0; font-size: 12px; }
.link-task-card footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 11px; }
.muted-text { color: var(--muted); font-size: 12px; }
.link-draft-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 18px 0 10px; padding-top: 15px; border-top: 1px solid var(--line); }
.link-draft-header p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.link-draft-list { display: grid; gap: 10px; }
.link-draft-row { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; padding: 12px; border: 1px solid #d7e5ef; border-radius: 11px; background: #f8fbfd; }
.link-draft-row .span-2 { grid-column: 1 / -1; }
.link-draft-remove { position: absolute; right: 12px; bottom: 12px; color: var(--red); border-color: #efb5b5; }
.empty.compact { padding: 16px; }
.toast { position: fixed; z-index: 80; right: 22px; bottom: 22px; max-width: 380px; padding: 13px 16px; border-radius: 11px; color: #fff; background: #123f63; box-shadow: 0 12px 30px rgba(7,38,62,.25); }
.toast.error { background: #b73535; }
.notification-panel { position: fixed; z-index: 45; top: 70px; right: 20px; width: min(420px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 50px rgba(8,48,80,.2); padding: 10px; }
.notification-item { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: #fff; padding: 12px; text-align: left; color: inherit; }
.notification-item.warning { border-left: 4px solid var(--orange); background: #fffaf2; }
.notification-item.danger { border-left: 4px solid var(--red); background: #fff5f5; }
.notification-item small { color: var(--muted); display: block; margin-top: 5px; }
@media (max-width: 1200px) {
  .metrics { grid-template-columns: repeat(3, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .app-shell { grid-template-columns: 1fr; padding-bottom: 68px; }
  .sidebar { position: fixed; inset: auto 0 0; height: 68px; border: 0; border-top: 1px solid var(--line); display: block; z-index: 35; }
  .sidebar-brand, .sidebar-foot { display: none; }
  .main-nav { height: 68px; padding: 6px; display: flex; overflow-x: auto; gap: 2px; }
  .nav-button { min-width: 68px; padding: 6px 9px; flex-direction: column; justify-content: center; gap: 2px; font-size: 10px; text-align: center; }
  .nav-icon { height: 20px; }
  .topbar { height: 66px; padding: 10px 14px; }
  .topbar h1 { font-size: 18px; }
  .topbar p, .user-chip div, .text-button { display: none; }
  .content { padding: 14px 12px 26px; }
  .metrics { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .metric-card { padding: 13px; }
  .metric-card strong { font-size: 24px; }
  .analytics-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2, .form-grid .span-3 { grid-column: auto; }
  .detail-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .issue-card { grid-template-columns: 1fr; }
  .issue-meta { justify-content: flex-start; }
  .link-todo-card { grid-template-columns: 1fr; }
  .link-todo-action { text-align: left; }
  .schedule-todo-strip { align-items: flex-start; flex-direction: column; }
  .link-draft-header { align-items: flex-start; flex-direction: column; }
  .link-draft-row { grid-template-columns: 1fr; }
  .link-draft-row .span-2 { grid-column: auto; }
  .link-draft-remove { position: static; justify-self: start; margin-bottom: 8px; }
  .modal-backdrop { padding: 0; place-items: end center; }
  .modal { max-height: 94vh; border-radius: 18px 18px 0 0; }
  .login-brand { position: static; margin-bottom: 20px; }
  .login-view { display: flex; flex-direction: column; justify-content: center; }
  .login-card { padding: 26px 22px; }
  .donut-wrap { flex-direction: column; gap: 18px; }
}
