/* ============================================================
   XYGo (Art Design Pro) 风格 · 孵化基地运营工作台
   primary #5D87FF · radius .75rem · sidebar 230px · menu 400
   支持明/暗主题（html[data-theme]）
   ============================================================ */
:root {
  --sidebar-w: 230px;
  --sidebar-w-mini: 64px;
  --custom-radius: 0.75rem;
  --radius: var(--custom-radius);
  --radius-sm: calc(var(--custom-radius) / 2 + 2px);
  --tab-radius: calc(var(--custom-radius) / 2.5 + 2px);

  --primary: #5D87FF;
  --primary-d: #4F73E8;
  --primary-subtle: #eef3ff;
  --primary-grad: linear-gradient(135deg, #5D87FF 0%, #7AA0FF 100%);

  /* 表面/文字 */
  --bg: #f2f3f5;
  --bg-2: #f6f7f9;
  --surface: #ffffff;
  --ink: #2a3547;
  --ink-2: #5b6b84;
  --ink-3: #93a0b4;
  --line: rgba(0, 0, 0, .08);
  --line-2: rgba(0, 0, 0, .045);
  --art-card-border: rgba(0, 0, 0, .08);
  --art-hover-color: #edeff0;
  --default-box-color: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .03), 0 2px 6px rgba(0, 0, 0, .03);
  --shadow: 0 1px 2px rgba(0, 0, 0, .03), 0 4px 12px rgba(0, 0, 0, .04);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .12);
  --shadow-hover: 0 6px 16px rgba(0, 0, 0, .08);

  /* 语义色 */
  --green: #16a34a;
  --amber: #e8930c;
  --red: #e5484d;
  --blue: #5D87FF;
  --cyan: #06b6d4;

  /* 复用别名 */
  --accent: var(--primary);
  --fg-2: var(--ink-2);
  --fg-3: var(--ink-3);
  --uni-green: var(--green);
  --primary-2: var(--primary-d);
  --primary-grad-soft: var(--primary-grad);
  --muted: var(--ink-3);
  --muted-2: var(--ink-3);
  --text: var(--ink);
  --text-2: var(--ink-2);
  --border: var(--line);
  --border-2: var(--line);
  --theme-color: var(--primary);
}

/* ===== 暗色主题 ===== */
html[data-theme="dark"] {
  --primary-subtle: rgba(93, 135, 255, .16);
  --bg: #101014;
  --bg-2: #17171c;
  --surface: #1d1d23;
  --ink: #e8eaf0;
  --ink-2: #a8b0bf;
  --ink-3: #6f7887;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .05);
  --art-card-border: rgba(255, 255, 255, .09);
  --art-hover-color: #26262e;
  --default-box-color: #1d1d23;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .2);
  --shadow: 0 2px 8px rgba(0, 0, 0, .28);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
  --shadow-hover: 0 6px 16px rgba(0, 0, 0, .4);
  --green: #4ade80;
  --amber: #fbbf24;
  --red: #ff6b6e;
  --blue: #7a9bff;
  --cyan: #22d3ee;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
::selection { background: rgba(93, 135, 255, .22); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(120, 130, 150, .35); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(120, 130, 150, .55); }
::-webkit-scrollbar-track { background: transparent; }

/* Remix Icon 全局 */
i[class^="ri-"], i[class*=" ri-"] { line-height: 1; }

/* ============ 布局 ============ */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--line);
  color: var(--ink-2);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width .2s ease;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 18px; min-height: 52px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: calc(var(--radius-sm));
  background: var(--primary-grad);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 17px; color: #fff;
  flex-shrink: 0;
}
.brand-txt { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.brand-txt b { color: var(--ink); font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-txt span { color: var(--ink-3); font-size: 11px; }

/* 折叠侧栏（XYGo collapse） */
body.side-collapsed .sidebar { width: var(--sidebar-w-mini); padding: 16px 8px; }
body.side-collapsed .brand { justify-content: center; padding-left: 0; padding-right: 0; }
body.side-collapsed .brand-txt,
body.side-collapsed .side-search,
body.side-collapsed .nav-item span:not(.nav-ic):not(.nav-caret),
body.side-collapsed .nav-subitem,
body.side-collapsed .side-foot { display: none; }
body.side-collapsed .nav-item { justify-content: center; padding: 10px 0; }
body.side-collapsed .nav-parent .nav-caret { display: none; }

/* ============ 菜单 ============ */
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item, .nav-parent, .nav-subitem, .nav a {
  font-weight: 400 !important;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--ink-2); cursor: pointer; font-size: 14px; font-weight: 400;
  transition: all .18s ease; position: relative; user-select: none;
}
.nav-item:hover { background: var(--art-hover-color); color: var(--ink); }
.nav-item.on {
  background: var(--primary-subtle);
  color: var(--primary);
}
.nav-item.on::before {
  content: '';
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 3px; background: var(--primary);
}
.nav-ic { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-3); flex-shrink: 0; transition: color .18s; }
.nav-ic i { font-size: 18px; }
.nav-item:hover .nav-ic { color: var(--ink-2); }
.nav-item.on .nav-ic { color: var(--primary); }
.nav-item.has-dot::after {
  content: ""; position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 50%; background: var(--red);
}
.side-foot { margin-top: auto; color: var(--ink-3); font-size: 11px; padding: 14px 8px 4px; text-align: center; letter-spacing: .3px; }

