/* ==========================================================================
   招聘系统 · 自研样式（Tailwind 设计语言）
   无任何外部依赖（不引 Bootstrap / AdminLTE / Tailwind / FontAwesome / jQuery）

   配色（三色为主，其余为同族明度派生）：
   - 品牌蓝 #0066b1：主按钮、链接、选中态、焦点环、信息提示
   - 中灰   #6f6f6f：次要文字与说明文案（--c-text-muted）
   - 纯白   #ffffff：页面与卡片、面板底色
   其余为中性灰阶（#2b2b2b 正文、#4d4d4d 次级、#9e9e9e 占位，边框 #e5e5e5 / #d2d2d2）
   与功能语义色（成功绿 / 警告琥珀 / 危险红）。

   主题可切换：默认品牌蓝，另提供琥珀金 / 草木青绿 / 朱红米白 / 金红，见下方「1.1 主题配色」；
   由「个人设置 · 外观」写入 hunter_theme Cookie，服务端在 <html data-theme> 上输出。
   各主题一律保持白色背景，仅替换主色 / 填充色 / 次级色（个别主题另行微调正文墨色）。

   设计语言对齐 Tailwind CSS：
   - 圆角 rounded-lg(8) / rounded-xl(12) / pill
   - 阴影 shadow-sm / shadow / shadow-md
   - 焦点环 ring-4（3px 半透明主色）
   - 间距按 4/8 的倍数取值

   前台与管理端共用本文件；管理端额外使用「侧边栏布局」部分。
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 设计变量
   -------------------------------------------------------------------------- */
:root {
    /* 表面与边框：纯白打底，中性灰描边 */
    --c-bg: #ffffff;
    --c-surface: #ffffff;
    --c-surface-2: #f4f4f4;
    --c-surface-3: #f7f7f7;
    --c-border: #e5e5e5;
    --c-border-strong: #d2d2d2;

    /* 文字：中性灰阶（次要说明文案即品牌中灰 #6f6f6f） */
    --c-text: #2b2b2b;
    --c-text-soft: #4d4d4d;
    --c-text-muted: #6f6f6f;
    --c-text-faint: #9e9e9e;

    /* 主色：品牌蓝
       主色按「用途」拆成两组变量，便于整体换肤（见文件下方「主题配色」）：
         · 墨色组（--c-primary / -dark / -soft / -border）：浅色底上的文字、链接、图标与描边，
           必须与白色背景保持足够对比；
         · 填充组（--c-primary-fill / -fill-dark / --c-on-primary）：实心按钮、徽标、进度条等
           大面积色块，以及色块上的文字颜色。
       默认品牌蓝下两组取值相同；换肤（如琥珀金）时分别取值，兼顾「品牌色醒目」与「文字可读」。 */
    --c-primary: #0066b1;
    --c-primary-dark: #00518c;
    --c-primary-soft: #eaf3fa;
    --c-primary-border: #b9d5ea;
    --c-primary-fill: #0066b1;
    --c-primary-fill-dark: #00518c;
    --c-on-primary: #ffffff;
    --c-primary-tint: rgb(0 102 177 / .12);

    /* 语义色（信息色与主色统一，避免出现第二种蓝） */
    --c-success: #059669;
    --c-success-soft: #ecfdf5;
    --c-success-border: #a7f3d0;
    --c-warning: #b45309;
    --c-warning-soft: #fffbeb;
    --c-warning-border: #fde68a;
    --c-danger: #dc2626;
    --c-danger-soft: #fef2f2;
    --c-danger-border: #fecaca;
    --c-info: #0066b1;
    --c-info-soft: #eaf3fa;
    --c-info-border: #b9d5ea;
    --c-info-ink: #0a4f80;

    /* 形状与阴影 */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    /* 表单控件统一高度：文本框、按钮、多选下拉、勾选块、验证码图共用，保证同一行视觉等高 */
    --control-h: 38px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / .05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / .07), 0 1px 2px -1px rgb(0 0 0 / .05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .07), 0 2px 4px -2px rgb(0 0 0 / .05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .08), 0 4px 6px -4px rgb(0 0 0 / .05);
    --ring: 0 0 0 3px rgb(0 102 177 / .18);

    --sidebar-w: 216px;
    --topbar-h: 56px;

    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
}

/* --------------------------------------------------------------------------
   1.1 主题配色（可切换）
   --------------------------------------------------------------------------
   由「个人设置 · 外观」写入 hunter_theme Cookie（服务端白名单校验），
   布局在 <html data-theme="..."> 上输出；未设置或为 blue 时用 :root 默认品牌蓝。

   新增一套配色只需：① 在此追加 [data-theme="key"] 覆盖块（可只覆盖 --c-* 变量）；
   ② 在 app/Helpers/app_helper.php 的 theme_options() 里登记 key 与展示信息。
   ⚠️ 换肤块只覆盖变量，不写具体选择器，保证所有页面统一生效。 */

/* 琥珀金：填充用品牌金 #f4af14；浅底文字/链接用可读深金，避免白底金字看不清 */
[data-theme="gold"] {
    --c-primary: #a16207;
    --c-primary-dark: #854d0e;
    --c-primary-soft: #fef6e3;
    --c-primary-border: #f0d68a;
    --c-primary-fill: #f4af14;
    --c-primary-fill-dark: #d99409;
    --c-on-primary: #3f2d00;
    --c-primary-tint: rgb(244 175 20 / .18);

    --c-info: #a16207;
    --c-info-soft: #fef6e3;
    --c-info-border: #f0d68a;
    --c-info-ink: #854d0e;

    --ring: 0 0 0 3px rgb(244 175 20 / .3);
}

/* 草木青绿：仅换主色（草木深绿）与次级色（麦秆暖黄），背景保持纯白 */
[data-theme="green"] {
    /* 主色：草木深绿（明度足够，墨色与填充同值） */
    --c-primary: #117c0d;
    --c-primary-dark: #0b5d08;
    --c-primary-soft: #e6f1e1;
    --c-primary-border: #b6d3ab;
    --c-primary-fill: #117c0d;
    --c-primary-fill-dark: #0b5d08;
    --c-on-primary: #ffffff;
    --c-primary-tint: rgb(17 124 13 / .12);

    /* 次级 / 信息色：麦秆暖黄（第三色，金黄色系而非警告橙） */
    --c-info: #7d5f10;
    --c-info-soft: #fbf2d9;
    --c-info-border: #e8ce86;
    --c-info-ink: #6a5109;

    --ring: 0 0 0 3px rgb(17 124 13 / .2);
}

/* 朱红米白：仅换主色（复古朱红）与次级色（深海夜蓝），背景保持纯白 */
[data-theme="vermilion"] {
    /* 主色：复古朱红 */
    --c-primary: #aa2b3a;
    --c-primary-dark: #8a1f2c;
    --c-primary-soft: #f7e6e4;
    --c-primary-border: #e3b7b6;
    --c-primary-fill: #aa2b3a;
    --c-primary-fill-dark: #8a1f2c;
    --c-on-primary: #ffffff;
    --c-primary-tint: rgb(170 43 58 / .12);

    /* 次级 / 信息色：深海夜蓝（第三色） */
    --c-info: #28314e;
    --c-info-soft: #e5e8f0;
    --c-info-border: #b9c0d4;
    --c-info-ink: #1e2540;

    --ring: 0 0 0 3px rgb(170 43 58 / .2);
}

/* 金红：红作强调（链接 / 选中 / 描边）、黄作实心填充、墨黑作文字与填充上的文字，背景保持纯白 */
[data-theme="scarlet"] {
    /* 主色（墨色）：赤红 —— 浅底上的链接、选中态、描边 */
    --c-primary: #da291c;
    --c-primary-dark: #b01f14;
    --c-primary-soft: #fbe7e5;
    --c-primary-border: #f0beb9;

    /* 主色（填充）：明黄 —— 实心按钮、徽标、进度条，其上文字用墨黑保证对比 */
    --c-primary-fill: #ffc72c;
    --c-primary-fill-dark: #eab41f;
    --c-on-primary: #27251f;
    --c-primary-tint: rgb(218 41 28 / .12);

    /* 正文：墨黑（第三色） */
    --c-text: #27251f;

    /* 次级 / 信息色：明黄（与填充同族的浅色用法） */
    --c-info: #8a6800;
    --c-info-soft: #fff6dc;
    --c-info-border: #f2dc96;
    --c-info-ink: #6f5400;

    --ring: 0 0 0 3px rgb(218 41 28 / .18);
}

/* --------------------------------------------------------------------------
   2. 基础
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--c-bg);
    color: var(--c-text);
    font: 15px/1.65 var(--font-sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; }
h1 { font-size: 1.3rem; }
h2 { font-size: 1.075rem; }
h3 { font-size: 1rem; }
h4 { font-size: .95rem; }
p { margin: 0 0 .75em; }
/* 普通链接文字（内容页的正文 / 表格 / 卡片内的纯文字链接）：主题色，标识「可打开」。
   ⚠️ 本规则是元素级兜底（特异性仅 0,0,1，刻意保持最低），让下面这些场景由各自类名的
   规则继续生效、不被这里的蓝色污染：
     · 按钮式：.btn 全家族（.btn-primary / .btn-outline-* / .btn-sm / .btn-link /
       .btn.is-disabled 伪按钮…）
     · 侧栏 / 顶栏菜单：.sidebar-link / .sidebar-brand / .brand-link
     · 整块可点卡片：.stat / .cand-card / .company-card（自带 color: inherit）
     · 分段 / 筛选 / 徽章：.pos-tab / .chip / .badge-* */
