/* ============================================================
   云创律科 · 法律行业数据看板 + CRM 权限管控系统
   全局深色科技风样式(登录 / 管理后台 / 全屏大屏共用)
   ============================================================ */
:root {
  --bg: #060b1d;
  --bg2: #0a1230;
  --bg3: #0e1a3f;
  --card: rgba(15, 26, 60, 0.68);
  --card-solid: #0d1740;
  --line: rgba(120, 180, 255, 0.16);
  --line-strong: rgba(0, 216, 255, 0.45);
  --cyan: #00d8ff;
  --cyan-dim: rgba(0, 216, 255, 0.12);
  --gold: #ffd166;
  --green: #2ee6a8;
  --red: #ff5d73;
  --purple: #8b7cff;
  --orange: #ff9f43;
  --text: #dce7ff;
  --text-2: #9fb0d8;
  --muted: #6b7da6;
  --radius: 10px;
  --shadow: 0 8px 30px rgba(2, 8, 30, 0.55);
  --font: "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, sans-serif;
  --mono: "Consolas", "Courier New", monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(0, 216, 255, 0.08), transparent 60%),
    radial-gradient(1000px 500px at 110% 10%, rgba(139, 124, 255, 0.07), transparent 55%),
    var(--bg);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(120, 180, 255, 0.22); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 216, 255, 0.4); }

a { color: var(--cyan); text-decoration: none; }

