.dashboard-page {
  display: grid;
  gap: 18px;
}

.dashboard-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.dashboard-hero__copy {
  display: grid;
  gap: 8px;
}

.dashboard-hero__eyebrow {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #dc2626;
}

.dashboard-hero__copy h1 {
  margin: 0;
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1;
  letter-spacing: -0.05em;
  color: #0f172a;
}

.dashboard-hero__text {
  margin: 0;
  color: #64748b;
  font-size: 1rem;
}

.dashboard-hero__status {
  display: grid;
  justify-items: end;
  gap: 6px;
  text-align: right;
}

.dashboard-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-status-pill[data-state="ready"] {
  background: rgba(34, 197, 94, 0.14);
  color: #166534;
}

.dashboard-hero__message,
.dashboard-hero__detail {
  margin: 0;
  color: #64748b;
  font-size: 0.92rem;
}

.dashboard-filter-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04);
}

.dashboard-filters {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.dashboard-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dashboard-filter > span {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.dashboard-filter input,
.dashboard-filter select {
  width: 100%;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-stat {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.dashboard-stat::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #cbd5e1;
}

.dashboard-stat--blue::before { background: #0ea5e9; }
.dashboard-stat--violet::before { background: #8b5cf6; }
.dashboard-stat--amber::before { background: #f59e0b; }
.dashboard-stat--emerald::before { background: #22c55e; }
.dashboard-stat--rose::before { background: #e11d48; }

.dashboard-stat__label {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.dashboard-stat__value {
  margin: 0;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #0f172a;
}

.dashboard-content {
  display: grid;
  gap: 18px;
}

.dashboard-grid {
  display: grid;
  gap: 18px;
}

.dashboard-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.05);
}

.dashboard-card__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.dashboard-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}

.dashboard-card__subtitle {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 0.92rem;
}

.dashboard-chart {
  min-height: 320px;
}

.dashboard-funnel {
  display: grid;
  gap: 14px;
}

.dashboard-funnel__row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 60px;
  gap: 12px;
  align-items: center;
}

.dashboard-funnel__label {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}

.dashboard-funnel__bar {
  height: 42px;
  border-radius: 12px;
  background: #e2e8f0;
  overflow: hidden;
}

.dashboard-funnel__fill {
  height: 100%;
  border-radius: 12px;
}

.dashboard-funnel__fill--blue { background: #0ea5e9; }
.dashboard-funnel__fill--amber { background: #f59e0b; }
.dashboard-funnel__fill--violet { background: #8b5cf6; }
.dashboard-funnel__fill--green { background: #22c55e; }
.dashboard-funnel__fill--rose { background: #e11d48; }

.dashboard-funnel__value {
  text-align: right;
  color: #0f172a;
  font-weight: 800;
}

.dashboard-donut-wrap {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 190px;
  gap: 18px;
  align-items: center;
}

.dashboard-donut {
  width: min(100%, 360px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--dashboard-donut, conic-gradient(#e11d48 0 40%, #0ea5e9 40% 70%, #22c55e 70% 92%, #f59e0b 92% 100%));
  margin-inline: auto;
  position: relative;
}

.dashboard-donut::after {
  content: '';
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: #fff;
}

.dashboard-legend {
  display: grid;
  gap: 8px;
}

.dashboard-legend__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: #475569;
}

.dashboard-legend__swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex: 0 0 auto;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
}

.dashboard-table th,
.dashboard-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #eef2f7;
  text-align: left;
  vertical-align: top;
  font-size: 0.92rem;
}

.dashboard-table th {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  white-space: nowrap;
}

.dashboard-table__wrap {
  overflow-x: auto;
}

.dashboard-mini {
  display: grid;
  gap: 12px;
}

.dashboard-mini__label {
  font-weight: 800;
  color: #0f172a;
}

.dashboard-mini__row {
  display: grid;
  gap: 8px;
}

.dashboard-mini__bars {
  display: grid;
  gap: 8px;
}

.dashboard-mini__bar {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 56px;
  gap: 10px;
  align-items: center;
}

.dashboard-mini__track {
  height: 14px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.dashboard-mini__fill {
  height: 100%;
  border-radius: 999px;
}

.dashboard-mini__fill--blue { background: #0ea5e9; }
.dashboard-mini__fill--green { background: #22c55e; }
.dashboard-mini__fill--violet { background: #8b5cf6; }
.dashboard-mini__fill--amber { background: #f59e0b; }

.dashboard-mini__value {
  text-align: right;
  font-weight: 800;
  color: #0f172a;
}

.dashboard-empty {
  color: #64748b;
}

.dashboard-note {
  color: #64748b;
  font-size: 0.9rem;
}

@media (max-width: 1100px) {
  .dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid--two,
  .dashboard-donut-wrap {
    grid-template-columns: 1fr;
  }

  .dashboard-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .dashboard-hero {
    flex-direction: column;
  }

  .dashboard-hero__status {
    justify-items: start;
    text-align: left;
  }

  .dashboard-stats,
  .dashboard-filters {
    grid-template-columns: 1fr;
  }

  .dashboard-funnel__row,
  .dashboard-mini__bar {
    grid-template-columns: 1fr;
  }

  .dashboard-funnel__value,
  .dashboard-mini__value {
    text-align: left;
  }
}
