/* ============================================================
   百年企服 · 代理记账 SaaS — 全局样式
   设计语言:对齐同行桌面端 · 深蓝顶栏 · 高密度表格 · 多标签
   ============================================================ */

:root {
  --brand: #1677ff;
  --brand-2: #4096ff;
  --brand-dark: #0958d9;
  --brand-deep: #003a8c;
  --brand-nav: #1677ff;
  --brand-light: #e6f4ff;
  --brand-grad: linear-gradient(135deg, #4096ff 0%, #1677ff 100%);

  --st-good: #52c41a;
  --st-good-text: #389e0d;
  --st-warning: #faad14;
  --st-serious: #fa8c16;
  --st-critical: #ff4d4f;
  --st-info: #1677ff;

  --page: #f0f2f5;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --ink: #1f1f1f;
  --ink-2: #595959;
  --ink-3: #8c8c8c;
  --line: #f0f0f0;
  --line-2: #e8e8e8;
  --border: #d9d9d9;
  --hover-row: #f5f9ff;
  --table-head: #fafafa;

  --nav-h: 40px;
  --tabs-h: 36px;
  --top-h: 32px;
  --subnav-w: 168px;
  --radius: 4px;
  --radius-sm: 2px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .03), 0 1px 6px rgba(0, 0, 0, .04);
  --shadow-pop: 0 6px 16px rgba(0, 0, 0, .12);
  --font: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  font-size: 13px;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { color: var(--brand); text-decoration: none; cursor: pointer; }
a:hover { color: var(--brand-dark); }
ul { list-style: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 13px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }
::-webkit-scrollbar-track { background: transparent; }
::selection { background: rgba(22, 119, 255, .18); }

/* ========== 壳层:顶栏 + 标签 + 内容 ========== */
.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--page);
}

