/* ============ 发布助手 全局样式 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #1a73e8;
  --primary-dark: #1558b0;
  --bg: #f0f2f5;
  --card: #fff;
  --border: #e4e7ed;
  --text: #303133;
  --text-2: #606266;
  --danger: #e5484d;
  --radius: 6px;
  --input-bg: #fff;
  --hover-bg: #f5f7fa;
  --th-bg: #fafafa;
  --tr-hover-bg: #fafcff;
  --kw-item-bg: #f5f7fa;
  --hint-bg: #fdf6ec;
  --hint-border: #f5dab1;
  --hint-text: #e6a23c;
  --badge-ok-bg: #f0f9eb;
  --badge-gray-bg: #f4f4f5;
  --badge-err-bg: #fef0f0;
  --kw-empty: #c0c4cc;
}
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* 顶部栏 */
.topbar {
  display: flex; align-items: center; height: 52px;
  background: #1d2129; color: #fff; padding: 0 20px;
}
.topbar-brand { font-size: 16px; font-weight: 600; margin-right: 16px; }
.topbar-nav { display: flex; gap: 6px; flex: 1; }
.topbar-nav a {
  color: #c8c9cc; padding: 6px 16px; border-radius: 4px; transition: all .2s;
}
.topbar-nav a:hover { color: #fff; background: rgba(255,255,255,.1); }
.topbar-nav a.active { color: #fff; background: var(--primary); }
.topbar-user { display: flex; align-items: center; gap: 12px; color: #c8c9cc; margin-left: auto; }
.topbar-user .logout { color: #909399; font-size: 13px; }
.topbar-user .logout:hover { color: #fff; }

/* 布局 */
.layout { display: flex; min-height: calc(100vh - 52px); }
.sidebar {
  width: 200px; background: var(--card); border-right: 1px solid var(--border);
  padding: 12px 0; flex-shrink: 0;
}
.menu-group { margin-bottom: 20px; }
.menu-title {
  padding: 10px 20px 6px; font-size: 13px; color: #606266; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase;
}
.sidebar a {
  display: block; padding: 10px 20px; color: var(--text); font-size: 14.5px;
  border-left: 3px solid transparent;
}
.sidebar a:hover { background: var(--hover-bg); }
.sidebar a.active {
  background: #ecf5ff; color: var(--primary); border-left-color: var(--primary);
  font-weight: 600;
}
.content { flex: 1; padding: 20px; min-width: 0; }

/* 页面 */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.page-header h2 { font-size: 18px; }
.page-actions { display: flex; gap: 8px; }

/* 卡片 */
.card { background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); padding: 16px; }
.hint-box {
  background: var(--hint-bg); border: 1px solid var(--hint-border); color: var(--hint-text);
  padding: 10px 14px; border-radius: var(--radius); margin-bottom: 14px; font-size: 13px;
}

/* 表格 */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: 13px; }
.table th { background: var(--th-bg); color: #606266; font-weight: 600; white-space: nowrap; }
.table tr:hover td { background: var(--tr-hover-bg); }
.empty { text-align: center; color: #909399; padding: 30px !important; }

/* 按钮 */
.btn {
  display: inline-block; padding: 7px 16px; border: 1px solid #dcdfe6; border-radius: 4px;
  background: var(--input-bg); color: var(--text); cursor: pointer; font-size: 13px; transition: all .2s;
  line-height: 1.4;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #c9302c; border-color: #c9302c; color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-mini {
  display: inline-block; padding: 3px 8px; border: 1px solid #dcdfe6; border-radius: 3px;
  background: var(--input-bg); color: var(--text); cursor: pointer; font-size: 12px; line-height: 1.5;
}
.btn-mini:hover { border-color: var(--primary); color: var(--primary); }
.btn-mini.btn-danger { color: var(--danger); border-color: #f0c0c1; }
.btn-mini.btn-danger:hover { background: var(--danger); color: #fff; }

/* 表单 */
.form-item { margin-bottom: 14px; }
.form-item label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--text-2); }
.form-item input[type="text"],
.form-item input[type="password"],
.form-item input[type="number"],
.form-item select,
.form-item textarea,
input[type="text"], input[type="password"], input[type="number"], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #dcdfe6; border-radius: 4px;
  font-size: 14px; font-family: inherit; outline: none; transition: border-color .2s;
  background: var(--input-bg); color: var(--text);
}
.form-item input:focus, input:focus, select:focus, textarea:focus { border-color: var(--primary); }
.form-item textarea { resize: vertical; }
.form-tip { font-size: 12px; color: #909399; margin-top: 4px; }
.req { color: var(--danger); }
.preview-text { margin-left: 10px; font-size: 12px; color: #909399; }
.input-sm { width: 200px !important; display: inline-block; padding: 6px 10px; border: 1px solid #dcdfe6; border-radius: 4px; }

/* 筛选栏 */
.filter-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.filter-bar label { font-size: 13px; color: var(--text-2); }
.filter-bar select { width: 180px; }

/* 徽章 */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 12px;
}
.badge-ok { background: var(--badge-ok-bg); color: #67c23a; }
.badge-gray { background: var(--badge-gray-bg); color: #909399; }
.badge-err { background: var(--badge-err-bg); color: #e5484d; }
.text-danger { color: var(--danger); font-size: 12px; }

/* Tab */
.tabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 2px solid var(--border); }
.tabs .tab {
  padding: 8px 18px; cursor: pointer; color: var(--text-2); font-size: 14px;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.tabs .tab:hover { color: var(--primary); }
.tabs .tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.modal {
  background: var(--card); border-radius: 8px; width: 460px; max-width: 92vw;
  max-height: 88vh; display: flex; flex-direction: column;
  box-shadow: 0 8px 30px rgba(0,0,0,.2);
}
.modal-lg { width: 820px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 15px; }
.modal-close { cursor: pointer; font-size: 20px; color: #909399; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 12px 20px; border-top: 1px solid var(--border);
}

/* 表单行/分栏 */
.form-row { display: flex; gap: 16px; flex-wrap: wrap; background: var(--card); padding: 16px; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 16px; }
.form-row .form-item { flex: 1; min-width: 200px; }
.split-layout { display: flex; gap: 16px; }
.split-left { width: 320px; flex-shrink: 0; }
.split-right { flex: 1; }
.split-layout h3 { font-size: 14px; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.inline-input { display: flex; align-items: center; gap: 8px; }
/* 执行周期-剩余配额提示 */
.quota-line { margin-top: 8px; }
.quota-remaining { display: inline-block; font-size: 12px; color: #16a34a; background: rgba(22,163,74,0.08); border: 1px solid rgba(22,163,74,0.25); border-radius: 4px; padding: 3px 8px; }
.quota-remaining.warn { color: #dc2626; background: rgba(220,38,38,0.08); border-color: rgba(220,38,38,0.3); }
.radio-group { display: flex; gap: 16px; padding-top: 4px; }
.radio-group label { display: flex; align-items: center; gap: 4px; margin: 0; cursor: pointer; }
.radio-group input { width: auto; }

/* 开关 */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute; cursor: pointer; inset: 0; background: #dcdfe6;
  border-radius: 22px; transition: .3s;
}
.switch span:before {
  content: ""; position: absolute; height: 16px; width: 16px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .3s;
}
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span:before { transform: translateX(18px); }

/* 词条网格 */
.kw-grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 12px; }
.kw-col { padding: 10px; }
.kw-col-title { font-size: 13px; font-weight: 600; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.kw-list { height: 300px; overflow-y: auto; border: 1px solid var(--border); border-radius: 4px; padding: 4px 6px; }
.kw-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 4px; font-size: 13px; line-height: 1.5;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.kw-item:last-child { border-bottom: none; }
.kw-item:hover { background: var(--kw-item-bg); }
.kw-item .kw-del { display: none; cursor: pointer; color: #909399; border: none; background: none; font-size: 14px; padding: 0 2px; }
.kw-item:hover .kw-del { display: inline-block; }
.kw-item .kw-del:hover { color: var(--danger); }
.kw-empty { color: var(--kw-empty); font-size: 12px; text-align: center; padding: 12px; }
.kw-input { border: 1px solid var(--primary); }
.kw-batch { width: 100%; height: 300px; box-sizing: border-box; border: 1px solid var(--border); border-radius: 4px; padding: 8px 10px; font-size: 13px; line-height: 1.7; font-family: inherit; color: var(--text); background: var(--card); resize: none; overflow-y: auto; }
.kw-batch:focus { border-color: var(--primary); outline: none; }


/* 图片网格 */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.media-item { border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.media-item img { width: 100%; height: 120px; object-fit: cover; display: block; }
.media-info { display: flex; align-items: center; gap: 6px; padding: 6px 8px; font-size: 12px; }
.media-info span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 登录页 */
.login-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1d2129 0%, #2c3e50 100%);
}
.login-box {
  width: 380px; background: #fff; border-radius: 10px; padding: 36px;
  box-shadow: 0 10px 40px rgba(0,0,0,.3);
}
.login-box h1 { text-align: center; font-size: 24px; margin-bottom: 4px; }
.login-sub { text-align: center; color: #909399; font-size: 13px; margin-bottom: 24px; }
.login-error {
  background: var(--badge-err-bg); color: var(--danger); padding: 8px 12px;
  border-radius: 4px; margin-bottom: 14px; font-size: 13px;
}

/* Toast */
.toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-20px);
  background: #333; color: #fff; padding: 10px 22px; border-radius: 4px;
  font-size: 13px; opacity: 0; transition: all .3s; z-index: 2000;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-ok { background: #333; }
.toast-err { background: var(--danger); }

/* 响应式 */
@media (max-width: 900px) {
  .sidebar { width: 160px; }
  .split-layout { flex-direction: column; }
  .split-left { width: 100%; }
  .kw-grid { grid-template-columns: 1fr 1fr; }
}

/* ============ 深色主题 ============ */
[data-theme="dark"] {
  --primary: #4d9fff;
  --primary-dark: #6aa9ff;
  --bg: #14161a;
  --card: #1e2228;
  --border: #333a43;
  --text: #e5e7eb;
  --text-2: #9aa3af;
  --input-bg: #171a1f;
  --hover-bg: #262b32;
  --th-bg: #232830;
  --tr-hover-bg: #20242b;
  --kw-item-bg: #262b32;
  --hint-bg: #3a2f1d;
  --hint-border: #5a4a2a;
  --hint-text: #e6b64c;
  --badge-ok-bg: #1d3322;
  --badge-gray-bg: #2a2f36;
  --badge-err-bg: #3a2023;
  --kw-empty: #6b7280;
}
[data-theme="dark"] .topbar { background: #101216; }
[data-theme="dark"] .modal-mask { background: rgba(0,0,0,.65); }
[data-theme="dark"] .modal { background: #1e2228; box-shadow: 0 8px 30px rgba(0,0,0,.5); color: #e5e7eb; }
[data-theme="dark"] .modal-header { border-bottom-color: #333a43; }
[data-theme="dark"] .modal-header h3 { color: #e5e7eb; }
[data-theme="dark"] .modal-close { color: #909399; }
[data-theme="dark"] .modal-close:hover { color: #e5e7eb; }
[data-theme="dark"] .modal-footer { border-top-color: #333a43; }
[data-theme="dark"] .modal-body { color: #e5e7eb; }
/* 分组树深色模式 */
[data-theme="dark"] .file-sidebar { background: #1e2228; border-color: #333a43; }
[data-theme="dark"] .sidebar-header { background: #232830; border-bottom-color: #333a43; color: #e5e7eb; }
[data-theme="dark"] .group-tree-item { color: #c5c9d1; }
[data-theme="dark"] .group-tree-item:hover { background: #262b32; }
[data-theme="dark"] .group-tree-item.active { background: #1e3a5f; color: #6aa9ff; }
[data-theme="dark"] .group-tree-item .group-count { background: #2a2f36; color: #9ca3af; }
[data-theme="dark"] .group-tree-item.active .group-count { background: #4d9fff; color: #fff; }
[data-theme="dark"] .file-content .card { background: #1e2228; border-color: #333a43; }
[data-theme="dark"] .filter-bar { background: #1e2228; border-color: #333a43; color: #e5e7eb; }
[data-theme="dark"] .selected-files-list { background: #171a1f; border-color: #333a43; }
[data-theme="dark"] .selected-file-row { border-bottom-color: #333a43; color: #c5c9d1; }
[data-theme="dark"] .selected-empty { color: #6b7280; }
[data-theme="dark"] .upload-progress { background: #171a1f; color: #c5c9d1; }
[data-theme="dark"] .kw-input { border-color: var(--primary); }
[data-theme="dark"] .media-item img { background: #14161a; }
[data-theme="dark"] .btn { border-color: #3a4149; }
[data-theme="dark"] .btn-mini { border-color: #3a4149; }
[data-theme="dark"] .form-item input[type="text"],
[data-theme="dark"] .form-item input[type="password"],
[data-theme="dark"] .form-item input[type="number"],
[data-theme="dark"] .form-item select,
[data-theme="dark"] .form-item textarea,
[data-theme="dark"] input[type="text"], [data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="number"], [data-theme="dark"] select, [data-theme="dark"] textarea {
  border-color: #3a4149;
}
[data-theme="dark"] .input-sm { border-color: #3a4149; }
[data-theme="dark"] .sidebar a.active { background: #1e3a5f; }
[data-theme="dark"] .stat-card {
  background: #1e2329;
  border-color: #2d333b;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
[data-theme="dark"] .stat-card:hover {
  border-color: rgba(74,144,217,.5);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
[data-theme="dark"] .panel {
  background: #1e2329;
  border-color: #2d333b;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
[data-theme="dark"] .panel-header {
  border-bottom-color: #2d333b;
  background: linear-gradient(180deg, rgba(74,144,217,.06), transparent);
}
[data-theme="dark"] .data-table th {
  background: #252b32;
  border-bottom-color: #2d333b;
}
[data-theme="dark"] .data-table td {
  border-bottom-color: #2a3038;
}
[data-theme="dark"] .data-table tbody tr:hover {
  background: #252b32;
}
[data-theme="dark"] .menu-title { color: #a0a4ad; }
[data-theme="dark"] .toast { background: #2a2f36; }

/* 主题切换按钮 */
.theme-btn {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  color: #fff; border-radius: 6px; padding: 4px 10px; font-size: 15px;
  cursor: pointer; line-height: 1.4; transition: all .2s;
}
.theme-btn:hover { background: rgba(255,255,255,.25); }


/* ========== 管理后台样式 ========== */
.admin-page { padding: 0; }
.page-header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.page-header h2 { margin: 0; font-size: 20px; font-weight: 600; }
.page-subtitle { color: var(--text-secondary); font-size: 13px; }

/* 数据卡片 */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  transition: all .25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--card), var(--border), var(--card));
  opacity: .6;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  border-color: rgba(74,144,217,.4);
}
.stat-card.loading .stat-val { color: var(--text-secondary); }
.stat-val {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}
.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}
.stat-accent { border-left: 3px solid #4A90D9; }
.stat-accent .stat-val { color: #4A90D9; }
.stat-success { border-left: 3px solid #52C41A; }
.stat-success .stat-val { color: #52C41A; }
.stat-warning { border-left: 3px solid #FAAD14; }
.stat-warning .stat-val { color: #FAAD14; }

/* 面板 */
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  transition: box-shadow .25s ease;
}
.panel:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(74,144,217,.03), transparent);
}
.panel-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  position: relative;
  padding-left: 12px;
}
.panel-header h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 16px;
  background: #4A90D9;
  border-radius: 2px;
}
.panel-body { padding: 20px; }
.refresh-tip { font-size: 12px; color: var(--text-secondary); }

/* 行列布局 */
.admin-row { display: flex; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-col { flex: 1; min-width: 0; }
.admin-col-2 { flex: 2; }
.admin-col-1 { flex: 1; }

/* 数据表格 */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { background: var(--th-bg); padding: 10px 12px; text-align: left; font-weight: 600; color: var(--text-secondary); border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tbody tr:hover { background: var(--tr-hover-bg); }
.data-table .title-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-table .empty-tip { text-align: center; color: var(--text-secondary); padding: 30px !important; }
.err-text { color: #EA6668; font-size: 12px; }
.link-btn { color: #4A90D9; text-decoration: none; font-size: 12px; }
.link-btn:hover { text-decoration: underline; }

/* 徽章 */
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.badge-success { background: rgba(82,196,26,.12); color: #52C41A; }
.badge-danger { background: rgba(234,102,104,.12); color: #EA6668; }
.badge-warning { background: rgba(250,173,20,.12); color: #FAAD14; }
.badge-muted { background: rgba(107,114,128,.12); color: #6B7280; }

/* 筛选栏 */
.filter-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-bar select, .filter-bar input { padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; background: var(--input-bg); color: var(--text-color); }
.filter-bar select:focus, .filter-bar input:focus { outline: none; border-color: #4A90D9; }
.filter-count { margin-left: auto; font-size: 12px; color: var(--text-secondary); }
.btn { padding: 6px 14px; border: none; border-radius: 6px; background: #4A90D9; color: #fff; font-size: 13px; cursor: pointer; }
.btn:hover { background: #3A7BC8; }
.btn-sm { padding: 5px 12px; font-size: 12px; }

/* 分页 */
.pagination { display: flex; align-items: center; gap: 10px; justify-content: center; margin-top: 16px; }
.page-btn { padding: 6px 14px; border: 1px solid var(--border); border-radius: 6px; background: var(--card); color: var(--text-color); font-size: 13px; cursor: pointer; }
.page-btn:hover { border-color: #4A90D9; color: #4A90D9; }
.page-info { font-size: 13px; color: var(--text-secondary); }

/* 趋势图 */
.trend-chart { display: flex; align-items: flex-end; justify-content: space-around; height: 200px; padding: 10px 0; gap: 8px; }
.trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.trend-bars { display: flex; align-items: flex-end; gap: 3px; height: 170px; }
.trend-bar { width: 14px; border-radius: 3px 3px 0 0; min-height: 2px; transition: height .3s; }
.trend-bar-total { background: #4A90D9; }
.trend-bar-success { background: #52C41A; }
.trend-label { font-size: 11px; color: var(--text-secondary); margin-top: 6px; }
.trend-legend { display: flex; gap: 16px; justify-content: center; margin-top: 8px; font-size: 12px; color: var(--text-secondary); }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }

/* 平台占比 */
.platform-list { display: flex; flex-direction: column; gap: 14px; }
.platform-item { display: grid; grid-template-columns: 14px 1fr auto; grid-template-rows: auto auto; gap: 2px 8px; align-items: center; }
.platform-dot { width: 10px; height: 10px; border-radius: 50%; grid-row: 1 / 3; }
.platform-name { font-size: 13px; font-weight: 500; }
.platform-cnt { font-size: 12px; color: var(--text-secondary); }
.platform-bar { grid-column: 2 / 4; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.platform-bar-fill { height: 100%; border-radius: 3px; transition: width .3s; }

/* 空提示 */
.empty-tip { color: var(--text-secondary); font-size: 13px; text-align: center; padding: 20px; }


/* ========== 设置页面样式 ========== */
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--text-color); }
.form-input { width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; background: var(--input-bg); color: var(--text-color); box-sizing: border-box; }
.form-input:focus { outline: none; border-color: #4A90D9; box-shadow: 0 0 0 2px rgba(74,144,217,.15); }
.form-row-inline { display: flex; gap: 16px; flex-wrap: wrap; }
.form-item { flex: 1; min-width: 140px; }
.form-item label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--text-color); }
.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.btn-primary { background: #4A90D9; color: #fff; padding: 10px 24px; border: none; border-radius: 6px; font-size: 14px; cursor: pointer; font-weight: 500; }
.btn-primary:hover { background: #3A7BC8; }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.save-msg { font-size: 13px; }
.panel-tip { font-size: 12px; color: var(--text-secondary); font-weight: 400; }

/* 刷新按钮 */
.refresh-btn { margin-left: auto; }
.refresh-btn:disabled { opacity: .6; cursor: not-allowed; }


/* 仪表盘动画 */
.trend-bar { transition: height 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.platform-bar-fill { transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.stat-val { transition: color 0.3s; }


/* 已选文件列表 */
.selected-files-list {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
}
.selected-empty {
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  padding: 20px 0;
}
.selected-file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.selected-file-row:last-child {
  border-bottom: none;
}
.selected-file-row:hover {
  background: var(--tr-hover-bg);
}
.selected-row-name {
  flex: 1;
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.selected-row-size {
  color: var(--text-secondary);
  font-size: 12px;
  min-width: 50px;
  text-align: right;
}
.selected-row-remove {
  border: none;
  background: none;
  color: #EA6668;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  min-width: 40px;
}
.selected-row-remove:hover {
  background: rgba(234,102,104,.1);
}


/* ============ 账号状态管理 ============ */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.status-dot.spinning {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.badge-ok .status-dot { background: #52C41A; box-shadow: 0 0 6px rgba(82,196,26,.5); }
.badge-warn .status-dot { background: #FAAD14; box-shadow: 0 0 6px rgba(250,173,20,.5); }
.badge-danger .status-dot { background: #FF4D4F; box-shadow: 0 0 6px rgba(255,77,79,.5); }

/* 掉线账号整行标灰 */
.account-offline {
  opacity: 0.65;
  background: rgba(255,77,79,.03);
}
.account-offline:hover {
  opacity: 0.85;
  background: rgba(255,77,79,.06);
}
.account-offline td { color: #999; }

/* 深色主题下的账号状态 */
[data-theme="dark"] .account-offline {
  background: rgba(255,77,79,.05);
}
[data-theme="dark"] .account-offline:hover {
  background: rgba(255,77,79,.1);
}
[data-theme="dark"] .account-offline td { color: #888; }

/* badge 基础样式补充 */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}
.badge-ok { background: rgba(82,196,26,.1); color: #52C41A; }
.badge-warn { background: rgba(250,173,20,.1); color: #FAAD14; }
.badge-danger { background: rgba(255,77,79,.1); color: #FF4D4F; }
.badge-gray { background: rgba(144,147,153,.1); color: #909399; }


/* ============ 套餐权限卡片 ============ */
.plan-info-card {
    margin-bottom: 12px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
    border-radius: 8px;
}
.plan-info-card .plan-icon {
    width: 30px;
    height: 30px;
    background: #0ea5e9;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
    flex-shrink: 0;
}
.plan-info-card .plan-title {
    font-size: 14px;
    font-weight: 600;
    color: #0c4a6e;
    line-height: 1.3;
}
.plan-info-card .plan-expire {
    font-size: 11px;
    color: #0369a1;
    margin-top: 1px;
}
.plan-info-card .plan-stat-num {
    font-size: 15px;
    font-weight: 700;
    color: #0ea5e9;
    line-height: 1.2;
}
.plan-info-card .plan-stat-label {
    font-size: 10px;
    color: #64748b;
    margin-top: 1px;
}
.plan-info-card .plan-usage-item {
    flex: 1;
    min-width: 90px;
    height: 40px;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    background: rgba(255,255,255,0.6);
    border-radius: 6px;
    gap: 10px;
    box-sizing: border-box;
}
.plan-info-card .plan-usage-name {
    font-size: 12px;
    color: #475569;
    line-height: 1.3;
    white-space: nowrap;
}
.plan-info-card .plan-usage-num {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}
.plan-info-card .plan-usage-num.full { color: #dc2626; }
.plan-info-card .plan-usage-num.used { color: #0ea5e9; }
.plan-info-card .plan-usage-num.empty { color: #94a3b8; }
.plan-info-card .plan-usage-daily {
    font-size: 10px;
    color: #94a3b8;
    line-height: 1.2;
    white-space: nowrap;
}

/* 深色模式 - 套餐卡片 */
[data-theme="dark"] .plan-info-card {
    background: linear-gradient(135deg, #0c1929, #0a1628) !important;
    border-color: #1e3a5f !important;
}
[data-theme="dark"] .plan-info-card .plan-title {
    color: #7dd3fc !important;
}
[data-theme="dark"] .plan-info-card .plan-expire {
    color: #38bdf8 !important;
}
[data-theme="dark"] .plan-info-card .plan-stat-num {
    color: #38bdf8 !important;
}
[data-theme="dark"] .plan-info-card .plan-stat-label {
    color: #94a3b8 !important;
}
[data-theme="dark"] .plan-info-card .plan-usage-item {
    background: rgba(30, 58, 95, 0.4) !important;
}
[data-theme="dark"] .plan-info-card .plan-usage-name {
    color: #94a3b8 !important;
}
[data-theme="dark"] .plan-info-card .plan-usage-daily {
    color: #64748b !important;
}


/* ========== Tag标签样式 ========== */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
}
.tag-blue { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.tag-green { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.tag-orange { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }
.tag-red { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.tag-gray { background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; }

/* 深色模式下的tag样式 */
[data-theme="dark"] .tag-blue { background: rgba(37,99,235,.15); color: #60a5fa; border-color: rgba(37,99,235,.3); }
[data-theme="dark"] .tag-green { background: rgba(22,163,74,.15); color: #4ade80; border-color: rgba(22,163,74,.3); }
[data-theme="dark"] .tag-orange { background: rgba(234,88,12,.15); color: #fb923c; border-color: rgba(234,88,12,.3); }
[data-theme="dark"] .tag-red { background: rgba(220,38,38,.15); color: #f87171; border-color: rgba(220,38,38,.3); }
[data-theme="dark"] .tag-gray { background: rgba(107,114,128,.15); color: #9ca3af; border-color: rgba(107,114,128,.3); }


/* ========== 价格卡片详细功能分组 ========== */
.price-card .feature-group {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #e2e8f0;
}
.price-card .feature-group:last-of-type {
    border-bottom: none;
    margin-bottom: 16px;
    padding-bottom: 0;
}
.price-card .feature-title {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.price-card .feature-group ul {
    list-style: none !important;
    list-style-type: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.price-card .feature-group li {
    list-style: none !important;
    list-style-type: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}
.price-card .feature-group li {
    font-size: 13px;
    color: #475569;
    padding: 3px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.price-card .feature-group li strong {
    color: #0f172a;
    font-weight: 600;
}
.price-card .check {
    color: #16a34a;
    font-weight: 700;
    font-size: 14px;
    min-width: 16px;
}
.price-card .cross {
    color: #dc2626;
    font-weight: 600;
    font-size: 14px;
    min-width: 16px;
}

/* 深色模式适配 */
[data-theme="dark"] .price-card .feature-group {
    border-bottom-color: #334155;
}
[data-theme="dark"] .price-card .feature-title {
    color: #94a3b8;
}
[data-theme="dark"] .price-card .feature-group li {
    color: #cbd5e1;
}
[data-theme="dark"] .price-card .feature-group li strong {
    color: #f1f5f9;
}
[data-theme="dark"] .price-card .cross {
    color: #f87171;
}

/* 表格单元格错误信息：单行省略，悬停查看完整 */
.err-cell { display: inline-block; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; color: #c93a3c; font-size: 12px; cursor: default; }
table.table td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.table td:nth-child(1) { max-width: 220px; }

/* 发布序号 */
.seq-no { display:inline-block; padding:2px 8px; border-radius:4px; font-family:Consolas,monospace; font-size:12px; font-weight:600; }
.seq-ok { background:rgba(82,196,26,0.1); color:#52C41A; }
.seq-fail { background:rgba(234,102,104,0.1); color:#EA6668; }
