:root {
  --pr-bg: #f4f6fa;
  --pr-ink: #16233a;
  --pr-muted: #6b7c93;
  --pr-line: #e3e9f2;
  --pr-blue: #1f5fd0;
  --pr-blue-soft: #eaf1fd;
  --pr-green: #16895a;
  --pr-amber: #b7791f;
  --pr-purple: #6b4ee6;
  --pr-red: #c23b3b;
}

body {
  background: var(--pr-bg);
  color: var(--pr-ink);
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
}

.page { min-height: 100vh; display: flex; flex-direction: column; }

/* 内容居中，宽屏不拉伸 */
.pr-header .container-xl,
.pr-tabs .container-xl,
.page-body .container-xl,
.pr-footer .container-xl {
  max-width: 1380px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Header */
.pr-header {
  background: linear-gradient(120deg, #12224a 0%, #1b3d7a 55%, #1f5fd0 100%);
  color: #fff;
  padding: 18px 0 16px;
}
.pr-logo {
  width: 42px; height: 42px; border-radius: 12px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; letter-spacing: .5px; font-size: 15px;
}
.pr-title { font-size: 19px; font-weight: 650; letter-spacing: .3px; }
.pr-title span { font-size: 12px; font-weight: 400; opacity: .68; margin-left: 6px; letter-spacing: .6px; }
.pr-sub { font-size: 12px; opacity: .72; margin-top: 2px; }
.pr-meta { font-size: 12px; opacity: .9; text-align: right; line-height: 1.7; white-space: nowrap; padding-right: 10px; }
.pr-meta b { font-weight: 600; }
.pr-meta .text-secondary { color: rgba(255, 255, 255, .62) !important; }
.pr-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #4ade80; margin-right: 6px; box-shadow: 0 0 0 3px rgba(74,222,128,.18);
}
.pr-header .btn-primary {
  background: #fff; color: #16336b; border: 0; font-weight: 600;
}
.pr-header .btn-primary:hover { background: #eaf1fd; color: #12224a; }

/* Tabs */
.pr-tabs { background: #fff; border-bottom: 1px solid var(--pr-line); position: sticky; top: 0; z-index: 20; }
.pr-tabs .container-xl { display: flex; gap: 26px; }
.pr-tab {
  display: inline-block; padding: 13px 2px 11px; font-size: 14px;
  color: var(--pr-muted); text-decoration: none; border-bottom: 2px solid transparent;
}
.pr-tab:hover { color: var(--pr-blue); }
.pr-tab.active { color: var(--pr-blue); border-bottom-color: var(--pr-blue); font-weight: 600; }

.page-body { padding: 22px 0 10px; }

/* Cards */
.pr-card { border: 1px solid var(--pr-line); border-radius: 12px; box-shadow: 0 1px 2px rgba(16,32,64,.04); }
.pr-card > .card-header { border-bottom: 1px solid var(--pr-line); background: transparent; padding: 12px 16px; }
.pr-card .card-title { font-size: 14px; font-weight: 600; }

/* KPI */
.pr-kpi { padding: 16px 18px; }
.pr-kpi .label { font-size: 12px; color: var(--pr-muted); letter-spacing: .3px; }
.pr-kpi .value { font-size: 30px; font-weight: 650; line-height: 1.25; margin-top: 6px; letter-spacing: -.5px; }
.pr-kpi .hint { font-size: 12px; color: var(--pr-muted); margin-top: 4px; }
.pr-kpi .value small { font-size: 13px; font-weight: 400; color: var(--pr-muted); margin-left: 4px; }

/* Charts */
.pr-chart { position: relative; height: 250px; }
.pr-chart-tall { height: 330px; }

/* Table */
.pr-table thead th {
  font-size: 12px; color: var(--pr-muted); font-weight: 600;
  background: #fbfcfe; border-bottom: 1px solid var(--pr-line); white-space: nowrap;
}
.pr-table td { font-size: 13px; vertical-align: middle; }
.pr-table tbody tr:hover { background: #f8fafe; }
.pr-table a { color: var(--pr-ink); text-decoration: none; font-weight: 500; }
.pr-table a:hover { color: var(--pr-blue); }
.pr-row { cursor: pointer; }
.pr-row:hover { background: #f4f8ff; }

.tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; line-height: 18px;
  white-space: nowrap; border: 1px solid transparent;
}
.tag-inv-a { background: #eef3ff; color: #2a4fa8; border-color: #dbe6ff; }
.tag-inv-b { background: #e9f8f1; color: var(--pr-green); border-color: #d3efe2; }
.tag-um { background: #fff5e6; color: var(--pr-amber); border-color: #f7e4c6; }
.tag-design { background: #f3efff; color: var(--pr-purple); border-color: #e6ddff; }
.tag-other { background: #f1f3f7; color: var(--pr-muted); border-color: #e4e8ef; }
.tag-warn { background: #fff4e5; color: #a35d0c; border-color: #f6dfc0; }

.status { font-size: 12px; color: var(--pr-muted); }
.status.ok { color: var(--pr-green); }
.status.pending { color: var(--pr-amber); }

.co-name { font-size: 11px; color: var(--pr-muted); }

/* Timeline */
.pr-timeline { max-height: 300px; overflow: auto; }
.pr-timeline-item { position: relative; padding: 0 0 12px 16px; border-left: 1px solid var(--pr-line); }
.pr-timeline-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.pr-timeline-item::before {
  content: ""; position: absolute; left: -4px; top: 5px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--pr-blue);
}
.pr-timeline-item .t { font-size: 12px; color: var(--pr-muted); }
.pr-timeline-item .d { font-size: 13px; margin-top: 1px; }

/* Notice */
.pr-notice {
  display: flex; gap: 10px; align-items: flex-start;
  background: #fffaf0; border: 1px solid #f3e3c3; color: #7a5a1e;
  border-radius: 10px; padding: 10px 14px; font-size: 12.5px; line-height: 1.7;
  margin-bottom: 14px;
}
.pr-notice b { white-space: nowrap; color: #8a6417; }

/* Footer */
.pr-footer { margin-top: auto; padding: 18px 0 22px; font-size: 12px; color: #93a1b5; }

/* misc */
.btn-outline-secondary, .btn-outline-primary { --t-btn-border-width: 1px; }
.form-label { font-size: 12px; color: var(--pr-muted); margin-bottom: 4px; }
.bar-cell { height: 6px; border-radius: 3px; background: var(--pr-blue-soft); overflow: hidden; }
.bar-cell > i { display: block; height: 100%; background: var(--pr-blue); }

/* 分页按钮不要贴到卡片边缘 */
#view-patents .card-footer { padding-left: 16px; padding-right: 20px; }
#prevPage, #nextPage { padding: 4px 14px; white-space: nowrap; }

/* 详情抽屉 */
.pr-drawer { width: min(820px, 94vw); border-left: 1px solid var(--pr-line); }
.pr-drawer-head { align-items: flex-start; border-bottom: 1px solid var(--pr-line); padding: 16px 20px; }
.pr-drawer-no { font-family: Consolas, monospace; font-size: 12px; color: var(--pr-muted); letter-spacing: .3px; }
.pr-drawer-head .offcanvas-title { font-size: 17px; font-weight: 650; line-height: 1.45; margin-top: 4px; max-width: 640px; }
#detailBody { padding: 18px 20px 28px; }

.pr-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.pr-kv .k { font-size: 11px; color: var(--pr-muted); }
.pr-kv .v { font-size: 13px; word-break: break-all; }
.pr-kv .v.mono { font-family: Consolas, monospace; }

.pr-sec { margin-top: 18px; }
.pr-sec h4 { font-size: 13px; font-weight: 650; margin: 0 0 8px; color: var(--pr-ink); }
.pr-sec .body {
  font-size: 13px; line-height: 1.85; white-space: pre-wrap; color: #24324a;
  background: #fbfcfe; border: 1px solid var(--pr-line); border-radius: 10px;
  padding: 12px 14px; max-height: 340px; overflow: auto;
}
.pr-sec .body.open { max-height: none; }
.pr-sec .toggle { font-size: 12px; color: var(--pr-blue); cursor: pointer; margin-top: 6px; display: inline-block; }

.pr-drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--pr-line); }
.pr-loading { padding: 40px 0; text-align: center; color: var(--pr-muted); font-size: 13px; }
.pr-empty { font-size: 13px; color: var(--pr-muted); background: #fbfcfe; border: 1px dashed var(--pr-line); border-radius: 10px; padding: 14px; }
.pr-hint { font-size: 12px; color: var(--pr-muted); background: #f7f9fc; border-radius: 8px; padding: 8px 12px; margin-top: 12px; line-height: 1.7; }

/* 关注 / 非关注 标识 */
.tag-focus { background: #e8f1ff; color: #1f5fd0; }
.tag-peer {
  background: #fff4e0; color: #b45309; border: 1px dashed #f0b429;
  font-weight: 600;
}
.pr-peer-row > td { background: #fcfcfd; }
.pr-peer-row b { color: #46536b; font-weight: 600; }

/* 技术分析 */
.pr-insight { padding: 14px 16px; }
.pr-insight .t { word-break: break-word; font-size: 13px; font-weight: 700; color: var(--pr-ink); margin-bottom: 6px; line-height: 1.5; }
.pr-insight .d { font-size: 12.5px; line-height: 1.8; color: #4a5a72; }

.pr-rank { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px dashed var(--pr-line); }
.pr-rank:last-child { border-bottom: 0; }
.pr-rank .n {
  flex: 0 0 20px; height: 20px; line-height: 20px; text-align: center;
  border-radius: 6px; background: var(--pr-blue-soft); color: var(--pr-blue);
  font-size: 11px; font-weight: 700;
}
.pr-growth { font-size: 12px; font-weight: 700; }
.pr-growth.up { color: #16895a; }
.pr-growth.down { color: #c0392b; }

.pr-chip {
  display: inline-block; font-size: 11.5px; line-height: 1.6;
  background: #f2f6fd; color: #35496b; border-radius: 6px;
  padding: 2px 8px; margin: 2px 4px 2px 0;
}
.pr-chip b { color: var(--pr-blue); }

/* 内容级深度分析 */
.tag-deep { background: #e7f4ec; color: #16895a; border: 1px solid #bfe3cd; font-weight: 600; }
.pr-tm-note { text-align: left; font-size: 12.5px; line-height: 1.9; color: #4a5a72; background: #f7f9fc; border-left: 3px solid var(--pr-blue); border-radius: 0 8px 8px 0; padding: 10px 14px; margin-bottom: 14px; }
.pr-tm-sub { font-size: 12px; font-weight: 700; color: var(--pr-muted); margin: 16px 0 8px; letter-spacing: .3px; }
.pr-el-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.pr-el {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  background: #f4f8ff; border: 1px solid #dbe8fb; border-radius: 8px;
  padding: 6px 10px; transition: .15s;
}
.pr-el:hover { background: #e8f1ff; border-color: #a9c2ef; }
.pr-el .t { font-size: 13px; font-weight: 600; color: #16233a; }
.pr-el .n { font-size: 11px; color: #1f5fd0; background: #fff; border: 1px solid #dbe8fb; border-radius: 20px; padding: 1px 7px; }
.pr-el-sm { padding: 4px 9px; }
.pr-el-sm .t { font-size: 12.5px; }
.pr-sim { font-weight: 700; color: #b45309; font-size: 11.5px; }
.pr-matrix th { font-size: 11.5px; white-space: nowrap; }
.pr-matrix td { font-size: 12px; }
.pr-matrix .pr-warm { background: #eef5ff; color: #1f5fd0; font-weight: 600; }
.pr-matrix .pr-hot { background: #d6e6ff; color: #123f96; font-weight: 700; }

.pr-tm-findings { display: grid; gap: 8px; margin-bottom: 16px; }
.pr-tm-find { display: flex; gap: 10px; align-items: flex-start; background: #fbfcfe; border: 1px solid var(--pr-line); border-radius: 8px; padding: 9px 12px; }
.pr-tm-find .k { flex: 0 0 auto; font-size: 11.5px; font-weight: 700; color: #123f96; background: #e8f1ff; border-radius: 5px; padding: 2px 7px; white-space: nowrap; }
.pr-tm-find .v { font-size: 12.5px; line-height: 1.8; color: #33425c; }


