/* 批注看板 · 共享样式（Phase 5 批四从 weekly.css 抽出；周报 weekly.html 与月报 finance.html 共挂）。
   与 notes-board.js 配套：.nb-tools 工具条 / .nb-scroll 卡片区 / .nb-card 卡片 / 回复区 / 操作区。
   ⚠️ 依赖页面自己的主题变量（--panel / --border / --muted / --accent / --accent-soft / --hover / --danger / --text / --bg），
   两个页面都由 app.css 提供。改这里要 bump 两个 html 的 ?v=。
   ⛔ 周报特有的 .wk-notes / .wk-btn-notes / .hs-pop-foot 留在 weekly.css；月报特有的 .fn-* 在 finance.css。 */

.nb-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
            padding: 10px 18px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.nb-tools select, .nb-tools input[type="search"] {
  padding: 5px 9px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--panel); color: inherit; font-size: 13px; }
.nb-tools input[type="search"] { min-width: 200px; }

/* 卡片区。max-height 必须自己定：本视图整屏就这一块，不能吃 .table-scroll 那套限高 */
.nb-scroll { flex: 1; min-height: 0; overflow: auto; padding: 14px 18px 40px; }
.nb-scroll .empty { color: var(--muted); font-size: 13px; text-align: center;
                    padding: 48px 20px; line-height: 1.8; }

.nb-section + .nb-section { margin-top: 22px; }
.nb-section-head { font-size: 13px; font-weight: 700; color: var(--muted);
                   margin: 0 0 10px; display: flex; align-items: center; gap: 7px; }
.nb-section-n { font-weight: 600; color: var(--accent); background: var(--accent-soft);
                border-radius: 999px; padding: 1px 9px; font-size: 12px; }

/* 自适应铺排：窄屏一列、宽屏多列。卡片高度由内容定（内容长度不设限是已知取舍，
   撑高一张卡片好过截断掉运营写的话）。 */