a { color: var(--c-primary); text-decoration: none; }
/* 非颜色辅助反馈：悬停与键盘聚焦时出现下划线。
   :not(.btn) 让按钮保持自身的悬停 / 聚焦观感，不被这里的下划线波及。
   :visited 不另设规则 —— 作者样式 a{} 优先于浏览器的 a:visited，
   已访问链接与未访问同色，避免列表浏览时颜色跳变。 */
a:not(.btn):hover,
a:not(.btn):focus-visible { text-decoration: none; }
hr { border: 0; border-top: 1px solid var(--c-border); margin: 1rem 0; }

:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }

::selection { background: var(--c-primary-soft); }

/* 图标：统一 1em 大小，跟随文字颜色 */
.icon {
    width: 1.05em;
    height: 1.05em;
    flex: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    vertical-align: -.16em;
}

/* --------------------------------------------------------------------------
   3. 布局
   -------------------------------------------------------------------------- */
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.page { padding: 24px 0 48px; }

/* 管理端：左侧栏 + 主区域 */
.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    flex: none;
    background: var(--c-surface);
    border-right: 1px solid var(--c-border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}
.sidebar-brand {
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    font-weight: 600;
    color: var(--c-text);
    border-bottom: 1px solid var(--c-border);
    white-space: nowrap;
}
.sidebar-brand:hover { text-decoration: none; }
.sidebar-brand .brand-logo { width: 24px; height: 24px; }
.sidebar-nav { padding: 10px 8px; overflow-y: auto; }
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    margin-bottom: 2px;
    border-radius: var(--radius-sm);
    color: var(--c-text-soft);
    font-size: .925rem;
    font-weight: 600;
    transition: background .12s ease, color .12s ease;
}
.sidebar-link:hover { background: var(--c-surface-2); color: var(--c-text); text-decoration: none; }
.sidebar-link.active { background: var(--c-primary-soft); color: var(--c-primary-dark); font-weight: 600; }
.sidebar-link .count {
    margin-left: auto;
    font-size: .72rem;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--c-warning-soft);
    color: var(--c-warning);
    font-weight: 600;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    height: var(--topbar-h);
    flex: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    background: rgb(255 255 255 / .92);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--c-border);
    position: sticky;
    top: 0;
    z-index: 20;
}
.topbar-title { font-weight: 600; font-size: 1rem; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.content { padding: 20px; flex: 1; }
.sidebar-toggle { display: none; }

@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        z-index: 40;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        transition: transform .18s ease;
        box-shadow: var(--shadow-lg);
    }
    body.sidebar-open .sidebar { transform: none; }
    body.sidebar-open::after {
        content: "";
        position: fixed;
        inset: 0;
        background: rgb(0 0 0 / .45);
        z-index: 30;
    }
    .sidebar-toggle { display: inline-flex; }
    .content { padding: 14px; }
}

/* 页脚 */
.footer {
    padding: 16px 20px;
    color: var(--c-text-muted);
    font-size: .82rem;
    border-top: 1px solid var(--c-border);
    background: var(--c-surface);
}

/* 前台顶栏品牌 */
.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: .98rem;
    color: var(--c-text);
    letter-spacing: -.01em;
}
.brand-link:hover { text-decoration: none; color: var(--c-primary); }

