/* =========================================================
   线上运营看板 · 统一设计系统 (Impeccable)
   专业稳重 / 单色绿 #009E87 / 细边框无阴影 / 适度动效
   ========================================================= */

:root {
  /* 画布 */
  --bg: #f6f7f6;
  --surface: #ffffff;
  --surface-2: #fbfcfb;

  /* 文字 */
  --ink: #16201c;
  --ink-2: #586059;
  --ink-3: #8b948f;

  /* 描边（代替阴影） */
  --line: #e7eae8;
  --line-2: #d6dbd8;

  /* 品牌绿 */
  --brand: #009E87;
  --brand-700: #00756a;
  --brand-50: #e7f5f2;

  /* 语义色 */
  --pos: #009E87;
  --neg: #d64545;
  --neg-50: #fbeaea;
  --warn: #c9820a;
  --warn-50: #fbf2e0;

  /* 柔和语义色板（指标卡区分用，低饱和、协调） */
  --c-blue: #2f6fe0;   --c-blue-50: #eaf1fc;
  --c-violet: #7c5cf0; --c-violet-50: #f1edfd;
  --c-indigo: #4f59e0; --c-indigo-50: #eceefc;
  --c-teal: #0ea5a3;   --c-teal-50: #e4f6f5;
  --c-cyan: #0ea5c4;   --c-cyan-50: #e2f5fa;
  --c-amber: #d98a16;  --c-amber-50: #fbf3e2;
  --c-rose: #e0556f;   --c-rose-50: #fdeaef;
  --c-green: #0a9d6f;  --c-green-50: #e5f6ef;

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

  /* 间距节奏 */
  --gap: clamp(16px, 2.2vw, 26px);
  --pad: clamp(18px, 2.4vw, 28px);
  --maxw: 1120px;

  /* 缓动 */
  --ease: cubic-bezier(.22, .61, .36, 1);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 等宽数字（大数字对齐用） */
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px); }

/* ===================== 页头（白底 + 绿点缀） ===================== */
.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.app-header .wrap {
  display: flex; align-items: center; gap: 14px;
  padding-top: 18px; padding-bottom: 18px;
}
.app-mark {
  width: 6px; height: 30px; border-radius: 3px;
  background: var(--brand); flex: none;
}
.app-title h1 {
  font-size: clamp(17px, 2.4vw, 21px); font-weight: 750;
  letter-spacing: .3px; color: var(--ink); line-height: 1.2;
}
.app-title p { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }

/* ===================== 首页入口墙 ===================== */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: var(--gap);
  padding: clamp(24px, 4vw, 40px) 0;
}
.entry-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px 22px 20px;
  text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  transition: border-color .22s var(--ease), transform .22s var(--ease);
}
.entry-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: transparent; transition: background .22s var(--ease);
}
.entry-card:hover { border-color: var(--brand); transform: translateY(-3px); }
.entry-card:hover::before { background: var(--brand); }
.entry-card .ico {
  width: 44px; height: 44px; border-radius: 11px;
  background: var(--brand-50); display: grid; place-items: center;
  font-size: 22px; margin-bottom: 14px;
}
.entry-card .t { font-size: 16px; font-weight: 700; color: var(--ink); }
.entry-card .d {
  font-size: 12.5px; color: var(--ink-2); line-height: 1.65;
  margin: 8px 0 16px; flex: 1;
}
.entry-card .go {
  font-size: 12.5px; color: var(--brand-700); font-weight: 650;
  display: inline-flex; align-items: center; gap: 5px;
}
.entry-card .go .arr { transition: transform .22s var(--ease); }
.entry-card:hover .go .arr { transform: translateX(3px); }

.entry-card.soon { opacity: .62; cursor: default; }
.entry-card.soon .ico { background: #eef0ef; }
.entry-card.soon:hover { transform: none; border-color: var(--line); }
.entry-card.soon:hover::before { background: transparent; }
.entry-card.soon .go { color: var(--ink-3); }

/* ===================== 板块通用 ===================== */
.section { margin-top: clamp(22px, 3vw, 34px); }
.section-header {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  padding-bottom: 12px; margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.section-header h2 {
  font-size: clamp(16px, 2vw, 19px); font-weight: 720;
  color: var(--ink); letter-spacing: .2px;
}
.section-badge {
  font-size: 11.5px; color: var(--brand-700); font-weight: 600;
  background: var(--brand-50); padding: 3px 10px; border-radius: 999px;
}

/* 卡片（细边框无阴影） */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--pad);
}

