/* =========================================================
   assets/css/common.css — 全局公共样式
   所有页面统一引用（页面位于 pages/ 下时写 ../assets/css/common.css）。
   修改主色只需改 :root 变量。
   ========================================================= */

/* === Reset === */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-light); }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--text); }
img { display: block; max-width: 100%; }
::placeholder { color: var(--text-lighter); }

/* === 滚动条（内容区） === */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d0d3d8; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #b8bcc3; }
::-webkit-scrollbar-track { background: transparent; }

/* === CSS 变量：主色一键切换 === */
:root {
    /* 主色（侧边栏、主按钮、选中态）— 深蓝（见 docs/设计规范.html blue 主题） */
    --primary:        #3358c0;
    --primary-light:  #4a6fd8;
    --primary-dark:   #233d87;
    --primary-text:   #ffffff;

    /* 点缀色 — 重点图标 / 标记（不作为按钮变体） */
    --accent:         #e8784a;

    /* 功能色 */
    --success:   #23a35c;
    --success-bg: rgba(35, 163, 92, .10);
    --warning:   #d98a14;
    --warning-bg: rgba(217, 138, 20, .12);
    --danger:    #e0483e;
    --danger-bg: rgba(224, 72, 62, .10);
    --info:      #2d6cdf;
    --info-bg:   rgba(45, 108, 223, .10);

    /* 中性色 */
    --bg:            #f2f4f7;
    --bg-card:       #ffffff;
    --text:          #333333;
    --text-light:    #666666;
    --text-lighter:  #999999;
    --border:        #e4e7eb;
    --border-light:  #f0f2f5;
    --shadow:        0 1px 2px rgba(16, 24, 40, .05);

    /* 布局 */
    --topbar-h: 56px;
    --sidebar-w: 220px;

    /* 圆角 / 间距 */
    --radius: 8px;
    --radius-sm: 6px;
}

/* =========================================================
   布局：顶部导航 + 左侧侧边栏 + 右侧内容
   ========================================================= */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--topbar-h);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100;
}
.topbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.topbar-logo-mark {
    width: 30px; height: 30px;
    border-radius: 6px;
    background: var(--primary);
    color: var(--primary-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
}
.topbar-logo-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: .5px;
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}
.topbar-icon-btn {
    width: 32px; height: 32px;
    border: none; background: transparent;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    position: relative;
}
.topbar-icon-btn:hover { background: var(--border-light); color: var(--text); }
.topbar-icon-btn .dot {
    position: absolute; top: 5px; right: 6px;
    width: 7px; height: 7px;
    background: var(--danger);
    border-radius: 50%;
}
.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 16px;
    border-left: 1px solid var(--border);
}
.topbar-user-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--primary-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
}
.topbar-user-name { font-size: 13px; color: var(--text); font-weight: 500; }
.topbar-user-role { font-size: 12px; color: var(--text-lighter); }

/* =========================================================
   侧边栏：浅色药丸式（2026-09 改版，取代原深蓝底菜单）
   白底 + 线性图标 + 选中态主色圆角块；规格见 docs/设计规范.md 五、5.2。
   仅此处定义，全站统一（docs/设计规范.html 的 .spec-sidebar 复用同一套）。
   ========================================================= */
.sidebar {
    position: fixed;
    top: var(--topbar-h);
    left: 0; bottom: 0;
    width: var(--sidebar-w);
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 99;
    /* 侧栏专属色：选中/悬停直接用系统主色（跟随 --primary，改 :root 即全站同步） */
    --nav-accent:      var(--primary);
    --nav-accent-soft: rgba(51, 88, 192, .08);
}
.sidebar::-webkit-scrollbar-thumb { background: #d8dbe2; }
.sidebar::-webkit-scrollbar-track { background: transparent; }

.sidebar-nav { flex: 1; padding: 10px 0 16px; }

/* 分组标题（浅色主题下的灰阶小字） */
.nav-group { margin-top: 6px; }
.nav-group-title {
    padding: 12px 24px 6px;
    font-size: 11px;
    color: var(--text-lighter);
    letter-spacing: 1.2px;
    user-select: none;
}

/* 菜单项：圆角药丸，左右留内嵌间隙 */
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 2px 12px;
    padding: 9px 12px;
    border-radius: var(--radius);
    font-size: 14px;
    color: #374151;
    position: relative;
    transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--nav-accent-soft); color: var(--nav-accent); }
