/* ============================================================
   IPLight 运维工作台 — 统一设计系统层 (2026-10-31)
   原则：不推翻 console-ui/product-ui 的变量，只做归一与精修。
   字号阶梯：页面标题 20 / 卡片标题 16 / 正文 14 / 次级 13 / 辅注 12
   间距阶梯：4 / 8 / 12 / 16 / 20 / 24
   圆角阶梯：控件 8 / 卡片 12 / 弹层 14
   ============================================================ */

:root {
  --fs-page: 20px;   /* 页面标题 */
  --fs-card: 16px;   /* 卡片标题 */
  --fs-body: 14px;   /* 正文/表格 */
  --fs-sub: 13px;    /* 次级说明 */
  --fs-note: 12px;   /* 辅注/表头 */
  --radius-card: 12px;
  --radius-pop: 14px;
  --ipl-shadow-hover: 0 6px 18px rgba(29, 33, 41, 0.09);
}
html.dark { --ipl-shadow-hover: 0 6px 18px rgba(0, 0, 0, 0.45); }

/* ---------- 页头规范：每页统一 标题20/700 + 副注13 ---------- */
.ops-page-head { margin-bottom: 18px; }
.ops-page-title { font-size: var(--fs-page); font-weight: 700; color: var(--ipl-text); line-height: 1.3; letter-spacing: .2px; }
.ops-page-sub { font-size: var(--fs-sub); color: var(--ipl-text-3); margin-top: 4px; line-height: 1.7; }

/* ---------- 双卡片体系归一：ops-card 与 pp-card 同一外观语言 ---------- */
.ops-card, .pp-card { border-radius: var(--radius-card); }
.ops-card { transition: box-shadow .18s ease; }
.ops-page > .ops-card:hover, .ops-page .ops-card:hover { box-shadow: var(--ipl-shadow-hover); }
/* 表格专用卡片（模板里 padding:0 + overflow:auto 的 pp-card）内容裁切圆角 */
.pp-card { overflow: hidden; }
.pp-card .el-table { border-radius: 0; }

/* ---------- Element Plus 归一 ---------- */
/* Tabs：统一高度/字号/激活态 */
.el-tabs__item { font-size: var(--fs-body); height: 42px; line-height: 42px; color: var(--ipl-text-2); transition: color .15s; }
.el-tabs__item:hover { color: var(--ipl-primary); }
.el-tabs__item.is-active { color: var(--ipl-primary); font-weight: 600; }
.el-tabs__active-bar { height: 2.5px; border-radius: 2px; }
.el-tabs__nav-wrap::after { height: 1px; background-color: var(--ipl-border); }
.el-tabs__header { margin-bottom: 16px; }

/* 按钮：统一圆角与点击反馈 */
.el-button { border-radius: 8px; font-weight: 500; }
.el-button--primary { box-shadow: 0 2px 6px rgba(22, 93, 255, 0.22); }
.el-button--primary.is-plain, .el-button--primary.is-text, .el-button.is-text { box-shadow: none; }
.el-button--small { border-radius: 7px; }

/* 输入/选择：统一高度感 */
.el-input__wrapper, .el-select__wrapper, .el-textarea__inner { border-radius: 8px; }

/* 表格：表头小字距 + 行密度 + 悬停 */
.el-table { font-size: var(--fs-body); }
.el-table th.el-table__cell { font-size: var(--fs-note); letter-spacing: .4px; font-weight: 600; padding: 10px 0; }
.el-table td.el-table__cell { padding: 11px 0; }
.el-table .cell { line-height: 1.55; }
.el-table .el-table__row { transition: background .12s; }

/* 标签 */
.el-tag { border-radius: 6px; font-weight: 500; }

/* 分页 */
.el-pagination.is-background .el-pager li, .el-pagination.is-background .btn-prev, .el-pagination.is-background .btn-next { border-radius: 8px; }
.el-pagination { font-size: var(--fs-sub); }

/* 弹层：对话框/抽屉/气泡统一圆角与标题 */
.el-dialog { border-radius: var(--radius-pop); }
.el-dialog__title { font-size: var(--fs-card); font-weight: 600; }
.el-drawer { border-radius: var(--radius-pop) 0 0 var(--radius-pop); }
.el-drawer__title { font-size: var(--fs-card); font-weight: 600; color: var(--ipl-text); }
.el-drawer__header { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--ipl-border); }
.el-message-box { border-radius: var(--radius-pop); }

