/* ============ macOS 风格工作日志 ============ */
:root {
  --accent: #007aff;
  --accent-bg: rgba(0, 122, 255, 0.10);
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --hairline: rgba(0, 0, 0, 0.08);
  --hairline-strong: rgba(0, 0, 0, 0.16);
  --fill: #f5f5f7;
  --fill-2: #ebebee;
  --white: #ffffff;
  --green: #34c759; --orange: #ff9500; --red: #ff3b30;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(160deg, #e6eaf2 0%, #d3d9e5 45%, #c9d1e0 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.app { height: 100vh; display: flex; }
.window {
  width: 100%;
  height: 100vh;
  background: var(--white);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ===== 毛玻璃基底 ===== */
.glass {
  background: rgba(255,255,255,0.62);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.72);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 14px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.75);
}

/* ===== 标题栏 ===== */
.titlebar {
  height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 16px;
  background: rgba(255,255,255,0.72); backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--hairline); flex-shrink: 0;
}
.tb-title { font-size: 13px; font-weight: 600; color: var(--text-2); margin-left: 4px; }
.tb-spacer { flex: 1; }
.search {
  display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,0.05); border-radius: 8px;
  height: 28px; padding: 0 10px; width: 240px; color: var(--text-3); font-size: 12.5px;
}
.tb-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; }

.body { display: flex; flex: 1; min-height: 0; }

