/* ============================================================
   微博定时发帖系统 · 样式
   参考 Element Plus 视觉规范，纯手写，无外部依赖
   ============================================================ */
:root {
  --primary: #409eff;
  --primary-light: #ecf5ff;
  --primary-dark: #337ecc;
  --success: #67c23a;
  --success-light: #f0f9eb;
  --warning: #e6a23c;
  --warning-light: #fdf6ec;
  --danger: #f56c6c;
  --danger-light: #fef0f0;
  --info: #909399;
  --info-light: #f4f4f5;
  --text: #303133;
  --text-2: #606266;
  --text-3: #909399;
  --text-4: #c0c4cc;
  --border: #dcdfe6;
  --border-light: #e4e7ed;
  --border-lighter: #ebeef5;
  --bg: #f0f2f5;
  --radius: 4px;
  --shadow: 0 2px 12px rgba(0, 0, 0, .06);
  --sidebar: #304156;
  --sidebar-hover: #263445;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
button, input, textarea, select { font-family: inherit; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c8ccd4; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }
.hidden { display: none !important; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.muted { color: var(--text-3); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.flex { display: flex; }
.between { display: flex; justify-content: space-between; align-items: center; }
.gap8 { gap: 8px; }
.gap12 { gap: 12px; }
.mt8 { margin-top: 8px; }
.mt12 { margin-top: 12px; }
.mt16 { margin-top: 16px; }
.mb0 { margin-bottom: 0; }

/* ---------------- 登录 ---------------- */
.login-wrap {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  overflow: auto;
}
.login-wrap::before {
  content: ""; position: absolute; width: 460px; height: 460px; border-radius: 50%;
  background: rgba(255, 255, 255, .08); top: -160px; right: -120px;
}
.login-wrap::after {
  content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%;
  background: rgba(255, 255, 255, .06); bottom: -120px; left: -80px;
}
.login-card {
  position: relative; z-index: 1; width: 100%; max-width: 430px; background: #fff;
  border-radius: 12px; padding: 40px 40px 30px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, .12), 0 5px 15px rgba(0, 0, 0, .08);
}
.login-logo {
  width: 56px; height: 56px; border-radius: 14px; margin: 0 auto 18px;
  background: linear-gradient(135deg, #e6162d, #ff6b6b);
  color: #fff; font-size: 26px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px rgba(230, 22, 45, .3);
}
.login-title { text-align: center; font-size: 22px; font-weight: 600; margin: 0 0 6px; }
.login-sub { text-align: center; color: var(--text-3); font-size: 13px; margin: 0 0 26px; }
.login-form .field { margin-bottom: 16px; }
.login-form label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 7px; }
.login-form .input { height: 44px; font-size: 15px; letter-spacing: .5px; }
.login-btn { width: 100%; height: 44px; font-size: 15px; margin-top: 6px; }

/* ---------------- 布局 ---------------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 200px; flex: 0 0 200px; background: var(--sidebar);
  color: #bfcbd9; display: flex; flex-direction: column;
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 100;
  box-shadow: 2px 0 6px rgba(0, 21, 41, .35);
  transition: transform .3s ease;
}
.logo {
  height: 60px; display: flex; align-items: center; gap: 10px; padding: 0 18px;
  color: #fff; font-size: 16px; font-weight: 700; letter-spacing: .5px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.logo-mark {
  width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, #e6162d, #ff6b6b);
  display: flex; align-items: center; justify-content: center; font-size: 14px; color: #fff;
}
.menu { padding: 12px 0; flex: 1; overflow-y: auto; }
.menu-item {
  display: flex; align-items: center; gap: 11px; height: 46px; padding: 0 20px;
  color: #bfcbd9; font-size: 14px; cursor: pointer; position: relative;
  border-left: 3px solid transparent; transition: background .2s, color .2s;
}
.menu-item:hover { background: var(--sidebar-hover); color: #fff; }
.menu-item.active { background: #1f2d3d; color: #409eff; border-left-color: #409eff; }
.menu-item svg { width: 17px; height: 17px; flex: 0 0 17px; }
.menu-badge {
  margin-left: auto; background: var(--danger); color: #fff; font-size: 11px;
  padding: 0 6px; border-radius: 9px; height: 18px; line-height: 18px;
}
.sidebar-foot { padding: 14px 18px; font-size: 11px; color: #7d8ba1; border-top: 1px solid rgba(255,255,255,.06); }
.main { flex: 1; margin-left: 200px; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.header {
  height: 60px; background: #fff; border-bottom: 1px solid var(--border-lighter);
  display: flex; align-items: center; justify-content: space-between; padding: 0 20px;
  position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 4px rgba(0, 21, 41, .06);
}
.header-left { display: flex; align-items: center; gap: 10px; }
.page-title { font-size: 15px; font-weight: 500; color: var(--text); }
.header-right { display: flex; align-items: center; gap: 12px; }
.hamburger { display: none; background: none; border: 0; cursor: pointer; padding: 4px; color: var(--text-2); }
.user-chip { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 8px; border-radius: 20px; }
.user-chip:hover { background: #f5f7fa; }
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%; color: #fff; font-size: 13px;
  background: linear-gradient(135deg, #409eff, #7a9cf7); display: flex; align-items: center; justify-content: center;
  flex: 0 0 30px; font-weight: 600;
}
.user-name { font-size: 13px; color: var(--text-2); max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .caret { color: var(--text-3); font-size: 10px; }
.dropdown { position: absolute; right: 16px; top: 56px; background: #fff; border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .12); padding: 6px 0; min-width: 150px; z-index: 300; }
.dropdown-item { padding: 9px 16px; font-size: 13px; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.dropdown-item:hover { background: #f5f7fa; color: var(--primary); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-divider { height: 1px; background: var(--border-lighter); margin: 5px 0; }
.site-footer { padding: 18px 20px 26px; text-align: center; color: var(--text-4); font-size: 12px; }
.login-copyright { text-align: center; color: var(--text-4); font-size: 12px; margin-top: 18px; }
.page { padding: 20px; max-width: 1400px; width: 100%; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h2 { margin: 0 0 5px; font-size: 19px; font-weight: 600; }
.page-desc { color: var(--text-3); font-size: 13px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------- 卡片 / 网格 ---------------- */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--border-lighter); }
.card-title { font-size: 15px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 8px; }
.card-title .dot { width: 4px; height: 14px; background: var(--primary); border-radius: 2px; }
.card-body { padding: 18px; }
.card-body.tight { padding: 0; }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: 1fr; }
}

