/* 竞品广告（独立模块，逻辑见 /js/competitorAds.js）。类名统一以 ca- 开头 */
.ca-intro { font-size: 13px; color: #666; line-height: 1.6; margin: -12px 0 16px; }
.ca-muted { font-size: 12px; color: #999; margin-top: 2px; }
.ca-error { font-size: 12px; color: #e53e3e; max-width: 260px; word-break: break-word; }
.ca-target { font-weight: 500; color: #222; word-break: break-all; }
.ca-cond { font-size: 12px; color: #555; line-height: 1.7; }
.ca-ops { white-space: nowrap; }
.ca-ops .btn { margin: 2px 4px 2px 0; text-decoration: none; display: inline-block; }
.ca-badge-red { background: #fff5f5; color: #e53e3e; }
.ca-badge-orange { background: #fff4e6; color: #d9480f; }
.ca-warn { color: #d9480f; }
/* 首页说明（分条）和整体进度：状态一行 + 数字小卡片 */
.ca-intro-list { list-style: none; display: grid; grid-template-columns: repeat(2, auto); justify-content: start; gap: 4px 40px; }
@media (max-width: 900px) { .ca-intro-list { grid-template-columns: 1fr; } }
.ca-intro-list b { color: #333; font-weight: 600; margin-right: 8px; }
.ca-progress { margin-bottom: 16px; background: #fff; border-radius: 10px; padding: 14px 16px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.ca-status-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.ca-status-line .ca-muted { font-weight: 400; margin-top: 0; }
.ca-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.ca-status-ok { color: #1e7b3c; }
.ca-status-ok .ca-dot { background: #2f9e44; }
.ca-status-warn { color: #d9480f; }
.ca-status-warn .ca-dot { background: #f08c00; }
.ca-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ca-stat { background: #f8f9fc; border-radius: 8px; padding: 10px 12px; }
.ca-stat-label { font-size: 12px; color: #888; }
.ca-stat-value { font-size: 13px; color: #555; margin-top: 4px; }
.ca-stat-value b { font-size: 20px; font-weight: 600; color: #222; }
.ca-stat-sub { font-size: 12px; color: #999; margin-top: 2px; }
.ca-stat-bad { background: #fff5f5; }
.ca-stat-bad .ca-stat-label, .ca-stat-bad .ca-stat-value b { color: #e53e3e; }

/* 自动抓取开关 */
.ca-sched { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: #555; }
#caRoot .ca-run-btn { padding: 5px 12px; font-size: 12px; white-space: nowrap; }
#caRoot .ca-run-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ca-head-ops { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ca-switch { position: relative; display: inline-block; width: 38px; height: 22px; flex-shrink: 0; cursor: pointer; }
.ca-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.ca-slider { position: absolute; inset: 0; background: #c9ced8; border-radius: 22px; transition: background 0.15s; }
.ca-slider::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform 0.15s; box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.ca-switch input:checked + .ca-slider { background: #2f9e44; }
.ca-switch input:checked + .ca-slider::before { transform: translateX(16px); }
.ca-switch input:disabled + .ca-slider { opacity: 0.5; cursor: wait; }
.ca-switch input:focus-visible + .ca-slider { outline: 2px solid #4361ee; outline-offset: 2px; }
.ca-status-sub { margin-top: 6px; padding-top: 0; border-top: none; }

/* 按钮：本模块（页面、添加监控、代理设置、大图）里的次要按钮加边框，和白色背景区分开；不能点的变淡 */
#caRoot .btn, #caAddModal .btn, #caProxyModal .btn, #caLightbox .btn { line-height: 1.4; transition: background 0.15s, border-color 0.15s, color 0.15s; }
#caRoot .btn-ghost, #caAddModal .btn-ghost, #caProxyModal .btn-ghost, #caLightbox .btn-ghost { background: #fff; color: #333; border: 1px solid #c9ced8; }
#caRoot .btn-ghost:hover, #caAddModal .btn-ghost:hover, #caProxyModal .btn-ghost:hover, #caLightbox .btn-ghost:hover { border-color: #4361ee; color: #4361ee; background: #f5f7ff; }
#caRoot .btn-primary, #caAddModal .btn-primary, #caProxyModal .btn-primary { border: 1px solid #4361ee; }
#caRoot .btn[disabled], #caAddModal .btn[disabled], #caProxyModal .btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.ca-top { margin-bottom: 12px; }
.ca-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.ca-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; word-break: break-all; }
.ca-cond-list { list-style: none; font-size: 13px; color: #555; line-height: 1.8; }
.ca-cond-list li::before { content: '· '; color: #aaa; }
.ca-status { margin-top: 12px; padding-top: 12px; border-top: 1px solid #f0f0f0; font-size: 13px; color: #555; }
.ca-status > div { display: inline-block; margin-left: 6px; }
.ca-h3 { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.ca-summary { font-size: 13px; color: #555; background: #f8f9fc; border-radius: 6px; padding: 10px 12px; margin-bottom: 12px; line-height: 1.6; }
.ca-table-wrap { overflow-x: auto; }
tr.ca-selected td { background: #f0f4ff; }
.ca-sec-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.ca-sec-head .ca-h3 { margin-bottom: 0; }
/* 广告主表：限高，超过的在框内滚动，表头固定 */
.ca-adv-scroll { max-height: 520px; overflow: auto; border: 1px solid #dde1e8; border-radius: 8px; }
.ca-adv-scroll thead th { position: sticky; top: 0; background: #fff; z-index: 1; box-shadow: 0 1px 0 #dde1e8; }
.ca-adv-scroll .ca-more { margin: 12px 0; }

/* 广告卡片：灰色截图区 + 白色信息区，卡片有明显边框和阴影，相邻卡片容易分清 */
.ca-ads-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ca-ads-bar .ca-h3 { margin-bottom: 0; }
.ca-ads-bar label { font-size: 13px; color: #555; }
.ca-ads-bar select { padding: 5px 8px; border: 1px solid #c9ced8; border-radius: 6px; font-size: 13px; background: #fff; }
.ca-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ca-disk { font-size: 13px; padding: 4px 12px; border-radius: 999px; background: #f1f3f5; color: #555; white-space: nowrap; }
.ca-disk-ok { background: #e6f6ec; color: #1e7b3c; }
.ca-disk-low { background: #fdecea; color: #c92a2a; font-weight: 600; }
.ca-type-bar { margin: 0 0 14px; font-size: 14px; color: #333; }
.ca-type-bar select { margin-left: 6px; padding: 6px 10px; border: 1px solid #c9ced8; border-radius: 6px; font-size: 14px; background: #fff; }
/* 广告卡片：宽屏每行 4 张（用户 2026-10-30 要求，5 张太挤），窗口变窄依次 3、2、1 张 */
.ca-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1400px) { .ca-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1050px) { .ca-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ca-grid { grid-template-columns: 1fr; } }
.ca-ad {
  border: 1px solid #cfd4de; border-radius: 10px; overflow: hidden; background: #fff;
  display: flex; flex-direction: column; box-shadow: 0 2px 6px rgba(20, 30, 60, 0.08);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ca-ad:hover { border-color: #4361ee; box-shadow: 0 6px 18px rgba(67, 97, 238, 0.18); }
.ca-ad-media {
  display: flex; align-items: center; justify-content: center; height: 230px; padding: 12px;
  background: #eef0f4; border-bottom: 1px solid #cfd4de; overflow: hidden; cursor: zoom-in; /* 点截图看大图 */
}
.ca-ad-media img {
  max-width: 100%; max-height: 100%; object-fit: contain; display: block;
  background: #fff; border: 1px solid #dde1e8; border-radius: 4px;
}
.ca-noimg { font-size: 12px; color: #999; text-align: center; padding: 20px; line-height: 1.6; }
.ca-ad-body { padding: 12px 14px 14px; font-size: 13px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.ca-ad-adv { font-weight: 600; color: #222; word-break: break-word; }
.ca-link {
  align-self: flex-start; margin-top: auto; padding: 6px 12px; font-size: 12px; font-weight: 500;
  color: #4361ee; background: #fff; border: 1px solid #4361ee; border-radius: 6px; text-decoration: none;
  transition: background 0.15s, color 0.15s; display: inline-block;
}
.ca-head .ca-link { margin: 6px 0 8px; }
/* 卡片分块（投放 / 广告主 / 国家 / 欧洲）：虚线隔开，每块前面固定宽度的小标题 */
.ca-sec { display: flex; gap: 6px; align-items: flex-start; border-top: 1px dashed #e1e5ec; padding-top: 7px; margin-top: 5px; font-size: 12px; color: #444; line-height: 1.55; }
.ca-sec-days { display: block; }
.ca-k { flex: 0 0 auto; min-width: 3.2em; font-weight: 600; color: #222; }
.ca-sec-body { flex: 1; min-width: 0; }
.ca-sec b { color: #222; }
.ca-days { display: flex; align-items: baseline; gap: 6px; }
.ca-days-num { font-size: 13px; color: #222; }
.ca-days-num b { font-size: 22px; font-weight: 700; color: #4361ee; }
.ca-fmt { margin-left: auto; font-size: 11px; color: #666; background: #f1f3f7; border-radius: 4px; padding: 1px 6px; }
/* 广告主结论标签：稳定老手（绿）/ 部分跑通（蓝）/ 试水中（灰） */
.ca-lv { margin-top: 3px; font-size: 12px; }
.ca-lv-tag { display: inline-block; margin-right: 6px; padding: 0 7px; border-radius: 4px; font-weight: 600; line-height: 1.7; }
.ca-lv-pro { color: #2f7a45; }
.ca-lv-pro .ca-lv-tag { background: #e3f6ea; color: #1f7a3c; }
.ca-lv-mid { color: #3b5bdb; }
.ca-lv-mid .ca-lv-tag { background: #e7edff; color: #3b5bdb; }
.ca-lv-new { color: #888; }
.ca-lv-new .ca-lv-tag { background: #f1f3f5; color: #666; }
.ca-ad-body .ca-regions { margin-top: 0; }
/* 欧盟数据：卡片上一行合计（悬停看各国），大图里看明细表和定向方式 */
.ca-ad-body .ca-eu { font-size: 12px; color: #444; line-height: 1.5; }
.ca-eu-main { cursor: help; }
.ca-eu-main b { color: #1a6b3c; }
.ca-eu-detail { margin-top: 6px; padding: 8px 10px; background: #f6f8fb; border: 1px solid #e3e8ef; border-radius: 6px; font-size: 12px; line-height: 1.6; }
.ca-eu-table-wrap { max-height: 220px; overflow-y: auto; margin: 6px 0; }
.ca-eu-table { width: 100%; border-collapse: collapse; }
.ca-eu-table th, .ca-eu-table td { text-align: left; padding: 3px 8px; border-bottom: 1px solid #e3e8ef; white-space: nowrap; }
.ca-eu-table th { position: sticky; top: 0; background: #eef2f7; font-weight: 600; }
.ca-regions { font-size: 12px; color: #444; line-height: 1.5; margin-top: 4px; }
.ca-regions-text { cursor: help; user-select: text; }
.ca-reg-actions { white-space: nowrap; margin-left: 6px; }
.ca-text-btn { background: none; border: none; padding: 0 4px; font-size: 12px; color: #4361ee; cursor: pointer; }
.ca-text-btn:hover { text-decoration: underline; }
#caRoot .ca-reg-btn { padding: 3px 10px; font-size: 12px; }
.ca-link:hover { background: #4361ee; color: #fff; }
.ca-more { text-align: center; margin-top: 20px; }
.ca-more .btn { padding: 10px 28px; font-size: 14px; }

.ca-tabs { display: flex; gap: 4px; border-bottom: 1px solid #eee; margin-bottom: 16px; }
.ca-tab { background: none; border: none; border-bottom: 2px solid transparent; padding: 8px 12px; font-size: 14px; color: #666; cursor: pointer; }
.ca-tab.active { color: #4361ee; border-bottom-color: #4361ee; font-weight: 500; }
.ca-found-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #333; word-break: break-all; }
.ca-found-item input { width: auto; flex-shrink: 0; }
/* 添加监控：粘贴时提示已经添加过（保存时会跳过）、重复填写、认不出的 */
.ca-warn-box { margin-top: 6px; padding: 8px 10px; font-size: 12px; line-height: 1.6; color: #d9480f; background: #fff4e6; border: 1px solid #ffd8a8; border-radius: 6px; word-break: break-all; }
.ca-fixed { font-size: 12px; color: #666; background: #f8f9fc; border-radius: 6px; padding: 8px 10px; margin-bottom: 12px; }
/* 监控类型标签；添加广告主时的勾选列表 */
.ca-type { display: inline-block; font-size: 11px; font-weight: 400; line-height: 18px; padding: 0 6px; border-radius: 3px; background: #eef1fb; color: #4361ee; margin-right: 6px; vertical-align: 2px; }
.ca-pick-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 6px; }
.ca-pick-bar input[type="text"] { flex: 1; min-width: 180px; }
.ca-pick-bar .ca-found-item { white-space: nowrap; }
.ca-pick-list { margin-top: 6px; max-height: 260px; overflow-y: auto; border: 1px solid #dde1e8; border-radius: 6px; padding: 2px 10px; }
/* 前面加 .form-group：通用样式 .form-group label { display: block } 优先级更高，会让勾选框和文字挨在一起 */
.ca-pick-item, .form-group .ca-pick-item { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; font-size: 13px; border-bottom: 1px solid #f2f3f5; cursor: pointer; }
.ca-pick-item:last-child { border-bottom: none; }
.ca-added { color: #e53e3e; } /* 勾选列表里"（已添加）"红字 */
/* 添加广告主：两种来源用颜色区分（本地已抓到的 = 蓝，到 Google 透明度中心搜索 = 绿） */
.ca-src { padding: 10px 12px; border-radius: 6px; border: 1px solid; border-left-width: 4px; }
.ca-src-local { background: #f5f7ff; border-color: #d4dcfb; border-left-color: #4361ee; }
.ca-src-google { background: #f2fbf4; border-color: #c9ebd2; border-left-color: #2f9e44; }
.ca-src-tag { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 4px; font-size: 12px; line-height: 18px; color: #fff; }
.ca-src-local .ca-src-tag { background: #4361ee; }
.ca-src-google .ca-src-tag { background: #2f9e44; }
.ca-src .ca-pick-list { background: #fff; }
/* 添加监控弹框：比通用弹框（500px）宽，窄屏不超出屏幕；列表多显示几行 */
#caAddModal .modal-box { width: 900px; max-width: 94vw; max-height: 94vh; }
#caAddModal .ca-pick-list { max-height: 360px; }
.ca-pick-item input { width: auto; flex-shrink: 0; margin-top: 3px; }

/* 收藏按钮（每人各自的收藏）：已收藏时橙色星标 */
.ca-fav-btn {
  display: inline-block; margin: 2px 4px 2px 0; padding: 4px 10px; font-size: 12px; line-height: 1.4; white-space: nowrap;
  color: #555; background: #fff; border: 1px solid #c9ced8; border-radius: 6px; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ca-fav-btn:hover { border-color: #f59f00; color: #e67700; }
.ca-fav-btn.on { color: #e67700; background: #fff8e6; border-color: #f5c26b; }
.ca-fav-btn[disabled] { opacity: 0.5; cursor: wait; }
/* 首页右上角"★ 我的收藏"入口：和"已收藏"按钮同一种橙色 */
#caRoot #caFavBtn { color: #e67700; background: #fff8e6; border-color: #f5c26b; }
#caRoot #caFavBtn:hover { border-color: #f59f00; background: #fff3d6; }
.ca-ad-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.ca-notes { font-size: 12px; margin: 8px 0 10px; }
.ca-note { background: #fffbe6; border: 1px solid #f5e6a8; border-radius: 6px; padding: 6px 8px; margin-bottom: 6px; }
.ca-note-text { color: #333; white-space: pre-wrap; word-break: break-word; line-height: 1.5; }
.ca-note-meta { color: #999; margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.ca-note-add { padding: 0; }
.ca-note-form textarea { width: 100%; font-size: 12px; padding: 6px 8px; border: 1px solid #c9ced8; border-radius: 6px; resize: vertical; font-family: inherit; }
.ca-note-form-ops { display: flex; justify-content: flex-end; gap: 6px; margin-top: 6px; }
#caRoot .ca-note-form-ops .btn { padding: 4px 12px; font-size: 12px; }
.ca-note-msg { color: #d9480f; margin-top: 4px; }
.ca-ad-foot .ca-link { margin-top: 0; }
.ca-ad-foot .ca-fav-btn { margin: 0; }
/* 点截图看大图 */
.ca-lightbox .modal-box { width: auto; max-width: 92vw; padding: 20px; }
.ca-lightbox-img { display: block; max-width: min(88vw, 960px); max-height: 68vh; margin: 0 auto 14px; object-fit: contain; border: 1px solid #dde1e8; border-radius: 6px; background: #fff; }
.ca-lightbox-info { display: flex; flex-direction: column; gap: 4px; font-size: 13px; min-width: 280px; max-width: 900px; margin: 0 auto; }
.ca-lightbox-info .ca-sec { font-size: 13px; }
.ca-lightbox-info .ca-eu-detail { margin-top: 0; }
.ca-lightbox-info .ca-ad-foot { margin-top: 10px; }
/* 首页本地搜索：搜索框在"任务类型"同一行，红字提示用法（用户 2026-11-30 要求） */
.ca-type-bar { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.ca-type-bar > label { padding-top: 6px; }
.ca-search { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ca-search input { width: 380px; max-width: 100%; padding: 6px 10px; border: 1px solid #c9ced8; border-radius: 6px; font-size: 14px; }
.ca-search-tip { color: #c92a2a; font-size: 13px; margin-top: 6px; }
.ca-search-note { font-weight: 600; margin-top: 4px; }
.ca-search-h { font-size: 14px; margin: 16px 0 8px; color: #333; }
.ca-search-domain { border: 1px solid #dde1e8; border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.ca-search-exact { border-color: #4c8bf5; }
.ca-search-domain-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.ca-search-domain .ca-adv-scroll { max-height: 420px; }
.ca-chip { display: inline-block; padding: 2px 8px; margin: 2px 4px 2px 0; border-radius: 6px; background: #f1f3f5; color: #333; font-size: 12px; text-decoration: none; white-space: nowrap; }
.ca-chip:hover { background: #e7eaee; }
