.dashboard-page {
  min-height: 100vh;
  padding: 18px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 24%),
    linear-gradient(180deg, #f7faff 0%, #f2f6fb 100%);
}

.dashboard-shell {
  max-width: 1680px;
  margin: 0 auto;
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.dashboard-kpi-card {
  padding: 18px 18px 16px;
  border-radius: 20px;
  border: 1px solid #e5edf6;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.dashboard-kpi-card__label {
  font-size: 12px;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 10px;
}

.dashboard-kpi-card__value {
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.04em;
}

.dashboard-kpi-card__sub {
  margin-top: 10px;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.6;
}

.dashboard-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-chart-card {
  border-radius: 24px;
  border: 1px solid #e7eef7;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  padding: 18px;
}

.dashboard-chart-card--funnel {
  padding-bottom: 22px;
}

.dashboard-chart-card__header {
  margin-bottom: 14px;
}

.dashboard-chart-card__title {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.dashboard-chart-card__desc {
  margin: 8px 0 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.7;
}

.dashboard-chart {
  width: 100%;
  height: 360px;
}

.dashboard-chart--funnel {
  height: 420px;
}

.dashboard-funnel-summary {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-funnel-step {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid #e7eef7;
  background: #fbfdff;
}

.dashboard-funnel-step__label {
  display: block;
  font-size: 12px;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 8px;
}

.dashboard-funnel-step__value {
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.04em;
}

.dashboard-empty {
  min-height: 420px;
  padding: 48px 20px;
  border-radius: 24px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.dashboard-empty__icon {
  font-size: 42px;
  margin-bottom: 14px;
}

.dashboard-empty__title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
}

.dashboard-empty__desc {
  max-width: 520px;
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.9;
  color: #64748b;
}

.dashboard-retry-btn {
  margin-top: 18px;
  min-width: 160px;
  height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.18);
}

@media (max-width: 1440px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

@media (max-width: 1024px) {
  .dashboard-page {
    padding: 14px;
  }

  .dashboard-chart-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .dashboard-kpi-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-chart-card {
    border-radius: 18px;
    padding: 16px;
  }

  .dashboard-chart {
    height: 300px;
  }

  .dashboard-chart--funnel {
    height: 340px;
  }

  .dashboard-funnel-summary {
    grid-template-columns: 1fr;
  }

  .dashboard-kpi-card__value {
    font-size: 26px;
  }
}

.dashboard-detail-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 120;
}

.dashboard-detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(560px, 92vw);
  height: 100vh;
  background: #ffffff;
  border-left: 1px solid #e5edf6;
  box-shadow: -24px 0 60px rgba(15, 23, 42, 0.14);
  z-index: 130;
  transform: translateX(106%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
}

.dashboard-detail-panel.is-open {
  transform: translateX(0);
}

.dashboard-detail-panel__header {
  padding: 22px 22px 18px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.dashboard-detail-panel__eyebrow {
  margin-bottom: 8px;
  font-size: 12px;
  color: #94a3b8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
}

.dashboard-detail-panel__title {
  margin: 0;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.dashboard-detail-panel__desc {
  margin: 8px 0 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.7;
}

.dashboard-detail-panel__close {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid #dbe3ef;
  background: #ffffff;
  color: #334155;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.dashboard-detail-panel__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 22px 24px;
}

.dashboard-detail-chart {
  width: 100%;
  height: 620px;
}

.dashboard-detail-empty {
  min-height: 220px;
  border: 1px solid #e7eef7;
  border-radius: 18px;
  background: #fbfdff;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

@media (max-width: 768px) {
  .dashboard-detail-panel {
    width: 100vw;
  }

  .dashboard-detail-panel__header,
  .dashboard-detail-panel__body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .dashboard-detail-chart {
    height: 480px;
  }
}

.dashboard-funnel-step {
  appearance: none;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-funnel-step:hover {
  transform: translateY(-2px);
  border-color: #bfdbfe;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.12);
}

.dashboard-funnel-step__hint {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #2563eb;
  font-weight: 800;
}

.dashboard-detail-panel--wide {
  width: min(920px, 96vw);
}

.dashboard-detail-panel__header--stacked {
  display: block;
}

.dashboard-detail-panel__header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.dashboard-filter-bar {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

.dashboard-filter-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
  font-weight: 800;
}

.dashboard-filter-item input {
  height: 38px;
  min-width: 150px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid #dbe3ef;
  background: #ffffff;
  color: #0f172a;
  outline: none;
}

.dashboard-filter-btn,
.dashboard-pagination button {
  height: 38px;
  padding: 0 14px;
  border: none;
  border-radius: 12px;
  background: #2563eb;
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
}

.dashboard-filter-btn--ghost,
.dashboard-pagination button:disabled {
  background: #eef2f7;
  color: #64748b;
}

.dashboard-detail-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

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

.dashboard-customer-card {
  padding: 16px;
  border: 1px solid #e7eef7;
  border-radius: 18px;
  background: #fbfdff;
}

.dashboard-customer-card__main {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.dashboard-customer-card__title {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.35;
}

.dashboard-customer-card__meta {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
}

.dashboard-customer-card__score {
  flex-shrink: 0;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
}

.dashboard-customer-card__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-customer-card__grid div {
  padding: 10px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #eef2f7;
  min-width: 0;
}

.dashboard-customer-card__grid span {
  display: block;
  margin-bottom: 6px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
}

.dashboard-customer-card__grid strong {
  display: block;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-all;
}

.dashboard-customer-card__footer {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
}

.dashboard-customer-card__footer a {
  color: #2563eb;
  font-weight: 900;
  text-decoration: none;
}

.dashboard-pagination {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 768px) {
  .dashboard-customer-card__main {
    display: block;
  }

  .dashboard-customer-card__score {
    margin-top: 10px;
  }

  .dashboard-customer-card__grid {
    grid-template-columns: 1fr;
  }

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

  .dashboard-detail-toolbar {
    display: block;
  }
}