/* 站点 Logo（public/images/logo.png）：顶栏 / 侧栏 / 登录页品牌位共用 */
.brand-logo {
    display: block;
    flex: none;
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* --------------------------------------------------------------------------
   4. 栅格（够用即可）
   -------------------------------------------------------------------------- */
.row { display: flex; flex-wrap: wrap; gap: 16px; }
.col { flex: 1 1 240px; min-width: 0; }
.col-12 { flex: 1 1 100%; min-width: 0; }
.col-8 { flex: 0 0 calc(66.666% - 6px); min-width: 0; }
.col-4 { flex: 0 0 calc(33.333% - 11px); min-width: 0; }
.col-6 { flex: 0 0 calc(50% - 8px); min-width: 0; }
.col-3 { flex: 0 0 calc(25% - 12px); min-width: 0; }
.col-9 { flex: 0 0 calc(75% - 4px); min-width: 0; }
@media (max-width: 900px) {
    .col-8, .col-4, .col-6, .col-3, .col-9 { flex: 1 1 100%; }
}

/* --------------------------------------------------------------------------
   5. 卡片
   -------------------------------------------------------------------------- */
.card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
    overflow: hidden;
}
.card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--c-border);
    background: linear-gradient(to bottom, var(--c-surface), var(--c-surface-3));
}
.card-head h1, .card-head h2, .card-head h3, .card-head h4 { margin: 0; }
.card-head .spacer, .card-foot .spacer { margin-left: auto; }
.card-body { padding: 16px; }
.card-body.tight { padding: 0; }
.card-foot {
    padding: 12px 16px;
    border-top: 1px solid var(--c-border);
    background: var(--c-surface-3);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.card-accent-primary { border-top: 3px solid var(--c-primary); }
.card-accent-success { border-top: 3px solid var(--c-success); }
.card-accent-info { border-top: 3px solid var(--c-info); }
.card-accent-danger { border-top: 3px solid var(--c-danger); }

/* 空状态：图标 + 主文案 + 说明 + 动作 */
.empty-state { text-align: center; padding: 44px 20px; }
.empty-state .empty-icon {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    background: var(--c-surface-2);
    color: var(--c-text-faint);
}
.empty-state .empty-icon .icon { width: 22px; height: 22px; }
.empty-state .empty-title { font-weight: 600; margin-bottom: 4px; }
.empty-state .empty-text { color: var(--c-text-muted); font-size: .88rem; margin-bottom: 0; }
.empty-state .empty-actions { margin-top: 14px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   6. 统计卡
   -------------------------------------------------------------------------- */
.stat {
    display: block;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
    color: inherit;
    transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}
.stat:hover { text-decoration: none; border-color: var(--c-border-strong); box-shadow: var(--shadow); }
.stat-label { display: flex; align-items: center; gap: 6px; color: var(--c-text-muted); font-size: .83rem; }
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.2; margin: 6px 0 2px; letter-spacing: -.02em; }
.stat-more { color: var(--c-primary); font-size: .82rem; }
.stat.is-primary .stat-value { color: var(--c-primary); }
.stat.is-success .stat-value { color: var(--c-success); }
.stat.is-warning .stat-value { color: var(--c-warning); }
.stat.is-danger .stat-value { color: var(--c-danger); }

/* --------------------------------------------------------------------------
   7. 按钮
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: var(--control-h);
    padding: 0 14px;
    border: 1px solid var(--c-border-strong);
    border-radius: var(--radius-sm);
    background: var(--c-surface);
    color: var(--c-text);
    font: inherit;
    font-size: .9rem;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
    transition: background .12s ease, border-color .12s ease, box-shadow .12s ease, color .12s ease;
}
.btn:hover { background: var(--c-surface-3); text-decoration: none; }
.btn:active { transform: translateY(.5px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:disabled, .btn.is-disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

.btn-primary { background: var(--c-primary-fill); border-color: var(--c-primary-fill); color: var(--c-on-primary); }
.btn-primary:hover { background: var(--c-primary-fill-dark); border-color: var(--c-primary-fill-dark); }
.btn-success { background: var(--c-success); border-color: var(--c-success); color: #fff; }
.btn-success:hover { background: #047857; border-color: #047857; }
.btn-danger { background: var(--c-danger); border-color: var(--c-danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }
.btn-info { background: var(--c-primary-fill); border-color: var(--c-primary-fill); color: var(--c-on-primary); }
.btn-info:hover { background: var(--c-primary-fill-dark); border-color: var(--c-primary-fill-dark); }
.btn-secondary { background: #6f6f6f; border-color: #6f6f6f; color: #fff; }
.btn-secondary:hover { background: #575757; border-color: #575757; }

.btn-outline-primary { color: var(--c-primary); border-color: var(--c-primary-border); background: var(--c-surface); }
.btn-outline-primary:hover { background: var(--c-primary-soft); }
.btn-outline-success { color: var(--c-success); border-color: var(--c-success-border); background: var(--c-surface); }
.btn-outline-success:hover { background: var(--c-success-soft); }
.btn-outline-danger { color: var(--c-danger); border-color: var(--c-danger-border); background: var(--c-surface); }
.btn-outline-danger:hover { background: var(--c-danger-soft); }
.btn-outline-info { color: var(--c-info); border-color: var(--c-info-border); background: var(--c-surface); }
.btn-outline-info:hover { background: var(--c-info-soft); }
.btn-outline-secondary { color: var(--c-text-soft); border-color: var(--c-border-strong); background: var(--c-surface); }
.btn-outline-secondary:hover { background: var(--c-surface-2); }

.btn-ghost { border-color: transparent; background: transparent; color: var(--c-text-soft); box-shadow: none; }
.btn-ghost:hover { background: var(--c-surface-2); color: var(--c-text); }
.btn-link { border: 0; background: none; color: var(--c-primary); min-height: 0; padding: 2px; box-shadow: none; }
.btn-link:hover { background: none; text-decoration: underline; }

/* 尺寸变体：sm 只用于表格行内操作、分页、下拉菜单内部等不与输入框同排的场景 */
.btn-sm { min-height: 30px; padding: 0 11px; font-size: .82rem; border-radius: var(--radius-xs); }
.btn-lg { min-height: 44px; padding: 0 20px; font-size: .97rem; }
.btn-block { display: flex; width: 100%; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
    content: "";
    position: absolute;
    width: 15px;
    height: 15px;
    border: 2px solid rgb(255 255 255 / .45);
    border-top-color: var(--c-on-primary);
    border-radius: 50%;
    animation: btn-spin .7s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   8. 表单
   -------------------------------------------------------------------------- */
.field { margin-bottom: 14px; }
.field > label { display: block; margin-bottom: 5px; font-size: .875rem; font-weight: 500; color: var(--c-text-soft); }
.form-control {
    display: block;
    width: 100%;
    height: var(--control-h);
    padding: 0 12px;
    border: 1px solid var(--c-border-strong);
    border-radius: var(--radius-sm);
    background: var(--c-surface);
    color: var(--c-text);
    font: inherit;
    font-size: .9rem;
    line-height: 1.4;
    transition: border-color .12s ease, box-shadow .12s ease;
}
.form-control::placeholder { color: var(--c-text-faint); }
.form-control:focus { outline: none; border-color: var(--c-primary); box-shadow: var(--ring); }
.form-control.is-invalid { border-color: var(--c-danger); }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgb(220 38 38 / .15); }
/* 多行文本不套用固定高度，否则无法换行显示 */
textarea.form-control { height: auto; min-height: 88px; padding: 10px 12px; line-height: 1.6; }
select.form-control { appearance: none; background-image: none; }
.form-hint { display: block; margin-top: 5px; color: var(--c-text-muted); font-size: .79rem; }
.form-error { display: block; margin-top: 5px; color: var(--c-danger); font-size: .79rem; }
.form-inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.form-inline .field { margin-bottom: 0; }
.form-grid { display: flex; flex-wrap: wrap; gap: 0 14px; }
.form-grid > .field { flex: 1 1 220px; min-width: 0; }
.input-group { display: flex; }
.input-group .form-control { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .btn, .input-group > .captcha-img {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-left: -1px;
}
.captcha-img {
    height: var(--control-h);
    border: 1px solid var(--c-border-strong);
    cursor: pointer;
    display: block;
}
input[type="file"].form-control { padding: 5px 10px; background: var(--c-surface-3); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--c-primary); }

/* 必填星号 */
.req { color: var(--c-danger); }

/* --------------------------------------------------------------------------
   9. 提示条
   -------------------------------------------------------------------------- */
.alert {
    display: flex;
    gap: 8px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid;
    margin-bottom: 14px;
    font-size: .9rem;
    line-height: 1.6;
}
.alert ul { margin: 0; padding-left: 18px; }
.alert-success { background: var(--c-success-soft); border-color: var(--c-success-border); color: #065f46; }
.alert-danger { background: var(--c-danger-soft); border-color: var(--c-danger-border); color: #991b1b; }
.alert-info { background: var(--c-info-soft); border-color: var(--c-info-border); color: var(--c-info-ink); }
.alert-warning { background: var(--c-warning-soft); border-color: var(--c-warning-border); color: #92400e; }
.alert .icon { margin-top: .2em; }
.alert-close {
    margin-left: auto;
    border: 0;
    background: none;
    color: inherit;
    opacity: .55;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 2px;
}
.alert-close:hover { opacity: 1; }

/* --------------------------------------------------------------------------
   10. 表格
   -------------------------------------------------------------------------- */
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--c-border); vertical-align: middle; }
.table th { background: var(--c-surface-3); color: var(--c-text-muted); font-weight: 600; font-size: .8rem; white-space: nowrap; letter-spacing: .01em; }
.table tbody tr:hover { background: #fafafa; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { font-variant-numeric: tabular-nums; color: var(--c-text-soft); }
.table .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.table .empty { text-align: center; color: var(--c-text-muted); padding: 32px 12px; }
.table-fixed-actions th:last-child, .table-fixed-actions td:last-child { text-align: right; }

/* 详情用键值表 */
.kv { width: 100%; border-collapse: collapse; font-size: .9rem; }
.kv th, .kv td { padding: 9px 12px; border-bottom: 1px solid var(--c-border); vertical-align: top; text-align: left; }
.kv th { width: 132px; color: var(--c-text-muted); font-weight: 500; background: var(--c-surface-3); }
.kv tr:last-child th, .kv tr:last-child td { border-bottom: 0; }
.break { word-break: break-all; }

/* --------------------------------------------------------------------------
   11. 徽章 / 标签 / 筛选片
   -------------------------------------------------------------------------- */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .755rem;
    font-weight: 600;
    line-height: 1.55;
    white-space: nowrap;
}
.badge-success { background: var(--c-success-soft); color: var(--c-success); }
.badge-warning { background: var(--c-warning-soft); color: var(--c-warning); }
.badge-danger { background: var(--c-danger-soft); color: var(--c-danger); }
.badge-info { background: var(--c-info-soft); color: var(--c-info); }
.badge-muted { background: var(--c-surface-2); color: var(--c-text-soft); }
.badge-primary { background: var(--c-primary-soft); color: var(--c-primary-dark); }
.badge-count {
    display: inline-block;
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--c-surface-2);
    color: var(--c-text-soft);
    font-size: .755rem;
    text-align: center;
}
.tag-list { display: flex; gap: 6px; flex-wrap: wrap; }

/* 已选筛选条件：可单独移除 */
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 6px 3px 10px;
    border: 1px solid var(--c-primary-border);
    background: var(--c-primary-soft);
    color: var(--c-primary-dark);
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 500;
}
.chip:hover { text-decoration: none; border-color: var(--c-primary); }
.chip .chip-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--c-primary-tint);
    font-size: .8rem;
    line-height: 1;
}

/* --------------------------------------------------------------------------
   12. Tab / 分段筛选
   -------------------------------------------------------------------------- */
.tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--c-border);
    margin-bottom: 16px;
}
.tabs button {
    padding: 9px 14px;
    border: 0;
    background: none;
    color: var(--c-text-muted);
    font: inherit;
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color .12s ease, border-color .12s ease;
}
.tabs button:hover { color: var(--c-text); }
.tabs button.active { color: var(--c-primary); border-bottom-color: var(--c-primary); font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pills a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border: 1px solid var(--c-border);
    border-radius: 999px;
    background: var(--c-surface);
    color: var(--c-text-soft);
    font-size: .85rem;
    transition: border-color .12s ease, color .12s ease, background .12s ease;
}
.pills a:hover { border-color: var(--c-border-strong); color: var(--c-text); text-decoration: none; }
.pills a.active { background: var(--c-primary-fill); border-color: var(--c-primary-fill); color: var(--c-on-primary); }
.pills a.active .badge-count { background: rgb(255 255 255 / .25); color: var(--c-on-primary); }

/* --------------------------------------------------------------------------
   13. 分页
   -------------------------------------------------------------------------- */
.pager { display: flex; align-items: center; gap: 8px; }
.pager .pages { color: var(--c-text-muted); font-size: .85rem; }
.pager .spacer { margin-left: auto; }

/* --------------------------------------------------------------------------
   14. 下拉（用 details 实现，无需 JS）
   -------------------------------------------------------------------------- */
.dropdown { position: relative; }
.dropdown > summary {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    color: var(--c-text-soft);
    transition: background .12s ease, color .12s ease;
}
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown > summary:hover { background: var(--c-surface-2); color: var(--c-text); }
.dropdown[open] > summary { background: var(--c-surface-2); color: var(--c-text); }
.dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 168px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    padding: 5px;
    z-index: 50;
}
.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: var(--radius-xs);
    color: var(--c-text);
    font-size: .89rem;
}
.dropdown-menu a:hover { background: var(--c-surface-2); text-decoration: none; }