/* ---------------- 表单控件 ---------------- */
input, select, textarea {
  width: 100%;
  background: rgba(8, 16, 44, 0.85);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(0, 216, 255, 0.12);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
select option { background: #0d1740; }
textarea { resize: vertical; min-height: 64px; }
label.field { display: block; margin-bottom: 10px; }
label.field > span {
  display: block; font-size: 12px; color: var(--text-2); margin-bottom: 5px;
}
label.field > span i { color: var(--red); font-style: normal; margin-left: 2px; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: rgba(120, 180, 255, 0.07);
  color: var(--text); padding: 8px 16px; border-radius: 8px; cursor: pointer;
  font-size: 13px; font-family: var(--font); transition: all 0.18s; white-space: nowrap;
}
.btn:hover { border-color: var(--line-strong); background: rgba(0, 216, 255, 0.1); color: #fff; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, #00c8f0, #0090ff);
  border: none; color: #04122e; font-weight: 600;
  box-shadow: 0 4px 18px rgba(0, 150, 255, 0.35);
}
.btn-primary:hover { background: linear-gradient(135deg, #0fd8ff, #1899ff); color: #04122e; }
.btn-gold {
  background: linear-gradient(135deg, #ffc24d, #ff9f43);
  border: none; color: #341a00; font-weight: 600;
  box-shadow: 0 4px 18px rgba(255, 170, 60, 0.3);
}
.btn-gold:hover { filter: brightness(1.08); color: #341a00; }
.btn-steel {
  background: linear-gradient(135deg, #475a75, #2e3d54);
  border: 1px solid rgba(140, 175, 220, 0.35);
  color: #E8EEFF; font-weight: 600;
  box-shadow: 0 2px 10px rgba(15, 30, 55, 0.35);
}
.btn-steel:hover { border-color: rgba(170, 200, 240, 0.6); color: #ffffff; filter: brightness(1.08); }
.btn-danger { border-color: rgba(255, 93, 115, 0.5); color: #ff8b9a; background: rgba(255, 93, 115, 0.08); }
.btn-danger:hover { background: rgba(255, 93, 115, 0.2); border-color: var(--red); color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; }

/* ---------------- 卡片 / 面板 ---------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}
.panel-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: #eaf2ff; letter-spacing: 0.5px;
  padding: 13px 16px; border-bottom: 1px solid var(--line);
}
.panel-title::before {
  content: ""; width: 3px; height: 14px; border-radius: 2px;
  background: linear-gradient(180deg, var(--cyan), #0066ff);
  box-shadow: 0 0 8px rgba(0, 216, 255, 0.8);
}
.panel-title .spacer { flex: 1; }
.panel-body { padding: 14px 16px; }

/* ---------------- 表格 ---------------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; color: var(--muted); font-weight: 500; font-size: 12px;
  padding: 9px 10px; border-bottom: 1px solid var(--line);
  white-space: nowrap; background: rgba(120, 180, 255, 0.04);
}
.tbl td { padding: 9px 10px; border-bottom: 1px solid rgba(120, 180, 255, 0.07); vertical-align: middle; }
.tbl tbody tr { transition: background 0.15s; }
.tbl tbody tr:hover { background: rgba(0, 216, 255, 0.05); }
.tbl .num { font-family: var(--mono); }
.tbl .right { text-align: right; }
.tbl-empty { text-align: center; color: var(--muted); padding: 30px 0; }
.org-edit-table { min-width: 1080px; }
.org-inline-input, .org-inline-select {
  height: 36px; min-width: 120px; padding: 6px 9px; font-size: 13px;
  background: rgba(5, 14, 38, .72); border-color: rgba(120, 180, 255, .22);
}
.org-inline-input:focus, .org-inline-select:focus { background: rgba(8, 20, 52, .96); }
#page-org .panel-body { overflow-x: auto; }
#page-org .org-edit-table td { min-width: 90px; }
#page-org .org-edit-table td:last-child { min-width: 270px; }
/* 入驻律师管理:突出总数,名单分页浏览 */
.lawyer-summary {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 14px; border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(0, 216, 255, 0.08), rgba(13, 24, 60, 0.55) 55%);
}
.lawyer-count { display: flex; align-items: baseline; gap: 8px; }
.lawyer-count .k { font-size: 12px; color: var(--muted); }
.lawyer-count .v { font-size: 18px; font-weight: 700; font-family: var(--mono); color: #fff; }
.lawyer-count .u { font-size: 12px; color: var(--text-2); }
.password-result-row { display: flex; align-items: center; gap: 8px; }
.password-result-row input { flex: 1; min-width: 0; font-size: 17px; letter-spacing: 1px; }

/* ---------------- 徽章 ---------------- */
.badge {
  display: inline-block; padding: 2px 9px; border-radius: 20px;
  font-size: 12px; line-height: 18px; white-space: nowrap;
  border: 1px solid transparent;
}
.badge.cyan { color: var(--cyan); background: rgba(0, 216, 255, 0.1); border-color: rgba(0, 216, 255, 0.3); }
.badge.gold { color: var(--gold); background: rgba(255, 209, 102, 0.1); border-color: rgba(255, 209, 102, 0.3); }
.badge.green { color: var(--green); background: rgba(46, 230, 168, 0.1); border-color: rgba(46, 230, 168, 0.3); }
.badge.red { color: var(--red); background: rgba(255, 93, 115, 0.1); border-color: rgba(255, 93, 115, 0.3); }
.badge.purple { color: var(--purple); background: rgba(139, 124, 255, 0.1); border-color: rgba(139, 124, 255, 0.3); }
.badge.orange { color: var(--orange); background: rgba(255, 159, 67, 0.1); border-color: rgba(255, 159, 67, 0.3); }
.badge.gray { color: var(--muted); background: rgba(120, 140, 180, 0.12); border-color: rgba(120, 140, 180, 0.25); }

/* ---------------- 弹层 ---------------- */
.mask {
  position: fixed; inset: 0; background: rgba(3, 8, 24, 0.72);
  backdrop-filter: blur(3px); z-index: 100; display: none;
  align-items: center; justify-content: center; padding: 30px;
}
.mask.show { display: flex; }
.dialog {
  width: 480px; max-width: 96vw; max-height: 88vh; overflow: hidden;
  display: flex; flex-direction: column;
  background: linear-gradient(160deg, #101c47, #0a1230);
  border: 1px solid rgba(0, 216, 255, 0.28); border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 150, 255, 0.12);
}
.dialog-title {
  min-height: 58px; padding: 16px 22px; font-size: 16px; font-weight: 600; color: #fff;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 216, 255, 0.055);
}
.dialog.head-grad .dialog-title { background: linear-gradient(90deg, rgba(0, 216, 255, 0.16), transparent); }
.dialog-body { padding: 22px; overflow: auto; }
.dialog-body > :last-child { margin-bottom: 0; }
.dialog-foot { min-height: 66px; padding: 13px 22px; border-top: 1px solid var(--line); display: flex; align-items: center; }
.dialog-actions { width: 100%; display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.dialog-actions .btn { min-width: 88px; min-height: 38px; }
.dialog-context { min-height: 48px; margin-bottom: 18px; padding: 11px 14px; display: flex; flex-wrap: wrap;
  align-items: center; gap: 7px; border: 1px solid rgba(0,216,255,.16); border-radius: 9px;
  background: rgba(0,216,255,.045); color: var(--text-2); font-size: 13px; }
.dialog-context b { color: #fff; font-size: 14px; }
.dialog-context i { width: 1px; height: 18px; margin: 0 4px; background: var(--line); }
.dialog-context code { color: var(--cyan); font: 13px var(--mono); }
.dialog-form-stack { display: grid; gap: 15px; }
.dialog-form-stack .field { margin: 0; }
.dialog-form-stack textarea { min-height: 96px; line-height: 1.6; }
.dialog-process { margin-top: 18px; padding: 11px 13px; display: flex; flex-wrap: wrap; align-items: center;
  gap: 7px; border-radius: 9px; background: rgba(120,180,255,.055); color: var(--muted); font-size: 12px; }
.dialog-process b { padding: 3px 8px; border-radius: 5px; background: rgba(120,180,255,.09);
  color: var(--text-2); font-weight: 500; }

/* 右侧抽屉(案件详情) */
.drawer-mask {
  position: fixed; inset: 0; background: rgba(3, 8, 24, 0.6); z-index: 100; display: none;
}
.drawer-mask.show { display: block; }
.drawer {
  position: fixed; top: 0; right: -520px; width: 500px; max-width: 96vw; height: 100vh;
  background: linear-gradient(180deg, #0e1a40, #0a1230); z-index: 101;
  border-left: 1px solid rgba(0, 216, 255, 0.25);
  transition: right 0.25s ease; display: flex; flex-direction: column;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.55);
}
.drawer.show { right: 0; }
.drawer-head {
  padding: 16px 20px; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--line); background: rgba(0, 216, 255, 0.06);
}
.drawer-head h3 { font-size: 15px; font-weight: 600; }
.drawer-head [data-drawer-close] { margin-left: auto; }
.drawer-body { flex: 1; overflow: auto; padding: 18px 20px; }

/* 信息块(详情字段) */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.info-grid .full { grid-column: 1 / -1; }
.info-item .k { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.info-item .v { font-size: 13.5px; color: #eaf2ff; word-break: break-all; }
.info-item .v.mono { font-family: var(--mono); }

/* 进度时间线 */
.timeline { position: relative; padding-left: 20px; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px;
  width: 1px; background: linear-gradient(180deg, var(--cyan), transparent);
  opacity: 0.4;
}
.tl-item { position: relative; padding: 0 0 16px 8px; }
.tl-item:last-child { padding-bottom: 2px; }
.tl-item::before {
  content: ""; position: absolute; left: -20px; top: 4px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--bg2);
  border: 2px solid var(--cyan); box-shadow: 0 0 8px rgba(0, 216, 255, 0.6);
}
.tl-item.done::before { background: var(--cyan); }
.tl-item .t { font-size: 13px; color: #eaf2ff; font-weight: 500; }
.tl-item .d { font-size: 12px; color: var(--muted); margin-top: 2px; }
.tl-item .n { font-size: 12px; color: var(--text-2); margin-top: 3px; }

/* ---------------- Toast ---------------- */
#toast-box { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  padding: 10px 22px; border-radius: 8px; font-size: 13px; color: #fff;
  background: rgba(13, 24, 58, 0.95); border: 1px solid var(--line-strong);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5); animation: toast-in 0.25s ease;
  max-width: 70vw;
}
.toast.err { border-color: rgba(255, 93, 115, 0.6); background: rgba(60, 14, 26, 0.95); }
.toast.ok { border-color: rgba(46, 230, 168, 0.6); background: rgba(8, 46, 32, 0.95); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; } }

/* 下拉搜索空态等通用 */
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.ta-r { text-align: right; }
.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: 12px; font-size: 12px; color: var(--text-2); }
.pager .btn { padding: 3px 10px; }

/* ============ 登录页 ============ */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; padding: 30px;
}
.login-wrap::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(rgba(0, 216, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 216, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(700px 500px at 30% 40%, #000, transparent);
}
.login-glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.25; pointer-events: none; }
.login-glow.g1 { width: 420px; height: 420px; background: #0066ff; top: -120px; left: -80px; }
.login-glow.g2 { width: 360px; height: 360px; background: #00c8f0; bottom: -120px; right: -60px; }
.login-card {
  position: relative; width: 920px; max-width: 94vw; display: flex;
  background: linear-gradient(150deg, rgba(16, 29, 72, 0.92), rgba(8, 15, 44, 0.95));
  border: 1px solid rgba(0, 216, 255, 0.22); border-radius: 18px; overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6), 0 0 60px rgba(0, 120, 255, 0.1);
}
.login-brand {
  width: 46%; padding: 46px 40px; position: relative; overflow: hidden;
  background: radial-gradient(500px 300px at 20% 10%, rgba(0, 216, 255, 0.14), transparent 60%),
              radial-gradient(400px 280px at 90% 90%, rgba(139, 124, 255, 0.14), transparent 55%);
  border-right: 1px solid var(--line); display: flex; flex-direction: column;
}
.login-brand .logo {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 34px;
}
.login-brand .logo .seal {
  width: 50px; height: 50px; display: block; border: 0; outline: 0; flex: none;
  border-radius: 50%; clip-path: circle(50% at 50% 50%); object-fit: cover;
  box-shadow: 0 6px 22px rgba(229,190,107,.25);
}
.login-brand .logo b { font-size: 19px; letter-spacing: 2px; color: #fff; }
.login-brand h1 {
  font-size: 27px; line-height: 1.5; font-weight: 700; color: #fff; margin-bottom: 6px;
}
.login-brand h1 em {
  font-style: normal; color: transparent;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
}
.login-brand p.desc { font-size: 13px; color: var(--text-2); line-height: 1.9; margin-bottom: 26px; }
.brand-points { display: flex; flex-direction: column; gap: 12px; margin-top: auto; }
.brand-points .pt { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--text-2); line-height: 1.7; }
.brand-points .pt i {
  width: 20px; height: 20px; border-radius: 6px; flex: none; display: grid; place-items: center;
  background: rgba(0, 216, 255, 0.12); color: var(--cyan); font-style: normal; font-size: 11px;
}
.login-form { flex: 1; padding: 50px 46px; display: flex; flex-direction: column; justify-content: center; }
.login-form h2 { font-size: 22px; color: #fff; margin-bottom: 6px; }
.login-form .sub { color: var(--muted); font-size: 12.5px; margin-bottom: 26px; }
.login-form .field { margin-bottom: 15px; }
.login-form input { padding: 11px 13px; }
.login-password { position: relative; }
.login-password input { padding-right: 46px; }
.login-password-toggle {
  position: absolute; right: 7px; top: 50%; width: 34px; height: 34px; padding: 7px;
  transform: translateY(-50%); display: grid; place-items: center; cursor: pointer;
  color: var(--muted); border: 0; border-radius: 7px; background: transparent;
}
.login-password-toggle:hover, .login-password-toggle:focus-visible { color: var(--cyan); background: rgba(0,216,255,.08); outline: none; }
.login-password-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.login-password-toggle::after {
  content: ""; position: absolute; width: 20px; height: 1.5px; border-radius: 2px;
  background: currentColor; transform: rotate(-42deg) scaleX(0); transition: transform .16s ease;
}
.login-password-toggle.showing { color: var(--cyan); }
.login-password-toggle.showing::after { transform: rotate(-42deg) scaleX(1); }
.login-hint {
  margin-top: 18px; border: 1px dashed rgba(120, 180, 255, 0.25); border-radius: 9px;
  padding: 10px 12px; font-size: 11.5px; color: var(--muted); line-height: 1.9;
}
.login-hint b { color: var(--cyan); font-weight: 600; margin-right: 4px; }
.login-site-footer {
  margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line);
  text-align: center; font-size: 12px; line-height: 2; color: var(--muted);
}

/* ============ 管理后台框架 ============ */
.app { display: flex; height: 100vh; overflow: hidden; }
.sider {
  width: 216px; flex: none; background: linear-gradient(180deg, #0b1536, #080e26);
  border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 5;
}
.sider .logo {
  display: flex; align-items: center; gap: 10px; padding: 16px 16px 14px;
  border-bottom: 1px solid var(--line);
}
.sider .logo .seal {
  width: 40px; height: 40px; display: block; border: 0; outline: 0; flex: none;
  border-radius: 50%; clip-path: circle(50% at 50% 50%); object-fit: cover;
  box-shadow: 0 4px 16px rgba(229,190,107,.22);
}
.sider .logo b { font-size: 14.5px; letter-spacing: 1px; color: #fff; }
.sider .logo small { display: block; font-weight: 400; font-size: 10.5px; color: var(--muted); letter-spacing: 0; margin-top: 2px; }
.nav { flex: 1; overflow: auto; padding: 10px 8px; }
.nav-grp { font-size: 11px; color: var(--muted); padding: 12px 12px 6px; letter-spacing: 1px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
  color: var(--text-2); cursor: pointer; font-size: 13.5px; margin-bottom: 2px; user-select: none;
  border: 1px solid transparent; transition: all 0.15s;
}
.nav-item:hover { background: rgba(120, 180, 255, 0.07); color: #fff; }
.nav-item.on {
  background: linear-gradient(90deg, rgba(0, 216, 255, 0.16), rgba(0, 216, 255, 0.03));
  border-color: rgba(0, 216, 255, 0.3); color: var(--cyan);
  box-shadow: inset 0 0 20px rgba(0, 216, 255, 0.06);
}
.nav-item .ic { width: 18px; text-align: center; }
.sider .user {
  border-top: 1px solid var(--line); padding: 12px 14px; font-size: 12px;
}
.sider .user .nm { color: #fff; font-size: 13px; font-weight: 600; }
.sider .user .rl { color: var(--cyan); font-size: 11px; margin-top: 2px; }
.sider .user .act { display: flex; gap: 6px; margin-top: 9px; }

.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  height: 54px; flex: none; display: flex; align-items: center; gap: 14px;
  padding: 0 20px; background: rgba(10, 18, 48, 0.85); border-bottom: 1px solid var(--line);
}
.topbar .crumb { font-size: 16px; font-weight: 600; color: #fff; }
.topbar .spacer { flex: 1; }
.topbar .clock { font-family: var(--mono); color: var(--text-2); font-size: 13px; }
.content { flex: 1; overflow: auto; padding: 18px; }
/* 站点页脚:备案号与版权(与官网底部一致) */
.site-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 20px; padding: 14px 4px 2px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted); line-height: 1.9;
}
.site-footer a, .login-site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover, .login-site-footer a:hover { color: var(--cyan); text-decoration: underline; }
.page { display: none; animation: fade-up 0.25s ease; }
.page.on { display: block; }
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } }

/* 统计小卡(总览页) */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi {
  position: relative; overflow: hidden; padding: 16px 18px; border-radius: 12px;
  background: linear-gradient(150deg, rgba(0, 216, 255, 0.06), rgba(13, 24, 60, 0.6) 45%);
  border: 1px solid var(--line);
}
.kpi::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px;
  border-radius: 50%; filter: blur(30px); opacity: 0.5;
}
.kpi.c1::after { background: var(--cyan); } .kpi.c2::after { background: var(--gold); }
.kpi.c3::after { background: var(--purple); } .kpi.c4::after { background: var(--green); }
.kpi .k { font-size: 12px; color: var(--muted); }
.kpi .v { font-size: 26px; font-weight: 700; margin-top: 8px; font-family: var(--mono); color: #fff; }
.kpi .v small { font-size: 13px; color: var(--text-2); font-weight: 400; }
.kpi .sub { font-size: 11px; color: var(--muted); margin-top: 6px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input[type=text], .toolbar select { width: auto; min-width: 110px; }
.toolbar .grow { flex: 1; }
.chart-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 6px 6px; }
.chart-card .cc-title { padding: 4px 12px 8px; font-size: 13px; color: var(--text-2); display: flex; justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 1100px) { .grid-3 { grid-template-columns: 1fr 1fr; } .grid-2 { grid-template-columns: 1fr; } }

/* ---------------- 系统设置 / 数据库与短信 ---------------- */
.settings-grid {
  display: grid; grid-template-columns: minmax(480px, 1.08fr) minmax(420px, .92fr);
  gap: 18px; align-items: start;
}
.settings-card .panel-body { padding: 20px; }
.settings-column { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.celebration-options { padding: 0; margin: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.celebration-options legend { font-size: 13px; color: var(--text-2); margin-bottom: 12px; }
.celebration-options label { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.celebration-options label:has(input:checked) { border-color: var(--cyan); background: rgba(0,216,255,.07); }
.settings-card .celebration-options input { width: 17px; height: 17px; flex: none; accent-color: var(--cyan); }
.celebration-options span { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.celebration-options b { color: var(--text); font-size: 14px; }
.celebration-options small { color: var(--text-2); font-size: 12px; }
.celebration-settings-preview { position: relative; aspect-ratio: 1; width: 100%; max-width: 320px; margin: 0 auto 12px; border-radius: 12px; overflow: hidden; background: #071845; }
.celebration-preview-map { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: radial-gradient(ellipse at center, #15355e, #071329); color: #d2e6ff; }
.celebration-preview-map span { color: #9fb9da; font-size: 12px; }
.celebration-preview-poster { position: absolute; inset: 0; background: #071845; }
.celebration-preview-poster[hidden] { display: none; }
.celebration-preview-poster svg { display: block; width: 100%; height: 100%; }
.celebration-preview-poster text { fill: #fff0bc; font-family: "Microsoft YaHei", "PingFang SC", sans-serif; font-weight: 700; filter: drop-shadow(0 2px 5px #061335); }
.settings-card .field > span { font-size: 13px; margin-bottom: 7px; }
.settings-card input, .settings-card select { height: 42px; font-size: 14px; }
.settings-status {
  margin: 14px 0 18px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 9px; background: rgba(120,180,255,.045); color: var(--text-2);
  font-size: 13px; line-height: 1.7;
}
.settings-status.ok { border-color: rgba(46,230,168,.3); background: rgba(46,230,168,.055); color: #b9f8df; }
.settings-status.warn { border-color: rgba(255,209,102,.28); background: rgba(255,209,102,.055); color: #ffe6a1; }
.settings-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.settings-form-grid .field { margin: 0; }
.settings-form-grid .wide { grid-column: 1 / -1; }
.settings-field-help { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.settings-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.settings-test {
  display: grid; grid-template-columns: minmax(220px,1fr) auto; align-items: end; gap: 10px;
  margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line);
}
.settings-test .field { margin: 0; }
.settings-test .btn { height: 42px; }
.settings-subtitle { margin: 22px 0 10px; color: #edf4ff; font-weight: 600; font-size: 13px; }
.db-status { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.db-status-item { padding: 12px 13px; border: 1px solid var(--line); border-radius: 9px; background: rgba(120,180,255,.035); }
.db-status-item .k { color: var(--muted); font-size: 11px; margin-bottom: 6px; }
.db-status-item .v { color: #edf4ff; font-size: 14px; font-family: var(--mono); word-break: break-all; }
.db-status-item .v.good { color: var(--green); }
.db-status-item .v.bad { color: var(--red); }
.backup-list { display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow: auto; }
.backup-item {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; padding: 11px 12px;
  border: 1px solid rgba(120,180,255,.1); border-radius: 8px; background: rgba(5,12,34,.35);
}
.backup-item b { color: var(--text-2); font-size: 12px; font-family: var(--mono); font-weight: 500; word-break: break-all; }
.backup-item span { color: var(--muted); font-size: 11px; }
@media (max-width: 1180px) {
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .settings-form-grid, .db-status { grid-template-columns: 1fr; }
  .settings-form-grid .wide { grid-column: auto; }
  .settings-test { grid-template-columns: 1fr; }
}

/* ---------------- 看板数据管理 ---------------- */
.dash-note {
  margin-bottom: 14px; padding: 11px 14px; border: 1px solid rgba(0,216,255,.18);
  border-radius: 9px; background: rgba(0,216,255,.055); color: var(--text-2); font-size: 13px;
}
#page-dashboard > .card > .panel-title {
  position: sticky; top: -18px; z-index: 20; min-height: 60px;
  background: rgba(9,18,43,.97); backdrop-filter: blur(12px);
  box-shadow: 0 10px 28px rgba(2,7,20,.26);
}
.dash-config-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-auto-rows: 470px; gap: 24px; align-items: stretch;
}
.dash-block {
  min-width: 0; height: 100%; display: flex; flex-direction: column;
  border: 1px solid rgba(82,151,255,.28); border-radius: 14px;
  background: linear-gradient(155deg, rgba(13,26,61,.78), rgba(6,13,35,.82)); overflow: hidden;
  box-shadow: 0 14px 34px rgba(0,0,0,.18), inset 0 1px rgba(255,255,255,.025);
}
.dash-block-head {
  min-height: 72px; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 14px 18px; border-bottom: 1px solid rgba(82,151,255,.22); background: rgba(65,116,200,.10);
}
.dash-block-head > div { display: flex; flex-direction: column; gap: 3px; }
.dash-block-head b { color: #f2f7ff; font-size: 16px; display: flex; align-items: center; gap: 9px; }
.dash-block-head b::before { content: ""; width: 4px; height: 17px; border-radius: 4px; background: linear-gradient(var(--cyan), #4d7dff); box-shadow: 0 0 9px rgba(0,216,255,.48); }
.dash-block-head span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.dash-block-head .btn { flex: none; min-height: 36px; padding: 0 13px; }
.dash-save-state { flex: none; color: var(--muted); font-size: 12px; }
.dash-save-state[data-state="pending"] { color: var(--gold); }
.dash-save-state[data-state="saved"] { color: var(--green); }
.dash-save-state[data-state="error"] { color: var(--red); }
.dash-scroll { flex: 1; min-height: 0; overflow: auto; scrollbar-gutter: stable; }
.dash-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.dash-scroll::-webkit-scrollbar-thumb { background: rgba(120,180,255,.2); border-radius: 8px; }
.dash-scroll::-webkit-scrollbar-track { background: rgba(120,180,255,.025); }
.dash-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; padding: 22px; align-content: start; }
.dash-field-grid .field.wide { grid-column: 1 / -1; }
.dash-field-grid .field { margin: 0; }
.dash-field-grid .field span, .dash-map-value .field span { margin-bottom: 8px; }
.dash-field-grid input { width: 100%; height: 42px; }
.dash-auto-hint { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px;
  border: 1px solid rgba(46,230,168,.18); border-radius: 10px; background: rgba(46,230,168,.05); }
.dash-auto-hint b { color: var(--green); font-size: 14px; }
.dash-auto-hint b[data-state="pending"] { color: var(--gold); }
.dash-auto-hint b[data-state="error"] { color: var(--red); }
.dash-auto-hint span { color: var(--text-2); font-size: 13px; line-height: 1.7; }
.dash-import-guide { min-height: 100%; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.dash-import-step { display: grid; grid-template-columns: 38px 1fr; gap: 14px; align-items: center; }
.dash-import-step > b { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px;
  color: var(--cyan); background: rgba(0,216,255,.10); border: 1px solid rgba(0,216,255,.2); font-size: 16px; }
.dash-import-step div { display: flex; flex-direction: column; gap: 4px; }
.dash-import-step strong { color: #eef6ff; font-size: 14px; }
.dash-import-step span { color: var(--muted); font-size: 12px; line-height: 1.6; }
.dash-import-actions { margin-top: auto; display: flex; gap: 10px; }
.dash-stat-grid { padding: 22px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.dash-stat-grid > div { min-height: 92px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto;
  align-items: end; padding: 16px; border: 1px solid rgba(82,151,255,.17); border-radius: 11px; background: rgba(65,116,200,.055); }
.dash-stat-grid span { color: var(--muted); font-size: 12px; }
.dash-stat-grid b { grid-column: 1; color: #fff; font: 700 24px var(--mono); }
.dash-stat-grid small { grid-column: 2; grid-row: 2; color: var(--text-2); font-size: 12px; }
.dash-auto-list { padding: 8px 18px 18px; min-width: 650px; }
.dash-auto-row { min-height: 54px; display: grid; grid-template-columns: .55fr 1.35fr 1.2fr .75fr .8fr;
  gap: 14px; align-items: center; border-bottom: 1px solid rgba(120,180,255,.09); color: var(--text-2); font-size: 13px; }
.dash-auto-row.head { min-height: 42px; color: var(--muted); font-size: 12px; position: sticky; top: 0;
  background: #0c1732; z-index: 2; }
.dash-auto-row b { color: #edf5ff; font-weight: 600; }
.dash-auto-row strong { color: var(--gold); font: 650 14px var(--mono); }
.dash-auto-row em { color: var(--green); font-style: normal; }
.dash-auto-row.map { grid-template-columns: 1.4fr 1fr 1fr; min-width: 0; }
.dash-metric-list, .dash-feed-list { padding: 16px 20px; }
.dash-metric-list > div { min-height: 57px; display: grid; grid-template-columns: 12px 1fr auto; gap: 12px;
  align-items: center; border-bottom: 1px solid rgba(120,180,255,.09); }
.dash-metric-list i { width: 9px; height: 9px; border-radius: 50%; background: var(--metric-color); box-shadow: 0 0 9px var(--metric-color); }
.dash-metric-list span { color: var(--text-2); font-size: 14px; }
.dash-metric-list b { color: #fff; font: 650 15px var(--mono); }
.dash-feed-list > div { min-height: 72px; display: grid; grid-template-columns: 112px 1fr 62px; gap: 14px;
  align-items: center; border-bottom: 1px solid rgba(120,180,255,.09); }
.dash-feed-list span { color: var(--muted); font-size: 11px; }
.dash-feed-list b { color: #dce9fa; font-size: 14px; font-weight: 500; line-height: 1.5; }
.dash-feed-list em { color: var(--green); font: 650 13px var(--mono); font-style: normal; text-align: right; }
.dash-feed-list.signs em { color: var(--gold); }
#dash-period { width: 112px; min-height: 38px; }
.dash-map-value { flex: none; padding: 14px 18px; border-bottom: 1px solid rgba(120,180,255,.08); }
.dash-map-value .field { width: min(280px, 100%); margin: 0; }
.dash-map-value input { width: 100%; height: 40px; }
.dash-row {
  display: grid; grid-template-columns: var(--dash-cols); gap: 8px; align-items: center;
  min-height: 56px; padding: 8px 14px; border-bottom: 1px solid rgba(120,180,255,.07);
}
.dash-row:last-child { border-bottom: 0; }
.dash-row input { width: 100%; min-width: 0; height: 38px; padding: 7px 10px; font-size: 13px; }
.dash-row .btn { width: 36px; height: 36px; padding: 0; font-size: 17px; }
.dash-row-head {
  min-height: 42px; position: sticky; top: 0; z-index: 2;
  color: var(--muted); font-size: 12px; background: #0c1732;
  box-shadow: 0 1px rgba(120,180,255,.08);
}
@media (max-width: 760px) {
  .dash-config-grid { grid-template-columns: 1fr; }
}

/* 状态切换开关 */
.switch { position: relative; width: 40px; height: 22px; flex: none; cursor: pointer; }
.switch input { display: none; }
.switch .track {
  position: absolute; inset: 0; border-radius: 20px; background: rgba(120, 180, 255, 0.15);
  border: 1px solid var(--line); transition: all 0.2s;
}
.switch .track::after {
  content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: #8ea6cc; transition: all 0.2s;
}
.switch input:checked + .track { background: rgba(0, 216, 255, 0.3); border-color: var(--line-strong); }
.switch input:checked + .track::after { left: 20px; background: var(--cyan); box-shadow: 0 0 10px rgba(0, 216, 255, 0.8); }

/* 分页/筛选紧凑行 */
.filter-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.filter-bar select, .filter-bar input[type=text] { width: auto; }