.nav-item.active {
    background: var(--nav-accent);
    color: #fff;
    font-weight: 500;
}
/* 注：旧版深色侧栏用「左侧 3px 白竖条」标记激活态，浅色药丸式改为整块填充，故不再有 ::before 竖条。 */
.nav-item svg { flex-shrink: 0; }
.nav-item .nav-arrow {
    margin-left: auto;
    transition: transform .18s;
    opacity: .6;
}

/* 菜单图标：常显线性 SVG（18px），颜色随菜单项状态变化 */
.nav-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px; height: 18px;
    flex-shrink: 0;
    color: #6b7280;
    transition: color .15s;
}
.nav-ico svg { display: block; width: 18px; height: 18px; }
.nav-item:hover .nav-ico { color: var(--nav-accent); }
.nav-item.active .nav-ico { color: #fff; }

.nav-sub { display: none; padding-bottom: 4px; }
.nav-sub.open { display: block; }
.nav-item.sub {
    padding-left: 44px;
    font-size: 13px;
}
.nav-item.sub.active { background: transparent; color: var(--nav-accent); }

.sidebar-footer {
    border-top: 1px solid var(--border);
    padding: 12px 20px;
    font-size: 12px;
    color: var(--text-lighter);
}

.main {
    margin-left: var(--sidebar-w);
    padding: calc(var(--topbar-h) + 20px) 24px 24px;
    min-height: 100vh;
}

/* =========================================================
   页面标题 & 操作按钮行（按钮默认靠右）
   ========================================================= */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}
.page-title { font-size: 20px; font-weight: 600; color: var(--text); }
.page-subtitle { font-size: 13px; color: var(--text-lighter); margin-top: 2px; }
.page-actions { display: flex; align-items: center; gap: 8px; }

/* =========================================================
   按钮系统
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    white-space: nowrap;
    transition: all .15s;
    user-select: none;
}
.btn svg { flex-shrink: 0; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-primary { background: var(--primary); color: var(--primary-text); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.1); }
.btn-primary:active:not(:disabled) { filter: brightness(.94); }

.btn-default {
    background: var(--bg-card);
    color: var(--text);
    border-color: var(--border);
}
.btn-default:hover:not(:disabled) { color: var(--primary); border-color: var(--primary); }

.btn-danger {
    background: var(--bg-card);
    color: var(--danger);
    border-color: rgba(224, 72, 62, .4);
}
.btn-danger:hover:not(:disabled) { background: var(--danger-bg); border-color: var(--danger); }

/* 小号按钮（表格操作、弹框底部） */
.btn-sm { height: 26px; padding: 0 10px; font-size: 13px; border-radius: 5px; }

/* 加载 / 上传中状态（任意 .btn 追加 .loading）
   原则：无背景、无边框，退化为「转圈 + 中性灰文字」的轻量等待提醒，
   不保留按钮本身的底色，避免彩色闪烁。加载结束后移除 .loading 还原。 */
.btn.loading {
    pointer-events: none;
    cursor: default;
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    color: var(--text-lighter) !important;
}
.btn.loading::before {
    content: "";
    width: 12px;
    height: 12px;
    border: 2px solid var(--text-lighter);
    border-top-color: transparent;
    border-radius: 50%;
    animation: btn-spin .7s linear infinite;
    flex-shrink: 0;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* 纯文字操作链接（表格行内操作） */
.op-link {
    border: none;
    background: none;
    padding: 0;
    font-size: 13px;
    color: var(--primary);
    cursor: pointer;
    white-space: nowrap;
}
.op-link:hover { color: var(--primary-light); text-decoration: underline; }
.op-link.danger { color: var(--danger); }
.op-link.danger:hover { color: var(--danger); text-decoration: underline; }
.op-link.disabled { color: var(--text-lighter); cursor: not-allowed; }
.op-link.disabled:hover { text-decoration: none; }

/* =========================================================
   内容卡片
   ========================================================= */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 0;
    gap: 12px;
}
.card-title { font-size: 16px; font-weight: 600; color: var(--text); }
.card-body { padding: 14px 16px 16px; }
.card-header + .card-body { padding-top: 12px; }
.card-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-light);
}

