/* ==========================================================================
   开源公文 OA 竞品参考 — 独立样式（政务蓝机关风）
   视觉参考原型色板，不 import 原型依赖
   基线：1920×1080，最小 1280
   ========================================================================== */

:root {
  --blue-900: #0b3a76;
  --blue-800: #0d4a94;
  --blue-700: #1257a5;
  --blue-600: #1668dc;
  --blue-500: #2b7ce8;
  --blue-100: #e8f1ff;
  --blue-050: #f3f8ff;
  --ink-900: #1f2d3d;
  --ink-700: #43536b;
  --ink-500: #6b7a90;
  --ink-400: #8c9aad;
  --line: #e6ebf2;
  --line-strong: #d5dde8;
  --bg: #eef1f6;
  --white: #fff;
  --orange: #fa8c16;
  --green: #16a34a;
  --red: #e14b4b;
  --topbar-h: 58px;
  --sidebar-w: 220px;
  --footer-h: 62px;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(16, 42, 84, .08);
  --shadow-lg: 0 8px 24px rgba(16, 42, 84, .12);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", sans-serif;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-900);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }

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

.app-body {
  flex: 1;
  display: flex;
  min-height: 0;
}

.main {
  flex: 1;
  min-width: 0;
  overflow: auto;
}

.content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px 36px;
}

/* ---------- 顶栏 ---------- */
.topbar {
  height: var(--topbar-h);
  flex: 0 0 var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: linear-gradient(90deg, var(--blue-800) 0%, var(--blue-700) 45%, #1a6ec6 100%);
  color: #fff;
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.emblem {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #ffd54a 0 28%, #d92b2b 30% 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .25);
  flex: none;
}
.emblem span { color: #ffd54a; font-size: 13px; line-height: 1; }
.brand-text .t1 { font-size: 16px; font-weight: 700; letter-spacing: .4px; }
.brand-text .t2 { font-size: 11px; color: rgba(255, 255, 255, .78); margin-top: 1px; }

.topbar-meta {
  margin-left: auto;
  font-size: 12px;
  color: rgba(255, 255, 255, .82);
  white-space: nowrap;
}

/* ---------- 侧栏 ---------- */
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: #0f4488;
  color: rgba(255, 255, 255, .85);
  overflow: auto;
  padding: 10px 0 24px;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); border-radius: 3px; }

.menu-label {
  padding: 10px 18px 6px;
  font-size: 11px;
  letter-spacing: .6px;
  color: rgba(255, 255, 255, .5);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, .88);
  border-left: 3px solid transparent;
}
.menu-item:hover { background: rgba(255, 255, 255, .08); text-decoration: none; color: #fff; }
.menu-item.active {
  background: var(--blue-600);
  color: #fff;
  border-left-color: #8fc2ff;
  font-weight: 600;
}
.menu-item .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  flex: none;
}
.menu-item.active .dot { background: #fff; }

/* ---------- 页脚 ---------- */
.footer {
  flex: 0 0 var(--footer-h);
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 24px;
  background: #e9f1fb;
  border-top: 1px solid #d8e6f7;
  color: var(--ink-500);
  font-size: 12px;
}
.footer .shield {
  width: 32px; height: 32px; border-radius: 4px;
  background: var(--blue-600);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; text-align: center; line-height: 1.15;
  flex: none;
}
.footer .f-col { display: flex; flex-direction: column; gap: 2px; }
.footer .f-right { margin-left: auto; }

/* ---------- 结论条 ---------- */
.verdict {
  background: linear-gradient(180deg, #fff 0%, #f7fbff 100%);
  border: 1px solid #c9ddf7;
  border-left: 4px solid var(--blue-600);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px 16px;
  margin-bottom: 16px;
}
.verdict .kicker {
  font-size: 12px;
  color: var(--blue-700);
  font-weight: 600;
  letter-spacing: .4px;
}
.verdict h1 {
  font-size: 22px;
  line-height: 1.4;
  margin: 6px 0 10px;
}
.verdict p { margin: 0; color: var(--ink-700); font-size: 14.5px; }
.verdict .note { margin-top: 8px; font-size: 12.5px; color: var(--ink-500); }

/* ---------- 卡片 ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.card-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}
.card-hd h2, .card-hd h3 {
  font-size: 15px;
  position: relative;
  padding-left: 10px;
}
.card-hd h2::before, .card-hd h3::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 14px;
  border-radius: 2px;
  background: var(--blue-600);
}
.card-hd .more { margin-left: auto; font-size: 12px; color: var(--ink-500); }
.card-bd { padding: 16px 18px 18px; }
.card-bd > p:first-child { margin-top: 0; }
.card-bd > p:last-child { margin-bottom: 0; }

/* ---------- 栅格 / 统计 ---------- */
.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }

.stat {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow);
}
.stat .lb { font-size: 12px; color: var(--ink-500); }
.stat .num { font-size: 20px; font-weight: 700; color: var(--blue-700); line-height: 1.25; margin-top: 2px; }
.stat .hint { font-size: 12px; color: var(--ink-500); margin-top: 4px; }