.nb-cards { display: grid; gap: 12px;
            grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.nb-card { border: 1px solid var(--border); border-radius: 12px; padding: 11px 13px;
           background: var(--panel); display: flex; flex-direction: column; gap: 7px; }
.nb-card-head { display: flex; align-items: flex-start; gap: 10px; }
.nb-card-name { font-size: 13.5px; font-weight: 600; line-height: 1.45; flex: 1;
                min-width: 0; word-break: break-word; }
.nb-week { font-size: 12px; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.nb-card-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
                font-size: 11.5px; color: var(--muted); }
.nb-asin { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
/* 第 6 项：ASIN 真链接 + 「+」看历史小圆钮（约 18px；元信息行本就 flex 换行，340px 最窄卡片放得下） */
a.nb-asin { color: var(--accent); text-decoration: none; }
a.nb-asin:hover { text-decoration: underline; }
/* ⚠️ 「+」居中不能靠 line-height 硬凑（字形基线偏下，实看落在圆圈中下部，Aaron 09-03 指出）：
   用 inline-flex 双向居中 + line-height:1，字形按盒子几何中心摆，与字体度量无关。 */
.nb-hist { display: inline-flex; align-items: center; justify-content: center;
           width: 18px; height: 18px; margin-left: 4px; padding: 0 0 1px; box-sizing: border-box;
           line-height: 1; font-size: 14px; font-weight: 500; border-radius: 50%;
           border: 1px solid var(--accent); color: var(--accent); background: none;
           cursor: pointer; vertical-align: middle; flex-shrink: 0; }
.nb-hist:hover { background: var(--accent-soft); }
/* 第 6 项：工具行的「只看他人」勾选与组员范围说明 */
.nb-check { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px;
            color: var(--muted); white-space: nowrap; cursor: pointer; }
.nb-scope-note { font-size: 12px; color: var(--muted); white-space: nowrap; }
.nb-mode-toggle { white-space: nowrap; }
.nb-vis { border: 1px solid var(--border); border-radius: 999px; padding: 1px 7px; }
.nb-vis.vis-group { color: var(--accent); border-color: var(--accent); }
/* 预警芯片：有内容才是可点的强调色，与历史页 .hs-cell-btn.has 同一套视觉语言 */
.nb-alert-chip { font-size: 11.5px; color: var(--accent); font-weight: 600;
                 border: 1px solid var(--accent); border-radius: 999px; padding: 1px 8px;
                 background: none; }
.nb-alert-chip:hover { background: var(--accent-soft); }
/* 「无预警」与「该周数据暂不可查」必须长得不一样 —— 前者是事实，后者是查不到，
   合并成一个安静的短横会让用户把两件事读成一件（§3.2 那条 has_metrics 分支）。 */
.nb-noalert { font-size: 11.5px; color: var(--muted); }
/* 用 --danger（两个主题都有定义）而不是自造一个 --warn：这里要的是"扎眼到会被追问"，
   而项目里没有告警色变量，现造一个只会多一处两主题都要维护的定义。 */
.nb-nodata { font-size: 11.5px; color: var(--danger); border: 1px dashed currentColor;
             border-radius: 999px; padding: 1px 8px; }
.nb-card-body { font-size: 13px; line-height: 1.65; white-space: pre-wrap;
                word-break: break-word; }
.nb-card-foot { font-size: 11px; color: var(--muted); }

               font-size: 12px; }
@media (max-width: 1080px) {
  .nb-cards { grid-template-columns: 1fr; }
  .nb-tools input[type="search"] { min-width: 140px; flex: 1; }
}

/* ── 看板卡片内的回复区（15a 批二）────────────────────────────────
   卡片布局是批一就做好的（裁决 11 正是为了这一步），这里只往里加一块，不重做。 */
.nb-card-foot { display: flex; align-items: center; gap: 7px; }
.nb-who { font-weight: 600; color: var(--text); }
/* 卡片操作区（2026-08-17）：改可见性 / 删除。**只有 is_mine 才渲染** ——
   看板上会出现别人写的根（我回复过的那些），无条件渲染就是把删除按钮摆到别人的批注上。
   视觉刻意与面板的 .note-acts 一致（低调的 muted 小按钮）：同一套动作在两个视图里
   长得不一样，会让人以为是两个不同的功能。挂进 .nb-card-foot 里用 margin-left:auto
   推到右端，不另起一行 —— 一屏几十张卡片，每张多一行就多滚一屏。 */
.nb-card-acts { display: flex; gap: 4px; margin-left: auto; }
.nb-card-acts button { font-size: 11px; color: var(--muted); padding: 1px 6px;
                       border-radius: 5px; }
.nb-card-acts button:hover { background: var(--hover); color: var(--text); }
/* 删除是不可逆的，hover 给红色 —— 与旁边的"改可见性"在手感上区分开 */
.nb-card-acts button.nb-danger:hover,
.nb-reply-del:hover { background: var(--hover); color: var(--danger); }
.nb-reply-del { margin-left: auto; font-size: 11px; color: var(--muted);
                padding: 0 5px; border-radius: 5px; }
.nb-card-replies { margin-top: 2px; border-top: 1px dashed var(--border); padding-top: 7px; }
.nb-reply-toggle { font-size: 11.5px; color: var(--muted); padding: 2px 7px;
                   border-radius: 6px; }
.nb-reply-toggle:hover { background: var(--hover); color: var(--accent); }
.nb-reply-list { margin: 7px 0 0 8px; padding-left: 10px;
                 border-left: 2px solid var(--border);
                 display: flex; flex-direction: column; gap: 8px; }
.nb-reply-meta { display: flex; align-items: center; gap: 6px; font-size: 11px;
                 color: var(--muted); margin-bottom: 2px; }
.nb-reply-body { font-size: 12.5px; line-height: 1.6; white-space: pre-wrap;
                 word-break: break-word; }
.nb-reply-input textarea { width: 100%; border: 1px solid var(--border); border-radius: 7px;
                           padding: 6px 8px; background: var(--bg); color: inherit;
                           resize: vertical; font-size: 12.5px; font-family: inherit; }
.nb-reply-btns { display: flex; align-items: center; gap: 8px; margin-top: 5px;
                 font-size: 11px; color: var(--muted); }
.nb-reply-btns label { display: flex; align-items: center; gap: 3px; }
.nb-reply-btns button { margin-left: auto; font-size: 12px; padding: 4px 10px;
                        border: 1px solid var(--accent); border-radius: 7px;
                        color: var(--accent); background: var(--accent-soft); }
.nb-reply-btns button:disabled { opacity: .5; cursor: default; }
