/* 星梦岛 · 仪表盘展示层（glass / metric / chart — 参考 GeizAdmin / Glass Admin 风格） */

.vf-panel--dash {
  position: relative;
  overflow: visible;
}

.vf-panel--dash.is-visible {
  overflow: visible;
}

.vf-dash {
  position: relative;
  z-index: 1;
}

.vf-dash-orbs {
  pointer-events: none;
  position: absolute;
  inset: -20% -10% auto;
  height: 420px;
  z-index: 0;
  overflow: hidden;
}

.vf-dash-orbs::before,
.vf-dash-orbs::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.55;
  animation: vf-dash-orb-drift 18s ease-in-out infinite alternate;
}

.vf-dash-orbs::before {
  width: 340px;
  height: 340px;
  left: -8%;
  top: -30%;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.45), transparent 68%);
}

.vf-dash-orbs::after {
  width: 280px;
  height: 280px;
  right: 5%;
  top: -10%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.35), transparent 70%);
  animation-delay: -6s;
}

@keyframes vf-dash-orb-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(24px, 18px) scale(1.06); }
}

.vf-dash-hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--vf-space-4);
  margin-bottom: var(--vf-space-5);
  padding: var(--vf-space-5) var(--vf-space-6);
  border-radius: var(--vf-radius-lg);
  border: 1px solid rgba(56, 189, 248, 0.22);
  background:
    linear-gradient(135deg, rgba(2, 132, 199, 0.14) 0%, rgba(15, 22, 40, 0.85) 48%, rgba(21, 29, 46, 0.92) 100%);
  backdrop-filter: blur(12px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 20px 50px rgba(0, 0, 0, 0.35);
}

.vf-dash-hero__eyebrow {
  margin: 0 0 var(--vf-space-2);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--vf-accent);
}

.vf-dash-hero__title {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #f8fafc 0%, #7dd3fc 55%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.vf-dash-hero__sub {
  margin: var(--vf-space-2) 0 0;
  max-width: 36rem;
  font-size: 0.88rem;
  color: var(--vf-text-secondary);
  line-height: 1.5;
}

.vf-dash-hero__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--vf-space-2);
  text-align: right;
}

.vf-dash-hero__time {
  font-family: var(--vf-mono);
  font-size: 0.78rem;
  color: var(--vf-text-muted);
}

.vf-dash-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: var(--vf-success-bg);
  color: var(--vf-success);
}

.vf-dash-hero__badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
  animation: vf-dash-pulse 2s ease-in-out infinite;
}

@keyframes vf-dash-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

.vf-metric-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 168px), 1fr));
  gap: var(--vf-space-3);
  margin-bottom: var(--vf-space-5);
}

.vf-metric {
  position: relative;
  padding: var(--vf-space-4);
  border-radius: var(--vf-radius);
  border: 1px solid var(--vf-border);
  background: rgba(21, 29, 46, 0.72);
  backdrop-filter: blur(10px);
  transition: transform var(--vf-transition), border-color var(--vf-transition), box-shadow var(--vf-transition);
  overflow: hidden;
}

.vf-metric::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06) 0%, transparent 42%);
  pointer-events: none;
}

.vf-metric:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.vf-metric__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--vf-space-2);
  margin-bottom: var(--vf-space-3);
}

.vf-metric__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--vf-primary-muted);
  color: var(--vf-accent);
  flex-shrink: 0;
}

.vf-metric__icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vf-metric__label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--vf-text-muted);
  line-height: 1.3;
}

.vf-metric__value {
  position: relative;
  z-index: 1;
  font-family: var(--vf-mono);
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--vf-text);
  font-variant-numeric: tabular-nums;
}

.vf-metric__hint {
  position: relative;
  z-index: 1;
  margin-top: var(--vf-space-2);
  font-size: 0.72rem;
  color: var(--vf-text-muted);
}

.vf-metric--primary {
  border-color: rgba(2, 132, 199, 0.45);
  background:
    linear-gradient(160deg, rgba(2, 132, 199, 0.22) 0%, rgba(15, 22, 40, 0.88) 55%);
  box-shadow: 0 0 40px rgba(2, 132, 199, 0.12);
}

.vf-metric--primary .vf-metric__value {
  color: var(--vf-accent);
  text-shadow: 0 0 24px rgba(56, 189, 248, 0.35);
}