/* =========================================================
   表格
   ========================================================= */
.table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: auto;
}
.content-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.content-table th {
    background: #f8f9fa;
    color: var(--text);
    font-weight: 600;
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.content-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
    vertical-align: middle;
}
.content-table tbody tr:last-child td { border-bottom: none; }
.content-table tbody tr:hover td { background: #fafbfc; }
.content-table td.num, .content-table th.num { text-align: right; }
.content-table .col-actions { text-align: right; white-space: nowrap; }
.content-table .col-actions .op-link + .op-link { margin-left: 12px; }

/* 状态徽标 */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 22px;
    padding: 0 9px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
}
.badge.success { color: var(--success); background: var(--success-bg); }
.badge.warning { color: var(--warning); background: var(--warning-bg); }
.badge.danger  { color: var(--danger);  background: var(--danger-bg); }
.badge.info    { color: var(--info);    background: var(--info-bg); }
.badge.default { color: var(--text-light); background: var(--border-light); }

/* =========================================================
   翻页（配合 assets/js/pagination.js 公共组件）
   用法：列表底部放空容器 <div class="pg" id="xxx"></div>，
        再 new Pagination({...}) 自动渲染。靠右对齐。
   ========================================================= */
.pg {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    padding-top: 14px;
}
.pg-total {
    font-size: 13px;
    color: var(--text-lighter);
    margin-right: auto;      /* 把「共 N 条」顶到最左，其余控件靠右 */
}
.pg-pages { display: flex; align-items: center; gap: 4px; }
.pg-btn {
    min-width: 30px;
    height: 30px;
    padding: 0 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-light);
    font-size: 13px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color .15s, color .15s;
}
.pg-btn:hover:not(:disabled):not(.active) { border-color: var(--primary); color: var(--primary); }
.pg-btn.active { background: var(--primary); border-color: var(--primary); color: var(--primary-text); cursor: default; }
.pg-btn:disabled { color: #c4c8ce; background: var(--border-light); cursor: not-allowed; }
.pg-ellipsis { padding: 0 2px; color: var(--text-lighter); font-size: 13px; user-select: none; }
/* 每页条数下拉 */
.pg-size {
    height: 30px;
    margin-left: 10px;
    padding: 0 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text);
    font-size: 13px;
    outline: none;
    cursor: pointer;
}
.pg-size:focus { border-color: var(--primary); }
/* 跳页输入 */
.pg-jump {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 10px;
    font-size: 13px;
    color: var(--text-light);
    white-space: nowrap;
}
.pg-input {
    width: 52px;
    height: 30px;
    margin: 0 4px;
    padding: 0 4px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    font-size: 13px;
    color: var(--text);
}
.pg-input:focus { border-color: var(--primary); }
.pg-input::-webkit-outer-spin-button,
.pg-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* =========================================================
   筛选栏
   ========================================================= */
.filter-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 16px;
}
.filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 20px;
}
.filter-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.filter-label { font-size: 12px; color: var(--text-lighter); }
.filter-input,
.filter-select,
.filter-date {
    height: 32px;
    min-width: 160px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    outline: none;
    transition: border-color .15s;
}
.filter-select { padding-right: 26px; }
.filter-input:focus,
.filter-select:focus,
.filter-date:focus { border-color: var(--primary); }
.filter-actions { display: flex; gap: 8px; }

/* =========================================================
   表单
   ========================================================= */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 14px; color: var(--text); margin-bottom: 6px; }
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    outline: none;
    transition: border-color .15s;
}
.form-textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
.form-input:focus,
.form-select:focus,
.form-textarea:focus { border-color: var(--primary); }
.form-input[readonly] { background: var(--border-light); color: var(--text-light); }
.form-tip { font-size: 12px; color: var(--text-lighter); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }

/* =========================================================
   弹框（Modal）
   ========================================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}
.modal-overlay.show { display: flex; }
.modal {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0,0,0,.18);
    width: 560px;
    max-width: 100%;
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    animation: modalIn .16s ease-out;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(8px) scale(.98); }
    to   { opacity: 1; transform: none; }
}
.modal-sm { width: 400px; }
.modal-lg { width: 720px; }
.modal-xl { width: 900px; }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 0;
    flex-shrink: 0;
}
.modal-title { font-size: 16px; font-weight: 600; color: var(--text); }
.modal-close {
    width: 28px; height: 28px;
    border: none; background: transparent;
    border-radius: 5px;
    color: var(--text-lighter);
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-close:hover { background: var(--border-light); color: var(--text); }
.modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 0 20px 16px;
    flex-shrink: 0;
}

/* =========================================================
   抽屉（Drawer）— 从右侧推拉出现
   用途：内容较长、需要边看列表边读详情时优先用抽屉（见 docs/设计规范.md）。
   用法：
     <div class="drawer-overlay" id="xx">
       <div class="drawer drawer-lg">
         <div class="drawer-header">
           <div class="drawer-title">标题</div>
           <button class="drawer-close" onclick="closeModal('xx')">✕</button>
         </div>
         <div class="drawer-body">…</div>
         <div class="drawer-footer">…</div>
       </div>
     </div>
   打开：overlay.classList.add('show') ｜ 关闭：closeModal('xx')（带推出动画）
   宽度：默认 560px，可选 drawer-sm / drawer-lg / drawer-xl
   ========================================================= */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    display: none;
    justify-content: flex-end;
    z-index: 1000;
    animation: overlayIn .18s ease-out;
}
.drawer-overlay.show { display: flex; }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.drawer {
    background: var(--bg-card);
    box-shadow: -12px 0 40px rgba(0,0,0,.16);
    height: 100%;
    width: 560px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    animation: drawerIn .24s cubic-bezier(.22,.61,.36,1);
}
@keyframes drawerIn  { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes drawerOut { from { transform: translateX(0); } to { transform: translateX(100%); } }
.drawer-sm { width: 420px; }
.drawer-lg { width: 720px; }
.drawer-xl { width: 880px; }

/* 关闭时先播推出动画、再隐藏（由 closeModal() 加 .closing 触发） */
.drawer-overlay.closing { animation: overlayOut .2s ease-in forwards; }
@keyframes overlayOut { from { opacity: 1; } to { opacity: 0; } }
.drawer-overlay.closing .drawer { animation: drawerOut .2s cubic-bezier(.4,0,1,1) forwards; }

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}
.drawer-title { font-size: 16px; font-weight: 600; color: var(--text); }
.drawer-close {
    width: 28px; height: 28px;
    border: none; background: transparent;
    border-radius: 5px;
    color: var(--text-lighter);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.drawer-close:hover { background: var(--border-light); color: var(--text); }
.drawer-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}
.drawer-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 24px;
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
}

/* =========================================================
   数据导入 / 附件（容器无关零件）
   只定义「零件」样式，可整体放入弹框 / 抽屉 / 页面任意容器：
   ① .upload-zone 导入区（Excel 批量导入）
   ② .file-list   文件行（附件上传、已选待导入文件）
   ③ .import-*    解析校验反馈（成功统计 / 失败行明细）
   ========================================================= */

/* ① 导入区：虚线拖拽框，整块可点击 */
.upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    padding: 30px 20px;
    border: 1.5px dashed var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.upload-zone:hover { border-color: var(--primary-light); }
.upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(51, 88, 192, .04);
}
.upload-zone .uz-icon { color: var(--text-lighter); display: flex; }
.upload-zone .uz-title { font-size: 14px; color: var(--text); }
.upload-zone .uz-tip { font-size: 12px; color: var(--text-lighter); }
.upload-zone .uz-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

