@charset "UTF-8";
/**
 * =============================================================================
 *  SRM Vue3 SPA 应用样式 —— public/spa/common.css
 * -----------------------------------------------------------------------------
 *  仅承载「布局骨架 + 微调」，组件外观全部交给 Element Plus。
 *  命名统一前缀 .srm-  ，避免与 Element Plus / 页面内联样式冲突。
 *  注意：本文件的选择器与 common.js / components.js / admin.js / staff.js /
 *        portal.js 模板中使用的类名一一对应，改动时请同步。
 * =============================================================================
 */

/* --------------------------------------------------------------------------
   1. 全局基础
   -------------------------------------------------------------------------- */
html, body { height: 100%; }
#srm-admin-app, #srm-staff-app, #srm-portal-app { min-height: 100vh; }

/* 页面壳首屏 loading（PHP 注入，Vue 挂载后即被替换） */
.srm-boot-loading { display: flex; align-items: center; justify-content: center; height: 100vh; color: #909399; font-size: 14px; }
.srm-boot-loading .spinner { width: 24px; height: 24px; margin-right: 10px; border: 2px solid #dcdfe6; border-top-color: #409eff; border-radius: 50%; animation: srm-spin .8s linear infinite; }
@keyframes srm-spin { to { transform: rotate(360deg); } }

/* 兜底错误面板：任何渲染期异常都不能白屏 */
.srm-error {
    max-width: 760px; margin: 64px auto; padding: 20px 24px;
    background: #fff; border: 1px solid #fde2e2; border-left: 4px solid #f56c6c;
    border-radius: 0; box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}
.srm-error h3 { margin: 0 0 10px; color: #f56c6c; font-size: 16px; }
.srm-error pre { max-height: 240px; overflow: auto; margin: 10px 0 0; padding: 10px; background: #fafafa; border-radius: 0; color: #606266; font-size: 12px; line-height: 1.7; white-space: pre-wrap; word-break: break-all; }
.srm-error p { margin: 6px 0; color: #606266; font-size: 13px; line-height: 1.8; }

/* --------------------------------------------------------------------------
   文本 / 工具类

   ★ 与 assets/components.css 的关系（改这类样式前务必先看这段）

   CSS 加载顺序（见 app/Helpers/assets.php）：
       assets/theme.css  →  assets/components.css  →  spa/common.css  →  spa/sidebar.css
   所以本文件**同名选择器会覆盖 components.css**。

   下面这几条与 components.css 里的**重名**，且**取值不同**，
   实际以本文件为准：

     .srm-flex-wrap   components: flex-wrap: wrap
                      本文件:     display:flex; flex-wrap:wrap; align-items:center; gap:8px
                      → 本文件是"能换行的横向排列"语义，比纯工具类更具体
     .srm-danger      components: var(--srm-danger)
                      本文件:     #f56c6c（硬编码）
     .srm-strong      components: font-weight + var(--srm-text-strong)
                      本文件:     仅 font-weight

   这几条**只在 components.css 里**有：.srm-mt24 / .srm-mb24 / .srm-desc
   这几条**只在本文件**里有：.srm-muted / .srm-success / .srm-warning /
                            .srm-primary / .srm-nowrap / .srm-mono /
                            .srm-ml8 / .srm-grow / .srm-pre-wrap

   为什么不干脆删掉重复的：
     它们已在大量页面里被使用，删一份或改取值都可能造成**视觉回归**
     （比如去掉 gap，一排按钮就会贴在一起）。这里把差异写清楚，
     让后来的人知道"改哪一份才生效"，而不是靠猜加载顺序。
   -------------------------------------------------------------------------- */
.srm-muted      { color: #909399; }
.srm-danger     { color: #f56c6c; }   /* 覆盖 components.css 的 var(--srm-danger)，见上 */
.srm-success    { color: #67c23a; }
.srm-warning    { color: #e6a23c; }
.srm-primary    { color: #409eff; }
.srm-strong     { font-weight: 600; } /* 覆盖 components.css（那边还带 color） */
.srm-nowrap     { white-space: nowrap; }
.srm-mono       { font-family: Consolas, Monaco, "Courier New", monospace; }
.srm-mt8        { margin-top: 8px; }
.srm-mt12       { margin-top: 12px; }
.srm-mt16       { margin-top: 16px; }
.srm-mb8        { margin-bottom: 8px; }
.srm-mb12       { margin-bottom: 12px; }
.srm-mb16       { margin-bottom: 16px; }
.srm-ml8        { margin-left: 8px; }
.srm-flex       { display: flex; align-items: center; }
.srm-flex-between { display: flex; align-items: center; justify-content: space-between; }
.srm-flex-wrap  { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.srm-grow       { flex: 1 1 auto; min-width: 0; }
.srm-pre-wrap   { white-space: pre-wrap; word-break: break-word; line-height: 1.7; }

/* --------------------------------------------------------------------------
   2. 三端共用外壳：侧栏 + 顶栏 + 内容区
   -------------------------------------------------------------------------- */
.srm-layout { height: 100vh; }

/* --- 侧栏 --- */
.srm-aside {
    background: #1f2d3d;
    transition: width .25s ease;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}
.srm-aside .el-menu { border-right: none; flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; }
.srm-aside .el-menu:not(.el-menu--collapse) { width: 210px; }

.srm-logo {
    display: flex; align-items: center; gap: 10px;
    height: 56px; padding: 0 16px;
    color: #fff; font-size: 15px; font-weight: 600;
    background: #17212e; letter-spacing: .5px;
    white-space: nowrap; overflow: hidden;
}
.srm-logo__badge {
    flex: 0 0 auto; width: 26px; height: 26px; line-height: 26px; text-align: center;
    border-radius: 0; background: #409eff; color: #fff; font-size: 12px; font-weight: 700;
}
.srm-logo__text { overflow: hidden; text-overflow: ellipsis; }
.srm-aside__footer {
    padding: 10px 14px 12px;
    color: #6b7a8d;
    font-size: 12px;
    line-height: 1.5;
    border-top: 1px solid #2b3a4d;
    white-space: nowrap;
    overflow: hidden;
    /* 贴底：侧边栏内容少时也不会浮在中间 */
    margin-top: auto;
}
/* 折叠态只留版本号并居中 */
.srm-aside__footer--mini { padding: 10px 0 12px; text-align: center; }
.srm-aside__company {
    color: #9aa8bb;
    font-weight: 600;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 2px;
}
.srm-aside__ver {
    color: #5d6b7d;
    font-size: 11px;
    letter-spacing: .3px;
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Logo 徽标：折叠时给 4 个字符留宽度，避免被裁掉半个字 */
.srm-logo__badge--wide { width: auto; min-width: 26px; padding: 0 4px; }

/* -----------------------------------------------------------------------------
 *  主题色联动
 *  侧边栏 / 顶栏的自定义颜色跟随「站点设置 → 主题色」，
 *  与 Element Plus 组件（按钮、链接、高亮）保持一致观感。
 *  变量由 common.js 的 applyTheme() 写入 :root。
 * -------------------------------------------------------------------------- */
.srm-aside .el-menu-item.is-active {
    background: var(--srm-primary, #409eff) !important;
    color: #fff !important;
}
.srm-aside .el-menu-item.is-active .srm-icon { color: #fff; }
.srm-aside .el-menu-item:hover,
.srm-aside .el-sub-menu__title:hover {
    background: rgba(255, 255, 255, .06) !important;
}
.srm-logo { border-bottom: 1px solid rgba(255, 255, 255, .06); }
.srm-collapse-btn:hover { color: var(--srm-primary, #409eff); }

/* --- 顶栏 --- */
.srm-header {
    display: flex; align-items: center; justify-content: space-between;
    height: 56px; padding: 0 16px;
    background: #fff; border-bottom: 1px solid #e6e8eb;
    box-shadow: 0 1px 4px rgba(0, 21, 41, .04);
}
.srm-header__left  { display: flex; align-items: center; gap: 12px; min-width: 0; }
.srm-header__right { display: flex; align-items: center; gap: 6px; }
.srm-header__title { font-size: 15px; font-weight: 600; color: #303133; white-space: nowrap; }
.srm-header__title .srm-header__sub { margin-left: 8px; font-size: 12px; font-weight: 400; color: #909399; }
.srm-collapse-btn { cursor: pointer; color: #606266; font-size: 18px; padding: 0 4px; user-select: none; }
.srm-collapse-btn:hover { color: #409eff; }

.srm-bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 0; cursor: pointer; color: #606266; font-size: 18px; }
.srm-bell:hover { background: #f5f7fa; color: #409eff; }
.srm-bell__badge {
    position: absolute; top: 2px; right: 0;
    min-width: 16px; height: 16px; padding: 0 4px; line-height: 16px;
    background: #f56c6c; color: #fff; font-size: 11px; text-align: center;
    border-radius: 9999px; box-shadow: 0 0 0 2px #fff;
}
.srm-bell__badge--dot { min-width: 10px; height: 10px; padding: 0; line-height: 10px; border-radius: 50%; }

/*
 * 顶栏用户区 —— **只显示姓名 + 下拉箭头**（按业务要求）。
 *
 * ★ 这一版去掉了头像与第二行"部门/身份"
 *   原因：姓名本身已够识别；两行文字把顶栏撑得挤，而且部门名长短不一
 *   会让控件宽度来回跳动。现在结构最简单：姓名 + 箭头。
 *
 * ★ 保留的约束（这些是踩过坑的，别删）
 *   el-dropdown 会在外面套一层，真正参与排布的是那一层 ——
 *   只给 .srm-user 写 flex 不够，包装层也必须是 flex 且不收缩，
 *   否则文字会在挤压下退化成竖排堆叠
 *   （截图上出现过"理员 / 管理员 / 管理员"三行）。
 */
.srm-header__right > .el-dropdown,
.srm-header__right > .el-dropdown > .el-tooltip__trigger {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    max-width: none;
}

.srm-user {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    cursor: pointer;
    flex: 0 0 auto;
    white-space: nowrap;
    transition: background-color .16s;
}
.srm-user:hover { background: var(--srm-header-hover, #F3F4F6); }

/* 姓名：单行不折行（顶栏高度固定，折行就会溢出被裁）。过长则省略 */
.srm-user__name {
    font-size: var(--fs-body);
    font-weight: 500;
    color: var(--srm-header-fg, #1F2937);
    white-space: nowrap;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/*
 * 下拉箭头：留一点左侧间距。
 * SrmIcon 命中图标库时渲染 <svg class="el-icon">，未命中时渲染
 * <span class="srm-icon-glyph">，两种都要覆盖。
 */
.srm-user > svg,
.srm-user > .srm-icon-glyph {
    flex: 0 0 auto;
    margin-left: 2px;
    color: var(--srm-header-fg-muted, #6B7280);
}

/*
 * 已废弃：头像与"部门/身份"行。
 * 组件里不再渲染这两个元素，样式保留成注释 ——
 * 将来若要恢复头像，直接照抄即可，不必重新设计一遍。
 *
 * .srm-user__avatar { flex:0 0 30px; width:30px; height:30px; line-height:30px;
 *   text-align:center; border-radius:50%; background:var(--srm-primary-light-9,#EFF6FF);
 *   color:var(--srm-primary,#2563EB); font-size:12px; font-weight:600; }
 * .srm-user__meta { display:flex; flex-direction:column; line-height:1.25; }
 * .srm-user__dept { font-size:11px; color:var(--srm-header-fg-muted,#6B7280); }
 */

/* --- 内容区 --- */
.srm-main { background: #f5f7fa; padding: 16px; overflow-y: auto; }
.srm-main__inner { max-width: 1600px; margin: 0 auto; }

/* --------------------------------------------------------------------------
   3. 页面头 / 卡片 / 工具条
   -------------------------------------------------------------------------- */
/*
 * ★ 这里曾经有一套 .srm-page__head / __title / __desc 定义，
 *   已被 spa/sidebar.css 里的框架层定义**完全覆盖**（它后加载）。
 *
 *   两份定义同时存在是隐患：
 *     · 这一份写的是 justify-content: space-between（标题左、按钮右）
 *     · 框架层那份写的是 flex-direction: column（按钮独占一行、左对齐）
 *   后出现者生效，所以实际是**左对齐**；但先看这一份的人会以为按钮在右边，
 *   改样式时还可能改到不生效的那一份上。
 *
 *   页面容器的唯一定义在 spa/sidebar.css（见其中「页面标题区」一节），
 *   这里只保留 .srm-page__actions 这个业务层用得到的排布规则。
 */
.srm-page__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.srm-card { margin-bottom: 14px; }
.srm-card > .el-card__header { padding: 12px 16px; }
.srm-card__title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 600; color: #303133; }
.srm-card__title .srm-card__tip { font-size: 12px; font-weight: 400; color: #909399; }
.srm-card--flat > .el-card__body { padding: 0; }

.srm-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.srm-toolbar__right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.srm-pager { display: flex; justify-content: flex-end; margin-top: 14px; }

/* 空状态 */
.srm-empty { display: flex; align-items: center; justify-content: center; padding: 28px 0; }
.srm-empty .el-empty { padding: 18px 0; }

/* --------------------------------------------------------------------------
   4. 统计卡片（工作台 / 报表）
   -------------------------------------------------------------------------- */
.srm-stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 14px; }
.srm-stat-card { display: flex; align-items: center; gap: 14px; padding: 16px; background: #fff; border: 1px solid #ebeef5; border-radius: 0; transition: box-shadow .2s, transform .2s; }
.srm-stat-card:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, .07); transform: translateY(-1px); }
.srm-stat-card__icon { flex: 0 0 auto; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; border-radius: 0; background: rgba(64, 158, 255, .1); font-size: 22px; }
.srm-stat-card__body { min-width: 0; }
.srm-stat-card__value { font-size: 24px; font-weight: 700; line-height: 1.15; color: #303133; }
.srm-stat-card__title { margin-top: 4px; font-size: 13px; color: #606266; }
.srm-stat-card__extra { margin-top: 2px; font-size: 12px; color: #909399; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --------------------------------------------------------------------------
   5. 图表容器（必须有固定高度，否则 ECharts 高度为 0 不渲染）
   -------------------------------------------------------------------------- */
.srm-chart { width: 100%; height: 320px; }
.srm-chart--sm { height: 240px; }
.srm-chart--lg { height: 380px; }
.srm-chart__empty { display: flex; align-items: center; justify-content: center; height: 100%; color: #c0c4cc; font-size: 13px; }
.srm-chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 14px; }

/* --------------------------------------------------------------------------
   6. 准入：部门得分率 / 一票否决
   -------------------------------------------------------------------------- */
.srm-veto { margin-bottom: 14px; }
.srm-dept-list { display: flex; flex-direction: column; gap: 14px; }
.srm-dept-row { padding: 12px 14px; border: 1px solid #ebeef5; border-radius: 0; background: #fff; }
.srm-dept-row--fail { border-color: #fbc4c4; background: #fef0f0; }
.srm-dept-row__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.srm-dept-row__name { font-size: 14px; font-weight: 600; color: #303133; }
.srm-dept-row__meta { font-size: 12px; color: #909399; }
.srm-dept-row__score { font-size: 16px; font-weight: 700; }
.srm-dept-row__score--fail { color: #f56c6c; }
.srm-dept-row__score--pass { color: #67c23a; }

/* 汇总口径展示 */
.srm-summary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.srm-summary-item { padding: 10px 12px; border: 1px solid #ebeef5; border-radius: 0; background: #fafbfc; }
.srm-summary-item__label { font-size: 12px; color: #909399; }
.srm-summary-item__value { margin-top: 4px; font-size: 18px; font-weight: 700; color: #303133; }
.srm-summary-item--fail { border-color: #fbc4c4; background: #fef0f0; }
.srm-summary-item--fail .srm-summary-item__value { color: #f56c6c; }

/* --------------------------------------------------------------------------
   7. 评分表单（准入 / 绩效）
   -------------------------------------------------------------------------- */
.srm-score-section { margin-bottom: 16px; }
.srm-score-section__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; background: #f5f7fa; border: 1px solid #ebeef5; border-radius: 0 0 0; flex-wrap: wrap; }
.srm-score-section__title { font-size: 14px; font-weight: 600; color: #303133; }
.srm-score-section__meta { font-size: 12px; color: #909399; }
.srm-score-row { display: grid; grid-template-columns: 82px 1fr 260px; gap: 12px; padding: 12px 14px; border: 1px solid #ebeef5; border-top: none; background: #fff; }
.srm-score-row:last-child { border-radius: 0 0 6px 6px; }
.srm-score-row--na { background: #fafafa; }
.srm-score-row__code { font-size: 13px; font-weight: 600; color: #409eff; }
.srm-score-row__content { min-width: 0; }
.srm-score-row__text { font-size: 13px; color: #303133; line-height: 1.7; }
.srm-score-row__hint { margin-top: 6px; font-size: 12px; color: #909399; line-height: 1.6; }
.srm-score-row__score { display: flex; flex-direction: column; gap: 6px; }
.srm-score-row__na { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.srm-score-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; padding: 12px 14px; background: #fff; border: 1px solid #ebeef5; border-radius: 0; flex-wrap: wrap; }

/* 绩效指标行（含权重显示） */
.srm-ind-row { display: grid; grid-template-columns: 82px 1fr 300px; gap: 12px; padding: 12px 14px; border: 1px solid #ebeef5; border-top: none; background: #fff; }
.srm-ind-row:last-child { border-radius: 0 0 6px 6px; }
.srm-ind-row__weight { font-size: 12px; color: #e6a23c; }

/* --------------------------------------------------------------------------
   8. 质量考核：缺陷明细动态行 + 扣分实时预览
   -------------------------------------------------------------------------- */
.srm-quality-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.srm-issue-row { display: grid; grid-template-columns: 44px minmax(0, 1.5fr) 110px 110px 120px 40px; gap: 8px; align-items: start; padding: 10px 0; border-bottom: 1px dashed #ebeef5; }
.srm-issue-row__seq { padding-top: 8px; font-size: 13px; color: #909399; text-align: center; }
.srm-issue-deduct { padding-top: 8px; font-size: 14px; font-weight: 700; color: #f56c6c; text-align: right; }

.srm-deduct-panel { position: sticky; top: 0; }
.srm-deduct-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; font-size: 13px; color: #606266; border-bottom: 1px dashed #ebeef5; }
.srm-deduct-row:last-of-type { border-bottom: none; }
.srm-deduct-row__value { font-weight: 700; color: #303133; }
.srm-deduct-final { margin-top: 12px; padding: 14px; text-align: center; border-radius: 0; background: #f5f7fa; }
.srm-deduct-final__value { font-size: 30px; font-weight: 700; line-height: 1.1; }
.srm-deduct-final__label { margin-top: 4px; font-size: 12px; color: #909399; }
.srm-deduct--pass { background: #f0f9eb; }
.srm-deduct--pass .srm-deduct-final__value { color: #67c23a; }
.srm-deduct--fail { background: #fef0f0; }
.srm-deduct--fail .srm-deduct-final__value { color: #f56c6c; }
.srm-deduct-legend { margin-top: 10px; font-size: 12px; color: #909399; line-height: 1.8; }

/* 整改闭环进度小条 */
.srm-rectify-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #606266; }
.srm-rectify-bar { flex: 1 1 auto; height: 6px; border-radius: 3px; background: #ebeef5; overflow: hidden; }
.srm-rectify-bar__inner { height: 100%; border-radius: 3px; background: #409eff; transition: width .3s; }

/* --------------------------------------------------------------------------
   9. 角色权限矩阵
   -------------------------------------------------------------------------- */
.srm-matrix-wrap { overflow-x: auto; }
.srm-matrix { width: 100%; border-collapse: collapse; font-size: 13px; }
.srm-matrix th, .srm-matrix td { padding: 8px 10px; border: 1px solid #ebeef5; text-align: left; vertical-align: middle; }
.srm-matrix thead th { background: #f5f7fa; color: #303133; font-weight: 600; white-space: nowrap; }
.srm-matrix tbody tr:hover td { background: #fafcff; }
.srm-matrix td.srm-matrix__group { background: #fafafa; font-weight: 600; color: #606266; white-space: nowrap; }
.srm-matrix td.srm-matrix__check { text-align: center; width: 110px; }
.srm-matrix .srm-matrix__code { font-size: 12px; color: #909399; }

/* --------------------------------------------------------------------------
   10. 描述列表 / 详情页微调
   -------------------------------------------------------------------------- */
.srm-desc .el-descriptions__label { width: 130px; color: #606266; }
.srm-detail-tabs > .el-tabs__header { margin-bottom: 14px; }
.srm-timeline-note { font-size: 12px; color: #909399; white-space: pre-wrap; word-break: break-word; }
.srm-detail-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* 图标兜底（未加载 @element-plus/icons-vue 时用字形代替） */
.srm-icon-glyph { display: inline-block; line-height: 1; font-style: normal; text-align: center; }

/* 上传区 */
.srm-upload-tip { font-size: 12px; color: #909399; line-height: 1.8; }
.srm-attach-list { width: 100%; }

/* 通知列表 */
.srm-notice { display: flex; gap: 12px; padding: 12px 14px; border-bottom: 1px solid #f0f2f5; }
.srm-notice:last-child { border-bottom: none; }
.srm-notice--unread { background: #f5faff; }
.srm-notice__dot { flex: 0 0 auto; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: #409eff; }
.srm-notice__dot--read { background: #dcdfe6; }
.srm-notice__body { flex: 1 1 auto; min-width: 0; }
.srm-notice__title { font-size: 14px; color: #303133; font-weight: 600; }
.srm-notice__content { margin-top: 4px; font-size: 13px; color: #606266; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.srm-notice__meta { margin-top: 6px; font-size: 12px; color: #909399; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   11. 响应式：窄屏收起边距、评分行改为纵向
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
    .srm-score-row, .srm-ind-row { grid-template-columns: 72px minmax(0, 1fr); }
    .srm-score-row__score { grid-column: 1 / -1; }
    .srm-quality-layout { grid-template-columns: minmax(0, 1fr); }
    .srm-deduct-panel { position: static; }
}
@media (max-width: 768px) {
    .srm-main { padding: 10px; }
    .srm-header { padding: 0 10px; }
    /* 窄屏：姓名收得更短（顶栏还要放折叠按钮、搜索、铃铛） */
    .srm-user__name { max-width: 84px; }
    .srm-issue-row { grid-template-columns: 36px minmax(0, 1fr); }
    .srm-issue-row > *:nth-child(n+3) { grid-column: 2 / -1; }
    .srm-stat-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* =============================================================================
 *  企业微信设置页（.wx-*）
 * ========================================================================== */

/* 状态概览小盒 */
.wx-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.wx-stat {
    background: #f7f9fc;
    border: 1px solid #eaeef5;
    border-radius: 0;
    padding: 11px 13px;
}
.wx-stat--warn { background: #fff8ee; border-color: #ffe0b8; }
.wx-stat--small .wx-stat__value { font-size: 13px; font-weight: 500; color: #606266; }
.wx-stat__label { font-size: 12px; color: #909399; margin-bottom: 5px; }
.wx-stat__value { font-size: 19px; font-weight: 700; color: #303133; line-height: 1.25; word-break: break-all; }

/* 开关行：文字在左、开关在右 */
.wx-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 7px 0;
}
.wx-switch__label { font-size: 14px; color: #303133; }
.wx-switch__desc { font-size: 12px; color: #a0a8b8; margin-top: 3px; line-height: 1.6; }

/* 密钥字段下的说明 */
.wx-tip {
    display: flex;
    align-items: center;
    margin-top: 6px;
    font-size: 12px;
    color: #a0a8b8;
    line-height: 1.6;
}

/* 操作按钮行 */
.wx-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* 配置指引的有序列表 */
.wx-guide {
    margin: 0;
    padding-left: 20px;
    color: #5a6478;
    line-height: 2;
    font-size: 13px;
}
.wx-guide li { margin-bottom: 2px; }

/* ---------------------------------------------------------------------------
 *  「企微后台信息」页签：可复制的值
 * ---------------------------------------------------------------------------
 *  这一列放的是"要抄进企微后台的那串字符"（域名、CorpID、AgentID…），
 *  所以按**代码**排版：等宽字体 + 浅底 + 可换行（长 URL 不换行会把
 *  表格撑出横向滚动条），右侧紧跟一个「复制」按钮。
 * ------------------------------------------------------------------------- */
.wx-copy {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;                 /* 允许内部的 code 收缩并换行 */
}
.wx-copy__val {
    flex: 1 1 auto;
    min-width: 0;
    background: var(--srm-fill-2, #f0f2f5);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12.5px;
    /* 长地址必须能断行，否则整张表被它撑宽 */
    word-break: break-all;
    white-space: normal;
}

/* 嵌套开关（同步范围里那几个）收紧一点间距 */
.el-form-item .wx-switch { padding: 4px 0; }

/* =============================================================================
 *  准入评审详情（.srm-score-* / .srm-cell-* / .srm-pre）
 * ========================================================================== */

/* 结论小盒：总分 / 得分率 / 等级 / 单部门最低得分率
 *
 * ★ 配色一律走令牌。
 *   原先这里是写死的 #f7f9fc / #909399 / #303133 等 ——
 *   深色模式下这些浅色底与深色字会与页面背景打架，
 *   后台改主色时这块也不会跟随。
 */
.srm-score-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
}
/* 进度环容器：固定宽度，否则会被弹性布局压扁导致环变形 */
.srm-score-ring { flex: 0 0 180px; width: 180px; }
@media (max-width: 900px) {
    /* 窄屏纵向堆叠，环占满宽度 */
    .srm-score-wrap { flex-direction: column; align-items: stretch; }
    .srm-score-ring { flex: 0 0 auto; width: 100%; }
}

.srm-score-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}
.srm-score-box {
    background: var(--gray-50);
    border: 1px solid var(--srm-border);
    border-radius: var(--radius-btn);
    padding: 14px 16px;
}
.srm-score-box--danger {
    background: var(--el-color-danger-light-9);
    border-color: var(--srm-danger);
}
.srm-score-box__label { font-size: var(--fs-xs); color: var(--srm-text-muted); margin-bottom: 6px; }
.srm-score-box__value {
    font-size: 24px;
    font-weight: 700;
    color: var(--srm-text-strong);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}
.srm-score-box--danger .srm-score-box__value { color: var(--srm-danger); }
.srm-score-box__sub { font-size: var(--fs-xs); color: var(--srm-text-faint); margin-top: 5px; }

/* 表格内的评分进度条 */
.srm-cell-progress { display: flex; align-items: center; gap: 8px; }
.srm-cell-progress__text {
    font-size: var(--fs-xs); color: var(--srm-text-muted); white-space: nowrap; min-width: 44px;
}

/* 卡片标题右侧的补充说明 */
.srm-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.srm-card-head__extra { font-size: var(--fs-xs); color: var(--srm-text-muted); font-weight: 400; }

/* 表单里的说明文字 */
.srm-form-tip {
    font-size: var(--fs-xs); color: var(--srm-text-faint); margin-top: 6px; line-height: 1.7;
}

/* 进度条下方备注 */
.srm-progress-note { font-size: var(--fs-xs); color: var(--srm-text-muted); margin-top: 8px; }

/* 保留换行的纯文本块（审批意见等） */
.srm-pre {
    white-space: pre-wrap; line-height: 1.85; color: var(--srm-text); font-size: 13px;
}

/* 加载占位 */
.srm-loading { padding: 42px 0; text-align: center; color: #a0a8b8; font-size: 13px; }

/* 空值占位符 */
.srm-dash { color: #c8cdd6; }

/* =============================================================================
 *  绩效 / 质量等业务页面（.srm-* 通用件）
 * ========================================================================== */

/* 次要说明文字（表格单元格下方的小字） */
.srm-cell-sub { font-size: 11px; color: #a0a8b8; margin-top: 2px; line-height: 1.4; }

/* 危险色文本（扣分、超标等） */
.srm-text-danger { color: #f56c6c; }

/* 加粗强调 */
.srm-strong { font-weight: 600; color: #303133; }

/* 同行排列的表单项内容 */
.srm-inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.srm-period-note { font-size: 12px; color: #909399; }

/* 两列表单栅格（信息量大的新建页用） */
.srm-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 0 18px;
}
.srm-form-grid .el-form-item { margin-bottom: 16px; }

/* 部门评分人指派 */
.srm-assign-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 8px 18px;
}
.srm-assign-item { display: flex; align-items: center; gap: 10px; }
.srm-assign-item__name {
    font-size: 13px; color: #5a6478; min-width: 62px; text-align: right;
}

/* 表单底部操作区 */
.srm-form-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* 表格里被选中的行（质量考核选缺陷时） */
.el-table .srm-row-picked td.el-table__cell { background: #ecf5ff; }

/* 整改效果确认列表项 */
.srm-effect-item {
    border: 1px solid #eaeef5;
    border-radius: 0;
    padding: 12px 14px;
    margin-bottom: 12px;
    background: #fafbfe;
}
.srm-effect-item__head {
    display: flex; align-items: center; gap: 10px; margin-bottom: 5px; flex-wrap: wrap;
}
.srm-effect-item__meta {
    font-size: 12px; color: #909399; margin-bottom: 9px; line-height: 1.7;
}

/* =============================================================================
 *  组织权限与账号页面（.srm-role-item / .srm-perm-* / .srm-unbound-*）
 * ========================================================================== */

/* 角色选择项（分配角色对话框） */
.srm-role-item {
    padding: 8px 0 8px 2px;
    border-bottom: 1px solid #f2f5fa;
}
.srm-role-item:last-child { border-bottom: 0; }
.srm-role-item__desc {
    font-size: 12px; color: #a0a8b8; line-height: 1.6;
    margin: 3px 0 0 24px;
}

/* 权限矩阵 */
.srm-perm-wrap { max-height: 58vh; overflow-y: auto; padding-right: 4px; }
.srm-perm-toolbar {
    display: flex; align-items: center; gap: 10px;
    padding-bottom: 10px; margin-bottom: 6px;
    border-bottom: 1px solid #f0f2f7;
    position: sticky; top: 0; background: #fff; z-index: 2;
}
.srm-perm-count { font-size: 12px; color: #909399; margin-left: auto; }
.srm-perm-mod { padding: 10px 0 4px; border-bottom: 1px dashed #eef1f6; }
.srm-perm-mod:last-child { border-bottom: 0; }
.srm-perm-mod__head {
    display: flex; align-items: center;
    margin-bottom: 7px;
}
.srm-perm-mod .el-checkbox-group {
    display: flex; flex-wrap: wrap; gap: 4px 0;
}
.srm-perm-mod .el-checkbox {
    width: 25%;
    min-width: 150px;
    margin-right: 0;
    padding: 2px 0;
}

/* 待建号供应商网格 */
.srm-unbound-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
}
.srm-unbound-item {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 12px;
    background: #fafbfe;
    border: 1px solid #eaeef5;
    border-radius: 0;
}

/* 窄屏：权限矩阵改为两列 */
@media (max-width: 768px) {
    .srm-perm-mod .el-checkbox { width: 50%; min-width: 0; }
}

/* =============================================================================
 *  报表中心（.srm-kpi / .srm-kv / .srm-json / .srm-rank …）
 * ========================================================================== */

/* KPI 卡片网格 */
.srm-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}
.srm-kpi {
    background: #f7f9fc;
    border: 1px solid #eaeef5;
    border-radius: 0;
    padding: 13px 15px;
}
.srm-kpi--success { background: #f0f9f2; border-color: #cfe9d6; }
.srm-kpi--warn    { background: #fff8ee; border-color: #ffe0b8; }
.srm-kpi--danger  { background: #fef2f2; border-color: #fecaca; }
.srm-kpi__label { font-size: 12px; color: #909399; margin-bottom: 6px; }
.srm-kpi__value {
    font-size: 22px; font-weight: 700; color: #303133; line-height: 1.2;
    word-break: break-all;
}
.srm-kpi--danger .srm-kpi__value { color: #dc2626; }
.srm-kpi--success .srm-kpi__value { color: #2f9e44; }
.srm-kpi--warn .srm-kpi__value { color: #d97706; }
.srm-kpi__sub { font-size: 12px; color: #a0a8b8; margin-top: 5px; }

/* 筛选行里的行内标签 */
.srm-filter-label { font-size: 13px; color: #5a6478; white-space: nowrap; }
.srm-filter-sep { font-size: 13px; color: #a0a8b8; }

/* 报表单元格：数值 + 下方小字 */
.srm-report-cell { display: flex; flex-direction: column; gap: 3px; }
.srm-report-cell .el-progress { width: 100%; }

/* 排名序号 */
.srm-rank { font-weight: 600; color: #606266; }

/*
 * 供方排名：图表区（在 SrmListCard 内部、表格上方）
 *
 * 用 .srm-card__title 复用卡片标题的字号与颜色，保证与其它卡片标题一致；
 * 下边距与 .srm-table-divider 的留白对齐。
 */
.srm-rank-chart { margin-bottom: 14px; }
.srm-rank-chart .srm-card__title { justify-content: flex-start; gap: 8px; }
.srm-rank-chart .srm-card__tip { margin-left: auto; }

/* 键值对网格（日志详情） */
.srm-kv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px 16px;
    margin-bottom: 14px;
}
.srm-kv { display: flex; gap: 8px; font-size: 13px; line-height: 1.7; }
.srm-kv__k { color: #909399; white-space: nowrap; min-width: 62px; }
.srm-kv__v { color: #303133; word-break: break-all; }

/* 详情小标题 */
.srm-detail-label {
    font-size: 12px; font-weight: 600; color: #5a6478;
    margin: 12px 0 4px;
}

/* JSON 原样展示 */
.srm-json {
    background: #f7f9fc;
    border: 1px solid #eaeef5;
    border-radius: 0;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.6;
    color: #475569;
    max-height: 240px;
    overflow: auto;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
}

/* -----------------------------------------------------------------------------
 *  渲染错误诊断卡（SrmErrorBoundary）
 *  渲染异常时用可读诊断卡替代空白内容区
 * -------------------------------------------------------------------------- */
.srm-err-detail {
    margin: 0 0 14px;
    border: 1px solid var(--el-border-color-light, #e4e7ed);
    border-radius: 0;
    background: #fafafa;
    padding: 10px 12px;
}
.srm-err-detail > summary {
    cursor: pointer;
    font-size: 13px;
    color: var(--el-color-primary, #409eff);
    user-select: none;
}
.srm-err-detail[open] > summary { margin-bottom: 8px; }
.srm-err-detail .srm-json { max-height: 320px; overflow: auto; margin: 0; }
/* -----------------------------------------------------------------------------
 *  表单字段辅助（srm-field-with-hint）
 *  用于在输入框下方给一行说明，或在字段上标注"供方可自评填写"。
 * -------------------------------------------------------------------------- */
.srm-field-with-hint { width: 100%; }
.srm-field-with-hint .el-input,
.srm-field-with-hint .el-select,
.srm-field-with-hint .el-input-number { width: 100%; }
.srm-field-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.5;
    color: #909399;
}
.srm-field-hint--self {
    display: inline-block;
    margin-top: 4px;
    padding: 1px 7px;
    border-radius: 0;
    background: var(--srm-primary-soft, #ecf3fe);
    color: var(--srm-primary, #409eff);
    font-size: 11px;
}

/* 「展开其余信息」区块：与上方核心字段之间做视觉区分 */
.srm-more-fields {
    margin-top: 8px;
    padding-top: 4px;
    border-top: 1px dashed var(--el-border-color-light, #e4e7ed);
}
.srm-more-fields__title {
    margin: 16px 0 10px;
    padding-left: 9px;
    border-left: 3px solid var(--srm-primary, #409eff);
    font-size: 13px;
    font-weight: 600;
    color: #1f2d3d;
    line-height: 1.2;
}
/* -----------------------------------------------------------------------------
 *  站点设置页
 * -------------------------------------------------------------------------- */
.srm-setting-item { width: 100%; max-width: 720px; }
.srm-setting-item > .el-input,
.srm-setting-item > .el-select,
.srm-setting-item > .el-textarea { width: 100%; }

.srm-color-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.srm-color-val {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    color: #606266;
    padding: 2px 8px;
    border-radius: 0;
    background: #f5f7fa;
}

/* 供方自评字段勾选矩阵 */
.srm-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 6px 14px;
    margin-bottom: 6px;
}
.srm-check-grid .el-checkbox { margin-right: 0; height: 30px; }

/* --- 设置页预览区 --- */
.srm-preview-frame {
    padding: 18px;
    border-radius: 0;
    background: linear-gradient(160deg, #f4f7fb 0%, #e9eef6 100%);
}
.srm-preview-card {
    max-width: 360px;
    margin: 0 auto;
    padding: 22px 20px 18px;
    background: #fff;
    border-radius: 0;
    box-shadow: 0 8px 24px rgba(31, 45, 61, .10);
    text-align: center;
}
.srm-preview-brand {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 15px; font-weight: 600; color: #1f2d3d; margin-bottom: 18px;
}
.srm-preview-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 28px; height: 28px; padding: 0 6px; border-radius: 0;
    color: #fff; font-size: 12px; font-weight: 700;
}
.srm-preview-tabs { display: flex; gap: 10px; margin-bottom: 16px; }
.srm-preview-tab {
    flex: 1; padding: 9px 0; border-radius: 0; font-size: 13px;
    background: #f5f7fa; color: #606266; border: 1px solid transparent;
}
.srm-preview-tab.is-active { background: #fff; font-weight: 600; }
.srm-preview-notice {
    margin-bottom: 12px; padding: 8px 10px; border-radius: 0;
    background: #fff9e6; color: #a67c00; font-size: 12px; text-align: left;
}
.srm-preview-btn {
    padding: 11px 0; border-radius: 0; color: #fff;
    font-size: 15px; font-weight: 600;
}
.srm-preview-icp {
    margin-top: 14px; text-align: center; font-size: 12px; color: #8a97a6;
}
.srm-preview-icp a { color: #8a97a6; text-decoration: none; }
.srm-preview-icp a:hover { color: var(--srm-primary, #409eff); }

/* 侧边栏底部预览 */
.srm-preview-aside {
    width: 210px; margin: 0 auto; border-radius: 0; overflow: hidden;
    background: #1f2d3d; color: #c0c8d4;
}
.srm-preview-aside__logo {
    height: 44px; display: flex; align-items: center; padding: 0 14px;
    background: #17212e; color: #fff; font-weight: 600; font-size: 13px;
}
/* 预览里显示真实 Logo 时的图片样式（替代上面的文字占位） */
.srm-preview-aside__logo-img {
    height: 44px; max-width: 100%; object-fit: contain;
    padding: 6px 14px; box-sizing: border-box; background: #17212e; display: block;
}
.srm-preview-aside__foot {
    padding: 12px 14px; border-top: 1px solid #2b3a4d;
}
/* 顺序与真实侧边栏一致：版号在上、公司名在下 */
.srm-preview-aside__ver { color: #5d6b7d; font-size: 11px; }
.srm-preview-aside__company { color: #9aa8bb; font-weight: 600; font-size: 12px; margin-top: 2px; }

/* =============================================================================
 *  站点设置 · Logo 上传控件
 * -----------------------------------------------------------------------------
 *  原先 logo_url 只是一个文本输入框，要求管理员自己把图片传到服务器
 *  再手抄一条 URL —— 实际上没人会这么干，等于这个设置项没法用。
 *  现在给上传按钮 + 预览 + 移除，输入框降级为"可选的外链手填"。
 * ========================================================================== */
.srm-logo-field { display: flex; flex-direction: column; max-width: 520px; }
.srm-logo-field__preview {
    display: flex; align-items: center; justify-content: center;
    min-height: 72px; padding: 10px 14px; margin-bottom: 10px;
    border: 1px solid var(--srm-border, #dcdfe6); border-radius: 0;
    background: repeating-conic-gradient(#f3f4f6 0% 25%, #fff 0% 50%) 50% / 16px 16px;
}
/* 棋盘底：透明背景的 PNG/SVG 也能看清边界 */
.srm-logo-field__preview img { max-height: 52px; max-width: 300px; object-fit: contain; }
.srm-logo-field__empty {
    display: flex; align-items: center; justify-content: center;
    min-height: 72px; margin-bottom: 10px; border: 1px dashed var(--srm-border, #dcdfe6);
    border-radius: 0; color: var(--srm-text-secondary, #909399); font-size: 13px;
}
.srm-logo-field__ops { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.srm-logo-field__tip { color: var(--srm-text-secondary, #909399); font-size: 12px; }

/* 编码效果预览 */
.srm-code-preview {
    padding: 16px 18px; border-radius: 0; background: #f6f8fb;
}
.srm-code-preview__label { font-size: 12px; color: #8a97a6; margin-bottom: 6px; }
.srm-code-preview__value {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 20px; font-weight: 700; color: var(--srm-primary, #409eff);
    letter-spacing: .5px; word-break: break-all;
}
/* =============================================================================
 *  VISUAL POLISH —— 统一视觉规范（v2.7.0）
 * -----------------------------------------------------------------------------
 *  为什么集中放在文件末尾：
 *    这里是对前面基础样式的**系统性收敛**，不是零散补丁。
 *    放在末尾可以利用 CSS 的正常层叠覆盖前面的规则，
 *    避免修改散落各处的基础样式时引入难以预料的连锁影响。
 *
 *  设计基线（改样式时请遵守，否则观感会重新变得杂乱）：
 *    圆角   卡片 10px / 控件 8px / 胶囊 999px
 *    间距   内容区 20px；区块之间 16px；卡片内 18-20px
 *    字号   页标题 19px / 卡片标题 14px / 正文 13-14px / 辅助 12px
 *    色彩   主色 --srm-primary；正文 #303133；次要 #606266；辅助 #909399
 *    阴影   卡片默认无阴影，仅 1px 边框；悬浮态才给淡阴影
 * ========================================================================== */

/* --- 内容区：给页面留出呼吸感 --- */
.srm-main { padding: 20px 22px; }
@media (max-width: 768px) {
    .srm-main { padding: 12px; }
}

/* --- 页面标题区 --- */
/*
 * 布局约定：标题在上，操作按钮**独占一行、左对齐**。
 *
 * 这样「新建 xxx」这类主操作就落在内容区最左侧（紧贴侧边栏右侧），
 * 而不是飘到最右边 —— 右侧在大屏上离视线很远，且按钮位置会随标题
 * 长度左右跳动。左对齐后位置固定、易形成肌肉记忆。
 */
.srm-page__head {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 0;
}
.srm-page__title {
    font-size: 19px;
    font-weight: 600;
    color: #1f2d3d;
    letter-spacing: .2px;
    line-height: 1.35;
}
.srm-page__desc {
    margin-top: 7px;
    font-size: 12.5px;
    color: #8a94a6;
    line-height: 1.65;
}

/* --- 卡片：统一圆角与边框，去掉默认重阴影 --- */
.el-card {
    border-radius: 0;
    border: 1px solid #ebeef5;
    box-shadow: none !important;
}
.el-card__header {
    padding: 14px 20px;
    border-bottom: 1px solid #f2f4f8;
    font-size: 14px;
    font-weight: 600;
    color: #303133;
}
.el-card__body { padding: 18px 20px; }
/* 表格类卡片：正文不留内边距，让表格贴边更整齐 */
.srm-card--flat > .el-card__body { padding: 0; }
.srm-card { margin-bottom: 16px; }

/* 卡片头部：左标题 + 右说明/操作 */
.srm-card__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #303133;
}
.srm-card__tip { font-size: 12px; font-weight: 400; color: #909399; }

/* --- 表格：表头加底色、行悬浮更明显、去掉过重的边框 --- */
.el-table {
    font-size: 13px;
    color: #303133;
}
.el-table th.el-table__cell {
    background: #f7f9fc !important;
    color: #5a6478;
    font-weight: 600;
    font-size: 12.5px;
    letter-spacing: .2px;
}
.el-table--border .el-table__cell { border-right-color: #f2f4f8; }
.el-table td.el-table__cell,
.el-table th.el-table__cell { border-bottom-color: #f2f4f8; }
.el-table--enable-row-hover .el-table__body tr:hover > td.el-table__cell {
    background: #f7faff;
}
/* 单元格内多行文本的层级 */
.el-table .cell { line-height: 1.6; }
.el-table__empty-block { min-height: 140px; }

/* --- 表单：标签对齐与控件高度统一 --- */
.el-form-item__label {
    color: #5a6478;
    font-weight: 500;
}
/* ==========================================================================
 *  直角商务风（业务要求：按钮、输入框取消圆角）
 * ==========================================================================
 *
 *  ★ 为什么这里还要写一遍（theme.css 里已经改过令牌了）
 *
 *    Element Plus 自带样式表**先于本项目所有 CSS 加载**（见
 *    app/Helpers/assets.php 的 css 顺序），所以 theme.css 里的
 *    --el-border-radius-base 覆盖是生效的 —— 但 Element Plus 内部
 *    还有一批**按组件写死**的圆角（dialog / popper / message / tab 等），
 *    它们直接写字面值、不读 --el-border-radius-base：
 *
 *        .el-dialog { border-radius: var(--el-dialog-border-radius) }
 *        .el-message { border-radius: var(--el-message-border-radius) }
 *
 *    这类必须逐个覆盖。放在本文件（加载顺序最后）才能稳赢。
 *
 *  ★ 为什么用 :root 上的组件变量而不是只改属性
 *    Element Plus 的弹层（dialog / popper / dropdown / message / tooltip）
 *    默认 **teleport 到 body**，不在 .srm-page 里；用组件变量覆盖
 *    才能不依赖 DOM 层级地把它们一起改掉。
 *
 *  ★ 刻意**不**归零的东西（它们是"点/条"，不是"框"）
 *    · 头像 .el-avatar          → 方形头像不像头像
 *    · 状态圆点 / 徽标红点       → 圆点必须是圆
 *    · 进度条内条               → 端点是半圆才顺
 *    · 滚动条滑块               → 同进度条
 *    · ECharts tooltip          → 由图表配置管（见 check_charts_spec.js）
 * ========================================================================== */

/* --- 组件级变量：覆盖 Element Plus 写死了圆角的那些 --- */
/*
 * ★ 这些变量名是从 Element Plus 自带 CSS 里**逐条核对**出来的
 *   （用正则提取所有含 border-radius 的规则，看它们读哪个变量 / 写什么字面值）。
 *   凭印象列会漏 —— 我第一版就漏了 message-box / notification /
 *   pagination / tabs / alert 的变量名，那些组件仍是圆角。
 *   另外把它们的**兜底值**也一并设了：EP 里写作
 *   `var(--el-alert-border-radius-base)`（无兜底），
 *   以及 `var(--el-popover-border-radius,4px)`（兜底 4px）——
 *   只改变量名对得上，兜底那种仍会回落到 4px。
 */
:root {
    --el-dialog-border-radius:       0;
    --el-message-border-radius:      0;
    --el-messagebox-border-radius:   0;
    --el-popover-border-radius:      0;
    --el-popper-border-radius:       0;
    --el-dropdown-menu-border-radius: 0;
    --el-tooltip-border-radius:      0;
    --el-card-border-radius:         0;
    --el-tag-border-radius:          0;
    --el-tag-border-radius-rounded:  0;
    --el-alert-border-radius:        0;
    --el-alert-border-radius-base:   0;
    --el-notification-radius:        0;
    --el-pagination-border-radius:   0;
    --el-input-border-radius:        0;
    --el-tabs-border-radius:         0;
}

/* --- 表单控件：输入框 / 文本域 / 下拉 / 数字 / 日期 --- */
.el-input__wrapper,
.el-textarea__inner,
.el-select__wrapper,
.el-input-number,
.el-date-editor,
.el-range-editor {
    border-radius: 0;
}
/* 输入框内的前后缀块（如搜索框图标区）也跟着直角，否则会露出一角圆弧 */
.el-input-group__prepend,
.el-input-group__append,
.el-input__prefix,
.el-input__suffix {
    border-radius: 0;
}

/* --- 按钮：含各尺寸与文字/链接型 --- */
.el-button,
.el-button--large,
.el-button--small,
.el-button--primary,
.el-button--success,
.el-button--warning,
.el-button--danger,
.el-button--info,
.el-button.is-round {
    border-radius: 0;
}
/* 成组按钮：中间的连接处也必须是直角，否则相邻两角会出现凹口 */
.el-button-group > .el-button:first-child,
.el-button-group > .el-button:last-child {
    border-radius: 0;
}

/* --- 其它控件容器 --- */
/*
 * ★ 这一串是"逐条核对 Element Plus 自带规则"补出来的
 *
 *   EP 里有一部分组件的圆角是**字面值**，不读任何变量：
 *       .el-card{border-radius:4px}        .el-message-box{border-radius:4px}
 *       .el-popover{border-radius:4px}     .el-pagination{border-radius:2px}
 *       .el-tabs__new-tab{border-radius:3px}
 *       .el-tabs--card>.el-tabs__header .el-tabs__nav{border-radius:4px 4px 0 0}
 *   这些改变量没用，必须直接写选择器。
 *
 *   所以下面这两组是**两套手段**，都要有：
 *     · 上面的 :root 变量   → 治"读变量"的组件（含弹层，它们 teleport 到 body）
 *     · 这里的直接选择器     → 治"写字面值"的组件
 */
.el-card,
.el-tag,
.el-alert,
.el-dialog,
.el-drawer,
.el-message,
.el-message-box,
.el-notification,
.el-popover,
.el-popper,
.el-dropdown-menu,
.el-select-dropdown,
.el-picker-panel,
.el-pagination,
.el-tabs__item,
.el-tabs__new-tab,
.el-tabs--card > .el-tabs__header .el-tabs__nav,
.el-tabs--left.el-tabs--card .el-tabs__nav,
.el-tabs--right.el-tabs--card .el-tabs__nav,
.el-pagination.is-background .el-pager li,
.el-pagination.is-background .btn-prev,
.el-pagination.is-background .btn-next {
    border-radius: 0;
}
/* 分段控件（单选按钮组）左右两端收口 */
.el-radio-button__inner,
.el-radio-button:first-child .el-radio-button__inner,
.el-radio-button:last-child .el-radio-button__inner,
.el-radio-button:first-child:last-child .el-radio-button__inner {
    border-radius: 0;
}
/* 开关：轨道与滑块保持胶囊形（它是开关，不是方框） */
.el-switch__core { border-radius: 9999px; }

/* --- 表格：表头/表尾与首末单元格对齐 --- */
.el-table th,
.el-table td {
    border-radius: 0;
}

/* 表单栅格：信息量大的新建/编辑页 */
.srm-form-grid {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 0 22px;
}
.srm-form-grid .el-form-item { margin-bottom: 18px; }

/* 表单底部操作区：与上方内容拉开距离，并做轻微分隔 */
.srm-form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f2f4f8;
}

/* --- 筛选条：让"查询/重置"这类操作更醒目 --- */
.srm-toolbar {
    margin-bottom: 14px;
    padding: 12px 14px;
    background: #fafbfd;
    border: 1px solid #f0f3f8;
    border-radius: 0;
}
.srm-toolbar .el-input,
.srm-toolbar .el-select { vertical-align: middle; }

/* --- 分页 --- */
.srm-pager {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #f2f4f8;
}
.el-pagination { font-weight: 400; }
.el-pagination.is-background .el-pager li { border-radius: 0; }

/* --- 统计卡：与卡片同一套圆角 --- */
.srm-stat-card {
    border-radius: 0;
    border-color: #ebeef5;
    padding: 18px;
}
.srm-stat-card__value {
    font-size: 26px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.5px;
}
.srm-stat-card__title { font-size: 13px; color: #606266; }

/* --- 标签：统一胶囊形 --- */
.el-tag { border-radius: 0; }
.el-tag--small { padding: 0 8px; }

/* --- 页签：下划线样式更接近常规后台 --- */
.el-tabs__header { margin-bottom: 16px; }
.el-tabs__item { font-size: 14px; }

/* --- 描述列表（详情页） --- */
.el-descriptions__label {
    color: #8a94a6 !important;
    font-weight: 500 !important;
    background: #fafbfd !important;
}
.el-descriptions__content { color: #303133 !important; }

/* --- 对话框：圆角 + 头部/底部间距 --- */
.el-dialog { border-radius: 0; overflow: hidden; }
.el-dialog__header {
    margin-right: 0;
    padding: 18px 22px 14px;
    border-bottom: 1px solid #f2f4f8;
}
.el-dialog__title { font-size: 15.5px; font-weight: 600; color: #1f2d3d; }
.el-dialog__body { padding: 20px 22px; }
.el-dialog__footer {
    padding: 14px 22px 18px;
    border-top: 1px solid #f2f4f8;
}

/* --- 滚动条：细一点，别抢视觉 --- */
.srm-aside .el-menu::-webkit-scrollbar,
.srm-main::-webkit-scrollbar { width: 8px; height: 8px; }
.srm-aside .el-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .14);
    border-radius: 4px;
}
.srm-main::-webkit-scrollbar-thumb {
    background: #d5dae3;
    border-radius: 4px;
}
.srm-main::-webkit-scrollbar-thumb:hover { background: #c2c9d6; }

/* --- 顶栏：与内容区区分更清晰 --- */
.srm-header {
    border-bottom: 1px solid #eef1f6;
    background: #fff;
}
.srm-main { background: #f4f6fa; }
/* =============================================================================
 *  模板配置：类型选择卡片
 * -----------------------------------------------------------------------------
 *  踩过的坑：这几个类名在 JS 里用了，但 **CSS 从未定义过**，
 *  于是退化成默认块级元素竖向堆叠、文字居中、没有卡片外观 ——
 *  截图里"基本信息字段模板 / 0 个模板 · 0 个版本"竖着排一列就是这个原因。
 *
 *  规范：横向自适应网格，每张卡片有边框/圆角，选中态用主色描边 + 浅底。
 * ========================================================================== */
.srm-type-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.srm-type-card {
    position: relative;
    padding: 16px 18px;
    background: #fff;
    border: 1.5px solid #e8ecf3;
    border-radius: 0;
    cursor: pointer;
    transition: border-color .18s, box-shadow .18s, transform .18s;
    text-align: left;
}
.srm-type-card:hover {
    border-color: #b9cdf3;
    box-shadow: 0 4px 14px rgba(37, 99, 235, .08);
    transform: translateY(-1px);
}
.srm-type-card.is-active {
    border-color: var(--srm-primary, #409eff);
    background: var(--srm-primary-soft, #f2f7ff);
    box-shadow: 0 0 0 3px rgba(64, 158, 255, .10);
}
.srm-type-card.is-active::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--srm-primary, #409eff);
}
.srm-type-card__label {
    font-size: 14px;
    font-weight: 600;
    color: #303133;
    line-height: 1.45;
    margin-bottom: 6px;
    /* 类型名较长，允许换行但保持两行以内观感 */
    padding-right: 14px;
}
.srm-type-card.is-active .srm-type-card__label { color: var(--srm-primary, #409eff); }
.srm-type-card__meta {
    font-size: 12px;
    color: #909399;
    font-variant-numeric: tabular-nums;
}
/* =============================================================================
 *  补齐「JS 里用了但 CSS 从未定义」的类名
 * -----------------------------------------------------------------------------
 *  这些都是真实使用的类，缺失时元素会退化成无样式块级元素 ——
 *  不报错、功能也正常，只是布局乱（例如筛选条竖向堆叠、上传区没有边框）。
 *  由 tests/check_css_classes.js 一次性扫出，避免逐个页面肉眼巡检。
 * ========================================================================== */

/* 页面容器：统一最小内边距。之前完全没定义，各页面靠 .srm-main 的 padding 撑着 */
.srm-page { width: 100%; }

/* --- 筛选条：一行内横向排布，空间不足时自动换行 --- */
.srm-filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.srm-filter-row .el-input,
.srm-filter-row .el-select,
.srm-filter-row .el-date-editor { vertical-align: middle; }

/*
 * 查询区按钮的排布约定（全站统一）
 *
 *   [主操作按钮] [筛选条件…] [查询][重置]
 *        ↑ 前置       条件        ↑ 紧跟条件之后
 *
 * 为什么这样排：
 *   · 主操作（新建 / 发起）放**最前面** —— 它是页面最主要的动作。
 *     原先放在页面标题右侧，大屏上离视线很远，位置还会随标题长度左右跳动。
 *   · 查询与重置**紧跟在查询条件之后**，不推到最右边。
 *
 * ★ 这里改过一次（按业务反馈）
 *   上一版把「查询 + 重置」用 margin-left:auto 顶到了行的最右端，
 *   理由是"与主操作分离、视觉上更整齐"。实际使用下来问题明显：
 *   筛选条件少的时候（常见只有 1-2 个），按钮会飘到屏幕另一端，
 *   鼠标要从条件框横跨半个屏幕才能点到查询 —— 视线与操作都断了。
 *   现在改为**紧跟最后一个条件**，符合"填完就点"的自然顺序。
 *
 *   因此 .srm-filter-row__actions 不再吃剩余空间，只是把两个按钮成组。
 */
.srm-filter-row__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    /* 不加 margin-left:auto —— 那会把按钮推到最右，正是本次要改掉的排布 */
    margin-left: 0;
}

/* --- 通知中心列表 --- */
.srm-notice-list { display: flex; flex-direction: column; }
.srm-notice {
    padding: 14px 16px;
    border-bottom: 1px solid #f2f4f8;
    transition: background .15s;
}
.srm-notice:last-child { border-bottom: none; }
.srm-notice:hover { background: #fafbfd; }
.srm-notice--unread { background: #f7faff; }
.srm-notice--unread:hover { background: #f2f7ff; }
.srm-notice__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.srm-notice__head .srm-strong { font-size: 14px; color: #303133; }
.srm-notice__time {
    margin-left: auto;
    font-size: 12px;
    color: #a8b0be;
    font-variant-numeric: tabular-nums;
}
.srm-notice__body {
    font-size: 13px;
    color: #606266;
    line-height: 1.7;
    word-break: break-word;
}
.srm-notice__foot {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

/* --- 系统升级页：环境检查网格 --- */
.srm-env-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px 20px;
}
.srm-env-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 0;
    background: #f7f9fc;
    font-size: 13px;
    min-width: 0;
}
.srm-env-item.is-bad { background: #fef0f0; }
.srm-env-item__dot {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e7f6ec;
    color: #2f9e44;
    font-size: 11px;
    font-weight: 700;
}
.srm-env-item.is-bad .srm-env-item__dot { background: #fde2e2; color: #f56c6c; }
.srm-env-item__label { color: #5a6478; flex: 0 0 auto; }
.srm-env-item__val {
    margin-left: auto;
    color: #303133;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------------------------------------------------------------------------
 *  系统升级页：拖拽上传区
 * ---------------------------------------------------------------------------
 *  ★ 本轮把它**做小**（业务要求："上传升级包模块做小"）
 *
 *    原因不是"看着大"，而是版面变了：这一块从"独占整行"改成
 *    "左列（8/24）的上半部分"，下面还要接一张备份文件表 ——
 *    原来那套尺寸（内边距 22px、图标 34px、文案一整句）在窄列里
 *    会把卡片撑得很高，把备份表挤到屏外。
 *
 *    收紧的地方（都是"面积大户"）：
 *      · 内边距 22px → 10px
 *      · 图标 34px → 20px
 *      · 文案 14px → 12.5px，并缩短为"拖入 ZIP，或点击选择"
 *    注意**没有**动 el-upload 的拖拽区本身（.el-upload-dragger 的内边距
 *    由 Element Plus 给），只在下面覆盖它的最小高度 ——
 *    否则"能拖"这件事会变得难以命中。
 * ------------------------------------------------------------------------- */
.srm-upload-inner {
    padding: 10px 8px;
    text-align: center;
}
.srm-upload-icon {
    font-size: 20px;
    line-height: 1;
    color: var(--srm-primary, #409eff);
    margin-bottom: 4px;
}
.srm-upload-text { font-size: 12.5px; color: #303133; margin-bottom: 0; }
.srm-upload-hint { font-size: 12px; color: #a8b0be; line-height: 1.6; }
/* 窄列里把拖拽区的高度也收一收（EP 默认 180px 左右，太高了） */
.srm-page .el-upload-dragger {
    padding: 0;
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
}
/*
 * 左列里的"开关 + 文案"要能折行。
 *
 * 列宽收窄后（md:6）装不下"备份数据"四个字加一个开关，
 * 用 .srm-inline（nowrap）会把文字压成竖排。
 */
.srm-upload-opt {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

/*
 * 上传卡片的**标题行**：标题在左、备份开关与执行升级在右
 *
 * 业务要求（本轮）："执行升级按钮与备份数据开关，放到上传升级包同行，
 * 不是底部。" —— 控件与标题同一行、靠右对齐。
 *
 * 用 space-between：标题自然靠左，右侧一组贴住卡片右边缘。
 * 允许换行：左列很窄时"备份数据 + 执行升级"会把标题挤没。
 */
.srm-upload-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/*
 * 标题行右侧的那一组：备份开关 + 执行升级
 *
 * 顺序按业务要求：**备份数据在前、执行升级在后**。
 * 不再需要 flex-end 把它们推到最右 —— 现在它们就在 header 里，
 * 由 .srm-upload-head 的 space-between 负责贴右。
 */
.srm-upload-foot {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}
/* =============================================================================
 *  评分实时小计 / 总分栏
 * -----------------------------------------------------------------------------
 *  卡片头部右侧显示该模块小计，页面底部吸底显示总分。
 *  两者都从 items 现算（不维护累加值），避免与表格里的分数对不上。
 * ========================================================================== */

/* --- 模块小计（卡片头部右侧） --- */
.srm-score-sub {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 400;
    color: #909399;
}
.srm-score-sub__label { color: #a8b0be; }
.srm-score-sub__value {
    font-size: 14px;
    font-weight: 600;
    color: #303133;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.2px;
}
/* 该模块评完时转绿，扫一眼就知道哪块还没填 */
.srm-score-sub__value.is-done { color: #2f9e44; }
.srm-score-sub__meta { color: #c0c4cc; }

/* --- 总分栏（吸底） --- */
.srm-totalbar {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding: 14px 20px;
    background: #fff;
    border: 1px solid #ebeef5;
    border-radius: 0;
    box-shadow: 0 -4px 18px rgba(31, 45, 61, .07);
}
.srm-totalbar.is-complete { border-color: #c6e8d0; }

.srm-totalbar__main {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex: 0 0 auto;
}
.srm-totalbar__label { font-size: 13px; color: #8a94a6; }
.srm-totalbar__score {
    display: flex;
    align-items: baseline;
    gap: 2px;
    font-variant-numeric: tabular-nums;
}
.srm-totalbar__got {
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    color: var(--srm-primary, #409eff);
    letter-spacing: -.8px;
}
.srm-totalbar.is-complete .srm-totalbar__got { color: #2f9e44; }
.srm-totalbar__slash { font-size: 15px; color: #d5dae3; margin: 0 3px; }
.srm-totalbar__max { font-size: 15px; color: #8a94a6; }

.srm-totalbar__progress { flex: 1 1 200px; min-width: 150px; }
.srm-totalbar__progress .el-progress__text { display: none; }

.srm-totalbar__meta {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: #8a94a6;
}
.srm-totalbar__pct {
    font-weight: 600;
    color: #303133;
    font-variant-numeric: tabular-nums;
}
.srm-totalbar.is-complete .srm-totalbar__pct { color: #2f9e44; }
.srm-totalbar__dot { color: #d5dae3; }
.srm-totalbar__left { color: #e6a23c; }
.srm-totalbar__done { color: #2f9e44; }

@media (max-width: 768px) {
    .srm-totalbar { gap: 12px; padding: 12px 14px; }
    .srm-totalbar__got { font-size: 22px; }
}
