.vrm-page {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.25rem 0 1.5rem;
}

.vrm-hero {
  position: relative;
  border-radius: 14px;
  padding: 1.2rem 1.4rem;
  background: linear-gradient(135deg, #4338ca 0%, #6366f1 55%, #818cf8 100%);
  color: #fff;
  overflow: hidden;
}

.vrm-hero-glow {
  position: absolute;
  inset: -30% auto auto 65%;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.vrm-hero-title {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
  font-weight: 700;
}

.vrm-hero-sub {
  margin: 0;
  opacity: 0.92;
  font-size: 0.9rem;
  line-height: 1.55;
  max-width: 44rem;
}

.vrm-card {
  background: var(--mantine-color-body);
  border: 1px solid var(--mantine-color-gray-3);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}

.vrm-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 900px) {
  .vrm-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.vrm-summary-card {
  border: 1px solid var(--mantine-color-gray-3);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  background: var(--mantine-color-gray-0);
}

.vrm-summary-label {
  font-size: 0.75rem;
  color: var(--mantine-color-dimmed);
  margin-bottom: 0.35rem;
}

.vrm-summary-value {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
}

.vrm-workspace {
  border: 1px solid var(--mantine-color-gray-3);
  border-radius: 14px;
  padding: 0.85rem 1rem 1.1rem;
  background: var(--mantine-color-body);
}

.vrm-tab-panel {
  min-height: 280px;
  padding-top: 0.75rem;
}

.vrm-patient-slot .cmvdp-patient-card-inner {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(129, 140, 248, 0.04));
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vrm-patient-slot .cmvdp-patient-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.vrm-patient-slot .cmvdp-patient-card-head i {
  color: #6366f1;
}

.vrm-patient-slot .cmvdp-patient-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 12px;
  color: #64748b;
}

/* ── 生命周期时间轴 ── */

.vrm-timeline-panel {
  border: 1px solid var(--mantine-color-gray-3);
  border-radius: 14px;
  background: linear-gradient(180deg, #fafaff 0%, #fff 120px);
  overflow: hidden;
}

.vrm-timeline-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--mantine-color-gray-2);
  background: rgba(99, 102, 241, 0.04);
}

.vrm-timeline-list {
  padding: 1rem 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.vrm-timeline-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 0.85rem;
  align-items: stretch;
}

.vrm-timeline-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.vrm-timeline-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  flex-shrink: 0;
  z-index: 1;
}

.vrm-timeline-line {
  flex: 1;
  width: 3px;
  min-height: 12px;
  margin: 4px 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #c7d2fe, #e2e8f0);
}

.vrm-timeline-card {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-left: 4px solid #6366f1;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.65rem;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.vrm-timeline-card:hover {
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.1);
  transform: translateY(-1px);
}

.vrm-timeline-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.55rem;
}

.vrm-timeline-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.vrm-timeline-card-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
}

.vrm-timeline-card-time {
  text-align: right;
  white-space: nowrap;
}

.vrm-timeline-date {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
}

.vrm-timeline-clock {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.1rem;
}

.vrm-timeline-card-detail {
  font-size: 0.84rem;
  color: #475569;
  line-height: 1.55;
}

.vrm-metric-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.vrm-metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.18);
  font-size: 0.78rem;
  font-weight: 600;
  color: #4338ca;
}

.vrm-metric-chip--teal {
  background: rgba(13, 148, 136, 0.1);
  border-color: rgba(13, 148, 136, 0.2);
  color: #0f766e;
}

.vrm-metric-chip-label {
  font-weight: 500;
  color: #64748b;
  font-size: 0.72rem;
}

.vrm-event-badge {
  flex-shrink: 0;
}

/* ── 动态方案 ── */

.vrm-plan-wrap {
  border: 1px solid var(--mantine-color-gray-3);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.vrm-plan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(129, 140, 248, 0.05) 100%);
  border-bottom: 1px solid var(--mantine-color-gray-2);
}

.vrm-plan-header-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #312e81;
  margin-bottom: 0.25rem;
}

.vrm-plan-header-sub {
  font-size: 0.84rem;
  color: #64748b;
  line-height: 1.55;
  max-width: 36rem;
}

.vrm-plan-header-icon {
  font-size: 2rem;
  color: rgba(99, 102, 241, 0.35);
}

.vrm-plan-grid {
  padding: 1rem 1.25rem 0.5rem;
}

.vrm-plan-section {
  border: 1px solid var(--mantine-color-gray-2);
  border-radius: 12px;
  padding: 1rem 1.05rem;
  background: var(--mantine-color-gray-0);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  height: 100%;
}

.vrm-plan-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.85rem 1.25rem 1.1rem;
  border-top: 1px solid var(--mantine-color-gray-2);
  background: #fafafa;
}

/* ── 通用 ── */

.vrm-empty {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: #94a3b8;
  border: 1px dashed var(--mantine-color-gray-3);
  border-radius: 12px;
  background: var(--mantine-color-gray-0);
}

.vrm-empty--timeline {
  padding: 3rem 1.5rem;
}

.vrm-empty-icon {
  font-size: 2rem;
  color: #cbd5e1;
  margin-bottom: 0.75rem;
}

.vrm-empty-title {
  font-weight: 700;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.vrm-empty-sub {
  font-size: 0.85rem;
  line-height: 1.55;
  max-width: 28rem;
  margin: 0 auto;
}

.vrm-graph-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 960px) {
  .vrm-graph-grid {
    grid-template-columns: 1fr;
  }

  .vrm-plan-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .vrm-plan-header-icon {
    display: none;
  }
}