/* ② 文件行（附件 / 已选文件共用一行式） */
.file-list {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
}
.file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
}
.file-item:last-child { border-bottom: none; }
.file-item .fi-icon { color: var(--primary); display: flex; flex-shrink: 0; }
.file-item .fi-name {
    flex: 1; min-width: 0;
    color: var(--text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.file-item .fi-meta { color: var(--text-lighter); font-size: 12px; flex-shrink: 0; }
.file-item .fi-actions {
    display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.file-item .fi-actions .op-link { font-size: 12px; }

/* ③ 解析校验反馈：统计条 + 失败行明细 */
.import-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 4px;
    padding: 9px 14px;
    font-size: 13px;
    color: var(--text);
    background: #f8f9fa;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.import-summary .ok { color: var(--success); font-weight: 600; }
.import-summary .err { color: var(--danger); font-weight: 600; }
.import-errors { margin-top: 10px; }
.import-error-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 7px 12px;
    font-size: 13px;
    color: var(--danger);
    background: var(--danger-bg);
    border-radius: var(--radius-sm);
}
.import-error-item + .import-error-item { margin-top: 6px; }
.import-error-item .err-row {
    flex-shrink: 0;
    color: var(--danger);
    font-weight: 600;
}

/* =========================================================
   标签页
   ========================================================= */
.tab-nav {
    display: flex;
    border-bottom: 1px solid var(--border);
    gap: 4px;
}
.tab-btn {
    padding: 9px 18px;
    font-size: 14px;
    color: var(--text-light);
    background: none;
    border: none;
    position: relative;
    transition: color .15s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); font-weight: 600; }
.tab-btn.active::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* =========================================================
   统计卡片 / 通用小组件
   ========================================================= */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.stat-icon {
    width: 42px; height: 42px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.stat-icon svg { color: var(--primary); }
.stat-icon.tint-primary { background: rgba(51, 88, 192, .10); }
.stat-icon.tint-accent  { background: rgba(232, 120, 74, .10); }
.stat-icon.tint-success { background: var(--success-bg); }
.stat-icon.tint-info    { background: var(--info-bg); }
.stat-icon.tint-primary svg { color: var(--primary); }
.stat-icon.tint-accent  svg { color: var(--accent); }
.stat-icon.tint-success svg { color: var(--success); }
.stat-icon.tint-info    svg { color: var(--info); }

.stat-info { min-width: 0; }
.stat-label { font-size: 13px; color: var(--text-light); }
.stat-value { font-size: 24px; font-weight: 600; color: var(--text); line-height: 1.25; margin-top: 2px; }
.stat-value .unit { font-size: 13px; font-weight: 400; color: var(--text-lighter); margin-left: 2px; }
.stat-delta { font-size: 12px; color: var(--text-lighter); margin-top: 2px; }
.stat-delta .up { color: var(--success); }
.stat-delta .down { color: var(--danger); }

/* 进度条：细轨道 + 末端气泡标签（随进度移动） */
.progress { height: 6px; background: var(--border-light); border-radius: 999px; }
.progress-bar {
    position: relative; height: 100%; border-radius: 999px;
    background: var(--primary); color: var(--primary);
    transition: width .3s;
}
/* 进度条统一跟随主色（--primary），不再提供 accent/success 等其他颜色变体 */
/* 百分比气泡：贴在填充条末端、垂直居中、向两端凸出 */
.progress-tip {
    position: absolute; right: 0; top: 50%; transform: translate(50%, -50%);
    display: inline-flex; align-items: center; height: 16px; padding: 0 6px;
    background: #fff; border: 1px solid currentColor; border-radius: 8px;
    color: inherit; font-size: 11px; font-weight: 600; line-height: 1;
    white-space: nowrap; box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
}

/* 列表项（待办、通知） */
.plain-list { }
.plain-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}
.plain-list li:last-child { border-bottom: none; }
.plain-list .li-main { flex: 1; min-width: 0; }
.plain-list .li-title {
    font-size: 14px; color: var(--text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.plain-list .li-sub { font-size: 12px; color: var(--text-lighter); margin-top: 2px; }

/* 空状态 */
.empty {
    padding: 48px 16px;
    text-align: center;
    color: var(--text-lighter);
    font-size: 13px;
}
.empty svg { margin: 0 auto 10px; color: #d0d3d8; }

/* 右侧快捷入口组 */
.quick-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    color: var(--text);
    transition: color .15s;
}
.quick-link:last-child { border-bottom: none; }
.quick-link:hover { color: var(--primary); }
.quick-link svg { color: var(--text-lighter); }
