/* 多人协作入账系统 — 样式（配色与原版一致） */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --blue: #00B0F0;
  --green: #92D050;
  --orange: #ED7D31;
  --yellow: #FFEB3B;
  --row-deposit: #E8F5E9;
  --row-withdraw: #FFF3E0;
  --row-overdue-a: #FFEBEE;
  --row-overdue-b: #FFCDD2;
  /* 导航 3D 厚底立体键（default 蓝） */
  --nav3d-slot-top: #e2e6f0; --nav3d-slot-lo: #f2f4f9; --nav3d-slot-border: rgba(100,116,139,.26); --nav3d-slot-inset: rgba(15,23,42,.16);
  --nav3d-face-top: #ffffff; --nav3d-face-lo: #e9edf4; --nav3d-face-hover: #dde3ee; --nav3d-base: #b6c0d0; --nav3d-text: #334155; --nav3d-hover-text: #0f172a;
  --nav3d-acc-top: #60A5FA; --nav3d-acc: #2563EB; --nav3d-acc-lo: #1D4ED8; --nav3d-acc-base: #1E40AF; --nav3d-acc-glow: rgba(30,64,175,.30);
}
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #f9fafb; color: #1f2937; font-size: 14px;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }
a { color: inherit; }

/* ===== 顶部导航 ===== */
.topnav {
  position: sticky; top: 0; z-index: 20;
  background: #eef3fb; backdrop-filter: blur(8px);
  border-bottom: 1px solid #e2e9f5;
  box-shadow: 0 1px 3px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.02);
}
.topnav-inner { max-width: 1400px; margin: 0 auto; padding: 0 16px; height: 32px; display: flex; align-items: center; justify-content: space-between; }
.topnav-left { display: flex; align-items: center; gap: 24px; min-width: 0; }
.brand { font-weight: 700; color: #111827; font-size: 16px; letter-spacing: -.2px; white-space: nowrap; }
/* 2026-09-29 导航重设计：标签页(Tab)风格 · 方案 C（浅色条 + 实心蓝 tab，无任何凹凸/厚底）
   条高与 tab 同高（32px），tab 顶到顶栏最上、底边与顶栏齐平，不留上方空隙 */
.topnav nav {
  display: flex; align-items: flex-end; gap: 6px; height: 32px; overflow-x: auto;
  background: transparent; border: none; padding: 0; box-shadow: none;
  scrollbar-width: none; -ms-overflow-style: none;
}
.topnav nav::-webkit-scrollbar { display: none; }
.nav-link {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 20px; font-size: 14px; font-weight: 600; letter-spacing: .005em;
  border-radius: 15px 15px 0 0; border: none; background: transparent; color: #64748b;
  text-decoration: none; white-space: nowrap; position: relative;
  transition: background .16s ease, color .16s ease;
}
.nav-link:has(.nav-badge) { padding-right: 38px; }
.nav-link .nav-ico { display: inline-flex; align-items: center; opacity: .95; }
.nav-link:hover { background: rgba(37,99,235,.07); color: #334155; }
.nav-link.active {
  background: #2563eb; color: #fff; font-weight: 700;
}
.nav-link.active:hover { background: #1d4ed8; color: #fff; }
.nav-link.active .nav-ico { opacity: 1; }
.nav-link.admin-link { color: #b45309; }
.nav-link.admin-link:hover { background: rgba(245,158,11,.10); color: #92400e; }
.nav-link.admin-link.active { background: #f59e0b; color: #fff; }
.nav-link.admin-link.active:hover { background: #d97706; color: #fff; }
.nav-badge {
  position: absolute; top: 7px; right: 10px; min-width: 17px; height: 17px; padding: 0 4.5px;
  border-radius: 999px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; line-height: 1;
  border: 2px solid #eef3fb;
}
.nav-link.active .nav-badge { border-color: #2563eb; }
.nav-link.admin-link.active .nav-badge { border-color: #f59e0b; }
.topnav-right { display: flex; align-items: center; gap: 8px; }

/* 用户徽标 */
.user-badge { position: relative; }
.user-badge-btn { display: flex; align-items: center; gap: 8px; background: transparent; border: none; padding: 4px 12px 4px 5px; border-radius: 999px; transition: background .15s; }
.user-badge-btn:hover { background: #f1f5f9; }
.avatar { width: 24px; height: 24px; border-radius: 999px; background: #dbeafe; color: #1d4ed8; font-weight: 500; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.avatar-img { width: 24px; height: 24px; border-radius: 999px; object-fit: cover; }
.avatar-lg { width: 80px; height: 80px; font-size: 32px; }
.avatar-img.avatar-lg { width: 80px; height: 80px; }
.user-name { font-size: 13px; color: #374151; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-chip { font-size: 10px; background: #fef3c7; color: #b45309; border-radius: 4px; padding: 1px 4px; font-weight: 600; }
.dropdown { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; box-shadow: 0 10px 25px rgba(0,0,0,.1); min-width: 150px; z-index: 50; overflow: hidden; }
.dropdown-item { display: block; width: 100%; text-align: left; padding: 9px 14px; background: none; border: none; font-size: 13px; color: #374151; }
.dropdown-item svg { vertical-align: -3px; margin-right: 7px; }
.dropdown-item:hover { background: #f9fafb; }
.dropdown-item.danger { color: #dc2626; }

/* ===== 提醒横幅 ===== */
.withdraw-banner {
  width: 100%; background: #fef2f2; border-bottom: 1px solid #fecaca; padding: 10px 16px;
  cursor: pointer; transition: background .15s;
}
.withdraw-banner:hover { background: #fee2e2; }
.withdraw-banner-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.withdraw-banner-left { display: flex; align-items: center; gap: 8px; color: #dc2626; font-size: 14px; font-weight: 500; }
.red-dot { display: inline-block; width: 10px; height: 10px; border-radius: 999px; background: #dc2626; flex-shrink: 0; }
.withdraw-banner-close { background: none; border: none; color: #f87171; font-size: 16px; padding: 4px 8px; border-radius: 6px; }
.withdraw-banner-close:hover { color: #dc2626; background: rgba(254,202,202,.6); }
.backup-banner {
  background: #fffbeb; border: 1px solid #fcd34d; border-radius: 6px; padding: 8px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.backup-banner-text { font-size: 13px; color: #92400e; }

/* ===== 布局 ===== */
.page { flex: 1; padding: 16px; padding-top: 6px; background: #f9fafb; }
.page.dash { background: linear-gradient(135deg, #f8fafc, rgba(239,246,255,.4)); padding-top: 12px; }
/* 交易明细页：顶部不留空隙，卡片紧贴导航栏 */
.page-ledger { padding-top: 0; }
.page-inner { max-width: 1400px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; }
.page-inner.dash-inner { gap: 20px; }
.page-title { font-size: 18px; font-weight: 700; color: #1f2937; line-height: 1; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
/* 空的备份横幅占位不参与布局，避免卡片行与筛选栏之间出现双倍空隙 */
#backup-banner-slot:empty { display: none; }
/* 卡片行与筛选栏之间不留空隙 */
.title-row + #backup-banner-slot:empty + .filter-bar { margin-top: -6px; }

/* ===== 首页公告走马灯 ===== */
.marquee {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 10px; border-radius: 6px; overflow: hidden;
  background: linear-gradient(180deg, #eef2f7, #f8fafc);
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: inset 0 1px 3px rgba(15,23,42,.12), inset 0 -1px 0 rgba(255,255,255,.85);
}
.marquee-ico { flex-shrink: 0; font-size: 14px; }
.marquee-view { flex: 1; min-width: 0; overflow: hidden; position: relative; }
/* 经典走马灯：padding-left:100% 让文字从右边缘进场，平移一整圈后从左边出去、再从右边进来 */
.marquee-track { display: inline-block; white-space: nowrap; padding-left: 100%; animation: marquee-move var(--marquee-dur, 20s) linear infinite; will-change: transform; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-text { font-size: 13px; font-weight: 600; color: #b45309; }
@keyframes marquee-move { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* ===== 汇总卡 ===== */
.summary-panel { display: flex; gap: 8px; flex-shrink: 0; align-items: stretch; }
.summary-card {
  display: flex; align-items: center;
  border-radius: 6px; padding: 0 10px;
  height: 30px;
  background: linear-gradient(180deg, #ffffff, #e8edf4);
  border: 1px solid rgba(0,0,0,.1);
  box-shadow: 0 3px 5px rgba(15,23,42,.16), 0 1px 2px rgba(15,23,42,.1), inset 0 1px 0 rgba(255,255,255,.95);
  white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease;
}
.summary-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 9px rgba(15,23,42,.2), 0 1px 2px rgba(15,23,42,.1), inset 0 1px 0 rgba(255,255,255,.95);
}
.summary-card .sc-label { font-size: 12px; line-height: 1; font-weight: 700; color: #4b5563; }
.summary-card .sc-value { font-size: 18px; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; color: #111827; }
.summary-card.deposit .sc-value { color: #111827; }
.summary-card.withdraw .sc-value { color: #111827; }
.summary-card.balance.pos { background: linear-gradient(180deg, #f2fdf8, #d7f2e4); border-color: #8fddba; box-shadow: 0 3px 5px rgba(5,150,105,.18), 0 1px 2px rgba(5,150,105,.12), inset 0 1px 0 rgba(255,255,255,.9); }
.summary-card.balance.pos:hover { box-shadow: 0 5px 9px rgba(5,150,105,.22), 0 1px 2px rgba(5,150,105,.12), inset 0 1px 0 rgba(255,255,255,.9); }
.summary-card.balance.pos .sc-value { color: #047857; }
.summary-card.balance.neg { background: linear-gradient(180deg, #fff6f6, #ffdfdf); border-color: #f5b0b0; box-shadow: 0 3px 5px rgba(220,38,38,.18), 0 1px 2px rgba(220,38,38,.12), inset 0 1px 0 rgba(255,255,255,.9); }
.summary-card.balance.neg:hover { box-shadow: 0 5px 9px rgba(220,38,38,.22), 0 1px 2px rgba(220,38,38,.12), inset 0 1px 0 rgba(255,255,255,.9); }
.summary-card.balance.neg .sc-value { color: #dc2626; }

/* ===== 筛选栏 ===== */
.filter-bar { background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; padding: 4px 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.filter-bar .btn { height: 30px; }
.fb-field { display: flex; align-items: center; gap: 6px; flex: 1 1 150px; min-width: 130px; }
.fb-label { font-size: 12px; color: #6b7280; white-space: nowrap; text-align: right; flex-shrink: 0; }
.fb-label.w-lg { width: 56px; }
.fb-label.w-sm { width: 40px; }
.fb-actions { display: flex; gap: 6px; flex-shrink: 0; }
.fb-field > .combobox, .fb-field > .select-wrap, .fb-field > .date-field { flex: 1 1 auto; min-width: 0; }
.filter-field input:focus, .filter-field select:focus, .form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 2px rgba(0,176,240,.15); }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  height: 32px; padding: 0 14px; border-radius: 6px; border: 1px solid transparent;
  font-size: 13px; font-weight: 500; transition: all .15s; white-space: nowrap;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #009dd6; }
.btn-outline { background: #fff; border-color: #d1d5db; color: #374151; }
.btn-outline:hover:not(:disabled) { background: #f9fafb; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }
.btn-ghost { background: transparent; color: #374151; }
.btn-ghost:hover:not(:disabled) { background: #f3f4f6; }
.btn svg { display: inline-block; vertical-align: -2px; margin-right: 4px; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-lg { height: 40px; font-size: 15px; width: 100%; }
.btn-blue { background: #2563EB; color: #fff; border-color: #2563EB; }
.btn-blue:hover:not(:disabled) { background: #1d4ed8; border-color: #1d4ed8; }
.btn-h28 { height: 28px; padding: 0 12px; font-size: 14px; border-radius: 6px; }
.btn-h36 { height: 36px; padding: 0 16px; font-size: 14px; border-radius: 6px; }
.btn-h28 svg, .btn-h36 svg { width: 14px; height: 14px; }

/* ===== 表格 ===== */
.table-wrap { border: 1px solid #e5e7eb; border-radius: 6px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.05); overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; }
table.data-table th {
  background: var(--blue); color: #fff; font-weight: 700; font-size: 16px; padding: 4px 8px; text-align: center;
  white-space: nowrap;
}
table.data-table th.small, table.data-table td.small { font-size: 14px; }
table.data-table tbody tr { height: 36px; }
table.data-table td { padding: 4px 8px; text-align: center; font-size: 14px; line-height: 1.5; border-bottom: 1px solid #cbd5e1; transition: background-color .12s ease; }
table.data-table tbody tr:last-child td { border-bottom: none; }
/* 鼠标悬停整行高亮（全局所有数据表通用）：浅蓝底 + 左侧蓝条，压在白/黄行之上依然鲜明 */
table.data-table tbody tr:hover > td { background: #dbeafe; }
table.data-table tbody tr:hover > td:first-child { box-shadow: inset 3px 0 0 #3366FF; }
table.data-table td.num { font-variant-numeric: tabular-nums; font-weight: 700; color: #111827; }
table.data-table td.num.plain { font-weight: 400; }
table.data-table tr.clickable { cursor: pointer; user-select: none; }
table.data-table td.table-empty { padding: 32px 8px; color: #6b7280; text-align: center; }
table.data-table tr.editing-row td { padding-top: 2px; padding-bottom: 2px; }
.cell-flex { display: inline-flex; align-items: center; }
.cell-flex.gap4 { gap: 4px; }
.overdue-text { color: #b91c1c; font-weight: 700; }
.op-link { background: none; border: none; color: #2563eb; font-weight: 500; padding: 0; }
.op-link:hover { color: #1d4ed8; text-decoration: underline; }
.icon-btn { padding: 4px; border: none; background: transparent; border-radius: 4px; line-height: 0; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
.icon-btn + .icon-btn { margin-left: 4px; }
.icon-btn svg { display: block; }
.icon-btn.blue { color: #2563eb; }
.icon-btn.blue:hover { background: #eff6ff; }
.icon-btn.red { color: #dc2626; }
.icon-btn.red:hover { background: #fef2f2; }
.overdue-dot { display: inline-block; width: 10px; height: 10px; border-radius: 999px; background: #dc2626; }
.row-highlight-flash { animation: flash-highlight 2s ease; }
@keyframes flash-highlight { 0%, 60% { box-shadow: inset 0 0 0 3px #f59e0b; } 100% { box-shadow: none; } }
.remark-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 行内编辑 */
.inline-input { width: 100%; min-width: 70px; height: 28px; border: 1px solid #d1d5db; border-radius: 6px; padding: 0 6px; font-size: 12px; text-align: center; background: #fff; }
.inline-input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,.15); }
.inline-input.sm { height: 28px; font-size: 12px; }
.inline-input.num { text-align: right; width: 100px; font-variant-numeric: tabular-nums; }
.inline-input.time-w { width: 84px; flex-shrink: 0; }
.inline-input.time-w2 { width: 78px; flex-shrink: 0; }
.inline-input.remark-w { width: 180px; }
.icon-btn.green { color: #16a34a; }
.icon-btn.green:hover { background: #f0fdf4; }

/* ===== 分页 ===== */
.pagination-row { margin-top: 16px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
@media (min-width: 640px) { .pagination-row { flex-direction: row; justify-content: space-between; } }
.page-size-box { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #6b7280; }
.page-size-box select { height: 32px; border: 1px solid #d1d5db; border-radius: 6px; padding: 0 4px; }
.pagination { display: flex; align-items: center; gap: 2px; }
.page-btn { min-width: 32px; height: 32px; padding: 0 8px; border: none; background: transparent; border-radius: 6px; font-size: 13px; color: #374151; }
.page-btn:hover:not(:disabled) { background: #f3f4f6; }
.page-btn.active { background: var(--blue); color: #fff; font-weight: 600; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }
.page-total { font-size: 13px; color: #6b7280; }

/* ===== 首页仪表盘 ===== */
.section-title { display: flex; align-items: center; gap: 8px; }
.section-title .bar { width: 4px; height: 20px; border-radius: 999px; background: linear-gradient(to bottom, #2563eb, #6366f1); }
.section-title h2 { font-size: 18px; font-weight: 700; color: #111827; line-height: 1; }
.stat-grid { display: grid; grid-template-columns: repeat(1, 1fr); gap: 12px; }
@media (min-width: 640px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card {
  position: relative; background: rgba(255,255,255,.8); border: 1px solid rgba(243,244,246,.8);
  border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.05); padding: 20px; overflow: hidden;
  transition: all .3s;
}
.stat-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); transform: translateY(-2px); }
.stat-card .accent { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.stat-card .stat-title { font-size: 14px; color: #6b7280; font-weight: 500; }
.stat-card .stat-value { margin-top: 10px; font-size: 28px; font-weight: 700; letter-spacing: -.5px; font-variant-numeric: tabular-nums; color: #111827; }
.stat-card .stat-value.empty { color: #d1d5db; font-weight: 400; font-size: 16px; }
.stat-card .stat-icon { position: absolute; right: 20px; top: 20px; width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.stat-icon svg { display: block; width: 24px; height: 24px; }
.stat-icon.green { background: #ecfdf5; color: #059669; }
.stat-icon.orange { background: #fff7ed; color: #ea580c; }
.stat-icon.pig { background: #eff6ff; color: #2563eb; }
.stat-icon.pig-pos { background: #ecfdf5; color: #059669; }
.stat-icon.pig-neg { background: #fef2f2; color: #dc2626; }
.stat-icon.purple { background: #faf5ff; color: #9333ea; }
.nav-ico { display: inline-flex; align-items: center; }
.nav-ico svg { display: block; }
.accent-green { background: linear-gradient(to bottom, #10b981, transparent); }
.accent-orange { background: linear-gradient(to bottom, #f97316, transparent); }
.accent-red { background: linear-gradient(to bottom, #ef4444, transparent); }
.accent-purple { background: linear-gradient(to bottom, #a855f7, transparent); }

.tabs-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.tabs { background: rgba(243,244,246,.6); padding: 4px; border-radius: 8px; display: inline-flex; gap: 4px; }
.tab-btn { border: none; background: transparent; padding: 6px 20px; border-radius: 6px; font-size: 14px; font-weight: 500; color: #6b7280; }
.tab-btn.active { background: #fff; color: #1d4ed8; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.search-box { position: relative; width: 224px; }
.search-box input { width: 100%; height: 36px; border: 1px solid #d1d5db; border-radius: 6px; padding: 0 10px 0 32px; }
.search-box .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #9ca3af; font-size: 14px; }
.balance-pos { color: #059669; }
.balance-neg { color: #dc2626; }
.balance-zero { color: #6b7280; }
.num-green { color: #059669; }
.num-orange { color: #ea580c; }

/* 全站负值统一：红色 + 加粗（由 app.js 给负数打上 num-neg 类，含表格、卡片、日志、图表、输入框） */
.num-neg { color: #dc2626 !important; font-weight: 700 !important; }
svg .num-neg, svg text.num-neg, svg tspan.num-neg { fill: #dc2626 !important; color: #dc2626 !important; font-weight: 700 !important; }
input.num-neg::placeholder { color: #dc2626 !important; }
tr.group-row:hover { background: rgba(239,246,255,.6) !important; }

/* 图表卡片 */
.chart-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 900px) { .chart-grid { grid-template-columns: 1fr 1fr; } }
.chart-card { background: rgba(255,255,255,.8); border: 1px solid rgba(243,244,246,.8); border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.05); padding: 16px 20px 20px; }
.chart-title { font-size: 16px; font-weight: 700; color: #111827; line-height: 1.2; }
.donut-wrap { display: flex; align-items: center; justify-content: center; gap: 28px; padding-top: 8px; flex-wrap: wrap; }
.donut-chart { width: 200px; max-width: 60%; flex-shrink: 0; }
.donut-chart svg { width: 100%; height: auto; display: block; }
.donut-center-label { font-size: 12px; fill: #9ca3af; transition: fill .18s ease; }
.donut-center-value { font-size: 20px; font-weight: 700; fill: #111827; font-variant-numeric: tabular-nums; transition: fill .18s ease; }
.donut-center-pct { font-size: 12px; font-weight: 700; fill: #2563eb; opacity: 0; transition: opacity .18s ease; }
.donut-legend { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #374151; border-radius: 6px; padding: 2px 6px; margin: -2px -6px; transition: background .16s ease, transform .16s ease, color .16s ease, opacity .16s ease; }
.legend-dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; transition: transform .16s ease, box-shadow .16s ease; }
.legend-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 悬停：高亮扇区、其余变淡、圆心切到该扇区 */
.donut-arc { cursor: pointer; transition: stroke-width .18s ease, opacity .18s ease; }
.donut-wrap.is-hover .donut-arc { opacity: .28; }
.donut-wrap.is-hover .donut-arc.is-active { opacity: 1; stroke-width: 33; }
.donut-wrap.is-hover .donut-center-label { fill: #6b7280; }
.donut-wrap.is-hover .donut-center-pct { opacity: 1; }
.legend-item:hover, .legend-item.is-active { background: #f3f4f6; transform: translateX(2px); color: #111827; }
.legend-item.is-active { font-weight: 600; }
.legend-item.is-active .legend-dot { transform: scale(1.4); box-shadow: 0 0 0 3px rgba(17,24,39,.06); }
.donut-wrap.is-hover .legend-item:not(.is-active) { opacity: .55; }

/* 结余走势：跟随鼠标的竖线 + 数据点 + 浮层 */
.trend-head { display: flex; align-items: center; gap: 10px; }
.trend-head .trend-tabs { margin-left: auto; }
.trend-tabs { display: flex; gap: 2px; padding: 2px; background: #f3f4f6; border-radius: 8px; }
.trend-tabs .tab-btn { border: none; background: transparent; color: #6b7280; font-size: 12px; padding: 4px 12px; border-radius: 6px; cursor: pointer; transition: background .15s, color .15s; }
.trend-tabs .tab-btn:hover { color: #374151; }
.trend-tabs .tab-btn.active { background: #fff; color: var(--blue); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.trend-users { display: flex; align-items: center; margin-left: 4px; }
.trend-dd { position: relative; display: inline-block; }
.trend-dd .tu-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid #e5e7eb; background: #fff; color: #374151;
  font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 8px; cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.trend-dd .tu-btn:hover { border-color: #93c5fd; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.trend-dd .tu-arrow { font-size: 10px; color: #9ca3af; }
.trend-dd .tu-panel {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 30;
  min-width: 150px; max-height: 260px; overflow: auto;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,.12); padding: 4px 0;
}
.trend-dd .tu-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; font-size: 13px; color: #374151; cursor: pointer; user-select: none;
}
.trend-dd .tu-item:hover { background: #f3f4f6; }
.trend-dd .tu-all-item { border-bottom: 1px solid #f3f4f6; font-weight: 600; }
.trend-dd .tu-item input { accent-color: #2563eb; width: 14px; height: 14px; cursor: pointer; }
.trend-wrap { position: relative; }
.trend-svg { width: 100%; height: auto; display: block; margin-top: 10px; cursor: crosshair; }
.axis-label { font-size: 12px; fill: #9ca3af; }
.trend-bar { transition: fill-opacity .15s ease; }
.trend-cross, .trend-focus { transition: opacity .15s ease; }
.trend-wrap.is-hover .trend-bar { fill-opacity: .3; }
.trend-wrap.is-hover .trend-bar.is-active { fill-opacity: .95; }
.trend-tip {
  position: absolute; left: 0; top: 0; z-index: 6; pointer-events: none;
  background: rgba(17,24,39,.92); color: #fff; font-size: 12px; line-height: 1.5;
  padding: 6px 10px; border-radius: 8px; white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
  opacity: 0; transform: translate(-50%, calc(-100% - 12px));
  transition: opacity .14s ease;
}
.trend-tip.show { opacity: 1; }
.trend-tip.below { transform: translate(-50%, 12px); }
.trend-tip .tt-date { font-size: 11px; color: #9ca3af; }
.trend-tip .tt-val { font-weight: 700; font-variant-numeric: tabular-nums; }
.chart-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 0; color: #9ca3af; }
.chart-empty .emoji { font-size: 32px; margin-bottom: 6px; }
.chart-empty .t1 { font-size: 14px; color: #6b7280; }

/* 表头排序 */
table.data-table th.sortable { cursor: pointer; user-select: none; }
table.data-table th.sortable .sort-ico { margin-left: 4px; font-size: 10px; opacity: .5; }
table.data-table th.sortable.sorted .sort-ico { opacity: 1; }
table.data-table th.th-left { text-align: left; padding-left: 16px; }
table.data-table th.th-center { text-align: center; }
table.data-table th.th-right { text-align: right; }

.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 64px 0; color: #9ca3af; }
.empty-state .emoji { font-size: 36px; margin-bottom: 8px; }
.empty-state .t1 { font-size: 15px; font-weight: 500; color: #6b7280; }
.empty-state .t2 { font-size: 13px; color: #9ca3af; margin-top: 4px; }

/* ===== 账户卡片 ===== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-top: 4px; }
.acc-card {
  border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px 16px; background: #fff;
  box-shadow: 0 1px 2px rgba(16,24,40,.05); cursor: pointer; transition: box-shadow .15s, transform .15s, border-color .15s;
}
.acc-card:hover { box-shadow: 0 8px 20px rgba(16,24,40,.12); transform: translateY(-2px); border-color: #93c5fd; }
.acc-card-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 26px; }
.acc-card-name { font-size: 15px; font-weight: 600; color: #111827; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-card-name.acc-card-user { font-size: 20px; font-weight: 700; color: #2563eb; letter-spacing: .3px; }
.acc-card-count { margin-top: 8px; font-size: 20px; font-weight: 700; color: #111827; line-height: 1.1; }
.acc-card-users { margin-top: 6px; font-size: 12px; color: #6b7280; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 用户明细标题旁的 IP 徽标 */
.acc-ips { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: 12px; }
.ip-chip { display: inline-block; font-size: 15px; line-height: 1.4; background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; border-radius: 999px; padding: 4px 16px; cursor: pointer; font-weight: 500; font-family: ui-monospace, Consolas, monospace; }
.ip-chip:hover { background: #dbeafe; border-color: #93c5fd; }
.acc-ips-empty { font-size: 12.5px; color: #9ca3af; }
.title-accent { color: #2563eb; }

/* ===== IP 资源 ===== */
.ip-summary { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: #4b5563; margin: 2px 0 10px; }
.ip-ok-text { color: #16a34a; }
.ip-fail-text { color: #b45309; }
.ip-alert { color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; border-radius: 999px; padding: 2px 10px; font-size: 12px; }
.ip-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.5; }
.ip-badge.ok { background: #dcfce7; color: #15803d; }
.ip-badge.fail { background: #fde047; color: #713f12; border: 1px solid #eab308; }
.ip-badge.unknown { background: #f3f4f6; color: #6b7280; }
.ip-badge.checking { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; animation: ip-pulse 1.2s ease-in-out infinite; }
.ip-badge.pending { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
@keyframes ip-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.ip-loc-checking { color: #92400e; animation: ip-pulse 1.2s ease-in-out infinite; }
.ip-check-time { font-size: 11px; color: #9ca3af; margin-top: 2px; }
tr.row-fail td { background: #fef9c3; }
.ip-loc { font-size: 12.5px; color: #374151; }
.ip-loc-empty { color: #dc2626; }
.ip-geo-hint { font-size: 11px; color: #9ca3af; margin-top: 4px; }
/* 「识别归属地」= 全量重新识别，确认弹窗 */
.geo-confirm-text { font-size: 13.5px; color: #4b5563; line-height: 1.85; }
.geo-confirm-text b { color: #111827; }
.geo-confirm-chk { display: flex; align-items: center; gap: 9px; margin-top: 14px; padding: 10px 12px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 13.5px; color: #374151; cursor: pointer; user-select: none; }
.geo-confirm-chk input { width: 15px; height: 15px; flex: none; cursor: pointer; accent-color: #2563eb; }
.geo-confirm-chk b { color: #111827; }
.ip-import-tip { font-size: 12.5px; color: #4b5563; line-height: 1.7; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px 12px; }
.ip-import-tip code { font-size: 11.5px; color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: 4px; padding: 1px 5px; word-break: break-all; }
.ip-dup-tag { margin-left: 6px; font-size: 11px; font-weight: 600; color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: 999px; padding: 1px 6px; }
.ip-alert.dup { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.ip-dup-none { font-size: 14px; color: #15803d; padding: 12px 0; }
.ip-dup-head { font-size: 13px; color: #4b5563; }
.ip-dup-list { max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.ip-dup-group { border: 1px solid #fde68a; background: #fffbeb; border-radius: 8px; padding: 8px 10px; }
.ip-dup-ip { font-size: 13px; font-weight: 600; color: #111827; }
.ip-dup-count { font-weight: 400; color: #b45309; font-size: 12px; }
.ip-dup-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; border-top: 1px dashed #fde68a; }
.ip-dup-meta { font-size: 12.5px; color: #4b5563; }

/* ===== 提醒中心 ===== */
.back-btn { padding: 8px; margin-left: -8px; background: none; border: none; color: #6b7280; border-radius: 8px; line-height: 0; }
.back-btn:hover { color: #374151; background: #f3f4f6; }
.subtitle { font-size: 12px; color: #6b7280; margin-top: 2px; line-height: 1; }
.clear-filter { margin-left: auto; font-size: 12px; color: #2563eb; background: none; border: none; }
.clear-filter:hover { color: #1d4ed8; text-decoration: underline; }
.overdue-days { color: #dc2626; font-weight: 700; }

/* ===== 用户详情页 ===== */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.breadcrumb a { color: #2563eb; text-decoration: none; }
.breadcrumb a:hover { color: #1d4ed8; text-decoration: underline; }
.breadcrumb-sep { color: #9ca3af; }
.breadcrumb-cur { color: #374151; font-weight: 500; }
.panel { border: 1px solid #e5e7eb; border-radius: 6px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.05); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border-bottom: 1px solid #e5e7eb; }
.panel-title { font-size: 16px; font-weight: 700; color: #111827; line-height: 1; margin: 0; }
.panel-body { overflow-x: auto; }
table.data-table.account-table th { font-size: 14px; padding: 6px 8px; }
table.data-table.account-table td { font-size: 14px; padding: 6px 8px; line-height: 1.5; }
table.data-table.account-table td.account-empty { text-align: center; padding: 24px 8px; color: #6b7280; font-size: 14px; }

/* ===== 弹窗 ===== */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.modal { background: #fff; border-radius: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.2); width: 100%; max-width: 576px; max-height: calc(100vh - 32px); overflow-y: auto; animation: modal-in .18s ease; }
.modal.wide { max-width: 640px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 20px 20px 0; }
.modal-header.modal-draggable { cursor: move; user-select: none; }
body.modal-dragging { user-select: none; }
body.modal-dragging .modal { pointer-events: auto; }
body.modal-dragging iframe { pointer-events: none; }
.modal-title { font-size: 18px; font-weight: 600; color: #111827; line-height: 1.2; }
.modal-close { background: none; border: none; color: #6b7280; padding: 2px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; line-height: 0; margin-top: -2px; }
.modal-close svg { width: 18px; height: 18px; }
.modal-close:hover { background: #f3f4f6; color: #374151; }
.modal-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.modal-form { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-item { display: flex; flex-direction: column; gap: 8px; }
.form-label { font-size: 14px; font-weight: 500; color: #374151; line-height: 1; }
.control {
  width: 100%; height: 36px; border: 1px solid #d1d5db; border-radius: 6px; padding: 0 10px; background: #fff;
  font-size: 14px; color: #111827; font-family: inherit;
}
.control::placeholder { color: #9ca3af; }
.control:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,.15); }
.control.invalid { border-color: #dc2626; box-shadow: 0 0 0 2px rgba(220,38,38,.15); }
textarea.control { height: auto; padding: 8px 10px; resize: vertical; min-height: 72px; }
.form-hint { font-size: 11px; color: #9ca3af; }
/* 其它弹窗（设置 / 修改密码等）沿用原字段样式 */
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field label { font-size: 12px; color: #6b7280; font-weight: 500; }
.form-field input, .form-field select, .form-field textarea {
  height: 34px; border: 1px solid #d1d5db; border-radius: 6px; padding: 0 8px; background: #fff; font-family: inherit; font-size: 14px;
}
.form-field textarea { height: 60px; padding: 6px 8px; resize: vertical; }
.form-grid .full { grid-column: 1 / -1; }
/* 网站弹窗：单列表单 + 等级（★★★ / 黑） */
.form-stack { display: flex; flex-direction: column; gap: 14px; }
.level-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.level-chip {
  min-width: 52px; height: 34px; padding: 0 12px; border: 1px solid #d1d5db; border-radius: 8px;
  background: #fff; color: #374151; font-size: 14px; font-family: inherit; cursor: pointer;
  transition: border-color .12s ease, background .12s ease, color .12s ease, box-shadow .12s ease;
}
.level-chip:hover { border-color: #93c5fd; color: #2563eb; }
.level-chip.is-selected { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; font-weight: 600; box-shadow: 0 0 0 2px rgba(37,99,235,.15); }
.level-chip.black { font-weight: 700; }
.level-chip.black:hover { border-color: #6b7280; color: #111827; }
.level-chip.black.is-selected { border-color: #111827; background: #111827; color: #fff; box-shadow: 0 0 0 2px rgba(17,24,39,.2); }
/* 底色颜色：选色按钮 + hex 输入 + 色板浮层 */
.color-row { display: flex; align-items: center; gap: 8px; }
.color-row .btn { flex: none; }
.color-row .color-hex {
  flex: 1; min-width: 0; height: 34px; border: 1px solid #d1d5db; border-radius: 6px; padding: 0 8px;
  background: #fff; font-family: inherit; font-size: 14px; text-transform: uppercase;
}
.color-row .color-hex:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,.15); }
.color-pop { margin-top: 8px; padding: 8px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; box-shadow: 0 6px 18px rgba(15,23,42,.08); width: fit-content; }
.color-pop[hidden] { display: none; }
.color-grid { display: grid; grid-template-columns: repeat(8, 22px); gap: 6px; }
.color-swatch {
  width: 22px; height: 22px; padding: 0; border: 1px solid rgba(0,0,0,.08); border-radius: 5px; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.is-selected { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2563eb; }
/* 等级展示：星星 / 「黑」徽标 */
.lvl-stars { color: #f59e0b; font-weight: 600; letter-spacing: 1.5px; }
.lvl-black { display: inline-block; min-width: 26px; padding: 1px 8px; border-radius: 999px; background: #111827; color: #fff; font-size: 12px; font-weight: 700; line-height: 18px; text-align: center; }
.lvl-none { color: #d1d5db; }
.data-table tbody tr.row-black > td { background: #fff5f5; }
/* 网站管理表：名称紧贴「排序」、等级收窄、备注留宽 */
table.data-table.ws-table { table-layout: fixed; }
table.data-table.ws-table th.th-name, table.data-table.ws-table td.td-name { text-align: left; padding-left: 12px; }
table.data-table.ws-table td.td-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.data-table.ws-table td.remark-cell { max-width: none; }
/* 明细录单：等级为「黑」的网站提醒 */
.black-tip { margin-top: 6px; padding: 6px 10px; border: 1px solid #fecaca; border-radius: 8px; background: #fef2f2; color: #b91c1c; font-size: 12.5px; font-weight: 600; }
.black-tip[hidden] { display: none; }
/* 新增记录弹窗：上次记录卡片（按网站 + 用户，可直接补填上次提现金额） */
.prev-box { border: 1px solid #dbeafe; background: #f8fbff; border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.prev-box[hidden] { display: none; }
.prev-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.prev-title { font-size: 13px; font-weight: 600; color: #1d4ed8; }
.prev-sub { font-size: 12px; color: #6b7280; }
.prev-line { font-size: 12.5px; color: #4b5563; line-height: 1.6; word-break: break-word; }
.prev-box.is-hint { border-style: dashed; }
.prev-box.is-hint .prev-line { color: #9ca3af; }
.prev-edit { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prev-lbl { font-size: 12px; color: #6b7280; font-weight: 500; white-space: nowrap; }
.prev-edit[hidden] { display: none; }
.prev-edit .control { width: 130px; }
.prev-edit .control:disabled { background: #eef2f7; color: #0f172a; -webkit-text-fill-color: #0f172a; opacity: 1; border-color: #dbe1ea; cursor: not-allowed; }
.prev-hint.is-locked { color: #b45309; }
.prev-time-fixed { font-size: 12.5px; font-weight: 600; color: #1f2937; background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 6px; padding: 3px 8px; font-variant-numeric: tabular-nums; }
.prev-remark { font-size: 12.5px; color: #4b5563; line-height: 1.55; word-break: break-word; flex: 1; min-width: 0; }
.prev-hint { font-size: 11px; color: #9ca3af; }
.prev-no-wd { color: #dc2626; font-weight: 700; font-size: 12px; }
/* 上次记录卡片底部：该「网站 / 用户」的全部历史备注（格式 充值日期时间/备注，一条都没有则整块不显示） */
.prev-remarks { border-top: 1px dashed #bfdbfe; padding-top: 8px; display: flex; flex-direction: column; gap: 5px; }
.prev-remarks[hidden] { display: none; }
.prev-remarks-title { font-size: 12px; font-weight: 600; color: #1d4ed8; }
.prev-remarks-sub { font-weight: 400; color: #6b7280; margin-left: 4px; }
.prev-remarks-list { display: flex; flex-direction: column; gap: 3px; max-height: 130px; overflow-y: auto; }
.prev-remark-item { font-size: 12px; line-height: 1.55; word-break: break-all; }
.prev-remark-time { color: #6b7280; font-variant-numeric: tabular-nums; }
.prev-remark-sep { color: #9ca3af; }
.prev-remark-text { color: #1f2937; white-space: pre-wrap; }
.alert-danger { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; padding: 10px 12px; border-radius: 8px; font-size: 13px; }

/* checkbox 组 */
.scope-boxes { display: flex; flex-wrap: wrap; gap: 8px; }
.scope-item { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #e5e7eb; border-radius: 6px; padding: 5px 10px; font-size: 13px; cursor: pointer; user-select: none; }
.scope-item input { accent-color: var(--blue); }
.scope-item.checked { border-color: var(--blue); background: #f0f9ff; }

/* ===== 登录 ===== */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #eff6ff, #f1f5f9); padding: 16px; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.1); border: 1px solid #e2e8f0; padding: 32px; }
.auth-head { text-align: center; margin-bottom: 32px; }
.auth-head h1 { font-size: 24px; font-weight: 700; color: #1e293b; margin-bottom: 8px; }
.auth-head p { font-size: 13px; color: #64748b; }
.auth-form { display: flex; flex-direction: column; gap: 20px; }

/* ===== 徽章 ===== */
.badge { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.badge.admin { background: #fef3c7; color: #b45309; }
.badge.user { background: #eff6ff; color: #1d4ed8; }
.badge.create { background: #ecfdf5; color: #059669; }
.badge.update { background: #eff6ff; color: #1d4ed8; }
.badge.withdraw { background: #fff7ed; color: #c2410c; }
.badge.delete { background: #fef2f2; color: #dc2626; }
.badge.ok { background: #ecfdf5; color: #059669; }
.badge.off { background: #f3f4f6; color: #6b7280; }

/* ===== 日志 ===== */
.log-lines { text-align: left; font-size: 12px; color: #4b5563; line-height: 1.7; }
.log-lines div { white-space: pre-wrap; word-break: break-all; }

/* ===== 管理后台 ===== */
.admin-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.sub-title { font-size: 15px; font-weight: 700; color: #111827; }

/* 管理后台卡片 */
.admin-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.05); overflow: hidden; }
.admin-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid #e5e7eb; }
.admin-card-title { margin: 0; font-size: 15px; font-weight: 700; color: #1f2937; line-height: 1.35; }
.admin-card-sub { margin: 2px 0 0; font-size: 12px; color: #6b7280; line-height: 1.35; }
.admin-table-scroll { overflow-x: auto; }

table.data-table.admin-table { min-width: 920px; }
table.data-table.admin-table th { font-size: 14px; padding: 9px 10px; }
table.data-table.admin-table tbody tr { height: 44px; }
table.data-table.admin-table td { font-size: 13px; padding: 6px 10px; vertical-align: middle; line-height: 1.5; }
table.data-table.admin-table td.admin-user-cell { text-align: left; padding-left: 16px; font-weight: 500; color: #111827; }
table.data-table.admin-table td.admin-scope-cell { color: #4b5563; }
table.data-table.admin-table td.admin-time-cell { color: #6b7280; }
table.data-table.admin-table th.th-left, table.data-table.admin-table td.td-left { text-align: left; padding-left: 16px; }
table.data-table.admin-table th.th-right, table.data-table.admin-table td.td-right { text-align: right; padding-right: 16px; }

/* 表格内行操作按钮（对应原版 ghost Button） */
.row-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 2px; white-space: nowrap; }
.row-actions .btn { height: 26px; padding: 0 6px; font-size: 12px; border-color: transparent; background: none; color: #4b5563; }
.row-actions .btn:hover:not(:disabled) { background: #f3f4f6; }
.row-actions .btn.danger { color: #dc2626; }
.row-actions .btn.danger:hover:not(:disabled) { background: #fef2f2; }
.row-actions .btn.success { color: #059669; }
.row-actions .btn.success:hover:not(:disabled) { background: #ecfdf5; }
.row-actions .btn svg { margin-right: 3px; }
.row-actions .btn:disabled { opacity: .4; cursor: not-allowed; }

.muted { color: #9ca3af; }

/* toast */
#toast-root { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #111827; color: #fff; font-size: 13px; padding: 9px 18px; border-radius: 8px; box-shadow: 0 8px 20px rgba(0,0,0,.2); animation: toast-in .2s ease; max-width: 80vw; }
.toast.error { background: #dc2626; }
.toast.success { background: #059669; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* 密码显示 */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.reveal-btn { background: none; border: none; font-size: 12px; color: #2563eb; }

/* ===== 日期选择按钮（对应原版 Popover + Calendar 触发器） ===== */
.date-field {
  display: flex; align-items: center; gap: 8px;
  width: 100%; height: 30px; padding: 0 12px;
  background: #fff; border: 1px solid #d1d5db; border-radius: 6px;
  font-size: 14px; color: #111827; text-align: left; line-height: 1;
}
.date-field:hover { background: #f9fafb; }
.date-field:focus-visible { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,.15); }
.date-field svg { flex-shrink: 0; color: #374151; }
.date-field .df-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.date-field .df-text.muted { color: #9ca3af; }
.date-field.sm { height: 28px; padding: 0 8px; gap: 4px; font-size: 12px; flex: 1; min-width: 0; }
.date-field.sm svg { width: 12px; height: 12px; }

/* ===== 下拉组合框（网站） ===== */
.combobox { position: relative; width: 100%; }
.combobox .cb-input { width: 100%; height: 30px; border: 1px solid #d1d5db; border-radius: 6px; padding: 0 32px 0 10px; background: #fff; font-size: 14px; color: #111827; }
.combobox .cb-input::placeholder { color: #9ca3af; }
.combobox .cb-input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,.15); }
.combobox .cb-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: none; border: none; padding: 4px; display: inline-flex; align-items: center; line-height: 0; color: #6b7280; }
.combobox .cb-toggle:hover { color: #374151; }
.combobox .cb-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60; background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; box-shadow: 0 10px 25px rgba(0,0,0,.1); max-height: 180px; overflow-y: auto; padding: 4px; min-width: 170px; }
.combobox .cb-option { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 6px 8px; font-size: 13px; color: #374151; background: none; border: none; border-radius: 4px; }
.combobox .cb-option:hover, .combobox .cb-option.active { background: #f3f4f6; }
/* 网站编号：仅用于检索的灰色小字 */
.combobox .cb-hint { flex: 0 0 auto; min-width: 14px; font-size: 11px; color: #9ca3af; font-variant-numeric: tabular-nums; text-align: right; }
.combobox .cb-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combobox.sm .cb-option { padding: 4px 6px; font-size: 12px; }
.combobox.sm .cb-input { height: 28px; font-size: 12px; padding: 0 24px 0 8px; }
.combobox.sm .cb-toggle svg { width: 12px; height: 12px; }

/* ===== 下拉选择（用户） ===== */
.select-wrap { position: relative; display: block; width: 100%; }
.select-input { width: 100%; height: 30px; border: 1px solid #d1d5db; border-radius: 6px; padding: 0 30px 0 10px; background: #fff; font-size: 14px; color: #111827; appearance: none; -webkit-appearance: none; }
.select-input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,.15); }
.select-input.invalid { border-color: #dc2626; }
.select-wrap::after {
  content: ''; position: absolute; right: 12px; top: 50%; width: 12px; height: 12px; transform: translateY(-50%);
  background: no-repeat center/12px 12px url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
  pointer-events: none;
}
.select-wrap.sm .select-input { height: 28px; font-size: 12px; padding: 0 22px 0 8px; }
.select-wrap.sm::after { right: 8px; width: 10px; height: 10px; background-size: 10px 10px; }

/* ===== 日历弹层 ===== */
.popover { position: absolute; z-index: 200; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; box-shadow: 0 12px 30px rgba(0,0,0,.12); }
.calendar-popover { width: 266px; padding: 10px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-title { font-size: 13px; font-weight: 600; color: #111827; }
.cal-nav { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e5e7eb; border-radius: 6px; background: #fff; color: #374151; line-height: 0; padding: 0; }
.cal-nav:hover { background: #f3f4f6; }
.cal-nav svg { width: 14px; height: 14px; }
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 2px; }
.cal-week span { text-align: center; font-size: 11px; color: #9ca3af; padding: 4px 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-day { height: 32px; border: none; background: none; border-radius: 6px; font-size: 13px; color: #111827; display: inline-flex; align-items: center; justify-content: center; }
.cal-day:hover { background: #f3f4f6; }
.cal-day.out { color: #d1d5db; }
.cal-day.today { box-shadow: inset 0 0 0 1px #93c5fd; }
.cal-day.selected { background: #2563eb; color: #fff; }
.cal-day.selected:hover { background: #1d4ed8; }

/* ===== IP 资源页筛选栏 ===== */
#ip-filter .filter-field { display: flex; align-items: center; gap: 2px; }
#ip-filter .filter-field label { font-size: 12px; color: #6b7280; white-space: nowrap; }
#ip-filter input, #ip-filter select { height: 30px; padding: 0 10px; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; font-size: 13px; }
#ip-filter input { width: 240px; }
#ip-filter input:focus, #ip-filter select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 2px rgba(37,99,235,.12); }
#ip-filter select { min-width: 160px; }
#ip-filter .filter-actions { display: flex; gap: 6px; }
.combobox .cb-tail { flex: 0 0 auto; font-size: 12px; }

/* IP 弹窗：归属地输入框加长 */
.modal.ip-modal { max-width: 720px; }
.ip-loc-row { display: flex; align-items: center; gap: 6px; }
.ip-loc-input { flex: 1 1 auto; min-width: 320px; width: 100%; }

/* ===== 聊天室 ===== */
.chat-wrap { display: flex; flex-direction: column; gap: 10px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px 16px; height: calc(100vh - 200px); min-height: 420px; }
.chat-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.chat-sub { font-size: 12px; color: #9ca3af; }
.chat-list { flex: 1 1 auto; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px; }
.chat-empty { margin: auto; color: #9ca3af; font-size: 13px; text-align: center; }
.chat-msg { max-width: 78%; background: #f3f4f6; border-radius: 10px; padding: 8px 12px; align-self: flex-start; display: flex; gap: 8px; align-items: flex-start; }
.chat-msg.mine { background: #dbeafe; align-self: flex-end; flex-direction: row-reverse; }
.chat-msg-body { flex: 1 1 auto; min-width: 0; }
.chat-avatar { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 999px; object-fit: cover; }
.chat-avatar-text { background: #dbeafe; color: #1d4ed8; font-weight: 600; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.chat-msg.mine .chat-avatar-text { background: #bfdbfe; color: #1e40af; }
.chat-msg-head { display: flex; gap: 8px; align-items: baseline; margin-bottom: 2px; }
.chat-msg-user { font-size: 12px; font-weight: 600; color: #2563eb; }
.chat-msg.mine .chat-msg-user { color: #1d4ed8; }
.chat-msg-time { font-size: 11px; color: #9ca3af; }
.chat-msg-text { font-size: 14px; color: #111827; word-break: break-all; white-space: pre-wrap; }
.chat-ment { color: #2563eb; font-weight: 600; background: #e0e9ff; border-radius: 4px; padding: 0 3px; }
.chat-input-row { position: relative; display: flex; gap: 8px; }
.chat-input-row input { flex: 1 1 auto; height: 38px; border: 1px solid #d1d5db; border-radius: 8px; padding: 0 12px; font-size: 14px; }
.chat-input-row input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 2px rgba(37,99,235,.12); }
.chat-mention-pop { position: absolute; bottom: calc(100% + 6px); left: 0; min-width: 200px; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 4px; z-index: 60; }
.chat-mention-item { display: block; width: 100%; text-align: left; border: none; background: none; padding: 7px 10px; font-size: 13px; border-radius: 6px; cursor: pointer; color: #111827; }
.chat-mention-item:hover, .chat-mention-item.on { background: #eff6ff; color: #2563eb; }
.nav-badge.chat { background: #f59e0b; }

/* 顶部 @提醒横幅（不挡操作，10 秒自动消失） */
.chat-mention-toast { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 10px; background: #111827; color: #f9fafb; border-radius: 10px; padding: 10px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: min(560px, calc(100vw - 32px)); cursor: pointer; animation: modal-in .18s ease; }
.chat-mention-toast .cmt-icon { font-size: 16px; }
.chat-mention-toast .cmt-body { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-mention-toast .cmt-body b { color: #fbbf24; }
.chat-mention-toast .cmt-go { flex: 0 0 auto; border: none; background: #2563eb; color: #fff; font-size: 12px; border-radius: 6px; padding: 4px 10px; cursor: pointer; }
.chat-mention-toast .cmt-go:hover { background: #1d4ed8; }
.chat-mention-toast .cmt-x { flex: 0 0 auto; border: none; background: none; color: #9ca3af; cursor: pointer; font-size: 12px; padding: 2px; }
.chat-mention-toast .cmt-x:hover { color: #fff; }

/* 聊天室：图片 + 声音开关 */
.chat-msg-img { margin-top: 6px; }
.chat-msg-img img { max-width: 240px; max-height: 200px; border-radius: 8px; cursor: pointer; display: block; }
.chat-img-btn { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid #d1d5db; border-radius: 8px; cursor: pointer; color: #6b7280; transition: color .15s, border-color .15s; }
.chat-img-btn:hover { color: var(--blue); border-color: var(--blue); }
.chat-sound-toggle { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; cursor: pointer; font-size: 12px; color: #6b7280; }
.chat-sound-toggle input { width: 14px; height: 14px; cursor: pointer; }
.chat-sound-icon { font-size: 15px; }
.ip-hist-btn { margin-left: 6px; padding: 1px 6px; font-size: 11px; line-height: 16px; color: #2563eb; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 4px; cursor: pointer; white-space: nowrap; }
.ip-hist-btn:hover { background: #dbeafe; border-color: #93c5fd; }
.ip-user-cell { white-space: nowrap; }
.chat-sound-select { flex: 0 0 auto; max-width: 168px; height: 26px; padding: 0 6px; font-size: 12px; color: #374151; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; cursor: pointer; }
.chat-sound-select:hover { border-color: var(--blue); }
.chat-sound-test { flex: 0 0 auto; height: 26px; padding: 0 10px; font-size: 12px; color: #374151; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.chat-sound-test:hover { border-color: var(--blue); background: #eff6ff; color: var(--blue); }
.chat-clear-btn { flex: 0 0 auto; padding: 4px 12px; font-size: 12px; border: 1px solid #fca5a5; background: #fef2f2; color: #dc2626; border-radius: 6px; cursor: pointer; transition: background .15s, border-color .15s; }
.chat-clear-btn:hover { background: #fee2e2; border-color: #f87171; }
.chat-clear-btn:disabled { opacity: .5; cursor: not-allowed; }

/* 聊天室：表情按钮 + 表情面板 */
.chat-emoji-btn { flex: 0 0 auto; width: 38px; height: 38px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; cursor: pointer; font-size: 18px; line-height: 1; display: flex; align-items: center; justify-content: center; transition: border-color .15s, background .15s; }
.chat-emoji-btn:hover { border-color: var(--blue); background: #eff6ff; }
.chat-emoji-panel { position: absolute; bottom: calc(100% + 6px); left: 0; display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; width: 340px; max-height: 224px; overflow-y: auto; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: 8px; z-index: 70; }
.chat-emoji-item { border: none; background: transparent; font-size: 20px; line-height: 1; padding: 5px 0; cursor: pointer; border-radius: 6px; transition: background .1s; }
.chat-emoji-item:hover { background: #f3f4f6; }

/* 聊天室：私聊入口按钮 */
.chat-pm-btn { position: relative; flex: 0 0 auto; padding: 4px 12px; font-size: 12px; border: 1px solid #bfdbfe; background: #eff6ff; color: #2563eb; border-radius: 6px; cursor: pointer; transition: background .15s; }
.chat-pm-btn:hover { background: #dbeafe; }
.pm-badge { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #ef4444; color: #fff; font-size: 10px; line-height: 16px; display: inline-flex; align-items: center; justify-content: center; }

/* 同页双栏：左侧会话列表 + 右侧聊天区 */
.chat-split { flex-direction: row; gap: 0; padding: 0; overflow: hidden; }
.chat-side { flex: 0 0 220px; display: flex; flex-direction: column; border-right: 1px solid #eef0f3; background: #fafbfc; }
.chat-side-head { padding: 12px 14px; font-size: 12px; font-weight: 600; color: #6b7280; border-bottom: 1px solid #eef0f3; }
.chat-side-list { flex: 1 1 auto; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.chat-side-loading { padding: 24px; text-align: center; color: #9ca3af; font-size: 12px; }
.chat-side-item { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; border: none; background: transparent; padding: 8px 9px; border-radius: 9px; cursor: pointer; text-align: left; transition: background .12s; }
.chat-side-item:hover { background: #eef2f7; }
.chat-side-item.on { background: #e0edff; }
.chat-side-item.on .csi-name { color: #1e40af; }
/* 聊天室（公共频道）与会员私聊的视觉区分 */
.chat-side-sep { padding: 9px 10px 4px; font-size: 11px; font-weight: 700; color: #94a3b8; letter-spacing: .02em; }
.chat-side-sep:first-child { padding-top: 5px; }
.chat-side-item.room { background: #eff6ff; border: 1px solid #bfdbfe; }
.chat-side-item.room:hover { background: #e0edff; }
.chat-side-item.room.on { background: #dbeafe; border-color: #60a5fa; box-shadow: inset 3px 0 0 #2563eb; }
.chat-side-item.room .csi-name { color: #1d4ed8; font-weight: 700; }
.chat-side-item.room .csi-preview { color: #60a5fa; }
.chat-side-item:not(.room) { border-left: 3px solid transparent; }
.chat-side-item:not(.room).on { border-left-color: #94a3b8; }
.csi-avatar { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; object-fit: cover; display: flex; align-items: center; justify-content: center; font-size: 15px; background: #e5e7eb; color: #4b5563; }
.csi-avatar-room { background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: #fff; font-size: 14px; box-shadow: 0 2px 6px rgba(37,99,235,.35); }
.csi-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.csi-name { font-size: 13px; font-weight: 600; color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.csi-preview { font-size: 11px; color: #9ca3af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.csi-preview-empty { color: #c3cad6; }
.chat-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; }
.pm-visibility { flex: 0 0 auto; font-size: 11px; font-weight: 600; color: #b45309; background: #fef3c7; border: 1px solid #fde68a; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.pm-unread { flex: 0 0 auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ef4444; color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }

@media (max-width: 720px) {
  .chat-split { flex-direction: column; }
  .chat-side { flex: 0 0 auto; max-height: 168px; border-right: none; border-bottom: 1px solid #eef0f3; }
}

/* 聊天室：图片放大遮罩 */
.chat-img-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; padding: 32px; }
.chat-img-overlay img { max-width: 92vw; max-height: 90vh; border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,.5); }
.chat-img-close { position: fixed; top: 20px; right: 28px; background: rgba(255,255,255,.15); border: none; color: #fff; font-size: 22px; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.chat-img-close:hover { background: rgba(255,255,255,.3); }

/* ============================ AI 今日数据洞察 ============================ */
.ai-card { background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(238,242,255,.75)); border: 1px solid rgba(199,210,254,.7); }
.ai-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ai-body { min-height: 48px; }
.ai-loading { color: #6b7280; font-size: 13px; display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.ai-spinner { width: 14px; height: 14px; border: 2px solid #c7d2fe; border-top-color: #4f46e5; border-radius: 50%; display: inline-block; animation: ai-spin .8s linear infinite; }
@keyframes ai-spin { to { transform: rotate(360deg); } }
.ai-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ai-badge { font-size: 11px; font-weight: 600; color: #4f46e5; background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 999px; padding: 2px 10px; }
.ai-badge-gpt { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.ai-time { font-size: 12px; color: #9ca3af; }
.ai-warn { font-size: 12px; color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 6px 10px; margin-bottom: 8px; }
.ai-lines { margin: 0; padding: 0; list-style: none; }
.ai-lines li { position: relative; font-size: 13.5px; line-height: 1.75; color: #1f2937; padding: 4px 0 4px 20px; }
.ai-lines li + li { border-top: 1px dashed rgba(229,231,235,.8); }
.ai-lines li::before { content: ''; position: absolute; left: 4px; top: 14px; width: 7px; height: 7px; border-radius: 50%; background: linear-gradient(135deg, #6366f1, #3b82f6); }

/* AI 双模型对比块 */
.ai-model-block + .ai-model-block { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(199,210,254,.6); }
.ai-model-name { display: inline-block; font-size: 12px; font-weight: 700; color: #3730a3; background: rgba(224,231,255,.8); border-radius: 6px; padding: 2px 8px; margin-bottom: 6px; }

/* 本地分析标签（区别于 AI 模型标签） */
.ai-model-local { color: #065f46; background: rgba(209,250,229,.85); }

/* IP 筛选栏：操作按钮与筛选同排 */
#ip-filter .filter-actions { margin-left: auto; flex-wrap: wrap; align-items: center; }
#ip-filter .filter-actions .btn { height: 30px; line-height: 28px; padding: 0 12px; font-size: 12.5px; }

/* IP 状态：失败原因悬停宽提示框（不占行高） */
.ip-tip { position: relative; display: inline-block; cursor: help; }
.ip-tip .ip-tip-box { display: none; position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: 340px; padding: 8px 12px; background: #1f2937; color: #fff; font-size: 12.5px; line-height: 1.6; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.22); z-index: 60; white-space: normal; word-break: break-all; }
.ip-tip .ip-tip-box::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: #1f2937; }
.ip-tip:hover .ip-tip-box { display: block; }

/* ================= IP 筛选栏美化 ================= */
#ip-filter { background: linear-gradient(180deg, #fbfcfe, #f6f8fb); border: 1px solid #e8ecf3; border-radius: 12px; padding: 4px 14px; box-shadow: 0 2px 8px rgba(15,23,42,.05); gap: 12px; }
#ip-filter .filter-field label { color: #64748b; font-weight: 600; }
#ip-filter input, #ip-filter select { height: 30px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; transition: border-color .15s, box-shadow .15s; }
#ip-filter input:hover, #ip-filter select:hover { border-color: #cbd5e1; }
#ip-filter input:focus, #ip-filter select:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.14); }
#ip-fq { padding-left: 30px !important; background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='m21 21-4.3-4.3'/></svg>") no-repeat 10px center; }
#ip-filter .filter-actions { margin-left: auto; gap: 8px; }
#ip-filter .filter-actions::before { content: ''; width: 1px; height: 22px; background: #e2e8f0; margin-right: 4px; }
#ip-filter .filter-actions .btn { height: 30px; line-height: 28px; padding: 0 13px; font-size: 12.5px; font-weight: 500; border-radius: 8px; border: 1px solid #e2e8f0; background: #fff; color: #475569; box-shadow: 0 1px 2px rgba(15,23,42,.04); transition: all .15s; }
#ip-filter .filter-actions .btn:hover { border-color: #93c5fd; color: #2563eb; background: #eff6ff; transform: translateY(-1px); box-shadow: 0 3px 8px rgba(37,99,235,.12); }
#ip-filter .filter-actions .btn:active { transform: translateY(0); box-shadow: none; }
#ip-filter .filter-actions .btn.btn-primary { background: linear-gradient(135deg, #3b82f6, #2563eb); border-color: transparent; color: #fff; font-weight: 600; box-shadow: 0 3px 10px rgba(37,99,235,.3); }
#ip-filter .filter-actions .btn.btn-primary:hover { background: linear-gradient(135deg, #4f8ff7, #1d6ae5); color: #fff; transform: translateY(-1px); box-shadow: 0 5px 14px rgba(37,99,235,.38); }
/* 筛选栏强制一排：窄屏时横向滚动，不换行 */
#ip-filter { flex-wrap: nowrap; overflow-x: auto; }
#ip-filter .filter-actions { flex-wrap: nowrap; }
#ip-filter input { width: 130px; }
#ip-filter select { min-width: 96px; width: 96px; }
#ip-filter .filter-actions .btn { padding: 0 10px; font-size: 12px; }
#ip-filter .filter-actions { gap: 6px; }
#ip-filter .filter-actions::before { margin-right: 2px; }
/* 重置按钮移到「使用用户」筛选后面：与右侧操作按钮同款外观 */
#ip-filter .filter-field .btn { height: 30px; line-height: 28px; padding: 0 13px; font-size: 12.5px; font-weight: 500; border-radius: 8px; }

/* IP 表格：前四列紧凑，状态列加宽 */
#ip-table .data-table td { padding: 8px 8px; }
#ip-table .data-table th { padding: 4px 8px; }
#ip-table .data-table td:nth-child(1), #ip-table .data-table td:nth-child(2),
#ip-table .data-table td:nth-child(3), #ip-table .data-table td:nth-child(4) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 0; }
#ip-table .data-table td:nth-child(4) { letter-spacing: 0; }
#ip-table .data-table td:nth-child(7) { white-space: nowrap; }
#ip-table table.data-table { table-layout: fixed; }
#ip-table .data-table td:nth-child(1) span.ip-dup-tag { display: inline-block; }

/* IP 状态：徽章+时间+失败原因同排一行（超长省略号，悬停看全文） */
#ip-table .data-table td:nth-child(7) { white-space: nowrap; }
.ip-fail-reason { font-size: 11px; color: #dc2626; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; flex-shrink: 1; min-width: 0; cursor: help; }
#ip-table .data-table td:nth-child(5), #ip-table .data-table td:nth-child(8) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* IP 状态：徽章+时间同排 */
.ip-status-line { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; min-width: 0; }
.ip-time-inline { font-size: 11px; color: #9ca3af; white-space: nowrap; }

/* IP 表格：去掉到期时间列后的序号修正（状态=6，用户=7，归属地=5） */
#ip-table .data-table td:nth-child(6) { white-space: nowrap; }
#ip-table .data-table td:nth-child(7) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ip-table .data-table td:nth-child(5) { white-space: normal; overflow: visible; text-overflow: unset; }

/* 备注列收窄，超长省略 */
#ip-table .data-table td.remark-cell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============================ 我的备忘录 ============================ */
.memo-card { background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(255,251,235,.7)); border: 1px solid rgba(253,230,138,.7); }
.memo-count { font-size: 12px; color: #b45309; background: #fef3c7; border-radius: 999px; padding: 2px 10px; }
.memo-add { display: flex; gap: 8px; margin-bottom: 12px; }
.memo-add input[type="text"], .memo-add input:not([type]) { flex: 1 1 auto; min-width: 0; height: 36px; padding: 0 12px; border: 1px solid #e7e5df; border-radius: 8px; font-size: 13px; background: #fff; }
.memo-add input:focus { outline: none; border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.14); }
.memo-add input[type="datetime-local"] { width: 210px; height: 36px; padding: 0 10px; border: 1px solid #e7e5df; border-radius: 8px; font-size: 12.5px; color: #57534e; background: #fff; }
.memo-add .btn { height: 36px; white-space: nowrap; }
.memo-list { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.memo-empty { padding: 22px 0; text-align: center; font-size: 13px; color: #a8a29e; }
.memo-item { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #f0ede6; border-left: 4px solid var(--memo-color, #6366f1); border-radius: 10px; padding: 9px 12px; box-shadow: 0 1px 3px rgba(0,0,0,.04); transition: box-shadow .15s, transform .15s; }
.memo-item:hover { box-shadow: 0 3px 10px rgba(0,0,0,.08); transform: translateY(-1px); }
.memo-check { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--memo-color, #6366f1); background: #fff; color: #fff; font-size: 12px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.memo-item.done .memo-check { background: var(--memo-color, #6366f1); }
.memo-body { flex: 1 1 auto; min-width: 0; }
.memo-text { font-size: 13.5px; color: #1f2937; word-break: break-all; }
.memo-item.done .memo-text { color: #a8a29e; text-decoration: line-through; }
.memo-time { display: inline-block; margin-top: 3px; font-size: 11.5px; color: #b45309; background: #fef3c7; border-radius: 6px; padding: 1px 8px; }
.memo-time.overdue { color: #dc2626; background: #fee2e2; animation: memo-blink 1.2s ease-in-out infinite; }
@keyframes memo-blink { 50% { opacity: .55; } }
.memo-del { flex: 0 0 auto; border: none; background: none; color: #d6d3d1; font-size: 13px; cursor: pointer; padding: 4px; border-radius: 6px; }
.memo-del:hover { color: #dc2626; background: #fee2e2; }
.memo-due-item { display: flex; gap: 10px; align-items: baseline; padding: 8px 10px; border-radius: 8px; background: #fffbeb; border: 1px solid #fde68a; font-size: 13.5px; color: #1f2937; }
.memo-due-item + .memo-due-item { margin-top: 6px; }
.memo-due-time { flex: 0 0 auto; font-size: 12px; color: #b45309; font-weight: 600; }

/* 归属地固定宽度单行省略，备注自适应剩余宽度 */
#ip-table .data-table td:nth-child(5) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 最后登录IP */
.login-ip { font-family: Consolas, Monaco, monospace; font-size: 12.5px; color: #0369a1; background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 6px; padding: 1px 8px; }

/* ===================== 炫酷（霓虹）主题 ===================== */
html[data-theme="neon"] {
  --neon-text: #e9ebff;
  --neon-muted: #9aa0c7;
  --neon-surface: #15162e;
  --neon-surface2: #1d1f3a;
  --neon-border: rgba(124,97,255,.38);
  --neon-blue: #38bdf8;
  --neon-cyan: #22d3ee;
  --neon-purple: #a855f7;
  --neon-green: #34d399;
  --neon-orange: #fb923c;
  --neon-red: #f87171;
}
html[data-theme="neon"] body {
  color: var(--neon-text);
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(168,85,247,.18), transparent 60%),
    radial-gradient(1000px 500px at 100% 0%, rgba(34,211,238,.15), transparent 55%),
    linear-gradient(180deg, #0a0a1a 0%, #0c0c1f 60%, #0a0a16 100%);
  background-attachment: fixed;
}

/* 顶部导航 */
html[data-theme="neon"] .topnav {
  background: rgba(13,14,30,.72);
  border-bottom: 1px solid var(--neon-border);
  box-shadow: 0 4px 24px rgba(124,97,255,.18);
  backdrop-filter: blur(10px);
}
html[data-theme="neon"] .brand { color: #fff; text-shadow: 0 0 12px rgba(124,97,255,.6); }
html[data-theme="neon"] .topnav nav { background: rgba(255,255,255,.05); }
html[data-theme="neon"] .nav-link { color: var(--neon-muted); }
html[data-theme="neon"] .nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
html[data-theme="neon"] .nav-link.active {
  background: linear-gradient(135deg, #a855f7, #22d3ee); color: #fff; font-weight: 600;
  box-shadow: 0 0 16px rgba(124,97,255,.55);
}
html[data-theme="neon"] .nav-link.admin-link { color: #fbbf24; background: rgba(251,191,36,.12); }
html[data-theme="neon"] .user-badge-btn:hover { background: rgba(255,255,255,.07); }
html[data-theme="neon"] .avatar { background: rgba(56,189,248,.18); color: #7dd3fc; }
html[data-theme="neon"] .admin-chip { background: rgba(251,191,36,.14); color: #fbbf24; }
html[data-theme="neon"] .dropdown { background: #15162e; border: 1px solid var(--neon-border); box-shadow: 0 10px 30px rgba(0,0,0,.5); }
html[data-theme="neon"] .dropdown-item { color: var(--neon-text); }
html[data-theme="neon"] .dropdown-item:hover { background: rgba(255,255,255,.06); }
html[data-theme="neon"] .icon-btn, html[data-theme="neon"] .theme-btn { color: var(--neon-cyan); }
html[data-theme="neon"] .theme-btn {
  border: 1px solid var(--neon-border); background: rgba(168,85,247,.14);
  border-radius: 999px; padding: 6px; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 0 12px rgba(168,85,247,.35);
}
html[data-theme="neon"] .theme-btn:hover { background: rgba(34,211,238,.18); }

/* 页面底色 */
html[data-theme="neon"] .page,
html[data-theme="neon"] .page.dash { background: transparent; }
html[data-theme="neon"] .page-title { color: #fff; }

/* 卡片/面板 */
html[data-theme="neon"] .stat-card,
html[data-theme="neon"] .chart-card,
html[data-theme="neon"] .filter-bar,
html[data-theme="neon"] .memo-card,
html[data-theme="neon"] .ai-card,
html[data-theme="neon"] .table-wrap {
  background: var(--neon-surface);
  border: 1px solid var(--neon-border);
  box-shadow: 0 2px 18px rgba(124,97,255,.12);
}
html[data-theme="neon"] .chart-title,
html[data-theme="neon"] .section-title h2,
html[data-theme="neon"] .ai-head .chart-title { color: #fff; }
html[data-theme="neon"] .section-title .bar { background: linear-gradient(135deg, #a855f7, #22d3ee); }

/* 统计卡 */
html[data-theme="neon"] .stat-card .stat-title { color: var(--neon-muted); }
html[data-theme="neon"] .stat-card .stat-value { color: #fff; }
html[data-theme="neon"] .stat-card .accent.accent-green { background: var(--neon-green); }
html[data-theme="neon"] .stat-card .accent.accent-orange { background: var(--neon-orange); }
html[data-theme="neon"] .stat-card .accent.accent-red { background: var(--neon-red); }
html[data-theme="neon"] .stat-card .accent.accent-purple { background: var(--neon-purple); }
html[data-theme="neon"] .stat-icon.green { background: rgba(52,211,153,.16); color: var(--neon-green); }
html[data-theme="neon"] .stat-icon.orange { background: rgba(251,146,60,.16); color: var(--neon-orange); }
html[data-theme="neon"] .stat-icon.purple { background: rgba(168,85,247,.16); color: var(--neon-purple); }
html[data-theme="neon"] .pig-pos { color: var(--neon-green) !important; }
html[data-theme="neon"] .pig-neg { color: var(--neon-red) !important; }

/* 汇总卡 */
html[data-theme="neon"] .summary-card { background: var(--neon-surface2); border: 1px solid var(--neon-border); }
html[data-theme="neon"] .summary-card .sc-label { color: var(--neon-muted); }
html[data-theme="neon"] .summary-card .sc-value { color: #fff; }
html[data-theme="neon"] .summary-card.deposit .sc-value { color: var(--neon-green); }
html[data-theme="neon"] .summary-card.withdraw .sc-value { color: var(--neon-orange); }
html[data-theme="neon"] .summary-card.balance.pos { background: linear-gradient(135deg, rgba(52,211,153,.18), rgba(52,211,153,.06)); border-color: rgba(52,211,153,.5); }
html[data-theme="neon"] .summary-card.balance.pos .sc-value { color: var(--neon-green); }
html[data-theme="neon"] .summary-card.balance.neg { background: linear-gradient(135deg, rgba(248,113,113,.18), rgba(248,113,113,.06)); border-color: rgba(248,113,113,.5); }
html[data-theme="neon"] .summary-card.balance.neg .sc-value { color: var(--neon-red); }

/* 图表文字 */
html[data-theme="neon"] .axis-label { fill: var(--neon-muted); }
html[data-theme="neon"] .trend-tabs,
html[data-theme="neon"] .tabs { background: rgba(255,255,255,.05); }
html[data-theme="neon"] .tab-btn { color: var(--neon-muted); }
html[data-theme="neon"] .tab-btn.active { background: linear-gradient(135deg, #a855f7, #22d3ee); color: #fff; box-shadow: 0 0 12px rgba(124,97,255,.4); }
html[data-theme="neon"] .trend-users .tu-btn { background: var(--neon-surface2); border-color: var(--neon-border); color: #fff; }
html[data-theme="neon"] .trend-users .tu-arrow { color: var(--neon-muted); }
html[data-theme="neon"] .trend-dd .tu-panel { background: #15162e; border: 1px solid var(--neon-border); box-shadow: 0 8px 28px rgba(0,0,0,.55); }
html[data-theme="neon"] .trend-dd .tu-item { color: var(--neon-text); }
html[data-theme="neon"] .trend-dd .tu-item:hover { background: rgba(255,255,255,.06); }
html[data-theme="neon"] .trend-bar { filter: drop-shadow(0 0 6px rgba(124,97,255,.45)); }

/* 表格 */
html[data-theme="neon"] table.data-table { background: transparent; }
html[data-theme="neon"] table.data-table th {
  background: #1a1c38; color: var(--neon-muted);
  border-bottom: 1px solid var(--neon-border);
}
html[data-theme="neon"] table.data-table td {
  color: var(--neon-text); border-bottom: 1px solid rgba(255,255,255,.06);
}
html[data-theme="neon"] table.data-table td.num { color: #fff; }
html[data-theme="neon"] table.data-table tbody tr:hover { background: rgba(255,255,255,.04); }
html[data-theme="neon"] .table-empty, .account-empty { color: var(--neon-muted); }

/* 表单 / 输入 */
html[data-theme="neon"] input, html[data-theme="neon"] select, html[data-theme="neon"] textarea {
  background: #0f1024; color: #fff; border: 1px solid rgba(255,255,255,.14);
}
html[data-theme="neon"] input::placeholder, html[data-theme="neon"] textarea::placeholder { color: #6b7099; }
html[data-theme="neon"] .filter-field input:focus,
html[data-theme="neon"] .filter-field select:focus,
html[data-theme="neon"] .form-field input:focus, html[data-theme="neon"] .form-field select:focus, html[data-theme="neon"] .form-field textarea:focus {
  border-color: var(--neon-cyan); box-shadow: 0 0 0 2px rgba(34,211,238,.25);
}
html[data-theme="neon"] .form-field label { color: var(--neon-muted); }

/* 按钮 */
html[data-theme="neon"] .btn-primary { background: linear-gradient(135deg, #38bdf8, #6366f1); border: none; color: #fff; box-shadow: 0 0 16px rgba(56,189,248,.4); }
html[data-theme="neon"] .btn-primary:hover:not(:disabled) { filter: brightness(1.1); }
html[data-theme="neon"] .btn-outline { background: transparent; border-color: var(--neon-border); color: #fff; }
html[data-theme="neon"] .btn-outline:hover:not(:disabled) { background: rgba(255,255,255,.07); }

/* 弹窗 */
html[data-theme="neon"] .modal { background: #15162e; border: 1px solid var(--neon-border); box-shadow: 0 24px 60px rgba(0,0,0,.6); }
html[data-theme="neon"] .geo-confirm-text { color: var(--neon-text); }
html[data-theme="neon"] .geo-confirm-text b { color: #fff; }
html[data-theme="neon"] .geo-confirm-chk { background: rgba(255,255,255,.05); border-color: var(--neon-border); color: var(--neon-text); }
html[data-theme="neon"] .geo-confirm-chk b { color: #fff; }
html[data-theme="neon"] .modal-title { color: #fff; }
html[data-theme="neon"] .modal-close { color: var(--neon-muted); }
html[data-theme="neon"] .modal-close:hover { background: rgba(255,255,255,.07); color: #fff; }
html[data-theme="neon"] .modal-mask { background: rgba(5,5,15,.7); }

/* 备忘录 / 洞察 */
html[data-theme="neon"] .memo-item { border-left-color: var(--memo-color, #6366f1); }
html[data-theme="neon"] .ai-lines li { color: var(--neon-text); }
html[data-theme="neon"] .withdraw-banner { background: rgba(248,113,113,.12); color: #fecaca; }
html[data-theme="neon"] .backup-banner { background: rgba(251,191,36,.1); border-color: rgba(251,191,36,.4); }
html[data-theme="neon"] .backup-banner-text strong { color: #fbbf24; }

/* ============ 霓虹主题补强：确保各页面文字在深色背景下都清晰可读 ============ */
/* 1) 浅色容器改为深色表面 */
html[data-theme="neon"] .panel,
html[data-theme="neon"] .admin-card,
html[data-theme="neon"] .acc-card,
html[data-theme="neon"] .chat-wrap,
html[data-theme="neon"] .chat-side,
html[data-theme="neon"] .chat-main,
html[data-theme="neon"] .auth-card,
html[data-theme="neon"] .auth-page,
html[data-theme="neon"] .popover,
html[data-theme="neon"] .combobox .cb-list,
html[data-theme="neon"] .date-field,
html[data-theme="neon"] .level-chip,
html[data-theme="neon"] .color-pop,
html[data-theme="neon"] .chat-mention-pop,
html[data-theme="neon"] .chat-emoji-panel,
html[data-theme="neon"] .prev-box,
html[data-theme="neon"] .black-tip,
html[data-theme="neon"] .alert-danger,
html[data-theme="neon"] .ip-import-tip,
html[data-theme="neon"] .memo-item,
html[data-theme="neon"] .memo-due-item,
html[data-theme="neon"] .chart-empty {
  background: var(--neon-surface);
  border-color: var(--neon-border);
  color: var(--neon-text);
}
/* 2) 标题 / 说明 / 普通文字改浅色 */
html[data-theme="neon"] .panel-title,
html[data-theme="neon"] .admin-card-title,
html[data-theme="neon"] .admin-card-sub,
html[data-theme="neon"] .acc-card-name,
html[data-theme="neon"] .acc-card-count,
html[data-theme="neon"] .acc-card-users,
html[data-theme="neon"] .sub-title,
html[data-theme="neon"] .subtitle,
html[data-theme="neon"] .form-label,
html[data-theme="neon"] .form-hint,
html[data-theme="neon"] .ip-summary,
html[data-theme="neon"] .ip-ok-text,
html[data-theme="neon"] .ip-fail-text,
html[data-theme="neon"] .ip-check-time,
html[data-theme="neon"] .ip-loc,
html[data-theme="neon"] .ip-loc-empty,
html[data-theme="neon"] .ip-geo-hint,
html[data-theme="neon"] .breadcrumb-cur,
html[data-theme="neon"] .breadcrumb-sep,
html[data-theme="neon"] .log-lines,
html[data-theme="neon"] .chat-sub,
html[data-theme="neon"] .chat-empty,
html[data-theme="neon"] .chat-msg-text,
html[data-theme="neon"] .chat-msg-user,
html[data-theme="neon"] .chat-msg-time,
html[data-theme="neon"] .chat-ment,
html[data-theme="neon"] .csi-name,
html[data-theme="neon"] .csi-preview,
html[data-theme="neon"] .cal-title,
html[data-theme="neon"] .cal-week span,
html[data-theme="neon"] .cal-day,
html[data-theme="neon"] .memo-text,
html[data-theme="neon"] .memo-item.done .memo-text,
html[data-theme="neon"] .memo-time,
html[data-theme="neon"] .prev-title,
html[data-theme="neon"] .prev-sub,
html[data-theme="neon"] .prev-line,
html[data-theme="neon"] .prev-remark,
html[data-theme="neon"] .prev-hint,
html[data-theme="neon"] .auth-head h1,
html[data-theme="neon"] .auth-head p { color: var(--neon-text); }
/* 3) 分隔线 / 边框改浅 */
html[data-theme="neon"] .panel-head,
html[data-theme="neon"] .admin-card-head { border-bottom: 1px solid var(--neon-border); }
/* 4) 链接 / 强调色改霓虹青 */
html[data-theme="neon"] .breadcrumb a,
html[data-theme="neon"] .op-link,
html[data-theme="neon"] .icon-btn.blue,
html[data-theme="neon"] .chat-msg-user,
html[data-theme="neon"] .chat-ment,
html[data-theme="neon"] .ip-hist-btn { color: var(--neon-cyan); }
html[data-theme="neon"] .breadcrumb a:hover,
html[data-theme="neon"] .op-link:hover { color: #fff; }
html[data-theme="neon"] .ip-hist-btn:hover { background: rgba(34,211,238,.14); border-color: var(--neon-cyan); }
/* 5) 特殊状态色 */
html[data-theme="neon"] .overdue-text { color: var(--neon-red); }
html[data-theme="neon"] .overdue-dot { background: var(--neon-red); }
html[data-theme="neon"] .ip-ok-text { color: var(--neon-green); }
html[data-theme="neon"] .ip-fail-text { color: var(--neon-orange); }
html[data-theme="neon"] .ip-alert { background: rgba(248,113,113,.14); border-color: rgba(248,113,113,.5); color: #fecaca; }
html[data-theme="neon"] .lvl-stars { color: #fbbf24; }
html[data-theme="neon"] .lvl-black { background: rgba(255,255,255,.12); color: #fff; border: 1px solid var(--neon-border); }
html[data-theme="neon"] .lvl-none { color: var(--neon-muted); }
html[data-theme="neon"] .muted { color: var(--neon-muted); }
/* 6) 聊天气泡 / 头像 */
html[data-theme="neon"] .chat-msg { background: rgba(255,255,255,.06); }
html[data-theme="neon"] .chat-msg.mine { background: rgba(56,189,248,.14); }
html[data-theme="neon"] .chat-avatar-text { background: rgba(56,189,248,.18); color: var(--neon-cyan); }
html[data-theme="neon"] .chat-msg.mine .chat-avatar-text { background: rgba(34,211,238,.2); color: var(--neon-cyan); }
html[data-theme="neon"] .chat-ment { background: rgba(34,211,238,.18); color: var(--neon-cyan); }
html[data-theme="neon"] .chat-mention-item { color: var(--neon-text); }
html[data-theme="neon"] .chat-mention-item:hover,
html[data-theme="neon"] .chat-mention-item.on { background: rgba(255,255,255,.08); color: var(--neon-cyan); }
html[data-theme="neon"] .chat-emoji-item:hover { background: rgba(255,255,255,.08); }
html[data-theme="neon"] .csi-avatar { background: rgba(255,255,255,.1); color: var(--neon-text); }
/* 7) 行内操作 / 聊天控件按钮 */
html[data-theme="neon"] .row-actions .btn { color: var(--neon-muted); }
html[data-theme="neon"] .row-actions .btn:hover:not(:disabled) { background: rgba(255,255,255,.08); }
html[data-theme="neon"] .row-actions .btn.danger { color: var(--neon-red); }
html[data-theme="neon"] .row-actions .btn.danger:hover:not(:disabled) { background: rgba(248,113,113,.14); }
html[data-theme="neon"] .row-actions .btn.success { color: var(--neon-green); }
html[data-theme="neon"] .row-actions .btn.success:hover:not(:disabled) { background: rgba(52,211,153,.14); }
html[data-theme="neon"] .chat-img-btn,
html[data-theme="neon"] .chat-emoji-btn,
html[data-theme="neon"] .chat-pm-btn,
html[data-theme="neon"] .chat-sound-select,
html[data-theme="neon"] .chat-sound-test {
  background: var(--neon-surface2); border-color: var(--neon-border); color: var(--neon-text);
}
html[data-theme="neon"] .chat-img-btn:hover,
html[data-theme="neon"] .chat-emoji-btn:hover,
html[data-theme="neon"] .chat-pm-btn:hover,
html[data-theme="neon"] .chat-sound-test:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); background: rgba(34,211,238,.12); }
html[data-theme="neon"] .chat-clear-btn { background: rgba(248,113,113,.14); border-color: rgba(248,113,113,.5); color: var(--neon-red); }
html[data-theme="neon"] .chat-clear-btn:hover { background: rgba(248,113,113,.22); }
/* 8) 组合框 / 下拉 / 日期 / 等级 / 颜色 / 日历 */
html[data-theme="neon"] .combobox .cb-option { color: var(--neon-text); }
html[data-theme="neon"] .combobox .cb-option:hover,
html[data-theme="neon"] .combobox .cb-option.active { background: rgba(255,255,255,.08); }
html[data-theme="neon"] .select-input { background: var(--neon-surface2); border-color: var(--neon-border); color: var(--neon-text); }
html[data-theme="neon"] .date-field svg { color: var(--neon-muted); }
html[data-theme="neon"] .level-chip { color: var(--neon-text); }
html[data-theme="neon"] .level-chip:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); }
html[data-theme="neon"] .level-chip.is-selected { background: rgba(34,211,238,.18); border-color: var(--neon-cyan); color: var(--neon-cyan); box-shadow: 0 0 0 2px rgba(34,211,238,.18); }
html[data-theme="neon"] .level-chip.black { color: var(--neon-text); }
html[data-theme="neon"] .level-chip.black:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); }
html[data-theme="neon"] .level-chip.black.is-selected { background: var(--neon-purple); border-color: var(--neon-purple); color: #fff; box-shadow: 0 0 0 2px rgba(168,85,247,.25); }
html[data-theme="neon"] .color-swatch { border-color: rgba(255,255,255,.14); }
html[data-theme="neon"] .color-swatch.is-selected { box-shadow: 0 0 0 2px var(--neon-surface), 0 0 0 4px var(--neon-cyan); }
html[data-theme="neon"] .cal-nav { background: var(--neon-surface2); border-color: var(--neon-border); color: var(--neon-text); }
html[data-theme="neon"] .cal-nav:hover { background: rgba(255,255,255,.08); }
html[data-theme="neon"] .cal-day:hover { background: rgba(255,255,255,.08); }
html[data-theme="neon"] .cal-day.out { color: var(--neon-muted); }
html[data-theme="neon"] .cal-day.today { box-shadow: inset 0 0 0 1px var(--neon-cyan); }
html[data-theme="neon"] .cal-day.selected { background: var(--neon-blue); color: #fff; }
html[data-theme="neon"] .cal-day.selected:hover { background: var(--neon-blue); }
/* 9) 上次记录卡 / 黑等级提示 / 警告 */
html[data-theme="neon"] .prev-box { background: var(--neon-surface2); border-color: var(--neon-border); }
html[data-theme="neon"] .prev-time-fixed { background: rgba(255,255,255,.08); border-color: var(--neon-border); color: var(--neon-text); }
html[data-theme="neon"] .prev-edit .control:disabled { background: rgba(255,255,255,.06); color: var(--neon-text); -webkit-text-fill-color: var(--neon-text); border-color: var(--neon-border); }
html[data-theme="neon"] .black-tip { background: rgba(248,113,113,.14); border-color: rgba(248,113,113,.5); color: var(--neon-red); }
html[data-theme="neon"] .alert-danger { background: rgba(248,113,113,.14); border-color: rgba(248,113,113,.5); color: var(--neon-red); }
html[data-theme="neon"] .ip-import-tip code { background: rgba(255,255,255,.08); border-color: var(--neon-border); color: var(--neon-orange); }
/* 10) 备忘录 */
html[data-theme="neon"] .memo-due-item { background: rgba(251,191,36,.12); border-color: rgba(251,191,36,.4); color: var(--neon-text); }
html[data-theme="neon"] .memo-time { color: #fbbf24; background: rgba(251,191,36,.14); }
html[data-theme="neon"] .memo-count { color: #fbbf24; background: rgba(251,191,36,.14); }
html[data-theme="neon"] .memo-del { color: var(--neon-muted); }
html[data-theme="neon"] .memo-del:hover { color: var(--neon-red); background: rgba(248,113,113,.14); }
html[data-theme="neon"] .memo-add input { background: var(--neon-surface2); border-color: var(--neon-border); color: var(--neon-text); }
html[data-theme="neon"] .memo-add input:focus { border-color: var(--neon-cyan); box-shadow: 0 0 0 3px rgba(34,211,238,.18); }
html[data-theme="neon"] .memo-add input[type="datetime-local"] { color: var(--neon-text); }
/* 11) 登录页 / 侧栏会话 */
html[data-theme="neon"] .auth-page { background: linear-gradient(135deg, #0c0c1f, #15162e); }
html[data-theme="neon"] .auth-card { border-color: var(--neon-border); box-shadow: 0 10px 30px rgba(0,0,0,.5); }
html[data-theme="neon"] .chat-side { border-right-color: var(--neon-border); background: var(--neon-surface2); }
html[data-theme="neon"] .chat-side-head { color: var(--neon-muted); border-bottom-color: var(--neon-border); }
html[data-theme="neon"] .chat-side-item:hover { background: rgba(255,255,255,.06); }
html[data-theme="neon"] .chat-side-item.on { background: rgba(34,211,238,.16); }
html[data-theme="neon"] .chat-side-item.on .csi-name { color: var(--neon-cyan); }
html[data-theme="neon"] .chat-side-item.room { background: rgba(34,211,238,.1); border-color: rgba(34,211,238,.3); }
html[data-theme="neon"] .chat-side-item.room:hover { background: rgba(34,211,238,.16); }
html[data-theme="neon"] .chat-side-item.room.on { background: rgba(34,211,238,.2); border-color: var(--neon-cyan); box-shadow: inset 3px 0 0 var(--neon-cyan); }
html[data-theme="neon"] .chat-side-item.room .csi-name { color: var(--neon-cyan); }
html[data-theme="neon"] .chat-side-item.room .csi-preview { color: var(--neon-muted); }
html[data-theme="neon"] .chat-side-sep { color: var(--neon-muted); }
html[data-theme="neon"] .csi-preview-empty { color: var(--neon-muted); }
html[data-theme="neon"] .pm-visibility { background: rgba(251,191,36,.14); border-color: rgba(251,191,36,.4); color: #fbbf24; }
/* 12) IP 状态徽章 */
html[data-theme="neon"] .ip-badge.ok { background: rgba(52,211,153,.16); color: var(--neon-green); }
html[data-theme="neon"] .ip-badge.fail { background: rgba(251,146,60,.16); color: var(--neon-orange); border-color: rgba(251,146,60,.4); }
html[data-theme="neon"] .ip-badge.unknown { background: rgba(255,255,255,.08); color: var(--neon-muted); }
html[data-theme="neon"] .ip-dup-tag { background: rgba(251,191,36,.16); color: #fbbf24; }

/* ===================== 支付宝蓝主题（浅色主题，配色清爽） ===================== */
html[data-theme="alipay"] {
  --blue: #16A34A;
  --nav3d-slot-top: #dcecdc; --nav3d-slot-lo: #eef6ef; --nav3d-slot-border: rgba(21,128,61,.22); --nav3d-slot-inset: rgba(20,83,45,.16);
  --nav3d-face-top: #ffffff; --nav3d-face-lo: #e5f2ea; --nav3d-face-hover: #d4ead9; --nav3d-base: #a7cbb5; --nav3d-text: #334155; --nav3d-hover-text: #14532d;
  --nav3d-acc-top: #4ADE80; --nav3d-acc: #16A34A; --nav3d-acc-lo: #15803D; --nav3d-acc-base: #14532D; --nav3d-acc-glow: rgba(21,128,61,.30);
}
html[data-theme="alipay"] body {
  background: linear-gradient(180deg, #eaf3ff 0%, #f5f9ff 60%, #eef4ff 100%);
  color: #1f2937;
}
html[data-theme="alipay"] .page,
html[data-theme="alipay"] .page.dash { background: transparent; }
html[data-theme="alipay"] .topnav { background: rgba(255,255,255,.9); border-bottom: 1px solid #d5ecdd; }
html[data-theme="alipay"] .brand { color: #16A34A; }
html[data-theme="alipay"] .stat-card,
html[data-theme="alipay"] .chart-card,
html[data-theme="alipay"] .summary-card,
html[data-theme="alipay"] .panel,
html[data-theme="alipay"] .admin-card,
html[data-theme="alipay"] .acc-card,
html[data-theme="alipay"] .filter-bar,
html[data-theme="alipay"] .table-wrap,
html[data-theme="alipay"] .memo-card,
html[data-theme="alipay"] .ai-card { border-color: #d5ecdd; }
html[data-theme="alipay"] .section-title .bar { background: linear-gradient(to bottom, #16A34A, #22C55E); }
html[data-theme="alipay"] .stat-card .stat-icon.pig { background: #e6f4ea; color: #16A34A; }
html[data-theme="alipay"] .stat-card .stat-icon.pig-pos { background: #e6f7ee; color: #059669; }
html[data-theme="alipay"] .stat-card .stat-icon.pig-neg { background: #fdeaea; color: #dc2626; }
html[data-theme="alipay"] .op-link,
html[data-theme="alipay"] .icon-btn.blue,
html[data-theme="alipay"] .chat-msg-user,
html[data-theme="alipay"] .breadcrumb a { color: #16A34A; }
html[data-theme="alipay"] .op-link:hover,
html[data-theme="alipay"] .breadcrumb a:hover { color: #15803D; }
html[data-theme="alipay"] .level-chip.is-selected { border-color: #16A34A; background: #e6f4ea; color: #16A34A; box-shadow: 0 0 0 2px rgba(22,163,74,.15); }
html[data-theme="alipay"] .level-chip.black.is-selected { border-color: #111827; background: #111827; color: #fff; box-shadow: 0 0 0 2px rgba(17,24,39,.2); }
html[data-theme="alipay"] .cal-day.selected { background: #16A34A; color: #fff; }
html[data-theme="alipay"] .cal-day.selected:hover { background: #15803D; }
html[data-theme="alipay"] .tab-btn.active,
html[data-theme="alipay"] .trend-tabs .tab-btn.active { color: #16A34A; }
html[data-theme="alipay"] .csi-avatar-room { background: linear-gradient(135deg, #16A34A, #15803D); }
html[data-theme="alipay"] .color-swatch.is-selected { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #16A34A; }
html[data-theme="alipay"] .chat-side-item.room { background: #e6f4ea; border-color: #bce3cd; }
html[data-theme="alipay"] .chat-side-item.room.on { background: #d5ecdd; border-color: #16A34A; box-shadow: inset 3px 0 0 #16A34A; }
html[data-theme="alipay"] .chat-side-item.room .csi-name { color: #16A34A; }
html[data-theme="alipay"] .page-btn.active { background: #16A34A; }
html[data-theme="alipay"] .ip-chip { background: #e6f4ea; color: #15803D; border-color: #bce3cd; }
html[data-theme="alipay"] .ip-chip:hover { background: #d5ecdd; border-color: #86efac; }
html[data-theme="alipay"] .filter-field input:focus,
html[data-theme="alipay"] .filter-field select:focus,
html[data-theme="alipay"] .form-field input:focus,
html[data-theme="alipay"] .form-field select:focus,
html[data-theme="alipay"] .form-field textarea:focus,
html[data-theme="alipay"] .control:focus,
html[data-theme="alipay"] .date-field:focus-visible,
html[data-theme="alipay"] .select-input:focus,
html[data-theme="alipay"] .combobox .cb-input:focus,
html[data-theme="alipay"] .chat-input-row input:focus,
html[data-theme="alipay"] #ip-filter input:focus,
html[data-theme="alipay"] #ip-filter select:focus { border-color: #16A34A; box-shadow: 0 0 0 2px rgba(22,163,74,.18); }

/* ==================== 对账报表页 ==================== */
.rep-cards { display: flex; gap: 10px; flex-wrap: wrap; }
.rep-card { flex: 1 1 180px; min-width: 180px; background: linear-gradient(180deg, #ffffff, #f8fafc); border: 1px solid #e5e7eb; border-radius: 6px; padding: 8px 12px; box-shadow: 0 3px 5px rgba(15, 23, 42, .06), inset 0 1px 0 #ffffff; }
.rep-card-label { font-size: 11px; font-weight: 700; color: #6b7280; line-height: 1.3; }
.rep-card-value { font-size: 20px; font-weight: 800; line-height: 1.35; }
.rep-card-sub { font-size: 11px; color: #6b7280; margin-top: 2px; line-height: 1.3; }
.rep-section-title { display: flex; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 700; color: #1f2937; margin: 2px 0 4px; }
.rep-hint { font-size: 11px; font-weight: 400; color: #9ca3af; }
@media print {
  .topnav, .filter-bar, .back-btn, .no-print { display: none !important; }
  .page { padding: 0 !important; background: #fff !important; }
  .page-inner { max-width: none !important; }
  .table-wrap { overflow: visible !important; box-shadow: none !important; break-inside: avoid; }
  .rep-card { box-shadow: none !important; break-inside: avoid; }
}

/* ==================== 飞书机器人列表编辑器 ==================== */
.fs-bots { display: flex; flex-direction: column; gap: 6px; }
.fs-bot-row { display: flex; gap: 6px; align-items: center; }
.fs-bot-row input { height: 30px; padding: 0 8px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 13px; }
.fs-bot-row .fs-url { flex: 1 1 auto; min-width: 200px; }
.fs-bot-row .fs-secret { flex: 0 0 160px; width: 160px; }

/* ==================== 飞书推送用户多选 ==================== */
.fs-ops { border: 1px solid #e5e7eb; border-radius: 6px; padding: 6px 8px; background: #fff; }
.fs-op-all { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 5px; }
.fs-ops-list { display: flex; flex-wrap: wrap; gap: 6px 14px; max-height: 120px; overflow-y: auto; }
.fs-op { display: flex; align-items: center; gap: 5px; font-size: 13px; color: #374151; }
.fs-op input, .fs-op-all input { width: 14px; height: 14px; }

/* ==================== 星空紫主题 ==================== */
html[data-theme="violet"] {
  --blue: #7C3AED;
  --nav3d-slot-top: #ddd2f5; --nav3d-slot-lo: #f0eafd; --nav3d-slot-border: rgba(76,29,149,.20); --nav3d-slot-inset: rgba(50,25,105,.16);
  --nav3d-face-top: #ffffff; --nav3d-face-lo: #eae1fb; --nav3d-face-hover: #ded2f8; --nav3d-base: #c0b2e8; --nav3d-text: #334155; --nav3d-hover-text: #2e1065;
  --nav3d-acc-top: #A78BFA; --nav3d-acc: #7C3AED; --nav3d-acc-lo: #6D28D9; --nav3d-acc-base: #4C1D95; --nav3d-acc-glow: rgba(76,29,149,.30);
}
html[data-theme="violet"] body {
  background: linear-gradient(180deg, #f3efff 0%, #f9f7ff 60%, #f1ecff 100%);
  color: #1f2937;
}
html[data-theme="violet"] .page,
html[data-theme="violet"] .page.dash { background: transparent; }
html[data-theme="violet"] .topnav { background: rgba(255,255,255,.92); border-bottom: 1px solid #e2d9fb; }
html[data-theme="violet"] .brand { color: #7C3AED; }
html[data-theme="violet"] .stat-card,
html[data-theme="violet"] .chart-card,
html[data-theme="violet"] .summary-card,
html[data-theme="violet"] .panel,
html[data-theme="violet"] .admin-card,
html[data-theme="violet"] .acc-card,
html[data-theme="violet"] .filter-bar,
html[data-theme="violet"] .table-wrap,
html[data-theme="violet"] .memo-card,
html[data-theme="violet"] .ai-card { border-color: #e2d9fb; }
html[data-theme="violet"] .section-title .bar { background: linear-gradient(to bottom, #7C3AED, #A78BFA); }
html[data-theme="violet"] .stat-card .stat-icon.pig { background: #ede9fe; color: #7C3AED; }
html[data-theme="violet"] .stat-card .stat-icon.pig-pos { background: #e6f7ee; color: #059669; }
html[data-theme="violet"] .stat-card .stat-icon.pig-neg { background: #fdeaea; color: #dc2626; }
html[data-theme="violet"] .op-link,
html[data-theme="violet"] .icon-btn.blue,
html[data-theme="violet"] .chat-msg-user,
html[data-theme="violet"] .breadcrumb a { color: #7C3AED; }
html[data-theme="violet"] .op-link:hover,
html[data-theme="violet"] .breadcrumb a:hover { color: #6D28D9; }
html[data-theme="violet"] .level-chip.is-selected { border-color: #7C3AED; background: #ede9fe; color: #7C3AED; box-shadow: 0 0 0 2px rgba(124,58,237,.15); }
html[data-theme="violet"] .level-chip.black.is-selected { border-color: #111827; background: #111827; color: #fff; box-shadow: 0 0 0 2px rgba(17,24,39,.2); }
html[data-theme="violet"] .cal-day.selected { background: #7C3AED; color: #fff; }
html[data-theme="violet"] .cal-day.selected:hover { background: #6D28D9; }
html[data-theme="violet"] .tab-btn.active,
html[data-theme="violet"] .trend-tabs .tab-btn.active { color: #7C3AED; }
html[data-theme="violet"] .csi-avatar-room { background: linear-gradient(135deg, #7C3AED, #6D28D9); }
html[data-theme="violet"] .color-swatch.is-selected { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #7C3AED; }
html[data-theme="violet"] .chat-side-item.room { background: #ede9fe; border-color: #ddd1fb; }
html[data-theme="violet"] .chat-side-item.room.on { background: #e2d9fb; border-color: #7C3AED; box-shadow: inset 3px 0 0 #7C3AED; }
html[data-theme="violet"] .chat-side-item.room .csi-name { color: #6D28D9; }
html[data-theme="violet"] .page-btn.active { background: #7C3AED; }
html[data-theme="violet"] .ip-chip { background: #ede9fe; color: #6D28D9; border-color: #ddd1fb; }
html[data-theme="violet"] .ip-chip:hover { background: #e2d9fb; border-color: #A78BFA; }
html[data-theme="violet"] .filter-field input:focus,
html[data-theme="violet"] .filter-field select:focus,
html[data-theme="violet"] .form-field input:focus,
html[data-theme="violet"] .form-field select:focus,
html[data-theme="violet"] .form-field textarea:focus,
html[data-theme="violet"] .control:focus,
html[data-theme="violet"] .date-field:focus-visible,
html[data-theme="violet"] .select-input:focus,
html[data-theme="violet"] .combobox .cb-input:focus,
html[data-theme="violet"] .chat-input-row input:focus,
html[data-theme="violet"] #ip-filter input:focus,
html[data-theme="violet"] #ip-filter select:focus { border-color: #7C3AED; box-shadow: 0 0 0 2px rgba(124,58,237,.18); }
