/* =====================================================================
 * 公司战略复盘和拆解系统 - 全局样式
 * 视觉规范：墨绿国企稳重风（基于 04_视觉规范.md）
 * 制定日期：2026-08-07
 * ===================================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

/* ========== CSS 变量：墨绿系主色 ========== */
:root {
    /* 主色（墨绿系） */
    --primary:        #1F4E3D;   /* 墨绿 - 按钮、表头、卡片标题、主折线 */
    --primary-dark:   #173B2F;   /* 深墨绿 - 雷达实线、表头深底 */
    --primary-darkest:#0F2B22;   /* 最深墨绿 - 顶部渐变起点 */
    --primary-light:  #2A624E;   /* 亮墨绿 - 顶部渐变亮部 */

    /* 强调色（金棕系） */
    --accent:         #B08D57;   /* 金棕 - 数字、徽章、竖条、虚线、峰值标记 */
    --accent-deep:    #A0522D;   /* 赭红 - 改进建议左边线、复盘类图例 */

    /* 背景与表面 */
    --bg:             #F7F3EA;   /* 米白 - 页面背景 */
    --card:           #FDFCF8;   /* 米白偏白 - 内容卡片背景 */
    --border:         #E3DCCB;   /* 暖灰 - 卡片边框、表格分隔线 */
    --zebra:          #F9F6EE;   /* 极浅米 - 表格斑马纹 */
    --row-hover:      #F2EDE0;   /* 浅米 - 表格行hover */
    --grid-line:      #EFE9DC;   /* 网格底色 */
    --grid-outer:     #C9BCA0;   /* 最外层网格 */
    --upload-bg:      #FAF6EC;
    --upload-border:  #C9BCA0;

    /* 文字色 */
    --text:           #3A3530;   /* 深褐灰 - 正文 */
    --text-mid:       #5A5249;   /* 中褐灰 - 标签、字段说明 */
    --text-light:     #8A8278;   /* 浅褐灰 - 副标题、备注、日期 */

    /* 状态色 */
    --success:        #2E7D5B;   /* 成功绿 - 优秀徽章、优点圆点 */
    --danger:         #B0403A;   /* 失败红 - 待改进徽章、不足圆点 */
    --warning:        #B08D57;   /* 良好（与金棕一致） */
    --info:           #6E8B7E;   /* 灰绿 - 提案类图例 */

    /* 暖色按钮 hover */
    --btn-hover-light:#D8CFBC;   /* 幽灵按钮边框色 */

    /* 字体 */
    --font: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Hiragino Sans GB",
            "Noto Sans SC", "WenQuanYi Micro Hei", sans-serif;

    /* 圆角 */
    --radius:    3px;
    --radius-lg: 4px;

    /* 布局 */
    --header-h:  64px;
    --sidebar-w: 230px;
    --content-max-width: 1280px;
    --page-min-width: 1100px;

    /* 阴影 */
    --shadow: 0 1px 3px rgba(15,43,34,0.05);
}

html, body {
    height: 100%;
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    /* v261008_001 Web版：取消页面最小宽度限制，支持移动端（窄屏走抽屉式侧栏，见底部响应式） */
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-light); }

/* ========== 滚动条 ========== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #C9BCA0; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ============================================================
 * 3.1 顶部导航 - 64px / 墨绿渐变 / 3px金棕底边
 * ============================================================ */
#app-header {
    height: var(--header-h);
    background: linear-gradient(135deg, var(--primary-darkest) 0%, var(--primary) 50%, var(--primary-light) 100%);
    border-bottom: 3px solid var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    box-shadow: 0 2px 6px rgba(15,43,34,0.18);
}
.header-left { display: flex; align-items: center; gap: 12px; }
.header-brand-logo { width: 38px; height: 38px; flex-shrink: 0; }
.header-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.header-left h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #fff;
    margin: 0;
}
.header-subtitle {
    font-size: 11px;
    color: rgba(176,141,87,0.85);
    margin-top: 2px;
    letter-spacing: 1px;
}
.version {
    font-size: 11px;
    color: rgba(255,255,255,0.85);
    background: rgba(176,141,87,0.22);
    padding: 3px 9px;
    border-radius: 3px;
    border: 1px solid rgba(176,141,87,0.4);
}
.header-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.api-status {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 3px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.12);
}
.api-status.ok { background: rgba(46,125,91,0.32); color: #fff; }
.api-status.err { background: rgba(176,64,58,0.32); color: #fff; }

/* 顶部按钮（与下方通用按钮联动） */
#app-header .btn { background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.15); }
#app-header .btn:hover { background: rgba(255,255,255,0.16); color: #fff; }

/* ============================================================
 * 主容器
 * ============================================================ */
#app-container {
    display: flex;
    padding-top: var(--header-h);
    height: 100vh;
}

/* ============================================================
 * 3.x 左侧导航侧栏（保留侧栏布局，应用墨绿稳重风）
 * ============================================================ */
#sidebar {
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    background: var(--card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding-bottom: 18px;
    flex-shrink: 0;
    transition: width .18s ease, min-width .18s ease;
}

/* ---------- 侧栏收展（v260907_003：边缘把手按钮，状态记忆localStorage） ---------- */
#app-container { position: relative; }
#sidebar-toggle {
    position: absolute;
    top: 84px;
    left: calc(var(--sidebar-w) - 9px);
    z-index: 80;
    width: 18px;
    height: 46px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    color: var(--text-light);
    font-size: 11px;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.10);
    transition: left .18s ease, transform .18s ease;
    padding: 0;
    line-height: 1;
}
#sidebar-toggle:hover { color: var(--primary); border-color: var(--primary); }
#app-container.sb-collapsed #sidebar-toggle { left: 37px; transform: rotate(180deg); }
#app-container.sb-collapsed #sidebar { width: 46px; min-width: 46px; }
/* 收起态：隐藏步骤文字与复盘选择器，仅留序号圆点（font-size:0 技巧隐藏裸文本节点） */
#app-container.sb-collapsed #sidebar li { font-size: 0; }
#app-container.sb-collapsed #sidebar .step-indicator { font-size: 12px; }
#app-container.sb-collapsed #sidebar .nav-phase { font-size: 0; border-bottom: none; padding: 5px 0; }
#app-container.sb-collapsed #sidebar .nav-phase::after { content: '·'; font-size: 10px; color: var(--text-light); }
#app-container.sb-collapsed .review-selector select,
#app-container.sb-collapsed .review-selector .review-actions { display: none; }
#app-container.sb-collapsed #sidebar li[data-step] { padding: 7px 0; justify-content: center; }
#app-container.sb-collapsed #sidebar li[data-step] .step-indicator { margin: 0; }
.review-selector {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
    background: #FBF7EC;
}
.review-selector select {
    width: 100%;
    font-size: 12.5px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
    font-family: inherit;
}
.review-selector select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(31,78,61,0.14);
}
.review-actions { display: flex; gap: 4px; }
.review-actions .btn { flex: 1; justify-content: center; }

/* 左侧步骤导航：公司级 #step-nav 与部门级 #dept-step-nav 共用同一视觉（v260828_003） */
#step-nav, #dept-step-nav { list-style: none; padding: 10px 0; }
#step-nav li, #dept-step-nav li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-light);
    border-left: 3px solid transparent;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;      /* v261112007：侧栏步骤名一律单行，超长裁切不换行 */
    overflow: hidden;
}
#step-nav li:hover, #dept-step-nav li:hover { background: var(--row-hover); color: var(--text); }
#step-nav li.active, #dept-step-nav li.active {
    color: var(--primary);
    font-weight: 600;
    background: rgba(31,78,61,0.06);
    border-left-color: var(--accent);
}
#step-nav li.done, #dept-step-nav li.done { color: var(--success); }
#step-nav li.done .step-indicator, #dept-step-nav li.done .step-indicator { background: var(--success); color: #fff; }
.step-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 3px;
    font-size: 12px;
    background: var(--grid-line);
    color: var(--text-light);
    flex-shrink: 0;
    font-weight: 600;
}
#step-nav li.active .step-indicator, #dept-step-nav li.active .step-indicator { background: var(--primary); color: #fff; }

/* ============================================================
 * 右侧内容区（最大1280px居中）
 * ============================================================ */
#content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    /* v261102019：底部留白 34px → 12px。版权行搬去侧栏后，这 34px 变成按钮下面一条纯空带
       （用户截图：底栏比按钮本身还高）。12px 刚好让按钮不贴窗口边，又不再白占一截。 */
    padding: 22px 24px 12px;
    overflow: hidden;
    min-width: 0;
}
#content-area > * { max-width: var(--content-max-width); width: 100%; margin-left: auto; margin-right: auto; }
#step-content { flex: 1; min-height: 0; overflow-y: auto; padding-right: 4px; }
#step-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0 0;
    border-top: 1px solid var(--border);
    gap: 10px;
    flex-shrink: 0;
    margin-top: 12px;
}

/* ============================================================
 * 3.2 页面标题区 - 左侧5px金棕竖条
 * ============================================================ */
.page-title {
    border-left: 5px solid var(--accent);
    padding-left: 12px;
    margin-bottom: 16px;
}
.page-title h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-dark);
    letter-spacing: 1px;
    line-height: 1.2;
}
.page-title .subtitle {
    font-size: 12.5px;
    color: var(--text-light);
    margin-top: 3px;
}

/* ============================================================
 * 3.3 卡片
 * ============================================================ */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    margin-bottom: 16px;
}
.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 14px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-title .subtitle {
    font-size: 12px;
    color: var(--text-light);
    margin-left: 8px;
    font-weight: 400;
}
.card-body { font-size: 14px; line-height: 1.65; color: var(--text); }

/* ============================================================
 * 3.4 统计卡片 - 左侧5px金棕竖条
 * ============================================================ */
.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 5px solid var(--accent);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.stat-card .stat-icon { font-size: 26px; flex-shrink: 0; opacity: 0.85; }
.stat-card .stat-num {
    font-size: 30px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}
.stat-card .stat-label { font-size: 13px; color: var(--text-mid); margin-top: 4px; }