.nav-group { display: flex; flex-direction: column; margin-top: 2px; }
.nav-caret {
  margin-left: auto; width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-3); font-size: 14px; transition: transform .2s ease;
}
.nav-caret i { font-size: 15px; }
.nav-parent.open .nav-caret,
.nav-parent.on .nav-caret { transform: rotate(90deg); color: var(--primary); }
.nav-sub {
  display: none; flex-direction: column; gap: 1px;
  margin: 3px 0 6px 17px; padding-left: 12px;
  border-left: 1px solid var(--line);
}
.nav-sub.show { display: flex; animation: fade .15s ease; }
.nav-subitem {
  display: flex; align-items: center;
  padding: 8px 12px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 400;
  color: var(--ink-2); cursor: pointer; user-select: none;
  transition: all .15s ease; position: relative;
}
.nav-subitem:hover { background: var(--art-hover-color); color: var(--ink); }
.nav-subitem.on { color: var(--primary); background: var(--primary-subtle); }
.nav-subitem.on::before {
  content: ''; position: absolute; left: -13.5px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 14px; border-radius: 2px; background: var(--primary);
}
.nav-item.sys-setting { margin-top: 12px; border-top: 1px solid var(--line-2); padding-top: 14px; }

/* 移动端汉堡 + 遮罩 */
.hamburger {
  display: none; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex-shrink: 0;
  border: none; border-radius: var(--radius-sm);
  background: transparent; color: var(--ink-2);
  font-size: 19px; cursor: pointer;
}
.hamburger:hover { background: var(--art-hover-color); }
.sidebar-overlay {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(0, 0, 0, .45); opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}

/* ============ 全局检索 ============ */
.side-search { position: relative; margin-bottom: 12px; padding: 0 2px; }
.search-wrap {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-2); border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 8px 11px; transition: all .2s ease;
}
.search-wrap:focus-within { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 3px rgba(93, 135, 255, .12); }
.search-ic { width: 16px; height: 16px; color: var(--ink-3); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.search-ic i { font-size: 16px; }
.search-input { border: none; background: transparent; outline: none; flex: 1; font-size: 13px; color: var(--ink); min-width: 0; }
.search-pop {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--art-card-border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 6px; max-height: 60vh; overflow: auto; z-index: 60;
}
.search-sec-h { font-size: 11px; color: var(--ink-3); padding: 6px 10px 4px; font-weight: 600; letter-spacing: .5px; }
.search-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; }
.search-item:hover { background: var(--art-hover-color); }
.si-name { font-size: 13px; color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.si-sub { font-size: 11px; color: var(--ink-3); flex-shrink: 0; margin-left: 8px; }
.si-tag { flex-shrink: 0; }
.search-empty { padding: 16px; text-align: center; color: var(--ink-3); font-size: 13px; }

/* ============ 主区/顶栏（XYGo TopBar） ============ */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  height: 56px; padding: 0 16px; gap: 10px;
  background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 90;
}
.h-left { display: flex; align-items: center; gap: 6px; min-width: 0; }
.h-right { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border: none; border-radius: var(--radius-sm);
  background: transparent; color: var(--ink-2); cursor: pointer;
  transition: background .15s, color .15s; flex-shrink: 0;
}
.icon-btn i { font-size: 18px; line-height: 1; }
.icon-btn:hover { background: var(--art-hover-color); color: var(--ink); }

