/* ==========================================================================
   银飞数科 · 数科中台设计系统（v1.9 品牌 VI 落地）
   --------------------------------------------------------------------------
   品牌依据：企业 LOGO「银飞数科」。标志为橙红渐变几何飞鸟，字标为超粗黑体。
   色值直接取自 LOGO 像素样本，不是凭感觉调的：

       橙色渐变  #B63422  →  #ED8825     （标志左深右亮，45° 斜向）
       字标墨色  #231815                 （近黑带暖调）

   视觉语言三条：45° 斜切（呼应飞鸟的斜向动势）、橙黑高对比、干净留白。
   涨红跌绿按国内习惯保留，靠色相与品牌橙拉开（品牌橙 19°，涨红 6°）。

   ⚠ 兼容约定：v1.0~v1.8 全站用 --gold / --gold-2 / --gold-soft 指代强调色，
     现存 300+ 处引用。这里把三个旧名映射到品牌色，改一处即全站换 VI，
     比逐个改类名安全得多。新代码请用 --brand 系列语义名。
   ========================================================================== */

:root {
    /* ---- 品牌 ---- */
    --brand: #DA5420;
    --brand-deep: #B63422;
    --brand-2: #ED8825;
    --brand-soft: #FDEEE7;
    --brand-ink: #9B3510;
    --brand-grad: linear-gradient(135deg, #B63422 0%, #DA5420 46%, #ED8825 100%);
    --brand-glow: rgba(218, 84, 32, .16);

    /* ---- 兼容别名（旧组件引用） ---- */
    --gold: var(--brand);
    --gold-2: var(--brand-2);
    --gold-soft: var(--brand-soft);

    /* ---- 中性 ---- */
    --bg: #F7F6F5;
    --panel: #FFFFFF;
    --panel-2: #FBFAF9;
    --panel-3: #F2F0ED;
    --line: #E7E2DE;
    --line-strong: #D5CEC7;

    --ink: #231815;
    --ink-2: #4A403C;
    --muted: #8A7E78;
    --muted-2: #B5AAA4;

    /* ---- 深色导航（侧栏） ---- */
    --nav-bg: #1D1411;
    --nav-bg-2: #170F0D;
    --nav-ink: #C6B9B3;
    --nav-ink-dim: #7D716C;
    --nav-line: rgba(255, 255, 255, .075);
    --nav-on-bg: rgba(218, 84, 32, .15);

    /* ---- 语义色（涨红 / 跌绿，与品牌橙拉开色相） ---- */
    --red: #C42E1C;
    --red-soft: #FBEAE7;
    --green: #2F7A52;
    --green-soft: #E8F2EC;
    --blue: #35658C;
    --blue-soft: #E7EFF6;
    --purple: #6B5B95;
    --purple-soft: #EFEBF6;
    --teal: #2B7A78;
    --teal-soft: #E3F1F0;
    --pink: #A85078;
    --pink-soft: #F8EAF0;
    --amber: #A0611A;
    --amber-soft: #FAF0DF;
    --gray: #776C66;
    --gray-soft: #F0EDEB;

    --radius: 8px;
    --radius-sm: 5px;
    --shadow: 0 1px 2px rgba(35, 24, 21, .05), 0 10px 26px -16px rgba(35, 24, 21, .22);
    --shadow-sm: 0 1px 2px rgba(35, 24, 21, .05);
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;

    /* 45° 斜切：右侧切掉一个小三角，呼应 LOGO 飞鸟的斜向切面 */
    --cut: polygon(0 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0 0 10px; }

/* ---------------------------------------------------------------- 应用骨架 */

.app { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }

.side {
    background:
        radial-gradient(420px 220px at 18% -6%, rgba(218, 84, 32, .16), transparent 70%),
        linear-gradient(178deg, var(--nav-bg) 0%, var(--nav-bg-2) 100%);
    color: var(--nav-ink);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 17px 16px 15px;
    border-bottom: 1px solid var(--nav-line);
}
.brand .mark {
    width: auto;
    height: 31px;
    flex: 0 0 auto;
    /* 标志是橙红渐变，深底上不需要描边，只需一点辉光把它从背景里托起来 */
    filter: drop-shadow(0 2px 8px rgba(218, 84, 32, .35));
}
.brand .bt { display: grid; gap: 1px; min-width: 0; }
.brand .bt b {
    font-size: 15.5px;
    font-weight: 800;
    letter-spacing: .06em;
    color: #fff;
    line-height: 1.25;
}
.brand .bt span {
    font-size: 10.5px;
    color: var(--nav-ink-dim);
    letter-spacing: .16em;
    font-weight: 600;
    text-transform: uppercase;
}

.nav { padding: 12px 10px; flex: 1; }
.nav .grp {
    margin: 15px 10px 7px;
    font-size: 10.5px;
    color: var(--nav-ink-dim);
    letter-spacing: .13em;
    font-weight: 700;
}
.nav .grp:first-child { margin-top: 3px; }

.nav a {
    position: relative;
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; margin-bottom: 1px;
    border-radius: var(--radius-sm);
    color: var(--nav-ink); font-size: 13.5px; text-decoration: none;
    transition: background .14s ease, color .14s ease;
}
.nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; text-decoration: none; }
.nav a.on {
    background: var(--nav-on-bg);
    color: #fff;
    font-weight: 650;
}
/* 选中态的左侧橙条：LOGO 斜切语言的竖向延伸 */
.nav a.on::before {
    content: '';
    position: absolute;
    left: 0; top: 7px; bottom: 7px;
    width: 2.5px;
    border-radius: 0 2px 2px 0;
    background: var(--brand-grad);
}
.nav a .code {
    flex: 0 0 22px; height: 22px; border-radius: var(--radius-sm);
    display: grid; place-items: center;
    font-size: 10.5px; font-weight: 800; letter-spacing: .02em;
    background: rgba(255, 255, 255, .07); color: var(--nav-ink-dim);
    transition: background .14s ease, color .14s ease;
}
.nav a:hover .code { background: rgba(255, 255, 255, .12); color: var(--nav-ink); }
.nav a.on .code { background: var(--brand-grad); color: #fff; }
.nav a .badge {
    margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 9px; background: var(--brand); color: #fff;
    font-size: 11px; font-weight: 800; display: grid; place-items: center;
}
.nav a .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav .hint { color: var(--nav-ink-dim); font-size: 12px; }

.side-foot {
    padding: 12px 16px 15px; border-top: 1px solid var(--nav-line);
    font-size: 11px; color: var(--nav-ink-dim); line-height: 1.75;
}

.main { display: flex; flex-direction: column; min-width: 0; }

.top {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 14px;
    height: auto; min-height: 62px; padding: 9px 22px;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--line);
}
/* 顶栏顶部一条品牌渐变：整站最稳定的 VI 露出位，不占空间也不干扰内容 */
.top::before {
    content: '';
    position: absolute; left: 0; right: 0; top: 0; height: 2px;
    background: var(--brand-grad);
    pointer-events: none;
}
.top .ttl { font-size: 16.5px; font-weight: 750; letter-spacing: -.01em; }
.top .sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.top .sp { margin-left: auto; }

/* 面包屑：解决「在深层页面不知道自己在哪、也不好回上一层」的老问题 */
.crumbs {
    display: flex; align-items: center; gap: 5px;
    font-size: 11.5px; color: var(--muted-2);
    margin-bottom: 3px; line-height: 1.2;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand-deep); text-decoration: none; }