/* --------------------------------------------------------------------------
   15. 登录 / 状态提示页（居中卡片）
   -------------------------------------------------------------------------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card.wide { max-width: 520px; }
.auth-head { text-align: center; margin-bottom: 18px; }
.auth-head .brand {
    font-size: 1.2rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -.01em;
}
.auth-head .brand .icon { color: var(--c-primary); width: 1.25em; height: 1.25em; }
.auth-head .brand .brand-logo { width: 40px; height: 40px; }
.auth-head .sub { color: var(--c-text-muted); font-size: .86rem; margin-top: 6px; }
.auth-foot { text-align: center; margin-top: 16px; font-size: .9rem; }

/* 登录页信任信息：已收录规模 */
.auth-stats {
    display: flex;
    justify-content: center;
    gap: 22px;
    margin: 0 0 16px;
    padding: 12px 16px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.auth-stat { text-align: center; }
.auth-stat .v { font-size: 1.12rem; font-weight: 700; color: var(--c-primary); letter-spacing: -.01em; }
.auth-stat .k { color: var(--c-text-muted); font-size: .78rem; }

/* 登录方式：未配置时的替代提示 */
.auth-note {
    text-align: center;
    color: var(--c-text-muted);
    font-size: .87rem;
    padding: 32px 12px;
    line-height: 1.7;
}

.status-icon {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    background: var(--c-primary-soft);
    color: var(--c-primary);
}
.status-icon .icon { width: 26px; height: 26px; }
.status-icon.is-info { background: var(--c-info-soft); color: var(--c-info); }
.status-icon.is-warning { background: var(--c-warning-soft); color: var(--c-warning); }
.status-icon.is-danger { background: var(--c-danger-soft); color: var(--c-danger); }
.status-icon.is-muted { background: var(--c-surface-2); color: var(--c-text-soft); }
.status-title { text-align: center; margin-bottom: 8px; }
.status-text { text-align: center; color: var(--c-text-soft); font-size: .92rem; margin-bottom: 0; }
.status-actions { display: flex; justify-content: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* 下一步会发生什么：状态页说明清单 */
.step-list { margin: 16px 0 0; padding: 0; list-style: none; text-align: left; }
.step-list li {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    font-size: .87rem;
    color: var(--c-text-soft);
    border-top: 1px dashed var(--c-border);
}
.step-list li:first-child { border-top: 0; }
.step-list .step-no {
    flex: none;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: var(--c-primary-soft);
    color: var(--c-primary-dark);
    font-size: .72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.contact-box {
    margin: 18px 0 0;
    padding: 11px 14px;
    border: 1px dashed var(--c-border-strong);
    border-radius: var(--radius-sm);
    background: var(--c-surface-3);
    color: var(--c-text-soft);
    font-size: .88rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.contact-box .contact-label { color: var(--c-text-muted); font-size: .8rem; flex: none; }
.contact-box .contact-value { font-weight: 600; color: var(--c-text); word-break: break-all; }

/* 二维码登录区 */
.qr-box { text-align: center; }
.qr-box img { width: 190px; height: 190px; border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: 6px; background: #fff; }
.qr-hint { color: var(--c-text-muted); font-size: .87rem; margin-top: 10px; }
.qr-code-area { margin-top: 12px; }

/* 图片预览（管理端 Logo / 二维码上传） */
.logo-preview { max-width: 130px; max-height: 130px; border: 1px solid var(--c-border); border-radius: var(--radius-sm); }

/* --------------------------------------------------------------------------
   16. 工具类
   -------------------------------------------------------------------------- */
.muted { color: var(--c-text-muted); }
.soft { color: var(--c-text-soft); }
.small { font-size: .82rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.flex-mid { display: flex; align-items: center; gap: 8px; }
.ml-auto { margin-left: auto; }
.ml-1 { margin-left: 6px; } .ml-2 { margin-left: 12px; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 20px; }
.py-2 { padding-top: 12px; padding-bottom: 12px; }
.p-0 { padding: 0; }
.sep { color: var(--c-border-strong); padding: 0 6px; }
.text-success { color: var(--c-success); }
.text-danger { color: var(--c-danger); }
.text-warning { color: var(--c-warning); }
.text-primary { color: var(--c-primary); }
.strong { font-weight: 600; }
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 表单页居中收窄 */
.narrow { max-width: 860px; margin: 0 auto; }
.narrow-sm { max-width: 560px; margin: 0 auto; }

/* --------------------------------------------------------------------------
   17. 宽屏流式容器（登录后的信息密集页面：企业列表等）
   -------------------------------------------------------------------------- */
.container-wide {
    width: 100%;
    max-width: var(--wide-max, 1840px);
    margin: 0 auto;
    padding: 0 clamp(12px, 1.4vw, 28px);
}
.page-wide { padding: 16px 0 40px; }

/* --------------------------------------------------------------------------
   18. 筛选栏（吸顶）
   -------------------------------------------------------------------------- */
.filter-bar {
    position: sticky;
    top: var(--topbar-h);
    z-index: 15;
    background: rgb(255 255 255 / .94);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--c-border);
    padding: 12px 0;
    margin-bottom: 14px;
}
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-row + .filter-row { margin-top: 10px; }
.filter-label { color: var(--c-text-muted); font-size: .82rem; flex: none; }

/* 多选下拉（用 details 实现，无需 JS） */
.multi { position: relative; }
.multi > summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: var(--control-h);
    padding: 0 12px;
    border: 1px solid var(--c-border-strong);
    border-radius: var(--radius-sm);
    background: var(--c-surface);
    font-size: .9rem;
    color: var(--c-text-soft);
    white-space: nowrap;
    transition: border-color .12s ease, color .12s ease;
}
.multi > summary::-webkit-details-marker { display: none; }
.multi > summary::after {
    content: "";
    width: 0; height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    opacity: .6;
}
.multi > summary:hover { border-color: var(--c-primary); color: var(--c-primary); }
.multi[open] > summary { border-color: var(--c-primary); color: var(--c-primary); background: var(--c-primary-soft); }
.multi-menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    left: 0;
    min-width: 210px;
    max-height: 320px;
    overflow-y: auto;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    padding: 6px;
}
.multi-menu label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: var(--radius-xs);
    font-size: .88rem;
    cursor: pointer;
}
.multi-menu label:hover { background: var(--c-surface-2); }
.multi-foot {
    display: flex;
    gap: 8px;
    padding: 8px 8px 2px;
    margin-top: 4px;
    border-top: 1px solid var(--c-border);
    background: var(--c-surface);
    position: sticky;
    bottom: -6px;
}

/* 快捷标签 */
.quick-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.quick-tags a {
    padding: 3px 11px;
    border-radius: 999px;
    background: var(--c-primary-soft);
    color: var(--c-primary-dark);
    font-size: .82rem;
    transition: background .12s ease;
}
.quick-tags a:hover { text-decoration: none; background: var(--c-primary-border); }

/* --------------------------------------------------------------------------
   19. 高密度数据表格（PC 端，左右固定列 + 横向滚动）
   -------------------------------------------------------------------------- */
.table-dense { min-width: 1120px; font-size: .875rem; }
.table-dense th, .table-dense td { padding: 8px 10px; }
.table-dense .col-name {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--c-surface);
    min-width: 244px;
    padding-right: 14px;
}
.table-dense .col-act {
    position: sticky;
    right: 0;
    z-index: 1;
    background: var(--c-surface);
    text-align: right;
    min-width: 96px;
}
.table-dense thead .col-name, .table-dense thead .col-act { background: var(--c-surface-3); z-index: 3; }
.table-dense tbody tr:hover .col-name, .table-dense tbody tr:hover .col-act { background: #fafafa; }
/* 名称单元格：企业 Logo + 公司全称 + 推荐徽章（不展示简称） */
.cell-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cell-name a { font-weight: 600; line-height: 1.45; word-break: break-word; }
.cell-truncate { display: block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --------------------------------------------------------------------------
   20. 移动端企业卡片（与表格双布局互斥）
   -------------------------------------------------------------------------- */
.company-cards { display: none; }
@media (max-width: 900px) {
    .table-wrap.has-cards { display: none; }
    .company-cards { display: grid; gap: 10px; }
    .filter-bar { position: static; }
}
.company-card {
    display: block;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 13px 14px;
    box-shadow: var(--shadow-sm);
    color: inherit;
}
.company-card:hover { text-decoration: none; border-color: var(--c-border-strong); box-shadow: var(--shadow); }
.company-card .card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.company-card .card-name { font-weight: 600; font-size: 1rem; }
.company-card .card-meta { color: var(--c-text-muted); font-size: .83rem; margin-bottom: 6px; }
.company-card .card-batch { color: var(--c-primary); font-size: .85rem; margin-bottom: 4px; }
.company-card .card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--c-border);
    background: none;
}

/* 行内复选框 */
.chk {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: var(--control-h);
    font-size: .88rem;
    color: var(--c-text-soft);
    cursor: pointer;
    white-space: nowrap;
    padding: 0 12px;
    border: 1px solid var(--c-border-strong);
    border-radius: var(--radius-sm);
    background: var(--c-surface);
}
.chk:hover { border-color: var(--c-primary); color: var(--c-primary); }
.chk:has(input:checked) { border-color: var(--c-primary); color: var(--c-primary); background: var(--c-primary-soft); }
.chk input { margin: 0; }

/* --------------------------------------------------------------------------
   21. 企业详情页（F-13 ~ F-18）
   -------------------------------------------------------------------------- */
/* 详情页头部：Logo + 名称与元信息占主区，右侧为关键指标 */
.company-head {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
}
.company-head .head-logo { flex: none; }
.company-head .head-main { min-width: 0; flex: 1 1 360px; }
.company-head .head-name { font-size: 1.4rem; font-weight: 700; margin-bottom: 6px; letter-spacing: -.01em; }
.company-head .head-meta { color: var(--c-text-soft); font-size: .9rem; }
.company-head .head-site { margin-top: 6px; font-size: .88rem; word-break: break-all; }
.company-head .head-stats {
    flex: none;
    min-width: 170px;
    padding-left: 18px;
    border-left: 1px solid var(--c-border);
    text-align: right;
    line-height: 1.9;
}
@media (max-width: 900px) {
    .company-head .head-stats {
        flex: 1 1 100%;
        min-width: 0;
        padding: 10px 0 0;
        border-left: 0;
        border-top: 1px solid var(--c-border);
        text-align: left;
    }
}

.group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: .97rem;
    margin: 20px 0 10px;
}
.group-title .line { flex: 1; height: 1px; background: var(--c-border); }