/* 面包屑 */
.crumb { display: flex; align-items: center; gap: 6px; font-size: 13.5px; margin-left: 8px; min-width: 0; }
.crumb .c-parent { color: var(--ink-3); }
.crumb .c-sep { color: var(--ink-3); font-size: 12px; display: inline-flex; }
.crumb .c-cur { color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 旧 topbar-title 兼容（若仍出现则弱化为面包屑式标题，不再大字） */
.topbar-title h1 { font-size: 15px; font-weight: 600; color: var(--ink); }
.topbar-title p { color: var(--ink-3); font-size: 12px; margin-top: 2px; }

/* 页头（content 顶部，XYGo 页面标题在内容区） */
.page-head { margin-bottom: 16px; display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.page-head .ph-txt { min-width: 0; }
.page-head h2 { font-size: 20px; font-weight: 600; color: var(--ink); letter-spacing: .2px; }
.page-head p { color: var(--ink-3); font-size: 12.5px; margin-top: 4px; }
.ph-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ph-tools .filter-select { min-width: 130px; }

/* ============ 多标签栏 work-tab ============ */
.work-tab {
  display: flex; align-items: center;
  height: 38px; padding: 0 10px;
  background: var(--surface); border-bottom: 1px solid var(--line);
  position: relative; gap: 8px;
}
.wt-list { display: flex; align-items: center; gap: 6px; list-style: none; overflow-x: auto; flex: 1; scrollbar-width: none; }
.wt-list::-webkit-scrollbar { display: none; }
.wt-tab {
  display: inline-flex; align-items: center; gap: 6px;
  height: 27px; padding: 0 10px;
  border-radius: var(--tab-radius);
  font-size: 12.5px; color: var(--ink-2);
  cursor: pointer; user-select: none; white-space: nowrap;
  border: 1px solid transparent; transition: all .15s;
}
.wt-tab i.wt-ic { font-size: 14px; }
.wt-tab:hover { background: var(--art-hover-color); }
.wt-tab.on { background: var(--primary-subtle); color: var(--primary); font-weight: 500; }
.wt-tab .wt-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 50%; font-size: 11px;
  color: var(--ink-3); transition: all .15s;
}
.wt-tab .wt-x:hover { background: rgba(0, 0, 0, .12); color: var(--ink); }
html[data-theme="dark"] .wt-tab .wt-x:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.wt-more { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: var(--radius-sm); color: var(--ink-3); cursor: pointer; }
.wt-more:hover { background: var(--art-hover-color); }
.wt-menu {
  display: none; position: absolute; top: calc(100% + 4px); right: 10px;
  background: var(--surface); border: 1px solid var(--art-card-border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 5px; z-index: 200; min-width: 130px;
}
.wt-menu.show { display: block; }
.wt-mi { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-sm); font-size: 13px; color: var(--ink-2); cursor: pointer; }
.wt-mi:hover { background: var(--art-hover-color); color: var(--ink); }
.wt-mi i { font-size: 14px; }

/* ============ hover 用户卡（XYGo ArtUserMenu） ============ */
.uwrap { position: relative; display: flex; align-items: center; padding: 4px 6px; border-radius: var(--radius-sm); cursor: pointer; }
.uwrap:hover { background: var(--art-hover-color); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary-grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px; flex-shrink: 0;
}
.u-pop {
  display: none; position: absolute; top: calc(100% + 10px); right: 0;
  width: 230px; background: var(--default-box-color);
  border: 1px solid var(--art-card-border); border-radius: var(--radius);
  box-shadow: var(--shadow-hover); padding: 5px 14px 12px; z-index: 202;
}
.uwrap:hover .u-pop { display: block; }
.u-head { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.u-head .av-lg { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-grad); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 17px; flex-shrink: 0; }
.u-head .uname { font-weight: 600; font-size: 14px; color: var(--ink); }
.uemail { margin-top: 3px; font-size: 12px; color: var(--muted); }
.u-divider { height: 1px; background: var(--border); margin: 8px 0; }
.u-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: var(--radius-sm); font-size: 13px; color: var(--text-2); cursor: pointer; }
.u-item:hover { background: var(--art-hover-color); color: var(--text); }
.u-item .ic { font-size: 15px; }
.u-logout { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 6px; padding: 7px 10px; border: 1px solid var(--border-2); border-radius: var(--radius-sm); font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.u-logout:hover { box-shadow: var(--shadow-hover); border-color: var(--primary); color: var(--primary); }
.u-logout .ic { font-size: 14px; }

/* 旧 user-chip 兼容（不再使用大头像卡，但保留类避免报错） */
.user-chip { display: none; }
.top-tools { display: flex; align-items: center; gap: 10px; }
.filter-select {
  padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 13px; background: var(--surface); color: var(--ink);
  cursor: pointer; transition: all .15s;
}
.filter-select:hover { border-color: var(--ink-3); }
.filter-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(93, 135, 255, .12); }