/* KPI 卡 */
.kpi-grid {
  display: grid; gap: var(--gap);
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 7px;
  position: relative; overflow: hidden;
  transition: border-color .22s var(--ease), transform .22s var(--ease);
}
.kpi-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.kpi-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--brand);
}
.kpi-icon {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--brand-50); display: grid; place-items: center;
  font-size: 0; align-self: flex-start; color: var(--brand);
}
/* SVG 线性图标（替代 emoji），统一描边风格 */
.ic { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* 指标卡柔和语义色（丰富但不刺眼，左条+图标底色+标签） */
.kpi-card.tone-blue   { --tone: var(--c-blue);   --tone-50: var(--c-blue-50); }
.kpi-card.tone-violet { --tone: var(--c-violet); --tone-50: var(--c-violet-50); }
.kpi-card.tone-indigo { --tone: var(--c-indigo); --tone-50: var(--c-indigo-50); }
.kpi-card.tone-teal   { --tone: var(--c-teal);   --tone-50: var(--c-teal-50); }
.kpi-card.tone-cyan   { --tone: var(--c-cyan);   --tone-50: var(--c-cyan-50); }
.kpi-card.tone-amber  { --tone: var(--c-amber);  --tone-50: var(--c-amber-50); }
.kpi-card.tone-rose   { --tone: var(--c-rose);   --tone-50: var(--c-rose-50); }
.kpi-card.tone-green  { --tone: var(--c-green);  --tone-50: var(--c-green-50); }
.kpi-card[class*="tone-"]::before { background: var(--tone); }
.kpi-card[class*="tone-"] .kpi-icon { background: var(--tone-50); }
.kpi-card[class*="tone-"]:hover { border-color: var(--tone); }
.kpi-card[class*="tone-"] .kpi-label { color: var(--tone); }
.kpi-label { font-size: 12px; color: var(--ink-3); font-weight: 600; letter-spacing: .3px; }
.kpi-value { font-size: clamp(22px, 2.6vw, 27px); font-weight: 740; color: var(--ink); line-height: 1.1; }
.kpi-sub { font-size: 12px; color: var(--ink-2); }
.kpi-sub .pos { color: var(--pos); font-weight: 650; }
.kpi-sub .neg { color: var(--neg); font-weight: 650; }

/* 排名卡（同层级 / 全国） */
.kpi-card.rank .kpi-value { display: flex; align-items: baseline; gap: 6px; }
.kpi-card.rank .kpi-value .of { font-size: 14px; color: var(--ink-3); font-weight: 600; }

/* ===================== 表格（细边框、克制） ===================== */
.modern-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
  border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden;
}
.modern-table th, .modern-table td {
  padding: 11px 14px; text-align: left;
  border-bottom: 1px solid var(--line);
}
.modern-table thead th {
  background: var(--surface-2); color: var(--ink-2);
  font-weight: 680; font-size: 12px; letter-spacing: .3px;
  border-bottom: 1px solid var(--line-2);
}
.modern-table tbody tr:last-child td { border-bottom: none; }
.modern-table tbody tr:hover { background: var(--brand-50); }
.val-number, .val-money { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.val-money { color: var(--ink); }

/* 涨跌 / 对标 */
.gap-diff.pos { color: var(--pos); font-weight: 700; }
.gap-diff.neg { color: var(--neg); font-weight: 700; }
.gap-diff.lead { color: var(--brand-700); }
.muted { color: var(--ink-3); font-weight: 600; }

.lead-badge {
  display: inline-block; background: var(--brand-50); color: var(--brand-700);
  border-radius: 6px; padding: 2px 9px; font-size: 12px; font-weight: 700;
}
.rank-badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px;
  padding: 0 6px; border-radius: 6px; background: var(--brand); color: #fff;
  font-size: 11px; font-weight: 700; margin-right: 6px;
}

.sub-table-header {
  font-size: 13px; font-weight: 700; color: var(--ink);
  margin: 4px 0 12px; display: flex; align-items: center; gap: 8px;
}
.sub-table-header::before {
  content: ""; width: 4px; height: 14px; border-radius: 2px; background: var(--brand);
}

/* ===================== 页脚 ===================== */
.app-footer {
  text-align: center; padding: 28px 16px 22px;
  color: var(--ink-3); font-size: 11.5px;
  border-top: 1px solid var(--line); margin-top: 32px;
}

/* ===================== 动效（适度） ===================== */
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.rise { animation: rise .55s var(--ease) both; }
.rise-1 { animation-delay: .05s; }
.rise-2 { animation-delay: .12s; }
.rise-3 { animation-delay: .19s; }
.rise-4 { animation-delay: .26s; }
.rise-5 { animation-delay: .33s; }
.rise-6 { animation-delay: .40s; }

@media (prefers-reduced-motion: reduce) {
  .rise, .entry-card, .kpi-card { animation: none !important; transition: none !important; }
}

/* ===================== 响应式 ===================== */
@media (max-width: 640px) {
  .entry-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .app-header .wrap { flex-direction: column; align-items: flex-start; gap: 8px; }
}