/* 最顶窗体条 */
.winbar {
  height: var(--top-h);
  flex: 0 0 var(--top-h);
  background: #f5f5f5;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 12px;
  color: var(--ink-2);
  gap: 12px;
  user-select: none;
}
.winbar .wb-brand {
  display: flex; align-items: center; gap: 6px;
  font-weight: 600; color: var(--ink);
}
.winbar .wb-brand .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #ff9f0a;
  box-shadow: 0 0 0 2px rgba(255, 159, 10, .25);
}
.winbar .wb-tab {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-bottom-color: #fff;
  padding: 4px 14px;
  border-radius: 4px 4px 0 0;
  color: var(--brand);
  font-weight: 500;
  margin-bottom: -1px;
}
.winbar .spacer { flex: 1; }
.winbar .wb-tools {
  display: flex; align-items: center; gap: 14px; color: var(--ink-2);
}
.winbar .wb-tools a { color: var(--ink-2); }
.winbar .wb-tools a:hover { color: var(--brand); }
.winbar .wb-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.winbar .wb-bell #tb-bell-dot {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--st-critical);
  color: #fff;
  font-size: 10px;
  line-height: 15px;
  text-align: center;
}
.winbar .wb-user {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 2px 6px; border-radius: 4px;
}
.winbar .wb-user:hover { background: rgba(0,0,0,.04); }
.winbar .wb-avatar {
  width: 20px; height: 20px; border-radius: 50%;
  background: linear-gradient(135deg, #69b1ff, #1677ff);
  color: #fff; font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

/* 主导航 */
.topnav {
  height: var(--nav-h);
  flex: 0 0 var(--nav-h);
  background: var(--brand-nav);
  display: flex;
  align-items: center;
  padding: 0 8px 0 12px;
  color: #fff;
  position: relative;
  z-index: 100;
}
.topnav .tn-logo {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 14px;
  padding-right: 14px; margin-right: 4px;
  white-space: nowrap;
  cursor: pointer;
}
.topnav .tn-logo .mark {
  width: 22px; height: 22px; border-radius: 4px;
  background: rgba(255,255,255,.2);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}
.topnav .tn-menu {
  display: flex; align-items: stretch; height: 100%; flex: 1; min-width: 0;
}
.topnav .tn-item {
  position: relative;
  display: flex; align-items: center;
  padding: 0 14px;
  height: 100%;
  color: rgba(255,255,255,.92);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  gap: 4px;
}
.topnav .tn-item:hover,
.topnav .tn-item.open,
.topnav .tn-item.active {
  background: rgba(0,0,0,.12);
  color: #fff;
}
.topnav .tn-item .caret {
  font-size: 10px; opacity: .75; transform: scaleY(.85);
}
.topnav .tn-item .new-tag {
  background: #ff4d4f;
  color: #fff;
  font-size: 10px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 2px;
  margin-left: 2px;
  font-weight: 700;
}
.topnav .tn-right {
  display: flex; align-items: center; gap: 10px;
  margin-left: auto; padding-left: 12px;
  font-size: 12px; color: rgba(255,255,255,.9);
  white-space: nowrap;
}
.topnav .tn-right .tenant-switch {
  display: flex; align-items: center; gap: 4px;
  cursor: pointer; padding: 4px 8px; border-radius: 4px;
}
.topnav .tn-right .tenant-switch:hover { background: rgba(0,0,0,.12); }

/* 下拉菜单 */
.tn-drop {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 140px;
  background: #fff;
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-pop);
  border-radius: 0 0 4px 4px;
  padding: 4px 0;
  z-index: 200;
  color: var(--ink);
}
.tn-item.open > .tn-drop { display: block; }
.tn-drop.wide {
  min-width: 420px;
  padding: 12px 8px;
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px 12px;
}
.tn-item.open > .tn-drop.wide { display: grid; }
.tn-drop .drop-col-title {
  grid-column: span 1;
  font-size: 12px; color: var(--ink-3);
  padding: 4px 12px 6px; font-weight: 600;
}
.tn-drop a, .tn-drop .drop-item {
  display: block;
  padding: 7px 16px;
  color: var(--ink);
  font-size: 13px;
  white-space: nowrap;
}
.tn-drop a:hover, .tn-drop .drop-item:hover {
  background: var(--brand-light);
  color: var(--brand);
}
.tn-drop .drop-item .new-tag {
  background: #ff4d4f; color: #fff; font-size: 10px;
  padding: 1px 4px; border-radius: 2px; margin-left: 4px;
}

/* 标签栏 */
.tabbar {
  height: var(--tabs-h);
  flex: 0 0 var(--tabs-h);
  background: #eef0f3;
  border-bottom: 1px solid #dfe3e8;
  display: flex;
  align-items: flex-end;
  padding: 0 8px;
  gap: 2px;
  overflow-x: auto;
  overflow-y: hidden;
}
.tabbar .ptab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  background: transparent;
  color: var(--ink-2);
  font-size: 12px;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid transparent;
  border-bottom: none;
  max-width: 180px;
  user-select: none;
}
.tabbar .ptab:hover { background: rgba(255,255,255,.55); color: var(--ink); }
.tabbar .ptab.active {
  background: #fff;
  color: var(--brand);
  border-color: #dfe3e8;
  font-weight: 500;
  height: 31px;
  margin-bottom: -1px;
}
.tabbar .ptab .x {
  width: 14px; height: 14px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--ink-3);
  line-height: 1;
}
.tabbar .ptab .x:hover { background: #ff4d4f; color: #fff; }
.tabbar .ptab-add {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-3); cursor: pointer; border-radius: 4px;
  font-size: 16px;
}
.tabbar .ptab-add:hover { background: rgba(0,0,0,.06); color: var(--brand); }
.tabbar .tab-actions {
  margin-left: auto;
  display: flex; align-items: center; gap: 10px;
  padding: 0 8px 6px;
  font-size: 12px; color: var(--ink-3);
  white-space: nowrap;
}
.tabbar .tab-actions a { color: var(--ink-3); }
.tabbar .tab-actions a:hover { color: var(--brand); }

/* 主内容区 */
.workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--page);
  overflow: hidden;
}
.workspace > .view {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: var(--page);
}

/* 带左副导航的模块布局 */
.mod-layout {
  display: flex;
  height: 100%;
  min-height: 0;
}
.subnav {
  width: var(--subnav-w);
  flex: 0 0 var(--subnav-w);
  background: #fff;
  border-right: 1px solid var(--line-2);
  overflow-y: auto;
  padding: 8px 0;
}
.subnav .sn-group {
  padding: 8px 14px 4px;
  font-size: 12px; color: var(--ink-3); font-weight: 600;
}
.subnav a, .subnav .sn-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  color: var(--ink-2);
  font-size: 13px;
  cursor: pointer;
  border-right: 2px solid transparent;
}
.subnav a:hover, .subnav .sn-item:hover {
  background: var(--brand-light);
  color: var(--brand);
}
.subnav a.active, .subnav .sn-item.active {
  background: var(--brand);
  color: #fff;
  font-weight: 500;
}
.subnav a .ico, .subnav .sn-item .ico {
  width: 16px; text-align: center; font-size: 13px; opacity: .9;
}
.subnav .sn-tree-title {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px 4px;
  font-size: 13px; color: var(--ink); font-weight: 600; cursor: pointer;
}
.mod-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}
.mod-main .mod-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0;
}