.crumbs i { font-style: normal; color: var(--muted-2); opacity: .6; }
.crumbs b { font-weight: 600; color: var(--ink-2); }

/* 全局搜索入口：Ctrl/⌘ + K */
.search-btn {
    display: inline-flex; align-items: center; gap: 8px;
    height: 32px; padding: 0 9px 0 11px;
    background: var(--panel); border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm); cursor: pointer;
    font: inherit; font-size: 12.5px; color: var(--muted);
    transition: border-color .14s ease, box-shadow .14s ease;
}
.search-btn:hover { border-color: var(--brand-2); box-shadow: 0 0 0 3px var(--brand-glow); }
.search-btn .ico { font-size: 13px; color: var(--muted-2); }
.search-btn kbd {
    font: inherit; font-size: 10.5px; font-weight: 700;
    padding: 1px 5px; border-radius: 3px;
    background: var(--panel-3); color: var(--muted);
    border: 1px solid var(--line);
}

.top .who { display: flex; align-items: center; gap: 8px; }
.top .avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--brand-grad); color: #fff;
    display: grid; place-items: center; font-weight: 800; font-size: 12.5px;
}
.top .uname { font-size: 13px; font-weight: 650; line-height: 1.25; }
.top .urole { font-size: 11.5px; color: var(--muted); line-height: 1.25; }

.wrap { padding: 20px 22px 56px; max-width: 1500px; width: 100%; }

/* ------------------------------------------------------------------ 通用块 */

.chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px; border-radius: 999px;
    background: var(--panel-3); color: var(--ink-2);
    font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.chip.gold { background: var(--gold-soft); color: var(--brand-ink); }
.chip.green { background: var(--green-soft); color: var(--green); }
.chip.red { background: var(--red-soft); color: var(--red); }
.chip.blue { background: var(--blue-soft); color: var(--blue); }
.chip.purple { background: var(--purple-soft); color: var(--purple); }
.chip.teal { background: var(--teal-soft); color: var(--teal); }
.chip.pink { background: var(--pink-soft); color: var(--pink); }
.chip.gray { background: var(--gray-soft); color: var(--gray); }
.chip.tiny { padding: 1px 7px; font-size: 10.5px; }

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}
.card > header {
    display: flex; align-items: center; gap: 10px;
    padding: 13px 16px; border-bottom: 1px solid var(--line);
}
.card > header h2 {
    font-size: 14px;
    display: flex;
    align-items: center;
}
/* 标题前的斜切色块：LOGO 飞鸟的斜向切面，落到信息层级上最小的那次复现。
   全站所有卡片共用一处定义，所以标题左缘是齐的——比每张卡自己加装饰稳。 */
.card > header h2::before {
    content: '';
    flex: 0 0 3px;
    width: 3px;
    height: 13px;
    margin-right: 9px;
    border-radius: 1px;
    background: var(--brand-grad);
    transform: skewX(-12deg);
}
.card > header .sp { margin-left: auto; }
.card > .body { padding: 16px; }
.card > .body.tight { padding: 0; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g23 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g32 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }

.empty {
    padding: 26px 16px; text-align: center;
    color: var(--muted-2); font-size: 13px;
}

.hint { font-size: 12px; color: var(--muted); line-height: 1.7; }
.mono { font-family: var(--mono); font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt0 { margin-top: 0; }
.mb0 { margin-bottom: 0; }
.mt8 { margin-top: 8px; }
.mt12 { margin-top: 12px; }
.mt16 { margin-top: 16px; }
.sep { height: 1px; background: var(--line); margin: 14px 0; }

/* ------------------------------------------------------------------ 指标卡 */

.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); }

