/* ============================================================
   memory-concepts.css — 刀 B-C3：概念工作台（静态壳）
   概念稿 §21.5 / 主线稿 §5.11

   ⚠️ 当前阶段（2026-08-01）：**生产 UI 已挂载 fixture 静态壳**
      （记忆索引台第 4 个 tab）。但边界未松：仍不接真实 route、
      不读概念 service、不接 reader 上下文、不消费 ambiguousAlias，
      数据全部来自注入的 fixture 适配器（见 memory-concepts.js 顶部）。

   规则（沿用 memory-desk.css 的既有约束）：
   - 所有类名 mconcept- 前缀，样式独立维护在本文件；
     style.css 本轮**只**删除了已废弃的旧 Memory Chain `.mc-*` 规则
   - AZOTH 真实主题变量集是 --bg / --text / --card-bg / --accent / --highlight / --shadow；
     --text-primary/--text-secondary/--border 任何主题都没定义。
   - 主文字一律继承 body（主题必然正确），次级文字用 opacity 弱化**不锁颜色**——
     fallback 写错比不写更糟（v1 暗色 fallback 在墟构白底上糊成浅灰的教训）。
   - 🔴 审美红线：**彩色左边条卡片全域禁用**。状态用小圆点 + 文字，不用色条。
   ============================================================ */

.mconcept-root {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    box-sizing: border-box;
    font-size: 14px;
    line-height: 1.6;
}

/* ---- 二级页签：概念 / 待确认 / 处理记录 ---- */
.mconcept-tabs {
    display: flex;
    gap: 2px;
    padding: 0 0 10px;
    border-bottom: 1px solid rgba(var(--accent-rgb, 93, 105, 115), 0.16);
    flex: 0 0 auto;
}

.mconcept-tab {
    appearance: none;
    background: none;
    border: none;
    padding: 7px 14px;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    color: inherit;
    opacity: 0.55;
    font-size: 13px;
    letter-spacing: 0.02em;
    touch-action: manipulation;
}

.mconcept-tab:hover { opacity: 0.8; }