/* ============================================================
 * 3.5 按钮 - 4种样式（primary/outline/accent/ghost）
 * ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    transition: filter 0.2s, background 0.2s, border-color 0.2s;
    white-space: nowrap;
    line-height: 1.2;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:active { filter: brightness(0.95); }

.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { filter: brightness(1.08); }
.btn-accent:active { filter: brightness(0.95); }

.btn-outline { background: #fff; border: 1px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: rgba(31,78,61,0.06); }
.btn-outline:active { filter: brightness(0.95); }

.btn-ghost { background: transparent; border: 1px solid var(--btn-hover-light); color: var(--text-mid); }
.btn-ghost:hover { background: rgba(0,0,0,0.03); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(1.08); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); }
.btn-info { background: var(--info); color: #fff; }

.btn-sm { padding: 4px 11px; font-size: 12.5px; }
.btn-xs { padding: 3px 8px; font-size: 11px; font-weight: 600; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; filter: none !important; }

/* ============================================================
 * 3.8 表单
 * ============================================================ */
.form-group { margin-bottom: 14px; }
.form-group label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-mid);
    margin-bottom: 5px;
}
.form-group textarea,
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13.5px;
    font-family: inherit;
    background: #fff;
    color: var(--text);
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group textarea:focus,
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(31,78,61,0.14);
}
.form-group textarea { min-height: 70px; line-height: 1.6; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* 上传区 */
.upload-area {
    border: 1.5px dashed var(--upload-border);
    background: var(--upload-bg);
    padding: 18px;
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.upload-area:hover { background: #F5EFDF; border-color: var(--accent); }

/* ============================================================
 * 3.6 表格
 * ============================================================ */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #fff;
    border: 1px solid var(--border);
}
th, td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #E7E0CF;
    border-left: 1px solid #E7E0CF;   /* v261015_005：补竖线（列分隔更清晰） */
}
th {
    background: var(--primary);
    color: #F5F1E8;
    font-size: 12.5px;
    font-weight: 600;
}
/* v261015_005：每行首列补左线（border-collapse下首列无边线），末列右线由表格外框补 */
th:first-child, td:first-child { border-left: none; }
table { border-right: 1px solid var(--border); }
tbody tr:nth-child(even) { background: var(--zebra); }
tbody tr:hover { background: var(--row-hover); }
table tbody tr:last-child td { border-bottom: none; }
td.num, th.num { font-weight: 700; color: var(--accent); }

/* v261022010 起：表单型密集表格（战略目标 / 年度关键措施 / BSC / 月度 / KPI 月度…）
   全局 td 是 padding:8px 12px + vertical-align:middle，表单密集型表格里显得又松又散。
   v261022012 版式规范（用户口径）：
     · 方框横纵向整齐、大小一致  → 单行控件统一 26px 高，单元格 padding 收到 4px/6px；
     · 字数少的列靠左、上下居中  → vertical-align:middle（不再 top 对齐，避免底部留白）；
     · 字数特别多的列留宽        → 由各表 width / min-width 单独给（见 js 里的表头）；
     · 行数超过三行用滚动条      → textarea 限高 66px（≈3 行）+ overflow-y:auto，不再无限撑高整行。 */
table.compact-table th,
table.compact-table td { padding: 4px 6px; vertical-align: middle; }
table.compact-table th { vertical-align: middle; }
table.compact-table td:first-child,
table.compact-table th:first-child { padding-left: 8px; }
/* 单行控件等高：同一行里的方框才对得齐 */
table.compact-table td > input:not([type="date"]):not([type="checkbox"]):not([type="radio"]),
table.compact-table td > select {
    height: 26px;
    padding: 2px 6px;
    box-sizing: border-box;
}
/* textarea 不设 border-box：高度是按 scrollHeight（含 padding、不含 border）算的，
   改成 border-box 会让内容区少算上下 padding，反而多出滚动条 */
table.compact-table td > textarea {
    margin: 0;
    max-height: 66px;          /* ≈3 行，超过用上下滚动条 */
    overflow-y: auto;
}
/* 三行以内不显示滚动条，视觉更干净 */
table.compact-table td > textarea::-webkit-scrollbar { width: 8px; }

/* ============================================================
 * 3.7 徽章 - 4级
 * ============================================================ */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    line-height: 1.5;
}
.badge-excellent { background: var(--success); }
.badge-good      { background: var(--accent); }
.badge-pass      { background: var(--text-light); }
.badge-poor      { background: var(--danger); }

/* ============================================================
 * 3.11 标签（Tag）
 * ============================================================ */
.tag {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.6;
}
.tag-default { background: #F1EBDE; color: var(--text-mid); }
.tag-type    { background: #E9F0EA; color: var(--primary); }
.tag-cadre-a { background: #F4ECDB; color: #8A6D3F; }
.tag-cadre-b { background: #F1E3E1; color: #8C4A26; }

/* gen-tag 兼容旧调用，复用tag样式 */
.gen-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 11px;
    background: #E9F0EA;
    color: var(--primary);
    font-weight: 600;
}

/* ============================================================
 * 3.12 改进建议框
 * ============================================================ */
.suggestion-box {
    border-left: 4px solid var(--accent-deep);
    background: #FBF6EC;
    border-radius: var(--radius);
    padding: 12px 16px;
    margin: 10px 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text);
}
.suggestion-box .suggestion-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-deep);
    margin-bottom: 6px;
}

/* 优点/不足列表圆点 */
.list-pro { list-style: none; padding-left: 4px; }
.list-pro li, .list-con li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 6px;
    line-height: 1.7;
}
.list-pro li::before {
    content: '';
    position: absolute;
    left: 0; top: 8px;
    width: 8px; height: 8px;
    background: var(--success);
}
.list-con { list-style: none; padding-left: 4px; }
.list-con li::before {
    content: '';
    position: absolute;
    left: 0; top: 8px;
    width: 8px; height: 8px;
    background: var(--danger);
}

/* ============================================================
 * 3.9 评分维度条
 * ============================================================ */
.dim-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed #E9E2D3;
}
.dim-bar .dim-name {
    width: 92px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    flex-shrink: 0;
}
.dim-bar .dim-blocks { display: flex; gap: 3px; }
.dim-bar .dim-block {
    width: 20px;
    height: 20px;
    border: 1px solid #D8CFBC;
    border-radius: 2px;
    background: #fff;
}
.dim-bar .dim-block.filled { background: var(--primary); border-color: var(--primary); }
.dim-bar .dim-block.highlight { background: var(--accent); border-color: var(--accent); }
.dim-bar .dim-score {
    width: 36px;
    text-align: right;
    font-weight: 700;
    color: var(--accent);
    font-size: 13px;
}
.dim-bar .dim-reason { flex: 1; font-size: 13px; color: var(--text); line-height: 1.5; }

/* ============================================================
 * 3.10 排行榜
 * ============================================================ */
.leaderboard-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.leaderboard-row .rank-badge {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: var(--text-light);
    flex-shrink: 0;
}
.leaderboard-row .rank-badge.top-1 { background: var(--accent); }
.leaderboard-row .rank-badge.top-2 { background: var(--primary); }
.leaderboard-row .rank-badge.top-3 { background: var(--info); }
.leaderboard-row .name { width: 90px; font-size: 13px; font-weight: 600; color: var(--text); }
.leaderboard-row .bar-wrap {
    flex: 1;
    height: 20px;
    background: var(--grid-line);
    border-radius: var(--radius);
    overflow: hidden;
}
.leaderboard-row .bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, #3E8466 100%);
    border-radius: var(--radius);
    transition: width 0.5s ease;
}
.leaderboard-row .score {
    width: 88px;
    text-align: right;
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
}

/* ============================================================
 * 标签页（Tabs）
 * ============================================================ */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 14px;
    gap: 0;
    overflow-x: auto;
}
.tab {
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-light);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    white-space: nowrap;
    font-weight: 600;
}
.tab:hover { color: var(--text); background: rgba(31,78,61,0.04); }
.tab.active {
    color: var(--primary);
    border-bottom-color: var(--accent);
    background: rgba(31,78,61,0.05);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* 步骤1小标签 */
.step1-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.step1-tabs .tab { padding: 6px 14px; font-size: 12.5px; }

/* ============================================================
 * 弹窗
 * ============================================================ */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15,43,34,0.42);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}
.modal {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 520px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 30px rgba(15,43,34,0.18);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-header h2 { font-size: 16px; font-weight: 700; color: #fff; }
.modal-header .btn { background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.2); }
.modal-body { padding: 16px 20px; }
.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    background: #FBF7EC;
}

/* ============================================================
 * 加载动画
 * ============================================================ */
.loading-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-lg);
    padding: 36px 56px;
    text-align: center;
    min-width: 320px;
}
.spinner {
    width: 38px;
    height: 38px;
    border: 3px solid var(--grid-line);
    border-top-color: var(--primary);
    border-right-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-box p { color: var(--text-mid); font-size: 13px; line-height: 1.6; white-space: pre-line; }

/* ============================================================
 * 编辑区域（contenteditable）
 * ============================================================ */
.editable-content {
    border: 1px solid transparent;
    padding: 8px 10px;
    border-radius: var(--radius);
    transition: all 0.2s;
    white-space: pre-wrap;
    line-height: 1.7;
    color: var(--text);
    min-height: 24px;
}
.editable-content:hover { border-color: var(--border); background: var(--zebra); }
.editable-content:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 2px rgba(31,78,61,0.10);
}

/* ============================================================
 * 排序列表（SWOT排序）
 * ============================================================ */
.sort-list { list-style: none; }
.sort-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    margin-bottom: 6px;
    background: var(--card);
    cursor: grab;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.sort-item:hover { box-shadow: 0 2px 8px rgba(15,43,34,0.08); border-left-color: var(--accent); }