/* 指标/统计卡 */
.metric-card { border-radius: var(--radius-card); }
.metric-card .mv { font-variant-numeric: tabular-nums; letter-spacing: .2px; }

/* 统计卡（页头指标：标签在上、数值在下，与 metric-card 同语言但无图标） */
.stat-card {
  background: var(--ipl-card); border: 1px solid var(--ipl-border); border-radius: var(--radius-card);
  padding: 14px 16px; box-shadow: var(--ipl-shadow);
  transition: box-shadow .18s ease, transform .18s ease;
}
.stat-card:hover { box-shadow: var(--ipl-shadow-hover); transform: translateY(-1px); }
.stat-card .stat-label { font-size: var(--fs-note); color: var(--ipl-text-3); margin-bottom: 6px; }
.stat-card .stat-value { font-size: 22px; font-weight: 700; color: var(--ipl-text); line-height: 1.2; font-variant-numeric: tabular-nums; letter-spacing: .2px; }
.stat-card .stat-value.stat-primary { color: var(--ipl-primary); }
.stat-card .stat-value.stat-success { color: var(--ipl-success); }

/* 侧边菜单：激活项加左侧圆角指示条 */
.ops-menu a { position: relative; }
.ops-menu a.active::before {
  content: ''; position: absolute; left: -8px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 2px; background: var(--ipl-primary);
}
.ops-menu .group-label { letter-spacing: .5px; text-transform: uppercase; font-weight: 600; }

/* 卡片标题右侧辅注统一基线 */
.ops-card-head .ops-note { font-size: var(--fs-note); }

/* 全局细滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(134, 144, 156, 0.35); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(134, 144, 156, 0.55); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 移动端适配 ---------- */
@media (max-width: 768px) {
  .ops-page-head { margin-bottom: 14px; }
  .ops-page-title { font-size: 18px; }
  .ops-page-sub { font-size: 12px; }
  .stat-card { padding: 12px; }
  .stat-card .stat-value { font-size: 18px; }
  .el-drawer { border-radius: 0; }  /* 手机抽屉全屏化不留圆角 */
  .el-tabs__item { height: 40px; line-height: 40px; font-size: 13px; padding: 0 12px; }
  .el-table th.el-table__cell { padding: 8px 0; }
  .el-table td.el-table__cell { padding: 9px 0; }
}

/* ============================================================
   2026-11-02晚 管理页统一化(对标大厂控制台规范)
   根因修复: Element Plus 2.x 无 size="mini", 模板残留 mini 的
   按钮被渲染成 default 大按钮 → 「有些大有些小」。除已把模板
   全量 mini→small 外, 此处对表格内按钮做 CSS 兜底统一。
   ============================================================ */

/* ---------- 表格内按钮/标签统一小尺寸(全局对齐) ---------- */
.el-table .el-button { height: 24px; padding: 0 10px; font-size: 12px; border-radius: 6px; }
.el-table .el-button.is-text { padding: 0 8px; }
.el-table .el-button.is-link { height: auto; padding: 0 2px; }
.el-table .el-tag { height: 22px; line-height: 20px; padding: 0 8px; font-size: 12px; }

/* ---------- 筛选栏: EP 默认 margin-left 与 gap 叠加导致间距不齐 ---------- */
.filter-bar .el-button + .el-button { margin-left: 0; }
.filter-bar .el-input, .filter-bar .el-select { width: 170px; }
.ops-card-head .el-button + .el-button { margin-left: 8px; }

/* ---------- 卡片头操作按钮统一高度(28px, 介于 small/default) ---------- */
.ops-card-head .el-button { height: 28px; padding: 0 12px; font-size: 13px; }

/* ---------- 统计卡网格(页头指标统一对齐) ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat-grid .stat-card { margin-bottom: 0; }
.stat-grid .ops-note { font-size: var(--fs-note); color: var(--ipl-text-3); margin-top: 4px; }

/* ---------- 输入数值控件在表格内统一高度 ---------- */
.el-table .el-input-number.el-input-number--small { height: 24px; line-height: 24px; }

/* ---------- 移动端微调 ---------- */
@media (max-width: 768px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-card .stat-value { font-size: 17px; }
  .el-table .el-button { height: 26px; padding: 0 8px; }
}

/* 2026-11-02v2 供应商资源汇总行可点击下钻 */
.el-table .cp-row { cursor: pointer; }
.el-table .cp-row:hover > td { background: var(--ipl-fill-light, #f5f7fa) !important; }