.mconcept-tab.is-active {
    opacity: 1;
    background: rgba(var(--accent-rgb, 93, 105, 115), 0.09);
    box-shadow: inset 0 -2px 0 var(--accent, #5D6973);
}

.mconcept-tab-badge {
    margin-left: 6px;
    font-size: 11px;
    opacity: 0.7;
    font-variant-numeric: tabular-nums;
}

/* ---- 三栏：列表 / 详情 / 抽屉 ---- */
.mconcept-body {
    display: grid;
    grid-template-columns: minmax(240px, 300px) 1fr;
    gap: 16px;
    flex: 1 1 auto;
    min-height: 0;
    padding-top: 12px;
}

.mconcept-pane {
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ---- 列表侧 ---- */
.mconcept-listhead {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.mconcept-search {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(var(--accent-rgb, 93, 105, 115), 0.22);
    background: var(--card-bg, #fff);
    color: inherit;
    font-size: 13px;
}

.mconcept-search::placeholder { color: inherit; opacity: 0.4; }

.mconcept-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mconcept-chip {
    appearance: none;
    border: 1px solid rgba(var(--accent-rgb, 93, 105, 115), 0.22);
    background: none;
    color: inherit;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 12px;
    opacity: 0.6;
    cursor: pointer;
    touch-action: manipulation;
}

.mconcept-chip.is-active {
    opacity: 1;
    background: rgba(var(--accent-rgb, 93, 105, 115), 0.12);
    border-color: rgba(var(--accent-rgb, 93, 105, 115), 0.4);
}

.mconcept-btn {
    appearance: none;
    border: 1px solid rgba(var(--accent-rgb, 93, 105, 115), 0.3);
    background: var(--card-bg, #fff);
    color: inherit;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 13px;
    cursor: pointer;
    touch-action: manipulation;
}

.mconcept-btn:hover { background: rgba(var(--accent-rgb, 93, 105, 115), 0.08); }
.mconcept-btn[disabled] { opacity: 0.4; cursor: default; }
.mconcept-btn-primary { border-color: var(--accent, #5D6973); }

/* 🔴 没有彩色左边条。整卡一个边框，状态靠圆点。 */
.mconcept-item {
    display: block;
    width: 100%;
    text-align: left;
    box-sizing: border-box;
    padding: 10px 12px;
    margin-bottom: 6px;
    border: 1px solid rgba(var(--accent-rgb, 93, 105, 115), 0.16);
    border-radius: 10px;
    background: var(--card-bg, #fff);
    color: inherit;
    cursor: pointer;
    touch-action: manipulation;
}

.mconcept-item:hover { border-color: rgba(var(--accent-rgb, 93, 105, 115), 0.36); }

.mconcept-item.is-selected {
    border-color: var(--accent, #5D6973);
    box-shadow: 0 0 0 1px var(--accent, #5D6973) inset;
}

.mconcept-item-top {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.mconcept-item-name {
    font-weight: 600;
    letter-spacing: 0.01em;
}

.mconcept-item-sense {
    display: block;
    margin-top: 2px;
    font-size: 12.5px;
    opacity: 0.62;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mconcept-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
    font-size: 11.5px;
    opacity: 0.55;
    font-variant-numeric: tabular-nums;
}

/* 状态点：只用透明度与形状区分，不引入第二套色板 */
.mconcept-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex: 0 0 auto;
    transform: translateY(-1px);
}

.mconcept-dot.is-active { opacity: 0.85; }
.mconcept-dot.is-candidate { opacity: 0.45; }
.mconcept-dot.is-stale { opacity: 0.85; border-radius: 1px; }   /* 方点 = 需更新 */
.mconcept-dot.is-hidden { opacity: 0.28; }

.mconcept-badge {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 999px;
    border: 1px solid rgba(var(--accent-rgb, 93, 105, 115), 0.28);
    font-size: 11px;
    opacity: 0.75;
}

/* ---- 详情侧 ---- */
.mconcept-detail-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(var(--accent-rgb, 93, 105, 115), 0.16);
}

.mconcept-title {
    font-size: 19px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.01em;
}

.mconcept-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
    flex-wrap: wrap;
}

.mconcept-section { margin-top: 18px; }

.mconcept-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    opacity: 0.8;
    margin-bottom: 8px;
}

.mconcept-note {
    font-size: 11.5px;
    opacity: 0.55;
    font-weight: 400;
}

/* 「系统整理，不是原话」——这条标识不允许被样式弱化到看不见 */
.mconcept-derived-tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    border: 1px dashed rgba(var(--accent-rgb, 93, 105, 115), 0.5);
    font-size: 11px;
    opacity: 0.85;
}

.mconcept-prose {
    background: var(--card-bg, #fff);
    border: 1px solid rgba(var(--accent-rgb, 93, 105, 115), 0.16);
    border-radius: 10px;
    padding: 12px 14px;
    white-space: pre-wrap;
}

.mconcept-prose.is-empty { opacity: 0.5; font-style: italic; }

.mconcept-sense {
    border: 1px solid rgba(var(--accent-rgb, 93, 105, 115), 0.16);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: var(--card-bg, #fff);
}

.mconcept-sense-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.mconcept-member {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid rgba(var(--accent-rgb, 93, 105, 115), 0.14);
    border-radius: 9px;
    margin-bottom: 6px;
    background: var(--card-bg, #fff);
}

.mconcept-member-main { flex: 1 1 auto; min-width: 0; }

.mconcept-member-summary {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mconcept-member-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
    font-size: 11.5px;
    opacity: 0.55;
}

/* 反例区不允许折叠进「更多」——否则概念卡只积累支持不积累修正 */
.mconcept-counter {
    border: 1px solid rgba(var(--accent-rgb, 93, 105, 115), 0.3);
    border-radius: 10px;
    padding: 10px 12px;
}

.mconcept-empty {
    padding: 26px 16px;
    text-align: center;
    opacity: 0.55;
    font-size: 13px;
}

.mconcept-empty-hint { margin-top: 6px; font-size: 12px; opacity: 0.8; }

/* 静态壳横幅：真接线之前必须一眼看出来这不是真数据 */
.mconcept-shellbar {
    flex: 0 0 auto;
    margin-bottom: 10px;
    padding: 7px 11px;
    border: 1px dashed rgba(var(--accent-rgb, 93, 105, 115), 0.5);
    border-radius: 8px;
    font-size: 12px;
    opacity: 0.8;
}

/* ---- 窄屏：不并排，逐层推入 ---- */
@media (max-width: 780px) {
    .mconcept-body {
        grid-template-columns: 1fr;
    }

    .mconcept-pane-detail {
        display: none;
    }

    .mconcept-root.is-detail .mconcept-pane-list { display: none; }
    .mconcept-root.is-detail .mconcept-pane-detail { display: block; }

    .mconcept-back {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        margin-bottom: 8px;
    }
}

@media (min-width: 781px) {
    .mconcept-back { display: none; }
}