.sort-item .rank-num {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.sort-item .rank-content { flex: 1; min-width: 0; font-size: 13px; line-height: 1.6; color: var(--text); }
.sort-item .rank-edit { outline: none; border-bottom: 1px dashed transparent; padding: 0 2px; }
.sort-item .rank-edit:hover { border-bottom-color: var(--accent); }
.sort-item .rank-edit:focus { border-bottom-color: var(--accent); background: var(--row-hover); }
.sort-item .rank-del { flex-shrink: 0; }
.swot-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 12px; border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: var(--radius); margin-bottom: 6px; background: var(--card); }
.swot-item .rank-content { flex: 1; min-width: 0; font-size: 13px; line-height: 1.6; color: var(--text); display: flex; align-items: flex-start; gap: 6px; }
.swot-cat { width: 96px; flex-shrink: 0; font-weight: 700; color: var(--primary); border: 1px solid var(--border); border-radius: 3px; padding: 2px 6px; font-size: 12px; background: var(--zebra); }
.swot-item .rank-edit { flex: 1; min-width: 0; outline: none; border-bottom: 1px dashed transparent; padding: 2px; }
.swot-item .rank-edit:hover { border-bottom-color: var(--accent); }
.swot-item .rank-edit:focus { border-bottom-color: var(--accent); background: var(--row-hover); }
.swot-item .rank-num {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
    margin-top: 3px;
}
.swot-item .rank-del { flex-shrink: 0; }
/* 策略整合栏目排版（v260907_003）：rank-content改纵向块布局——第一行策略占满宽度，第二行合并项目说明全宽完整展示（不省略、自动换行） */
.swot-item .rank-content.integ-body { display: block; }
.integ-note { margin-top: 4px; font-size: 12px; color: var(--text-light); line-height: 1.6; word-break: break-word; overflow-wrap: anywhere; }
/* v261112007：策略整合折叠块（公司和部门共用）——默认收起，内容仍在 DOM 中，保存逻辑不受影响 */
.fold-block { margin-top: 16px; border-top: 1px dashed var(--border); padding-top: 10px; }
.fold-block > summary { cursor: pointer; list-style: none; font-size: 13.5px; font-weight: 600; color: var(--text-light); padding: 2px 0; }
.fold-block > summary::-webkit-details-marker { display: none; }
.fold-block > summary::before { content: '▸'; display: inline-block; margin-right: 6px; font-size: 11px; color: var(--text-light); }
.fold-block[open] > summary::before { content: '▾'; }
.fold-block > summary:hover { color: var(--primary); }
.fold-block[open] > summary { margin-bottom: 8px; }
.swot-list { display: flex; flex-direction: column; }
.month-measure-row { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 6px; }
.mmonth-idx { }
.mmeasure-idx { width: 20px; height: 20px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--primary); color: #fff; border-radius: 3px; font-size: 11px; font-weight: 700; margin-top: 6px; }
.month-measure-row .editable-content { padding: 4px 8px; min-height: 28px; }
.mmonth-arrow, .mmeasure-arrow { color: var(--accent); font-weight: 700; flex-shrink: 0; margin-top: 6px; }
.mmeasure-progress { background: #eef7ee; color: #2d6a4f; max-width: 42%; }
/* 本月工作重点逐行（v260907_002） */
.month-focus-row .mfocus-text { flex: 1; }
/* 四维度按月整合（方案B，v260907_002） */
.dim-month-block { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 10px; background: #fafbfd; }
.dmb-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; font-size: 14px; }
.dmb-head b { color: var(--primary); }
.dmb-seq { font-size: 11px; color: var(--text-light); font-weight: 400; }
.dmb-dim { margin-bottom: 10px; }
.dmb-dim:last-child { margin-bottom: 0; }
/* v261016_009：常规事务/措施行编辑框常显边框（原transparent无边框不清晰） */
.dmb-dim .dim-item-row .editable-content,
.kpi-measure-row .editable-content { border: 1px solid var(--border); background: var(--card); }
.dmb-dim .dim-item-row .editable-content:hover,
.kpi-measure-row .editable-content:hover { border-color: var(--primary); }
.dmb-dim-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.dmb-dim-head b { font-size: 12px; color: var(--primary); }
.dmb-empty { font-size: 12px; color: var(--text-light); padding: 2px 0 4px 26px; }
.dim-item-row { display: flex; gap: 6px; align-items: flex-start; margin-bottom: 6px; }
/* v261110_040：①表紧凑（单位/承接来源单列、每月仅目标）；②表措施两条一行、「增」「删」并排 */
.km-tbl th { padding: 4px 4px; font-size: 11.5px; }
.km-tbl td { padding: 3px 4px; }
.km-tbl .editable-content { min-height: 22px; }
/* v261110_042：②表删除，措施直接写进①表的月份格里（与公司年度大事进度表同一逻辑：行＝KPI、列＝月份、格内写该月做什么） */
.kpi-mcell { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.kpi-mcell .kpi-measure-row { margin-bottom: 0; gap: 2px; align-items: flex-start; }
.kpi-mcell .kpi-measure-row .editable-content { flex: 1; min-width: 0; font-size: 10.5px; line-height: 1.35; padding: 2px 4px; min-height: 20px; border: 1px solid var(--border); background: var(--card); }
.kpi-mcell .kpi-measure-row .editable-content:hover { border-color: var(--primary); }
.kpi-mcell .rank-del { flex: 0 0 auto; padding: 0 3px; line-height: 1.5; font-size: 10px; border: none; background: transparent; color: var(--text-light); cursor: pointer; }
.kpi-mcell .rank-del:hover { color: var(--danger); }
/* v261110_046：「＋」去掉虚线框，直接叠在最后一条措施的「×」正下方，不再单独占一行 */
.kpi-mcell .kpi-mops { display: flex; flex-direction: column; align-items: center; gap: 1px; flex: 0 0 auto; }
.kpi-mcell-add { align-self: flex-end; padding: 0 2px; border: none; background: transparent; font-size: 11px; line-height: 1.2; color: var(--text-light); cursor: pointer; }
.kpi-mcell-add:hover { color: var(--primary); }
.dmb-item-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 8px; }
.dmb-item-grid .dim-item-row { margin-bottom: 0; min-width: 0; gap: 4px; }
.dmb-item-grid .dim-item-row .di-text { min-width: 0; font-size: 12px; padding: 2px 5px; min-height: 24px; }
.dmb-item-grid .dim-item-row .mmeasure-idx { margin-top: 3px; }
.di-ops { display: flex; gap: 2px; flex: 0 0 auto; margin-top: 1px; }
.dim-item-row .di-text { flex: 1; padding: 4px 8px; min-height: 28px; }
.dim-item-row .di-note { flex: 0 0 21%; padding: 4px 8px; min-height: 28px; font-size: 12px; background: #f6f8fa; }
.dim-item-row .di-idx { margin-top: 6px; }
.di-support { flex: 0 0 118px; position: relative; font-size: 12px; }
.di-support summary { cursor: pointer; color: var(--primary); font-size: 12px; padding: 5px 4px; user-select: none; white-space: nowrap; }
.di-support-list { position: absolute; z-index: 60; left: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; max-height: 200px; overflow: auto; box-shadow: 0 4px 14px rgba(0,0,0,.12); display: grid; min-width: 230px; }
.di-support-list label { display: flex; gap: 6px; align-items: center; font-size: 11px; white-space: nowrap; padding: 2px 0; cursor: pointer; }
.dim-item-row select[data-di-field="pbcRef"] { flex: 0 0 128px; padding: 3px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 12px; }
.dim-item-row .rank-del { flex-shrink: 0; margin-top: 3px; }
.sort-item .rank-score {
    font-size: 12px;
    color: var(--text-light);
    white-space: nowrap;
}
.sort-item .rank-score b { color: var(--accent); font-size: 13px; }
.sort-item.dragging { opacity: 0.5; }
.sort-placeholder {
    border: 2px dashed var(--accent);
    background: rgba(176,141,87,0.08);
    height: 44px;
    border-radius: var(--radius);
    margin-bottom: 6px;
}
.ranking-actions { display: flex; gap: 8px; margin-bottom: 12px; align-items: center; }

/* ============================================================
 * 消息提示（Toast）
 * ============================================================ */
/* toast堆叠容器（rules第82条：错误提示15秒驻留期间不与其他提示互相遮挡）
   v261018_018：定位由「右下角」改为「导航栏下方顶部居中」。
   原 bottom:30px; right:30px 正好压住 #step-footer 最右侧的"下一步"按钮（保存草稿后绿标驻留3秒，按钮点不到）；
   顶部居中同时避开卡片右上角的操作按钮，也不压 #step-footer 任何按钮。
   容器 pointer-events:none：容器矩形（含间隙）永不拦截点击；提示本体单独放开 pointer-events，保证错误提示的「复制/关闭」按钮可点。 */
.toast-container {
    position: fixed;
    top: calc(var(--header-h) + 12px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 2000;
    width: max-content;
    max-width: min(calc(100vw - 32px), 420px);
    pointer-events: none;   /* 容器不拦截点击（避免大矩形压住页面按钮） */
}
/* 提示本体恢复可点击：错误提示带「复制/关闭」按钮，必须能点 */
.toast-container .toast { position: static; pointer-events: auto; }
.toast {
    padding: 12px 22px;
    border-radius: var(--radius);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    animation: toastDrop 0.28s ease;
    max-width: min(calc(100vw - 32px), 400px);
    text-align: center;
    overflow-wrap: anywhere;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--primary); }
/* v261115004：warning 之前没有样式 → 白字落在透明底上，用户"看不见"。
   用深赭红保证白字对比度，同时和 success/info 区分开。 */
.toast-warning { background: var(--accent-deep); }
@keyframes toastDrop {
    from { transform: translateY(-10px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

/* ============================================================
 * API 生成内容展示
 * ============================================================ */
.gen-section { margin-bottom: 18px; }
.gen-section h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 8px;
    border-left: 3px solid var(--accent);
}
.gen-section h4 {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 10px 0 6px;
}
.gen-section .actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* 年度策略展示块 */
.strategy-block {
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 10px;
}
.strategy-block .label {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 4px;
    font-weight: 600;
}
.strategy-block .value {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text);
}

/* 战略地图卡片 */
.map-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 14px 16px;
    /* v261110_021：因果箭头已下线，层间不再需要 36px 走线通道，收紧为 18px */
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}
#map-canvas .map-card:last-child { margin-bottom: 10px; }
.map-card h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px dashed var(--border);
}
.map-card.finance  { border-left-color: #B0403A; }
.map-card.customer { border-left-color: var(--accent); }
.map-card.internal{ border-left-color: var(--success); }
.map-card.learning{ border-left-color: #3E8466; }

/* 步骤10跟踪表 */
.tracking-cell input {
    width: 100%;
    border: 1px solid transparent;
    padding: 4px;
    font-size: 13px;
    background: transparent;
    font-family: inherit;
    color: var(--text);
}
.tracking-cell input:hover { border-color: var(--border); background: #fff; }
.tracking-cell input:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 2px rgba(31,78,61,0.10); }

/* ============================================================
 * 五、布局栅格
 * ============================================================ */
.grid-2    { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-2-14 { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; }
.grid-2-41 { display: grid; grid-template-columns: 1fr 1.15fr; gap: 16px; }
.grid-3    { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 16px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.dim-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.set-grid  { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 16px; }

/* ============================================================
 * 进度指示器
 * ============================================================ */
.progress-bar {
    height: 4px;
    background: var(--grid-line);
    border-radius: 2px;
    margin-bottom: 14px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 2px;
    transition: width 0.4s ease;
}

/* ============================================================
 * 空状态
 * ============================================================ */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-light);
}
.empty-state .icon { font-size: 52px; margin-bottom: 14px; opacity: 0.4; }
.empty-state h3 { font-size: 16px; font-weight: 700; color: var(--text-mid); margin-bottom: 8px; }
.empty-state p { font-size: 13px; line-height: 1.7; }

/* ============================================================
 * 响应式
 * ============================================================ */
@media (max-width: 1100px) {
    :root { --sidebar-w: 56px; }
    #sidebar .review-selector select,
    #sidebar .review-actions { display: none; }
    #step-nav li, #dept-step-nav li { justify-content: center; padding: 12px 8px; }
    #step-nav li span:not(.step-indicator), #dept-step-nav li span:not(.step-indicator) { display: none; }
    #content-area { padding: 14px 16px 10px; }
    .form-row { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
    #step-footer { flex-wrap: wrap; }
    #step-footer .btn { flex: 1; justify-content: center; }
}

/* ============================================================
 * 移动端抽屉式布局（v261008_001 Web版新增，≤760px）
 * 侧栏默认隐藏（off-canvas），点左上角把手滑出；宽表格横向滚动
 * ============================================================ */
@media (max-width: 760px) {
    /* 顶栏压缩：隐藏副标题与版本号，保留额度与设置 */
    #app-header { padding: 0 10px 0 40px; }
    .header-left h1 { font-size: 15px; letter-spacing: 1px; }
    .header-subtitle, .version { display: none; }
    .header-brand-logo { width: 28px; height: 28px; }
    .header-right { gap: 6px; }
    .quota-status, .api-status { font-size: 11px; padding: 2px 6px; }
    #authUser .auth-user-name { max-width: 110px; }

    /* 侧栏改 off-canvas 抽屉（固定定位，默认移出屏外） */
    #sidebar {
        position: fixed;
        top: var(--header-h);
        left: 0;
        bottom: 0;
        width: 240px;
        min-width: 240px;
        z-index: 96;
        transform: translateX(-102%);
        transition: transform .2s ease;
        box-shadow: 2px 0 12px rgba(15,43,34,0.18);
    }
    #app-container.sb-open #sidebar { transform: translateX(0); }
    /* 抽屉内恢复完整内容（覆盖 ≤1100px 的图标栏规则） */
    #sidebar .review-selector select, #sidebar .review-actions { display: flex; }
    #step-nav li, #dept-step-nav li { justify-content: flex-start; padding: 12px; }
    #step-nav li span:not(.step-indicator), #dept-step-nav li span:not(.step-indicator) { display: inline; }
    /* 桌面收展态在移动端不生效（避免抽屉只剩圆点） */
    #app-container.sb-collapsed #sidebar { width: 240px; min-width: 240px; }
    #app-container.sb-collapsed #sidebar li { font-size: inherit; }
    #app-container.sb-collapsed #sidebar .nav-phase { font-size: inherit; border-bottom: inherit; padding: inherit; }
    #app-container.sb-collapsed #sidebar .nav-phase::after { content: none; }
    #app-container.sb-collapsed .review-selector select,
    #app-container.sb-collapsed .review-selector .review-actions { display: flex; }
    #app-container.sb-collapsed #sidebar li[data-step] { padding: 12px; justify-content: flex-start; }

    /* 抽屉遮罩（点击内容区关闭） */
    #app-container.sb-open::after {
        content: '';
        position: fixed;
        top: var(--header-h); left: 0; right: 0; bottom: 0;
        background: rgba(15,43,34,0.35);
        z-index: 95;
    }

    /* 把手按钮固定到左缘（抽屉关闭时也可点） */
    #sidebar-toggle {
        position: fixed;
        top: 76px;
        left: 4px;
        z-index: 97;
        width: 26px;
        height: 44px;
        border-radius: 6px;
        font-size: 13px;
    }
    #app-container.sb-collapsed #sidebar-toggle { left: 4px; transform: none; }

    /* 内容区与弹窗适配 */
    #content-area { padding: 12px 10px 8px; }
    .modal { width: 94vw; max-width: 94vw; }
    .auth-box { width: 92vw; max-width: 92vw; padding: 22px 16px; }
    .grid-2, .grid-2-14, .grid-2-41, .grid-3, .stat-grid, .dim-grid, .set-grid { grid-template-columns: 1fr; }

    /* 宽表格（BSC 11列 / KPI 12月分解 / 甘特）横向滚动 */
    .card-body table, .step-section table, #step-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }
    /* 战略地图 SVG 允许横向滚动 */
    .card-body { overflow-x: auto; }
}

/* ============================================================
 * 打印
 * ============================================================ */
@media print {
    #app-header, #sidebar, #step-footer { display: none !important; }
    #toast-container { display: none !important; }   /* v261018_018：打印/导出PDF 时不带出提示条 */
    #app-container { padding-top: 0; display: block; }
    #content-area { overflow: visible; padding: 0; }
    #content-area > * { max-width: none; }
    .card { border: 1px solid #ccc; break-inside: avoid; box-shadow: none; }
    th { background: #1F4E3D !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ============================================================
 * 兼容旧代码的临时性样式（保留以便平滑过渡）
 * ============================================================ */
/* 旧 .map-card 内的 h4 没有定义时使用默认 */
.strategy-block .editable-content { padding: 6px 8px; }

/* ============================================================
 * 各调用点温度条样式(去 AI 味:每个调用点独立配置温度)
 * 视觉沿用墨绿主色 + 金棕强调色
 * ============================================================ */
.temp-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 16px;
    margin-top: 4px;
}
.temp-item {
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #FDFCF8;
}
.temp-label {
    display: block;
    font-size: 12px;
    color: var(--text-mid);
    margin-bottom: 4px;
    font-weight: 600;
}
.temp-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.temp-range {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    outline: none;
}
.temp-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--accent);
    cursor: pointer;
}
.temp-range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--accent);
    cursor: pointer;
}
.temp-value {
    min-width: 32px;
    text-align: right;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) {
    .temp-grid { grid-template-columns: 1fr; }
}