/* ---------------- 统计卡 ---------------- */
.stat { display: flex; align-items: center; gap: 14px; padding: 18px; }
.stat-icon {
  width: 48px; height: 48px; border-radius: 10px; flex: 0 0 48px;
  display: flex; align-items: center; justify-content: center;
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-icon.blue { background: #ecf5ff; color: #409eff; }
.stat-icon.green { background: #f0f9eb; color: #67c23a; }
.stat-icon.orange { background: #fdf6ec; color: #e6a23c; }
.stat-icon.red { background: #fef0f0; color: #f56c6c; }
.stat-value { font-size: 24px; font-weight: 600; line-height: 1.2; color: var(--text); }
.stat-label { font-size: 13px; color: var(--text-3); margin-top: 3px; }
.stat-sub { font-size: 11px; color: var(--text-4); margin-top: 2px; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--border);
  background: #fff; color: var(--text-2); font-size: 13px; cursor: pointer;
  transition: .15s; white-space: nowrap; user-select: none; line-height: 1;
}
.btn:hover { color: var(--primary); border-color: #c6e2ff; background: var(--primary-light); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: #66b1ff; border-color: #66b1ff; color: #fff; }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { background: #85ce61; border-color: #85ce61; color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #f78989; border-color: #f78989; color: #fff; }
.btn-warning { background: var(--warning); border-color: var(--warning); color: #fff; }
.btn-warning:hover { background: #ebb563; border-color: #ebb563; color: #fff; }
.btn-plain { background: var(--primary-light); border-color: #b3d8ff; color: var(--primary); }
.btn-text { border-color: transparent; background: transparent; color: var(--primary); padding: 0 6px; }
.btn-text:hover { background: var(--primary-light); }
.btn-text.danger { color: var(--danger); }
.btn-text.danger:hover { background: var(--danger-light); }
.btn-sm { height: 27px; padding: 0 10px; font-size: 12px; }
.btn-lg { height: 40px; padding: 0 20px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-group { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------------- 表单 ---------------- */
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 7px; }
.field > label .req { color: var(--danger); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; color: var(--text); font-size: 13px; outline: none;
  transition: border-color .2s; padding: 0 11px; height: 34px;
}
.textarea { padding: 9px 11px; height: auto; min-height: 90px; resize: vertical; line-height: 1.7; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); }
.input::placeholder, .textarea::placeholder { color: var(--text-4); }
.input:disabled, .textarea:disabled { background: #f5f7fa; color: var(--text-3); cursor: not-allowed; }
.input-sm { height: 29px; font-size: 12px; }
.help { font-size: 12px; color: var(--text-3); margin-top: 5px; line-height: 1.6; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.inline-fields { display: flex; align-items: center; gap: 8px; }
.inline-fields .input { width: 88px; }
.inline-fields span { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.input-group { display: flex; }
.input-group .input { border-radius: var(--radius) 0 0 var(--radius); }
.input-group .btn { border-radius: 0 var(--radius) var(--radius) 0; height: 34px; }
.counter { text-align: right; font-size: 11px; color: var(--text-4); margin-top: 4px; }

/* ---------------- 表格 ---------------- */
.table-wrap { width: 100%; overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; padding: 11px 12px; color: var(--text-3); font-weight: 500;
  background: #fafafa; border-bottom: 1px solid var(--border-lighter); white-space: nowrap;
}
.table td { padding: 12px; border-bottom: 1px solid var(--border-lighter); color: var(--text-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fafcff; }
.table .name { color: var(--text); font-weight: 500; }
.table .sub { color: var(--text-3); font-size: 12px; margin-top: 3px; }
.table .actions { display: flex; gap: 4px; flex-wrap: wrap; }
.table td.empty-row { text-align: center; padding: 38px 12px; color: var(--text-3); }

/* ---------------- 标签 / 开关 ---------------- */
.tag {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px;
  border-radius: 3px; font-size: 12px; background: var(--info-light); color: var(--info);
  border: 1px solid #e9e9eb; white-space: nowrap;
}
.tag-success { background: var(--success-light); color: #529b2e; border-color: #e1f3d8; }
.tag-warning { background: var(--warning-light); color: #b88230; border-color: #faecd8; }
.tag-danger { background: var(--danger-light); color: #c45656; border-color: #fde2e2; }
.tag-primary { background: var(--primary-light); color: var(--primary); border-color: #d9ecff; }
.tag-lg { height: 26px; font-size: 12px; padding: 0 10px; }
.dot-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.switch { position: relative; display: inline-block; width: 40px; height: 20px; flex: 0 0 40px; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; background: #dcdfe6; border-radius: 10px; transition: .2s;
}
.switch .slider::before {
  content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px;
  background: #fff; border-radius: 50%; transition: .2s;
}
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.switch input:disabled + .slider { opacity: .5; cursor: not-allowed; }

/* ---------------- 弹窗 ---------------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 1000;
  display: flex; align-items: flex-start; justify-content: center; padding: 60px 16px 30px;
  overflow-y: auto; animation: fadeIn .18s ease;
}
.modal {
  width: 100%; max-width: 520px; background: #fff; border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18); animation: slideDown .22s ease;
  margin-bottom: 40px;
}
.modal.wide { max-width: 680px; }
.modal.narrow { max-width: 400px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border-lighter);
}
.modal-title { font-size: 16px; font-weight: 600; }
.modal-close { border: 0; background: none; font-size: 20px; color: var(--text-3); cursor: pointer; line-height: 1; padding: 2px 6px; }
.modal-close:hover { color: var(--primary); }
.modal-body { padding: 20px; max-height: 66vh; overflow-y: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 20px 18px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }

/* ---------------- 提示 ---------------- */
/* ---------------- 微博登录 ---------------- */
.wb-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-lighter); margin-bottom: 16px; }
.wb-tab {
  border: 0; background: none; padding: 9px 14px; font-size: 13px; color: var(--text-3);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.wb-tab:hover { color: var(--primary); }
.wb-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.wb-qr { display: flex; align-items: center; gap: 16px; margin-top: 14px; padding: 10px; border: 1px solid var(--border-lighter); border-radius: 6px; background: #fafcff; }
.wb-qr img { width: 170px; height: 170px; border-radius: 4px; background: #fff; }
.wb-status { font-size: 13px; color: var(--text-2); margin-bottom: 4px; }

.toasts { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 3000; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast {
  min-width: 220px; max-width: 420px; padding: 10px 16px; border-radius: 4px; font-size: 13px;
  border: 1px solid #e1f3d8; background: var(--success-light); color: #529b2e;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .1); animation: toastIn .2s ease;
}
.toast.error { background: var(--danger-light); border-color: #fde2e2; color: #c45656; }
.toast.warning { background: var(--warning-light); border-color: #faecd8; color: #b88230; }
.toast.info { background: var(--info-light); border-color: #e9e9eb; color: var(--text-2); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------------- 空状态 ---------------- */
.empty { text-align: center; padding: 46px 16px; color: var(--text-3); }
.empty-icon { font-size: 40px; line-height: 1; margin-bottom: 12px; opacity: .45; }
.empty-icon svg { width: 42px; height: 42px; }
.qa-icon svg { width: 18px; height: 18px; }
.empty-title { font-size: 14px; color: var(--text-2); margin-bottom: 6px; }
.empty-text { font-size: 12px; color: var(--text-3); }
.empty .btn { margin-top: 16px; }

/* ---------------- 仪表盘 ---------------- */
.account-card { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 52px; height: 52px; border-radius: 50%; flex: 0 0 52px; color: #fff; font-size: 20px;
  background: linear-gradient(135deg, #ff9a9e, #fad0c4); display: flex; align-items: center; justify-content: center;
  font-weight: 600;
}
.avatar.blue { background: linear-gradient(135deg, #409eff, #7a9cf7); }
.avatar.green { background: linear-gradient(135deg, #67c23a, #a0d468); }
.account-name { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.account-meta { font-size: 12px; color: var(--text-3); }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--border-lighter); }
.kv-item { text-align: center; }
.kv-value { font-size: 17px; font-weight: 600; color: var(--text); }
.kv-label { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.chart { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; height: 150px; padding: 8px 4px 0; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart-bar { width: 60%; max-width: 34px; background: linear-gradient(180deg, #79bbff, #409eff); border-radius: 4px 4px 0 0; min-height: 4px; transition: height .4s; }
.chart-bar.zero { background: #ebeef5; }
.chart-val { font-size: 11px; color: var(--text-3); }
.chart-label { font-size: 11px; color: var(--text-4); }
.quick-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.quick-action {
  display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--border-lighter);
  border-radius: 6px; cursor: pointer; transition: .15s; background: #fff;
}
.quick-action:hover { border-color: #b3d8ff; background: #f5faff; }
.quick-action .qa-icon { width: 34px; height: 34px; border-radius: 8px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; flex: 0 0 34px; }
.quick-action .qa-title { font-size: 13px; color: var(--text); }
.quick-action .qa-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.post-mini { padding: 12px 0; border-bottom: 1px solid var(--border-lighter); }
.post-mini:last-child { border-bottom: 0; padding-bottom: 0; }
.post-mini-text { font-size: 13px; color: var(--text-2); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-mini-meta { font-size: 11px; color: var(--text-4); margin-top: 6px; display: flex; gap: 14px; }
.log-mini { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f5f7fa; font-size: 12px; }
.log-mini:last-child { border-bottom: 0; }
.log-mini .time { color: var(--text-4); flex: 0 0 76px; }
.log-mini .msg { color: var(--text-2); flex: 1; line-height: 1.6; }
.log-mini .lvl { flex: 0 0 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--info); }
.log-mini .lvl.success { background: var(--success); }
.log-mini .lvl.error { background: var(--danger); }
.log-mini .lvl.warning { background: var(--warning); }

/* ---------------- 任务 / 日志 ---------------- */
.task-name { display: flex; align-items: center; gap: 8px; }
.task-content { color: var(--text-2); max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rule-text { font-size: 12px; color: var(--text-3); line-height: 1.8; }
.progress { height: 6px; background: #ebeef5; border-radius: 3px; overflow: hidden; min-width: 70px; }
.progress-bar { height: 100%; background: var(--primary); border-radius: 3px; transition: width .3s; }
.progress-bar.high { background: var(--success); }
.filter-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filter-bar .select, .filter-bar .input { width: auto; min-width: 110px; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 18px; }
.page-btn { min-width: 30px; height: 30px; border: 1px solid var(--border); background: #fff; border-radius: 4px; cursor: pointer; color: var(--text-2); font-size: 12px; }
.page-btn:hover:not(:disabled) { color: var(--primary); border-color: #c6e2ff; }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled { opacity: .45; cursor: not-allowed; }
.log-level { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.log-level::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--info); }
.log-level.success::before { background: var(--success); }
.log-level.error::before { background: var(--danger); }
.log-level.warning::before { background: var(--warning); }

/* ---------------- 转发 ---------------- */
.repost-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1200px) { .repost-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .repost-grid { grid-template-columns: 1fr; } }
.repost-card { border: 1px solid var(--border-lighter); border-radius: 6px; overflow: hidden; background: #fff; display: flex; flex-direction: column; transition: .18s; }
.repost-card:hover { border-color: #c6e2ff; box-shadow: 0 4px 14px rgba(64, 158, 255, .1); }
.repost-card.selected { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.repost-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; }
.repost-user { font-size: 12px; color: var(--text-2); }
.repost-time { font-size: 11px; color: var(--text-4); margin-left: auto; }
.repost-text { padding: 0 14px 10px; font-size: 13px; color: var(--text-2); line-height: 1.75; flex: 1; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.repost-imgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 0 14px 10px; }
.repost-imgs img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 3px; background: #f5f7fa; }
.repost-foot { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-top: 1px solid #f5f7fa; font-size: 11px; color: var(--text-3); }
.repost-actions { display: flex; gap: 6px; padding: 8px 14px 12px; }
.checkbox { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.batch-bar {
  position: sticky; bottom: 14px; margin-top: 16px; background: #fff; border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .12); padding: 12px 16px; display: flex;
  align-items: center; gap: 12px; flex-wrap: wrap; z-index: 20;
}
.batch-bar .input { max-width: 320px; }
.repost-search { display: flex; gap: 10px; align-items: center; max-width: 560px; }

/* ---------------- 文章 ---------------- */
.article-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 1000px) { .article-layout { grid-template-columns: 1fr; } }
.article-item { padding: 14px 18px; border-bottom: 1px solid var(--border-lighter); }
.article-item:last-child { border-bottom: 0; }
.article-item-title { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 5px; }
.article-item-meta { display: flex; gap: 12px; font-size: 11px; color: var(--text-4); flex-wrap: wrap; }
.editor-toolbar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.editor-toolbar .btn { height: 26px; font-size: 12px; padding: 0 8px; }

/* ---------------- 上传 ---------------- */
.uploader { display: flex; gap: 8px; flex-wrap: wrap; }
.upload-thumb { position: relative; width: 74px; height: 74px; border-radius: 4px; overflow: hidden; border: 1px solid var(--border-lighter); }
.upload-thumb img { width: 100%; height: 100%; object-fit: cover; }
.upload-thumb .del { position: absolute; top: 0; right: 0; width: 18px; height: 18px; background: rgba(0,0,0,.55); color: #fff; border: 0; cursor: pointer; font-size: 12px; line-height: 18px; padding: 0; }
.upload-add { width: 74px; height: 74px; border: 1px dashed var(--border); border-radius: 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-3); cursor: pointer; font-size: 11px; gap: 4px; background: #fafafa; }
.upload-add:hover { border-color: var(--primary); color: var(--primary); }
.upload-add .plus { font-size: 20px; line-height: 1; }

/* ---------------- 其他 ---------------- */
.banner { display: flex; align-items: flex-start; gap: 10px; padding: 13px 16px; border-radius: 6px; font-size: 13px; line-height: 1.7; }
.banner.info { background: var(--primary-light); color: #3a6ea5; border: 1px solid #d9ecff; }
.banner.warning { background: var(--warning-light); color: #b88230; border: 1px solid #faecd8; }
.banner.danger { background: var(--danger-light); color: #c45656; border: 1px solid #fde2e2; }
.banner .b-icon { font-size: 15px; line-height: 1.4; }
.banner .btn { margin-left: auto; flex: 0 0 auto; }
.card-manager-list { display: flex; flex-direction: column; gap: 10px; }
.card-item { border: 1px solid var(--border-lighter); border-radius: 6px; padding: 12px 14px; transition: .15s; }
.card-item:hover { border-color: #c6e2ff; }
.card-item.active { border-color: var(--primary); background: #f5faff; }
.card-item-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-key { font-family: ui-monospace, Consolas, monospace; font-size: 13px; color: var(--text); font-weight: 600; }
.card-meta { font-size: 11px; color: var(--text-3); margin-top: 6px; display: flex; gap: 14px; flex-wrap: wrap; }
.divider { height: 1px; background: var(--border-lighter); margin: 16px 0; }
.code { font-family: ui-monospace, Consolas, monospace; background: #f5f7fa; padding: 1px 5px; border-radius: 3px; font-size: 12px; }
.tip-card { background: #fafafa; border: 1px dashed var(--border); border-radius: 6px; padding: 14px 16px; font-size: 12px; color: var(--text-3); line-height: 1.9; }
.section-title { font-size: 13px; font-weight: 600; color: var(--text-2); margin: 0 0 10px; }
.loading-mask { position: fixed; inset: 0; background: rgba(255, 255, 255, .55); z-index: 2000; display: flex; align-items: center; justify-content: center; }
.spinner { width: 30px; height: 30px; border: 3px solid #e4e7ed; border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.user-select-none { user-select: none; }

/* ---------------- 响应式 ---------------- */
.sidebar-mask { display: none; }
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .sidebar-mask { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 99; }
  .main { margin-left: 0; }
  .hamburger { display: inline-flex; }
  .page { padding: 14px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 14px; gap: 10px; }
  .stat-icon { width: 40px; height: 40px; flex-basis: 40px; }
  .stat-value { font-size: 20px; }
  .user-name { display: none; }
  .card-body { padding: 14px; }
  .modal-mask { padding: 30px 12px; align-items: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
  .chart { height: 120px; }
  .table th, .table td { padding: 10px; }
  .login-card { padding: 30px 24px 22px; }
}
@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .page-head h2 { font-size: 17px; }
  .kv { gap: 8px; }
  .quick-actions { grid-template-columns: 1fr; }
  .batch-bar { position: static; }
}