/* ===== 侧边栏 ===== */
.sidebar {
  width: 216px; flex-shrink: 0;
  background: rgba(245,245,247,0.72); backdrop-filter: blur(24px) saturate(180%);
  border-right: 1px solid var(--hairline); padding: 12px 10px 16px; display: flex; flex-direction: column;
}
.side-brand { display: flex; align-items: center; gap: 9px; padding: 6px 8px 14px; }
.side-brand .logo { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.side-brand b { font-size: 14px; font-weight: 700; }
.side-group { margin-bottom: 10px; }
.side-label { font-size: 11px; font-weight: 600; color: var(--text-3); padding: 8px 10px 5px; }
.side-item { display: flex; align-items: center; gap: 9px; padding: 6px 10px; border-radius: 7px; font-size: 13px; color: var(--text); cursor: pointer; }
.side-item svg { width: 16px; height: 16px; color: var(--text-2); flex-shrink: 0; }
.side-item .n { flex: 1; }
.side-item .badge { font-size: 11px; color: var(--text-2); background: var(--fill-2); border-radius: 9px; padding: 1px 7px; font-weight: 600; }
.side-item:hover { background: rgba(0,0,0,0.05); }
.side-item.active { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.side-item.active svg { color: var(--accent); }
.side-item.active .badge { background: rgba(0,122,255,.16); color: var(--accent); }

/* ===== 内容区 ===== */
.content {
  flex: 1; padding: 26px 32px 40px; min-width: 0; overflow-y: auto;
  background: radial-gradient(1100px 520px at 12% -12%, rgba(0,122,255,0.10), transparent 60%),
    radial-gradient(900px 480px at 98% 8%, rgba(94,92,230,0.08), transparent 60%),
    linear-gradient(180deg, #fbfbfd 0%, #f3f4f8 100%);
}
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; }
.page-head h1 { font-size: 28px; font-weight: 700; letter-spacing: -.5px; }
.page-head .sub { font-size: 13px; color: var(--text-2); margin-top: 6px; }
.page-head .sub b { color: var(--accent); font-weight: 600; }
.head-actions { display: flex; align-items: center; gap: 10px; }

.seg { display: flex; background: var(--fill-2); border-radius: 8px; padding: 2px; }
.seg span { font-size: 12.5px; padding: 5px 14px; border-radius: 6px; color: var(--text-2); cursor: pointer; font-weight: 500; }
.seg span.active { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }

.btn { font-size: 13px; font-weight: 600; border-radius: 8px; padding: 7px 16px; cursor: pointer; border: none; font-family: inherit; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #0071eb; }
.btn-ghost { background: rgba(255,255,255,0.7); color: var(--text); border: 1px solid var(--hairline); }
.btn-ghost:hover { background: #fff; }

.chips { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.chip { font-size: 12px; padding: 5px 13px; border-radius: 16px; background: rgba(255,255,255,0.65); color: var(--text-2); font-weight: 600; cursor: pointer; border: 1px solid rgba(255,255,255,0.7); }
.chip.active { background: var(--accent-bg); color: var(--accent); border-color: rgba(0,122,255,.2); }

/* ===== 统计瓦片 ===== */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; max-width: 900px; }
.stat { border-radius: 12px; padding: 16px 18px; display: flex; align-items: center; gap: 13px; }
.stat .ic { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: rgba(255,255,255,0.75); color: var(--text-2); }
.stat .ic svg { width: 20px; height: 20px; }
.stat .num { font-size: 24px; font-weight: 700; letter-spacing: -.5px; line-height: 1.1; }
.stat .lbl { font-size: 12px; color: var(--text-2); margin-top: 2px; }

.section { margin-bottom: 26px; }
.sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sec-head h2 { font-size: 15px; font-weight: 700; }
.sec-sub { font-size: 12px; color: var(--text-3); }
.sec-more { margin-left: auto; font-size: 12.5px; color: var(--accent); cursor: pointer; font-weight: 600; }

/* ===== 周日程 ===== */
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.day { background: rgba(255,255,255,0.55); backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,0.6); border-radius: 11px; padding: 11px 10px; min-height: 118px; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.day.today { background: var(--accent-bg); border-color: rgba(0,122,255,.25); }
.day-head { display: flex; justify-content: space-between; align-items: center; }
.day-head .wd { font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.day.today .wd { color: var(--accent); font-weight: 700; }
.day-head .dd { width: 22px; height: 22px; border-radius: 6px; font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; color: var(--text); }
.day.today .dd { background: var(--accent); color: #fff; }
.ev { background: rgba(255,255,255,0.9); border-radius: 8px; padding: 7px 9px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.ev .t { font-size: 11.5px; font-weight: 600; line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; word-break: break-word; }
.ev .m { font-size: 10px; color: var(--text-3); margin-top: 3px; font-weight: 500; }

.split { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
.split > div { min-width: 0; }

/* ===== 列表 ===== */
.list { border-radius: 12px; padding: 4px 0; margin-bottom: 16px; }
.row { display: flex; align-items: flex-start; gap: 12px; padding: 11px 16px; }
.row + .row { border-top: 1px solid var(--hairline); }
.row .ck { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--hairline-strong); flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 10px; background: transparent; cursor: pointer; margin-top: 1px; }
.row .ck.on { background: var(--accent); border-color: var(--accent); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; word-break: break-word; }
.row.done .row-title { color: var(--text-3); text-decoration: line-through; font-weight: 500; }
.row-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.pill { font-size: 10.5px; padding: 2px 8px; border-radius: 10px; font-weight: 600; background: rgba(0,0,0,0.055); color: var(--text-2); }
.st { font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; }
.st i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; }
.lnk { font-size: 11.5px; color: var(--accent); font-weight: 600; cursor: pointer; }
.row-side { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.act { width: 26px; height: 26px; border-radius: 7px; background: rgba(0,0,0,0.05); color: var(--text-2); display: flex; align-items: center; justify-content: center; font-size: 11px; cursor: pointer; border: none; }
.act:hover { background: rgba(0,0,0,0.1); }
.act.danger:hover { background: rgba(255,59,48,.12); color: var(--red); }
.act.synced { color: var(--green); }
.act svg { width: 14px; height: 14px; }

/* ===== 小卡 ===== */
.mini-card { border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; }
.mini-card h3 { font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.remind { display: flex; gap: 10px; padding: 9px 0; }
.remind + .remind { border-top: 1px solid var(--hairline); }
.remind .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.remind .r-body { flex: 1; min-width: 0; }
.remind .r-t { font-size: 12.5px; font-weight: 600; overflow-wrap: anywhere; word-break: break-word; }
.remind .r-m { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.feed { display: flex; gap: 10px; padding: 9px 0; align-items: center; }
.feed + .feed { border-top: 1px solid var(--hairline); }
.feed .f-time { font-size: 11px; color: var(--text-3); width: 52px; flex-shrink: 0; }
.feed .f-t { font-size: 12.5px; font-weight: 500; flex: 1; min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.feed .f-op { font-size: 10.5px; font-weight: 600; flex-shrink: 0; padding: 2px 8px; border-radius: 9px; background: rgba(0,0,0,0.055); color: var(--text-2); }

/* ===== 工作日志周导航 ===== */
.week-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.wn-arrow { width: 32px; height: 32px; background: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,0.7); border-radius: 9px; display: flex; align-items: center; justify-content: center; color: var(--text-2); font-size: 14px; cursor: pointer; }
.wn-title { font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.wn-week { font-size: 12px; color: var(--accent); background: var(--accent-bg); font-weight: 700; padding: 4px 10px; border-radius: 14px; }
.wn-divider { width: 1px; height: 20px; background: var(--hairline); margin: 0 2px; }
.wn-link { font-size: 12.5px; color: var(--text-2); cursor: pointer; padding: 6px 11px; border-radius: 8px; font-weight: 600; background: none; border: none; font-family: inherit; }
.wn-link:hover { background: rgba(0,0,0,0.05); }
.wd-badge { font-size: 12px; font-weight: 700; background: rgba(255,255,255,0.8); border: 1px solid var(--hairline); padding: 4px 12px; border-radius: 9px; color: var(--text-2); }
.wd-badge.today { background: var(--accent); border-color: var(--accent); color: #fff; }
.today-flag { font-size: 11px; color: var(--accent); background: var(--accent-bg); padding: 3px 9px; border-radius: 12px; font-weight: 700; }
.day-cnt { margin-left: auto; font-size: 12px; color: var(--text-3); font-weight: 600; }

/* ===== 例会 ===== */
.m-card { border-radius: 12px; padding: 16px 18px; margin-bottom: 12px; display: flex; gap: 14px; }
.m-date { flex-shrink: 0; width: 58px; text-align: center; background: rgba(255,255,255,0.75); border-radius: 10px; padding: 9px 0; height: fit-content; border: 1px solid rgba(255,255,255,0.8); }
.m-date .md { font-size: 20px; font-weight: 800; }
.m-date .mm { font-size: 10.5px; color: var(--text-3); font-weight: 600; }
.m-body { flex: 1; min-width: 0; }
.m-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.m-list { margin: 10px 0 0; padding-left: 20px; }
.m-list li { line-height: 1.75; margin: 2px 0; font-size: 13px; color: var(--text); }
.m-list li::marker { color: var(--accent); font-weight: 700; }
.todo-box { background: rgba(0,0,0,0.045); border-radius: 9px; padding: 10px 13px; margin-top: 11px; }
.todo-box b { font-size: 11px; color: var(--text-3); letter-spacing: 1px; }
.todo-box ul { margin: 5px 0 0; padding-left: 17px; }
.todo-box li { font-size: 12px; line-height: 1.7; color: var(--text-2); }
.todo-content { font-size: 13px; color: var(--text); margin-top: 8px; line-height: 1.6; }

/* ===== 总结 ===== */
.range-pill { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,0.8); border-radius: 9px; padding: 8px 14px; font-size: 12.5px; font-weight: 600; color: var(--text); }
.md-box { border-radius: 12px; padding: 20px 24px; }
.md { font-size: 13px; line-height: 1.8; }
.md h1, .md h2, .md h3, .md h4 { font-size: 14px; color: var(--text); margin: 16px 0 6px; padding-left: 9px; border-left: 3px solid var(--accent); }
.md h2:first-child, .md h1:first-child { margin-top: 0; }
.md p { margin: 5px 0; color: var(--text); }
.md ul { margin: 5px 0; padding-left: 20px; }
.md ol { margin: 5px 0; padding-left: 20px; }
.md li { margin: 3px 0; }
.md code { background: rgba(0,0,0,0.06); border-radius: 4px; padding: 1px 5px; font-size: 12px; }
.sum-actions { display: flex; gap: 10px; margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--hairline); }
.hist-item { padding: 10px 4px; cursor: pointer; border-radius: 8px; }
.hist-item + .hist-item { border-top: 1px solid var(--hairline); }
.hist-item .h-range { font-size: 12.5px; font-weight: 700; }
.hist-item .h-meta { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.hist-item.active { background: var(--accent-bg); margin: 0 -8px; padding: 10px 12px; }
.hist-item.active .h-range { color: var(--accent); }

/* ===== 空状态 ===== */
.empty { text-align: center; color: var(--text-3); font-size: 13px; padding: 40px 0; }
.summary-empty { color: var(--text-3); font-size: 13px; padding: 30px 0; text-align: center; }
.summary-error { color: var(--red); font-size: 13px; padding: 20px 0; }

/* ===== 工单详情 / 图片 ===== */
.ticket-detail { margin-top: 8px; background: rgba(0,0,0,0.03); border-radius: 9px; padding: 10px 13px; }
.ticket-line { font-size: 12px; color: var(--text-2); line-height: 1.7; }
.ticket-line b { color: var(--text); margin-right: 4px; }
.ticket-images { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.ticket-thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 1px solid var(--hairline); }
.ticket-qr { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; cursor: pointer; }
.ticket-qr-tip { font-size: 11px; color: var(--text-3); align-self: center; }
.ticket-group-link { color: var(--accent); text-decoration: none; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.ticket-group-link svg { width: 14px; height: 14px; }

/* ===== 图片灯箱 ===== */
.img-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.8); display: none; align-items: center; justify-content: center; z-index: 9999; }
.img-lightbox.show { display: flex; }
.img-lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 8px; }

/* ===== 弹窗 ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.35); display: flex; align-items: center; justify-content: center;
  z-index: 1000; backdrop-filter: blur(4px);
}
.modal {
  background: #fff; border-radius: 14px; width: 680px; max-width: calc(100vw - 48px); max-height: calc(100vh - 80px);
  display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.modal-form { width: 560px; }
.modal-sm { width: 420px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 18px 20px 14px; border-bottom: 1px solid var(--hairline); }
.modal-title { font-size: 16px; font-weight: 700; }
.modal-sub { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.icon-btn { width: 28px; height: 28px; border-radius: 7px; border: none; background: transparent; color: var(--text-2); cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: rgba(0,0,0,0.06); }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--hairline); display: flex; align-items: center; justify-content: space-between; }

/* 表单 */
.form-item { margin-bottom: 14px; }
.form-item:last-child { margin-bottom: 0; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.form-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-inline .form-item { margin-bottom: 14px; }
input[type="text"], input[type="number"], input[type="date"], textarea, select {
  width: 100%; border: 1px solid var(--hairline-strong); border-radius: 8px; padding: 8px 10px;
  font-size: 13px; font-family: inherit; color: var(--text); background: #fff; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,122,255,0.12); }
textarea { resize: vertical; }
.workload-group { display: flex; gap: 8px; }
.workload-group input { flex: 1; }
.workload-group select { width: 90px; flex-shrink: 0; }
.paste-hint { font-size: 11px; color: var(--text-3); margin: 6px 0; }
.paste-thumbs { display: flex; gap: 8px; flex-wrap: wrap; min-height: 8px; }
.thumb-item { position: relative; }
.thumb-img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 1px solid var(--hairline); }
.thumb-del { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; border: none; background: var(--red); color: #fff; font-size: 11px; cursor: pointer; line-height: 1; }
.ticket-fields { border-top: 1px dashed var(--hairline); padding-top: 14px; margin-top: 4px; }
.backup-desc { font-size: 12px; color: var(--text-2); margin-bottom: 10px; }
.backup-divider { height: 1px; background: var(--hairline); margin: 18px 0; }

/* TAPD 导入 */
.modal-toolbar { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--hairline); }
.filter-tabs { display: flex; gap: 4px; }
.filter-tabs button { font-size: 12px; padding: 5px 12px; border-radius: 7px; border: none; background: transparent; color: var(--text-2); cursor: pointer; font-weight: 500; }
.filter-tabs button.active { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.modal-toolbar input { flex: 1; }
.modal-list { padding: 8px 20px; overflow-y: auto; max-height: 320px; }
.import-item { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 8px; cursor: pointer; }
.import-item + .import-item { border-top: 1px solid var(--hairline); }
.import-item:hover { background: rgba(0,0,0,0.03); }
.import-item.disabled { opacity: 0.5; cursor: default; }
.import-item input[type="checkbox"] { width: 16px; height: 16px; flex-shrink: 0; }
.import-info { flex: 1; min-width: 0; }
.import-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-meta-line { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; align-items: center; }
.import-type { font-size: 10.5px; padding: 1px 7px; border-radius: 8px; font-weight: 600; }
.tapd-story { background: #e8f0fe; color: #1a73e8; }
.tapd-task { background: #e6f7ee; color: #16a34a; }
.tapd-bug { background: #fdecec; color: #ef4444; }
.import-status { font-size: 11px; color: var(--text-2); }
.import-priority { font-size: 11px; color: var(--orange); font-weight: 600; }
.import-created { font-size: 11px; color: var(--text-3); }
.imported-badge { font-size: 11px; color: var(--text-3); background: var(--fill-2); padding: 2px 8px; border-radius: 8px; }
.empty-import { text-align: center; color: var(--text-3); padding: 30px 0; font-size: 13px; }
.import-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
.import-meta input[type="date"] { width: 140px; }
.import-meta select { width: 100px; }
.modal-actions { display: flex; gap: 10px; margin-left: auto; }

/* 范围选择 */
.range-picker { display: flex; align-items: center; gap: 10px; }
.range-sep { color: var(--text-3); }

/* ===== 富文本编辑器（Quill）适配 ===== */
.rich-wrap { border: 1px solid var(--hairline-strong); border-radius: 10px; overflow: hidden; background: #fff; }
.rich-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,122,255,0.12); }
.rich-wrap .ql-toolbar { border: none; border-bottom: 1px solid var(--hairline); padding: 6px 8px; }
.rich-wrap .ql-toolbar button { margin: 0 1px; }
.rich-wrap .ql-container { border: none; font-family: inherit; font-size: 13px; }
.rich-wrap .ql-editor { min-height: 110px; max-height: 260px; overflow-y: auto; padding: 10px 12px; }
.rich-wrap .ql-editor.ql-blank::before { color: var(--text-3); font-style: normal; }
.rich-wrap .ql-snow .ql-stroke { stroke: var(--text-2); }
.rich-wrap .ql-snow .ql-fill { fill: var(--text-2); }

/* 富文本内容渲染（列表/标题在展示处正常显示） */
/* Quill 2 列表：ol 内 li 靠 data-list 区分类型，展示处与编辑器渲染保持一致 */
.rich-content ul, .rich-content ol { list-style: none; margin: 4px 0; padding-left: 20px; counter-reset: ql; }
.rich-content li { margin: 2px 0; }
.rich-content li[data-list="bullet"]::before { content: '•'; display: inline-block; width: 14px; margin-left: -14px; }
.rich-content li[data-list="ordered"]::before { content: counter(ql) '.'; counter-increment: ql; display: inline-block; width: 20px; margin-left: -20px; }
.rich-content h1, .rich-content h2, .rich-content h3 { margin: 6px 0 4px; font-size: 13.5px; }
.rich-content p { margin: 0; }

/* ===== 按钮小尺寸 & 危险色 ===== */
.btn-sm { font-size: 12px; padding: 4px 12px; }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: rgba(255,59,48,0.08); }

/* ===== 竞品调研 ===== */
.comp-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 20px; }
.comp-card { border-radius: 12px; padding: 14px 16px; cursor: pointer; transition: box-shadow .15s, border-color .15s; border: 1px solid rgba(255,255,255,0.7); }
.comp-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.08); }
.comp-card.active { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,122,255,0.12); }
.comp-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.comp-name { font-size: 14px; font-weight: 700; letter-spacing: -.2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comp-status { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 8px; flex-shrink: 0; }
.comp-cat { font-size: 12px; color: var(--text-2); margin-top: 5px; }
.comp-stars { font-size: 13px; color: #f5b301; margin-top: 6px; letter-spacing: 1px; }
.comp-count { font-size: 11px; color: var(--text-3); margin-top: 8px; }

.comp-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.comp-detail-left, .comp-detail-right { border-radius: 12px; padding: 16px 18px; }
.comp-detail-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.comp-detail-title { font-size: 14px; font-weight: 700; }

.comp-record { padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.comp-record:last-child { border-bottom: none; }
.comp-record-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.comp-dim-pill { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 8px; flex-shrink: 0; }
.comp-record-date { font-size: 11px; color: var(--text-3); }
.comp-record-content { font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; word-break: break-word; }
.comp-record-imgs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.comp-record-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 1px solid var(--hairline); }
.comp-record-ops { display: flex; gap: 8px; margin-top: 8px; }

.comp-matrix-sub { font-size: 11px; color: var(--text-3); margin: 2px 0 12px; }
.comp-matrix { width: 100%; border-collapse: collapse; font-size: 12px; }
.comp-matrix th, .comp-matrix td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.comp-matrix th { color: var(--text-2); font-weight: 700; }
.comp-matrix td { color: var(--text); overflow-wrap: anywhere; word-break: break-word; }
.comp-dim { white-space: nowrap; }
.comp-matrix-tip { font-size: 11px; color: var(--text-3); margin-top: 10px; }

/* ===== 需求排期（甘特图） ===== */
.sc-split { display: grid; grid-template-columns: 280px 1fr; gap: 18px; align-items: start; }
.sc-split > div { min-width: 0; }

/* 左：需求列表 */
.sc-side-title { font-size: 14px; font-weight: 700; }
.sc-side-sub { font-size: 11.5px; color: var(--text-3); margin: 3px 0 12px; }
.sc-demand-card { position: relative; background: rgba(255,255,255,0.75); border: 1px solid rgba(255,255,255,0.8); border-radius: 11px; padding: 13px 14px; margin-bottom: 10px; cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.sc-demand-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.07); }
.sc-demand-card.active { border-color: var(--accent); background: var(--accent-bg); box-shadow: 0 0 0 3px rgba(0,122,255,0.10); }
.sc-demand-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sc-demand-name { font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-demand-top-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.sc-demand-meta { font-size: 11.5px; color: var(--text-2); margin-top: 6px; }

/* 右：甘特图 */
.sc-gantt { border-radius: 12px; padding: 16px 18px 20px; }
.sc-gantt-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sc-gantt-title { font-size: 14px; font-weight: 700; }
.sc-gantt-range { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.sc-legend { display: flex; gap: 14px; }
.sc-legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-2); font-weight: 600; }
.sc-legend-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sc-legend-dot.done { background: #16a34a; }
.sc-legend-dot.doing { background: #1a73e8; }
.sc-legend-dot.todo { background: #e5e7eb; }
.sc-legend-dot.late { background: #ef4444; }

.sc-gantt-chart { display: flex; margin-top: 10px; }
.sc-gantt-side { flex-shrink: 0; width: 150px; }
.sc-gantt-side-head { border-bottom: 1px solid var(--hairline); }
.sc-gantt-side-row { display: flex; align-items: center; border-bottom: 1px solid var(--hairline); }
.sc-gantt-demand { padding: 0 8px 0 0; min-width: 0; }
.sc-gantt-demand-name { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-gantt-demand-sub { font-size: 10.5px; color: var(--text-3); margin-top: 2px; }

.sc-gantt-timeline { flex: 1; min-width: 0; position: relative; }
.sc-gantt-scale { position: relative; border-bottom: 1px solid var(--hairline); }
.sc-gantt-month { position: absolute; top: 4px; font-size: 11.5px; font-weight: 700; color: var(--text-2); transform: translateX(-50%); }
.sc-gantt-tick { position: absolute; bottom: 3px; font-size: 10px; color: var(--text-3); transform: translateX(-50%); white-space: nowrap; }

.sc-gantt-rows { position: relative; }
.sc-gantt-gridline { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(0,0,0,0.045); }
.sc-gantt-row { position: relative; border-bottom: 1px solid var(--hairline); }
.sc-gantt-row.alt { background: rgba(0,0,0,0.015); }
.sc-gantt-row:last-of-type { border-bottom: none; }

.sc-bar { position: absolute; top: 50%; transform: translateY(-50%); height: 24px; border-radius: 6px; display: flex; align-items: center; padding: 0 8px; overflow: hidden; z-index: 2; }
.sc-bar-text { flex: 1 1 auto; min-width: 0; font-size: 10.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-bar.st-done { background: #16a34a; }
.sc-bar.st-done .sc-bar-text { color: #fff; }
.sc-bar.st-doing { background: #1a73e8; }
.sc-bar.st-doing .sc-bar-text { color: #fff; }
.sc-bar.st-todo { background: #f1f3f7; border: 1px solid var(--hairline-strong); }
.sc-bar.st-todo .sc-bar-text { color: #6b7280; }
.sc-bar.st-late { background: #ef4444; }
.sc-bar.st-late .sc-bar-text { color: #fff; }

/* 阶段起止日期标注：条内两端 */
.sc-bar-end { flex-shrink: 0; margin-left: 6px; font-size: 10px; font-weight: 600; white-space: nowrap; color: var(--text-3); }
.sc-bar-end:first-child { margin-left: 0; margin-right: 4px; }
.sc-bar.st-done .sc-bar-end, .sc-bar.st-doing .sc-bar-end, .sc-bar.st-late .sc-bar-end { color: rgba(255,255,255,0.85); }

.sc-gantt-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--red); z-index: 3; pointer-events: none; }
.sc-gantt-today-label { position: absolute; bottom: -16px; transform: translateX(-50%); font-size: 10.5px; font-weight: 700; color: var(--red); white-space: nowrap; z-index: 4; pointer-events: none; }

/* 编辑需求排期弹窗：阶段列表 + 新增阶段 */
.sc-stage-section { border-top: 1px dashed var(--hairline); padding-top: 14px; margin-top: 4px; }
.sc-stage-list { margin-bottom: 4px; }
.sc-stage-empty { font-size: 12px; color: var(--text-3); padding: 12px 0; text-align: center; }
.sc-stage-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: rgba(0,0,0,0.03); border-radius: 9px; padding: 10px 13px; margin-bottom: 8px; cursor: pointer; }
.sc-stage-item:hover { background: rgba(0,0,0,0.055); }
.sc-stage-info { min-width: 0; }
.sc-stage-name { font-size: 13px; font-weight: 600; }
.sc-stage-range { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.sc-stage-add { border: 1.5px solid rgba(0,122,255,0.45); border-radius: 11px; padding: 13px 14px; margin-top: 6px; background: rgba(0,122,255,0.03); }
.sc-stage-add-title { font-size: 12.5px; font-weight: 700; color: var(--accent); margin-bottom: 10px; }
.sc-stage-add .range-picker { margin: 10px 0; }
.sc-stage-add-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sc-stage-add-foot select { width: 130px; flex-shrink: 0; }