.entry-list { display: grid; gap: 10px; }
.entry-card {
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-surface);
    padding: 13px 15px;
    box-shadow: var(--shadow-sm);
    transition: border-color .12s ease, box-shadow .12s ease;
}
.entry-card:hover { border-color: var(--c-border-strong); box-shadow: var(--shadow); }
.entry-card.is-disabled { background: var(--c-surface-3); box-shadow: none; }
.entry-card.is-disabled .entry-title { color: var(--c-text-muted); }
.entry-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.entry-title { font-weight: 600; }
.entry-meta { color: var(--c-text-soft); font-size: .87rem; margin-bottom: 4px; }
.entry-foot {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--c-border);
}
.days-left { font-size: .85rem; }
.days-left.is-urgent { color: var(--c-danger); font-weight: 600; }
.days-left.is-normal { color: var(--c-success); }
.days-left.is-over { color: var(--c-text-muted); }

/* --------------------------------------------------------------------------
   22. 投递跳转中间页（F-19 ~ F-27）
   -------------------------------------------------------------------------- */
.go-wrap {
    min-height: calc(100vh - var(--topbar-h));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}
.go-card { width: 100%; max-width: 480px; text-align: center; }
.go-card .go-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; letter-spacing: -.01em; }
.go-card .go-company { color: var(--c-text-muted); font-size: .88rem; margin-bottom: 14px; }
.go-card .go-qr {
    width: 216px;
    height: 216px;
    object-fit: contain;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 8px;
}
.go-card .go-tip {
    color: var(--c-text-soft);
    font-size: .88rem;
    margin: 14px 0 0;
    line-height: 1.75;
}
.go-card .go-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.go-qr-hint { color: var(--c-text-muted); font-size: .82rem; margin-top: 8px; }

/* 链接展示 + 一键复制 */
.copy-box {
    margin-top: 12px;
    padding: 9px 12px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    background: var(--c-surface-3);
    font-size: .83rem;
    word-break: break-all;
    color: var(--c-text-soft);
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.copy-box .copy-text { flex: 1; min-width: 0; }
.copy-box .copy-btn { flex: none; margin-top: -2px; }

/* --------------------------------------------------------------------------
   23. 连续采集进度（管理端批次详情页）
   -------------------------------------------------------------------------- */
.auto-run-bar {
    flex: 1 1 220px;
    height: 8px;
    min-width: 160px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: 999px;
    overflow: hidden;
}
.auto-run-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--c-primary-fill);
    border-radius: 999px;
    transition: width .35s ease;
}
.auto-run-log {
    margin-top: 12px;
    max-height: 280px;
    overflow: auto;
    padding: 8px 12px;
    background: var(--c-surface-3);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    font-size: .85rem;
    line-height: 1.75;
}
.auto-run-log .log-line { padding: 3px 0; border-bottom: 1px dashed var(--c-border); }
.auto-run-log .log-line:last-child { border-bottom: 0; }
.auto-run-log .log-time { color: var(--c-text-faint); margin-right: 8px; }

/* 列表 / 卡片内的行选择框（区别于表单里的 .chk 块，不带边框与外框） */
.pick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    cursor: pointer;
    line-height: 1;
}
.pick input { margin: 0; }
.pick input:disabled { cursor: not-allowed; opacity: .45; }
.pick:has(input:disabled) { cursor: not-allowed; }

/* --------------------------------------------------------------------------
   24. 采集 Logo 候选（批次详情页 / 企业详情页）
   -------------------------------------------------------------------------- */
.logo-candidate {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--c-border);
}
.logo-candidate-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.logo-candidate-head h4 { margin: 0; font-size: .95rem; }
.logo-choice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    cursor: pointer;
}
.logo-choice input { margin: 0; flex: none; }
.logo-choice img,
.logo-plain img {
    flex: none;
    width: 40px;
    height: 40px;
    object-fit: contain;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    background: var(--c-surface);
}
.logo-choice > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.logo-choice .badge { align-self: flex-start; }
.logo-plain { margin: 0 0 6px; padding-left: 0; list-style: none; }
.logo-plain li { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.logo-plain li span { word-break: break-all; }
.logo-plain .badge { margin-right: 6px; }

/* --------------------------------------------------------------------------
   25. 企业 Logo（前台列表 / 移动卡片 / 详情页；无 Logo 或加载失败时回退首字占位）
   -------------------------------------------------------------------------- */
.co-logo {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    overflow: hidden;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    background: var(--c-surface-2);
    color: var(--c-text-soft);
    font-weight: 600;
    user-select: none;
}
.co-logo-sm { width: 26px; height: 26px; font-size: .78rem; }
.co-logo-md { width: 36px; height: 36px; font-size: .95rem; }
.co-logo-lg { width: 64px; height: 64px; font-size: 1.5rem; border-radius: var(--radius); }
/* 图片覆盖在占位块之上；加载失败时由 onerror 直接移除，露出下面的占位块 */
.co-logo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--c-surface);
}
.co-logo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* --------------------------------------------------------------------------
   26. 看板（推荐 Pipeline：候选人按阶段横向分列）
   -------------------------------------------------------------------------- */
.kanban {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}
.kanban-col {
    flex: none;
    width: 260px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--topbar-h) - 140px);
    background: var(--c-surface-3);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    overflow: hidden;
}
.kanban-col-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: none;
    padding: 10px 12px;
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
    border-left: 3px solid transparent;
}
.kanban-col-title { font-weight: 600; font-size: .9rem; min-width: 0; }
/* 列内数量：与 .badge-count 同款，靠右显示 */
.kanban-col-count {
    margin-left: auto;
    display: inline-block;
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--c-surface-2);
    color: var(--c-text-soft);
    font-size: .755rem;
    text-align: center;
}
/* 列表体：自身可滚动，同时作为拖放落点 */
.kanban-list {
    flex: 1;
    min-height: 120px;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.kanban-list.is-over {
    background: var(--c-primary-soft);
    outline: 2px dashed var(--c-primary-border);
    outline-offset: -4px;
}
.kanban-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    box-shadow: var(--shadow-sm);
    cursor: grab;
    transition: border-color .12s ease, box-shadow .12s ease;
}
.kanban-card:hover { border-color: var(--c-border-strong); box-shadow: var(--shadow); }
.kanban-card-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.kanban-card-title {
    font-weight: 600;
    font-size: .9rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.kanban-card-meta { color: var(--c-text-muted); font-size: .8rem; line-height: 1.6; }
.kanban-card-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--c-border);
    color: var(--c-text-muted);
    font-size: .78rem;
}
.kanban-card.is-dragging { opacity: .55; box-shadow: var(--shadow-md); }
.kanban-empty {
    padding: 22px 10px;
    text-align: center;
    color: var(--c-text-faint);
    font-size: .84rem;
}
/* 预警列 / 完成列：列头左侧色条 */
.kanban-col.is-danger .kanban-col-head { border-left-color: var(--c-danger); }
.kanban-col.is-success .kanban-col-head { border-left-color: var(--c-success); }

/* --------------------------------------------------------------------------
   27. 时间线（沟通记录）
   -------------------------------------------------------------------------- */
.timeline { position: relative; padding-left: 20px; }
.timeline::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 6px;
    bottom: 6px;
    width: 1px;
    background: var(--c-border);
}
.timeline-item { position: relative; padding-bottom: 14px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
    position: absolute;
    left: -20px;
    top: 4px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--c-surface);
    border: 2px solid var(--c-border-strong);
}
.timeline-dot.is-primary { border-color: var(--c-primary); background: var(--c-primary-soft); }
.timeline-dot.is-success { border-color: var(--c-success); background: var(--c-success-soft); }
.timeline-dot.is-muted { border-color: var(--c-text-faint); background: var(--c-surface-2); }
.timeline-body { min-width: 0; }
.timeline-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-weight: 600;
    font-size: .9rem;
}
.timeline-meta { color: var(--c-text-muted); font-size: .8rem; }
.timeline-content { margin-top: 4px; color: var(--c-text-soft); font-size: .88rem; line-height: 1.7; }
/* 紧凑模式：用于右侧栏等窄容器 */
.timeline-compact { padding-left: 16px; }
.timeline-compact::before { left: 4px; top: 4px; bottom: 4px; }
.timeline-compact .timeline-item { padding-bottom: 10px; }
.timeline-compact .timeline-dot { left: -16px; top: 3px; width: 9px; height: 9px; border-width: 2px; }
.timeline-compact .timeline-head { font-size: .85rem; }
.timeline-compact .timeline-content { font-size: .83rem; }

/* --------------------------------------------------------------------------
   28. 弹窗（原生 <dialog>，无需 JS 库）
   -------------------------------------------------------------------------- */