/* ============ 内容区 + slide-left 动效 ============ */
.content { padding: 16px 20px 24px; flex: 1; min-width: 0; }
.content { animation: slideLeft .25s cubic-bezier(.25, .1, .25, 1) backwards; }
@keyframes slideLeft {
  from { opacity: 0; transform: translate3d(-15px, 0, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* ============ 四点加载动画 ============ */
#pageLoader {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); transition: opacity .3s ease; --theme-color: var(--primary);
}
#pageLoader.hide { opacity: 0; pointer-events: none; }
.pl-dots { position: relative; width: 42px; height: 42px; animation: plRotate 2s cubic-bezier(.5, .05, .5, .95) infinite; }
.pl-dots span { position: absolute; width: 15px; height: 15px; border-radius: 50%; background: var(--theme-color, var(--primary)); animation: plPulse 2s ease-in-out infinite; }
.pl-dots span:nth-child(1) { top: 0; left: 0; }
.pl-dots span:nth-child(2) { top: 0; right: 0; animation-delay: .15s; }
.pl-dots span:nth-child(3) { bottom: 0; right: 0; animation-delay: .3s; }
.pl-dots span:nth-child(4) { bottom: 0; left: 0; animation-delay: .45s; }
@keyframes plRotate { to { transform: rotate(360deg); } }
@keyframes plPulse { 0%, 100% { opacity: .25; transform: scale(.7); } 50% { opacity: 1; transform: scale(1); } }

/* ============ 按钮XYGo ============ */
.btn {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius-sm); padding: 8px 15px; cursor: pointer;
  font-size: 13.5px; color: var(--ink); font-weight: 500;
  transition: all .15s ease; box-shadow: none;
}
.btn:hover { border-color: var(--ink-3); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary-grad); color: #fff; border-color: transparent; box-shadow: 0 2px 8px rgba(93, 135, 255, .32); }
.btn-primary:hover { background: var(--primary-grad); border-color: transparent; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(93, 135, 255, .4); }
.btn:focus-visible, .icon-btn:focus-visible, .act-btn:focus-visible, .pag-btn:focus-visible { outline: 2px solid rgba(93, 135, 255, .45); outline-offset: 2px; }
.btn-danger { color: var(--red); border-color: rgba(229, 72, 77, .35); background: rgba(229, 72, 77, .06); }
.btn-danger:hover { background: rgba(229, 72, 77, .12); }
.btn-ghost { background: transparent; border: 0; box-shadow: none; color: var(--ink-2); padding: 6px 12px; }
.btn-ghost:hover { background: var(--art-hover-color); color: var(--red); }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.notice {
  background: var(--primary-subtle); border: 1px solid rgba(93, 135, 255, .18);
  color: var(--ink-2); padding: 12px 16px; border-radius: var(--radius);
  margin-bottom: 14px; font-size: 13px; line-height: 1.6;
}

/* ============ KPI ============ */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.kpi {
  background: var(--surface); border: 1px solid var(--art-card-border);
  border-radius: var(--radius); padding: 18px;
  display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden; transition: transform .16s ease, box-shadow .16s ease;
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.kpi::after { content: none; }
.kpi::before {
  content: ''; position: absolute; right: -36px; top: -36px;
  width: 124px; height: 124px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(93, 135, 255, .09), transparent 68%);
}
.kpi-ic {
  width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: var(--primary-grad);
  box-shadow: 0 8px 18px -8px rgba(93, 135, 255, .55);
}
.kpi-ic i { font-size: 22px; }
.kpi-ic svg { width: 22px; height: 22px; }
.kpi-meta { display: flex; flex-direction: column; position: relative; z-index: 1; }
.kpi .label { font-size: 12px; color: var(--ink-2); letter-spacing: .4px; }
.kpi .val { font-size: 27px; font-weight: 700; margin-top: 3px; letter-spacing: .3px; color: var(--accent, var(--ink)); font-variant-numeric: tabular-nums; }
.kpi-prog { width: 100%; height: 5px; border-radius: 999px; background: rgba(93, 135, 255, .14); margin-top: 9px; overflow: hidden; }
.kpi-prog i { display: block; height: 100%; border-radius: 999px; background: var(--primary); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.kpi-prog-txt { font-size: 11.5px; color: var(--ink-2); margin-top: 5px; line-height: 1.3; }
.kpi-prog-txt b { color: var(--ink); font-weight: 600; }
.kpi.warn { border-color: rgba(229, 72, 77, .3); }
.kpi.warn .kpi-ic { background: linear-gradient(135deg, #e5484d, #f07a5f) !important; }
.kpi.warn .val, .kpi.warn .label { color: var(--red); }

/* ============ 卡片 ============ */
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.ui-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ui-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.chk-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 14px; }
.form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.ent-chk-box { max-height: 170px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; }
.card {
  background: var(--default-box-color); border: 1px solid var(--art-card-border);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm);
  transition: box-shadow .16s ease;
}
.card:hover { box-shadow: var(--shadow-hover); }
.card-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; padding-bottom: 13px; border-bottom: 1px solid var(--line-2); }
.card h3 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; color: var(--ink); }
.card h3 .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary-grad); box-shadow: 0 0 0 3px rgba(93, 135, 255, .15); }
.card.risk h3 .dot { background: linear-gradient(135deg, #e5484d, #f07a5f); box-shadow: 0 0 0 3px rgba(229, 72, 77, .15); }
.chart-box { position: relative; height: 210px; }

/* ============ 表格 ============ */
.tbl-wrap {
  border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--art-card-border);
  background: var(--surface);
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: left; padding: 11px 14px;
  background: var(--bg-2); color: var(--ink-2);
  font-weight: 500; font-size: 12px; letter-spacing: .3px;
  border-bottom: 1px solid var(--line);
}
thead th:first-child { padding-left: 16px; }
tbody td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); color: var(--ink); vertical-align: middle; }
tbody td:first-child { padding-left: 16px; }
.log-detail { color: var(--ink-2); line-height: 1.5; max-width: 320px; word-break: break-word; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: var(--art-hover-color); }
tbody tr:last-child td { border-bottom: 0; }

.cell-name { font-weight: 600; }
.link-name { color: var(--primary); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: color .15s; }
.link-name::before { content: ''; width: 3px; height: 13px; border-radius: 2px; background: var(--primary); flex-shrink: 0; opacity: .65; }
.link-name:hover { text-decoration: underline; opacity: .85; }
.link-name:hover::before { opacity: 1; }
.cell-code { font-family: "SF Mono", "Cascadia Code", "Consolas", monospace; font-size: 11.8px; letter-spacing: .25px; color: var(--ink-2); }

