/* ===== 标讯雷达平台全局样式 v2 ===== */
:root {
  --brand: #2f9e6e;
  --brand-dark: #237a55;
  --brand-soft: #e8f5ee;
  --blue: #3b82f6;
  --blue-soft: #eaf1fe;
  --orange: #d98a4a;
  --orange-soft: #fff3e8;
  --red: #d05a5a;
  --red-soft: #fdeeee;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --line: #e5e8ef;
  --text: #1f2937;
  --muted: #6b7280;
  --muted-2: #9aa3b2;
  --radius: 12px;
  --shadow: 0 1px 4px rgba(16, 42, 67, 0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }

.primary-btn, .secondary-btn, .text-btn, .outline-wide {
  border: 0; border-radius: 9px; padding: 10px 16px; font-weight: 600; font-size: 13px; transition: 0.15s ease;
}
.primary-btn {
  background: linear-gradient(120deg, #31a574, #237a55); color: #fff;
  box-shadow: 0 4px 12px rgba(47, 158, 110, 0.28);
}
.primary-btn:hover { opacity: 0.92; transform: translateY(-1px); }
.primary-btn:disabled, .secondary-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.secondary-btn {
  background: #fff; color: #4b5563; border: 1px solid var(--line);
}
.secondary-btn:hover { border-color: var(--brand); color: var(--brand-dark); }
.text-btn { background: transparent; color: var(--blue); padding: 6px 8px; }
.text-btn:hover { background: var(--blue-soft); }
.outline-wide { width: 100%; background: #fbfcfd; border: 1px solid var(--line); color: #4b5563; }
.outline-wide:hover { border-color: var(--brand); color: var(--brand-dark); }

.eyebrow { font-size: 10px; letter-spacing: 0.12em; color: var(--muted-2); text-transform: uppercase; font-weight: 700; margin-bottom: 6px; }
.local-badge {
  display: inline-block; padding: 4px 8px; border-radius: 6px; font-size: 10px; font-weight: 700;
  background: var(--brand-soft); color: var(--brand-dark);
}
.empty-column { padding: 28px 16px; color: var(--muted-2); font-size: 12px; text-align: center; }
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 1200;
  background: #1f2937; color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); max-width: min(90vw, 520px);
}
.toast[data-type="error"] { background: #b33838; }
.confirm-text { white-space: pre-line; line-height: 1.7; color: var(--text); }

/* ===== 登录页 ===== */
.login-overlay {
  min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: linear-gradient(135deg, #e8f5ee 0%, #f2f7ff 55%, #ffffff 100%);
}
.login-card {
  background: #fff; border-radius: 18px; box-shadow: 0 12px 40px rgba(16, 42, 67, 0.12);
  max-width: 420px; width: 100%; padding: 42px 36px; text-align: center; border: 1px solid #edf1f6;
}
.login-logo { width: 64px; height: 64px; border-radius: 16px; margin-bottom: 14px; }
.login-card h1 { font-size: 22px; margin-bottom: 8px; }
.login-card p { color: var(--muted); font-size: 13px; }
.login-btn { display: block; margin: 26px auto 14px; padding: 13px; font-size: 15px; text-decoration: none; }
.login-alt-link { display: block; margin: 0 auto 12px; color: var(--blue); font-size: 12px; text-decoration: none; }
.login-alt-link:hover { text-decoration: underline; }
.login-fallback { margin: 6px 0 12px; padding: 10px; border: 1px dashed #d7a4a4; border-radius: 10px; background: #fff8f8; }
.login-fallback-tip { color: #b33838; font-size: 11px; line-height: 1.6; margin-bottom: 8px; text-align: left; }
.login-url-row { display: flex; gap: 8px; margin: 4px 0 10px; }
.login-url-text { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 11px; color: var(--muted); background: #f8fafc; outline: 0; }
.login-copy-btn { flex: none; padding: 8px 12px; font-size: 12px; }
.login-hint { color: #b33838; font-size: 12px; line-height: 1.6; min-height: 16px; }
.login-status { margin-top: 10px; color: var(--muted-2); font-size: 11px; min-height: 16px; }
.login-version { margin-top: 4px; color: #c3cad4; font-size: 10px; }
.login-footer { margin-top: 18px; font-size: 11px; color: var(--muted-2); }

/* ===== 应用骨架 ===== */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 236px; flex: none; background: #17382a; color: #dfeae3;
  display: flex; flex-direction: column; padding: 20px 14px; position: sticky; top: 0; height: 100vh;
}
.brand-block { display: flex; align-items: center; gap: 10px; padding: 0 6px 18px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.company-logo { width: 38px; height: 38px; border-radius: 10px; }
.brand-block strong { display: block; color: #fff; font-size: 14px; }
.brand-block small { display: block; color: #8fae9d; font-size: 10px; margin-top: 3px; }
.side-nav { margin-top: 14px; flex: 1; }
.nav-label { font-size: 10px; letter-spacing: 0.1em; color: #7e9c8c; margin: 12px 8px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  background: transparent; color: #c6d6cd; border: 0; border-radius: 9px;
  padding: 10px 11px; font-size: 13px; margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.nav-item.active { background: #2f9e6e; color: #fff; font-weight: 700; }
.nav-icon { width: 18px; text-align: center; font-size: 15px; }
.nav-item em { margin-left: auto; font-style: normal; font-size: 10px; background: rgba(255,255,255,0.14); padding: 2px 7px; border-radius: 10px; }
.admin-only { margin-top: 6px; }
.sidebar-bottom { margin-top: auto; }
.sync-card { padding: 12px; border-radius: 10px; background: rgba(255,255,255,0.06); margin-bottom: 12px; }
.sync-top { display: flex; align-items: center; gap: 7px; color: #8fd3ae; font-size: 11px; font-weight: 700; }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: #5ecf96; box-shadow: 0 0 0 4px rgba(94,207,150,0.18); }
.sync-card p { margin: 8px 0 0; color: #8fae9d; font-size: 10px; line-height: 1.5; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 10px 6px; border-top: 1px solid rgba(255,255,255,0.08); }
.avatar, .top-avatar {
  display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #6688ef, #a075ed);
  font-weight: 700; overflow: hidden;
}
.avatar { width: 32px; height: 32px; border-radius: 10px; font-size: 13px; }
.avatar-img, .top-avatar.avatar-img { object-fit: cover; }
.user-chip b { display: block; color: #fff; font-size: 12px; }
.user-chip small { display: block; color: #8fae9d; margin-top: 3px; font-size: 10px; }
.logout-btn {
  margin-left: auto; background: transparent; border: 1px solid rgba(255,255,255,0.2); color: #c6d6cd;
  width: 30px; height: 30px; border-radius: 8px; font-size: 14px;
}
.logout-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }

.main-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 0 30px; background: rgba(255,255,255,0.88); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50;
}
.breadcrumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.breadcrumbs strong { color: var(--text); }
.top-actions { display: flex; align-items: center; gap: 12px; }
.search-box {
  display: flex; align-items: center; gap: 8px; background: #f1f4f8; border-radius: 10px; padding: 0 12px; height: 38px; width: 280px;
}
.search-box span { color: var(--muted-2); }
.search-box input { border: 0; outline: 0; background: transparent; width: 100%; font-size: 13px; }
.icon-button {
  position: relative; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: #4b5563; font-size: 16px;
}
.icon-button:hover { border-color: var(--brand); color: var(--brand-dark); }
.notification-count {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 10px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center;
}
.top-avatar { width: 34px; height: 34px; border-radius: 10px; font-size: 13px; }

.view-root { padding: 28px 30px 48px; max-width: 1440px; width: 100%; margin: 0 auto; }
.view { display: none; }
.view.active-view { display: block; }

/* ===== 看板 ===== */
.welcome-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 24px; }
.welcome-row h1, .page-intro h1 { font-size: 27px; letter-spacing: -0.03em; }
.hero-copy { margin-top: 8px; color: var(--muted); font-size: 13px; }
.hero-copy b { color: var(--brand-dark); }
.hero-actions { display: flex; gap: 10px; }
.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 28px; }
.metric-card {
  padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
}
.metric-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.metric-icon { font-size: 15px; }
.metric-card > strong { display: block; margin-top: 12px; font-size: 28px; letter-spacing: -0.05em; }
.metric-card > p { margin-top: 6px; color: var(--muted-2); font-size: 11px; }
.accent-blue .metric-icon { color: var(--blue); }
.accent-violet .metric-icon { color: #8b5cf6; }
.accent-orange .metric-icon { color: var(--orange); }
.accent-green .metric-icon { color: var(--brand); }
.accent-cyan .metric-icon { color: #0e7490; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 14px; }
.section-head h2 { font-size: 19px; }
.board-head { margin-top: 26px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(280px, 0.9fr); gap: 16px; align-items: start; }
.panel-card, .insight-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.notice-panel { min-width: 0; overflow: hidden; }
.panel-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px 11px; border-bottom: 1px solid #f0f2f7; }
.panel-title { font-weight: 700; font-size: 13px; }
.notice-list { padding: 3px 18px; }
.insight-panel { display: flex; flex-direction: column; gap: 16px; }
.insight-card { padding: 18px; }
.card-title-row { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.card-title-row h3 { font-size: 15px; }
.insight-card > p { color: var(--muted); font-size: 12px; line-height: 1.7; }
.data-health-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 14px 0; }
.data-health-grid div { padding: 10px; border-radius: 8px; background: #f8fafc; }
.data-health-grid span { display: block; color: var(--muted-2); font-size: 10px; }
.data-health-grid b { display: block; margin-top: 5px; font-size: 16px; }
.task-count { font-size: 13px; font-weight: 800; color: var(--brand-dark); }
.task-list label { display: block; padding: 9px 0; border-top: 1px solid #f0f2f7; }
.task-list b { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-list small { display: block; color: var(--muted-2); margin-top: 3px; font-size: 10px; }
.task-list .empty-column { padding: 12px 0; }
.board-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.board-column { padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-height: 120px; }
.board-column-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 12px; font-weight: 700; }
.column-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); margin-right: 6px; }
.mini-opportunity { padding: 10px; border: 1px solid #edf0f5; border-radius: 9px; margin-bottom: 8px; cursor: pointer; background: #fbfcfe; }
.mini-opportunity:hover { border-color: var(--brand); }
.mini-opportunity h4 { font-size: 12px; margin: 0 0 5px; }
.mini-opportunity p { color: var(--muted); font-size: 11px; }
.mini-opportunity-foot { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted-2); font-size: 10px; }

/* ===== 标讯库 ===== */
.page-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.page-intro p { margin-top: 8px; color: var(--muted); font-size: 13px; }
.library-toolbar { display: flex; align-items: center; gap: 10px; padding: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.search-box.large { flex: 1; width: auto; min-width: 220px; background: #fafbfe; }
.library-toolbar select {
  height: 38px; min-width: 118px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px;
  color: #4b5563; background: #fff; outline: 0; font-size: 12px;
}
.active-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; min-height: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px;
  background: var(--brand-soft); color: var(--brand-dark); font-size: 11px; font-weight: 600;
}
.chip button { border: 0; background: transparent; color: inherit; font-size: 13px; line-height: 1; padding: 0; }
.library-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.library-list-panel { overflow: hidden; }
.library-list-head {
  display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.library-list-head b { font-size: 14px; }
.library-list-head span { color: var(--muted-2); font-size: 11px; }
.library-list { padding: 0 20px; }
.library-row {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) 130px; gap: 14px; padding: 16px 0;
  border-bottom: 1px solid #f0f2f7; cursor: pointer;
}
.library-row:last-child { border: 0; }
.library-row:hover .library-row-title { color: var(--brand-dark); }
.library-row-score {
  width: 48px; height: 48px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft);
  border-radius: 12px; font-weight: 800;
}
.library-row-score.high { color: #2f9e6e; background: var(--brand-soft); }
.library-row-score.mid { color: var(--orange); background: var(--orange-soft); }
.library-row-main { min-width: 0; }
.notice-head { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.notice-head h3 { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { padding: 3px 7px; border-radius: 5px; font-size: 9px; font-weight: 700; background: #f1f3f7; color: #6b7280; white-space: nowrap; }
.library-row-desc { margin: 0; color: #8e98a9; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-row-meta { display: flex; gap: 14px; margin-top: 8px; color: #a5adbb; font-size: 10px; }
.library-row-right { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.deadline { color: var(--orange); font-size: 11px; white-space: nowrap; }
.deadline.safe { color: var(--brand); }
.notice-status { padding: 5px 9px; border-radius: 6px; color: #6b7280; background: #f2f4f8; font-size: 10px; white-space: nowrap; }
.notice-status.following { color: var(--brand-dark); background: var(--brand-soft); }
.notice-status.discarded { color: var(--red); background: var(--red-soft); }
.notice-status.handoff { color: #7c5cd6; background: #f1ecfd; }
.pager { display: flex; justify-content: center; gap: 10px; padding: 14px; border-top: 1px solid #f0f2f7; }

/* ===== 跟进台 ===== */
.followup-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.followup-summary article { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.followup-summary span { color: var(--muted); font-size: 11px; }
.followup-summary strong { display: block; margin-top: 10px; font-size: 26px; }
.followup-summary small { display: block; margin-top: 5px; color: var(--muted-2); font-size: 10px; }
.pipeline-board { padding: 18px; }
.pipeline-columns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pipeline-column { min-width: 0; }
.pipeline-col-head {
  display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-radius: 9px;
  background: #f5f7fa; font-size: 12px; font-weight: 700; margin-bottom: 10px;
}
.pipeline-card { padding: 12px; border: 1px solid #edf0f5; border-radius: 10px; margin-bottom: 9px; cursor: pointer; background: #fff; }
.pipeline-card:hover { border-color: var(--brand); }
.pipeline-card h4 { font-size: 12px; margin: 0 0 6px; }
.pipeline-card p { color: var(--muted); font-size: 11px; }
.pipeline-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; color: var(--muted-2); font-size: 10px; }
.owner-dot {
  display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 6px; margin-right: 4px;
  background: var(--blue-soft); color: var(--blue); font-size: 9px; font-weight: 800; font-style: normal;
}

/* ===== 数据同步 ===== */
.sync-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.sync-summary article { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.sync-summary span { color: var(--muted); font-size: 11px; }
.sync-summary strong { display: block; margin-top: 10px; font-size: 20px; }
.sync-summary small { display: block; margin-top: 5px; color: var(--muted-2); font-size: 10px; line-height: 1.5; }
.sync-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; align-items: start; }
.sync-config-panel, .sync-keywords-panel, .sync-runs-panel { padding: 20px; }
.sync-schedule-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0 14px; padding: 10px 12px; border-radius: 9px; background: #f3faf4; border: 1px solid #ddecdc; }
.sync-schedule-row span { color: var(--muted); font-size: 11px; }
.sync-schedule-row b { display: block; margin-top: 3px; color: var(--text); font-size: 12px; }
.schedule-hint { color: var(--muted-2); font-size: 10px; line-height: 1.5; margin: -6px 0 12px; }
.mode-badge { display: inline-block; margin-top: 6px; padding: 5px 10px; border-radius: 7px; background: #e4f5e7; color: #1f7a3d; border: 1px solid #b8ddbc; font-size: 12px; font-weight: 700; }
.field-hint { display: block; color: var(--muted-2); font-size: 10px; line-height: 1.5; margin-top: 5px; }
.high-badge { display: inline-block; margin-right: 6px; padding: 2px 7px; border-radius: 5px; background: #2f9e6e; color: #fff; font-size: 10px; font-weight: 700; vertical-align: middle; }
.structured-config { margin-top: 14px; padding: 14px 16px; border: 1px dashed #b8ddbc; border-radius: 10px; background: #f8fbf8; }
.structured-config .form-row { margin-bottom: 0; }
.structured-config textarea { min-height: 84px; }
.site-config { margin-top: 14px; padding: 14px 16px; border: 1px dashed #b8ddbc; border-radius: 10px; background: #f8fbf8; }
.site-config .form-row { margin-bottom: 0; }
.collector-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.collector-card-head h3 { font-size: 16px; }
.collector-card-head p { margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.form-grid label, .profile-field, .modal-body label { display: block; color: var(--muted); font-size: 11px; }
.form-grid input, .form-grid select, .profile-field input, .profile-field textarea,
.modal-body input, .modal-body select, .modal-body textarea, .task-editor input, .task-editor select, .task-editor textarea {
  display: block; width: 100%; margin-top: 6px; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: 9px; outline: 0; color: var(--text); background: #fff; font-size: 13px;
}
.form-grid input:focus, .profile-field input:focus, .profile-field textarea:focus,
.modal-body input:focus, .task-editor input:focus, .task-editor select:focus, .task-editor textarea:focus {
  border-color: var(--brand);
}
.checkbox-row { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; margin: 10px 0 16px; }
.sync-keywords-panel textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 11px; font-size: 12px; line-height: 1.7; margin-bottom: 14px; resize: vertical; }
.sync-run-list { margin-top: 12px; }
.sync-run-list { max-height: 320px; overflow-y: auto; padding-right: 4px; }
.sync-run {
  display: grid; grid-template-columns: minmax(0, 1fr) repeat(6, auto); align-items: center; gap: 14px;
  padding: 12px 0; border-top: 1px solid #edf0f5;
}
.sync-run b { display: block; font-size: 11px; }
.sync-run small { display: block; margin-top: 4px; color: var(--muted-2); font-size: 10px; line-height: 1.5; }
.sync-run-msg {
  margin-top: 4px; color: var(--muted-2); font-size: 10px; line-height: 1.5;
  max-height: 3.6em; overflow: hidden; word-break: break-all; white-space: pre-wrap;
}
.sync-run-msg.expanded { max-height: none; }
.sync-run-toggle { margin-top: 4px; color: var(--brand-dark); font-size: 10px; cursor: pointer; background: none; border: none; padding: 0; }
.sync-progress {
  margin: 12px 0; padding: 12px 14px; border: 1px dashed var(--brand, #2e7d32);
  border-radius: 10px; background: var(--brand-soft, #e4f5e7);
}
.sync-progress-head { display: flex; justify-content: space-between; align-items: center; }
.sync-progress-head b { font-size: 12px; color: var(--brand-dark, #1f7a3d); }
.sync-progress-head span { font-size: 11px; color: var(--muted); }
.sync-progress-track { height: 8px; border-radius: 5px; background: rgba(0,0,0,0.08); margin: 8px 0 6px; overflow: hidden; }
.sync-progress-track > div { height: 100%; border-radius: 5px; background: var(--brand, #2e7d32); transition: width .4s; }
.sync-progress small { color: var(--muted-2); font-size: 10px; }
.run-status { padding: 5px 8px; border-radius: 6px; color: var(--brand-dark); background: var(--brand-soft); font-size: 10px; font-weight: 700; }
.run-status.partial { color: var(--orange); background: var(--orange-soft); }
.run-badge { padding: 5px 8px; border-radius: 6px; background: #eef1f4; color: #5a6a72; font-size: 10px; white-space: nowrap; }
.run-stat { color: #607066; font-size: 10px; white-space: nowrap; }

/* ===== 企业画像 / 规则 / 成员 ===== */
.profile-editor { padding: 24px; }
.profile-field { margin-bottom: 16px; }
.profile-field textarea { resize: vertical; }
.rules-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.rule-card { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.rule-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.rule-card-head h3 { font-size: 14px; }
.rule-active { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--brand-dark); font-weight: 700; }
.rule-active i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.rule-card > p { color: var(--muted); font-size: 11px; }
.rule-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.rule-tags span { padding: 5px 8px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-dark); font-size: 10px; }
.rule-tags .rule-exclude { background: var(--orange-soft); color: var(--orange); }
.rule-card-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid #f0f2f7; color: var(--muted); font-size: 11px; }
.rule-card-foot button { border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 7px 11px; font-size: 11px; color: #4b5563; }
.rule-card-foot button:hover { border-color: var(--brand); color: var(--brand-dark); }
.rule-hit-btn { color: var(--brand-dark) !important; font-weight: 700; }
.rule-popover {
  position: fixed; z-index: 1200; width: 360px; max-height: 420px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18); display: flex; flex-direction: column; overflow: hidden;
}
.rule-popover-head { padding: 11px 14px; border-bottom: 1px solid #edf0f5; font-size: 12px; color: #334155; background: #f8fafc; }
.rule-popover-list { overflow-y: auto; flex: 1; padding: 6px; }
.rule-popover-item {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 9px 10px; border-radius: 8px; cursor: pointer;
}
.rule-popover-item:hover { background: var(--brand-soft, #e4f5e7); }
.rule-popover-item b { display: block; font-size: 12px; line-height: 1.45; color: #1f2937; }
.rule-popover-item span { display: block; margin-top: 3px; font-size: 10px; color: var(--muted-2); }
.rule-popover-foot { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-top: 1px solid #edf0f5; }
.members-panel { padding: 0; overflow: hidden; }
.member-list { padding: 0 20px; }
.member-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid #f0f2f7; }
.member-row:last-child { border: 0; }
.member-main { flex: 1; min-width: 0; }
.member-main b { display: block; font-size: 13px; }
.member-main small { display: block; margin-top: 3px; color: var(--muted-2); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-row select { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; color: #4b5563; background: #fff; font-size: 11px; }

/* ===== 详情抽屉 ===== */
.drawer-backdrop, .filter-backdrop, .modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.42); z-index: 200; backdrop-filter: blur(2px);
}
.notice-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); z-index: 210;
  background: var(--surface); box-shadow: -12px 0 40px rgba(0,0,0,0.16);
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.24s ease;
}
.notice-drawer.open { transform: translateX(0); }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.drawer-kicker { font-size: 10px; letter-spacing: 0.12em; color: var(--muted-2); font-weight: 700; }
.drawer-head h2 { font-size: 18px; margin-top: 5px; line-height: 1.4; }
.close-btn {
  border: 1px solid var(--line); background: #fff; width: 32px; height: 32px; border-radius: 9px;
  font-size: 16px; color: var(--muted); flex: none;
}
.close-btn:hover { border-color: var(--red); color: var(--red); }
.drawer-body-scroll { flex: 1; overflow-y: auto; }
.drawer-body { padding: 18px 22px 24px; }
.drawer-score-row { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 12px; background: #f8fafc; margin-bottom: 16px; }
.drawer-score {
  width: 58px; height: 58px; display: grid; place-items: center; border-radius: 15px; font-size: 20px; font-weight: 800;
  color: var(--brand-dark); background: var(--brand-soft);
}
.drawer-score-copy b { font-size: 14px; }
.drawer-score-copy p { color: var(--muted); font-size: 11px; margin-top: 5px; }
.drawer-block { margin-bottom: 16px; }
.drawer-block h4 { font-size: 12px; color: #374151; margin-bottom: 8px; }
.drawer-block > p { color: var(--muted); font-size: 12px; line-height: 1.7; }
.drawer-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.drawer-fact { padding: 10px; border: 1px solid #edf0f5; border-radius: 9px; background: #fbfcfe; }
.drawer-fact span { display: block; color: var(--muted-2); font-size: 10px; }
.drawer-fact b { display: block; margin-top: 4px; font-size: 12px; word-break: break-all; }
.risk-item { display: flex; gap: 8px; align-items: flex-start; padding: 9px 0; border-bottom: 1px dashed #eef1f6; font-size: 12px; color: #4b5563; }
.risk-item:last-child { border: 0; }
.risk-item i { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); margin-top: 5px; flex: none; }
.risk-item.high i { background: var(--red); }
.risk-item.match i { background: var(--brand); }
.source-link { display: inline-block; margin-top: 10px; color: var(--blue); font-size: 12px; text-decoration: none; font-weight: 600; }
.source-link:hover { text-decoration: underline; }
.task-editor { padding: 14px; border: 1px solid #e8f0ea; border-radius: 11px; background: #fbfefc; }
.task-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.task-editor label { display: block; color: var(--muted); font-size: 11px; margin-bottom: 10px; }
.task-editor .primary-btn { margin-top: 4px; }
.drawer-actions { display: flex; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line); }
.drawer-actions .secondary-btn, .drawer-actions .primary-btn { flex: 1; }

/* ===== 高级筛选抽屉 ===== */
.filter-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); z-index: 210;
  background: var(--surface); box-shadow: -12px 0 40px rgba(0,0,0,0.16);
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.24s ease;
}
.filter-drawer.open { transform: translateX(0); }
.filter-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.filter-head h3 { font-size: 16px; }
.filter-body { flex: 1; overflow-y: auto; padding: 16px 20px 24px; }
.filter-group { margin-bottom: 20px; }
.filter-group > label { display: block; color: var(--muted); font-size: 11px; font-weight: 700; margin-bottom: 9px; }
.filter-group input[type="text"], .filter-group input[type="number"], .filter-group input[type="date"], .filter-group select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; outline: 0; font-size: 13px;
}
.exclude-input-row { display: flex; gap: 8px; }
.exclude-input-row input { flex: 1; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; min-height: 10px; }
.segmented { display: flex; gap: 6px; flex-wrap: wrap; }
.segmented button {
  padding: 8px 13px; border: 1px solid var(--line); background: #fff; border-radius: 8px;
  color: #4b5563; font-size: 12px;
}
.segmented button.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.province-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.province-grid button {
  padding: 7px 4px; border: 1px solid var(--line); background: #fff; border-radius: 7px; font-size: 11px; color: #4b5563;
}
.province-grid button.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.date-range { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.date-range span { color: var(--muted-2); }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.check-grid label {
  display: flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 12px; cursor: pointer; color: #4b5563;
}
.check-grid label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.budget-row { display: flex; align-items: center; gap: 8px; }
.budget-row input { flex: 1; }
.budget-row span { color: var(--muted-2); }
.filter-actions { display: flex; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--line); }
.filter-actions .secondary-btn, .filter-actions .primary-btn { flex: 1; }

/* ===== 标讯库筛选面板（内嵌） ===== */
.filter-panel { margin-bottom: 14px; }
.filter-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.filter-panel-head b { font-size: 14px; }
.filter-panel-body { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 12px; }
.filter-panel-body[hidden], .filter-advanced[hidden], .filter-group-body[hidden] { display: none; }

/* 第一行：关键词 / 排除词 / 搜索方式 / 搜索模式 / 发布平台 */
.filter-top-row { display: grid; grid-template-columns: repeat(12, 1fr); gap: 10px 14px; }
.filter-field { min-width: 0; }
.filter-field.col-3 { grid-column: span 3; }
.filter-field.col-2 { grid-column: span 2; }
.filter-field label { display: block; color: var(--muted); font-size: 11px; font-weight: 700; margin-bottom: 6px; }

.filter-advanced { display: flex; flex-direction: column; gap: 12px; }

/* 发布时间：快捷按钮与日期选择器同行 */
.filter-time-row { display: flex; align-items: center; gap: 10px; }
.filter-time-row > label { flex: none; width: 76px; color: var(--muted); font-size: 12px; font-weight: 700; }
.time-controls { flex: 1 1 auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.date-range { display: flex; align-items: center; gap: 6px; margin: 0; }
.date-range input[type="date"] { width: 148px; flex: none; }

/* 折叠分组卡片：地区 / 信息类型 / 招标结果 */
.filter-group-card { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fcfdfe; }
.filter-group-toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 9px 12px; border: 0; background: transparent; cursor: pointer; text-align: left;
  color: #374151; font-size: 13px; font-weight: 600;
}
.filter-group-toggle:hover { background: #f3f6fa; }
.filter-group-toggle .group-count { color: var(--brand); font-style: normal; font-weight: 600; font-size: 12px; }
.group-chevron { color: #9aa4b2; font-style: normal; transition: transform 0.15s ease; }
.filter-group-toggle.open .group-chevron { transform: rotate(180deg); }
.filter-group-body { padding: 2px 12px 12px; }
.region-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }

/* 预算 / 状态 / 排序 + 操作按钮 */
.filter-bottom-row { display: grid; grid-template-columns: repeat(12, 1fr); gap: 10px 14px; align-items: end; }
.filter-actions { grid-column: span 5; display: flex; justify-content: flex-end; gap: 10px; }
.filter-actions .secondary-btn, .filter-actions .primary-btn { min-width: 104px; }

.filter-panel .segmented button, .filter-panel .province-grid button, .filter-panel .check-grid label { transition: border-color 0.15s, background 0.15s, color 0.15s; }
.filter-panel .segmented button:hover, .filter-panel .province-grid button:hover, .filter-panel .check-grid label:hover { border-color: var(--brand); color: var(--brand-dark); }
.platform-tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; background: #eef2ff; color: #4f46e5; font-size: 11px; font-weight: 600; white-space: nowrap; }

/* 响应式：大屏横向排布，小屏自动换行 */
@media (max-width: 720px) {
  .filter-top-row { grid-template-columns: repeat(6, 1fr); }
  .filter-field.col-3 { grid-column: span 3; }
  .filter-field.col-2 { grid-column: span 2; }
  .filter-bottom-row { grid-template-columns: repeat(6, 1fr); }
  .filter-actions { grid-column: span 6; justify-content: flex-end; }
  .date-range input[type="date"] { width: 124px; }
  .filter-time-row { align-items: flex-start; }
}

.confirm-force { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; border: 1px dashed var(--orange); border-radius: 9px; background: #fff8f0; color: #9a3412; font-size: 13px; }
.confirm-input-wrap { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.confirm-input-wrap span { color: var(--muted); font-size: 11px; font-weight: 700; }
.confirm-input-wrap input { height: 38px; padding: 0 12px; border: 1px solid #d7dde5; border-radius: 8px; outline: 0; font-size: 13px; }
.confirm-input-wrap input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.confirm-input-wrap[hidden],
.confirm-force[hidden] { display: none; }
.notification-dot.rule { background: #f59e0b; }

/* ===== 标讯库筛选面板：参考截图紧凑样式（追加） ===== */
.filter-panel { padding: 14px 16px 12px !important; gap: 10px; }
.filter-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 0 0 10px; border-bottom: 1px solid #e2ebe4; margin-bottom: 2px; }
.filter-panel-head b { font-size: 14px; }
.filter-panel-body { display: flex; flex-direction: column; gap: 10px; }
.filter-panel-body[hidden], .filter-advanced[hidden] { display: none; }
.filter-advanced { display: flex; flex-direction: column; gap: 10px; }

.filter-row {
  display: flex; align-items: flex-start; gap: 12px; padding: 8px 0;
  border-bottom: 1px dashed #ddecdc; flex-wrap: wrap;
}
.filter-row:last-of-type { border-bottom: none; }
.filter-label { width: 90px; flex-shrink: 0; padding-top: 5px; font-size: 14px; color: #334155; font-weight: 500; }
.filter-tags { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; align-items: center; }

/* 筛选 chip：未选中浅绿 / 选中橙 */
.filter-chip,
#filterSearchField button,
#filterMatchMode button,
#filterTimePreset button,
#provinceGrid button {
  font-size: 13px; padding: 5px 12px; border-radius: 6px; border: 1px solid #b8ddbc;
  background: #f0faf1; color: #2c4e30; cursor: pointer; line-height: 1.3;
  display: inline-flex; align-items: center; gap: 5px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.filter-chip.active,
#filterSearchField button.active,
#filterMatchMode button.active,
#filterTimePreset button.active,
#provinceGrid button.active {
  background: #f28c28 !important; color: #ffffff !important; border-color: #f28c28 !important;
}
#provinceGrid button.region-all-active {
  background: #f28c28 !important; color: #ffffff !important; border-color: #f28c28 !important;
}
.filter-chip:hover:not(.active),
#filterSearchField button:hover:not(.active),
#filterMatchMode button:hover:not(.active),
#filterTimePreset button:hover:not(.active),
#provinceGrid button:hover:not(.active) { background: #e4f5e7; }

/* 信息类型 / 招标结果复选框标签组 */
.check-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.check-grid label {
  font-size: 13px; padding: 5px 12px; border-radius: 6px; border: 1px solid #b8ddbc;
  background: #f0faf1; color: #2c4e30; cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.check-grid label:hover { background: #e4f5e7; }
.check-grid label:has(input:checked) { background: #f28c28; color: #fff; border-color: #f28c28; }
.check-grid label input { margin: 0; accent-color: #f28c28; }
.check-grid label:has(input:checked) input { accent-color: #fff; }

/* 关键词搜索框：棕黄边框 */
.filter-search { border: 2px solid #c49254; border-radius: 6px; padding: 6px 10px; font-size: 14px; min-width: 300px; outline: none; box-sizing: border-box; background: #fff; }
.filter-search:focus { border-color: #b47c3c; }

/* 排除词 */
.exclude-input-row { display: flex; gap: 8px; align-items: center; }
.exclude-input-row input { border: 1px solid #cbd5d0; border-radius: 6px; padding: 6px 10px; font-size: 13px; width: 220px; outline: none; box-sizing: border-box; }
.exclude-input-row input:focus { border-color: #b47c3c; }
.exclude-input-row .secondary-btn { padding: 5px 12px; font-size: 13px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* 数字 / 日期 / 下拉：小巧 */
.filter-panel input[type="number"],
.filter-panel input[type="date"] {
  font-size: 13px; padding: 5px 8px; width: 110px; border: 1px solid #cbd5d0; border-radius: 6px;
  outline: none; box-sizing: border-box; height: 32px; background: #fff;
}
.filter-panel select {
  font-size: 13px; padding: 5px 8px; border: 1px solid #cbd5d0; border-radius: 6px;
  outline: none; height: 32px; min-width: 132px; background: #fff; color: #334155;
}
.filter-panel select:focus { border-color: #b47c3c; }
.filter-dash { color: #888; padding: 0 4px; }
.date-range { display: flex; align-items: center; gap: 6px; }

/* 地区：全部省份标签组 */
#provinceGrid { display: flex; flex-wrap: wrap; gap: 8px; }

/* 发布平台模糊搜索组合框 */
.platform-combobox { position: relative; }
.platform-value { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.platform-suggest {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 60; min-width: 300px; max-height: 260px;
  overflow: auto; background: #fff; border: 1px solid #d7dde5; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); padding: 4px;
}
.platform-option {
  display: block; width: 100%; text-align: left; padding: 7px 10px; font-size: 13px;
  border: 0; background: none; cursor: pointer; border-radius: 6px; color: #334155;
}
.platform-option:hover { background: #e4f5e7; color: #2c4e30; }

/* 底部：统计 / 已选标签 / 清空 */
.filter-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 10px; flex-wrap: wrap; }
.filter-summary { font-size: 14px; color: #333; white-space: nowrap; }
.filter-summary b { color: #f28c28; }
.filter-active { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 12px; flex: 1; min-width: 120px; }
.filter-active .chip {
  font-size: 12px; padding: 3px 9px; border-radius: 6px; background: #f0faf1;
  border: 1px solid #b8ddbc; color: #2c4e30;
}
.filter-active .chip button { background: none; border: 0; color: #6b8f72; cursor: pointer; padding: 0 2px 0 5px; font-size: 12px; }
.filter-footer-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.filter-footer-actions .secondary-btn, .filter-footer-actions .primary-btn { padding: 6px 14px; font-size: 13px; min-width: 0; }
.text-btn { background: none; border: none; color: #2b6cb0; cursor: pointer; font-size: 13px; padding: 4px 2px; }
.text-btn:hover { text-decoration: underline; }

.platform-tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; background: #eef2ff; color: #4f46e5; font-size: 11px; font-weight: 600; white-space: nowrap; }

@media (max-width: 720px) {
  .filter-search { min-width: 0; flex: 1 1 200px; }
  .filter-label { width: 76px; }
  .filter-footer { flex-direction: column; align-items: flex-start; }
  .filter-footer-actions { width: 100%; justify-content: flex-end; }
  .exclude-input-row input { width: 150px; }
}

/* ===== v19：面板微调（追加） ===== */
.date-range[hidden] { display: none; }
#provinceGrid button:last-child { order: -1; }
.filter-panel .filter-search { min-width: 220px; }
#filterKeyword { flex: 1 1 240px; min-width: 200px; }
.filter-row .exclude-input-row { flex: 1 1 240px; min-width: 200px; }
.filter-row .exclude-input-row + .chip-list { width: 100%; }
.platform-combobox .filter-search { min-width: 220px; }

/* ===== 弹窗 ===== */
.modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.97); z-index: 220;
  width: min(560px, 92vw); max-height: 86vh; display: flex; flex-direction: column;
  background: var(--surface); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  opacity: 0; pointer-events: none; transition: 0.18s ease;
}
.modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.compact-modal { width: min(480px, 92vw); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 18px; margin-top: 5px; }
.modal-body { padding: 18px 22px; overflow-y: auto; }
.modal-body label { margin-bottom: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-actions { display: flex; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); }
.modal-actions .secondary-btn, .modal-actions .primary-btn { flex: 1; }
.notification-modal { width: min(520px, 92vw); }
.notification-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 22px; border-bottom: 1px solid #f0f2f7; color: var(--muted); font-size: 11px; }
.notification-list { overflow-y: auto; padding: 6px 10px; }
.notification-item {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; padding: 12px 10px;
  border: 0; background: transparent; border-bottom: 1px solid #f0f2f7;
}
.notification-item:hover { background: #f8fafc; }
.notification-item.read { opacity: 0.65; }
.notification-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--blue); }
.notification-dot.deadline { background: var(--orange); }
.notification-dot.change { background: #8b5cf6; }
.notification-copy { flex: 1; min-width: 0; }
.notification-copy b { display: block; font-size: 12px; }
.notification-copy span { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.notification-copy small { display: block; color: var(--muted-2); font-size: 10px; margin-top: 5px; }
.notification-arrow { color: var(--muted-2); font-size: 16px; }

/* ===== 响应式 ===== */
@media (max-width: 1180px) {
  .view-root { padding: 24px 20px 40px; }
  .topbar { padding: 0 20px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .insight-panel { display: grid; grid-template-columns: 1fr 1fr; }
  .metric-grid, .followup-summary, .sync-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipeline-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sync-layout { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar { width: 66px; padding: 18px 8px; }
  .brand-block { justify-content: center; padding: 0 0 16px; }
  .brand-block > div:last-child, .nav-label, .nav-item em, .sync-card, .user-chip > div, .logout-btn { display: none; }
  .nav-item { justify-content: center; padding: 12px 6px; }
  .nav-icon { font-size: 18px; }
  .user-chip { justify-content: center; }
  .main-content { width: calc(100% - 66px); }
  .topbar { height: 60px; padding: 0 14px; }
  .breadcrumbs span, .breadcrumbs b { display: none; }
  .top-actions .search-box { display: none; }
  .view-root { padding: 20px 14px 36px; }
  .welcome-row, .page-intro { display: block; }
  .hero-actions { margin-top: 14px; flex-wrap: wrap; }
  .metric-grid, .followup-summary, .sync-summary { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric-card { padding: 14px; }
  .metric-card > strong { font-size: 22px; }
  .dashboard-grid { display: block; }
  .insight-panel { display: block; }
  .insight-card + .insight-card { margin-top: 14px; }
  .board-grid { grid-template-columns: 1fr 1fr; }
  .library-toolbar { align-items: stretch; }
  .search-box.large { flex-basis: 100%; min-width: 100%; }
  .library-toolbar select { flex: 1; min-width: 0; }
  .library-row { grid-template-columns: 42px minmax(0, 1fr); }
  .library-row-right { grid-column: 2; text-align: left; display: flex; gap: 12px; align-items: center; }
  .pipeline-columns { grid-template-columns: 1fr; }
  .sync-run { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .run-stat { text-align: left; }
  .form-grid { grid-template-columns: 1fr; }
  .drawer-facts { grid-template-columns: 1fr; }
  .task-form-grid { grid-template-columns: 1fr; }
  .province-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ===== 站点维护 ===== */
.sites-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.sites-toolbar input, .sites-toolbar select {
  padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; outline: 0;
  font-size: 12px; background: #fff; color: var(--text);
}
.sites-toolbar input { flex: 1; min-width: 220px; }
.sites-panel { padding: 16px 20px; }
.sites-table-head, .site-row {
  display: grid; grid-template-columns: minmax(220px, 2fr) 150px 150px minmax(180px, 1.6fr) 170px;
  gap: 12px; align-items: center;
}
.sites-table-head {
  color: var(--muted-2); font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px;
  padding-bottom: 10px; border-bottom: 1px solid #edf0f5;
}
.site-row { padding: 12px 0; border-bottom: 1px solid #f1f3f6; }
.site-name b { display: block; font-size: 13px; }
.site-name small { color: var(--muted-2); font-size: 10px; }
.site-badge { display: inline-block; padding: 4px 9px; border-radius: 6px; font-size: 10px; font-weight: 700; }
.site-badge.ok { background: var(--brand-soft); color: var(--brand-dark); }
.site-badge.refit { background: #fff3e0; color: #b45309; }
.site-badge.error { background: #fde8e8; color: #c0392b; }
.site-badge.off { background: #eef1f4; color: #7a8690; }
.site-badge.idle { background: #f2f4f7; color: #8a94a0; }
.site-adapter-ok { display: inline-block; padding: 3px 8px; border-radius: 5px; background: #e4f5e7; color: #1f7a3d; font-size: 10px; }
.site-adapter-wait { display: inline-block; padding: 3px 8px; border-radius: 5px; background: #eef1f4; color: #7a8690; font-size: 10px; }
.site-tier { margin-left: 6px; font-size: 10px; color: var(--muted-2); }
.site-tier.tier-A { color: #1f7a3d; }
.site-tier.tier-B { color: #b45309; }
.site-tier.tier-C { color: #c0392b; }
.site-error { color: #c0392b; font-size: 10px; margin-top: 4px; line-height: 1.4; }
.site-fix { color: #b45309; font-size: 10px; margin-top: 4px; line-height: 1.4; }
.site-fail-count { display: block; color: #c0392b; font-size: 10px; margin-top: 3px; }
.site-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.site-wait-note { color: var(--muted-2); font-size: 10px; }
.site-toggle { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; color: var(--muted); cursor: pointer; }
.site-toggle input { accent-color: var(--brand); }
.draft-matched { color: #b45309; font-size: 11px; line-height: 1.5; background: #fff7ed; border: 1px dashed #eab67d; border-radius: 8px; padding: 8px 10px; }

/* 官网直采站点：芯片选择 + 白名单折叠明细 */
.site-chip-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.site-chip {
  border: 1px solid var(--line, #ddecdc); background: #fff; color: var(--text, #333);
  border-radius: 999px; padding: 5px 13px; font-size: 12px; cursor: pointer; transition: all 0.15s;
}
.site-chip:hover { border-color: var(--brand, #2e7d32); color: var(--brand, #2e7d32); }
.site-chip.on { background: var(--brand, #2e7d32); color: #fff; border-color: var(--brand, #2e7d32); }
.site-notice-collapse {
  margin: 6px 0 12px; border: 1px solid var(--line, #ddecdc); border-radius: 10px; padding: 10px 14px;
}
.site-notice-collapse summary { cursor: pointer; font-size: 13px; color: var(--text, #333); }
.site-notice-count { color: var(--muted, #888); font-size: 12px; margin-left: 6px; }
.notice-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 10px;
}
.notice-cell { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted, #666); }
.notice-cell input { border: 1px solid var(--line, #ddecdc); border-radius: 6px; padding: 6px 8px; font-size: 12px; }

/* 命中关键词高亮 */
mark.hl-kw {
  background: #fff3bf; color: #8a5a00; border-radius: 3px; padding: 0 2px;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.hl-kw-chip {
  display: inline-block; background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7;
  border-radius: 999px; padding: 2px 9px; font-size: 11px; margin: 2px 4px 2px 0;
}
.drawer-kw-row { margin-top: 8px; font-size: 12px; color: var(--muted, #666); }

/* 业务关键字编辑器 */
.keyword-preview {
  display: flex; align-items: flex-start; gap: 10px; margin-top: 8px;
  border: 1px dashed var(--line, #ddecdc); border-radius: 8px; padding: 8px 10px;
}
.keyword-count { flex-shrink: 0; font-size: 12px; color: var(--brand, #2e7d32); font-weight: 600; padding-top: 2px; }
.keyword-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.keyword-chip {
  background: #eef7ee; border: 1px solid #cde6cd; color: #2e5e2e; border-radius: 999px;
  padding: 2px 9px; font-size: 11px;
}
.keyword-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }

/* 跟进台 */
.pipeline-more { color: var(--muted, #888); font-size: 11px; padding: 8px; text-align: center; }

/* 最近同步摘要（头部过高收敛为两行） */
#syncRunMeta {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; max-height: 2.8em;
}

/* 看板同步摘要（最多两行，避免长错误文本撑高卡片） */
#syncHealthText {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; max-height: 3em;
}

/* ---------- 站点接口导入 ---------- */
.sites-tabs { display: flex; gap: 8px; margin: 14px 0; }
.sites-tab-btn {
  border: 1px solid var(--line, #ddecdc); background: #fff; color: var(--text, #333);
  border-radius: 8px; padding: 7px 16px; cursor: pointer; font-size: 13px;
}
.sites-tab-btn.active { background: var(--brand, #2e7d32); color: #fff; border-color: var(--brand, #2e7d32); }
.draft-import-card { padding: 18px; }
.draft-import-card h3 { margin: 14px 0 8px; font-size: 14px; }
.draft-import-card textarea {
  width: 100%; min-height: 120px; border: 1px solid var(--line, #ddecdc); border-radius: 8px;
  padding: 10px; font-family: Consolas, monospace; font-size: 12px; resize: vertical;
}
.draft-actions { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.draft-tip { color: var(--muted, #888); font-size: 11px; }
.draft-preview { border: 1px solid var(--line, #ddecdc); border-radius: 10px; padding: 14px; margin-top: 12px; }
.draft-fields {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 10px;
}
.draft-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted, #666); }
.draft-field input, .draft-field select {
  border: 1px solid var(--line, #ddecdc); border-radius: 6px; padding: 6px 8px; font-size: 12px;
}
.draft-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.draft-item {
  display: flex; align-items: center; gap: 10px; border: 1px solid var(--line, #ddecdc);
  border-radius: 8px; padding: 8px 12px; font-size: 12px; flex-wrap: wrap;
}
.draft-item small { color: var(--muted, #888); max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1100px) {
  .sites-table-head { display: none; }
  .site-row { grid-template-columns: 1fr; gap: 6px; }
}

/* ===== v55 界面润色（不影响功能） ===== */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.nav-item { transition: background 0.15s ease, color 0.15s ease; }
.icon-button { transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease; }
.panel-card, .insight-card { transition: box-shadow 0.18s ease, border-color 0.18s ease; }
.panel-card:hover, .insight-card:hover { border-color: #d5dbe6; box-shadow: 0 6px 18px rgba(16, 42, 67, 0.08); }
.site-chip { transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease; }
.sync-summary article { transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease; }
.sync-summary article:hover { border-color: var(--brand); box-shadow: 0 4px 12px rgba(47, 158, 110, 0.12); transform: translateY(-1px); }
.sync-card { transition: background 0.2s ease; }
.sync-card.running { background: rgba(255, 180, 92, 0.10); }
.sync-card.running .pulse-dot { background: #ffb45c; box-shadow: 0 0 0 4px rgba(255, 180, 92, 0.20); animation: pulse 1.2s ease-in-out infinite; }
.sync-card.off .pulse-dot { background: #8fae9d; box-shadow: 0 0 0 4px rgba(143, 174, 157, 0.16); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c6cdd8; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #aab4c2; }
::-webkit-scrollbar-track { background: transparent; }
* { scrollbar-width: thin; scrollbar-color: #c6cdd8 transparent; }
[hidden] { display: none !important; }

/* ===== v59 手机端：底部 Tab + 我的菜单 + 移动布局 ===== */
.mobile-tabbar { display: none; }
.mobile-menu-backdrop, .mobile-menu { display: none; }
.mobile-filter-btn { display: none; }
.mobile-only { display: none; }
.accent-red .metric-icon { color: var(--red); }
.due-soon-panel { margin-bottom: 24px; }
.due-soon-list { display: flex; flex-direction: column; gap: 8px; }
.due-soon-item {
  display: block; width: 100%; text-align: left; border: 1px solid #f3d6d6;
  background: #fff8f8; border-radius: 10px; padding: 12px 14px; cursor: pointer;
}
.due-soon-item h4 { font-size: 13px; line-height: 1.45; }
.due-soon-item p { color: var(--muted); font-size: 11px; margin-top: 5px; }
.due-soon-item .due-soon-deadline { display: inline-block; margin-top: 7px; color: var(--red); font-size: 11px; font-weight: 700; }
.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.42); z-index: 230;
  backdrop-filter: blur(2px);
}

@media (max-width: 768px) {
  /* 隐藏桌面侧边栏，主区占满 */
  .sidebar { display: none; }
  .main-content { width: 100%; }
  .topbar { height: 54px; padding: 0 12px; }
  .topbar .search-box { display: none; }
  .view-root { padding: 16px 12px calc(76px + env(safe-area-inset-bottom)); max-width: none; }
  .page-intro, .welcome-row { display: block; }
  .page-intro h1, .welcome-row h1 { font-size: 22px; }
  .hero-actions, .page-intro .hero-actions { margin-top: 12px; flex-wrap: wrap; }
  .hero-actions .secondary-btn, .hero-actions .primary-btn { padding: 9px 14px; font-size: 13px; }

  /* 底部 Tab 栏 */
  .mobile-tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
    background: #ffffff; border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 16px rgba(16, 42, 67, 0.06);
  }
  .tab-item {
    flex: 1; min-width: 0; border: 0; background: transparent; color: var(--muted);
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 9px 2px 7px; font-size: 11px; position: relative;
  }
  .tab-item.active { color: var(--brand-dark); font-weight: 700; }
  .tab-icon { font-size: 19px; line-height: 1; }
  .tab-badge {
    position: absolute; top: 4px; right: calc(50% - 24px);
    min-width: 17px; height: 17px; padding: 0 4px; border-radius: 10px;
    background: var(--red); color: #fff; font-size: 10px; font-weight: 700;
    display: grid; place-items: center; font-style: normal;
  }

  /* “我的”侧滑菜单 */
  .mobile-menu-backdrop {
    display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.42);
    z-index: 260; backdrop-filter: blur(2px);
  }
  .mobile-menu {
    display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0;
    width: min(320px, 84vw); background: #fff; z-index: 270;
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.16);
    transform: translateX(-105%); transition: transform 0.24s ease;
  }
  .mobile-menu.open { transform: translateX(0); }
  .mobile-menu-head {
    display: flex; align-items: center; gap: 10px; padding: 18px 16px;
    border-bottom: 1px solid var(--line);
  }
  .mobile-menu-head b { display: block; font-size: 14px; }
  .mobile-menu-head small { display: block; color: var(--muted-2); font-size: 11px; margin-top: 3px; }
  .mobile-menu-head .close-btn { margin-left: auto; }
  .mobile-menu-nav { padding: 10px 12px; }
  .mobile-menu-nav .nav-item {
    color: var(--text); padding: 12px 12px; border-radius: 10px; font-size: 14px;
    display: flex; align-items: center; gap: 10px;
  }
  .mobile-menu-nav .nav-item:hover { background: #f3f6fa; }
  .mobile-menu-nav .nav-item.active { background: var(--brand); color: #fff; }
  .mobile-menu-nav .nav-label { color: var(--muted-2); }

  /* 指标卡：2 列 + 临期卡（仅手机显示） */
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
  .metric-card { padding: 14px 12px; }
  .metric-card > strong { font-size: 24px; margin-top: 8px; }
  .metric-card > p { font-size: 10px; }
  .mobile-only { display: block; }

  /* 看板：单列，跟进看板横滑 */
  .dashboard-grid { display: block; }
  .insight-panel { display: block; }
  .insight-card + .insight-card { margin-top: 12px; }
  .board-grid { display: flex; overflow-x: auto; gap: 12px; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .board-column { flex: 0 0 78vw; scroll-snap-align: start; }
  .section-head { align-items: center; }

  /* 标讯列表卡片化 */
  .library-list-head { flex-wrap: wrap; gap: 6px; }
  .mobile-filter-btn { display: inline-flex; }
  .library-row { grid-template-columns: 38px minmax(0, 1fr); gap: 10px; padding: 12px 4px; }
  .library-row-score { width: 38px; height: 38px; font-size: 15px; }
  .library-row-meta { flex-wrap: wrap; gap: 6px 12px; }
  .pager { gap: 10px; }
  .pager .secondary-btn { flex: 1; }

  /* 筛选面板 → 底部弹出层 */
  #filterPanel {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 240;
    max-height: 85vh; overflow-y: auto; width: 100%; margin: 0;
    border-radius: 16px 16px 0 0; padding-bottom: calc(14px + env(safe-area-inset-bottom));
    transform: translateY(105%); transition: transform 0.24s ease;
  }
  #filterPanel.sheet-open { transform: translateY(0); }

  /* 详情抽屉全屏 + 底部操作栏安全区 */
  .notice-drawer { width: 100vw; }
  .drawer-actions { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .drawer-actions .primary-btn, .drawer-actions .secondary-btn { padding: 12px 14px; }

  /* 弹窗 → 底部弹出 */
  .modal {
    width: 100vw; max-width: 100vw; max-height: 90vh;
    border-radius: 16px 16px 0 0; bottom: 0; top: auto; left: 0; right: 0;
    transform: translateY(105%); transition: transform 0.24s ease;
  }
  .modal.open { transform: translateY(0); }
  .modal-head { padding: 16px 18px 12px; }
  .modal-body { padding: 14px 18px; }
  .modal-actions { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); }
  .form-row { grid-template-columns: 1fr; }

  /* 跟进台管道横滑 */
  .pipeline-columns { display: flex; overflow-x: auto; gap: 12px; scroll-snap-type: x mandatory; }
  .pipeline-columns > * { flex: 0 0 82vw; scroll-snap-align: start; }

  /* 管理页表格/表单移动化 */
  .form-grid { grid-template-columns: 1fr; }
  .drawer-facts { grid-template-columns: 1fr; }
  .task-form-grid { grid-template-columns: 1fr; }
  .data-health-grid { grid-template-columns: 1fr 1fr; }
  .filter-bottom-row { grid-template-columns: 1fr; }
  .filter-actions { grid-column: auto; }
  .sites-toolbar input { min-width: 0; }
  .library-toolbar select, .library-toolbar input { font-size: 13px; }

  /* 触控目标与文本 */
  .nav-item, .tab-item, .site-toggle, .close-btn, .text-btn { min-height: 40px; }
  .site-actions .text-btn { padding: 8px 10px; }
  .filter-chip, #filterSearchField button, #filterMatchMode button,
  #filterTimePreset button, #provinceGrid button { padding: 8px 12px; }
}

/* ===== v61 手机端筛选面板内容美化 ===== */
@media (max-width: 768px) {
  #filterPanel .filter-panel-head { padding: 14px 16px 10px; }
  #filterPanel .filter-panel-head b { font-size: 15px; }
  #filterPanel .filter-row {
    flex-direction: column; align-items: stretch; gap: 7px;
    padding: 11px 0;
  }
  #filterPanel .filter-label { width: auto; flex: none; padding-top: 0; font-weight: 700; }
  #filterPanel .filter-tags { flex: none; width: 100%; }
  #filterPanel .filter-search,
  #filterPanel #filterKeyword,
  #filterPanel #platformSearchInput { min-width: 0; width: 100%; flex: 1 1 100%; }
  #filterPanel .exclude-input-row { flex-wrap: wrap; width: 100%; }
  #filterPanel .exclude-input-row input { width: auto; flex: 1 1 160px; }
  #filterPanel .check-grid, #filterPanel #provinceGrid { gap: 6px; }
  #filterPanel .filter-panel input[type="number"],
  #filterPanel .filter-panel input[type="date"],
  #filterPanel .filter-panel select { width: 100%; min-width: 0; }
  #filterPanel .date-range { flex-wrap: wrap; }
  #filterPanel .filter-footer {
    flex-direction: column; align-items: stretch; gap: 9px;
    padding-top: 12px; border-top: 1px dashed #ddecdc; margin-top: 6px;
  }
  #filterPanel .filter-footer-actions { width: 100%; justify-content: stretch; gap: 10px; }
  #filterPanel .filter-footer-actions .primary-btn,
  #filterPanel .filter-footer-actions .secondary-btn { flex: 1; padding: 12px 14px; font-size: 14px; }
  #filterPanel .filter-summary { font-size: 13px; }
  #filterPanel .filter-active { margin: 0; }
  #filterPanel .platform-suggest { min-width: 0; left: 0; right: 0; }
}