.kpi {
    background: var(--panel); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 13px 14px;
    box-shadow: var(--shadow-sm);
}
.kpi .lb { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .lb::before {
    content: '';
    flex: 0 0 2px;
    width: 2px;
    height: 10px;
    border-radius: 1px;
    background: var(--brand-2);
    transform: skewX(-12deg);
}
.kpi .vl {
    font-size: 23px; font-weight: 700; letter-spacing: -.02em;
    margin: 6px 0 2px; font-variant-numeric: tabular-nums;
}
.kpi .vl small { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.kpi .ft { font-size: 11.5px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.kpi .ft b { font-weight: 700; }

/* 中国习惯：涨红 / 跌绿 */
.up { color: var(--red); }
.down { color: var(--green); }
.flat { color: var(--muted); }

/* 达成率进度 */
.prog { height: 6px; border-radius: 999px; background: var(--panel-3); overflow: hidden; margin-top: 9px; }
.prog i { display: block; height: 100%; border-radius: 999px; background: var(--brand-grad); }

/* ------------------------------------------------------------------ 表单 */

.form { display: grid; gap: 12px; }
.form.inline { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; }
.f { display: flex; flex-direction: column; gap: 5px; }
.f > label { font-size: 12px; color: var(--muted); font-weight: 600; }
.f .tip { font-size: 11px; color: var(--muted-2); }

input[type=text], input[type=password], input[type=email], input[type=number],
input[type=date], input[type=search], select, textarea {
    width: 100%; padding: 8px 10px;
    background: var(--panel); color: var(--ink);
    border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    font: inherit; font-size: 13px;
    transition: border-color .12s ease, box-shadow .12s ease;
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--gold-2);
    box-shadow: 0 0 0 3px var(--brand-glow);
}
textarea { min-height: 84px; resize: vertical; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; }
select {
    appearance: none; padding-right: 28px;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
    background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
input[type=checkbox] { width: auto; accent-color: var(--gold); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 14px; border-radius: var(--radius-sm);
    border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink-2);
    font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
    transition: background .12s ease, border-color .12s ease, transform .06s ease;
}
.btn:hover { background: var(--panel-3); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary {
    background: var(--brand-grad);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 1px 2px rgba(182, 52, 34, .22), 0 8px 18px -10px rgba(218, 84, 32, .6);
}
.btn.primary:hover { background: var(--brand-grad-hover, linear-gradient(135deg, #A22E1E 0%, #C9481A 46%, #DB761F 100%)); }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger:hover { background: #A02D24; }
.btn.ghost { background: transparent; border-color: var(--line-strong); color: var(--ink-2); }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ------------------------------------------------------------------ 表格 */

.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
    text-align: left; padding: 9px 12px;
    background: var(--panel-2); color: var(--muted);
    font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
    border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.tbl td {
    padding: 9px 12px; border-bottom: 1px solid var(--panel-3);
    vertical-align: middle;
}
table.tbl tbody tr:hover { background: var(--panel-2); }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl .strong { font-weight: 650; }

/* ------------------------------------------------------------------ 标签页 */

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--panel-3); border-radius: var(--radius-sm); overflow-x: auto; }
.tabs a {
    padding: 6px 12px; border-radius: 6px; font-size: 12.5px; font-weight: 600;
    color: var(--muted); white-space: nowrap; text-decoration: none;
}
.tabs a:hover { background: rgba(255, 255, 255, .7); text-decoration: none; }
.tabs a.on { background: var(--panel); color: var(--brand-ink); font-weight: 700; box-shadow: var(--shadow-sm); }

.ctabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.ctabs a {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 12px; border-radius: 999px;
    background: var(--panel); border: 1px solid var(--line);
    font-size: 12.5px; font-weight: 600; color: var(--ink-2); text-decoration: none;
}
.ctabs a:hover { border-color: var(--line-strong); text-decoration: none; }
.ctabs a.on {
    background: var(--brand-soft);
    border-color: var(--brand);
    color: var(--brand-ink);
    box-shadow: 0 1px 2px rgba(182, 52, 34, .1);
}
.ctabs a .code { font-size: 10.5px; font-weight: 700; color: var(--muted); }
.ctabs a.on .code { color: var(--brand); }

/* ------------------------------------------------------------------ 提示条 */

.flash {
    display: flex; align-items: flex-start; gap: 9px;
    padding: 10px 14px; border-radius: var(--radius-sm);
    margin-bottom: 14px; font-size: 13px;
    border: 1px solid transparent;
}
.flash.ok { background: var(--green-soft); border-color: #CADFD3; color: #2E5B3E; }
.flash.err { background: var(--red-soft); border-color: #EFCDC9; color: #8E2A22; }
.flash.warn { background: var(--amber-soft); border-color: #F3CDB9; color: var(--brand-ink); }
.flash .i { font-weight: 700; }
.flash ul { margin: 4px 0 0; padding-left: 18px; }

.note {
    display: flex; gap: 8px; align-items: flex-start;
    padding: 10px 12px; border-radius: var(--radius-sm);
    background: var(--amber-soft); border: 1px solid #F3CDB9;
    color: var(--brand-ink); font-size: 12.5px; line-height: 1.7;
}

/* ------------------------------------------------------------------ 时间线 */

.timeline { position: relative; padding-left: 20px; }
.timeline::before {
    content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px;
    width: 2px; background: var(--line);
}
.timeline .it { position: relative; padding-bottom: 14px; }
.timeline .it::before {
    content: ''; position: absolute; left: -19px; top: 5px;
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--gold); border: 2px solid var(--panel);
    box-shadow: 0 0 0 1px var(--line-strong);
}
.timeline .it .hd { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.timeline .it .tm { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }
.timeline .it .cm {
    font-size: 12.5px; color: var(--ink-2); margin-top: 5px;
    background: var(--panel-2); padding: 6px 10px; border-radius: 6px;
}

/* ------------------------------------------------------------------ 门户 */

.role-hero {
    position: relative;
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
    padding: 20px 22px 20px 24px; border-radius: var(--radius);
    background: linear-gradient(118deg, #FFFCFA 0%, var(--brand-soft) 100%);
    border: 1px solid #F5D3C2; margin-bottom: 16px;
    overflow: hidden;
}
.role-hero::before {
    content: '';
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--brand-grad);
}
.role-hero .hi { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.role-hero .tl { font-size: 13px; color: var(--brand-ink); margin-top: 3px; }
.role-hero .sp { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------ 今日待办条 */
/* 一条待办 = 一次跳转。数字在前（扫一眼就知道积压多少）、动作在后
   （不用再猜点了会去哪），比堆一排红 chip 有用。 */

.todo-bar {
    display: flex;
    align-items: stretch;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 16px;
    overflow: hidden;
}
.todo-bar .tb-lead {
    display: flex; align-items: center;
    padding: 0 15px;
    font-size: 11.5px; font-weight: 700; letter-spacing: .08em;
    color: var(--brand-ink);
    background: var(--brand-soft);
    border-right: 1px solid #F5D3C2;
    white-space: nowrap;
}
.todo-bar a {
    flex: 1;
    display: flex; align-items: center; gap: 9px;
    padding: 12px 16px;
    text-decoration: none; color: var(--ink-2);
    border-right: 1px solid var(--line);
    transition: background .13s ease;
}
.todo-bar a:last-child { border-right: 0; }
.todo-bar a:hover { background: var(--panel-2); text-decoration: none; }
.todo-bar .n {
    font-size: 21px; font-weight: 800; line-height: 1;
    color: var(--brand-deep);
    font-variant-numeric: tabular-nums;
}
.todo-bar .lb { font-size: 12.5px; }
.todo-bar .go {
    margin-left: auto;
    font-size: 11.5px; font-weight: 650;
    color: var(--muted-2);
    white-space: nowrap;
}
.todo-bar a:hover .go { color: var(--brand); }

/* ------------------------------------------------------------ 紧凑列表 */
/* 用于「能力中心」这类目标明确的入口：一行一个，描述折成单行，
   扫描成本比卡片网格低，也不会和上方的大卡抢注意力。 */
.row-list { display: grid; }
.row-it {
    display: flex; align-items: center; gap: 11px;
    padding: 11px 6px;
    border-bottom: 1px solid var(--panel-3);
    text-decoration: none; color: inherit;
    border-radius: var(--radius-sm);
}
.row-it:last-child { border-bottom: 0; }
.row-it:hover { background: var(--panel-2); text-decoration: none; }
.row-it .k {
    flex: 0 0 26px; height: 26px; border-radius: 6px;
    background: var(--brand-soft); color: var(--brand-ink);
    font-size: 11px; font-weight: 800;
    display: grid; place-items: center;
}
.row-it .bd { display: grid; gap: 2px; min-width: 0; }
.row-it b { font-size: 13.5px; font-weight: 650; }
.row-it em {
    font-style: normal; font-size: 11.5px; color: var(--muted);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row-it .go {
    margin-left: auto; font-size: 13px; color: var(--muted-2);
    transition: transform .14s ease, color .14s ease;
}
.row-it:hover .go { color: var(--brand); transform: translateX(2px); }

.menu-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.menu-card {
    display: block; padding: 15px 16px; border-radius: var(--radius);
    background: var(--panel); border: 1px solid var(--line);
    box-shadow: var(--shadow-sm); text-decoration: none; color: inherit;
    transition: border-color .14s ease, transform .14s ease, box-shadow .14s ease;
}
.menu-card:hover {
    border-color: var(--gold-2); transform: translateY(-2px);
    box-shadow: var(--shadow); text-decoration: none;
}
.menu-card .t { font-size: 14px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.menu-card .d { font-size: 12.5px; color: var(--muted); margin-top: 5px; line-height: 1.6; }
.menu-card .go { font-size: 12px; color: var(--gold); font-weight: 600; margin-top: 10px; }

/* ------------------------------------------------------------------ 图表 */

svg.chart { width: 100%; height: auto; display: block; }

.bars { display: grid; gap: 8px; }
.bars .bar { display: grid; grid-template-columns: minmax(70px, 128px) 1fr auto; gap: 10px; align-items: center; font-size: 12.5px; }
.bars .bar .nm { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .bar .track { height: 8px; border-radius: 999px; background: var(--panel-3); overflow: hidden; }
.bars .bar .fill { display: block; height: 100%; border-radius: 999px; }
.bars .bar .v { font-variant-numeric: tabular-nums; }
.bars .bar .v b { font-weight: 700; }

.vbars { display: flex; align-items: flex-end; gap: 6px; height: 130px; padding-top: 16px; }
.vbars .c { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 4px; }
.vbars .c b { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.vbars .c i { display: block; width: 100%; max-width: 42px; border-radius: 4px 4px 0 0; }
.vlab { display: flex; gap: 6px; margin-top: 5px; }
.vlab span { flex: 1; text-align: center; font-size: 10.5px; color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.stack { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--panel-3); }
.stack i { display: block; height: 100%; }

.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.legend b { color: var(--ink-2); font-weight: 700; }

.matrix { overflow-x: auto; }
table.mx { border-collapse: separate; border-spacing: 3px; font-size: 11.5px; }
table.mx th { font-weight: 600; color: var(--muted); padding: 3px 5px; white-space: nowrap; }
table.mx td.name { color: var(--ink-2); white-space: nowrap; padding-right: 6px; }
table.mx .hcell {
    display: block; min-width: 42px; padding: 5px 6px; text-align: center;
    border-radius: 4px; color: #fff; font-variant-numeric: tabular-nums;
}

.heat { display: grid; gap: 3px; }
.heat .h { aspect-ratio: 1; border-radius: 3px; background: var(--panel-3); }
.heat .h.l1 { background: #F7D9C9; }
.heat .h.l2 { background: var(--gold-2); }
.heat .h.l3 { background: var(--gold); }

/* ------------------------------------------------------------------ 登录页 */

.login-page {
    position: relative;
    min-height: 100vh; display: grid; place-items: center; padding: 24px;
    background:
        radial-gradient(820px 460px at 14% -8%, #FDE8DC 0%, transparent 58%),
        radial-gradient(680px 400px at 100% 106%, #FCEDE6 0%, transparent 55%),
        var(--bg);
}
/* 45° 斜纹：飞鸟的斜向切面在整页上的极淡底纹，只做气氛不抢内容 */
.login-page::before {
    content: '';
    position: fixed; inset: 0;
    background-image: repeating-linear-gradient(-45deg, rgba(218, 84, 32, .04) 0 1px, transparent 1px 14px);
    pointer-events: none;
}
.login-box { position: relative; width: 100%; max-width: 396px; }
.login-box .brand-l { text-align: center; margin-bottom: 20px; }
.login-box .brand-l .logo-img {
    display: block;
    width: min(212px, 74%);
    height: auto;
    margin: 0 auto 12px;
    filter: drop-shadow(0 8px 20px rgba(182, 52, 34, .16));
}
.login-box .brand-l h1 { font-size: 19px; }
.login-box .brand-l p { font-size: 12px; color: var(--muted); margin: 0; letter-spacing: .14em; font-weight: 600; }
.login-card {
    position: relative;
    background: var(--panel); border: 1px solid var(--line);
    border-radius: 12px; padding: 24px 22px 22px; box-shadow: var(--shadow);
    overflow: hidden;
}
/* 卡片顶部品牌渐变：登录页唯一一处高饱和，用来定调 */
.login-card::before {
    content: '';
    position: absolute; left: 0; right: 0; top: 0; height: 3px;
    background: var(--brand-grad);
}
.demo-accounts { margin-top: 14px; font-size: 12px; color: var(--muted); }
.demo-accounts .hd { font-weight: 700; color: var(--ink-2); margin-bottom: 6px; font-size: 12px; }
.demo-accounts table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.demo-accounts td { padding: 3px 4px; border-bottom: 1px solid var(--panel-3); }
.demo-accounts td:last-child { text-align: right; font-family: var(--mono); color: var(--ink-2); }

/* 登录页按部门分区：销售部门端 / 碰一碰部门 / 中台其他 */
.demo-accounts .grp { margin-top: 9px; }
.demo-accounts .grp-hd {
    font-weight: 700; color: var(--ink-2); font-size: 11.5px;
    padding: 3px 6px; margin-bottom: 2px;
    background: var(--panel-2); border-left: 2px solid var(--line-strong);
    border-radius: 0 3px 3px 0;
}
.demo-accounts .grp-hd span { font-weight: 400; color: var(--muted); margin-left: 6px; font-size: 11px; }

/* ------------------------------------------------------------------ 代码块 / 步骤 */

pre.out {
    margin: 0; padding: 13px 14px;
    background: #FBF9F6; border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-family: var(--mono); font-size: 12.5px; line-height: 1.75;
    white-space: pre-wrap; word-break: break-word; color: var(--ink-2);
    max-height: 460px; overflow: auto;
}

.steps { counter-reset: s; display: grid; gap: 10px; }
.steps .st { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--ink-2); }
.steps .st::before {
    counter-increment: s; content: counter(s);
    flex: 0 0 19px; height: 19px; border-radius: 50%;
    background: var(--gold-soft); color: var(--brand-ink);
    font-size: 11px; font-weight: 700; display: grid; place-items: center; margin-top: 1px;
}

/* ------------------------------------------------------------------ 适配 */

/* ------------------------------------------------------------------ 碰一下运营中心 */

/* 分页条（自建视图，不依赖 Tailwind 分页模板） */
.pager {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding: 12px 16px; border-top: 1px solid var(--line);
    font-size: 12px; color: var(--muted);
}
.pager .sp { margin-left: auto; }
.btn.disabled, .btn[disabled] { opacity: .42; pointer-events: none; }

/* 基础看板：省份卡片 */
.nfc-provs { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }
.prov { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); overflow: hidden; }
.prov > .hd {
    display: flex; align-items: center; gap: 8px;
    padding: 11px 13px; background: var(--panel-2); border-bottom: 1px solid var(--line);
}
.prov > .hd .nm { font-size: 13px; font-weight: 700; }
.prov > .hd .sp { margin-left: auto; }
.prov .city .cn {
    display: flex; align-items: center; gap: 6px;
    font-size: 11.5px; font-weight: 700; color: var(--muted);
    padding: 9px 13px 4px;
}
.prov table { width: 100%; border-collapse: collapse; }
.prov table th {
    font-size: 10.5px; font-weight: 600; color: var(--muted-2);
    text-align: right; padding: 3px 6px; border-bottom: 1px solid var(--line);
}
.prov table th:first-child { text-align: left; padding-left: 13px; }
.prov table td {
    padding: 4px 6px; font-size: 12px; text-align: right;
    border-bottom: 1px dashed var(--line);
}
.prov table td:first-child { text-align: left; padding-left: 13px; }
.prov table td:last-child { padding-right: 13px; }
.prov table tr:last-child td { border-bottom: 0; }
.ptag { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ptag.ok { color: var(--green); }
.ptag.no { color: var(--muted-2); }

/* 排名序号 */
.rank {
    display: inline-grid; place-items: center; width: 20px; height: 20px;
    border-radius: 6px; background: var(--panel-3);
    font-size: 11px; font-weight: 700; color: var(--muted);
}
.rank.t1 { background: #FBE0CE; color: var(--brand-ink); }
.rank.t2 { background: #EDE6DC; color: #6E6357; }
.rank.t3 { background: #F1DFD3; color: #8C5A32; }

/* 设备台账：长表格横向滚动 + 紧凑字号 */
.scroll-x { overflow-x: auto; }
.tbl td.mini, .tbl th.mini { font-size: 11.5px; }
.mono-sm { font-family: var(--mono); font-size: 11.5px; }
.strong { font-weight: 650; }

/* 字段网格（设备详情等键值展示） */
.kv { display: grid; gap: 12px 18px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.kv .k { font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.kv .v { font-size: 13px; color: var(--ink); word-break: break-all; }

@media (max-width: 1080px) {
    .g4, .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .g23, .g32 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
    .app { grid-template-columns: minmax(0, 1fr); }
    .side {
        position: static; height: auto; border-right: none;
        border-bottom: 1px solid var(--line);
    }
    .nav { display: flex; gap: 6px; overflow-x: auto; padding: 10px; }
    .nav .grp { display: none; }
    .nav a { margin-bottom: 0; white-space: nowrap; }
    .side-foot { display: none; }
    .wrap { padding: 16px 14px 40px; }
    .top { padding: 0 14px; height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
    .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }

    /* 待办条在窄屏必须竖排：三个事项挤一行会把「条未读消息」压成竖排字，
       并把 230 那项顶出屏幕，连累整页出现横向滚动。 */
    .todo-bar { flex-direction: column; align-items: stretch; }
    .todo-bar .tb-lead {
        border-right: 0;
        border-bottom: 1px solid #F5D3C2;
        padding: 7px 14px;
    }
    .todo-bar a { border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 14px; }
    .todo-bar a:last-child { border-bottom: 0; }
    .todo-bar .lb { white-space: normal; }

    /* 顶栏在手机上优先保住身份与操作，搜索只留图标 */
    .search-btn .lbl { display: none; }
    .search-btn kbd { display: none; }
    .top .who > span:last-child { display: none; }
    .top .chip { display: none; }
}

/* ===== 客户运营（N 中心新增）===== */

/* tab 分组：设备运营 / 客户运营 / 我的，用竖线分隔避免 11 个 tab 糊成一片 */
.nfc-tabs { flex-wrap: wrap; }
.nfc-tabs .tab-group {
    font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
    color: var(--muted-2); text-transform: none;
    padding: 0 2px 0 10px; display: inline-flex; align-items: center;
    border-left: 1px solid var(--line); margin-left: 4px;
}
.nfc-tabs .tab-group:first-child { border-left: 0; margin-left: 0; padding-left: 6px; }

/* 客户池：勾选列与批量操作条 */
.pick { width: 34px; text-align: center; }
.pick input { width: 15px; height: 15px; cursor: pointer; accent-color: var(--gold); }
.bulkbar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 10px 14px; border-radius: var(--radius-sm);
    background: var(--panel-3); border: 1px solid var(--line);
    margin-bottom: 12px; font-size: 12.5px;
}
/* ⚠ 表单控件的全局样式是 width:100%（表单里竖排时是对的），
   但放进 flex 行内会把每个控件撑满整行，批量操作栏因此被挤成三四行、
   白占两百多像素高。行内布局必须显式放开宽度。 */
.bulkbar > select,
.bulkbar > input[type=text],
.bulkbar > input[type=number],
.bulkbar > input[type=date] {
    width: auto;
    flex: 0 0 auto;
    min-width: 130px;
    max-width: 240px;
}
.bulkbar .cnt { white-space: nowrap; }
.bulkbar .cnt { font-weight: 700; color: var(--ink); }
.bulkbar .cnt b { color: var(--gold-ink, var(--brand-ink)); font-size: 14px; }

/* 客户名 + 商户号双行 */
.cust { display: grid; gap: 2px; }
.cust .nm { font-weight: 600; color: var(--ink); }
.cust .sub { font-size: 11px; color: var(--muted-2); font-variant-numeric: tabular-nums; }

/* 意向等级徽标 */
.lv {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 6px;
    font-size: 11px; font-weight: 800;
}
.lv.A { background: #FBE3E3; color: #B23B3B; }
.lv.B { background: #FCEFD8; color: #9A6A12; }
.lv.C { background: #E6EEF9; color: #3A5F8C; }
.lv.D { background: var(--panel-3); color: var(--muted-2); }

/* 阶段徽标 */
.stg { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.stg.new { background: var(--panel-3); color: var(--muted); }
.stg.following { background: #E8F0FB; color: #35608F; }
.stg.quoted { background: #FCF0DA; color: #97660E; }
.stg.signed { background: #E3F2E7; color: #2E6B41; }
.stg.lost { background: #F2E6E6; color: #8E4A4A; }

/* 跟进超时红标 */
.stale { color: #B23B3B; font-weight: 700; }
.stale::before { content: "●"; margin-right: 4px; font-size: 9px; vertical-align: middle; }

/* 拜访时间线 */
.tline { display: grid; gap: 0; }
.tline .ti {
    display: grid; grid-template-columns: 96px 18px 1fr; gap: 10px;
    padding-bottom: 16px; position: relative;
}
.tline .ti:last-child { padding-bottom: 0; }
.tline .ti .when { font-size: 11.5px; color: var(--muted); text-align: right; padding-top: 2px; font-variant-numeric: tabular-nums; }
.tline .ti .dot {
    width: 9px; height: 9px; border-radius: 50%; margin-top: 6px;
    background: var(--gold); position: relative; z-index: 1;
}
.tline .ti .dot.plain { background: var(--line-2, #D8D2C8); }
.tline .ti::after {
    content: ""; position: absolute; left: 104px; top: 15px; bottom: 0;
    width: 1px; background: var(--line);
}
.tline .ti:last-child::after { display: none; }
.tline .ti .bd { display: grid; gap: 5px; }
.tline .ti .hd { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tline .ti .tx { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; white-space: pre-wrap; }
.tline .ti .meta { font-size: 11.5px; color: var(--muted-2); display: flex; gap: 12px; flex-wrap: wrap; }

/* 任务进度卡 */
.tgt { display: grid; gap: 10px; }
.tgt .m { display: grid; gap: 4px; }
.tgt .m .top { display: flex; justify-content: space-between; font-size: 12px; }
.tgt .m .top .lb { color: var(--muted); }
.tgt .m .top .vv { font-variant-numeric: tabular-nums; font-weight: 700; }
.tgt .m .prog i.ok { background: var(--green); }
.tgt .m .prog i.warn { background: var(--gold); }
.tgt .m .prog i.bad { background: #C25B5B; }

/* 拜访表单 */
.visit-form { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.visit-form .f.full { grid-column: 1 / -1; }
.visit-form textarea { min-height: 84px; resize: vertical; }

/* 迷你趋势条（客户拜访频率） */
.spark { display: flex; align-items: flex-end; gap: 3px; height: 34px; }
.spark i { flex: 1; background: var(--gold); opacity: .35; border-radius: 2px 2px 0 0; min-height: 2px; }
.spark i.on { opacity: 1; }

/* =========================================================
   客户运营 · 三级链路（老板 → 销售主管 → 销售员工）
   ========================================================= */

/* 录入 / 导入 双栏 */
.grid2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); align-items: start; }

/* 折叠抽屉：零 JS 的展开收起 */
.drawer {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-2);
    overflow: hidden;
}
.drawer > summary {
    padding: 12px 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}
.drawer > summary::-webkit-details-marker { display: none; }
.drawer > summary::before {
    content: "▸";
    color: var(--gold);
    font-size: 12px;
    transition: transform .15s ease;
}
.drawer[open] > summary::before { transform: rotate(90deg); }
.drawer > summary:hover { background: var(--panel-3); }
.drawer[open] > summary { border-bottom: 1px solid var(--line); }
.drawer > .form,
.drawer > .hint,
.drawer > .import-result { padding: 14px; }
.drawer > .hint:first-of-type { padding-top: 14px; }

/* 导入结果 */
.import-result {
    margin-top: 12px;
    padding: 12px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--panel);
}
.import-result .red { color: var(--red); }

/* 定位条 */
.loc-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel-2);
}
.loc-bar .hint { font-size: 12px; }
.loc-bar .hint.ok { color: var(--green); }
.loc-bar .hint.err { color: var(--red); }

/* 照片缩略图 */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 8px;
    margin-top: 8px;
}
.photo-grid:empty { display: none; }
.photo-grid img {
    width: 100%;
    height: 88px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--panel-3);
    display: block;
}
.photo-grid a { display: block; }

/* 团队跟进流水（左时间右内容，不复用客户时间线的竖线结构） */
.tline .tl {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--line);
}
.tline .tl:last-child { border-bottom: 0; }
.tline .tl-time {
    display: grid;
    gap: 2px;
    align-content: start;
    font-size: 11.5px;
    color: var(--muted);
    padding-top: 2px;
}
.tline .tl-time b { font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; }
.tline .tl-body { display: grid; gap: 6px; min-width: 0; }
.tline .tl-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; }
.tline .tl-head a { color: var(--blue); text-decoration: none; }
.tline .tl-head a:hover { text-decoration: underline; }
.tline .tl-content { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; white-space: pre-wrap; }
.tline .tl-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted-2); }

/* 小号表格 */
.tbl.sm { font-size: 12px; }
.tbl.sm th, .tbl.sm td { padding: 6px 9px; }

/* ============================================================== 命令面板 */
/* 目的很实际：能力中心 + 二级页签一共三十多个入口，靠侧栏找目标页面
   要点四五下。给一个 Ctrl+K 的直达口，老手不用离开键盘。 */

.cmdk { position: fixed; inset: 0; z-index: 90; }
.cmdk[hidden] { display: none; }
.cmdk-mask {
    position: absolute; inset: 0;
    background: rgba(29, 20, 17, .46);
    backdrop-filter: blur(2px);
}
.cmdk-box {
    position: relative;
    width: min(564px, calc(100vw - 32px));
    margin: 11vh auto 0;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 30px 90px -34px rgba(29, 20, 17, .6);
    overflow: hidden;
    animation: cmdk-in .16s cubic-bezier(.16, 1, .3, 1);
}
@keyframes cmdk-in { from { opacity: 0; transform: translateY(-8px) scale(.985); } }

.cmdk-in {
    display: flex; align-items: center; gap: 10px;
    padding: 13px 15px; border-bottom: 1px solid var(--line);
}
.cmdk-in .ico { font-size: 16px; color: var(--brand); line-height: 1; }
.cmdk-in input {
    flex: 1; min-width: 0;
    border: 0; padding: 0; background: transparent;
    font-size: 15px; color: var(--ink);
}
.cmdk-in input:focus { box-shadow: none; border: 0; outline: none; }
.cmdk-in kbd {
    font: inherit; font-size: 10.5px; font-weight: 700;
    padding: 2px 6px; border-radius: 3px;
    background: var(--panel-3); color: var(--muted); border: 1px solid var(--line);
}

.cmdk-list { max-height: 46vh; overflow-y: auto; padding: 6px; }
.cmdk-g {
    padding: 8px 10px 5px;
    font-size: 10.5px; font-weight: 700; letter-spacing: .09em;
    color: var(--muted-2);
}
.cmdk-g:not(:first-child) { margin-top: 3px; border-top: 1px solid var(--panel-3); padding-top: 10px; }
.cmdk-it {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px; border-radius: var(--radius-sm);
    text-decoration: none; color: var(--ink-2);
}
.cmdk-it .k {
    flex: 0 0 22px; height: 22px; border-radius: 5px;
    background: var(--panel-3); color: var(--muted);
    font-size: 10.5px; font-weight: 800;
    display: grid; place-items: center;
}
.cmdk-it b { font-weight: 600; font-size: 13.5px; }
.cmdk-it .go { margin-left: auto; font-size: 12px; color: var(--muted-2); opacity: 0; }
.cmdk-it.sel { background: var(--brand-soft); color: var(--brand-ink); text-decoration: none; }
.cmdk-it.sel .k { background: var(--brand-grad); color: #fff; }
.cmdk-it.sel .go { opacity: 1; color: var(--brand-deep); }
.cmdk-empty { padding: 24px; text-align: center; color: var(--muted-2); font-size: 13px; }

.cmdk-foot {
    display: flex; align-items: center; gap: 14px;
    padding: 9px 14px; border-top: 1px solid var(--line);
    background: var(--panel-2); font-size: 11.5px; color: var(--muted);
}
.cmdk-foot b { color: var(--ink-2); font-weight: 700; }
.cmdk-foot .sp { margin-left: auto; }

/* ==========================================================================
   部门运行中心（v2.0）
   --------------------------------------------------------------------------
   三页共用：部门卡片、人员行、档案页。
   只用品牌语义变量，不写死色值——VI 调整时这段不用改。
   ========================================================================== */

.dept-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }

.dept-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.dept-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-1px); }

.dept-card .hd {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 13px 14px 11px;
    border-bottom: 1px solid var(--panel-3);
}
.dept-card .hd .nm { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.dept-card .hd .cd { font: 10.5px/1.5 var(--mono); color: var(--muted-2); margin-top: 1px; }
.dept-card .hd .st { margin-left: auto; flex: 0 0 auto; }

.dept-lead {
    display: flex; align-items: center; gap: 9px;
    padding: 10px 14px;
    border-bottom: 1px dashed var(--line);
    font-size: 13px;
}
.dept-lead .who { min-width: 0; }
.dept-lead .who b { font-weight: 650; }
.dept-lead .who span { color: var(--muted); font-size: 11.5px; margin-left: 6px; }
.dept-lead .none { color: var(--red); font-size: 12.5px; font-weight: 600; }

.avatar {
    flex: 0 0 auto;
    width: 28px; height: 28px; border-radius: 50%;
    display: grid; place-items: center;
    font-size: 12px; font-weight: 700; color: #fff;
    background: var(--brand-grad);
    letter-spacing: 0;
}
.avatar.sm { width: 24px; height: 24px; font-size: 11px; }
.avatar.ghost { background: var(--panel-3); color: var(--muted); }

.dept-metrics { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--panel-3); }
.dept-metrics > div { padding: 9px 12px; border-right: 1px solid var(--panel-3); }
.dept-metrics > div:last-child { border-right: 0; }
.dept-metrics .k { font-size: 10.5px; color: var(--muted); letter-spacing: .02em; }
.dept-metrics .v { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.35; }
.dept-metrics .v small { font-size: 11px; font-weight: 600; color: var(--muted); margin-left: 2px; }

.dept-body { padding: 11px 14px; display: grid; gap: 8px; }
.dept-line { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); }
.dept-line .lb { color: var(--muted); flex: 0 0 52px; }
.dept-line .sp { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; }

.meter { height: 5px; border-radius: 3px; background: var(--panel-3); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--brand-grad); border-radius: 3px; }
.meter.warn i { background: var(--amber); }
.meter.bad i { background: var(--red); }

.spark { display: flex; align-items: flex-end; gap: 2px; height: 24px; }
/* 无动作日不能画成透明：14 根柱子只剩 5 根浮在白底上，
   读起来像「这个部门只有 5 天在干活」，而真相是那 9 天为 0。
   留一条浅色基线，0 也要有 0 的形状。 */
.spark i { flex: 1 1 0; background: rgba(35, 24, 21, .10); border-radius: 1px 1px 0 0; min-height: 3px; }
.spark i.on { background: var(--brand-2); }

.dept-card .ft {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 14px;
    background: var(--panel-2);
    border-top: 1px solid var(--panel-3);
    margin-top: auto;
    font-size: 12px;
}
.dept-card .ft a { font-weight: 600; }

/* ---- 部门详情：人员表 ---- */

.dept-hero {
    display: flex; flex-wrap: wrap; gap: 12px 26px; align-items: center;
    padding: 2px 0 12px;
    border-bottom: 1px dashed var(--line);
    margin-bottom: 12px;
}
.dept-hero .blk { display: flex; align-items: center; gap: 9px; }
.dept-hero .blk .lb { font-size: 11px; color: var(--muted); display: block; line-height: 1.4; }
.dept-hero .blk .vl { font-size: 14px; font-weight: 650; line-height: 1.45; }

.person { display: flex; align-items: center; gap: 9px; min-width: 0; }
.person .who { min-width: 0; }
.person .nm { font-weight: 600; color: var(--ink); display: block; line-height: 1.35; }
.person .nm:hover { color: var(--brand-deep); }
.person .sub { font-size: 11px; color: var(--muted); font-family: var(--mono); }

.idle { font-variant-numeric: tabular-nums; }
.idle.warn { color: var(--amber); font-weight: 600; }
.idle.bad { color: var(--red); font-weight: 600; }

/* ---- 人员档案 ---- */

.pf { display: grid; grid-template-columns: 292px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 980px) { .pf { grid-template-columns: 1fr; } }

.pf-id { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--panel-3); margin-bottom: 12px; }
.pf-id .avatar { width: 44px; height: 44px; font-size: 16px; }
.pf-id .nm { font-size: 17px; font-weight: 700; line-height: 1.3; }
.pf-id .sub { font-size: 12px; color: var(--muted); }

.kv { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 7px 10px; font-size: 12.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink-2); }
.kv dd b { font-weight: 650; color: var(--ink); }

.stat-mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.stat-mini > div { background: var(--panel); padding: 10px 12px; }
.stat-mini .k { font-size: 10.5px; color: var(--muted); }
.stat-mini .v { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.3; }

.act { display: grid; gap: 0; }
.act .row { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--panel-3); font-size: 12.5px; }
.act .row:last-child { border-bottom: 0; }
.act .t { flex: 0 0 84px; color: var(--muted-2); font-variant-numeric: tabular-nums; font-size: 11.5px; }
.act .m { flex: 0 0 46px; }
.act .x { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act .ok { color: var(--green); }
.act .no { color: var(--red); }

/* ---- 口径说明 ---- */
.rules { display: grid; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.rules b { color: var(--ink); }

/* ---- 报表单元格：数值 + 环比（v2.2）---- */
.rate-cell { display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.rate-cell b { font-weight: 650; }
.rate-cell .mini { font-size: 11px; color: var(--muted); }

/* 任务达标进度条与说明并列时，说明文字不换行挤掉进度条 */
.target-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---- AI 文本块（v2.2）：保留换行，等宽数字对齐 ---- */
.ai-text {
    white-space: pre-wrap; line-height: 1.75; font-size: 13px; color: var(--ink-2);
    background: var(--panel-2); border: 1px solid var(--line);
    border-radius: var(--radius-sm); padding: 14px 16px;
}