.vf-metric--warn .vf-metric__icon {
  background: var(--vf-warn-bg);
  color: var(--vf-warn);
}

.vf-metric--success .vf-metric__icon {
  background: var(--vf-success-bg);
  color: var(--vf-success);
}

.vf-dash-split {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr minmax(220px, 320px);
  gap: var(--vf-space-4);
  margin-bottom: var(--vf-space-5);
}

@media (max-width: 900px) {
  .vf-dash-split {
    grid-template-columns: 1fr;
  }
}

.vf-dash-chart-card {
  padding: var(--vf-space-5);
  border-radius: var(--vf-radius);
  border: 1px solid var(--vf-border);
  background: rgba(15, 22, 40, 0.75);
  backdrop-filter: blur(10px);
}

.vf-dash-chart-card__title {
  margin: 0 0 var(--vf-space-1);
  font-size: 0.95rem;
  font-weight: 600;
}

.vf-dash-chart-card__sub {
  margin: 0 0 var(--vf-space-4);
  font-size: 0.78rem;
  color: var(--vf-text-muted);
}

.vf-dash-bars {
  display: flex;
  align-items: stretch;
  gap: 8px;
  height: 100px;
  min-height: 88px;
  padding-top: var(--vf-space-1);
}

.vf-dash-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
  height: 100%;
}

.vf-dash-bar__track {
  width: 100%;
  max-width: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  position: relative;
}

.vf-dash-bar__val {
  font-family: var(--vf-mono);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--vf-text-secondary);
  line-height: 1;
  white-space: nowrap;
}

.vf-dash-bar__fill {
  width: 100%;
  min-height: 4px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, var(--vf-accent) 0%, rgba(2, 132, 199, 0.45) 100%);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
  transition: height 0.35s ease;
}

.vf-dash-bar:nth-child(2) .vf-dash-bar__fill { background: linear-gradient(180deg, #34d399, rgba(52, 211, 153, 0.35)); }
.vf-dash-bar:nth-child(4) .vf-dash-bar__fill { background: linear-gradient(180deg, #fbbf24, rgba(251, 191, 36, 0.35)); }
.vf-dash-bar:nth-child(6) .vf-dash-bar__fill { background: linear-gradient(180deg, #a78bfa, rgba(167, 139, 250, 0.35)); }

.vf-dash-bar__label {
  font-size: 0.65rem;
  color: var(--vf-text-muted);
  text-align: center;
  line-height: 1.2;
}

.vf-dash-ring-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--vf-space-4);
  border-radius: var(--vf-radius);
  border: 1px solid var(--vf-border);
  background: rgba(15, 22, 40, 0.75);
  backdrop-filter: blur(10px);
}

.vf-dash-ring {
  --vf-ring-pct: 72;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: conic-gradient(
    var(--vf-accent) calc(var(--vf-ring-pct) * 1%),
    rgba(148, 163, 184, 0.15) 0
  );
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.15);
}

.vf-dash-ring::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--vf-surface-inset);
}

.vf-dash-ring__inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.vf-dash-ring__value {
  display: block;
  font-family: var(--vf-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--vf-accent);
}

.vf-dash-ring__label {
  display: block;
  font-size: 0.7rem;
  color: var(--vf-text-muted);
  margin-top: 2px;
}

.vf-dash-models {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--vf-space-3);
  margin-bottom: var(--vf-space-5);
}

.vf-dash-model {
  position: relative;
  padding: var(--vf-space-4) var(--vf-space-4) var(--vf-space-4) var(--vf-space-5);
  border-radius: var(--vf-radius);
  border: 1px solid var(--vf-border);
  background: rgba(21, 29, 46, 0.65);
  backdrop-filter: blur(8px);
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  transition: transform var(--vf-transition), box-shadow var(--vf-transition);
}

.vf-dash-model::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--vf-accent), var(--vf-primary));
}

