/**
 * @copyright © 2026 易企网ERP订货系统. 保留所有权利.
 * 本文件为系统源码之一，仅供授权使用，禁止未经授权的复制、修改与分发。
 */
/* ==========================================================================
   平台运营总后台 · 控制台皮肤（v1.2.4 重构）

   ★ 设计取向：与商户后台明确区分开。
     商户后台 = 业务操作台（浅色、密集、贴近单据）
     平台后台 = 运营控制台（深色侧栏、更宽留白、看板优先）

   ★ 加载顺序必须是 admin.css → platform.css：
     platform.css 只做「覆盖」，不重复定义基础 token 与组件，
     否则两份样式各写一半，改一处忘一处必然跑偏。
   ========================================================================== */

/* ------------------------------------------------------------------
   1. 变量与容器
   ------------------------------------------------------------------ */
body.plat {
  --pl-side: #2a0f0c;
  --pl-side-2: #1a0705;
  --pl-side-line: rgba(255, 255, 255, .07);
  --pl-accent: #e5361f;
  --pl-page: #f2f5fa;
  --pl-ink: #101c2c;
  background: var(--pl-page);
}

/* 平台端侧栏更宽：菜单文字是「商户管理/应用市场…」，150px 会贴着字 */
/* ★ v1.2.64 用户要求左侧菜单收窄：208 → 176px，配合下面字号/内边距一起收 */
body.plat .sidebar { width: 176px; background: linear-gradient(180deg, var(--pl-side) 0%, var(--pl-side-2) 100%); }
body.plat .sb-brand {
  height: 60px; padding: 0 12px; gap: 8px;
  background: rgba(0, 0, 0, .18); border-bottom: 1px solid var(--pl-side-line);
}
body.plat .sb-logo {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, #e5361f, #ff7a5c);
  box-shadow: 0 4px 12px rgba(229, 54, 31, .38);
}
body.plat .sb-logo .ico { width: 17px; height: 17px; }
body.plat .sb-name { font-size: 13px; letter-spacing: .1px; }
body.plat .sb-brand-text { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
body.plat .sb-sub { font-size: 10.5px; color: #6f89a8; letter-spacing: .6px; text-transform: uppercase; }

body.plat .sb-menu { padding: 10px 8px; }
body.plat .sb-item { margin-bottom: 2px; }
body.plat .sb-item > a {
  height: 38px; padding: 0 10px; gap: 8px; border-left: 0;
  border-radius: 8px; font-size: 13px; color: #a9bdd6;
}
body.plat .sb-item > a .ico { color: #7f9bbd; width: 16px; height: 16px; }
body.plat .sb-item > a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
body.plat .sb-item > a:hover .ico { color: #cfe0f5; }
body.plat .sb-item.on > a {
  background: linear-gradient(90deg, rgba(229, 54, 31, .95), rgba(229, 54, 31, .68));
  color: #fff; font-weight: 600; border-left: 0;
  box-shadow: 0 6px 16px rgba(229, 54, 31, .28);
}
body.plat .sb-item.on > a .ico { color: #fff; }
body.plat .sb-menu-label {
  padding: 14px 12px 6px; font-size: 10.5px; letter-spacing: 1px;
  color: #5d7795; text-transform: uppercase;
}
body.plat .sb-foot {
  height: 44px; border-top: 1px solid var(--pl-side-line);
  font-size: 11.5px; color: #5d7795; gap: 6px;
}
body.plat .sb-foot .dot-ok { width: 6px; height: 6px; border-radius: 50%; background: #22a95c; }

/* ------------------------------------------------------------------
   2. 顶栏
   ------------------------------------------------------------------ */
body.plat .topbar {
  height: 60px; padding: 0 22px; background: #fff;
  border-bottom: 1px solid #e6ebf3; box-shadow: 0 1px 2px rgba(16, 28, 44, .03);
}
body.plat .tb-left { align-items: center; gap: 8px; }
body.plat .tb-title { font-size: 15.5px; color: var(--pl-ink); letter-spacing: .2px; }
body.plat .tb-crumb::before { content: "›"; margin-right: 8px; color: #c3ccd9; }
body.plat .tb-search { height: 34px; background: #f3f6fb; border-radius: 17px; }
body.plat .tb-search input { width: 210px; font-size: 13px; }
body.plat .tb-bell {
  width: 34px; height: 34px; border-radius: 9px; align-items: center; justify-content: center;
  background: #f3f6fb;
}
body.plat .tb-bell:hover { background: #e9f0fd; }
body.plat .avatar { box-shadow: 0 3px 10px rgba(229, 54, 31, .3); }

/* ------------------------------------------------------------------
   3. 二级菜单 / 页签 / 内容
   ------------------------------------------------------------------ */
body.plat .subnav {
  width: 158px; background: #fbfcfe; padding: 14px 0;
  border-right: 1px solid #e9eef6;
}
body.plat .subnav a {
  margin: 2px 10px; padding: 9px 12px; border-left: 0; border-radius: 7px;
  font-size: 13px;
}
body.plat .subnav a.on {
  background: #fdeceb; color: var(--pl-accent); border-left: 0; font-weight: 600;
}
body.plat .sub-group { padding: 0 14px; margin: 14px 0 6px; font-size: 10.5px; letter-spacing: 1px; }

body.plat .tabs {
  min-height: 46px; padding: 0 22px; background: #fff;
  border-bottom: 1px solid #e9eef6; gap: 4px;
}
body.plat .tab {
  padding: 13px 12px; font-size: 13px; color: #6b7a90;
  border-bottom: 2px solid transparent;
}
body.plat .tab.on { color: var(--pl-accent); border-bottom-color: var(--pl-accent); font-weight: 600; }

body.plat .page { padding: 20px 22px 28px; }

/* ------------------------------------------------------------------
   4. 卡片 / 表格 / 表单（平台端更「宽、轻」）
   ------------------------------------------------------------------ */
body.plat .card {
  border: 1px solid #e8edf5; border-radius: 10px;
  box-shadow: 0 1px 2px rgba(16, 28, 44, .04);
  overflow: hidden;
}
body.plat .card-title {
  padding: 14px 18px; border-bottom: 1px solid #eef2f8; font-size: 14.5px;
}
body.plat .card-title::before { background: var(--pl-accent); height: 15px; }
body.plat .card-body { padding: 18px; }

body.plat .table thead th {
  background: #f8fafd; color: #7b8aa0; font-size: 12px; font-weight: 600;
  letter-spacing: .3px; border-bottom: 1px solid #e8edf5;
}
body.plat .table tbody td { border-bottom: 1px solid #f0f4f9; }
body.plat .table tbody tr:hover { background: #f8fbff; }

body.plat .toolbar { padding: 14px 18px; border-bottom: 1px solid #f0f4f9; }
body.plat .inp, body.plat .sel { border-radius: 7px; }
body.plat .btn { border-radius: 7px; }
body.plat .btn-primary {
  background: linear-gradient(135deg, #e5361f, #e5361f);
  box-shadow: 0 2px 6px rgba(229, 54, 31, .24);
}
body.plat .tag { border-radius: 5px; }

body.plat .banner { border-radius: 0; }


/* ------------------------------------------------------------------
   6. 总览看板（新模块）
   ------------------------------------------------------------------ */
.pl-hero {
  position: relative; overflow: hidden; margin-bottom: 18px; padding: 22px 24px;
  border-radius: 12px; color: #fff;
  background: linear-gradient(120deg, #16325a 0%, #1b4a86 58%, #e5361f 130%);
  box-shadow: 0 10px 26px rgba(22, 50, 90, .22);
}
.pl-hero::after {
  content: ""; position: absolute; right: -60px; top: -80px; width: 300px; height: 300px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 65%);
}
.pl-hero h3 { font-size: 19px; font-weight: 600; letter-spacing: .2px; }
.pl-hero p { margin-top: 7px; font-size: 13px; color: #b9cfe8; }
.pl-hero-meta { display: flex; gap: 26px; margin-top: 20px; flex-wrap: wrap; }
.pl-hero-meta div { min-width: 96px; }
.pl-hero-meta b { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.4px; }
.pl-hero-meta span { font-size: 12px; color: #a8c2de; }
.pl-hero-tag {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 4px;
  padding: 4px 10px; border-radius: 20px; font-size: 11.5px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .2);
}
.pl-hero-tag.warn { background: rgba(245, 158, 11, .2); border-color: rgba(245, 158, 11, .4); color: #ffe0a8; }

.pl-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: 14px; margin-bottom: 18px; }
.pl-kpi {
  background: #fff; border: 1px solid #e8edf5; border-radius: 10px; padding: 16px 17px;
  display: flex; align-items: flex-start; gap: 13px;
  transition: box-shadow .16s, transform .16s;
}
.pl-kpi:hover { box-shadow: 0 10px 24px rgba(16, 28, 44, .08); transform: translateY(-1px); }
.pl-kpi .ki {
  width: 40px; height: 40px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: #fdeceb; color: #e5361f;
}
.pl-kpi .ki .ico { width: 19px; height: 19px; }
.pl-kpi.g .ki { background: #e6f7ee; color: #1c9a55; }
.pl-kpi.o .ki { background: #fef4e4; color: #d98613; }
.pl-kpi.r .ki { background: #fdecec; color: #d63c40; }
.pl-kpi.p .ki { background: #f1ecfd; color: #7a5af5; }
.pl-kpi .kv { min-width: 0; }
.pl-kpi .k { font-size: 12.5px; color: #7b8aa0; }
.pl-kpi .v { font-size: 23px; font-weight: 600; color: #101c2c; letter-spacing: -.5px; margin-top: 3px; line-height: 1.2; }
.pl-kpi .v em { font-style: normal; font-size: 12.5px; font-weight: 400; color: #93a1b3; margin-left: 4px; }
.pl-kpi .s { font-size: 11.5px; color: #93a1b3; margin-top: 4px; }

.pl-grid-2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 1180px) { .pl-grid-2 { grid-template-columns: 1fr; } }

.pl-spark { width: 100%; height: 132px; display: block; }
.pl-spark-x { display: flex; justify-content: space-between; font-size: 10.5px; color: #93a1b3; margin-top: 4px; }

.pl-dist { display: flex; flex-direction: column; gap: 14px; }
.pl-dist-row .top { display: flex; justify-content: space-between; font-size: 12.5px; color: #55647a; margin-bottom: 6px; }
.pl-dist-row .top b { color: #101c2c; }
.pl-dist-bar { height: 8px; border-radius: 4px; background: #eef2f8; overflow: hidden; }
.pl-dist-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #e5361f, #ff7a5c); }

.pl-list { display: flex; flex-direction: column; }
.pl-list-item {
  display: flex; align-items: center; gap: 11px; padding: 11px 0;
  border-bottom: 1px dashed #eef2f8; font-size: 13px;
}
.pl-list-item:last-child { border-bottom: 0; }
.pl-list-item .li-ico {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: #f2f5fa; color: #7b8aa0; display: flex; align-items: center; justify-content: center;
}
.pl-list-item .li-ico .ico { width: 15px; height: 15px; }
.pl-list-item .li-main { flex: 1; min-width: 0; }
.pl-list-item .li-nm { font-weight: 500; color: #22304a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-list-item .li-sub { font-size: 11.5px; color: #93a1b3; margin-top: 2px; }
.pl-list-item .li-right { font-size: 12px; color: #7b8aa0; white-space: nowrap; }
.pl-empty { padding: 26px; text-align: center; color: #93a1b3; font-size: 12.5px; }

/* 应用网格（应用市场） */
body.plat .app-grid { grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }
body.plat .app-card { border-radius: 10px; }

/* ------------------------------------------------------------------
   5. 栏目内容间距 / 对称（v1.2.35 重构）
   ------------------------------------------------------------------ */
/* 卡片正文跟随 card-title 内边距：配置表单不再贴边、左右上下对称
   （排除 .card-body —— 它已有 padding，避免叠加成 36px） */
body.plat .card-title + div:not(.card-body) { padding: 18px; }

/* 配置表单里直接挂在 .form 下的单字段改为整行，左对齐一致，不再半宽堆叠 */
body.plat .form > .form-item { width: 100%; }

/* 分组小标题：左红竖条 + 加粗，呼应 card-title，用于「一 / 二 / 三」分区 */
body.plat .card-sub {
  font-size: 13px; font-weight: 600; color: var(--pl-ink);
  margin: 4px 0 12px; padding: 2px 0 2px 11px;
  border-left: 3px solid var(--pl-accent); line-height: 1.4;
}
body.plat .card-sub:not(:first-child) { margin-top: 20px; }

/* 表单节奏统一：标签与控件间距、字段行距 */
body.plat .form-item { margin-bottom: 18px; }
body.plat .form-label { font-size: 13px; color: #5b6b82; font-weight: 500; margin-bottom: 7px; }
body.plat .form-row { gap: 18px; }
body.plat .form-tip { margin-top: 6px; line-height: 1.55; }

/* 控件统一高度 / 圆角，多控件并排时基线对齐 */
body.plat .inp, body.plat .sel { height: 36px; border-radius: 7px; box-sizing: border-box; }
body.plat textarea.inp { height: auto; padding: 9px 11px; }

/* 卡片之间留白统一 */
body.plat .card + .card { margin-top: 16px; }