.modal {
    width: 100%;
    max-width: 560px;
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    background: var(--c-surface);
    color: var(--c-text);
    font: inherit;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.modal::backdrop { background: rgb(0 0 0 / .45); }
.modal-sm { max-width: 400px; }
.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1080px; }
.modal-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--c-border);
    background: linear-gradient(to bottom, var(--c-surface), var(--c-surface-3));
}
.modal-title { margin: 0; font-size: 1rem; font-weight: 600; }
.modal-close {
    margin-left: auto;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-xs);
    background: none;
    color: var(--c-text-muted);
    font: inherit;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
}
.modal-close:hover { background: var(--c-surface-2); color: var(--c-text); }
.modal-body { padding: 16px; max-height: min(70vh, 640px); overflow-y: auto; }
.modal-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 16px;
    border-top: 1px solid var(--c-border);
    background: var(--c-surface-3);
}

/* --------------------------------------------------------------------------
   29. 简历阅读器
   -------------------------------------------------------------------------- */
.reader { display: flex; flex-direction: column; min-height: 0; }
/* 吸顶工具条 */
.reader-toolbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 12px;
    background: rgb(255 255 255 / .94);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--c-border);
}
.reader-toolbar-group { display: flex; align-items: center; gap: 6px; }
.reader-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.reader-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--c-text-muted);
    font-size: .82rem;
}
/* 正文排版 */
.reader-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--c-text-soft);
    word-break: break-word;
}
.reader-content > :first-child { margin-top: 0; }
.reader-content h1, .reader-content h2, .reader-content h3, .reader-content h4 {
    margin: 1.4em 0 .6em;
    color: var(--c-text);
    line-height: 1.4;
}
.reader-content p { margin: 0 0 .9em; }
.reader-content ul, .reader-content ol { margin: 0 0 .9em; padding-left: 1.5em; }
.reader-content li { margin-bottom: .35em; }
.reader-content strong { color: var(--c-text); font-weight: 600; }
.reader-content a { color: var(--c-primary); }
.reader-content blockquote {
    margin: 0 0 .9em;
    padding: 8px 14px;
    border-left: 3px solid var(--c-primary-border);
    background: var(--c-surface-3);
    color: var(--c-text-muted);
}
.reader-content img { max-width: 100%; height: auto; border-radius: var(--radius-xs); }
.reader-content table { width: 100%; border-collapse: collapse; margin: 0 0 .9em; font-size: .95em; }
.reader-content th, .reader-content td {
    padding: 6px 10px;
    border: 1px solid var(--c-border);
    text-align: left;
    vertical-align: top;
}
.reader-content th { background: var(--c-surface-3); font-weight: 600; color: var(--c-text); }
/* 搜索高亮 */
.reader-content mark {
    background: var(--c-warning-border);
    color: var(--c-primary);
    padding: 0 2px;
    border-radius: 2px;
}
.reader-content mark.is-current { background: var(--c-primary-fill); color: var(--c-on-primary); }
/* 折叠区：默认限高 + 底部渐隐 */
.reader-fold { position: relative; max-height: 220px; overflow: hidden; }
.reader-fold::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 72px;
    background: linear-gradient(to bottom, rgb(255 255 255 / 0), var(--c-surface));
    pointer-events: none;
}
.reader-fold.is-open { max-height: none; overflow: visible; }
.reader-fold.is-open::after { display: none; }
.reader-fold-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    margin: 8px 0 0;
    padding: 6px;
    border: 0;
    border-top: 1px dashed var(--c-border);
    background: none;
    color: var(--c-primary);
    font: inherit;
    font-size: .85rem;
    cursor: pointer;
}
.reader-fold-toggle:hover { background: var(--c-surface-3); }
/* 字号三档：可加在容器上，也可直接加在 .reader-content 上 */
.reader-zoom-sm, .reader-zoom-sm .reader-content { font-size: 14px; }
.reader-zoom-md, .reader-zoom-md .reader-content { font-size: 15px; }
.reader-zoom-lg, .reader-zoom-lg .reader-content { font-size: 17px; }

/* --------------------------------------------------------------------------
   30. 日历（月视图 / 周视图 / 事件条形）
   -------------------------------------------------------------------------- */
.calendar {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.cal-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 14px;
    border-bottom: 1px solid var(--c-border);
    background: linear-gradient(to bottom, var(--c-surface), var(--c-surface-3));
}
.cal-weekday {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid var(--c-border);
    background: var(--c-surface-3);
}
.cal-weekday > * {
    padding: 7px 8px;
    text-align: center;
    color: var(--c-text-muted);
    font-size: .78rem;
    font-weight: 600;
}
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-grid.is-week .cal-cell { min-height: 200px; }
.cal-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    min-height: 104px;
    padding: 6px 8px;
    background: var(--c-surface);
    border-right: 1px solid var(--c-border);
    border-bottom: 1px solid var(--c-border);
}
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.is-outside { background: var(--c-surface-3); }
.cal-cell.is-outside .cal-date, .cal-cell.is-outside .cal-event { color: var(--c-text-faint); }
.cal-cell.is-today { background: var(--c-primary-soft); box-shadow: inset 0 0 0 1px var(--c-primary-border); }
.cal-date {
    font-size: .8rem;
    font-weight: 600;
    color: var(--c-text-soft);
    font-variant-numeric: tabular-nums;
}
.cal-cell.is-today .cal-date {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    margin-left: -2px;
    border-radius: 999px;
    background: var(--c-primary-fill);
    color: var(--c-on-primary);
}
.cal-events { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-event {
    display: block;
    min-width: 0;
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    background: var(--c-surface-2);
    color: var(--c-text-soft);
    font-size: .75rem;
    line-height: 1.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cal-event::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 5px;
    border-radius: 50%;
    background: currentColor;
    opacity: .75;
    vertical-align: middle;
}
.cal-event.is-interview { background: var(--c-info-soft); color: var(--c-primary-dark); }
.cal-event.is-offer { background: var(--c-warning-soft); color: var(--c-warning); }
.cal-event.is-payment { background: var(--c-success-soft); color: var(--c-success); }
.cal-event.is-warranty { background: var(--c-danger-soft); color: var(--c-danger); }
.cal-more { padding-left: 6px; color: var(--c-text-muted); font-size: .73rem; cursor: pointer; }
.cal-more:hover { color: var(--c-primary); }

/* --------------------------------------------------------------------------
   31. 图表容器（canvas 由页面脚本绘制，此处只负责排版）
   -------------------------------------------------------------------------- */
.chart-box {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 14px 16px 12px;
}
.chart-box-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.chart-box-head h1, .chart-box-head h2, .chart-box-head h3, .chart-box-head h4 { margin: 0; }
.chart-box-head .spacer { margin-left: auto; }
.chart-box-body { min-width: 0; }
.chart-canvas { position: relative; width: 100%; height: 280px; }
.chart-canvas > canvas { display: block; width: 100%; height: 100%; }
.chart-legend {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 10px;
    color: var(--c-text-muted);
    font-size: .82rem;
}
.chart-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.chart-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--c-primary-fill); }
.chart-dot.is-success { background: var(--c-success); }
.chart-dot.is-warning { background: var(--c-warning); }
.chart-dot.is-danger { background: var(--c-danger); }
.chart-dot.is-muted { background: var(--c-text-faint); }

/* --------------------------------------------------------------------------
   32. 进度条与头像
   -------------------------------------------------------------------------- */
.progress {
    width: 100%;
    height: 8px;
    background: var(--c-surface-2);
    border-radius: 999px;
    overflow: hidden;
}
.progress-bar {
    display: block;
    width: 0;
    height: 100%;
    background: var(--c-primary-fill);
    border-radius: 999px;
    transition: width .35s ease;
}
.progress-bar.is-success { background: var(--c-success); }
.progress-bar.is-warning { background: var(--c-warning); }
.progress-bar.is-danger { background: var(--c-danger); }

.avatar {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--c-surface-2);
    color: var(--c-text-soft);
    font-size: .82rem;
    font-weight: 600;
    user-select: none;
}
.avatar-sm { width: 24px; height: 24px; font-size: .72rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.4rem; }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--c-surface-2);
    color: var(--c-text-soft);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   33. 内容页页头（面包屑 + 标题 + 徽章 + 右侧元信息）
   --------------------------------------------------------------------------
   为什么放在这里（而不是某个模块的 CSS）：页头是**跨模块通用**的页面级组件 ——
   候选人详情、简历编辑、职位详情、客户详情、推荐阶段、推荐报告都在用同一套结构。
   它原先定义在 candidate.css 里，于是每个新页面都必须记得额外引 candidate.css，
   漏引就静默失效（页头退化成块级元素各占一行）。本文件由 layouts/main.php 无条件
   加载，放在这里即为全站唯一来源，从此不会再漏。

   结构（第一行 = 面包屑在左 + 返回在右，由行容器 .detail-head-top 显式承载；
   第二行 = 标题 / 徽章 / 右侧元信息）：
   <div class="detail-head">
       <div class="detail-head-top">
           <nav class="detail-crumbs" aria-label="面包屑">…</nav>
           <a class="detail-head-back">← 返回</a>
       </div>
       <h1 class="detail-name">标题</h1>
       <span class="badge">徽章</span>
       <span class="spacer"></span>
       <span class="muted small mono">#id</span>
   </div>
   -------------------------------------------------------------------------- */
.detail-head {
    display: flex;
    align-items: center;
    column-gap: 10px; /* 同一行内的元素间距（迁移前为 gap: 10px） */
    row-gap: 6px;     /* 换行后的行距：面包屑与标题属于同一信息块，行距收紧 */
    flex-wrap: wrap;
    margin-bottom: 14px;
}