.vf-dash-model:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.vf-dash-model--gold::before { background: linear-gradient(180deg, #fbbf24, #f59e0b); }
.vf-dash-model--violet::before { background: linear-gradient(180deg, #a78bfa, #7c3aed); }

.vf-dash-model__tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--vf-accent);
}

.vf-dash-model__title {
  margin: var(--vf-space-2) 0 var(--vf-space-1);
  font-size: 1rem;
  font-weight: 600;
}

.vf-dash-model__text {
  margin: 0;
  font-size: 0.8rem;
  color: var(--vf-text-muted);
  line-height: 1.45;
}

.vf-dash-actions {
  position: relative;
  z-index: 1;
  padding: var(--vf-space-5);
  border-radius: var(--vf-radius);
  border: 1px solid var(--vf-border);
  background: rgba(21, 29, 46, 0.6);
  backdrop-filter: blur(8px);
}

.vf-dash-actions__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--vf-space-3);
  margin-bottom: var(--vf-space-4);
}

.vf-dash-actions__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.vf-dash-actions__sub {
  margin: var(--vf-space-1) 0 0;
  font-size: 0.78rem;
  color: var(--vf-text-muted);
}

.vf-dash-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--vf-space-3);
}

.vf-dash-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--vf-space-2);
  padding: var(--vf-space-4);
  border-radius: var(--vf-radius-sm);
  border: 1px solid var(--vf-border);
  background: var(--vf-surface-inset);
  color: var(--vf-text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--vf-transition), background var(--vf-transition), transform var(--vf-transition);
}

.vf-dash-action:hover {
  border-color: rgba(56, 189, 248, 0.4);
  background: var(--vf-surface-hover);
  transform: translateY(-2px);
}

.vf-dash-action__icon {
  display: flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--vf-primary-muted);
  color: var(--vf-accent);
}

.vf-dash-action__icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
}

/* —— 1080p 紧凑布局（铺满可视区，图表区吸收剩余高度） —— */
.vf-panel--dash.is-visible {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: none;
  overflow: hidden;
}

.vf-dash--fit {
  display: flex;
  flex-direction: column;
  gap: var(--vf-space-2);
  flex: 1;
  min-height: 0;
}

.vf-panel--dash > .vf-dash:not(.vf-dash--fit) {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: var(--vf-space-2);
}

.vf-dash-hero--slim {
  margin-bottom: 0;
  padding: var(--vf-space-3) var(--vf-space-4);
  align-items: center;
}

.vf-dash-hero--slim .vf-dash-hero__title {
  font-size: 1.15rem;
  background: none;
  color: var(--vf-text);
  -webkit-text-fill-color: var(--vf-text);
}

.vf-dash-hero--slim .vf-dash-hero__sub {
  margin-top: 2px;
  font-size: 0.75rem;
  max-width: none;
}

.vf-dash-hero__main {
  flex: 1;
  min-width: 0;
}

.vf-dash-fit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: var(--vf-space-3);
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

.vf-dash-fit-main {
  display: flex;
  flex-direction: column;
  gap: var(--vf-space-2);
  min-width: 0;
  min-height: 0;
  flex: 1;
}

.vf-dash-fit-aside {
  display: flex;
  flex-direction: column;
  gap: var(--vf-space-2);
  min-height: 0;
  height: 100%;
  align-self: stretch;
}

.vf-dash-fit-aside .vf-dash-models--compact {
  flex-shrink: 0;
}

.vf-panel--dash .vf-dash-split--compact {
  flex: 1;
  min-height: 140px;
  align-items: stretch;
}

.vf-panel--dash .vf-dash-split--compact .vf-dash-chart-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.vf-panel--dash .vf-dash--fit .vf-dash-split--compact .vf-dash-bars {
  flex: 1;
  height: auto;
  min-height: 120px;
  max-height: none;
}

.vf-panel--dash .vf-dash-split--compact .vf-dash-ring-wrap--compact {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-height: 0;
}

