* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f4f7fa; color: #1f2a37; }
header { background: #0f4c81; color: #fff; padding: 20px 24px 0; }
header h1 { margin: 0; font-size: 24px; }
header .sub { margin: 6px 0 14px; opacity: .85; font-size: 13px; }
.modules { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 14px; }
.modules span { padding: 6px 14px; border-radius: 20px; background: rgba(255,255,255,.14); font-size: 13px; }
.modules span.todo { opacity: .55; }
.modules span.todo::after { content: " · 待建"; font-size: 11px; }
.modules span.active { background: #fff; color: #0f4c81; font-weight: 700; }
main { max-width: 1240px; margin: 0 auto; padding: 20px 16px 40px; }
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { background: #fff; border-radius: 10px; padding: 14px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.stat b { display: block; font-size: 26px; color: #0f4c81; }
.stat span { font-size: 13px; color: #6b7a8d; }
.stat.warn b { color: #c2410c; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { border: 1px solid #d5dee8; background: #fff; border-radius: 20px; padding: 6px 14px; cursor: pointer; font-size: 13px; }
.tab.active { background: #0f4c81; color: #fff; border-color: #0f4c81; }
#search { flex: 1; min-width: 180px; padding: 8px 12px; border: 1px solid #d5dee8; border-radius: 8px; font-size: 14px; }
.btn { border: 1px solid #d5dee8; background: #fff; border-radius: 8px; padding: 8px 14px; cursor: pointer; font-size: 14px; }
.btn.primary { background: #0f4c81; color: #fff; border-color: #0f4c81; }
.btn.ghost { color: #6b7a8d; }
.table-wrap { background: #fff; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 1080px; }
th, td { padding: 10px 12px; border-bottom: 1px solid #eef2f6; text-align: left; white-space: nowrap; }
th { background: #f8fafc; color: #52657a; }
tr.overdue { background: #fef3f2; }
.overdue-tag { color: #c2410c; font-weight: 700; font-size: 12px; }
.pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; }
.st-todo { background: #eef2f6; color: #52657a; }
.st-doing { background: #dbeafe; color: #0f4c81; }
.st-check { background: #fef3c7; color: #92400e; }
.st-done { background: #dcfce7; color: #166534; }
.bar { width: 70px; height: 6px; background: #e5eaf0; border-radius: 3px; display: inline-block; vertical-align: middle; margin-right: 6px; }
.bar i { display: block; height: 100%; background: #0f4c81; border-radius: 3px; }
.actions button { border: none; background: none; color: #0f4c81; cursor: pointer; font-size: 13px; padding: 2px 6px; }
.empty { text-align: center; color: #6b7a8d; padding: 32px 0; }
.note { color: #6b7a8d; font-size: 12px; margin-top: 12px; }
.modal { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 10; }
.modal[hidden] { display: none; }
.modal-card { background: #fff; border-radius: 12px; padding: 20px 22px; width: 520px; max-width: 100%; }
.modal-card h2 { margin: 0 0 12px; font-size: 18px; }
.modal-card label { display: block; font-size: 13px; color: #52657a; margin-bottom: 10px; }
.modal-card input, .modal-card select { width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid #d5dee8; border-radius: 8px; font-size: 14px; }
.modal-card .row { display: flex; gap: 12px; }
.modal-card .row label { flex: 1; }
.form-actions { display: flex; gap: 10px; margin-top: 6px; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.modules a { padding: 6px 14px; border-radius: 20px; background: rgba(255,255,255,.14); font-size: 13px; color: #fff; text-decoration: none; }
.modules a.todo { opacity: .55; }
.modules a.todo::after { content: " · 待建"; font-size: 11px; }
.modules a.active { background: #fff; color: #0f4c81; font-weight: 700; }
.stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.link-btn { border: none; background: none; color: #0f4c81; cursor: pointer; font-size: 13px; padding: 2px 6px; text-decoration: underline; }
.modal-card.wide { width: 680px; }
.detail-head { display: flex; align-items: center; gap: 10px; }
.detail-head h2 { flex: 1; margin: 0; font-size: 18px; }
.detail-info { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; background: #f8fafc; border-radius: 8px; padding: 12px 14px; font-size: 13px; margin: 14px 0; }
.detail-info span { color: #6b7a8d; display: block; font-size: 12px; }
.modal-card h3 { margin: 16px 0 10px; font-size: 15px; }
.modal-card h4 { margin: 14px 0 8px; font-size: 14px; }
.log-card { border: 1px solid #e5eaf0; border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; font-size: 13px; }
.log-meta { display: flex; gap: 10px; align-items: center; color: #52657a; font-size: 12px; margin-bottom: 4px; }
.log-meta b { color: #0f4c81; font-size: 13px; }
.log-del { margin-left: auto; border: none; background: none; color: #c2410c; cursor: pointer; font-size: 12px; }
.log-card p { margin: 4px 0; }
.log-card p b { color: #334155; }
.modal-card textarea { width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid #d5dee8; border-radius: 8px; font-size: 14px; font-family: inherit; resize: vertical; }
.stub { background: #fff; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06); padding: 20px 22px; }
.stub h2 { margin-top: 0; font-size: 18px; }
.stub h3 { font-size: 15px; margin: 18px 0 8px; }
.stub ul { margin: 6px 0; padding-left: 20px; font-size: 14px; line-height: 1.8; }
.stub .pending { color: #92400e; background: #fef3c7; border-radius: 8px; padding: 10px 12px; font-size: 13px; }
#logList.timeline { position: relative; padding-left: 22px; }
#logList.timeline::before { content: ''; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: #d5dee8; }
#logList.timeline .log-card { position: relative; }
#logList.timeline .log-card::before { content: ''; position: absolute; left: -20px; top: 16px; width: 10px; height: 10px; border-radius: 50%; background: #0f4c81; border: 2px solid #fff; box-shadow: 0 0 0 1px #0f4c81; }
#logList.timeline .log-card.tl-start::before { background: #16a34a; box-shadow: 0 0 0 1px #16a34a; }