/* 状态标签 */
.status-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 500;
}
.status-tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .9; }
.tag-在孵 { background: rgba(93, 135, 255, .12); color: var(--primary); }
.tag-毕业 { background: rgba(22, 163, 74, .12); color: #12935a; }
html[data-theme="dark"] .tag-毕业 { color: #4ade80; }
.tag-退出 { background: rgba(0, 0, 0, .06); color: #8a90a6; }
html[data-theme="dark"] .tag-退出 { background: rgba(255, 255, 255, .08); color: #9aa3b5; }
.tag-待缴 { background: rgba(232, 147, 12, .13); color: #b26a08; }
html[data-theme="dark"] .tag-待缴 { color: #fbbf24; }
.tag-已缴 { background: rgba(22, 163, 74, .12); color: #12935a; }
html[data-theme="dark"] .tag-已缴 { color: #4ade80; }
.tag-欠费 { background: rgba(229, 72, 77, .12); color: #d63a2f; }
html[data-theme="dark"] .tag-欠费 { color: #ff6b6e; }
.tag-部分缴 { background: rgba(232, 147, 12, .13); color: #b26a08; }
html[data-theme="dark"] .tag-部分缴 { color: #fbbf24; }
.tag-在职 { background: rgba(22, 163, 74, .12); color: #12935a; }
html[data-theme="dark"] .tag-在职 { color: #4ade80; }
.tag-已发布 { background: rgba(93, 135, 255, .12); color: var(--primary); }
.tag-草稿 { background: rgba(0, 0, 0, .06); color: #8a90a6; }
html[data-theme="dark"] .tag-草稿 { background: rgba(255, 255, 255, .08); color: #9aa3b5; }
.tag-login { background: rgba(93, 135, 255, .12); color: var(--primary); }
.tag-create { background: rgba(22, 163, 74, .12); color: #12935a; }
html[data-theme="dark"] .tag-create { color: #4ade80; }
.tag-update { background: rgba(232, 147, 12, .13); color: #b26a08; }
html[data-theme="dark"] .tag-update { color: #fbbf24; }
.tag-delete { background: rgba(229, 72, 77, .12); color: #d63a2f; }
html[data-theme="dark"] .tag-delete { color: #ff6b6e; }
.tag-generate { background: rgba(93, 135, 255, .1); color: #5b53e0; }
html[data-theme="dark"] .tag-generate { color: #9d96ff; }
.tag-pay { background: rgba(6, 182, 212, .12); color: #0e8a9c; }
html[data-theme="dark"] .tag-pay { color: #22d3ee; }

/* ============ 操作按钮 ============ */
.act-group { display: inline-flex; gap: 5px; align-items: center; }
.act-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--radius-sm);
  font-size: 11.8px; font-weight: 500; cursor: pointer;
  transition: all .18s ease; border: 1px solid transparent;
  line-height: 1.3; user-select: none; white-space: nowrap;
}
.act-btn i { font-size: 13px; }
.act-btn:hover { transform: translateY(-1px); }
.act-btn:active { transform: translateY(0) scale(.96); }
.act-view { background: rgba(93, 135, 255, .1); color: var(--primary); border-color: rgba(93, 135, 255, .22); }
.act-view:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.act-edit { background: rgba(22, 163, 74, .1); color: #12935a; border-color: rgba(22, 163, 74, .22); }
html[data-theme="dark"] .act-edit { color: #4ade80; }
.act-edit:hover { background: #16a34a; color: #fff; border-color: #16a34a; }
.act-del { background: rgba(229, 72, 77, .08); color: #dc2626; border-color: rgba(229, 72, 77, .22); }
html[data-theme="dark"] .act-del { color: #ff6b6e; }
.act-del:hover { background: #dc2626; color: #fff; border-color: #dc2626; }
.arc-link { color: var(--primary); text-decoration: none; font-size: 13px; word-break: break-all; }
.arc-link:hover { text-decoration: underline; }

/* ============ chip / mini stat ============ */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); font-size: 12.5px; font-weight: 400; border: 1px solid var(--line); }
.stat-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.sm { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 10px; text-align: center; transition: transform .16s ease, border-color .16s ease; }
.sm:hover { transform: translateY(-2px); border-color: rgba(93, 135, 255, .35); }
.sm-v { display: block; font-size: 21px; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.sm-l { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }

/* ============ 详情 ============ */
.detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.detail-grid > div { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.detail-grid .dl { display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 4px; }
.detail-grid b { font-size: 16px; }
.muted { color: var(--ink-3); font-size: 13px; line-height: 1.6; }
.star { color: #f5a623; letter-spacing: 1px; }

/* ============ tabs ============ */
.et-tabs {
  display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px;
  background: var(--surface); border: 1px solid var(--art-card-border);
  border-radius: var(--radius); padding: 5px;
}
.et-tab { padding: 8px 16px; border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; font-weight: 400; color: var(--ink-2); transition: all .15s; user-select: none; }
.et-tab:hover { background: var(--art-hover-color); color: var(--ink); }
.et-tab.on { background: var(--primary); color: #fff; }
.et-panel { display: none; }
.et-panel.active { display: block; animation: fade .18s ease; }

/* ============ 列表 ============ */
.list-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 4px; border-bottom: 1px solid var(--line-2); }
.list-row:last-child { border-bottom: 0; }
.list-row .lr-name { font-weight: 500; }
.list-row .lr-sub { font-size: 12px; }
.lr-amt { font-weight: 600; color: var(--red); }
.lr-date { color: var(--ink-3); font-size: 12px; }
.lr-main { display: flex; flex-direction: column; gap: 2px; }
.lr-actions { display: flex; gap: 8px; flex-shrink: 0; }
.empty { color: var(--ink-3); text-align: center; padding: 34px 10px 30px; font-size: 12.5px; letter-spacing: .3px; }
.empty i { display: block; font-size: 30px; margin-bottom: 8px; opacity: .5; }

/* ============ 入孵漏斗 ============ */
.funnel { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; padding: 0 4px; }
.fn-row { display: flex; align-items: center; gap: 10px; }
.fn-l { width: 52px; font-size: 12px; color: var(--ink-2); flex-shrink: 0; }
.fn-track { flex: 1; background: var(--bg-2); border-radius: 6px; height: 12px; overflow: hidden; }
.fn-bar { display: block; height: 100%; border-radius: 6px; transition: width .4s ease; }
.fn-a { background: linear-gradient(90deg, #5D87FF, #7AA0FF); }
.fn-b { background: linear-gradient(90deg, #6C9EFF, #8FB5FF); }
.fn-c { background: linear-gradient(90deg, #16a34a, #34c273); }
.fn-row b { font-size: 13px; color: var(--ink); width: 28px; text-align: right; flex-shrink: 0; }

/* ============ 登录页（XYGo 左右分栏） ============ */
.login-page { display: flex; min-height: 100vh; }
.login-left {
  flex: 1; background: #f3f4fb; position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px;
}
.login-left::before {
  content: ''; position: absolute; top: -90px; right: -70px;
  width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(93, 135, 255, .16), transparent 66%);
  animation: llBlob 9s ease-in-out infinite alternate;
}
.login-left::after {
  content: ''; position: absolute; bottom: -110px; left: -70px;
  width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 233, .12), transparent 66%);
  animation: llBlob 11s ease-in-out infinite alternate-reverse;
}
@keyframes llBlob { from { transform: translate(0, 0) scale(1); } to { transform: translate(-24px, 26px) scale(1.08); } }
html[data-theme="dark"] .login-left { background: #17171c; }
.login-left .ll-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 60px; position: absolute; top: 40px; left: 48px; }
.login-left .ll-logo .brand-mark { width: 40px; height: 40px; }
.login-left .ll-logo b { font-size: 17px; font-weight: 600; color: var(--ink); }
.ll-art {
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(93, 135, 255, .18), rgba(93, 135, 255, .05) 60%, transparent 70%);
  border: 1px solid rgba(93, 135, 255, .14);
  box-shadow: 0 24px 60px -24px rgba(93, 135, 255, .35), inset 0 0 40px rgba(93, 135, 255, .06);
  display: flex; align-items: center; justify-content: center;
  animation: llFloat 6s ease-in-out infinite alternate;
}
@keyframes llFloat { from { transform: translateY(0); } to { transform: translateY(-16px); } }
.ll-art i { font-size: 110px; color: var(--primary); opacity: .9; }
.ll-text { text-align: center; margin-top: 40px; }
.ll-text h1 { font-size: 26px; font-weight: 700; color: var(--ink); letter-spacing: 1px; }
.ll-text p { font-size: 13.5px; color: var(--ink-2); margin-top: 10px; letter-spacing: 1px; }
.login-right {
  width: 46%; min-width: 420px; display: flex; flex-direction: column;
  background: var(--default-box-color); position: relative;
}
.login-right .lr-theme { position: absolute; top: 20px; right: 24px; }
.login-form-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.login-form { width: 340px; max-width: 100%; animation: loginCardIn .4s cubic-bezier(.2, .8, .2, 1) backwards; }
@keyframes loginCardIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.login-form h2 { font-size: 24px; font-weight: 700; color: var(--ink); }
.login-form .sub { color: var(--ink-3); font-size: 13.5px; margin: 8px 0 30px; }
.login-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 12px; background: #fff; padding: 6px; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; border-radius: 9px; background: #fff; padding: 3px; box-sizing: border-box; }
.sys-logo-box { width: 96px; height: 96px; border-radius: 14px; background: var(--primary-grad); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 34px; font-weight: 700; overflow: hidden; }
.sys-logo-box img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.sys-logo-preview { width: 96px; height: 96px; border-radius: 14px; object-fit: contain; background: #fff; border: 1px solid var(--line); }
.sys-logo-default { width: 96px; height: 96px; border-radius: 14px; background: var(--primary-grad); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 34px; font-weight: 700; }
.btn-ghost-danger { background: var(--surface); color: #e23a3a; border: 1px solid rgba(229, 72, 77, .3); }
.btn-ghost-danger:hover:not(:disabled) { background: rgba(229, 72, 77, .07); }
.btn-ghost-danger:disabled { opacity: .5; cursor: not-allowed; }

/* 旧登录类兼容（防旧引用残留） */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 20px; }
.login-card { width: 400px; max-width: 92vw; background: var(--surface); border-radius: var(--radius); padding: 40px 36px 34px; box-shadow: var(--shadow-lg); border: 1px solid var(--art-card-border); }
.login-card h2 { font-size: 22px; font-weight: 700; color: var(--ink); text-align: center; margin-bottom: 4px; }
.login-card .sub { color: var(--ink-2); font-size: 13px; margin: 10px 0 22px; }
.login-bg-orb { display: none; }

/* ============ 表单 ============ */
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 13px; color: var(--ink); margin-bottom: 7px; font-weight: 500; }
.input-wrap {
  position: relative; display: flex; align-items: center;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); transition: all .2s ease; overflow: hidden;
}
.input-wrap:focus-within { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 3px rgba(93, 135, 255, .12); }
.input-ic { padding: 0 12px 0 13px; display: inline-flex; color: var(--ink-3); transition: color .2s; flex-shrink: 0; }
.input-ic i { font-size: 16px; }
.input-wrap:focus-within .input-ic { color: var(--primary); }
.input-wrap input { flex: 1; border: none; outline: none; background: transparent; padding: 11px 13px 11px 4px; font-size: 14px; color: var(--ink); min-width: 0; }
.field > input, field > select {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-size: 13.5px; background: var(--bg-2);
  transition: all .15s; color: var(--ink);
}
.field > input:focus, field > select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(93, 135, 255, .12); background: var(--surface); }
.field select { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13.5px; background: var(--bg-2); color: var(--ink); }
.field select:focus { outline: none; border-color: var(--primary); }

/* 登录按钮 */
.btn-login {
  width: 100%; padding: 12px; font-size: 14.5px; margin-top: 6px;
  font-weight: 600; letter-spacing: 6px; border-radius: var(--radius-sm);
  background: var(--primary-grad); border: none; color: #fff;
  box-shadow: 0 4px 14px rgba(93, 135, 255, .32);
  transition: all .25s ease; cursor: pointer;
}
.btn-login:hover { background: var(--primary-grad); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(93, 135, 255, .42); }
.btn-login:active { transform: translateY(0); }
.btn-login span { position: relative; z-index: 1; }

.hint { font-size: 11.5px; color: var(--ink-3); margin-top: 18px; text-align: center; background: var(--bg-2); border-radius: var(--radius-sm); padding: 9px 14px; line-height: 1.7; border: 1px solid var(--line-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============ 模态 ============ */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .4);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; z-index: 50;
  animation: fade .15s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--default-box-color); border-radius: var(--radius); padding: 24px 26px;
  width: 480px; max-width: 92vw; max-height: 90vh; overflow: auto;
  box-shadow: var(--shadow-lg); animation: pop .18s ease;
  border: 1px solid var(--art-card-border);
}
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h3 { font-size: 16.5px; font-weight: 600; margin-bottom: 18px; color: var(--ink); position: relative; padding-left: 12px; }
.modal h3::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 16px; border-radius: 2px; background: var(--primary-grad); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.form-grid .full { grid-column: 1 / -1; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0 14px; border-bottom: 1px dashed var(--line); margin-bottom: 14px; font-weight: 500; }
.switch-row input[type=checkbox] { width: 17px; height: 17px; cursor: pointer; }
.modal .field { margin-bottom: 0; }
.modal .field label { margin-bottom: 6px; }
.modal .field input, .modal .field select { padding: 9px 11px; font-size: 13px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* ============ 归档 ============ */
.arc-row .arc-input-wrap { display: flex; align-items: center; gap: 10px; }
.arc-row .arc-input-wrap input { flex: 1; padding: 9px 12px; font-size: 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); transition: border-color .2s; color: var(--ink); }
.arc-row .arc-input-wrap input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(93, 135, 255, .12); }
.arc-badge { font-size: 11px; font-weight: 500; padding: 4px 10px; border-radius: 20px; white-space: nowrap; flex-shrink: 0; }
.arc-badge.ok { background: rgba(22, 163, 74, .1); color: #059669; }
.arc-badge.no { background: var(--bg-2); color: var(--ink-3); }
.arc-grid { display: flex; flex-direction: column; gap: 10px; padding: 8px 4px; }
.arc-card { display: flex; align-items: center; gap: 14px; padding: 13px 15px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg-2); transition: border-color .2s, box-shadow .2s; }
.arc-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.arc-card.arc-ok { border-left: 3px solid var(--green); }
.arc-card:not(.arc-ok) { border-left: 3px solid var(--ink-3); }
.arc-icon { font-size: 24px; flex-shrink: 0; line-height: 1; }
.arc-info { flex: 1; min-width: 0; }
.arc-name { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.arc-link { font-size: 12px; color: var(--primary); text-decoration: none; word-break: break-all; display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arc-link:hover { text-decoration: underline; }
.arc-status { flex-shrink: 0; }

/* ============ toast / 分页 ============ */
.backup-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 20px);
  background: rgba(30, 34, 44, .92); color: #fff; font-size: 13px;
  padding: 10px 18px; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s; z-index: 9999;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 22px 16px 14px; }
.pag-btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit; font-size: 13px; font-weight: 400;
  padding: 7px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink-2); cursor: pointer;
  transition: all .2s; user-select: none; line-height: 1.2; white-space: nowrap;
}
.pag-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pag-btn:active:not(:disabled) { transform: scale(.97); }
.pag-btn:disabled { opacity: .4; cursor: not-allowed; }
.pag-info {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 60px; padding: 7px 16px; font-size: 13px; font-weight: 500;
  color: var(--primary); background: var(--primary-subtle);
  border-radius: var(--radius-sm);
}

/* ============ 标签多选（法定代表人身份） ============ */
.tag-multi { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.tag-opt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 13px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--fg-2); font-size: 13px; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s; user-select: none;
}
.tag-opt:hover { border-color: var(--accent); color: var(--accent); }
.tag-opt.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 500; }
.mini-tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; background: rgba(93, 135, 255, .12); color: var(--accent); font-size: 11.5px; font-weight: 500; margin: 1px 2px 1px 0; }
.field-hint { margin: 4px 0 0; font-size: 12px; color: var(--fg-3); }
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

:root {
  --t-blue-bg: rgba(93, 135, 255, .12);  --t-blue-fg: #3b6cf5;  --t-blue-bd: rgba(93, 135, 255, .25);  --t-blue-dot: #3b6ff5;
  --t-green-bg: rgba(22, 163, 74, .12);  --t-green-fg: #0b8a4b; --t-green-bd: rgba(22, 163, 74, .25);  --t-green-dot: #12a05f;
  --t-amber-bg: rgba(232, 147, 12, .13); --t-amber-fg: #b26a08; --t-amber-bd: rgba(232, 147, 12, .3);  --t-amber-dot: #e08a12;
  --t-red-bg: rgba(229, 72, 77, .1);     --t-red-fg: #c0271f;  --t-red-bd: rgba(229, 72, 77, .25);    --t-red-dot: #e23b30;
}
html[data-theme="dark"] {
  --t-blue-fg: #9db8ff; --t-green-fg: #7fe0a8; --t-amber-fg: #fbd38d; --t-red-fg: #ff9b9d;
}
.wb-tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; font-size: 13px; font-weight: 500; line-height: 1.45; border: 1px solid transparent; white-space: nowrap; }
.wb-tag .dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; }
.wb-tag--sm { padding: 2px 9px; font-size: 11.5px; }
.wb-tag--blue  { background: var(--t-blue-bg);  color: var(--t-blue-fg);  border-color: var(--t-blue-bd); }
.wb-tag--blue  .dot { background: var(--t-blue-dot); }
.wb-tag--green { background: var(--t-green-bg); color: var(--t-green-fg); border-color: var(--t-green-bd); }
.wb-tag--green .dot { background: var(--t-green-dot); }
.wb-tag--amber { background: var(--t-amber-bg); color: var(--t-amber-fg); border-color: var(--t-amber-bd); }
.wb-tag--amber .dot { background: var(--t-amber-dot); }
.wb-tag--red   { background: var(--t-red-bg);   color: var(--t-red-fg);  border-color: var(--t-red-bd); }
.wb-tag--red   .dot { background: var(--t-red-dot); }
.tag-opt .dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; background: var(--t-blue-dot); }
.tag-opt[data-color="blue"]  .dot { background: var(--t-blue-dot); }
.tag-opt[data-color="green"] .dot { background: var(--t-green-dot); }
.tag-opt[data-color="amber"] .dot { background: var(--t-amber-dot); }
.tag-opt[data-color="red"]   .dot { background: var(--t-red-dot); }
.tag-opt[data-color="blue"].on  { background: var(--t-blue-bg);  color: var(--t-blue-fg);  border-color: var(--t-blue-bd); }
.tag-opt[data-color="green"].on { background: var(--t-green-bg); color: var(--t-green-fg); border-color: var(--t-green-bd); }
.tag-opt[data-color="amber"].on { background: var(--t-amber-bg); color: var(--t-amber-fg); border-color: var(--t-amber-bd); }
.tag-opt[data-color="red"].on   { background: var(--t-red-bg);   color: var(--t-red-fg);  border-color: var(--t-red-bd); }

/* ============ 主题切换 View Transition ============ */
html::view-transition-old(root) { animation: none; }
html::view-transition-new(root) { animation: clip .5s ease-in both; }
@keyframes clip {
  from { clip-path: circle(0% at var(--x) var(--y)); }
  to { clip-path: circle(var(--r) at var(--x) var(--y)); }
}

/* ============ 响应式 ============ */
@media (max-width: 1100px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .ui-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .ui-grid-3, .chk-grid-3, .form-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .login-page { flex-direction: column; }
  .login-left { min-height: 280px; padding: 30px; }
  .ll-art { width: 160px; height: 160px; }
  .ll-art i { font-size: 60px; }
  .login-left .ll-logo { position: static; margin-bottom: 24px; }
  .ll-text { margin-top: 16px; }
  .login-right { width: 100%; min-width: 0; }
}
@media (max-width: 720px) {
  .hamburger { display: inline-flex; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 1000;
    width: 240px; max-width: 84vw;
    transform: translateX(-100%); transition: transform .25s ease;
    box-shadow: var(--shadow-lg);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .sidebar-overlay { display: block; opacity: 1; pointer-events: auto; }
  body.side-collapsed .sidebar { width: 240px; }
  body.side-collapsed .brand-txt, body.side-collapsed .side-search,
  body.side-collapsed .nav-item span:not(.nav-ic):not(.nav-caret),
  body.side-collapsed .nav-subitem, body.side-collapsed .side-foot { display: revert; }
  .content { padding: 12px 14px 20px; }
  .ui-grid-4, .ui-grid-3, .chk-grid-3, .form-grid.cols-3 { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
}