/* ============================================================
 * 商业化模块样式（v260820_001）
 * 额度状态栏 / 支付引导弹窗 / 额度详情 / 开发者面板
 * ============================================================ */

/* ---------- 额度状态栏（顶部标题栏） ---------- */
.quota-status {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 3px;
    background: rgba(176,141,87,0.22);
    color: #F5E6C8;
    border: 1px solid rgba(176,141,87,0.45);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    transition: filter 0.15s;
}
.quota-status:hover { filter: brightness(1.15); }
.quota-status.warn {
    background: rgba(176,141,87,0.55);
    color: #fff;
    border-color: rgba(176,141,87,0.8);
}
.quota-status.empty {
    background: rgba(176,64,58,0.55);
    color: #fff;
    border-color: rgba(176,64,58,0.8);
}

/* ---------- 支付引导弹窗 ---------- */
.payment-modal { width: 560px; }
.payment-intro {
    font-size: 13px;
    color: var(--text-mid);
    margin-bottom: 12px;
    line-height: 1.7;
}
.payment-benefit-card {
    border: 1.5px solid var(--accent);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #FDF9F0 0%, #F7EEDD 100%);
    padding: 16px 20px;
    margin-bottom: 14px;
}
.payment-amount {
    font-size: 30px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}
.payment-amount small { font-size: 14px; font-weight: 400; color: var(--text-mid); margin-left: 2px; }
.payment-benefits {
    list-style: none;
    font-size: 13px;
    color: var(--text);
    line-height: 2;
}
.payment-benefits li::before { content: none; }
.payment-contact {
    display: flex;
    gap: 16px;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--zebra);
    padding: 14px 16px;
    margin-bottom: 14px;
}
.payment-qr-box { flex-shrink: 0; }
.payment-qr-img {
    width: 110px;
    height: 110px;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
}
.payment-qr-placeholder {
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px dashed var(--upload-border);
    border-radius: var(--radius);
    background: var(--upload-bg);
    font-size: 12px;
    color: var(--text-light);
    text-align: center;
}
.payment-contact-info { font-size: 13px; color: var(--text-mid); line-height: 1.9; }
.payment-contact-info p { margin: 0; }
.payment-wechat { display: flex; align-items: center; gap: 8px; }
.payment-wechat b { color: var(--primary); font-size: 14px; }
.payment-activate label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-mid);
    margin-bottom: 6px;
}
.activate-row { display: flex; gap: 8px; }
.activate-row input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13.5px;
    font-family: inherit;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.activate-row input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(31,78,61,0.14);
}
.activate-feedback {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.6;
    min-height: 18px;
}
.activate-feedback.success { color: var(--success); }
.activate-feedback.error { color: var(--danger); }

/* ---------- 额度详情弹窗 ---------- */
.quota-detail-modal { width: 560px; }
.quota-detail-section { margin-bottom: 18px; }
.quota-detail-section h4 {
    font-size: 13px;
    color: var(--primary);
    border-left: 3px solid var(--accent);
    padding-left: 8px;
    margin-bottom: 8px;
}
.quota-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}
.quota-table th, .quota-table td {
    border: 1px solid var(--border);
    padding: 6px 10px;
    text-align: left;
}
.quota-table th {
    background: var(--zebra);
    color: var(--text-mid);
    font-weight: 600;
}
.quota-tip {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 6px;
    line-height: 1.6;
}