/* 内页标签(申报清册/零申报 等) */
.inner-tabs {
  display: flex; align-items: center;
  gap: 0; padding: 0 12px;
  background: #fff;
  border-bottom: 1px solid var(--line-2);
  height: 36px; flex: 0 0 36px;
}
.inner-tabs .itab {
  padding: 8px 14px;
  font-size: 13px; color: var(--ink-2);
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.inner-tabs .itab:hover { color: var(--brand); }
.inner-tabs .itab.active {
  color: var(--brand); border-bottom-color: var(--brand); font-weight: 500;
}
.inner-tabs .itab .x {
  margin-left: 6px; color: var(--ink-3); font-size: 11px;
}
.inner-tabs .itab .x:hover { color: var(--st-critical); }

/* ========== 工具条 / 筛选 ========== */
.toolbar {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 8px; padding: 10px 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.toolbar .spacer { flex: 1; min-width: 8px; }
.toolbar .muted { color: var(--ink-3); font-size: 12px; }

.input {
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  outline: none;
  min-width: 0;
}
.input:hover { border-color: var(--brand-2); }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(22,119,255,.12); }
.input.search { min-width: 200px; padding-left: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%238c8c8c' viewBox='0 0 16 16'%3E%3Cpath d='M11.7 10.3l3 3a1 1 0 01-1.4 1.4l-3-3a6 6 0 111.4-1.4zM6 10a4 4 0 100-8 4 4 0 000 8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 8px center;
}
select.input { padding-right: 24px; cursor: pointer; }
textarea.input { height: auto; padding: 8px 10px; resize: vertical; }

/* ========== 按钮 ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  height: 28px; padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
  user-select: none;
}
.btn:hover { color: var(--brand); border-color: var(--brand-2); }
.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn.ghost { background: #fff; }
.btn.danger { color: var(--st-critical); border-color: #ffccc7; }
.btn.danger:hover { background: #fff2f0; border-color: var(--st-critical); color: var(--st-critical); }
.btn.sm { height: 24px; padding: 0 8px; font-size: 12px; }
.btn.lg { height: 36px; padding: 0 20px; font-size: 14px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link-btn {
  background: none; border: none; color: var(--brand);
  cursor: pointer; font-size: 13px; padding: 0;
}
.link-btn:hover { color: var(--brand-dark); }
.op { margin-right: 8px; white-space: nowrap; }
.op:last-child { margin-right: 0; }

/* ========== 表格 ========== */
.table-wrap { overflow: auto; background: #fff; }
table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  table-layout: auto;
}
table.tbl th, table.tbl td {
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}
table.tbl th {
  background: var(--table-head);
  color: var(--ink-2);
  font-weight: 600;
  font-size: 12px;
  border-bottom: 1px solid var(--line-2);
  position: sticky; top: 0; z-index: 2;
}
table.tbl tbody tr:hover { background: var(--hover-row); }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl td.center, table.tbl th.center { text-align: center; }
table.tbl .sub { color: var(--ink-3); font-size: 12px; margin-top: 2px; white-space: normal; }
table.tbl .right { text-align: right; }
table.tbl th.group {
  text-align: center;
  border-left: 1px solid var(--line-2);
  border-right: 1px solid var(--line-2);
}
table.tbl.compact th, table.tbl.compact td { padding: 6px 8px; }
table.tbl .type-tag {
  display: inline-block;
  font-size: 11px; line-height: 16px;
  padding: 0 4px; border-radius: 2px;
  margin-right: 6px; vertical-align: middle;
  border: 1px solid;
}
table.tbl .type-tag.gen { color: #1677ff; border-color: #91caff; background: #e6f4ff; }
table.tbl .type-tag.sml { color: #d46b08; border-color: #ffd591; background: #fff7e6; }

/* 多级表头 */
table.tbl thead tr:first-child th { border-bottom: 1px solid var(--line-2); }
table.tbl thead th { border-right: 1px solid var(--line); }
table.tbl thead th:last-child { border-right: none; }

/* 状态图标:绿勾/灰圈/橙圈 */
.st {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  font-size: 11px; font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}
.st-ok {
  color: #fff;
  background: var(--st-good);
  box-shadow: 0 0 0 1px rgba(82,196,26,.2);
}
.st-ok::before { content: "✓"; }
.st-no {
  color: #bfbfbf;
  background: #fff;
  border: 1.5px solid #d9d9d9;
}
.st-no::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #d9d9d9; }
.st-ing {
  color: #fff;
  background: var(--st-warning);
}
.st-ing::before { content: "…"; font-size: 10px; }
.st-na {
  color: #d9d9d9;
  background: transparent;
  border: 1.5px dashed #e8e8e8;
}
.st-na::before { content: ""; }

/* 在线状态 */
.online-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--ink-3);
}
.online-tag .dot {
  width: 6px; height: 6px; border-radius: 50%; background: #bfbfbf;
}
.online-tag.on .dot { background: var(--st-good); }
.online-tag.on { color: var(--st-good-text); }

/* badge */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 20px; padding: 0 7px;
  border-radius: 2px;
  font-size: 12px;
  border: 1px solid transparent;
  white-space: nowrap;
  vertical-align: middle;
}
.badge.good { background: #f6ffed; color: var(--st-good-text); border-color: #b7eb8f; }
.badge.warn { background: #fffbe6; color: #ad6800; border-color: #ffe58f; }
.badge.serious { background: #fff7e6; color: #ad4e00; border-color: #ffd591; }
.badge.crit { background: #fff2f0; color: #cf1322; border-color: #ffccc7; }
.badge.info { background: var(--brand-light); color: var(--brand-dark); border-color: #91caff; }
.badge.gray { background: #fafafa; color: var(--ink-2); border-color: var(--border); }
.badge.plain { border-color: transparent; }
.badge.plain::before { display: none; }

/* 分页 */
.pager {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 4px; padding: 8px 12px;
  background: #fff; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--ink-2);
  flex-wrap: wrap;
}
.pager .info { margin-right: 8px; color: var(--ink-3); }
.pager button {
  min-width: 28px; height: 26px; padding: 0 6px;
  border: 1px solid var(--border); background: #fff;
  border-radius: var(--radius); cursor: pointer; color: var(--ink-2);
  font-size: 12px;
}
.pager button:hover:not(:disabled) { color: var(--brand); border-color: var(--brand); }
.pager button.cur {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
.pager button:disabled { opacity: .45; cursor: not-allowed; }
.pager .psize, .pager .jump {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 8px;
}
.pager .psize select, .pager .jump input {
  height: 26px; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0 6px; width: 64px;
}
.pager .jump input { width: 40px; text-align: center; }

/* ========== 卡片 / 栅格 / 统计 ========== */
.card {
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.card.mb0 { margin-bottom: 0; }
.card .card-title {
  font-size: 14px; font-weight: 600; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between;
  color: var(--ink);
}
.card .card-title .extra { font-size: 12px; font-weight: 400; color: var(--ink-3); }

.grid { display: grid; gap: 12px; margin-bottom: 12px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-2-1 { grid-template-columns: 2fr 1fr; }
.grid-1-1-1 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2-1 { grid-template-columns: 1fr; }
}

.stat {
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.stat .label { display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 6px; }
.stat .value { display: block; font-size: 24px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.stat .value small { font-size: 13px; font-weight: 400; color: var(--ink-3); margin-left: 2px; }
.stat .foot { display: block; margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.stat .up { color: var(--st-good-text); }
.stat .down { color: var(--st-critical); }
.mini-bar {
  height: 4px; background: #f0f0f0; border-radius: 2px; margin-top: 8px; overflow: hidden;
}
.mini-bar i { display: block; height: 100%; background: var(--brand); border-radius: 2px; }

.progress {
  height: 8px; background: #f0f0f0; border-radius: 4px; overflow: hidden;
}
.progress i { display: block; height: 100%; background: var(--brand); border-radius: 4px; transition: width .3s; }
.progress.thin { height: 4px; }

/* ========== 首页专属 ========== */
.home-wrap { background: #fff; min-height: 100%; display: flex; flex-direction: column; }
.home-kpi {
  display: flex; align-items: stretch;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  gap: 0;
  background: #fff;
}
.home-kpi .due-box {
  flex: 0 0 110px;
  display: flex; flex-direction: column; justify-content: center;
  border-right: 1px solid var(--line);
  padding-right: 20px; margin-right: 8px;
}
.home-kpi .due-box .d-day {
  font-size: 28px; font-weight: 700; color: var(--ink); line-height: 1.2;
}
.home-kpi .due-box .d-sub { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.home-kpi .rings {
  flex: 1;
  display: flex; align-items: center; justify-content: space-around;
  gap: 12px; padding: 0 12px; min-width: 0;
}
.home-kpi .ring-item {
  display: flex; align-items: center; gap: 14px;
  min-width: 0;
}
.home-kpi .ring-item .ring-meta { font-size: 12px; color: var(--ink-2); line-height: 1.7; }
.home-kpi .ring-item .ring-meta b { color: var(--ink); }
.home-kpi .ring-item .ring-meta .t { color: var(--brand); font-weight: 600; font-size: 13px; margin-bottom: 2px; }
.home-kpi .ring-item .leg i {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px;
}
.home-kpi .banner {
  flex: 0 0 280px;
  background: linear-gradient(135deg, #1677ff 0%, #69b1ff 55%, #91caff 100%);
  border-radius: 6px;
  color: #fff; padding: 14px 16px;
  display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.home-kpi .banner h4 { font-size: 16px; margin-bottom: 4px; }
.home-kpi .banner p { font-size: 12px; opacity: .9; line-height: 1.5; }
.home-kpi .banner .ban-btn {
  margin-top: 10px; align-self: flex-start;
  background: #ff9f0a; color: #fff; border: none;
  height: 26px; padding: 0 12px; border-radius: 13px;
  font-size: 12px; cursor: pointer;
}
.home-kpi .banner .ban-btn:hover { filter: brightness(1.05); }

.home-filter {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; background: #fff;
  border-bottom: 1px solid var(--line);
}
.home-filter .help-link {
  margin-left: auto; color: var(--brand); font-size: 12px;
}

/* ========== 企业工作区 ========== */
.corp-shell { display: flex; flex-direction: column; height: 100%; background: #fff; }
.corp-top {
  height: 40px; flex: 0 0 40px;
  background: var(--brand-nav); color: #fff;
  display: flex; align-items: center; padding: 0 12px; gap: 12px;
}
.corp-top .ct-logo { font-weight: 700; display: flex; align-items: center; gap: 6px; }
.corp-top .ct-name { font-weight: 600; }
.corp-top .ct-period {
  background: rgba(255,255,255,.15); padding: 2px 8px; border-radius: 4px;
  font-size: 12px; cursor: pointer;
}
.corp-top .spacer { flex: 1; }
.corp-top a { color: rgba(255,255,255,.92); font-size: 12px; }
.corp-top a:hover { color: #fff; }
.corp-body { flex: 1; min-height: 0; display: flex; }
.corp-side {
  width: 160px; flex: 0 0 160px;
  background: #fafafa; border-right: 1px solid var(--line-2);
  overflow-y: auto; padding: 6px 0;
}
.corp-side .cs-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px; color: var(--ink-2); cursor: pointer; font-size: 13px;
}
.corp-side .cs-item:hover { background: #f0f5ff; color: var(--brand); }
.corp-side .cs-item.active { background: var(--brand-light); color: var(--brand); font-weight: 600; }
.corp-side .cs-item .arrow { font-size: 10px; color: var(--ink-3); }
.corp-side .cs-sub a {
  display: block; padding: 7px 14px 7px 28px; color: var(--ink-2); font-size: 12.5px;
}
.corp-side .cs-sub a:hover, .corp-side .cs-sub a.active {
  color: var(--brand); background: #f0f5ff;
}
.corp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.corp-main .corp-tabs {
  display: flex; align-items: center; gap: 0;
  height: 34px; padding: 0 8px; background: #f5f5f5;
  border-bottom: 1px solid var(--line-2);
}
.corp-main .corp-tabs .ctab {
  padding: 6px 12px; font-size: 12px; color: var(--ink-2); cursor: pointer;
  border: 1px solid transparent; border-bottom: none;
  border-radius: 4px 4px 0 0; margin-top: 4px;
}
.corp-main .corp-tabs .ctab.active {
  background: #fff; border-color: var(--line-2); color: var(--brand); margin-bottom: -1px;
}
.corp-content { flex: 1; min-height: 0; overflow: auto; background: #fff; position: relative; }

/* 企业桌面 */
.desk-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px; padding: 16px;
}
.desk-tile {
  background: #fafcff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px 8px;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
}
.desk-tile:hover { border-color: var(--brand-2); box-shadow: var(--shadow); transform: translateY(-1px); }
.desk-tile .ti {
  width: 40px; height: 40px; margin: 0 auto 8px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff;
  background: linear-gradient(135deg, #ff9c6e, #ff7a45);
}
.desk-tile .ti.purple { background: linear-gradient(135deg, #b37feb, #722ed1); }
.desk-tile .ti.blue { background: linear-gradient(135deg, #69b1ff, #1677ff); }
.desk-tile .tn { font-size: 13px; color: var(--ink); }
.desk-panels {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 12px; padding: 0 16px 16px;
}
.desk-panel {
  border: 1px solid var(--line);
  border-radius: 4px; min-height: 200px;
}
.desk-panel .dp-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-bottom: 1px solid var(--line);
  font-weight: 600; font-size: 13px;
}
.desk-panel .dp-hd .extra { font-size: 12px; font-weight: 400; color: var(--st-serious); cursor: pointer; }
.desk-panel .dp-bd { padding: 8px 12px; }
.desk-panel .kv {
  display: flex; justify-content: space-between;
  padding: 8px 10px; margin-bottom: 6px;
  background: #f7f9fc; border-radius: 4px; font-size: 12.5px;
}
.desk-panel .kv .k { color: var(--ink-2); }
.desk-panel .kv .v { color: var(--ink); font-variant-numeric: tabular-nums; }

/* 凭证页月份轴 */
.vch-layout { display: flex; height: 100%; min-height: 420px; }
.vch-months {
  width: 72px; flex: 0 0 72px;
  border-right: 1px solid var(--line);
  overflow-y: auto; padding: 12px 0;
  background: #fafafa;
}
.vch-months .ym {
  text-align: center; padding: 6px 0; font-size: 12px; color: var(--ink-3); cursor: pointer;
  position: relative;
}
.vch-months .ym::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0;
  width: 1px; background: #e8e8e8; transform: translateX(-50%);
}
.vch-months .ym .dot {
  position: relative; z-index: 1;
  width: 8px; height: 8px; border-radius: 50%;
  background: #d9d9d9; margin: 0 auto 4px;
}
.vch-months .ym.active { color: var(--brand); font-weight: 600; }
.vch-months .ym.active .dot { background: var(--brand); box-shadow: 0 0 0 3px rgba(22,119,255,.2); }
.vch-months .ym .lab {
  position: relative; z-index: 1;
  display: inline-block; padding: 2px 6px; border-radius: 10px;
}
.vch-months .ym.active .lab { background: var(--brand); color: #fff; }
.vch-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ========== 表单 ========== */
.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px;
}
.form-item { display: flex; flex-direction: column; gap: 6px; }
.form-item.full { grid-column: 1 / -1; }
.form-item label { font-size: 12px; color: var(--ink-2); }
.form-item .req { color: var(--st-critical); margin-right: 2px; }
.checkbox { width: 14px; height: 14px; accent-color: var(--brand); cursor: pointer; vertical-align: middle; }

/* ========== Tabs(页内) ========== */
.tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 0; padding: 0 12px; background: #fff;
}
.tabs .tab {
  padding: 10px 16px; font-size: 13px; color: var(--ink-2);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs .tab:hover { color: var(--brand); }
.tabs .tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

/* ========== Modal / Toast ========== */
.modal-mask {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, .45);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.modal-mask.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 6px;
  width: 640px; max-width: 100%;
  max-height: 86vh;
  display: flex; flex-direction: column;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  animation: pop .15s ease-out;
}
.modal.sm { width: 440px; }
.modal.lg { width: 860px; }
.modal .m-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  font-size: 15px; font-weight: 600;
}
.modal .m-head .x {
  width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; border-radius: 4px; color: var(--ink-3); font-size: 14px;
}
.modal .m-head .x:hover { background: #f5f5f5; color: var(--ink); }
.modal .m-body { padding: 16px; overflow: auto; flex: 1; }
.modal .m-foot {
  padding: 10px 16px; border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end; gap: 8px;
}
@keyframes pop {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: none; }
}

#toast-box {
  position: fixed; top: 56px; left: 50%; transform: translateX(-50%);
  z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  background: #fff; border: 1px solid var(--line-2);
  box-shadow: var(--shadow-pop);
  padding: 10px 18px; border-radius: 6px;
  font-size: 13px; color: var(--ink);
  display: flex; align-items: center; gap: 8px;
  animation: toastIn .2s ease-out;
}
.toast .ok { color: var(--st-good); font-weight: 700; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* ========== 其它组件 ========== */
.page-pad { padding: 12px 16px 24px; }
.page-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; color: var(--ink); }
.page-desc { font-size: 12px; color: var(--ink-3); margin-bottom: 12px; }
.flex { display: flex; align-items: center; gap: 8px; }
.mt8 { margin-top: 8px; }
.mt16 { margin-top: 16px; }
.mb0 { margin-bottom: 0; }
.small { font-size: 12px; }
.muted { color: var(--ink-3); }
.empty {
  text-align: center; padding: 60px 20px; color: var(--ink-3);
}
.empty .e-ico { font-size: 48px; margin-bottom: 12px; opacity: .5; }
.empty p { margin-top: 6px; }

.todo-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.todo-item:last-child { border-bottom: none; }
.todo-item .t-ico {
  width: 32px; height: 32px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; flex: 0 0 32px;
}
.todo-item .t-ico.ico-blue { background: #e6f4ff; }
.todo-item .t-ico.ico-green { background: #f6ffed; }
.todo-item .t-ico.ico-yellow { background: #fffbe6; }
.todo-item .t-ico.ico-red { background: #fff2f0; }
.todo-item .t-main { flex: 1; min-width: 0; }
.todo-item .t-title { font-size: 13px; color: var(--ink); font-weight: 500; }
.todo-item .t-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

.desc { display: grid; gap: 8px; }
.desc.cols2 { grid-template-columns: 1fr 1fr; }
.desc .di { display: flex; gap: 8px; font-size: 12.5px; }
.desc .dt { color: var(--ink-3); min-width: 72px; }
.desc .dd { color: var(--ink); }

.steps {
  display: flex; gap: 8px; margin-bottom: 16px;
}
.steps .step {
  flex: 1; display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 4px;
  background: #fafafa; border: 1px solid var(--line);
  font-size: 13px; color: var(--ink-3);
}
.steps .step .s-dot {
  width: 22px; height: 22px; border-radius: 50%;
  background: #f0f0f0; color: var(--ink-3);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.steps .step.doing { background: var(--brand-light); border-color: #91caff; color: var(--brand-dark); }
.steps .step.doing .s-dot { background: var(--brand); color: #fff; }
.steps .step.done { background: #f6ffed; border-color: #b7eb8f; color: var(--st-good-text); }
.steps .step.done .s-dot { background: var(--st-good); color: #fff; }

.cal {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.cal .c-head {
  text-align: center; padding: 6px; font-size: 12px; color: var(--ink-3); font-weight: 600;
}
.cal .c-day {
  min-height: 72px; border: 1px solid var(--line); border-radius: 4px;
  padding: 6px; background: #fff; font-size: 12px;
}
.cal .c-day.dim { opacity: .4; }
.cal .c-day.today { border-color: var(--brand); background: #f0f5ff; }
.cal .c-day .d-num { font-weight: 600; color: var(--ink-2); }
.cal .c-day .d-ev {
  margin-top: 4px; font-size: 11px; color: var(--brand);
  line-height: 1.3; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
}
.cal .c-day .d-ev.due { color: var(--st-critical); font-weight: 600; }

.tax-cell {
  display: inline-block; min-width: 56px; text-align: center;
  padding: 2px 6px; border-radius: 2px; font-size: 12px;
}
.tax-cell.done { color: var(--st-good-text); background: #f6ffed; }
.tax-cell.doing { color: #ad6800; background: #fffbe6; }
.tax-cell.todo { color: #cf1322; background: #fff2f0; }
.tax-cell.na { color: var(--ink-3); background: #fafafa; }

/* 运营 KPI 卡片 */
.ops-kpis {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  padding: 16px;
}
.ops-kpi {
  background: #f0f5ff; border-radius: 6px; padding: 16px;
  min-height: 120px; position: relative; overflow: hidden;
}
.ops-kpi h4 { font-size: 14px; margin-bottom: 10px; color: var(--ink); }
.ops-kpi .row { font-size: 12.5px; color: var(--ink-2); line-height: 1.9; }
.ops-kpi .row b { color: var(--ink); font-weight: 600; }

/* 更多功能宫格 */
.more-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 24px;
}
.more-card {
  background: #fff; border: 1px solid var(--line-2); border-radius: 6px;
  padding: 24px 16px; text-align: center; cursor: pointer;
  transition: all .15s;
}
.more-card:hover { border-color: var(--brand-2); box-shadow: var(--shadow); }
.more-card .mi {
  width: 48px; height: 48px; margin: 0 auto 10px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; background: var(--brand-light); color: var(--brand);
}
.more-card .mn { font-size: 14px; font-weight: 600; }
.more-card .md { font-size: 12px; color: var(--ink-3); margin-top: 4px; }

/* 图表提示 */
.chart-tip {
  position: fixed; z-index: 1500; display: none;
  background: rgba(0,0,0,.78); color: #fff;
  padding: 6px 10px; border-radius: 4px; font-size: 12px;
  pointer-events: none; max-width: 220px; line-height: 1.5;
}
.viz-root { width: 100%; }

/* 用户菜单 */
.user-menu {
  display: none; position: absolute; right: 0; top: 100%;
  margin-top: 4px; min-width: 140px;
  background: #fff; border: 1px solid var(--line-2);
  box-shadow: var(--shadow-pop); border-radius: 4px; padding: 4px 0; z-index: 300;
}
.user-menu.open { display: block; }
.user-menu a {
  display: block; padding: 8px 14px; color: var(--ink); font-size: 13px;
}
.user-menu a:hover { background: var(--brand-light); color: var(--brand); }

/* ========== 登录页 ========== */
body.login-body {
  overflow: auto;
  background: linear-gradient(160deg, #e8f3ff 0%, #f0f2f5 40%, #f7f9fc 100%);
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
}
.login-wrap {
  width: 100%; max-width: 960px;
  display: flex; background: #fff;
  border-radius: 8px; overflow: hidden;
  box-shadow: 0 12px 40px rgba(22, 119, 255, .12), 0 2px 8px rgba(0,0,0,.04);
  min-height: 520px;
}
.login-left {
  flex: 1.1;
  background: linear-gradient(150deg, #0958d9 0%, #1677ff 50%, #69b1ff 100%);
  color: #fff; padding: 48px 40px;
  display: flex; flex-direction: column; justify-content: center;
}
.login-left .l-logo {
  font-size: 18px; font-weight: 700; margin-bottom: 28px;
  display: flex; align-items: center; gap: 8px;
}
.login-left .l-logo .mark {
  width: 32px; height: 32px; border-radius: 6px;
  background: rgba(255,255,255,.2);
  display: inline-flex; align-items: center; justify-content: center;
}
.login-left h1 { font-size: 26px; line-height: 1.4; font-weight: 700; margin-bottom: 14px; }
.login-left h1 .hl { color: #ffe58f; }
.login-left .l-sub { font-size: 13px; opacity: .88; line-height: 1.7; margin-bottom: 28px; }
.login-left .l-feats { display: flex; flex-direction: column; gap: 12px; }
.login-left .l-feat {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; opacity: .95; line-height: 1.5;
}
.login-left .l-feat .f-ico {
  width: 28px; height: 28px; border-radius: 6px;
  background: rgba(255,255,255,.18);
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 28px;
}
.login-right {
  flex: 0 0 400px;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 36px;
}
.login-card { width: 100%; }
.login-card h2 { font-size: 22px; margin-bottom: 4px; }
.login-card .lc-sub { font-size: 12px; color: var(--ink-3); margin-bottom: 22px; }
.login-card .form-item { margin-bottom: 14px; }
.login-card .form-item label { display: block; margin-bottom: 6px; font-size: 12px; color: var(--ink-2); }
.login-card .input { height: 36px; width: 100%; }
.login-card .cap-row { display: flex; gap: 8px; }
.login-card .cap-img {
  width: 100px; height: 36px;
  background: linear-gradient(135deg, #e6f4ff, #bae0ff);
  border: 1px solid #91caff; border-radius: var(--radius);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; letter-spacing: 3px; color: var(--brand-dark);
  cursor: pointer; user-select: none; font-size: 15px;
}
.login-card .lc-links {
  display: flex; justify-content: space-between; align-items: center;
  margin: 4px 0 16px; font-size: 12px; color: var(--ink-3);
}
.login-card .demo-sep {
  text-align: center; color: var(--ink-3); font-size: 12px;
  margin: 18px 0 12px; position: relative;
}
.login-card .demo-sep::before, .login-card .demo-sep::after {
  content: ""; position: absolute; top: 50%; width: 28%; height: 1px; background: var(--line-2);
}
.login-card .demo-sep::before { left: 0; }
.login-card .demo-sep::after { right: 0; }
.login-card .demo-btn {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin-bottom: 8px;
  border: 1px solid var(--line-2); border-radius: 6px;
  background: #fafafa; cursor: pointer; text-align: left;
}
.login-card .demo-btn:hover { border-color: var(--brand-2); background: var(--brand-light); }
.login-card .demo-btn .d-ico {
  width: 36px; height: 36px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 18px;
}
.login-card .demo-btn .d-ico.ico-blue { background: #e6f4ff; }
.login-card .demo-btn .d-ico.ico-green { background: #f6ffed; }
.login-card .demo-btn b { display: block; font-size: 13px; color: var(--ink); }
.login-card .demo-btn small { display: block; font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.login-foot {
  text-align: center; margin-top: 20px; font-size: 11px; color: var(--ink-3);
}
@media (max-width: 900px) {
  .login-wrap { flex-direction: column; max-width: 420px; }
  .login-left { display: none; }
  .login-right { flex: none; width: 100%; }
}

/* admin 紫强调 */
body.admin-skin .topnav { background: #5b45c4; }
body.admin-skin .topnav .tn-item:hover,
body.admin-skin .topnav .tn-item.active,
body.admin-skin .topnav .tn-item.open { background: rgba(0,0,0,.15); }
body.admin-skin .btn.primary { background: #5b45c4; border-color: #5b45c4; }
body.admin-skin .btn.primary:hover { background: #4a3aa7; border-color: #4a3aa7; }
body.admin-skin .tabbar .ptab.active { color: #5b45c4; }
body.admin-skin .subnav a.active { background: #5b45c4; }
body.admin-skin a { color: #5b45c4; }
body.admin-skin a:hover { color: #4a3aa7; }
body.admin-skin .pager button.cur { background: #5b45c4; border-color: #5b45c4; }

/* 兼容旧类名(少量) */
.layout { display: flex; height: 100vh; min-height: 0; overflow: hidden; }
.sider { display: none; }
.main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.content { flex: 1; min-height: 0; overflow: auto; }
.topbar {
  height: 48px; display: flex; align-items: center; gap: 12px;
  padding: 0 16px; background: #fff; border-bottom: 1px solid var(--line-2);
}
.tag { font-size: 11px; }
