/* ============ 柳州蒲菱汽车科技有限公司 · M7 报表中心 ============
   品牌主题：工业深藏蓝 + 五菱红点缀（蒲菱汽车 / 五菱智跃体系） */
body {
  margin: 0; font-family: 'Microsoft YaHei', sans-serif; color: #35405e;
  background:
    radial-gradient(1100px 480px at 88% -8%, rgba(199,32,32,0.07), transparent 60%),
    radial-gradient(900px 420px at -8% 22%, rgba(30,74,158,0.09), transparent 55%),
    linear-gradient(135deg, #fbfcff 0%, #f5f7fc 55%, #eef1f8 100%);
  font-size: 14px;
}
.layout { display: flex; min-height: 100vh; }

/* ---------- 侧栏（深藏蓝） ---------- */
.sidebar {
  width: 200px; background: linear-gradient(180deg, #14294e 0%, #1c3a6e 55%, #20457f 100%);
  display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0;
  box-shadow: 3px 0 14px rgba(16,36,74,0.28);
}
.brand {
  padding: 18px 16px 14px; color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
.brand .b1 { font-weight: 800; font-size: 16px; letter-spacing: 1px; display: flex; align-items: center; }
.brand .b1::before { content: ''; width: 10px; height: 10px; border-radius: 2px;
  background: linear-gradient(135deg, #e8382d, #b91e1a); margin-right: 8px; flex: none;
  box-shadow: 0 0 8px rgba(232,56,45,0.55); }
.brand .b2 { font-size: 11px; color: #9fb4d8; margin-top: 4px; letter-spacing: 2px; }
.sidebar nav a {
  display: block; padding: 12px 18px; color: #b9c8e4; text-decoration: none;
  border-left: 3px solid transparent; transition: background .15s;
}
.sidebar nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sidebar nav a.on {
  background: linear-gradient(90deg, rgba(232,56,45,0.22), rgba(255,255,255,0.05));
  color: #fff; border-left-color: #e8382d; font-weight: 600;
}
/* 弹出式分组菜单 */
.cat { position: relative; }
.cat-name {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 18px; color: #b9c8e4; cursor: pointer;
  border-left: 3px solid transparent;
}
.cat-name::before { content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg, #e8382d, #ff7a45); margin-right: 8px; flex: none; }
.cat-name .arrow { font-style: normal; color: #7d92ba; font-size: 12px; }
.cat:hover .cat-name, .cat.active .cat-name {
  background: rgba(255,255,255,0.08); color: #fff;
}
.cat.active .cat-name { border-left-color: #e8382d; font-weight: 600; }
.cat .pop {
  display: none; position: absolute; left: 100%; top: 0; min-width: 190px;
  background: #fff; border: 1px solid #dfe5f2; border-radius: 10px;
  box-shadow: 0 10px 30px rgba(16,36,74,0.22); padding: 6px; z-index: 50;
}
.cat:hover .pop { display: block; }
.cat .pop a {
  display: block; padding: 10px 16px; color: #35405e; text-decoration: none;
  border-radius: 6px; border-left: none; white-space: nowrap;
}
.cat .pop a:hover { background: #f4f6fc; color: #b91e1a; }
.cat .pop a.on { background: #fdeeee; color: #b91e1a; font-weight: 600; }
.main { flex: 1; margin-left: 200px; padding: 26px 30px; }

/* ---------- 标题与卡片 ---------- */
h1 {
  font-size: 19px; color: #14294e; margin: 0 0 18px; padding: 12px 18px;
  background: linear-gradient(90deg, rgba(232,56,45,0.10), rgba(30,74,158,0.08), transparent 80%);
  border-radius: 10px; border-left: 4px solid #e8382d;
}
h2 { font-size: 15px; color: #14294e; margin: 22px 0 10px; }
h2::before { content: '▍'; color: #e8382d; margin-right: 4px; }
.card {
  background: #fff; border: 1px solid #e7ebf5; border-radius: 12px;
  padding: 14px 16px; margin-bottom: 14px;
  box-shadow: 0 4px 16px rgba(30,74,158,0.06);
}

/* ---------- 表单 ---------- */
label { color: #5a6488; margin-right: 4px; }
input, select {
  border: 1px solid #dbe0f2; border-radius: 6px; padding: 7px 10px;
  font-size: 13px; color: #35405e; margin-right: 10px; background: #fdfdff;
}
input:focus, select:focus { border-color: #4a74c4; outline: none;
  box-shadow: 0 0 0 3px rgba(30,74,158,0.14); }
.btn {
  background: linear-gradient(180deg, #e8382d, #c22320); color: #fff;
  border: none; border-radius: 6px; padding: 8px 20px; font-size: 13px;
  cursor: pointer; text-decoration: none; display: inline-block;
  box-shadow: 0 3px 10px rgba(199,32,32,0.30);
}
.btn:hover { background: linear-gradient(180deg, #f04a3f, #d32c28); }
.btn.sec { background: #fff; color: #1e4a9e; border: 1px solid #c3cdea; box-shadow: none; }
.btn.sec:hover { background: #f0f3fb; }

/* ---------- 表格 ---------- */
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th {
  background: linear-gradient(180deg, #1d3e74, #16305c); color: #e8eefb;
  padding: 8px 9px; text-align: left;
  border-bottom: 2px solid #0f2246; white-space: nowrap;
}
td { padding: 7px 9px; border-bottom: 1px solid #f0f2fb; white-space: nowrap; }
/* 多账套区分：相邻账套交替浅底（须在 hover 规则之前，保证悬停高亮仍生效） */
/* 多账套底色：每个账套固定一色（PL01 白 / PL02 浅蓝 / PL03 浅绿 / PL04 浅橙 / PL05 浅紫 / PL06 浅粉） */
tr.b0 td { background: #ffffff; }
tr.b1 td { background: #e8f0fb; }
tr.b2 td { background: #e9f6ec; }
tr.b3 td { background: #fdf4e3; }
tr.b4 td { background: #f3edfb; }
tr.b5 td { background: #fbecec; }
tr:hover td { background: #fff7dd; }
tr.total td {
  color: #14294e; font-weight: 700;
  background: linear-gradient(180deg, #eef2fc, #e6ebfa);
}
.num { text-align: right; font-variant-numeric: tabular-nums; }
.ctr { text-align: center; }
.yes { color: #1b5e20; font-weight: 600; }
.part { color: #b26a00; font-weight: 600; }
.no { color: #9e9e9e; }
.ok { color: #2e7d32; } .off { color: #9e9e9e; }
.tip { color: #5c6bc0; font-size: 12px; margin-top: 8px; }
.err { color: #c62828; font-size: 13px; margin: 8px 0; }
td.kind { color: #1e4a9e; }

/* ---------- 登录页（左品牌 · 右表单） ---------- */
.login-wrap { min-height: 100vh; display: flex; }
.login-brand {
  flex: 1.2; min-width: 0; position: relative; overflow: hidden;
  background:
    radial-gradient(800px 400px at 20% 85%, rgba(232,56,45,0.16), transparent 55%),
    linear-gradient(150deg, #10234a 0%, #1c3a6e 55%, #254a88 100%);
  display: flex; flex-direction: column; justify-content: center; padding: 8vh 7vw;
  color: #fff;
}
.login-brand .logo-line { display: flex; align-items: center; margin-bottom: 26px; }
.login-brand .logo-mark { width: 16px; height: 16px; border-radius: 3px;
  background: linear-gradient(135deg, #e8382d, #b91e1a);
  box-shadow: 0 0 10px rgba(232,56,45,0.6); margin-right: 12px; }
.login-brand .logo-name { font-size: 20px; font-weight: 800; letter-spacing: 3px; }
.login-brand h2 {
  color: #fff; font-size: 30px; letter-spacing: 4px; margin: 0 0 14px; line-height: 1.4;
}
.login-brand h2::before { content: none; }
.login-brand .sub { color: #9fb4d8; font-size: 14px; letter-spacing: 5px; }
.login-brand .feat { margin-top: 5vh; color: #b9c8e4; font-size: 13px; line-height: 2.1; }
.login-brand .feat b { color: #ff8a80; font-weight: 600; margin-right: 8px; }
.login-brand .foot { position: absolute; left: 7vw; right: 5vw; bottom: 4vh;
  color: #6f86b0; font-size: 12px; border-top: 1px solid rgba(255,255,255,0.14);
  padding-top: 12px; letter-spacing: 1px; }
.login-brand .deco { position: absolute; right: -40px; bottom: 40px; opacity: 0.16; }
.login-panel {
  flex: 1; min-width: 380px; background: #fff; display: flex;
  align-items: center; justify-content: center;
}
.login-box {
  width: 340px; background: #fff; border-radius: 18px;
  padding: 40px 36px; border: 1px solid #e7ebf5;
  box-shadow: 0 18px 55px rgba(30,74,158,0.16);
  border-top: 4px solid #e8382d;
}
.login-box h1 { text-align: center; margin-bottom: 6px; background: none;
  border: none; padding: 0; font-size: 21px; }
.login-box .login-sub { text-align: center; color: #8a94b5; font-size: 12px;
  margin-bottom: 24px; letter-spacing: 2px; }
.login-box label { display: block; margin: 10px 0 6px; color: #4a5578; font-size: 13px; }
.login-box input { width: 100%; margin: 0 0 6px; box-sizing: border-box; padding: 10px 12px; }
.login-box .btn { width: 100%; box-sizing: border-box; margin-top: 16px; padding: 11px; font-size: 14px; letter-spacing: 6px; }
.hint { color: #90a0b5; font-size: 12px; text-align: center; margin-top: 14px; }
.scroll { overflow-x: auto; }

/* ---------- 侧栏底部 ---------- */
.side-bottom {
  margin-top: auto; padding: 14px 18px; border-top: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.14);
}
.side-bottom .who { color: #fff; font-weight: 600; margin-bottom: 6px; }
.side-bottom a { color: #ff9d94; text-decoration: none; font-size: 13px; }
.side-bottom a:hover { color: #fff; }

@media (max-width: 860px) {
  .login-brand { display: none; }
  .main { margin-left: 0; }
  .sidebar { position: static; width: auto; }
}

/* ---------- 系统内多标签页 ---------- */
.shell-main { padding: 0; display: flex; flex-direction: column; height: 100vh; }
.tabbar {
  display: flex; align-items: flex-end; gap: 4px; padding: 8px 12px 0;
  background: linear-gradient(180deg, #14294e, #1c3a6e);
  overflow-x: auto; flex: none; min-height: 42px;
}
.tabbar::-webkit-scrollbar { height: 5px; }
.tab {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 8px 14px; border-radius: 8px 8px 0 0; color: #b9c8e4;
  background: rgba(255,255,255,0.08); font-size: 13px; white-space: nowrap;
  border: 1px solid transparent; border-bottom: none; user-select: none;
}
.tab:hover { color: #fff; background: rgba(255,255,255,0.16); }
.tab.on {
  color: #14294e; background: #fff; font-weight: 600;
  border-color: #dfe5f2;
}
.tab .tn { pointer-events: none; }
.tab .x { font-style: normal; width: 16px; height: 16px; line-height: 14px;
  text-align: center; border-radius: 50%; font-size: 12px;
  color: inherit; opacity: 0.55; }
.tab .x:hover { background: #e8382d; color: #fff; opacity: 1; }
.tabpages { flex: 1; position: relative; background: #fff; overflow: hidden; }
.tabpage { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
/* iframe 内嵌内容边距 */
.embed-wrap { padding: 16px 20px 22px; }
.embed-wrap h1 { margin-top: 2px; }

/* ---- 套餐进度条（侧栏） ---- */
.pkg-box { margin: 10px 14px 8px; padding: 10px 12px; background: rgba(255,255,255,.08);
           border-radius: 8px; }
.pkg-name { color: #fff; font-size: 13px; font-weight: 600; display: flex;
            justify-content: space-between; margin-bottom: 7px; }
.pkg-num { color: #ffd0cc; font-weight: 400; font-size: 12px; }
.pkg-bar { height: 7px; background: rgba(255,255,255,.18); border-radius: 4px; overflow: hidden; }
.pkg-fill { height: 100%; background: #4fd08c; border-radius: 4px; transition: width .4s; }
.pkg-fill.over { background: #e8382d; }
.pkg-tip { color: #ffb3ac; font-size: 11px; margin-top: 6px; }

/* ---- 预算执行率条 ---- */
.rate-bar { display: inline-block; width: 64px; height: 8px; background: #e7ecf6;
            border-radius: 4px; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.rate-fill { height: 100%; border-radius: 4px; }
.rate-fill.ok { background: #2e9e5b; }
.rate-fill.warn { background: #e6a23c; }
.rate-fill.over { background: #e8382d; }

/* ---- 负数标红 ---- */
.neg { color: #e8382d; font-weight: 600; }

/* ---- 菜单分组点击展开（hover 之外的保险通道） ---- */
.cat.open .cat-name { background: rgba(255,255,255,0.08); color: #fff;
                      border-left-color: #e8382d; font-weight: 600; }
.cat.open .cat-name .arrow { transform: rotate(90deg); display: inline-block; }
.cat.open .pop { display: block; }

/* ---- 修复：shell 页 iframe 容器盖住侧栏弹出菜单 ---- */
.sidebar { z-index: 100; }

/* ---- 全局查询条：账套多选 + 快捷时间 ---- */
.dbx { position: relative; display: inline-block; }
.dbx-btn { padding: 6px 12px; border: 1px solid #c8d3ea; border-radius: 6px;
           background: #fff; cursor: pointer; font-size: 13px; color: #223; }
.dbx-btn b { color: #16305c; }
.dbx-pop { display: none; position: absolute; top: 110%; left: 0; z-index: 60;
           background: #fff; border: 1px solid #c8d3ea; border-radius: 8px;
           box-shadow: 0 6px 18px rgba(20,41,78,.15); padding: 8px 10px;
           max-height: 320px; overflow: auto; min-width: 200px; }
.dbx-pop.show { display: block; }
.dbx-pop label { display: block; font-size: 13px; padding: 3px 2px; cursor: pointer; }
.dbx-all { border-bottom: 1px solid #e3e9f5; padding-bottom: 6px !important;
           margin-bottom: 4px; font-weight: 600; color: #16305c; }
.qbtns { display: inline-flex; gap: 4px; margin: 0 4px; }
.qbtn { padding: 5px 10px; border: 1px solid #c8d3ea; background: #f4f7fd;
        border-radius: 14px; font-size: 12px; cursor: pointer; color: #33507e; }
.qbtn:hover { background: #e6edfa; }
.qbtn.on { background: #16305c; color: #fff; border-color: #16305c; }

/* ---- 页内切换页签（汇总/明细） ---- */
.tabbtns { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; }
.tabbtn { padding: 8px 22px; border: 1px solid #c8d3ea; border-bottom: none;
          background: #f4f7fd; border-radius: 8px 8px 0 0; font-size: 14px;
          cursor: pointer; color: #33507e; }
.tabbtn.on { background: #fff; color: #16305c; font-weight: 600;
             border-color: #16305c; }