/* ---------- 开发者面板 ---------- */
.dev-panel-modal { width: 760px; }
.dev-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 14px;
}
.dev-tab-btn {
    padding: 8px 18px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-mid);
    cursor: pointer;
    font-family: inherit;
}
.dev-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--accent);
}
.dev-tab-btn:hover { color: var(--primary); }
.dev-qr-row { display: flex; align-items: center; gap: 12px; }
.dev-qr-preview {
    width: 90px;
    height: 90px;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
}
.dev-actions { display: flex; gap: 10px; margin-top: 4px; }
.dev-gen-row { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.dev-gen-row input { width: 90px; }
.dev-stats {
    font-size: 13px;
    color: var(--text-mid);
    margin: 0 0 10px;
    line-height: 1.6;
}
.dev-stats b { color: var(--primary); }
.dev-filter-row { display: flex; gap: 10px; margin-bottom: 10px; }
.dev-filter-row select {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: inherit;
    background: #fff;
}
.dev-codes-scroll {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.dev-codes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}
.dev-codes-table th, .dev-codes-table td {
    border-bottom: 1px solid var(--border);
    padding: 6px 10px;
    text-align: left;
    white-space: nowrap;
}
.dev-codes-table th {
    background: var(--zebra);
    color: var(--text-mid);
    font-weight: 600;
    position: sticky;
    top: 0;
}
.code-cell {
    font-family: Consolas, Monaco, monospace;
    letter-spacing: 0.5px;
    color: var(--primary);
    font-weight: 600;
}

/* ============================================================
 * DSTE 四阶段 12 步导航（v260826_001）
 * ============================================================ */
/* 阶段分隔标题（洞察与规划 / 战略解码 / 执行与复盘），两级共用 */
#step-nav li.nav-phase, #dept-step-nav li.nav-phase {
    padding: 14px 16px 5px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent);
    cursor: default;
    border-left: none;
    user-select: none;
}
#step-nav li.nav-phase:first-child, #dept-step-nav li.nav-phase:first-child { padding-top: 8px; }
#step-nav li.nav-phase:hover, #dept-step-nav li.nav-phase:hover { background: none; color: var(--accent); }

/* 经验库入口（侧栏底部） */
.exp-library-entry {
    padding: 12px 14px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

/* ---------- 红黄绿灯（步骤11 执行跟踪） ---------- */
.light-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.light-badge.green  { background: rgba(46,125,91,0.14);  color: var(--success); }
.light-badge.yellow { background: rgba(176,141,87,0.18); color: #8A6A2F; }
.light-badge.red    { background: rgba(176,64,58,0.14);  color: var(--danger); }
.light-badge.none   { background: var(--zebra);          color: var(--text-light); }

/* ---------- 月度事项类型徽标（v260907_003：步骤10/11矩阵式一行一事） ---------- */
.mi-type-badge {
    display: inline-block;
    padding: 1px 5px;         /* v261022012：2px/7px → 1px/5px，把宽度让给事项名 */
    border-radius: 9px;
    font-size: 10.5px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.5;
}
.mi-type-badge.focus   { background: rgba(46,125,91,0.14);  color: var(--success); }
.mi-type-badge.measure { background: rgba(176,141,87,0.18); color: #8A6A2F; }

/* ---------- 必赢之战候选徽标（v260907_003 方案A：SWOT排序四维加权，≥8分资格线） ---------- */
.mustwin-badge {
    display: inline-block;
    padding: 1px 7px;
    margin-right: 5px;
    border-radius: 9px;
    background: rgba(46,125,91,0.14);
    color: var(--success);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.sort-item.mustwin {
    border-left: 3px solid var(--success);
}
/* 旧两维评分标注（缺紧迫/可行分的改造前数据） */
.legacy-tag {
    display: inline-block;
    margin-left: 5px;
    padding: 1px 6px;
    border-radius: 9px;
    background: rgba(176,141,87,0.18);
    color: #8A6A2F;
    font-size: 10px;
    white-space: nowrap;
}

.light-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}
.light-dot.green  { background: var(--success); }
.light-dot.yellow { background: var(--accent); }
.light-dot.red    { background: var(--danger); }

/* ---------- 战略假设卡 / 5Why 根因卡（步骤8、12） ---------- */
.assumption-card {
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    background: #FDFCF8;
    padding: 10px 12px;
    margin-bottom: 8px;
    line-height: 1.7;
}

/* v261109_013：战略地图条目三列网格（自行换行）；战略假设登记簿一行三列 */
/* v261110_016：地图左右各留 30px 通道，跨层长箭头从通道里绕行（否则穿过中间层卡片被底色截断成两截） */
#map-canvas { padding: 0 30px; }
.map-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.as-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) 26px;
    gap: 8px;
    align-items: start;
}
@media (max-width: 1000px) {
    .map-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .map-grid { grid-template-columns: 1fr; }
    .as-row { grid-template-columns: 1fr; }
}

/* ---------- 跨年度经验库弹窗 ---------- */
.exp-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--success);
    border-radius: var(--radius);
    background: var(--zebra);
    padding: 10px 12px;
    margin-bottom: 8px;
}
.exp-item .gen-tag { flex-shrink: 0; }
.exp-tags { display: flex; flex-wrap: wrap; gap: 4px; flex-shrink: 0; }

/* 响应式：窄屏下阶段标题与经验库入口收窄 */
@media (max-width: 1100px) {
    #step-nav li.nav-phase, #dept-step-nav li.nav-phase {
        padding: 10px 4px 4px;
        font-size: 10px;
        letter-spacing: 0;
        text-align: center;
    }
    .exp-library-entry { display: none; }
}

/* =====================================================================
 * v260828_002 双层级系统：工作台首页 + 部门级工作空间
 * ===================================================================== */

/* 工作台返回入口（侧栏底部，与经验库入口并列） */
.workbench-entry {
    padding: 12px 14px;
    border-top: 1px solid var(--border);
}

/* 部门级步骤导航：视觉已与公司级 #step-nav 完全共用（v260828_003），不再单设差异规则 */

/* 工作台首页 */
.workbench {
    max-width: 100%;   /* v261017_006：撤掉1100px限宽（wb-mode已放宽到1560px），工作台真正占满 */
    margin: 0 auto;
    padding: 10px 4px 30px;
}
/* v261017_006：部门卡跨双列整行（第二行不留空白）；组织卡补色条与公司/部门卡一致 */
.wb-grid .wb-dept { grid-column: 1 / -1; }
.wb-org .wb-card-head { border-left: 4px solid var(--primary-light); }
.wb-hero {
    background: linear-gradient(135deg, var(--primary-darkest) 0%, var(--primary) 100%);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 18px 24px;   /* v261102014：22/26 → 18/24，全局收紧一点 */
    margin-bottom: 16px;
}
.wb-hero h2 { font-size: 19px; margin-bottom: 6px; letter-spacing: 1px; }
.wb-hero p { font-size: 12.5px; line-height: 1.7; color: rgba(255,255,255,0.82); margin: 0; }

/* ============================================================
   v261102017：hero + 超管横幅 + 公司卡 + 组织卡 共用同一个 .wb-grid
   【为什么不再用独立的 .wb-top】上排曾用 flex（.wb-top）、下排用 grid（.wb-grid），
     两套布局算法对 gap 与 border 的处理不同，实测分界线差约 10px（用户截图红圈处：
     上排左块比下排左卡宽）。现在四块都是同一个 grid 的 item，列宽由同一套
     `minmax(0,1fr) minmax(0,1fr)` + 同一个 gap 决定，上下分界线必然重合。
   ============================================================ */
.wb-grid > .wb-hero {
    padding: 16px 20px;
    margin-bottom: 0;          /* 行距交给 grid 的 gap */
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
}
/* 横幅/公司卡是 .wb-card 且带内联 margin-bottom:12px，在 grid 里会撑高行距，必须压掉 */
.wb-grid > .wb-card { margin-bottom: 0 !important; }
/* 没有横幅时（普通用户无归档）hero 独占整行，不留半张空位 */
.wb-hero-full { grid-column: 1 / -1; }
.wb-hero-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 7px;
}
.wb-grid > .wb-hero .wb-hero-head h2 { font-size: 17px; margin-bottom: 0; letter-spacing: 0.5px; }
.wb-grid > .wb-hero p { font-size: 12.5px; line-height: 1.65; margin: 0; }

.wb-grid {
    display: grid;
    /* v261102016：1fr 实际是 minmax(auto,1fr)，内容（如公司卡那排按钮）会把左列撑宽、
       右列被挤窄，于是上下两排的分界线对不齐，也拉不出"十字"。用 minmax(0,1fr) 强制严格 50%。 */
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;   /* 同一行的两卡等高（默认值，显式写出来防以后被改） */
}
@media (max-width: 1100px) { .wb-grid { grid-template-columns: 1fr; } }

.wb-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.wb-card-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}
.wb-company .wb-card-head { border-left: 4px solid var(--primary); }
.wb-dept .wb-card-head { border-left: 4px solid var(--accent); }
.wb-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    background: var(--zebra);
}
.wb-card-head h3 { font-size: 15px; color: var(--primary); margin-bottom: 4px; }
/* v261102015：min-height 保证"副标题一行 vs 两行"的两张卡标题区等高，
   否则并排时下方「当前公司」那行的起点会错开（右侧卡原副标题两行，整块下移约 20px） */
.wb-card-head p { font-size: 12px; color: var(--text-light); line-height: 1.7; min-height: 1.7em; }

.wb-card-body { padding: 16px 18px; flex: 1; }
.wb-current {
    font-size: 13px;
    color: var(--text-mid);
    background: var(--zebra);
    border-radius: var(--radius);
    padding: 8px 12px;
    margin-bottom: 12px;
}
.wb-current b { color: var(--text); }
.wb-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.wb-switch select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--upload-bg);
    font-size: 13px;
    color: var(--text);
}
.wb-empty {
    font-size: 12.5px;
    color: var(--text-light);
    line-height: 1.8;
    background: var(--zebra);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 12px;
}

.wb-dept-list {
    margin-bottom: 4px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));   /* v261017_005：部门并排铺满横向空间 */
    gap: 10px;
}
.wb-dept-item {
    display: flex;
    flex-direction: column;         /* v261017_005：并排卡内改为上下结构（信息+按钮两行），窄卡不挤 */
    align-items: stretch;
    gap: 8px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    background: var(--card);
    padding: 10px 12px;
}
.wb-dept-item .wb-dept-btns { justify-content: flex-end; }
.wb-dept-info { min-width: 0; }
.wb-dept-info b { font-size: 13.5px; color: var(--text); display: block; }
.wb-dept-meta { display: block; font-size: 11.5px; color: var(--text-light); margin-top: 2px; }
.wb-dept-btns { display: flex; gap: 6px; flex-shrink: 0; }

.wb-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--zebra);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--text-mid);
}

/* ============================================================
 * 勾稽检查引擎：状态条 + 总经办驾驶舱（v260828_003）
 * ============================================================ */