/* 第一行：显式行容器 —— 面包屑与返回按钮必须同处一行（面包屑靠左、返回靠右）。
   为什么不再让面包屑自己 flex-basis:100%：那样它会独占整行，把返回按钮挤到第二行
   （与标题同一行），正是本次修复的布局 bug 根因。改用行容器把「分行」写死，不再
   依赖 flex-wrap 的偶然分行。 */
.detail-head-top {
    flex: 1 0 100%;  /* 独占 .detail-head 的第一行，标题行自动换到其下 */
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 面包屑：占据第一行的剩余空间（flex-grow）→ 把返回按钮推到行末；
   可收缩（min-width:0）且内部允许换行，长姓名 / 长职位名不会撑破或与返回按钮重叠。 */
.detail-crumbs {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    overflow-wrap: anywhere; /* 超长不可断词（如长英文名）也在行内换行，不横向外溢 */
    font-size: .82rem;
    line-height: 1.4;
    color: var(--c-text-muted);
}
.detail-crumbs a { color: var(--c-text-muted); }
.detail-crumbs a:hover { color: var(--c-primary); text-decoration: underline; }
/* 层级靠既有文字色与字重表达：可点的上级（中灰）→ 分隔符（更浅）→ 当前页（次级正文色加粗） */
.detail-crumbs .crumb-sep { color: var(--c-text-faint); user-select: none; }
.detail-crumbs .crumb-current { color: var(--c-text-soft); font-weight: 600; }

/* 第二行右侧对齐：.spacer 的 auto 外边距把其后的元信息推到行末（第二行构成保持不变）。
   ⚠️ 只给 .spacer 设 auto，绝不给返回按钮设 auto —— 两个 auto 会平分剩余空间，
   把元信息挤到页面中间（上一轮已踩过的坑）。 */
.detail-head .spacer { margin-left: auto; }
.detail-name {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -.01em;
}

/* 页头头像（候选人详情）：有可显示照片时，圆角缩略图与姓名同行、垂直居中对齐。
   无照片时不渲染本节点（见 show.php），因此不会留下空位或坏图。 */
.detail-avatar {
    flex: none;
    display: block;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--c-border);
    background: var(--c-surface-2);
}
.detail-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.detail-avatar:hover { border-color: var(--c-primary); }

/* 返回按钮：所有内容页都放，语义 = 回到面包屑的上一级（即原「← 返回X」按钮）。
   用站内既有的次级描边三件套 .btn + .btn-outline-secondary + .btn-sm（定义见本文件第 7 节），
   与页头其它元素同尺寸。flex:none 保证它不被压缩，始终贴第一行行末。
   专属类 .detail-head-back 只为「窄屏精确隐藏」而设 ——
   若用 .detail-head a 之类的宽泛选择器隐藏，会连面包屑里唯一的导航 <a> 一起隐藏掉。 */
.detail-head-back { flex: none; }

/* 窄屏降级：两行页头收紧，标题略缩，避免吃掉首屏高度 */
@media (max-width: 600px) {
    .detail-name { font-size: 1.15rem; }
    .detail-crumbs { font-size: .78rem; }
    /* 0 宽度的 .spacer 在换行后已无法把元信息推到右侧，故隐藏，改由紧随其后的元素自身撑开 */
    .detail-head .spacer { display: none; }
    /* 窄屏隐藏返回按钮：面包屑的上级链接已能完成同样的返回，故不占首屏高度 */
    .detail-head-back { display: none; }
    /* .spacer 虽已 display:none，但仍留在 DOM 中，故 .spacer + * 仍能选中「元信息」；
       只给它一个 auto 左边距，把它推到第二行行末（隐藏后不再有第二个 auto 与其平分空间）。 */
    .detail-head > .spacer + * { margin-left: auto; }
}

/* ==========================================================================
   34. 个人工作系统 · 应用扩展
   --------------------------------------------------------------------------
   app_v1.css 基础组件未覆盖、但本系统必须的部件。全部沿用上方设计令牌，
   保证与基础组件同源；由 layouts/main.php、layouts/auth.php 无条件加载。
   ========================================================================== */

/* ---- 34.1 页头（列表页 / 表单页顶部：标题 + 说明 + 操作区） ---- */
.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--c-text-muted); font-size: .86rem; margin-top: 4px; line-height: 1.65; }

/* ---- 34.2 表单辅助 ---- */
.form-label { display: block; margin-bottom: 5px; font-size: .875rem; font-weight: 500; color: var(--c-text-soft); }
.hint { display: block; margin-top: 5px; color: var(--c-text-muted); font-size: .79rem; }
.inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* 栅格列里的字段：间距交给 .row 的 gap，避免与 .field 外边距叠加 */
.row > .field { margin-bottom: 0; }
.w-100 { width: 100%; }
.h-100 { height: 100%; }
.align-start { align-items: flex-start; }
/* 必填星号沿用 8 节 */

/* select 统一观感（替代 Bootstrap 的 .form-select）：同一枚下拉箭头 */
select.form-control {
    padding-right: 32px;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%236f6f6f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
}

/* ---- 34.3 筛选栏 ---- */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filters > div, .filters > .field { margin-bottom: 0; }
.filters .form-control { width: 100%; }

/* ---- 34.4 自研可搜索下拉（picker.js） ---- */
.combo { position: relative; }
.combo-native { display: none !important; }
.combo-list {
    position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px);
    max-height: 264px; overflow: auto;
    background: var(--c-surface);
    border: 1px solid var(--c-border-strong);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    padding: 4px;
}
.combo-item { padding: 8px 10px; border-radius: var(--radius-xs); cursor: pointer; font-size: .9rem; }
.combo-item:hover, .combo-item.active { background: var(--c-primary-soft); color: var(--c-primary-dark); }
.combo-empty { padding: 10px; color: var(--c-text-faint); font-size: .9rem; }

/* ---- 34.5 侧栏分组（可折叠）与图标收起 ---- */
.nav-group { margin-bottom: 2px; }
.nav-group-head {
    width: 100%; display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border: 0; background: transparent; cursor: pointer;
    color: var(--c-text-soft); font: inherit; font-size: .925rem; font-weight: 600;
    border-radius: var(--radius-sm);
    transition: background .12s ease, color .12s ease;
}
.nav-group-head:hover { background: var(--c-surface-2); color: var(--c-text); }
.nav-group-head .chev { margin-left: auto; width: 14px; height: 14px; flex: none; opacity: .7; transition: transform .16s ease; }
.nav-group.open > .nav-group-head { color: var(--c-text); }
.nav-group.open > .nav-group-head .chev { transform: rotate(90deg); }
.nav-group-body { padding: 0 0 4px 10px; }
.nav-group:not(.open) > .nav-group-body { display: none; }

.sidebar-link .ico, .nav-group-head .ico { flex: none; opacity: .85; }
.sidebar-link:hover .ico, .sidebar-link.active .ico, .nav-group-head:hover .ico { opacity: 1; }

@media (min-width: 901px) {
    body.sidebar-mini .sidebar { width: 64px; }
    body.sidebar-mini .sidebar-brand { justify-content: center; padding: 0; }
    body.sidebar-mini .sidebar-brand span { display: none; }
    body.sidebar-mini .nav-group-head { justify-content: center; padding-left: 0; padding-right: 0; }
    body.sidebar-mini .nav-group-head > span,
    body.sidebar-mini .nav-group-head .chev { display: none; }
    body.sidebar-mini .nav-group-body { display: block !important; padding: 0; }
    body.sidebar-mini .sidebar-link { justify-content: center; padding-left: 0; padding-right: 0; }
    body.sidebar-mini .sidebar-link > span:not(.ico) { display: none; }
}

/* ---- 34.6 顶栏补充（面包屑 / 搜索 / 图标按钮 / 通知红点） ---- */
.crumbs { display: flex; align-items: center; gap: 6px; font-size: .9rem; white-space: nowrap; min-width: 0; }
.crumbs a { color: var(--c-text-muted); }
.crumbs a:hover { color: var(--c-primary); text-decoration: none; }
.crumbs .sep { color: var(--c-text-faint); }
.crumbs .mid { color: var(--c-text-muted); }
.crumbs .cur { color: var(--c-text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.topbar-search { flex: 1; max-width: 380px; position: relative; }
.topbar-search .form-control { padding-left: 34px; }
.topbar-search .ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--c-text-faint); pointer-events: none; }
.icon-btn {
    width: 34px; height: 34px; border-radius: var(--radius-sm);
    display: inline-flex; align-items: center; justify-content: center;
    border: 0; background: transparent; color: var(--c-text-soft); cursor: pointer; position: relative;
    transition: background .12s ease, color .12s ease;
}
.icon-btn:hover { background: var(--c-surface-2); color: var(--c-text); }
.icon-btn .badge-dot {
    position: absolute; top: 3px; right: 3px; min-width: 15px; height: 15px; padding: 0 4px;
    border-radius: 999px; background: var(--c-danger); color: #fff; font-size: 10px;
    line-height: 15px; text-align: center; font-weight: 600;
}
/* 桌面端「收起侧栏」按钮：仅在 ≥901px 常驻态出现（<901px 用 .sidebar-toggle 开抽屉） */
.collapse-btn { display: none; }
@media (min-width: 901px) { .collapse-btn { display: inline-flex; } }
/* 顶栏下拉：summary 用图标按钮；菜单标题行 */
.dropdown > summary.icon-btn { padding: 0; }
.dropdown-header { padding: 7px 10px 3px; color: var(--c-text-faint); font-size: .78rem; }

