/* ==========================================================================
   业务支撑台账 — 界面样式
   ========================================================================== */
:root {
  --bg: #f2f5fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5fb;
  --line: #e6ebf3;
  --line-strong: #d7dfeb;
  --ink: #172033;
  --ink-2: #45536b;
  --muted: #7d8ba3;
  --brand: #2457f5;
  --brand-2: #4f7cff;
  --brand-soft: #edf2ff;
  --teal: #0e9f8a;
  --teal-soft: #e7f7f4;
  --green: #12a150;
  --green-soft: #e8f8ee;
  --amber: #d97706;
  --amber-soft: #fdf3e3;
  --red: #dc3545;
  --red-soft: #fdecee;
  --purple: #7c3aed;
  --purple-soft: #f3edff;
  --cyan: #0e7490;
  --cyan-soft: #e6f6fa;
  --sidebar-1: #0b1424;
  --sidebar-2: #14233c;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(23, 32, 51, .06);
  --shadow: 0 10px 30px rgba(23, 32, 51, .09);
  --shadow-lg: 0 24px 60px rgba(15, 26, 46, .22);
  --font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #c7d2e2; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #aebcd2; }
::-webkit-scrollbar-track { background: transparent; }

/* --------------------------------------------------------------------------
   登录页
   -------------------------------------------------------------------------- */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(900px 500px at 8% 0%, rgba(79, 124, 255, .28), transparent 60%),
    radial-gradient(800px 500px at 100% 100%, rgba(14, 159, 138, .18), transparent 55%),
    linear-gradient(135deg, #08111f 0%, #10203a 55%, #0c2233 100%);
  position: relative;
  overflow: hidden;
}
.login-page::before,
.login-page::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .07);
  pointer-events: none;
}
.login-page::before { width: 780px; height: 780px; right: -260px; top: -320px; }
.login-page::after { width: 560px; height: 560px; left: -220px; bottom: -260px; }
.login-shell {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  min-height: 560px;
  display: grid;
  grid-template-columns: 1.06fr .94fr;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .45);
  background: var(--surface);
}
.login-brand {
  position: relative;
  padding: 48px 46px;
  color: #eaf0ff;
  background:
    radial-gradient(600px 300px at 80% 10%, rgba(79, 124, 255, .35), transparent 65%),
    linear-gradient(160deg, #101e38 0%, #0b1730 55%, #0a2230 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.login-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 30% 30%, #000 10%, transparent 78%);
  pointer-events: none;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.brand-logo {
  width: 46px; height: 46px;
  border-radius: 13px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, #4f7cff, #2b5cff 55%, #0e9f8a);
  box-shadow: 0 10px 26px rgba(43, 92, 255, .45);
  color: #fff;
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -.5px;
}
.brand-name { font-size: 21px; font-weight: 700; letter-spacing: .5px; }
.brand-sub { font-size: 12px; color: #94a7c8; letter-spacing: 2.6px; margin-top: 3px; }
.login-hero { position: relative; z-index: 1; margin-top: auto; padding-top: 60px; }
.login-hero h1 {
  font-size: 30px;
  line-height: 1.42;
  margin: 0 0 16px;
  font-weight: 700;
  letter-spacing: .5px;
}
.login-hero h1 em { font-style: normal; color: #7ea2ff; }
.login-hero p { color: #9db0cf; line-height: 1.9; font-size: 13.5px; margin: 0 0 26px; max-width: 390px; }
.login-points { display: grid; gap: 13px; }
.login-point { display: flex; gap: 11px; align-items: flex-start; font-size: 13px; color: #c3d2ea; }
.login-point .dot {
  width: 22px; height: 22px; flex: 0 0 22px;
  border-radius: 7px;
  display: grid; place-items: center;
  background: rgba(79, 124, 255, .18);
  border: 1px solid rgba(126, 162, 255, .32);
  color: #8fb0ff;
}
.login-point svg { width: 12px; height: 12px; }
.login-foot { position: relative; z-index: 1; margin-top: 34px; font-size: 11.5px; color: #64789c; letter-spacing: .3px; }

.login-form-wrap { padding: 52px 54px; display: flex; flex-direction: column; justify-content: center; }
.login-title { font-size: 25px; font-weight: 700; margin: 0 0 8px; }
.login-desc { color: var(--muted); font-size: 13px; margin: 0 0 32px; }
.form-field { margin-bottom: 18px; }
.form-field > label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 8px; font-weight: 600; }
.input-wrap { position: relative; }
.input-wrap > svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: #95a3b8; pointer-events: none;
}
.input-wrap .input { padding-left: 40px; height: 46px; }
.login-error {
  display: none;
  background: var(--red-soft);
  color: #b02a37;
  border: 1px solid #f6c9ce;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 12.5px;
  margin-bottom: 16px;
  line-height: 1.6;
}
.login-error.show { display: block; }
.login-btn { width: 100%; height: 46px; font-size: 15px; margin-top: 6px; }
.login-hint {
  margin-top: 26px; padding-top: 18px; border-top: 1px dashed var(--line);
  font-size: 12px; color: var(--muted); line-height: 1.8;
}
.login-hint b { color: var(--ink-2); font-weight: 600; }
.remember-line { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 18px; font-size: 12.5px; color: var(--muted); }
.checkbox { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; user-select: none; }
.checkbox input { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }

/* --------------------------------------------------------------------------
   应用骨架
   -------------------------------------------------------------------------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 252px;
  flex: 0 0 252px;
  background: linear-gradient(180deg, var(--sidebar-1), var(--sidebar-2));
  color: #c6d3e8;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  border-right: 1px solid rgba(255, 255, 255, .04);
}
.sidebar-brand {
  height: 74px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  flex: 0 0 auto;
}
.sidebar-brand .brand-logo { width: 38px; height: 38px; border-radius: 11px; font-size: 17px; box-shadow: none; }
.sidebar-brand .brand-name { font-size: 16px; color: #f2f6ff; letter-spacing: .4px; }
.sidebar-brand .brand-sub { font-size: 9.5px; letter-spacing: 1.6px; color: #7f93b5; margin-top: 2px; }

.sidebar-scroll { flex: 1; overflow-y: auto; padding: 16px 12px 10px; }
.nav-group { margin-bottom: 20px; }
.nav-label {
  font-size: 10.5px; letter-spacing: 2px; color: #61748f; padding: 0 12px; margin-bottom: 7px;
  text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  height: 42px; padding: 0 12px; border-radius: 10px;
  color: #b7c6de; font-size: 13.5px; cursor: pointer;
  margin-bottom: 3px; transition: background .16s, color .16s;
  position: relative;
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.nav-item.active { background: linear-gradient(90deg, rgba(79, 124, 255, .22), rgba(79, 124, 255, .08)); color: #fff; }
.nav-item.active::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px;
  border-radius: 0 3px 3px 0; background: #6d94ff;
}
.nav-item svg { width: 18px; height: 18px; flex: 0 0 18px; opacity: .9; }
.nav-item .nav-badge {
  margin-left: auto; font-size: 10.5px; padding: 1px 7px; border-radius: 20px;
  background: rgba(79, 124, 255, .22); color: #a9c0ff;
}
.sidebar-foot {
  border-top: 1px solid rgba(255, 255, 255, .06);
  padding: 14px 16px;
  flex: 0 0 auto;
}
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, #3f6cff, #2950d8);
  color: #fff; font-size: 13px; font-weight: 700;
  flex: 0 0 36px;
}
.sidebar-user .u-name { color: #edf3ff; font-size: 13px; font-weight: 600; line-height: 1.3; }
.sidebar-user .u-role { color: #7f93b5; font-size: 11px; margin-top: 2px; }

.main { flex: 1; margin-left: 252px; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 68px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 18px;
  padding: 0 28px;
  position: sticky; top: 0; z-index: 30;
}
.topbar-title { font-size: 18px; font-weight: 700; letter-spacing: .2px; }
.topbar-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar-divider { width: 1px; height: 24px; background: var(--line); }
.date-chip { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); display: grid; place-items: center; cursor: pointer;
  transition: .15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--brand); }
.icon-btn svg { width: 17px; height: 17px; }
.user-chip {
  display: flex; align-items: center; gap: 9px; padding: 5px 10px 5px 5px;
  border-radius: 12px; cursor: pointer; border: 1px solid transparent;
}
.user-chip:hover { background: var(--surface-3); }
.user-chip .avatar { width: 32px; height: 32px; flex: 0 0 32px; font-size: 12px; border-radius: 9px; }
.user-chip .u-name { font-size: 13px; font-weight: 600; }
.user-chip .u-role { font-size: 10.5px; color: var(--muted); }
.user-chip svg { width: 14px; height: 14px; color: var(--muted); }

.content { padding: 24px 28px 44px; width: 100%; margin: 0; }

/* --------------------------------------------------------------------------
   通用组件
   -------------------------------------------------------------------------- */
.page-head { display: flex; align-items: flex-end; gap: 18px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; margin: 0; letter-spacing: .2px; }
.page-head .sub { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.page-head > .sub { padding-bottom: 8px; }
.page-head > .sub b { color: var(--ink); }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 15px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink-2);
  font-size: 13px; font-weight: 600; cursor: pointer; transition: .15s; white-space: nowrap;
  text-decoration: none;
}
.btn:hover { border-color: #b9c6da; background: var(--surface-2); color: var(--ink); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: linear-gradient(135deg, var(--brand), #1e46d8); border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(36, 87, 245, .24); }
.btn.primary:hover { background: linear-gradient(135deg, #3a6bff, #2450e0); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: rgba(36, 87, 245, .08); color: var(--brand); }
.btn.danger { color: var(--red); border-color: #f2c4ca; background: #fff; }
.btn.danger:hover { background: var(--red-soft); }
.btn.soft { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.btn.soft:hover { background: #e2eaff; }
.btn.sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn.sm svg { width: 14px; height: 14px; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-head { display: flex; align-items: center; gap: 12px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.card-head h3 { margin: 0; font-size: 14.5px; font-weight: 700; }
.card-head .sub { font-size: 12px; color: var(--muted); }
.card-head .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 20px; }
.card-body.tight { padding: 14px 16px; }

.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line-strong); background: #fff; color: var(--ink);
  border-radius: 9px; padding: 0 12px; height: 38px; font-size: 13px; font-family: inherit;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.input::placeholder, .textarea::placeholder { color: #a3b0c4; }
.input:focus, .select:focus, .textarea:focus { border-color: #8fabff; box-shadow: 0 0 0 3px rgba(36, 87, 245, .12); }
.select { cursor: pointer; padding-right: 30px; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237d8ba3' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
.textarea { height: auto; min-height: 96px; padding: 10px 12px; line-height: 1.75; resize: vertical; }
.input.sm, .select.sm { height: 34px; font-size: 12.5px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.field > label .req { color: var(--red); margin-left: 2px; }
.field .hint { font-size: 11.5px; color: var(--muted); }

.search-box { position: relative; min-width: 240px; }
.search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: #98a6bb; }
.search-box .input { padding-left: 36px; }

.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.toolbar .spacer { flex: 1; }
.toolbar .select { width: auto; min-width: 116px; }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 23px; padding: 0 9px; border-radius: 20px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: var(--surface-3); color: var(--ink-2);
}
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .85; }
.pill.green { background: var(--green-soft); color: #0b7a3c; }
.pill.teal { background: var(--teal-soft); color: #08796a; }
.pill.blue { background: var(--brand-soft); color: #1d45c8; }
.pill.purple { background: var(--purple-soft); color: #6d28d9; }
.pill.amber { background: var(--amber-soft); color: #a15c05; }
.pill.red { background: var(--red-soft); color: #b32d3b; }
.pill.gray { background: #f0f2f6; color: #69788f; }
.pill.cyan { background: var(--cyan-soft); color: #0b6279; }

.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 6px; background: var(--surface-3); color: var(--muted); font-size: 11px;
}

/* 表格 */
.table-wrap { overflow-x: auto; }
table.ty {
  width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px;
}
table.ty thead th {
  background: #f8fafd; color: var(--muted); font-weight: 600; font-size: 11.5px;
  text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line);
  white-space: nowrap; letter-spacing: .3px; position: sticky; top: 0; z-index: 2;
}
table.ty tbody td { padding: 12px 14px; border-bottom: 1px solid #eef2f8; vertical-align: middle; }
table.ty tbody tr { transition: background .12s; cursor: pointer; }
table.ty tbody tr:hover { background: #f7faff; }
table.ty tbody tr:last-child td { border-bottom: none; }
table.ty td.num, table.ty th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.ty .cell-title { font-weight: 600; color: var(--ink); line-height: 1.5; }
table.ty .cell-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
table.ty .row-actions { display: flex; gap: 4px; justify-content: flex-end; }
table.ty .row-actions .btn { padding: 0 8px; height: 28px; font-size: 12px; border-color: transparent; background: transparent; }
table.ty .row-actions .btn:hover { background: var(--brand-soft); color: var(--brand); }
table.ty .row-actions .btn.danger:hover { background: var(--red-soft); color: var(--red); }
.checkbox-col { width: 40px; }
.checkbox-col input { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }

.batch-bar {
  display: flex; align-items: center; gap: 12px;
  background: var(--brand-soft); border-bottom: 1px solid #dbe5ff;
  padding: 10px 16px; font-size: 12.5px; color: #1d45c8;
}
.batch-bar b { font-weight: 700; }

.pagination { display: flex; align-items: center; gap: 6px; padding: 14px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pagination .info { font-size: 12px; color: var(--muted); margin-right: auto; }
.page-btn {
  min-width: 32px; height: 32px; padding: 0 8px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  font-size: 12.5px; cursor: pointer;
}
.page-btn:hover:not(:disabled) { border-color: #b7c6e2; color: var(--brand); }
.page-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.page-btn:disabled { opacity: .45; cursor: not-allowed; }

.empty { padding: 56px 20px; text-align: center; color: var(--muted); }
.empty .empty-icon {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 18px;
  display: grid; place-items: center; background: var(--surface-3); color: #9aa9c0;
}
.empty .empty-icon svg { width: 26px; height: 26px; }
.empty h4 { margin: 0 0 6px; color: var(--ink-2); font-size: 14px; }
.empty p { margin: 0; font-size: 12.5px; }

/* 工作台 */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.kpi {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow-sm);
}
.kpi::after {
  content: ""; position: absolute; right: -30px; top: -40px; width: 130px; height: 130px;
  border-radius: 50%; background: var(--brand-soft); opacity: .55;
}
.kpi .kpi-icon {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); margin-bottom: 14px;
}
.kpi .kpi-icon svg { width: 20px; height: 20px; }
.kpi .kpi-label { font-size: 12.5px; color: var(--muted); }
.kpi .kpi-value { font-size: 28px; font-weight: 700; letter-spacing: -.5px; margin: 5px 0 4px; font-variant-numeric: tabular-nums; }
.kpi .kpi-value small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.kpi .kpi-foot { font-size: 11.5px; color: var(--muted); }
.kpi.green .kpi-icon { background: var(--green-soft); color: var(--green); }
.kpi.green::after { background: var(--green-soft); }
.kpi.amber .kpi-icon { background: var(--amber-soft); color: var(--amber); }
.kpi.amber::after { background: var(--amber-soft); }
.kpi.purple .kpi-icon { background: var(--purple-soft); color: var(--purple); }
.kpi.purple::after { background: var(--purple-soft); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.grid-3 { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.chart-card .card-body { padding: 18px 20px 20px; }
.bar-list { display: flex; flex-direction: column; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 96px 1fr 44px; align-items: center; gap: 12px; font-size: 12.5px; }
.bar-row .b-label { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 8px; background: #eef2f8; border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, #4f7cff, #2457f5); transition: width .5s ease; }
.bar-row .b-value { text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; font-weight: 600; }

.donut-wrap { display: flex; align-items: center; gap: 24px; }
.donut { width: 150px; height: 150px; border-radius: 50%; position: relative; flex: 0 0 150px; }
.donut::after {
  content: ""; position: absolute; inset: 27px; border-radius: 50%; background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}
.donut-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; z-index: 1; }
.donut-center b { font-size: 21px; display: block; line-height: 1.2; }
.donut-center span { font-size: 11px; color: var(--muted); }
.legend { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.legend-row { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--ink-2); }
.legend-dot { width: 9px; height: 9px; border-radius: 3px; flex: 0 0 9px; }
.legend-row b { margin-left: auto; font-variant-numeric: tabular-nums; }

.month-chart { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding-top: 8px; }
.month-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.month-col .m-bar { width: 100%; max-width: 30px; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #6d94ff, #2f5cf0); min-height: 2px; transition: height .5s; }
.month-col .m-label { font-size: 10px; color: var(--muted); }
.month-col .m-value { font-size: 10px; color: var(--ink-2); font-weight: 600; }

.recent-list { display: flex; flex-direction: column; }
.recent-item { display: flex; align-items: center; gap: 12px; padding: 11px 20px; border-bottom: 1px solid #eef2f8; cursor: pointer; }
.recent-item:last-child { border-bottom: none; }
.recent-item:hover { background: #f8faff; }
.recent-item .r-icon {
  width: 32px; height: 32px; border-radius: 9px; background: var(--brand-soft);
  color: var(--brand); display: grid; place-items: center; flex: 0 0 32px;
}
.recent-item .r-icon svg { width: 15px; height: 15px; }
.recent-item .r-main { min-width: 0; flex: 1; }
.recent-item .r-title { font-size: 12.5px; font-weight: 600; }
.recent-item .r-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.recent-item .r-time { font-size: 11px; color: var(--muted); white-space: nowrap; }

.section-title { display: flex; align-items: center; gap: 10px; margin: 22px 0 14px; }
.section-title h3 { margin: 0; font-size: 15px; }
.section-title .line { flex: 1; height: 1px; background: var(--line); }

/* 详情抽屉 */
.drawer-mask {
  position: fixed; inset: 0; background: rgba(12, 22, 38, .42); z-index: 80;
  backdrop-filter: blur(2px); animation: fadeIn .18s ease;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(720px, 94vw);
  background: #fff; z-index: 81; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); animation: slideIn .22s ease;
}
.drawer-head { padding: 22px 26px 18px; border-bottom: 1px solid var(--line); }
.drawer-head .d-top { display: flex; align-items: flex-start; gap: 14px; }
.drawer-head h2 { margin: 0; font-size: 19px; line-height: 1.45; flex: 1; }
.drawer-head .d-sub { font-size: 12.5px; color: var(--muted); margin-top: 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.drawer-head .d-sub svg { width: 14px; height: 14px; flex: 0 0 14px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 26px 30px; }
.drawer-foot { padding: 14px 26px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; background: #fbfcfe; }
.detail-section { margin-top: 22px; }
.detail-section h4 {
  font-size: 12px; color: var(--brand); letter-spacing: 1.2px; margin: 0 0 12px;
  display: flex; align-items: center; gap: 8px;
}
.detail-section h4::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.detail-item { background: #fff; padding: 11px 14px; min-height: 54px; box-shadow: inset -1px -1px 0 var(--line); }
.detail-item.full { grid-column: 1 / -1; }
.detail-item.filler { background: #fff; }
.detail-item .d-label { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.detail-item .d-value { font-size: 13px; line-height: 1.65; word-break: break-word; white-space: pre-wrap; }
.detail-item .d-value.empty-value { color: #b2bdd0; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(12, 22, 38, .45); z-index: 90;
  display: flex; align-items: flex-start; justify-content: center; padding: 6vh 20px 30px;
  overflow-y: auto; animation: fadeIn .16s ease; backdrop-filter: blur(2px);
}
.modal {
  width: 560px; max-width: 100%; background: #fff; border-radius: 16px;
  box-shadow: var(--shadow-lg); animation: popIn .18s ease; display: flex; flex-direction: column;
  max-height: 88vh;
}
.modal.lg { width: 880px; }
.modal.xl { width: 1040px; }
.modal-head { padding: 20px 24px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.modal-head h3 { margin: 0; font-size: 16.5px; }
.modal-head .sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.modal-head .close { margin-left: auto; }
.modal-body { padding: 22px 24px; overflow-y: auto; flex: 1; }
.modal-foot { padding: 14px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; background: #fbfcfe; border-radius: 0 0 16px 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section { margin-bottom: 22px; }
.form-section-title {
  font-size: 12px; color: var(--brand); font-weight: 700; letter-spacing: 1px;
  margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.form-section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.form-grid .usage-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.form-grid .usage-grid .field > label { font-size: 11px; }
.confirm-text { font-size: 13.5px; line-height: 1.8; color: var(--ink-2); }
.confirm-text b { color: var(--ink); }

/* 提示 */
#toast-root { position: fixed; top: 84px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: flex-start; gap: 10px; min-width: 260px; max-width: 420px;
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand);
  border-radius: 11px; padding: 12px 15px; box-shadow: var(--shadow); font-size: 13px;
  animation: slideDown .2s ease; color: var(--ink-2);
}
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast.warn { border-left-color: var(--amber); }
.toast svg { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 1px; }
.toast.success svg { color: var(--green); }
.toast.error svg { color: var(--red); }
.toast.warn svg { color: var(--amber); }

/* 问题库 */
.faq-layout { display: grid; grid-template-columns: 226px 1fr; gap: 18px; align-items: start; }
.faq-cats { padding: 10px; }
.cat-item {
  display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 9px;
  font-size: 13px; color: var(--ink-2); cursor: pointer; margin-bottom: 2px;
}
.cat-item:hover { background: var(--surface-3); }
.cat-item svg { width: 17px; height: 17px; flex: 0 0 17px; }
.cat-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.cat-item .count { margin-left: auto; font-size: 11px; color: var(--muted); background: #eef2f8; padding: 1px 7px; border-radius: 20px; }
.cat-item.active .count { background: #dfe9ff; color: var(--brand); }
.faq-item { padding: 18px 22px; border-bottom: 1px solid #eef2f8; cursor: pointer; transition: background .14s; }
.faq-item:last-child { border-bottom: none; }
.faq-item:hover { background: #f8faff; }
.faq-item .f-top { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; flex-wrap: wrap; }
.faq-item h4 { margin: 0; font-size: 14.5px; line-height: 1.55; font-weight: 600; }
.faq-item .f-excerpt {
  font-size: 12.5px; color: var(--muted); line-height: 1.8; margin: 7px 0 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.faq-item .f-meta { display: flex; align-items: center; gap: 16px; font-size: 11.5px; color: var(--muted); }
.faq-item .f-meta span { display: inline-flex; align-items: center; gap: 5px; }
.faq-item .f-meta svg { width: 13px; height: 13px; }
.faq-answer { font-size: 13.5px; line-height: 2; color: var(--ink-2); white-space: pre-wrap; }
.faq-answer-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.faq-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 14px; }

/* 导入导出 */
.transfer-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; align-items: start; }
.dropzone {
  border: 2px dashed #cdd9ec; border-radius: 14px; padding: 34px 22px; text-align: center;
  background: #fbfcff; transition: .16s; cursor: pointer;
}
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--brand-soft); }
.dropzone .dz-icon {
  width: 54px; height: 54px; border-radius: 16px; margin: 0 auto 13px;
  background: var(--brand-soft); color: var(--brand); display: grid; place-items: center;
}
.dropzone .dz-icon svg { width: 25px; height: 25px; }
.dropzone h4 { margin: 0 0 6px; font-size: 14px; }
.dropzone p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.7; }
.file-chip {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface-2); margin-top: 14px; font-size: 12.5px;
}
.file-chip svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--brand); }
.file-chip .fname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.file-chip .fsize { color: var(--muted); font-size: 11.5px; margin-left: auto; white-space: nowrap; }
.radio-row { display: flex; gap: 12px; flex-wrap: wrap; }
.radio-card {
  flex: 1; min-width: 190px; border: 1px solid var(--line-strong); border-radius: 11px;
  padding: 13px 15px; cursor: pointer; transition: .15s; background: #fff;
}
.radio-card:hover { border-color: #a9bcf0; }
.radio-card.active { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 2px rgba(36, 87, 245, .1); }
.radio-card .rc-title { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.radio-card .rc-title svg { width: 17px; height: 17px; flex: 0 0 17px; }
.radio-card .rc-desc { font-size: 11.5px; color: var(--muted); margin-top: 5px; line-height: 1.6; }
.import-result { margin-top: 16px; }
.result-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.result-stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; text-align: center; }
.result-stat b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.result-stat span { font-size: 11.5px; color: var(--muted); }
.result-stat.green b { color: var(--green); }
.result-stat.blue b { color: var(--brand); }
.result-stat.amber b { color: var(--amber); }
.alert { padding: 11px 14px; border-radius: 9px; font-size: 12.5px; line-height: 1.7; border: 1px solid transparent; }
.alert.info { background: var(--brand-soft); color: #1d45c8; border-color: #d9e4ff; }
.alert.warn { background: var(--amber-soft); color: #95560a; border-color: #f3ddb9; }
.alert.danger { background: var(--red-soft); color: #a82b38; border-color: #f5cbd0; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }

/* 角色 */
.role-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.role-card { padding: 20px; display: flex; flex-direction: column; }
.role-card .r-head { display: flex; align-items: flex-start; gap: 12px; }
.role-card .r-ico {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); flex: 0 0 40px;
}
.role-card .r-ico svg { width: 19px; height: 19px; }
.role-card h4 { margin: 0; font-size: 15px; }
.role-card .r-code { font-size: 11px; color: var(--muted); margin-top: 3px; }
.role-card .r-desc { font-size: 12.5px; color: var(--muted); line-height: 1.75; margin: 14px 0; min-height: 44px; }
.role-card .r-meta { display: flex; gap: 16px; font-size: 12px; color: var(--ink-2); border-top: 1px dashed var(--line); padding-top: 14px; }
.role-card .r-meta b { font-size: 15px; margin-right: 3px; }
.role-card .r-actions { display: flex; gap: 8px; margin-top: 14px; }
.perm-groups { display: grid; gap: 16px; }
.perm-group { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.perm-group-head { padding: 9px 14px; background: var(--surface-2); display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; }
.perm-group-head label { margin-left: auto; font-weight: 400; font-size: 12px; color: var(--muted); }
.perm-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 6px 14px 12px; }
.perm-list .checkbox { padding: 6px 0; font-size: 12.5px; }

/* 日志 */
.log-action { font-size: 11.5px; }
.detail-text { max-width: 460px; font-size: 12.5px; line-height: 1.6; }

/* 个人中心 */
.profile-grid { display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start; }
.profile-card { text-align: center; padding: 30px 22px; }
.profile-card .avatar { width: 72px; height: 72px; font-size: 25px; border-radius: 22px; margin: 0 auto 14px; }
.profile-card h3 { margin: 0 0 4px; font-size: 17px; }
.profile-card .p-role { font-size: 12px; color: var(--muted); }
.profile-card .p-rows { margin-top: 22px; border-top: 1px dashed var(--line); padding-top: 18px; display: grid; gap: 12px; text-align: left; }
.profile-card .p-row { display: flex; justify-content: space-between; font-size: 12.5px; gap: 10px; }
.profile-card .p-row span:first-child { color: var(--muted); }

/* 403 */
.forbidden { padding: 80px 20px; text-align: center; }
.forbidden svg { width: 52px; height: 52px; color: #b9c5d6; margin-bottom: 16px; }
.forbidden h3 { margin: 0 0 8px; font-size: 18px; }
.forbidden p { color: var(--muted); font-size: 13px; }

/* 动画 */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { transform: translateX(30px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes popIn { from { transform: translateY(10px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slideDown { from { transform: translateY(-10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* 响应式 */
@media (max-width: 1280px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .role-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1080px) {
  .sidebar { width: 76px; flex-basis: 76px; }
  .sidebar-brand { justify-content: center; padding: 0; }
  .sidebar-brand .brand-text, .sidebar-user .u-name, .sidebar-user .u-role { display: none; }
  .sidebar-scroll { padding: 14px 10px; }
  .nav-label { display: none; }
  .nav-item { justify-content: center; padding: 0; font-size: 0; }
  .nav-item svg { width: 20px; height: 20px; }
  .nav-item .nav-badge { display: none; }
  .sidebar-user { justify-content: center; }
  .main { margin-left: 76px; }
  .content { padding: 20px; }
  .topbar { padding: 0 20px; }
  .grid-2, .grid-3, .transfer-grid, .faq-layout, .profile-grid { grid-template-columns: 1fr; }
  .faq-cats { display: flex; gap: 4px; overflow-x: auto; }
  .faq-cats .cat-item { white-space: nowrap; }
}
@media (max-width: 720px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .kpi-grid { grid-template-columns: 1fr; }
  .role-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .content { padding: 16px 12px 30px; }
  .topbar-sub, .date-chip { display: none; }
  .modal { max-height: 94vh; }
}

/* 用户下拉菜单 */
.user-menu {
  position: fixed; width: 230px; background: #fff; border: 1px solid var(--line);
  border-radius: 13px; box-shadow: var(--shadow-lg); z-index: 60; padding: 8px;
  animation: popIn .15s ease;
}
.user-menu .um-head { display: flex; align-items: center; gap: 10px; padding: 9px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.user-menu .um-head .avatar { width: 36px; height: 36px; font-size: 13px; }
.user-menu .um-name { font-size: 13px; font-weight: 600; }
.user-menu .um-role { font-size: 11px; color: var(--muted); margin-top: 2px; }
.user-menu button {
  display: flex; align-items: center; gap: 9px; width: 100%; height: 38px; padding: 0 10px;
  border: none; background: transparent; border-radius: 8px; font-size: 13px; color: var(--ink-2);
  cursor: pointer; text-align: left;
}
.user-menu button:hover { background: var(--surface-3); }
.user-menu button.danger { color: var(--red); }
.user-menu button.danger:hover { background: var(--red-soft); }
.user-menu svg { width: 16px; height: 16px; }

.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.row-actions .btn svg { width: 15px; height: 15px; }


/* 台账宽表 */
.toolbar-end { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.view-toggle {
  display: inline-flex; height: 34px; border: 1px solid var(--line-strong);
  border-radius: 9px; overflow: hidden; background: #fff; flex: 0 0 auto;
}
.view-toggle button {
  border: 0; background: transparent; padding: 0 13px; font-size: 12.5px;
  color: var(--muted); cursor: pointer; font-weight: 600;
}
.view-toggle button:hover { color: var(--brand); background: var(--brand-soft); }
.view-toggle button.active { background: var(--brand); color: #fff; }
.view-toggle button + button { border-left: 1px solid var(--line); }
.view-toggle button.active + button { border-left-color: transparent; }

.wide-wrap {
  overflow: auto;
  max-height: calc(100vh - 292px);
  position: relative;
  border-bottom: 1px solid var(--line);
}
table.wide-table {
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
}
table.wide-table th,
table.wide-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #eef2f8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
table.wide-table thead th {
  position: sticky; top: 0; z-index: 3;
  background: #f8fafd; height: 42px;
  font-size: 11px; color: var(--muted); font-weight: 600;
  letter-spacing: .2px;
}
table.wide-table tbody td { background: #fff; height: 40px; }
table.wide-table tbody tr:hover td { background: #f7faff; }
table.wide-table tbody tr:last-child td { border-bottom: none; }

table.wide-table th.sticky-1,
table.wide-table td.sticky-1 { position: sticky; left: 0; z-index: 5; }
table.wide-table th.sticky-2,
table.wide-table td.sticky-2 { position: sticky; left: 62px; z-index: 5; }
table.wide-table th.sticky-3,
table.wide-table td.sticky-3 { position: sticky; left: 106px; z-index: 5; }
table.wide-table th.sticky-1,
table.wide-table th.sticky-2,
table.wide-table th.sticky-3 { z-index: 8; }
table.wide-table td.sticky-1,
table.wide-table td.sticky-2,
table.wide-table td.sticky-3 { background: #fff; }
table.wide-table.selectable th.sticky-2,
table.wide-table.selectable td.sticky-2 { left: 44px; }
table.wide-table td.sticky-edge { border-right: 1px solid #e7edf7; }
table.wide-table th.sticky-edge { border-right: 1px solid #e7edf7; }
table.wide-table th.sticky-1 { box-shadow: inset 0 2px 0 #2457f5; }
table.wide-table th.sticky-2 { box-shadow: inset 0 2px 0 #2457f5, 9px 0 12px -8px rgba(23, 32, 51, .28); }
table.wide-table .checkbox-col { width: 44px; min-width: 44px; max-width: 44px; padding: 0; text-align: center; }
table.wide-table .checkbox-col input { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }

table.wide-table th.sticky-r,
table.wide-table td.sticky-r {
  position: sticky; right: 0; z-index: 6; background: #fff;
  box-shadow: -8px 0 10px -9px rgba(23, 32, 51, .22);
}
table.wide-table th.sticky-r { background: #f8fafd; z-index: 9; }
table.wide-table th.sticky-r { box-shadow: -8px 0 10px -9px rgba(23, 32, 51, .22), inset 0 2px 0 #94a3b8; }

table.wide-table th[data-group="基础信息"] { box-shadow: inset 0 2px 0 #2457f5; }
table.wide-table th[data-group="客户与负责人"] { box-shadow: inset 0 2px 0 #0e9f8a; }
table.wide-table th[data-group="短信资源"] { box-shadow: inset 0 2px 0 #7c3aed; }
table.wide-table th[data-group="转化与回款"] { box-shadow: inset 0 2px 0 #d97706; }
table.wide-table th[data-group="使用量"] { box-shadow: inset 0 2px 0 #64748b; }

table.wide-table th.sticky-edge[data-group] {
  box-shadow: inset 0 2px 0 #2457f5, 9px 0 12px -8px rgba(23, 32, 51, .28);
}
table.wide-table.selectable th.sticky-2[data-group] { box-shadow: inset 0 2px 0 #2457f5; }
table.wide-table th.checkbox-col { box-shadow: inset 0 2px 0 #94a3b8; }
table.wide-table tbody tr.selected td { background: #eef4ff; }
table.wide-table tbody tr.selected td.sticky-1,
table.wide-table tbody tr.selected td.sticky-2,
table.wide-table tbody tr.selected td.sticky-3 { background: #e8f0ff; }
table.ty tbody tr.selected td { background: #eef4ff; }

.wide-title { display: block; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.wide-text { display: block; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.wide-empty { color: #bcc7d7; }
.wide-flag.ok { color: #0b7a3c; font-weight: 700; }
.wide-flag.no { color: #97a3b6; }
.wide-tip {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 16px; font-size: 11.5px; color: var(--muted);
  background: #fbfcff; border-bottom: 1px solid var(--line);
}
.wide-tip svg { width: 14px; height: 14px; flex: 0 0 14px; }
@media (max-width: 1080px) {
  .wide-wrap { max-height: calc(100vh - 260px); }
}


/* 销售品类型多选 */
.multi-select {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fbfcff;
}
.ms-options { display: flex; flex-wrap: wrap; gap: 8px; }
.ms-chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 12px; border-radius: 20px;
  border: 1px solid var(--line-strong); background: #fff;
  font-size: 12.5px; color: var(--ink-2); cursor: pointer; user-select: none;
  transition: border-color .15s, background .15s, color .15s;
}
.ms-chip:hover { border-color: #a9bcf0; }
.ms-chip input { width: 14px; height: 14px; accent-color: var(--brand); cursor: pointer; }
.ms-chip:has(input:checked) {
  border-color: var(--brand); background: var(--brand-soft);
  color: var(--brand); font-weight: 600;
}
.ms-custom { display: flex; gap: 8px; margin-top: 12px; max-width: 460px; }
.ms-custom .input { height: 34px; }
.ms-custom .btn { flex: 0 0 auto; }
.ms-inline { display: inline-flex; align-items: center; gap: 4px; }
.ms-inline .tag { height: 20px; font-size: 10.5px; padding: 0 7px; background: var(--brand-soft); color: var(--brand); }
.tag-values { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-values .tag { height: 22px; background: var(--brand-soft); color: var(--brand); font-size: 11px; }


/* 收藏 */
.btn.fav { color: #9aa7bb; border-color: transparent; background: transparent; }
.btn.fav svg { fill: none; stroke: currentColor; transition: fill .15s, color .15s; }
.btn.fav:hover { color: #d97706; background: #fff7e6; }
.btn.fav.active { color: #f59e0b; background: #fff7e6; }
.btn.fav.active svg { fill: #f59e0b; stroke: #f59e0b; }
.row-actions .btn.fav.active { background: #fff7e6; }
table.wide-table .row-actions .btn { width: 26px; padding: 0; }
table.wide-table .row-actions { gap: 4px; }
