.dashboard-home {
  --dashboard-glass: var(--glass-card, linear-gradient(155deg, #fff, #faf6ffed));
  --dashboard-rim: var(--glass-line, #ffffffec);
  --dashboard-shadow: var(--glass-shadow, 0 8px 22px #38235b12);
  gap: 16px;
}

.dashboard-home .dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(145px, 25vw, 268px);
  min-height: 205px;
  padding: clamp(21px, 3.4vw, 39px);
  border: 1px solid #ffffffec;
  border-radius: 23px;
  background: radial-gradient(ellipse at 88% 49%, #f8c86c9c, transparent 40%),
    radial-gradient(ellipse at 74% 110%, #bad4f9a1, transparent 61%),
    radial-gradient(ellipse at 39% -29%, #e2cbfaa6, transparent 68%),
    linear-gradient(113deg, #fffdfd 3%, #f8f3fe 45%, #e8f1ff 79%, #f6faff);
  color: var(--ink);
  box-shadow: 0 14px 34px #52418420, inset 0 1px 1px #fff, inset 0 -2px 8px #9ca9df29;
}

.dashboard-home .dashboard-hero::before {
  inset: 0;
  background: var(--stars), repeating-radial-gradient(ellipse at 85% 73%, transparent 0 33px, #ffffff85 34px, transparent 35px 53px);
  mask-image: linear-gradient(90deg, transparent 38%, #000 73%);
}
.dashboard-home .dashboard-hero::after { width: auto; inset: 0; background: linear-gradient(154deg, #fff8 3%, transparent 30% 65%, #fff4); animation: none; pointer-events: none; }
.dashboard-hero-copy { position: relative; z-index: 1; min-width: 0; }
.dashboard-home .dashboard-hero .eyebrow { color: var(--accent-deep); letter-spacing: .13em; }
.dashboard-home .dashboard-hero h2 { margin-top: 9px; font-size: clamp(25px, 3.25vw, 42px); line-height: 1.18; letter-spacing: .015em; }
.dashboard-home .dashboard-hero p { max-width: 46ch; margin-top: 9px; color: var(--muted-strong); font-size: 13px; }
.dashboard-hero-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.dashboard-hero-meta span { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 9px; border: 1px solid #fff; border-radius: 99px; background: #ffffffb0; color: var(--muted-strong); box-shadow: 0 2px 7px #4d3a7920; font-size: 11px; overflow-wrap: anywhere; }
.dashboard-hero-meta .icon { width: 13px; height: 13px; color: var(--accent); }
.dashboard-hero-visual { position: relative; display: grid; place-items: center; align-self: stretch; min-width: 0; color: #fff0c5; }
.dashboard-hero-visual svg { position: relative; width: clamp(140px, 20vw, 222px); height: clamp(147px, 17vw, 175px); overflow: visible; filter: drop-shadow(0 7px 13px #472a3f68); transform: rotate(8deg); }
.dashboard-hero-orbit {
  position: absolute;
  width: min(88%, 198px);
  aspect-ratio: 1;
  border: 1px solid #fff8e4;
  border-radius: 50%;
  background: radial-gradient(ellipse at 29% 18%, #fffefaeb, transparent 29%),
    radial-gradient(ellipse at 71% 80%, #fff2a5e0, transparent 35%),
    radial-gradient(circle at 44% 33%, #fff6cddd, #ffe2a5dc 30%, #edaa47bb 57%, #ffcf74ce 75%, #ffe9b8e0 88%, #bd793c8c);
  box-shadow: inset 0 0 24px #fff9, inset -8px -9px 19px #be762a59, 0 0 33px #ffc467ad, 0 11px 24px #ab743b38;
}
.dashboard-hero-orbit::after { content: ''; position: absolute; inset: 6%; transform: rotate(-27deg); border: 1px solid #fff7dfbb; border-right-color: #ffffff49; border-bottom-color: transparent; border-radius: 50%; }

.dashboard-filters { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px 15px; padding: 9px 12px; border-color: var(--dashboard-rim); background: var(--dashboard-glass); box-shadow: var(--dashboard-shadow); }
.dashboard-filter-label { display: inline-flex; align-items: center; gap: 6px; padding: 0 4px; color: var(--muted-strong); font-size: 12px; font-weight: 700; white-space: nowrap; }
.dashboard-filter-label .icon { width: 15px; height: 15px; color: var(--accent); }
.dashboard-filters .filters { align-items: center; gap: 6px; }
.dashboard-filters :is(.range-switch, .date-range) { background: #ffffffc9; }

.dashboard-kpis .stat-card {
  --dashboard-kpi-tint: #e2d9fb9c;
  min-height: 123px;
  padding: 14px 15px;
  border-color: var(--dashboard-rim);
  border-radius: 17px;
  background: radial-gradient(ellipse at 95% 4%, var(--dashboard-kpi-tint), transparent 72%), var(--dashboard-glass);
  box-shadow: var(--dashboard-shadow);
}
.dashboard-kpis [data-metric='leads'] { --dashboard-kpi-tint: #dceaffd2; }
.dashboard-kpis [data-metric='cost'] { --dashboard-kpi-tint: #fae7d0bb; }
.dashboard-kpis [data-metric='profit'] { --dashboard-kpi-tint: #d9eee8b0; }
.dashboard-kpis .stat-head { justify-content: flex-start; gap: 7px; }
.dashboard-kpis .stat-icon { width: 31px; height: 31px; border: 1px solid #ffffffbc; background: #ffffffa3; box-shadow: 0 1px 6px #402b6320; }
.dashboard-kpis .stat-label { font-weight: 700; }
.dashboard-kpis .stat-card .stat-value { margin-top: 9px; padding-right: 0; }
.dashboard-stat-foot { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-top: 6px; }
.dashboard-stat-foot .stat-note { min-width: 0; margin: 0; }
.dashboard-kpis .stat-spark { position: static; flex: 0 0 auto; width: clamp(35px, 4vw, 62px); opacity: .78; }

.dashboard-chart-grid { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); }
.dashboard-panel { border-color: var(--dashboard-rim); border-radius: 18px; background: var(--dashboard-glass); box-shadow: var(--dashboard-shadow); }
.dashboard-panel-heading { align-items: center; gap: 8px; }
.dashboard-panel-title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.dashboard-panel-icon { display: grid; flex: 0 0 32px; place-items: center; width: 32px; height: 32px; border: 1px solid #fff; border-radius: 10px; background: var(--accent-wash); color: var(--accent-deep); }
.dashboard-panel-icon .icon { width: 17px; height: 17px; }
.dashboard-panel .chart-legend { justify-content: end; gap: 4px 10px; }
.dashboard-panel .empty-state { min-height: 175px; border-radius: 12px; background: linear-gradient(140deg, #e9e3f650, #ffffff45); }
.dashboard-trend-plot { padding-block: 8px 2px; overflow: auto; scrollbar-width: thin; }
.dashboard-trend-plot svg text { font-size: 13px; }
.dashboard-channel-content { display: grid; gap: 11px; }
.dashboard-channel-ring { position: relative; display: grid; width: 120px; aspect-ratio: 1; place-items: center; justify-self: center; border: 1px solid #ffffffdb; border-radius: 50%; background: var(--channel-ring, var(--accent-wash)); box-shadow: 0 6px 14px #4a396426, inset 0 0 10px #fff5; }
.dashboard-channel-ring > span { position: absolute; inset: 11px; border: 1px solid #fff; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 10px #5c458a1b; }
.dashboard-channel-ring > div { z-index: 1; display: grid; justify-items: center; min-width: 0; padding: 8px; }
.dashboard-channel-ring strong { font-size: 23px; font-variant-numeric: tabular-nums; letter-spacing: -.045em; line-height: 1.1; }
.dashboard-channel-ring small { color: var(--muted); font-size: 10px; }
.dashboard-channel .channel-row { padding-block: 7px; }
.dashboard-activity .table-wrap { border: 1px solid var(--soft-line); border-radius: 10px; }

@media (max-width: 760px) {
  .dashboard-chart-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard-home .dashboard-hero { grid-template-columns: minmax(0, 1fr) minmax(112px, 25vw); }
  .dashboard-kpis .stat-card { min-height: 108px; }
}

@media (max-width: 460px) {
  .dashboard-home { gap: 12px; }
  .dashboard-home .dashboard-hero { display: block; min-height: 182px; padding: 17px; }
  .dashboard-home .dashboard-hero p { max-width: 31ch; }
  .dashboard-hero-meta { margin-top: 14px; }
  .dashboard-hero-visual { position: absolute; inset: 13px -9px -4px auto; width: 39%; pointer-events: none; }
  .dashboard-hero-visual svg { width: 114px; height: 143px; opacity: .38; }
  .dashboard-hero-orbit { opacity: .62; }
  .dashboard-filters { padding-inline: 8px; }
  .dashboard-filters .filters { width: 100%; }
  .dashboard-filters .date-range { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; width: 100%; }
  .dashboard-filters .date-range > .icon { display: none; }
  .dashboard-filters .date-range input[type='date'] { width: 100%; min-width: 0; }
  .dashboard-kpis .stat-card { padding: 10px; }
  .dashboard-kpis .stat-head { gap: 5px; }
  .dashboard-kpis .stat-icon { width: 26px; height: 26px; }
  .dashboard-kpis .stat-icon .icon { width: 15px; height: 15px; }
  .dashboard-kpis .stat-spark { display: none; }
  .dashboard-panel-heading { align-items: flex-start; flex-wrap: wrap; }
  .dashboard-trend-plot .trend-chart { min-width: 420px; }
}