.stat.blue { background: #eaf2ff; border-color: #d3e4ff; }
.stat.orange { background: #fff6e8; border-color: #ffe4bf; }
.stat.orange .num { color: var(--orange); }
.stat.green { background: #e9faf0; border-color: #c7eed8; }
.stat.green .num { color: var(--green); }
.stat.red { background: #fdeeee; border-color: #f8d2d2; }
.stat.red .num { color: var(--red); }
.stat.gray { background: #f5f7fb; }

/* ---------- 表格 ---------- */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 4px; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 860px;
}
table.data th,
table.data td {
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
table.data th {
  background: #f4f8fd;
  color: var(--ink-700);
  font-weight: 600;
  white-space: nowrap;
}
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--blue-050); }
table.data a { word-break: break-all; }

/* ---------- 徽章 ---------- */
.tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11.5px;
  line-height: 18px;
  white-space: nowrap;
}
.tag.high { background: #e9faf0; color: #15803d; }
.tag.mid { background: #fff6e8; color: #c56a00; }
.tag.low { background: #fdeeee; color: #c0392b; }
.tag.wait { background: #eef1f6; color: var(--ink-700); }
.tag.blue { background: var(--blue-100); color: var(--blue-700); }
.tag.gray { background: #eef1f6; color: var(--ink-500); }

/* ---------- 最像三个卡片 ---------- */
.top3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.prod {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.prod .rank {
  width: 26px; height: 26px;
  border-radius: 4px;
  background: var(--blue-600);
  color: #fff;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.prod .rank.r2 { background: #3d7cc4; }
.prod .rank.r3 { background: #5a8ec9; }
.prod .ph { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.prod h3 { font-size: 16px; margin-bottom: 2px; }
.prod .sub { font-size: 12px; color: var(--ink-500); }
.prod .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.prod h4 { font-size: 13px; color: var(--ink-700); margin: 10px 0 4px; }
.prod ul { padding-left: 18px; color: var(--ink-700); font-size: 13px; }
.prod li { margin: 3px 0; }
.prod .cost {
  margin-top: auto;
  padding-top: 10px;
  font-size: 12.5px;
  color: #9a3412;
  background: #fff7ed;
  border-radius: 4px;
  padding: 8px 10px;
}
.prod .links { margin-top: 10px; font-size: 12.5px; }

/* ---------- 路径卡片 ---------- */
.path {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--blue-050);
}
.path h3 { font-size: 15px; margin-bottom: 6px; }
.path p { margin: 0 0 8px; color: var(--ink-700); }
.path .warn { color: #9a3412; font-size: 12.5px; }

/* ---------- 列表 / 脚注 ---------- */
.list { padding-left: 18px; color: var(--ink-700); }
.list li { margin: 5px 0; }
.callout {
  background: #fff8e8;
  border: 1px solid #f3d9a0;
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 13px;
  color: #7a5410;
}
.callout strong { color: #6b3f08; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.ok { color: #15803d; }
.no { color: #c0392b; }

.page-title {
  font-size: 22px;
  margin: 0 0 6px;
}
.lead { color: var(--ink-700); margin: 0 0 16px; }

.kv {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 6px 12px;
  font-size: 13px;
}
.kv dt { color: var(--ink-500); }
.kv dd { margin: 0; }

@media (max-width: 1400px) {
  .top3, .grid-3, .two-col { grid-template-columns: 1fr; }
  .grid-7 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .sidebar { display: none; }
  .content { padding: 16px; }
  .grid-7 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
