/* =========================================================
   多平台 GEO 监测系统 · 统一设计系统
   配色：品牌绿（emerald）精致升级 · 深蓝渐变侧栏 · 柔和阴影
   ========================================================= */
:root {
  /* 品牌色 */
  --brand: #10b981;
  --brand-d: #0e9f6e;
  --brand-l: #d1fae5;
  --brand-grad: linear-gradient(135deg, #10b981 0%, #0ea5a4 100%);
  --accent: #6366f1;          /* 第二强调色（蓝紫） */
  --accent-l: #e0e7ff;
  --warn: #e8860b;
  --warn-l: #fff4e0;
  --danger: #fa5151;
  --danger-l: #fdeeee;

  /* 文字 */
  --ink: #0f172a;
  --ink-2: #475569;
  --muted: #94a3b8;

  /* 线条 / 表面 */
  --line: #e9edf3;
  --line-2: #f1f5f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --bg: #f4f7fb;

  /* 圆角 */
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 22px;

  /* 阴影 */
  --sh-sm: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
  --sh: 0 6px 20px rgba(15, 23, 42, .08);
  --sh-lg: 0 16px 48px rgba(15, 23, 42, .18);

  /* 侧栏 */
  --sidebar-w: 232px;
  --sidebar-bg: linear-gradient(180deg, #18233f 0%, #121b33 60%, #0e1830 100%);

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --radius-focus: 0 0 0 3px rgba(16, 185, 129, .22);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 12% -8%, rgba(16, 185, 129, .10), transparent 60%),
    radial-gradient(1000px 500px at 100% 0%, rgba(99, 102, 241, .08), transparent 55%),
    linear-gradient(135deg, #f5f8fc 0%, #eef3fb 50%, #eaf4fb 100%);
  background-attachment: fixed;
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ===================== 侧边导航 ===================== */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: #fff;
  padding: 20px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 0 0 var(--sidebar-w);
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  box-shadow: 4px 0 24px rgba(15, 23, 42, .12);
}
#nav { display: flex; flex-direction: column; height: 100%; min-height: 0; }

.brand {
  display: flex; align-items: center; gap: 11px;
  font-size: 16px; font-weight: 800; letter-spacing: .3px;
  padding: 4px 10px 20px; color: #fff;
}
.brand .logo {
  width: 34px; height: 34px; flex: 0 0 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--brand-grad);
  box-shadow: 0 4px 12px rgba(16, 185, 129, .4);
  font-size: 18px;
}
.brand small { display: block; font-size: 11px; font-weight: 500; color: #8a93b8; letter-spacing: 1.5px; margin-top: 2px; }

.nav-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding-right: 2px; margin-top: 2px; }
.nav-scroll::-webkit-scrollbar { width: 6px; }
.nav-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); border-radius: 3px; }

.nav-group-label {
  font-size: 11px; color: #7c87b0; letter-spacing: 1.5px;
  margin: 18px 12px 6px; text-transform: none; font-weight: 600;
}

.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px;
  border-radius: 10px; color: #c2c9e2; text-decoration: none;
  margin-bottom: 3px; font-size: 14px; font-weight: 500;
  position: relative; transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(16, 185, 129, .22), rgba(16, 185, 129, .06));
  color: #fff; font-weight: 700;
}
.nav-item.active::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 3px; border-radius: 3px; background: var(--brand);
}
.ni-ico { font-size: 16px; width: 20px; text-align: center; }