.vf-panel--dash .vf-dash-fit-aside .vf-dash-actions--compact {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.vf-panel--dash .vf-dash-fit-aside:not(:has(.vf-dash-models)) .vf-dash-actions--compact {
  flex: 1;
  justify-content: stretch;
}

.vf-panel--dash .vf-dash-fit-aside .vf-dash-action-grid--fill {
  flex: 1;
  min-height: 0;
  align-content: stretch;
  grid-auto-rows: minmax(0, 1fr);
}

.vf-panel--dash .vf-dash-fit-aside:has(.vf-dash-models) .vf-dash-action-grid--fill {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
}

.vf-panel--dash .vf-dash-fit-aside:not(:has(.vf-dash-models)) .vf-dash-action-grid--fill {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.vf-panel--dash .vf-dash-action-grid--fill .vf-dash-action {
  height: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: flex-start;
}

.vf-panel--dash > .vf-dash:not(.vf-dash--fit) .vf-dash-split {
  flex: 1;
  min-height: 140px;
  align-items: stretch;
}

.vf-panel--dash > .vf-dash:not(.vf-dash--fit) .vf-dash-chart-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.vf-panel--dash > .vf-dash:not(.vf-dash--fit) .vf-dash-bars {
  flex: 1;
  height: auto;
  min-height: 120px;
  max-height: min(42vh, 360px);
}

.vf-panel--dash > .vf-dash:not(.vf-dash--fit) .vf-dash-actions {
  flex-shrink: 0;
}

.vf-metric-grid--compact {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--vf-space-2);
  margin-bottom: 0;
}

.vf-metric-grid--compact .vf-metric {
  padding: var(--vf-space-2) var(--vf-space-3);
}

.vf-metric-grid--compact .vf-metric__head {
  margin-bottom: var(--vf-space-1);
}

.vf-metric-grid--compact .vf-metric__icon {
  width: 28px;
  height: 28px;
}

.vf-metric-grid--compact .vf-metric__icon svg {
  width: 16px;
  height: 16px;
}

.vf-metric-grid--compact .vf-metric__value {
  font-size: 1.05rem;
}

.vf-metric-grid--compact .vf-metric__hint {
  display: none;
}

.vf-dash-split--compact {
  grid-template-columns: 1fr 120px;
  margin-bottom: 0;
}

.vf-dash-split--compact .vf-dash-chart-card {
  padding: var(--vf-space-3);
}

.vf-dash-split--compact .vf-dash-chart-card__title {
  font-size: 0.82rem;
  margin-bottom: var(--vf-space-2);
}

.vf-dash-split--compact:not(.vf-dash-split--fit) .vf-dash-bars {
  height: 100px;
  min-height: 88px;
}

.vf-dash-ring-wrap--compact {
  padding: var(--vf-space-2);
}

.vf-dash-ring--sm {
  width: 96px;
  height: 96px;
}

.vf-dash-ring--sm .vf-dash-ring__value {
  font-size: 1.1rem;
}

.vf-dash-models--compact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--vf-space-2);
  margin-bottom: 0;
}

.vf-dash-models--compact .vf-dash-model {
  padding: var(--vf-space-2) var(--vf-space-3);
}

.vf-dash-models--compact .vf-dash-model__text {
  display: none;
}

.vf-dash-models--compact .vf-dash-model__title {
  margin: 0;
  font-size: 0.82rem;
}

.vf-dash-actions--compact {
  padding: var(--vf-space-3);
  display: flex;
  flex-direction: column;
}

.vf-dash-actions--compact .vf-dash-actions__title {
  margin: 0 0 var(--vf-space-2);
  font-size: 0.85rem;
}

.vf-dash-actions--compact .vf-dash-action-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: var(--vf-space-2);
}

.vf-dash-actions--compact .vf-dash-action {
  padding: var(--vf-space-2) var(--vf-space-3);
  flex-direction: row;
  align-items: center;
  font-size: 0.78rem;
}

.vf-dash-actions--compact .vf-dash-action__icon {
  width: 26px;
  height: 26px;
}

.vf-dash-action--primary {
  border-color: rgba(2, 132, 199, 0.55);
  background: var(--vf-primary-muted);
  font-weight: 600;
}

.vf-panel--dash .vf-page-guide {
  margin-bottom: var(--vf-space-2);
  padding: var(--vf-space-2) var(--vf-space-3);
}

.vf-panel--dash .vf-page-guide__detail {
  max-height: 28vh;
}

.vf-panel--dash .vf-page-guide [data-vf-help-expand] {
  display: none;
}

@media (max-width: 1280px) {
  .vf-dash-fit-grid {
    grid-template-columns: 1fr;
  }

  .vf-metric-grid--compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .vf-panel--dash .vf-dash-fit-aside .vf-dash-action-grid--fill {
    grid-auto-rows: auto;
    align-content: start;
  }

  .vf-panel--dash .vf-dash-fit-aside .vf-dash-action-grid--fill .vf-dash-action {
    height: auto;
  }

  .vf-admin-content:has(> .vf-panel--dash.is-visible) {
    overflow-y: auto;
  }
}
