/* ---------- 工作台首页 ---------- */

.home-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.home-hero__main {
  padding: 28px;
  position: relative;
  overflow: hidden;
  background: var(--navy-900);
  border-color: var(--navy-900);
  color: #fff;
}

/* 坐标母题：极淡刻度网格 */
.home-hero__main::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

/* 航向母题：右下方向光 */
.home-hero__main::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(30, 156, 232, 0.22), transparent 70%);
  pointer-events: none;
}

.home-hero__main > * { position: relative; }

.home-hero__kicker {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 10px;
}

.home-hero__title {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 12px;
  color: #fff;
}

.home-hero__desc {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.78);
  max-width: 46em;
  margin-bottom: 20px;
}

.home-hero__desc b { color: #fff; font-weight: 600; }
.home-hero__desc .num { color: var(--sky-500); font-weight: 600; }
.home-hero__desc .code { color: rgba(255, 255, 255, 0.9); }

.home-hero__actions { display: flex; flex-wrap: wrap; gap: 8px; }

.home-hero__actions .btn:not(.btn--primary) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.24);
  color: rgba(255, 255, 255, 0.88);
}

.home-hero__actions .btn:not(.btn--primary):hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.home-hero__aside {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.story-step {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: 10px;
  align-items: start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.story-step:last-child { border-bottom: none; padding-bottom: 0; }

.story-step__n {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--brand-600);
  color: var(--brand-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: var(--accent-soft);
}

.story-step__t { font-size: 14px; font-weight: 600; }
.story-step__d { font-size: 12.5px; color: var(--ink-faint); margin-top: 2px; }
.story-step a { font-size: 12.5px; white-space: nowrap; margin-top: 3px; }

/* 关键指标条 */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 20px;
  overflow: hidden;
}

.dash-stat {
  display: block;
  position: relative;
  padding: 18px 20px 16px;
  border-right: 1px solid var(--border);
  color: inherit;
  transition: background var(--dur-micro) var(--ease);
}

/* 卡顶方向线：“向前推进” */
.dash-stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 2px;
  background: var(--brand-600);
  transition: width var(--dur-page) var(--ease);
}

.dash-stat:hover::before { width: 100%; }

.dash-stat:last-child { border-right: none; }
.dash-stat:hover { background: var(--surface); }

.dash-stat__label { font-size: 12px; color: var(--ink-faint); margin-bottom: 6px; }
.dash-stat__value { font-size: 32px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.dash-stat__value small { font-size: 13px; font-weight: 400; margin-left: 4px; color: var(--ink-faint); }
.dash-stat--warn .dash-stat__value { color: var(--seal); }
.dash-stat--warn::before { background: var(--seal); }
.dash-stat--accent .dash-stat__value { color: var(--brand-600); }
.dash-stat--ok .dash-stat__value { color: var(--ok); }
.dash-stat--ok::before { background: var(--ok); }
.dash-stat--mid .dash-stat__value { color: var(--risk-high); }
.dash-stat--mid::before { background: var(--risk-high); }

/* 双栏网格 */
.home-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  margin-bottom: 20px;
}

.home-grid--3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.pkg-list { display: flex; flex-direction: column; gap: 10px; }

.pkg-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--canvas);
  transition: border-color var(--dur-micro) var(--ease), background var(--dur-micro) var(--ease);
  color: inherit;
}

.pkg-item:hover {
  border-color: var(--brand-600);
  background: var(--surface);
}

.pkg-item__code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
}
.pkg-item__name { font-size: 14px; font-weight: 600; margin-top: 2px; }
.pkg-item__meta { font-size: 12.5px; color: var(--ink-faint); margin-top: 4px; }
.pkg-item__right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.pkg-item__quote { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }

.issue-mini {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: inherit;
}

.issue-mini:last-child { border-bottom: none; }
.issue-mini:hover .issue-mini__t { color: var(--brand-700); }

.issue-mini__t { font-size: 13.5px; font-weight: 600; }
.issue-mini__m { font-size: 12px; color: var(--ink-faint); margin-top: 3px; }

.timeline { display: flex; flex-direction: column; gap: 0; }

.timeline__item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.timeline__item:last-child { border-bottom: none; }
.timeline__time { font-size: 12.5px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.timeline__act { font-weight: 600; }
.timeline__sub { font-size: 12.5px; color: var(--ink-faint); margin-top: 2px; }

.alert-list { display: flex; flex-direction: column; gap: 10px; }

.alert-row {
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.alert-row::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 7px;
}

.alert-row--high::before { background: var(--risk-critical); }
.alert-row--mid::before { background: var(--risk-high); }
.alert-row--low::before { background: var(--risk-low); }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.cat-card {
  padding: 14px 14px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--canvas);
  color: inherit;
  transition: border-color var(--dur-micro) var(--ease), background var(--dur-micro) var(--ease);
}

.cat-card:hover {
  border-color: var(--brand-600);
  background: var(--surface);
}

.cat-card__name { font-size: 14px; font-weight: 600; }
.cat-card__meta { font-size: 12px; color: var(--ink-faint); margin-top: 4px; }

@media (max-width: 1100px) {
  .home-hero,
  .home-grid,
  .home-grid--3 { grid-template-columns: 1fr; }
  .dash-stats { grid-template-columns: 1fr 1fr; }
  .dash-stat:nth-child(2) { border-right: none; }
  .dash-stat:nth-child(1),
  .dash-stat:nth-child(2) { border-bottom: 1px solid var(--border); }
  .cat-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .home-hero__main {
    padding: 20px 16px 18px;
  }

  .home-hero__main::after {
    display: none;
  }

  .home-hero__title {
    font-size: 22px;
  }

  .home-hero__desc {
    font-size: 13.5px;
  }

  .home-hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .home-hero__actions .btn {
    width: 100%;
    text-align: center;
  }

  .home-hero__aside {
    padding: 16px;
  }

  .story-step {
    grid-template-columns: 28px 1fr;
    gap: 8px;
  }

  .story-step a {
    grid-column: 2;
    margin-top: 0;
  }

  .dash-stats {
    grid-template-columns: 1fr 1fr;
  }

  .dash-stat {
    padding: 14px 14px 12px;
  }

  .dash-stat__value {
    font-size: 26px;
  }

  .pkg-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .pkg-item__right {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
  }

  .timeline__item {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .cat-grid {
    grid-template-columns: 1fr;
  }

  .section-card__body {
    padding: 14px 14px 16px;
  }
}

@media (max-width: 480px) {
  .dash-stats {
    grid-template-columns: 1fr;
  }

  .dash-stat {
    border-right: none !important;
    border-bottom: 1px solid var(--border);
  }

  .dash-stat:last-child {
    border-bottom: none;
  }
}