.nav-foot { margin-top: 18px; font-size: 12px; padding: 8px 12px; color: #97a1c4; line-height: 1.6; }
.nav-logout {
  margin-top: auto; flex: 0 0 auto; width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 12px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 11px; cursor: pointer;
  background: rgba(255, 255, 255, .05); color: #e6e9f5; font-size: 13px; font-weight: 600;
  transition: background .15s, border-color .15s, transform .1s;
}
.nav-logout .ico { font-size: 15px; line-height: 1; }
.nav-logout .txt { white-space: nowrap; }
.nav-logout:hover { background: rgba(250, 81, 81, .16); border-color: rgba(250, 81, 81, .5); color: #ffb3b3; }
.nav-logout:active { transform: scale(.98); }

/* 移动端汉堡 + 遮罩（由 common.js 注入） */
#menuBtn {
  display: none; position: fixed; top: 14px; left: 14px; z-index: 70;
  width: 42px; height: 42px; border: none; border-radius: 12px; cursor: pointer;
  background: var(--surface); color: var(--ink); box-shadow: var(--sh);
  font-size: 20px; align-items: center; justify-content: center;
}
.scrim { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 55; }

/* ===================== 关键词检测：多平台复选 ===================== */
.pf-wrap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.pf-all { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.pf-box { display: flex; gap: 10px; flex-wrap: wrap; }
.pf-item {
  display: inline-flex; align-items: center; gap: 7px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 13px; cursor: pointer;
  font-size: 13px; color: var(--ink-2); transition: border-color .15s, background .15s, box-shadow .15s;
}
.pf-item:hover { border-color: var(--brand); box-shadow: var(--sh-sm); }
.pf-item input { margin: 0; accent-color: var(--brand); }
.pf-item:has(input:checked) { background: var(--brand-l); border-color: var(--brand); color: var(--brand-d); font-weight: 600; }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot.ok { background: #2ecc71; }
.dot.bad { background: #ffd666; }

/* ===================== 主区 ===================== */
.main { flex: 1; padding: 26px 32px; overflow: auto; min-width: 0; }
h2 { font-size: 22px; font-weight: 700; margin-bottom: 6px; letter-spacing: .2px; }
h3 { font-size: 15px; margin-bottom: 12px; color: var(--ink-2); font-weight: 700; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.dash-head .sub { font-size: 13px; color: var(--muted); margin-top: 5px; }
.dash-head .sub b { color: var(--brand-d); }

/* ===================== 指标卡 ===================== */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px 20px; min-width: 0; box-shadow: var(--sh-sm); position: relative; overflow: hidden;
  transition: transform .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--sh); }
.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--brand); border-radius: 0 4px 4px 0; }
.card .num { font-size: 30px; font-weight: 800; color: var(--brand-d); line-height: 1.1; }
.card .lbl { font-size: 13px; color: var(--ink-2); margin-top: 6px; font-weight: 500; }
.card .sub { font-size: 11px; color: var(--muted); margin-top: 6px; }

/* ===================== 图表区 ===================== */
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 22px; }
.chart-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px 20px; box-shadow: var(--sh-sm);
}
.chart-card .ct { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.chart-card .ct::before { content: ""; width: 4px; height: 14px; border-radius: 3px; background: var(--brand); display: inline-block; }
.chart-card canvas { height: 240px !important; }

/* ===================== 区块 ===================== */
.section {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px 22px; margin-bottom: 22px; box-shadow: var(--sh-sm);
}

/* ===================== 表格 ===================== */
.table {
  background: var(--surface); border-radius: var(--r); width: 100%;
  border-collapse: separate; border-spacing: 0; overflow: hidden; font-size: 13.5px;
}
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line-2); }
.table th { background: var(--surface-2); color: var(--ink-2); font-weight: 700; font-size: 12.5px; letter-spacing: .3px; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #f3fbf8; }
.table tbody tr:last-child td { border-bottom: none; }
.tag {
  display: inline-block; background: var(--brand-l); color: var(--brand-d); font-size: 12px;
  padding: 3px 10px; border-radius: 10px; margin: 0 4px 4px 0; font-weight: 600;
}
.mk { font-size: 16px; font-weight: 700; }
.mk.ok { color: var(--brand); }
.mk.no { color: #cbd5e1; }

/* ===================== 按钮 ===================== */
.btn {
  background: var(--brand); color: #fff; border: none; padding: 9px 18px; border-radius: 10px;
  font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex;
  align-items: center; gap: 6px; justify-content: center; transition: background .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 4px 12px rgba(16, 185, 129, .25);
}
.btn:hover { background: var(--brand-d); box-shadow: 0 6px 16px rgba(16, 185, 129, .32); }
.btn:active { transform: scale(.98); }
.btn.sec { background: var(--surface); color: var(--brand-d); border: 1px solid var(--brand); box-shadow: none; }
.btn.sec:hover { background: var(--brand-l); }
.btn.ghost { background: transparent; color: var(--ink-2); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn.danger { background: var(--danger); box-shadow: 0 4px 12px rgba(250, 81, 81, .25); }
.btn.danger:hover { background: #e23a3a; }
.btn.warn { background: var(--warn); box-shadow: 0 4px 12px rgba(232, 134, 11, .25); }
.btn.warn:hover { background: #cf7600; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.sm { padding: 6px 13px; font-size: 12.5px; border-radius: 8px; }
.table .btn { padding: 5px 12px; font-size: 12.5px; border-radius: 8px; }
.link { color: var(--brand-d); text-decoration: none; font-weight: 600; transition: color .12s; }
.link:hover { color: var(--brand); text-decoration: underline; }
.hint { color: var(--muted); font-size: 12px; margin-top: 6px; }

/* ===================== 明细页 ===================== */
.det-row { display: flex; padding: 11px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.det-row:last-child { border-bottom: none; }
.det-row .k { width: 120px; color: var(--muted); flex: 0 0 120px; }
.det-row .v { flex: 1; color: var(--ink); }
.pc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pc { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface); transition: box-shadow .15s; }
.pc:hover { box-shadow: var(--sh-sm); }
.pc .t { font-weight: 700; font-size: 14px; color: var(--ink); }
.pc .m { display: flex; justify-content: space-between; margin-top: 8px; }
.pc .p { color: var(--danger); font-weight: 700; }
.pc .s { color: var(--muted); font-size: 12px; }
.pc a { color: var(--brand-d); font-size: 12px; }
.share-box { background: #f0fdf7; border: 1px solid #bdebd2; border-radius: 12px; padding: 13px 15px; }
.share-box .st { font-weight: 700; font-size: 15px; color: var(--ink); }
.share-box a { color: var(--brand-d); word-break: break-all; text-decoration: none; }

/* ===================== 输入框 ===================== */
textarea, input[type=text], input[type=password], input[type=date], select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; font-family: inherit; color: var(--ink); background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: var(--radius-focus); }

/* ===================== 关键词 chip ===================== */
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; background: var(--accent-l); color: #3546b0;
  border: 1px solid #c7d2fe; border-radius: 16px; padding: 6px 10px 6px 14px; font-size: 13px; font-weight: 500;
}
.chip .x { border: none; background: transparent; color: #3546b0; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px; }
.chip .x:hover { color: var(--danger); }

/* ===================== 采集浏览器（CDP） ===================== */
.cdp-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cdp-bar .hint { margin-top: 0; }
.badge {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600;
  padding: 7px 14px; border-radius: 20px;
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--brand-l); color: var(--brand-d); border: 1px solid #b6e8d3; }
.badge.no { background: var(--danger-l); color: var(--danger); border: 1px solid #f7c1c1; }
.badge.wait { background: var(--warn-l); color: var(--warn); border: 1px solid #f5d9a8; }
.badge.warn { background: var(--warn-l); color: var(--warn); border: 1px solid #f5d9a8; }
#cdpTabs .chip { padding: 5px 12px; margin-top: 6px; }
code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 12.5px; color: #3546b0; }

/* ===================== 登录 ===================== */
.login-wrap {
  max-width: 380px; margin: 12vh auto; background: var(--surface); padding: 34px 32px;
  border-radius: var(--r-xl); box-shadow: var(--sh-lg); border: 1px solid var(--line);
}
.login-wrap h2 { text-align: center; }
.login-wrap .btn { width: 100%; margin-top: 16px; }

/* ===================== 图片预览 / 缩略图 ===================== */
.img-prev { max-width: 100%; border: 1px solid var(--line); border-radius: 12px; margin-top: 10px; }
.thumb { width: 84px; height: 110px; object-fit: cover; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: border-color .15s, transform .12s; }
.thumb:hover { border-color: var(--brand); transform: scale(1.03); }

/* ===================== Toast ===================== */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(10px);
  background: var(--ink); color: #fff; padding: 11px 22px; border-radius: 22px; font-size: 14px; font-weight: 500;
  opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; z-index: 90;
  box-shadow: var(--sh-lg);
}
.toast.show { opacity: .95; transform: translateX(-50%) translateY(0); }

/* ===================== 采集任务页 ===================== */
.chk-grid { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 8px 0 4px; }
.chk { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; cursor: pointer; color: var(--ink-2); }
.chk input { width: 16px; height: 16px; accent-color: var(--brand); }
.form-grid { display: grid; grid-template-columns: 160px 1fr; gap: 12px 14px; align-items: center; }
.form-grid label { color: var(--ink-2); font-size: 13.5px; font-weight: 500; }
.form-grid input { padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; width: 100%; box-sizing: border-box; }
.form-grid input[type=checkbox] { width: 16px; height: 16px; }
details summary { cursor: pointer; color: var(--brand-d); font-weight: 600; }
.progress-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; min-height: 60px; }
.pbar { font-size: 14px; margin-bottom: 8px; font-weight: 500; }
.pmeta { color: var(--muted); font-size: 12.5px; margin-bottom: 8px; }
.ptable { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ptable th, .ptable td { border-bottom: 1px solid var(--line-2); padding: 8px 11px; text-align: left; vertical-align: top; }
.ptable th { background: var(--surface-2); color: var(--ink-2); font-weight: 700; }
.ptable tr:last-child td { border-bottom: none; }
.pdetail { color: var(--ink-2); line-height: 1.6; }
.perr { color: var(--danger); font-size: 13px; margin-top: 8px; }

/* ===================== 品牌报告页 ===================== */
.br-tabs { display: flex; border-bottom: 1px solid var(--line); background: var(--surface-2); border-radius: var(--r-lg) var(--r-lg) 0 0; overflow: hidden; }
.br-tab { padding: 13px 22px; cursor: pointer; font-size: 14px; color: var(--ink-2); border-bottom: 2px solid transparent; transition: color .15s, background .15s; }
.br-tab:hover { color: var(--brand-d); background: rgba(16, 185, 129, .04); }
.br-tab.active { color: var(--brand-d); border-bottom-color: var(--brand); font-weight: 700; }
.br-panel { padding: 20px 22px; }
.sub-cards { margin-bottom: 18px; }
.sub-cards .card::before { background: var(--accent); }
.sub-cards .card .num { color: var(--accent); }
.br-filterbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.br-filterbar input, .br-filterbar select { width: auto; min-width: 120px; padding: 9px 11px; }
.br-table-wrap { overflow-x: auto; border-radius: var(--r); }
.br-table th { white-space: nowrap; }
.br-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.br-title { max-width: 260px; }
.br-price { color: var(--danger); font-weight: 700; white-space: nowrap; }
.br-pagination { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 18px; font-size: 13px; }
.br-pagination button { background: var(--surface); border: 1px solid var(--line); padding: 7px 15px; border-radius: 9px; cursor: pointer; transition: background .12s; }
.br-pagination button:hover:not(:disabled) { background: var(--surface-2); }
.br-pagination button:disabled { opacity: .5; cursor: not-allowed; }

/* ===================== 双主线导航分组（覆盖默认） ===================== */
.nav-group-label { font-size: 11px; color: #7c87b0; letter-spacing: 1.5px; margin: 18px 12px 6px; text-transform: none; font-weight: 600; }

/* ===================== 区块标题与快速选择 ===================== */
.sec-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.sec-head h3 { margin-bottom: 0; }
.quick { display: flex; gap: 6px; align-items: center; }
.qbtn { background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); padding: 6px 13px; border-radius: 9px; cursor: pointer; font-size: 13px; font-weight: 500; transition: all .12s; }
.qbtn.active, .qbtn:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ===================== 图表容器 ===================== */
.chart-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--sh-sm); }
.chart-box canvas { max-height: 280px; }

/* ===================== 两列布局 ===================== */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 1100px) { .two-col { grid-template-columns: 1fr; } }
.mini-title { font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 10px; padding-left: 9px; border-left: 3px solid var(--brand); }

/* ===================== 竞品明细 ===================== */
.comp-detail { margin-top: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.comp-detail .table { margin-top: 8px; }

/* ===================== 导出任务进度 ===================== */
.export-task { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 12px; box-shadow: var(--sh-sm); }
.export-task .bar { height: 8px; background: var(--line-2); border-radius: 6px; overflow: hidden; margin-top: 10px; }
.export-task .bar > i { display: block; height: 100%; background: var(--brand); border-radius: 6px; transition: width .3s; }

/* ===================== 概览看板：明细 Tab ===================== */
#detailSection { padding: 0; overflow: hidden; }
#detailSection .br-filterbar { margin-bottom: 16px; }
#detailSection .br-pagination { margin-top: 16px; }
#detailSection .br-tab:first-child { border-top-left-radius: var(--r-lg); }
#detailSection .br-table th, #detailSection .br-table td { white-space: nowrap; }
#detailSection .br-table td:nth-child(3) { white-space: normal; max-width: 280px; }

/* ===================== 空状态 / 加载 ===================== */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .ico { font-size: 40px; opacity: .5; }
.empty .t { font-size: 15px; font-weight: 600; color: var(--ink-2); margin-top: 10px; }
.empty .d { font-size: 13px; margin-top: 4px; }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--brand);
  animation: spin .8s linear infinite; margin: 30px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===================== 账号管理页（.acct- 前缀避免冲突） ===================== */
.acct-form { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.acct-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; max-width: none; }
.acct-inline .acct-actions { grid-column: 1 / -1; }
.acct-field { display: flex; flex-direction: column; gap: 6px; }
.acct-field > span { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.acct-field input, .acct-field select { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; font-family: inherit; }
.acct-field.acct-check { flex-direction: row; align-items: center; gap: 8px; }
.acct-field.acct-check input { width: 16px; height: 16px; }
.acct-actions { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.acct-badge { display: inline-block; padding: 3px 11px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.acct-badge.ok { background: var(--brand-l); color: var(--brand-d); }
.acct-badge.off { background: var(--surface-2); color: var(--muted); }
.acct-badge.warn { background: var(--warn-l); color: var(--warn); }
.acct-me { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 8px; background: var(--accent-l); color: #3546b0; font-size: 11px; font-weight: 700; }
.acct-ops { white-space: nowrap; }
.acct-ops .link { margin-right: 10px; }
.sec-actions { display: flex; gap: 8px; }

/* ===================== 查看密码弹窗：哈希 + 明文 ===================== */
.cred-box { display: flex; flex-direction: column; gap: 8px; }
.cred-warn { background: var(--warn-l); border: 1px solid #f5d9a8; color: #8a5a00; padding: 10px 13px; border-radius: 10px; font-size: 13px; line-height: 1.6; }
.cred-warn.plain { background: var(--danger-l); border-color: #f5b5b5; color: #b3261e; }
.cred-warn.err { background: var(--danger-l); border-color: #f5b5b5; color: #b3261e; }
.cred-row { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; padding: 4px 0; }
.cred-k { flex: 0 0 96px; color: var(--muted); padding-top: 6px; }
.cred-v { flex: 1; color: var(--ink); word-break: break-all; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.cred-input { width: 100%; padding: 8px 11px; border: 1px solid #dcdcdc; border-radius: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: #b3261e; background: #fff; }

/* ===================== 弹窗（通用 + 账号页兼容） ===================== */
.acct-mask, .modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .5); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; z-index: 80; padding: 16px;
}
.acct-modal, .modal {
  background: var(--surface); border-radius: var(--r-lg); width: min(460px, 94vw);
  box-shadow: var(--sh-lg); overflow: hidden; animation: pop .2s ease;
}
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.acct-modal-hd, .modal-hd { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 15px; }
.acct-x, .modal-x { border: none; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); width: 30px; height: 30px; border-radius: 8px; }
.acct-x:hover, .modal-x:hover { color: var(--danger); background: var(--surface-2); }
.acct-modal-bd, .modal-bd { padding: 20px; }
.acct-modal-ft, .modal-ft { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }

/* ===================== 响应式 ===================== */
@media (max-width: 1100px) { .charts { grid-template-columns: 1fr; } }

/* 移动端：侧边栏改为抽屉（汉堡触发），展开时显示完整文字 */
@media (max-width: 900px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 60;
    width: var(--sidebar-w); flex-basis: var(--sidebar-w);
    transform: translateX(-100%); transition: transform .25s ease;
    box-shadow: var(--sh-lg);
  }
  .sidebar.open { transform: translateX(0); }
  #menuBtn { display: inline-flex; }
  .scrim.show { display: block; }
  body.nav-open { overflow: hidden; }
  .main { padding: 72px 16px 20px; }
  .nav-item span:last-child { display: inline; }
  .brand { text-align: left; padding: 4px 10px 20px; }
  .nav-group-label { display: block; }
  .br-filterbar input, .br-filterbar select { flex: 1 1 45%; }
  .pc-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .main { padding: 68px 12px 16px; }
  .cards { grid-template-columns: 1fr 1fr; }
  h2 { font-size: 19px; }
  .acct-inline { grid-template-columns: 1fr; }
}

/* =========================================================
   自动采集调度模块（schedule.html）追加样式
   仅补充既有设计系统未覆盖的部分，颜色一律复用 :root 令牌
   ========================================================= */

/* 调度器状态条 */
.sched-bar { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; font-size: 13px; color: var(--ink-2); }
.sched-bar .item { display: inline-flex; align-items: center; gap: 6px; }
.sched-bar b { color: var(--brand-d); }

/* 启停开关（复用 --brand / --line 令牌，无需新配色） */
.switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 40px; height: 22px; border-radius: 22px; background: var(--line); transition: background .18s; position: relative; flex: 0 0 40px; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--sh-sm); transition: transform .18s; }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: var(--radius-focus); }

/* 运行中状态徽章（蓝 + 小转圈）：复用 --accent 令牌，既有徽章无蓝色故新增 */
.badge.run { background: var(--accent-l); color: #3546b0; border: 1px solid #c7d2fe; }
.badge.run::before { display: none; }
.badge.run .spin { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border: 2px solid #c7d2fe; border-top-color: #3546b0; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; }

/* 触发时间预览框 */
.pv-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-top: 10px; }
.pv-item { font-size: 13.5px; padding: 5px 0; color: var(--ink); border-bottom: 1px dashed var(--line-2); display: flex; align-items: center; gap: 8px; }
.pv-item:last-child { border-bottom: none; }
.pv-item::before { content: "⏰"; }

/* 长表单弹窗内部可滚动（仅作用于 .modal-bd，不影响 .acct-modal-bd） */
.modal-bd { max-height: 80vh; overflow-y: auto; }

/* 表格操作列内间距（按钮/链接紧凑排列） */
.tk-ops { white-space: nowrap; }
.tk-ops .btn, .tk-ops .link { margin-right: 8px; }
.tk-ops .btn:last-child, .tk-ops .link:last-child { margin-right: 0; }

/* =========================================================
   品牌词与竞品词分类管理（manage.html）追加样式
   ========================================================= */

/* 说明信息框 */
.kw-info-box { background: var(--surface-2); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 10px; padding: 14px 18px; }
.kw-info-title { font-weight: 700; color: var(--ink); margin-bottom: 8px; font-size: 14px; }
.kw-info-body p { margin: 4px 0; color: var(--ink-2); font-size: 13px; line-height: 1.7; }
.kw-info-body b { color: var(--ink); }

/* 左右分栏布局 */
.kw-split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .kw-split { grid-template-columns: 1fr; } }

/* 每个面板 */
.kw-pane { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.kw-pane-hd { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.kw-pane-bd { padding: 16px; }

/* 品牌词/竞品词标签 */
.kw-tag { display: inline-flex; align-items: center; padding: 3px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; }
.kw-tag-brand { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.kw-tag-comp { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }

/* 面板内通用输入框 */
.kw-input { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-focus); margin-bottom: 8px; font-size: 14px; font-family: inherit; }
.kw-input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-l); }

/* 竞品词提示框 */
.kw-hint-box { background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 10px 12px; font-size: 12.5px; color: #92400e; line-height: 1.7; margin-bottom: 10px; }
.kw-hint-box b { color: #78350f; }

/* chip 选中态 */
.chip.chip-sel { background: var(--brand-l); border-color: var(--brand); }
.chip-ck { margin-right: 4px; cursor: pointer; }