.recon-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    border-radius: var(--radius);
    padding: 8px 12px;
    margin-bottom: 14px;
    font-size: 12.5px;
}
.recon-bar.recon-green  { background: rgba(46,125,91,0.10);  border: 1px solid rgba(46,125,91,0.35);  color: var(--success); }
.recon-bar.recon-yellow { background: rgba(176,141,87,0.12); border: 1px solid rgba(176,141,87,0.45); color: #8A6A2F; }
.recon-bar.recon-red    { background: rgba(176,64,58,0.10);  border: 1px solid rgba(176,64,58,0.40);  color: var(--danger); }
.recon-bar .recon-count { font-size: 12px; color: var(--text-mid); }
.recon-bar .recon-ok-text { font-size: 12px; color: var(--text-light); }
.recon-bar.recon-green  .recon-icon, .recon-bar.recon-yellow .recon-icon, .recon-bar.recon-red .recon-icon { font-size: 14px; }
.recon-details { width: 100%; }
.recon-details summary { cursor: pointer; font-size: 12px; color: var(--text-mid); user-select: none; }
.recon-details ul { margin: 6px 0 0 18px; font-size: 12px; color: var(--text); line-height: 1.9; }

/* 驾驶舱汇总统计 */
.dash-summary {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.dash-stat {
    flex: 1;
    min-width: 120px;
    background: var(--zebra);
    border: 1px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: var(--radius);
    padding: 10px 12px;
    text-align: center;
}
.dash-stat b { display: block; font-size: 22px; color: var(--primary); font-weight: 700; }
.dash-stat span { font-size: 12px; color: var(--text-light); }

/* 驾驶舱甘特矩阵 */
.dash-gantt { overflow-x: auto; }
.dash-gantt table { border-collapse: collapse; font-size: 12px; }
.dash-gantt th, .dash-gantt td { border: 1px solid var(--border); padding: 4px 6px; text-align: center; }
.dash-gantt th { background: var(--primary); color: #fff; font-weight: 600; }
.dash-gantt td.dash-gantt-cell { cursor: help; font-size: 11px; }
.dash-gantt td.dash-gantt-cell.deliver { background: rgba(46,125,91,0.16); color: var(--success); }
.dash-gantt td.dash-gantt-cell.require { background: rgba(176,141,87,0.18); color: #8A6A2F; }

/* ============================================================
 * 多账号登录页（v260828_003）
 * ============================================================ */
.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: linear-gradient(135deg, var(--primary-darkest) 0%, var(--primary) 55%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-box {
    width: 400px;
    max-width: calc(100vw - 40px);
    background: var(--card);
    border: 1px solid var(--border);
    border-top: 4px solid var(--accent);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 30px rgba(15,43,34,0.35);
    padding: 28px 30px;
    text-align: center;
}
.auth-logo { font-size: 34px; margin-bottom: 6px; }
.auth-box h2 { font-size: 19px; color: var(--primary); letter-spacing: 1px; }
.auth-sub { font-size: 12.5px; color: var(--text-mid); margin: 6px 0 16px; line-height: 1.6; }
.auth-form { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.auth-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-mid); }
.auth-form input,
.auth-form select {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 10px;
    font-size: 13px;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
}
.auth-form input:focus, .auth-form select:focus { outline: none; border-color: var(--primary); }
.auth-form input[readonly] { background: var(--zebra); color: var(--text-mid); }
.auth-submit { margin-top: 6px; width: 100%; }
.auth-error { color: var(--danger); font-size: 12px; }
.auth-tip { font-size: 11.5px; color: var(--text-light); margin-top: 14px; line-height: 1.6; text-align: left; }

/* v261030002：手机号验证码登录（微信内置浏览器可用，无需扫码） */
.auth-otp-row { display: flex; gap: 8px; align-items: stretch; }
.auth-otp-row input { flex: 1 1 auto; min-width: 0; }
.auth-otp-row .btn {
    flex: 0 0 auto;              /* 按钮绝不被输入框挤扁 */
    padding: 0 12px;
    font-size: 12.5px;
    white-space: nowrap;
    min-width: 96px;
}
.auth-or { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--text-light); margin: 2px 0; }
.auth-or::before, .auth-or::after { content: ''; flex: 1 1 auto; height: 1px; background: var(--border); }
.auth-alt { background: transparent; border: 1px solid var(--border); color: var(--text-mid); width: 100%; }
.auth-alt:hover { border-color: var(--primary); color: var(--primary); }
/* v261102001：微信内提示"去电脑打开"时展示的网址，要能长按选中 */
.auth-link-box {
    width: 100%; font-size: 13px; text-align: center;
    padding: 9px 10px; border-radius: var(--radius);
    border: 1px solid var(--border); background: var(--zebra);
    color: var(--text-mid); -webkit-user-select: text; user-select: text;
}
.auth-note {
    font-size: 11.5px; color: var(--text-light); line-height: 1.7; text-align: left;
    padding: 9px 11px; border-radius: var(--radius);
    background: var(--zebra); border: 1px dashed var(--border); margin: 2px 0 0;
}

/* 部门步骤2：公司级上下文只读引用块 */
.wb-ctx {
    background: var(--zebra);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius);
    padding: 12px 14px;
    font-size: 12.5px;
    line-height: 1.8;
    color: var(--text-mid);
    margin-bottom: 12px;
    max-height: 260px;
    overflow-y: auto;
}
.wb-ctx b { color: var(--primary); }


/* v261015_003 月度重点附件式排版（按月纵分组） */
.mi-mon { background: #FAFBFD; text-align: center; font-weight: 600; color: var(--primary); border-right: 2px solid rgba(26,82,118,.25); vertical-align: middle; }
tr.mi-sep td { border-top: 2px solid rgba(26,82,118,.25); }

/* v261016_002：工作台/驾驶舱首页——左侧栏隐藏后内容区限宽放宽，卡片占满更美观 */
#app-container.wb-mode #content-area > * { max-width: 1560px; }
#app-container.wb-mode #content-area { padding-left: 32px; padding-right: 32px; }

/* v261017_010：部门卡只读/可编辑标记 */
.wb-tag { display: inline-block; font-size: 10.5px; font-weight: 400; padding: 1px 6px; border-radius: 10px; margin-left: 4px; vertical-align: middle; }
.wb-tag.mine { background: #E1F5EE; color: #0F6E56; border: 1px solid #5DCAA5; }
.wb-tag.full { background: #E6F1FB; color: #0C447C; border: 1px solid #85B7EB; }
.wb-tag.ro { background: #F1EFE8; color: #5F5E5A; border: 1px solid #D3D1C7; }

/* v261018_006：AI 生成内容标识（生成式AI服务管理办法合规要求） */
.ai-notice {
    display: flex; align-items: flex-start; gap: 8px;
    background: #F1EFE8; border: 1px solid #D3D1C7; border-left: 3px solid #5F5E5A;
    border-radius: 6px; padding: 7px 12px; margin-bottom: 10px;
    font-size: 12.5px; color: #444441; line-height: 1.55;
}
.ai-notice b { color: #2C2C2A; }
.ai-tag {
    display: inline-block; font-size: 10.5px; font-weight: 400;
    padding: 1px 6px; margin-left: 6px; border-radius: 9px;
    background: #EEEDFE; color: #3C3489; border: 1px solid #AFA9EC;
    vertical-align: middle; white-space: nowrap;
}

/* ===== v261018_021 数据一致性核对面板 ===== */
.con-base { background: #F4F8F5; border: 1px solid #D6E4DA; border-left: 3px solid var(--primary); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 12px; }
.con-base-title { font-size: 12.5px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.con-base-row { display: flex; gap: 10px; flex-wrap: wrap; }
.con-base-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 12px; font-size: 12.5px; display: flex; align-items: baseline; gap: 6px; }
.con-base-item span { color: var(--text-light); }
.con-base-item b { color: var(--accent-deep); font-size: 15px; }
.con-base-item i { font-style: normal; color: var(--text-light); font-size: 11px; }
.con-ack { margin-top: 8px; font-size: 12px; color: #8A5A18; background: #FDF6E3; border: 1px solid #E8D9A8; border-radius: var(--radius); padding: 6px 10px; line-height: 1.6; }
.con-summary { font-size: 12.5px; color: var(--text-mid); line-height: 1.7; margin: 0 0 10px; }
.con-table { width: 100%; font-size: 12.5px; }
.con-table th { background: var(--primary); color: #fff; font-weight: 600; padding: 7px 8px; text-align: left; white-space: nowrap; }
.con-table td { padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.con-table tr:hover td { background: var(--row-hover); }
.con-sub { font-size: 11px; color: var(--text-light); margin-top: 2px; }
/* v261026001：判定格下的「修正建议」——和上面的判定文字要能分开看（判定是"哪里不对"，这里是"该怎么办"） */
.con-advice { margin-top: 5px; font-size: 11.5px; line-height: 1.65; color: var(--text-mid); background: #F7F9F6; border-left: 2px solid #C6D9CC; border-radius: 0 3px 3px 0; padding: 4px 8px; font-weight: 400; }
.con-bad { color: var(--danger); font-weight: 600; }
.con-warn { color: #8A5A18; font-weight: 600; }
.con-ok { color: var(--success); }
.con-na { color: var(--text-light); }
.con-tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 10px; border: 1px solid currentColor; }
.con-tag.con-bad { background: #FBEBEA; }
.con-tag.con-warn { background: #FDF6E3; }
.con-tag.con-ok { background: #E9F3EE; }
.con-tag.con-na { background: #F3F1EC; }
.con-note { margin-top: 12px; font-size: 12px; color: var(--text-mid); background: #FAF7F0; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px; line-height: 1.7; }
.con-note b { color: var(--primary); }
.con-badge { display: inline-block; min-width: 14px; height: 14px; line-height: 14px; text-align: center; border-radius: 7px; background: #D9534F; color: #fff; font-size: 10px; font-weight: 700; padding: 0 3px; vertical-align: top; margin-left: 2px; }

/* v261025004（C 方案）：副本新鲜度横条——本步数据早于上游改数时提示，只提示、不代改 */
.prov-bar {
    display: flex; align-items: flex-start; flex-wrap: wrap; gap: 10px;
    background: #FDF6E3; border: 1px solid #E8D9A8; border-left: 3px solid #B08D57;
    border-radius: var(--radius); padding: 9px 12px; margin: 0 0 10px;
    font-size: 12.5px; line-height: 1.65; color: #6B4A12;
}
.prov-bar .prov-ico { flex: 0 0 auto; font-size: 13px; }
.prov-bar .prov-txt { flex: 1 1 300px; min-width: 0; }
.prov-bar .prov-txt b { color: #5A3D0C; }
.prov-bar .prov-acts { flex: 0 0 auto; display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }

/* 核对面板：快照新鲜度 / 同源等值 区块 */
.con-prov { border: 1px solid var(--border); border-left: 3px solid #B08D57; border-radius: var(--radius); padding: 10px 12px; margin-bottom: 12px; background: #FCFAF4; }
.con-prov-title { font-size: 12.5px; font-weight: 700; color: var(--primary); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.con-prov-ok { font-size: 12px; color: var(--success); }
.con-prov-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(150px, 1.3fr) auto; gap: 10px; align-items: center; font-size: 12.5px; padding: 6px 0; border-top: 1px dashed var(--border); }
.con-prov-row:first-of-type { border-top: 0; }
.con-prov-act { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 780px) {
    .con-prov-row { grid-template-columns: 1fr; gap: 4px; }
    .con-prov-act { justify-content: flex-start; }
}

/* 步骤10 年度目标值下方的 BSC 对照行 */
/* v261022012：限高 2 行 + 滚动，避免这一格的说明把整行拉高（原来折 4 行把行顶到 80px） */
.km-bsc-hint { font-size: 10.5px; line-height: 1.5; margin-top: 2px; color: var(--text-light); max-height: 32px; overflow-y: auto; }
.km-bsc-hint.diff { color: #8A5A18; font-weight: 600; }
.km-bsc-hint a { color: var(--accent-deep); cursor: pointer; text-decoration: underline; margin-left: 3px; }

/* v261018_021：步骤2保存后的财务变更提示条（非阻断，可点开核对面板） */
.con-banner {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
    background: #FDF6E3; border: 1px solid #E8D9A8; border-left: 3px solid #B08D57;
    border-radius: var(--radius); padding: 9px 12px; margin-bottom: 10px;
    font-size: 12.5px; line-height: 1.65; color: #6B4A12;
}
.con-banner a { color: var(--accent-deep); cursor: pointer; text-decoration: underline; white-space: nowrap; font-weight: 600; }
.con-banner b { color: #5A3D0C; }

/* v261018_022：一句话温馨提示条（帮助中心 + 关键步骤常驻，文案统一来自 Consistency.TIP） */
.con-tip {
    display: flex; align-items: flex-start; gap: 8px;
    background: #F8F5EE; border: 1px solid #E4DCC8; border-left: 3px solid var(--accent, #B08D57);
    border-radius: var(--radius); padding: 8px 12px; margin: 0 0 10px;
    font-size: 12px; line-height: 1.75; color: #5F5445;
}
.con-tip b { flex-shrink: 0; color: #8A5A18; font-weight: 700; white-space: nowrap; }
.con-tip b::after { content: '：'; }
.con-tip span { flex: 1; }
.con-tip-lg { font-size: 12.5px; padding: 10px 14px; margin-bottom: 14px; }
@media print { .con-tip { display: none !important; } }

/* ============================================================
 * v261018_023 顶栏重排
 * 问题：10 个元素平铺一行、按钮/徽标三种字号与内边距混杂，header 高度固定 64px，
 *       窄屏一换行就压到主内容上。改法：分「数据工具 / 状态 / 账户设置」三组，
 *       组间用细分隔线；统一 30px 高度与 12.5px 字号；组内不换行，窄屏整体紧凑而非折行。
 * ============================================================ */
#app-header { padding: 0 16px; gap: 14px; }
#app-header .header-left { gap: 10px; min-width: 0; flex-shrink: 0; }
#app-header .header-left h1 { font-size: 19px; letter-spacing: 2px; white-space: nowrap; }
#app-header .header-right { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; justify-content: flex-end; min-width: 0; }
#app-header .header-group { display: flex; align-items: center; gap: 6px; padding-left: 10px; border-left: 1px solid rgba(255,255,255,0.16); }
#app-header .header-group:first-child { padding-left: 0; border-left: none; }
#app-header .header-btn { height: 30px; padding: 0 10px; font-size: 12.5px; line-height: 1; display: inline-flex; align-items: center; gap: 4px; border-radius: 4px; white-space: nowrap; }
#app-header .quota-status, #app-header .api-status { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 4px; display: inline-flex; align-items: center; }
/* v261019_003：账户区不再整体截断——只有姓名可省略号，切换角色/退出 永远完整显示 */
#authUser { font-size: 12.5px; color: #D8CFBC; display: flex; align-items: center; gap: 8px; min-width: 0; max-width: none; }
#authUser .auth-user-name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; min-width: 3em; }
#authUser .auth-user-act { flex: 0 0 auto; color: #D8CFBC; text-decoration: underline; text-underline-offset: 2px; font-size: 12px; white-space: nowrap; }
#authUser .auth-user-act:hover { color: #fff; }
#consistencyEntryBtn .con-badge { position: static; margin-left: 3px; }

/* ============================================================
   v261102011：顶栏收纳下拉
   顶栏原来 10 个元素挤一行，1080px 下标题被压两行、AI 云服务被挤掉。
   低频项收进两个下拉：「⋯ 更多」（系统功能）与「👤 用户」（账号）。
   注意：下拉里保留原元素 id，所以 renderApp 控显隐、updateApiStatus 改状态灯都照旧。
   ============================================================ */
.hdr-menu { position: relative; display: inline-flex; }
.hdr-menu-pop {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 184px;
    background: #fff;
    border: 1px solid var(--border, #e5e0d5);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
    padding: 5px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
/* hidden 属性优先于 display:flex，否则下拉永远展开 */
.hdr-menu-pop[hidden] { display: none; }
.hdr-menu-pop .hdr-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    font-size: 12.5px;
    font-family: inherit;
    color: var(--text, #333);
    background: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: left;
    line-height: 1.2;
    white-space: nowrap;
}
.hdr-menu-pop .hdr-menu-item:hover { background: var(--zebra, #f5f2ea); }
.hdr-menu-pop .hdr-menu-item > span:first-child { flex: 1; }
.hdr-menu-sep { height: 1px; background: var(--border, #e5e0d5); margin: 4px 2px; }
/* 状态灯在菜单里不再撑 30px 高，只留一个小圆点 + 文字 */
.hdr-menu-pop .api-status { height: auto; padding: 2px 7px; font-size: 11px; border-radius: 10px; flex: 0 0 auto; }
/* 账号区搬进下拉后改成竖排列表（原来是顶栏横排的姓名+切换角色+退出） */
#hdrUserPop .hdr-menu-user { display: flex; flex-direction: column; align-items: stretch; gap: 1px; padding: 2px; }
#hdrUserPop .auth-user-name { max-width: none; padding: 8px 10px 4px; font-size: 12.5px; font-weight: 600; color: var(--text, #333) !important; }
/* 原样式是深绿顶栏上的浅色字（#D8CFBC），搬到白底下必须改回深色，否则看不见 */
#hdrUserPop #authUser { color: var(--text, #333) !important; }
#hdrUserPop .auth-user-act {
    display: block;
    padding: 8px 10px;
    font-size: 12.5px;
    color: var(--text, #333) !important;
    text-decoration: none !important;
    border-radius: 5px;
}
#hdrUserPop .auth-user-act:hover { background: var(--zebra, #f5f2ea); color: var(--danger, #c0392b) !important; }

@media (max-width: 1360px) {
    #app-header .header-left h1 { font-size: 17px; letter-spacing: 1px; }
    #app-header .header-right { gap: 8px; }
    #app-header .header-btn { padding: 0 8px; }
    #app-header .quota-status, #app-header .api-status { padding: 0 8px; }
}
@media (max-width: 1180px) {
    #app-header .header-subtitle { display: none; }
    #app-header .header-group { padding-left: 8px; }
    #app-header .header-btn { font-size: 12px; padding: 0 7px; }
}
@media (max-width: 1024px) {
    #app-header .version { display: none; }
    #app-header .header-left h1 { font-size: 15px; }
}
@media (max-width: 760px) {
    #app-header { padding: 0 10px 0 40px; gap: 8px; }
    #app-header .header-left h1 { font-size: 14px; letter-spacing: 0; }
    #app-header .header-right { gap: 6px; overflow-x: auto; scrollbar-width: none; }
    #app-header .header-right::-webkit-scrollbar { display: none; }
    #app-header .header-group { padding-left: 6px; gap: 4px; }
    #app-header .header-btn { height: 26px; padding: 0 6px; font-size: 11px; }
    #app-header .quota-status, #app-header .api-status { height: 26px; padding: 0 6px; font-size: 11px; }
    #authUser .auth-user-name { max-width: 90px; }
}

/* ============================================================
 * v261019_004 顶栏去重 + 设置面板合并
 * 顶栏只保留「工具 / 状态 / 账户」三组常用入口：经验库回工作台底部、
 * 订阅并入「订阅版+会员期」额度徽标、帮助并入设置、版本号并入设置页脚。
 * ============================================================ */
.settings-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin: 0 0 14px; padding-bottom: 8px; }
/* 设置面板：页签与页脚固定，只让正文滚动（否则版本号/保存按钮要滚到底才看得见） */
#settingsModal .modal { display: flex; flex-direction: column; max-height: 88vh; overflow: hidden; }
#settingsModal .modal-body { overflow-y: auto; flex: 1 1 auto; min-height: 0; }
#settingsModal .modal-header, #settingsModal .modal-footer { flex: 0 0 auto; }
.settings-tab {
    background: transparent; border: 1px solid transparent; border-radius: 4px;
    padding: 6px 14px; font-size: 13px; color: var(--text-light);
    cursor: pointer; font-family: var(--font); line-height: 1.4;
}
.settings-tab:hover { color: var(--primary); background: var(--zebra); }
.settings-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.settings-version {
    margin-right: auto; font-size: 11.5px; color: var(--text-light);
    background: var(--zebra); border: 1px solid var(--border); border-radius: 3px; padding: 3px 9px;
}

/* v261018_023：步骤10 行内"占比档案已保存"提示 */
.km-ratio-ok { color: var(--success); font-weight: 600; }

/* v261018_024：部门 vs 公司核对面板——判定标签不换行（"需修正"曾被压成两行） */
.con-table .con-tag { white-space: nowrap; }


/* ============ 法务组件（v261031001） ============
 * 为什么这段放在共享层：legal.js 是两版共用的，它产出的 DOM 类名只有一套。
 * 类名带 sme 前缀，是因为这套样式先落在 Pro 的样式表，后来 Pro Max 接入同一份 legal.js
 * 才回流到这里 —— 改名要同时改两版 CSS 和 legal.js，不值得，故保留原名并在此说明。
 * 缺了这段的后果不是"不好看"，而是登录页勾选块变成一行挤在一起的字、法务正文没有层次。
 */
.sme-legal-doc { max-height: 60vh; overflow-y: auto; font-size: 13px; line-height: 1.85; color: var(--text); padding-right: 6px; }
.sme-legal-doc h4 { font-size: 14px; font-weight: 600; color: var(--primary); margin: 18px 0 6px; }
.sme-legal-doc h4:first-child { margin-top: 0; }
.sme-legal-doc p { margin: 0 0 8px; }
.sme-legal-doc ul { margin: 0 0 8px; padding-left: 20px; }
.sme-legal-doc li { margin-bottom: 4px; }
.sme-legal-doc .sme-legal-meta { font-size: 12px; color: var(--text-light); border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 12px; }

.auth-legal-gate { margin: 10px 0 4px; font-size: 12.5px; line-height: 1.7; color: var(--text-light); text-align: left; }
.auth-legal-gate label { display: flex; flex-direction: row; align-items: flex-start; gap: 7px; cursor: pointer; }
.auth-legal-gate input[type="checkbox"] { margin-top: 3px; flex: 0 0 auto; width: 15px; height: 15px; }
.auth-legal-gate a { color: var(--accent-deep, var(--accent)); text-decoration: underline; cursor: pointer; }

/* v261102011：页脚压成一行版权（原 4 个链接 + 26px 外边距共约 70px，正文底部白占一屏）
   协议入口改到「⚙ 设置和说明」里常驻。注意这是 Pro Max 自己的样式表，
   共享层 legal.js 的 footerHtml 不改，Pro 的页脚形状不受影响。 */
.sme-footer-legal { margin-top: 8px; padding: 5px 0 7px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-light); display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.sme-footer-legal a { display: none; }

/* v261102018：版权行从内容区底部移到左侧导航栏最底部（用户要求：左侧最下方）
   margin-top:auto 把它压到侧栏最低处；侧栏内容超长时它跟着一起滚，不会盖住步骤名。
   收成 46px 图标栏时放不下这行字，直接隐藏（展开即回来）；≤1100px 由 legal.js 退回内容区。 */
#sidebar-footer { margin-top: auto; flex-shrink: 0; padding: 8px 10px 0; }
#sidebar-footer .sme-footer-legal { margin-top: 0; padding: 6px 0 2px; font-size: 10.5px; line-height: 1.6; display: block; }
#app-container.sb-collapsed #sidebar-footer { display: none; }
/* 协议入口搬到设置面板后的样式 */
.legal-settings-links { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; }
.legal-settings-links a { color: var(--accent-deep, var(--accent)); text-decoration: none; cursor: pointer; }
.legal-settings-links a:hover { text-decoration: underline; }

/* ============================================================
   v261102002：技术细节默认隐藏
   .adv-only 的内容仍在 DOM 里（导出/核对/测试都靠它），只是不显示。
   开关：顶栏「⋯」按钮 或 设置里的「显示技术细节」勾选框。
   注意：AI 生成标识（.ai-notice / .ai-tag）不许加这个类——合规要求必须可见。
   ============================================================ */
body:not(.adv) .adv-only { display: none !important; }
#btnAdvMode { font-weight: 700; letter-spacing: 1px; padding: 4px 9px; min-width: 0; }
#btnAdvMode.on { border-color: var(--accent, #B08D57); color: var(--accent, #B08D57); background: rgba(176,141,87,0.08); }

/* v261102002：核对面板的「人话摘要」——明细藏了，但异常条数必须留在明面上
   （顶栏红点把副本漂移算进计数，若这里也藏，用户会看到"红点亮着、面板却没问题"） */
.con-prov-brief { padding: 2px 0 8px; margin-bottom: 8px; border-bottom: 1px dashed var(--border); font-size: 13px; line-height: 1.6; }
.con-prov-brief b { color: #8A6A2F; }
.con-prov-brief .btn { margin-top: 2px; }


/* ============================================================
   v261117002 组织与承接规划：左右分栏（左步骤导航 + 右内容区）
   v261117004 左栏按公司复盘侧栏样式重做：阶段分组标题 + 圆形序号码 + 选中浅绿底/左侧竖条
   ============================================================ */
.orgplan-layout { display: flex; gap: 14px; align-items: stretch; }
.orgplan-nav {
    width: 208px; flex: 0 0 208px;
    background: transparent; border: none; border-right: 1px solid var(--border); border-radius: 0;
    padding: 2px 10px 12px 0; align-self: flex-start; position: sticky; top: 12px;
    transition: width .18s ease, flex-basis .18s ease, padding .18s ease;
}
.orgplan-nav.collapsed { width: 48px; flex-basis: 48px; padding: 2px 6px 12px 0; }
.orgplan-nav-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 6px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; min-height: 22px;
}
.orgplan-nav-head .t { font-size: 12.5px; font-weight: 700; color: var(--text-mid); white-space: nowrap; letter-spacing: .3px; }
.orgplan-nav-toggle {
    border: none; background: none; cursor: pointer; color: var(--text-light);
    font-size: 13px; padding: 2px 6px; border-radius: var(--radius); line-height: 1.4;
}
.orgplan-nav-toggle:hover { background: var(--row-hover); color: var(--primary); }
.orgplan-nav.collapsed .orgplan-nav-toggle { transform: rotate(180deg); }
.orgplan-nav-list { display: flex; flex-direction: column; gap: 2px; }
/* 阶段分组标题（与公司复盘侧栏一致的灰字小标） */
.orgplan-nav-group {
    font-size: 11px; color: var(--text-light); letter-spacing: .4px;
    padding: 11px 10px 5px; white-space: nowrap;
}
.orgplan-nav-item {
    display: flex; gap: 9px; align-items: center; width: 100%; text-align: left;
    border: none; background: none; cursor: pointer; padding: 7px 10px; border-radius: var(--radius);
    color: var(--text-mid); font-family: inherit; font-size: 13px; line-height: 1.4;
    transition: background .15s ease, color .15s ease;
}
.orgplan-nav-item:hover { background: var(--row-hover); }
.orgplan-nav-item.active {
    background: var(--zebra); color: var(--primary); font-weight: 700;
    box-shadow: inset 3px 0 0 var(--primary);
}
/* 圆形序号码：未选中浅灰底灰字，选中实心主色底白字（对齐附图2） */
.orgplan-nav-item .no {
    flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--border); color: var(--text-light);
    font-size: 11.5px; font-weight: 700; line-height: 1;
}
.orgplan-nav-item.active .no { background: var(--primary); color: #fff; }
.orgplan-nav-item .tt { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orgplan-nav.collapsed .orgplan-nav-head .t,
.orgplan-nav.collapsed .orgplan-nav-group,
.orgplan-nav.collapsed .orgplan-nav-item .tt { display: none; }
.orgplan-nav.collapsed .orgplan-nav-item { justify-content: center; padding: 7px 2px; }
.orgplan-body { flex: 1; min-width: 0; }
@media (max-width: 760px) {
    .orgplan-layout { flex-direction: column; }
    .orgplan-nav { position: static; width: 100%; flex: none; }
    .orgplan-nav.collapsed { width: 100%; }
    .orgplan-nav-list { flex-direction: row; flex-wrap: wrap; gap: 6px; }
    .orgplan-nav-group { width: 100%; padding: 8px 6px 2px; }
    .orgplan-nav-item { width: auto; padding: 7px 10px; }
    .orgplan-nav.collapsed .orgplan-nav-item .tt,
    .orgplan-nav.collapsed .orgplan-nav-group,
    .orgplan-nav.collapsed .orgplan-nav-head .t { display: flex; }
    .orgplan-nav.collapsed .orgplan-nav-group { display: block; }
}

/* ============================================================
   v261117005 组织规划清单表：列宽按内容分配 + 行高收敛
   问题（用户附图）：细化职能定位一列铺满整段 AI 文本，把整行撑到 400px 以上；
     名称/业务线/独立考核却被平分得又宽又空，单行输入框在巨行里上下悬空。
   做法：固定列宽（table-layout:fixed，比例在各表表头里给）+ 单元格顶部对齐
     + 单行控件统一 26px + textarea 66px 限高 + AI 长文默认折 4 行、可展开。
   ============================================================ */
table.org-list-table { table-layout: fixed; }
table.org-list-table th,
table.org-list-table td { padding: 5px 8px; vertical-align: top; font-size: 12.5px; line-height: 1.55; }
table.org-list-table th { padding: 6px 8px; vertical-align: middle; font-size: 12px; }
table.org-list-table td:first-child,
table.org-list-table th:first-child { padding-left: 10px; }
table.org-list-table td > input:not([type="date"]):not([type="checkbox"]):not([type="radio"]),
table.org-list-table td > select { height: 26px; padding: 2px 6px; box-sizing: border-box; }
table.org-list-table td > textarea { max-height: 66px; overflow-y: auto; }
/* AI 长文：默认只占 4 行（6.5em），点「展开全文」看全部 */
.org-ai-text {
    font-size: 12px; line-height: 1.62; color: var(--text-secondary);
    white-space: pre-line; word-break: break-word;
    max-height: 6.5em; overflow: hidden;
}
.org-ai-text.expanded { max-height: none; }
.org-ai-more {
    display: inline-block; margin-top: 3px; padding: 0; border: none; background: none;
    color: var(--primary); font-family: inherit; font-size: 11.5px; line-height: 1.4; cursor: pointer;
}
.org-ai-more:hover { text-decoration: underline; }

/* ============================================================
   v261117006 快捷分解表：状态徽章 + 内容摘要 + 展开明细
   原来每行只有「已生成·待确认」，看不到 AI 生成了什么（用户误以为返回空）
   ============================================================ */
.qk-digest {
    text-align: left; margin-top: 4px;
    font-size: 11.5px; line-height: 1.5; color: var(--text-mid);
    word-break: break-word;
}
.qk-digest a { font-size: 11px; }
.qk-detail-box {
    max-height: 300px; overflow-y: auto;
    font-size: 12px; line-height: 1.72; color: var(--text);
    white-space: pre-line; word-break: break-word;
}