/* ---- 34.7 表格补充（数字 / 操作列对齐 / 空态） ---- */
.table .num { text-align: right; width: 1%; white-space: nowrap; }
/* 操作列：还原为单元格布局（覆盖 10 节 .table .actions 的 display:flex，避免按钮换行堆叠），
   列内按钮为 inline-flex，靠 text-align 右对齐成一行 */
.table td.actions, .table th.actions { display: table-cell; text-align: right; white-space: nowrap; width: 1%; }
.table td.actions .btn, .table td.actions form { margin-left: 4px; }
.table td.actions form:first-child, .table td.actions .btn:first-child { margin-left: 0; }
.empty { text-align: center; padding: 32px 16px; color: var(--c-text-faint); }

/* ---- 34.8 标签 / 药丸 ---- */
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tag {
    display: inline-flex; align-items: center; height: 24px; padding: 0 10px;
    border-radius: 999px; background: var(--c-primary-soft); color: var(--c-primary-dark);
    font-size: .8rem; font-weight: 500; transition: background .12s ease;
}
a.tag:hover { background: var(--c-primary-border); text-decoration: none; }
button.tag { border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-text-soft); cursor: pointer; font: inherit; font-size: .8rem; height: 24px; }
button.tag:hover { background: var(--c-surface-2); }

/* 笔记编辑器：Markdown / 富文本 / 预览 分段按钮的选中态 */
[data-editor-tab].active { background: var(--c-primary-fill); border-color: var(--c-primary-fill); color: var(--c-on-primary); }

/* ---- 34.9 Toast 提示（flash） ---- */
.hr-toast-wrap { position: fixed; top: 16px; right: 16px; z-index: 1080; display: flex; flex-direction: column; gap: 8px; }
.hr-toast {
    min-width: 260px; max-width: 380px;
    background: var(--c-surface); border: 1px solid var(--c-border);
    border-left: 3px solid var(--c-text-faint);
    border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
    padding: 11px 13px; display: flex; gap: 8px; align-items: flex-start;
    font-size: .9rem; animation: toast-in .18s ease;
}
.hr-toast.success { border-left-color: var(--c-success); }
.hr-toast.error { border-left-color: var(--c-danger); }
.hr-toast .t-close { margin-left: auto; border: 0; background: transparent; color: var(--c-text-faint); cursor: pointer; line-height: 1; font-size: 1rem; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---- 34.10 Markdown 正文（笔记详情 / 预览 / 富文本） ---- */
.md-body { line-height: 1.75; word-wrap: break-word; color: var(--c-text); }
.md-body h1 { font-size: 1.3rem; margin: 16px 0 8px; }
.md-body h2 { font-size: 1.075rem; margin: 16px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--c-border); }
.md-body h3 { font-size: 1rem; margin: 12px 0 8px; }
.md-body p { margin: 8px 0; }
.md-body ul, .md-body ol { margin: 8px 0; padding-left: 24px; }
.md-body li { margin: 4px 0; }
.md-body blockquote { border-left: 3px solid var(--c-primary-border); margin: 8px 0; padding: 4px 12px; color: var(--c-text-muted); background: var(--c-surface-3); border-radius: 0 var(--radius-xs) var(--radius-xs) 0; }
.md-body code { background: var(--c-surface-2); padding: 2px 5px; border-radius: 4px; font-size: .9em; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.md-body pre { background: var(--c-surface-3); border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: 12px; overflow: auto; }
.md-body pre code { background: none; padding: 0; }
.md-body a { color: var(--c-primary); text-decoration: underline; text-underline-offset: 2px; }
.md-body img { max-width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--c-border); }
.md-body hr { border: none; border-top: 1px solid var(--c-border); margin: 16px 0; }
.md-body:empty::before { content: '（空）'; color: var(--c-text-faint); }

/* ---- 34.11 走势图（自研 SVG，零依赖；作用域限定在 .chart 内） ---- */
.chart {
    --chart-h: 220px;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    grid-template-rows: var(--chart-h) 18px;
    column-gap: 6px; row-gap: 4px;
}
.chart-axis { position: relative; font-size: 11px; color: var(--c-text-faint); }
.chart-axis span { position: absolute; right: 0; transform: translateY(-50%); white-space: nowrap; }
.chart-axis-right span { right: auto; left: 0; }
.chart-plot { grid-column: 2; grid-row: 1; position: relative; min-width: 0; }
.chart-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.chart-grid line { stroke: var(--c-border); stroke-width: 1; }
.chart .line-rev { fill: none; stroke: var(--c-primary); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line-cnt { fill: none; stroke: var(--c-warning); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-hit { position: absolute; top: 0; bottom: 0; }
.chart-hit::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--c-border-strong); opacity: 0; }
.chart-hit:hover { background: rgb(0 0 0 / .025); }
.chart-hit:hover::before { opacity: .9; }
.chart .chart-dot { position: absolute; left: 50%; width: 6px; height: 6px; border-radius: 50%; transform: translate(-50%, -50%); border: 1px solid var(--c-surface); background: var(--c-primary-fill); }
.chart .chart-dot.cnt { background: var(--c-warning); }
.chart-tip {
    position: absolute; z-index: 6; pointer-events: none;
    background: var(--c-surface); border: 1px solid var(--c-border-strong);
    border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
    padding: 8px 10px; font-size: 12px; line-height: 1.6; color: var(--c-text); white-space: nowrap;
}
.chart-tip .tip-date { font-weight: 600; margin-bottom: 2px; }
.chart-tip .tip-row { display: flex; align-items: center; gap: 6px; }
.chart-tip .tip-row i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.chart-x { grid-column: 2; grid-row: 2; position: relative; font-size: 11px; color: var(--c-text-faint); }
.chart-x span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.chart-x span:first-child { transform: translateX(0); }
.chart-x span:last-child { transform: translateX(-100%); }
.chart-foot { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; margin-top: 10px; color: var(--c-text-muted); }
.chart-foot strong { font-weight: 600; color: var(--c-text); }
.legend { display: inline-flex; align-items: center; gap: 6px; color: var(--c-text-muted); }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.sw-primary { background: var(--c-primary-fill); }
.sw-accent { background: var(--c-warning); }

/* ---- 34.12 日历（预约月视图）：沿用 30 节 .calendar / .cal-* 基础件，仅补状态色 ---- */
.cal-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cal-event.todo { background: var(--c-warning-soft); color: var(--c-warning); }
.cal-event.done { background: var(--c-success-soft); color: var(--c-success); }
.cal-event.cancel { background: var(--c-surface-2); color: var(--c-text-faint); }

/* ---- 34.13 统计卡（KPI）：图标 + 语义底色 ---- */
.stat-head { display: flex; align-items: center; gap: 8px; }
.stat-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; flex: none;
    border-radius: var(--radius-sm);
    background: var(--c-surface); color: var(--c-primary);
}
.stat-icon .ico { width: 18px; height: 18px; }
/* 语义底色：整卡浅底 + 深色主数值 + 白色图标片，四张卡片各自成色但同族 */
.stat.tint-primary { background: var(--c-primary-soft); border-color: var(--c-primary-border); }
.stat.tint-primary .stat-value { color: var(--c-primary-dark); }
.stat.tint-success { background: var(--c-success-soft); border-color: var(--c-success-border); }
.stat.tint-success .stat-value { color: var(--c-success); }
.stat.tint-success .stat-icon { color: var(--c-success); }
.stat.tint-warning { background: var(--c-warning-soft); border-color: var(--c-warning-border); }
.stat.tint-warning .stat-value { color: var(--c-warning); }
.stat.tint-warning .stat-icon { color: var(--c-warning); }
.stat.tint-neutral { background: var(--c-surface-2); border-color: var(--c-border); }
.stat.tint-neutral .stat-icon { color: var(--c-text-soft); }

/* ---- 34.14 快捷区间按钮（筛选栏内） ---- */
.filters { align-items: flex-end; }
.filters .btn.is-active {
    background: var(--c-primary-soft);
    border-color: var(--c-primary-border);
    color: var(--c-primary-dark);
    box-shadow: none;
}

/* ---- 34.15 配色方案选择器（设置页 · 外观） ---- */
.theme-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.theme-option {
    position: relative;
    display: inline-flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    background: var(--c-surface);
    cursor: pointer;
    transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
}
.theme-option:hover { border-color: var(--c-border-strong); box-shadow: var(--shadow-sm); }
.theme-option.is-active { border-color: var(--c-primary); background: var(--c-primary-soft); }
.theme-option:focus-within { box-shadow: var(--ring); }
/* 隐藏原生单选框，保留键盘可达性 */
.theme-option input[type="radio"] {
    position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; pointer-events: none;
}
.theme-swatch {
    width: 22px; height: 22px; flex: none; border-radius: 50%;
    background: var(--sw);
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / .12);
}
.theme-name { font-size: .9rem; color: var(--c-text); white-space: nowrap; }
.theme-option.is-active .theme-name { color: var(--c-primary-dark); font-weight: 600; }
