* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;

  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  background: #f5f7fb;
  color: #101828;
}

.dashboard-shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 56px 0 72px;
}

/* Header */

.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;

  margin-bottom: 40px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;

  font-size: 12px;
  font-weight: 700;

  letter-spacing: 0.12em;
  text-transform: uppercase;

  color: #635bff;
}

h1 {
  margin: 0;

  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.04em;

  color: #111827;
}

.subtitle {
  margin: 14px 0 0;

  max-width: 640px;

  font-size: 16px;
  line-height: 1.6;

  color: #667085;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 8px;

  padding: 10px 14px;

  border: 1px solid #e4e7ec;
  border-radius: 999px;

  background: #ffffff;

  font-size: 13px;
  font-weight: 600;

  color: #344054;

  box-shadow: 0 2px 6px rgba(16, 24, 40, 0.04);
}

.status-dot {
  width: 8px;
  height: 8px;

  border-radius: 50%;

  background: #12b76a;
}

/* Top metrics */

.hero-grid {
  display: grid;

  grid-template-columns:
    minmax(0, 1.5fr)
    minmax(0, 1.5fr)
    minmax(0, 0.8fr)
    minmax(0, 0.8fr);

  gap: 18px;

  margin-bottom: 24px;
}

.hero-card,
.compact-card,
.panel {
  border: 1px solid #eaecf0;

  background: #ffffff;

  box-shadow:
    0 1px 2px rgba(16, 24, 40, 0.03),
    0 8px 24px rgba(16, 24, 40, 0.05);
}

.hero-card {
  min-height: 210px;

  padding: 26px;

  border-radius: 22px;
}

.revenue-card {
  background: linear-gradient(
    145deg,
    rgba(99, 91, 255, 0.09),
    rgba(255, 255, 255, 1) 52%
  );
}

.won-card {
  background: linear-gradient(
    145deg,
    rgba(18, 183, 106, 0.08),
    rgba(255, 255, 255, 1) 52%
  );
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-label {
  margin: 0;

  font-size: 12px;
  font-weight: 700;

  letter-spacing: 0.07em;
  text-transform: uppercase;

  color: #667085;
}

.small-badge,
.method-badge {
  display: inline-flex;
  align-items: center;

  padding: 6px 10px;

  border-radius: 999px;

  background: #f0efff;
  color: #5147e5;

  font-size: 11px;
  font-weight: 700;
}

.small-badge.success {
  background: #ecfdf3;
  color: #027a48;
}

.hero-value {
  margin: 26px 0 12px;

  font-size: 46px;
  line-height: 1;

  font-weight: 700;
  letter-spacing: -0.04em;

  color: #101828;
}

.card-description {
  margin: 0;

  font-size: 14px;
  line-height: 1.5;

  color: #667085;
}

/* Small KPI cards */

.compact-card {
  min-height: 210px;

  display: flex;
  flex-direction: column;

  padding: 26px;

  border-radius: 22px;
}

.compact-value {
  margin: auto 0 12px;

  font-size: 42px;
  font-weight: 700;

  letter-spacing: -0.04em;

  color: #101828;
}

/* Lower section */

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;

  gap: 24px;
}

.panel {
  padding: 28px;

  border-radius: 24px;
}

.panel-header {
  padding-bottom: 22px;

  border-bottom: 1px solid #eaecf0;
}

.panel-header h2 {
  margin: 0;

  font-size: 23px;
  letter-spacing: -0.025em;

  color: #101828;
}

/* Metric list */

.metrics-list {
  display: flex;
  flex-direction: column;
}

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 24px;

  padding: 19px 0;

  border-bottom: 1px solid #f0f2f5;
}

.metric-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.metric-name {
  margin: 0 0 4px;

  font-size: 15px;
  font-weight: 600;

  color: #344054;
}

.metric-helper {
  margin: 0;

  font-size: 13px;

  color: #98a2b3;
}

.metric-row strong {
  font-size: 22px;
  letter-spacing: -0.02em;

  color: #101828;
}

/* Sources */

.source-list {
  display: flex;
  flex-direction: column;
}

.source-row {
  display: grid;

  grid-template-columns: 54px 1fr auto;

  align-items: center;

  gap: 16px;

  padding: 18px 0;

  border-bottom: 1px solid #f0f2f5;
}

.source-mark {
  width: 48px;
  height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 14px;

  background: #f2f1ff;
  color: #5147e5;

  font-size: 10px;
  font-weight: 800;

  letter-spacing: 0.06em;
}

.source-info {
  display: flex;
  flex-direction: column;

  gap: 4px;
}

.source-info strong {
  font-size: 15px;
  color: #344054;
}

.source-info span {
  font-size: 13px;
  color: #98a2b3;
}

.method-badge.webhook {
  background: #ecfdf3;
  color: #027a48;
}

/* Database */

.database-row {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;

  margin-top: 22px;

  padding: 18px;

  border-radius: 16px;

  background: #f8f9fc;
}

.database-row > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.database-label {
  font-size: 11px;
  font-weight: 700;

  letter-spacing: 0.06em;
  text-transform: uppercase;

  color: #98a2b3;
}

.database-row strong {
  font-size: 14px;
  color: #344054;
}

.database-badge {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 38px;
  height: 38px;

  border-radius: 11px;

  background: #101828;
  color: white;

  font-size: 11px;
  font-weight: 700;
}

/* Hover */

.hero-card,
.compact-card,
.panel {
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.hero-card:hover,
.compact-card:hover {
  transform: translateY(-2px);

  box-shadow:
    0 2px 4px rgba(16, 24, 40, 0.04),
    0 14px 30px rgba(16, 24, 40, 0.08);
}

/* Responsive */

@media (max-width: 1050px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .dashboard-shell {
    width: min(100% - 28px, 1180px);
    padding-top: 32px;
  }

  .dashboard-header {
    flex-direction: column;
  }

  h1 {
    font-size: 36px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .compact-card {
    min-height: auto;
  }

  .compact-value {
    margin: 26px 0 12px;
  }
}

.demo-actions {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.demo-actions-header {
  margin-bottom: 14px;
}

.demo-actions-header h3 {
  margin: 4px 0 0;
  font-size: 16px;
}

.demo-button {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: #111827;
  color: #ffffff;
}

.demo-button:hover {
  opacity: 0.9;
}

.demo-button:disabled {
  cursor: default;
  opacity: 0.6;
}

.demo-message {
  min-height: 20px;
  margin: 8px 0 0;
  font-size: 13px;
  text-align: center;
}
.demo-button-group {
  display: grid;
  gap: 10px;
}

.demo-actions {
  margin: 0 0 24px;
  padding: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
}

.demo-button-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

@media (max-width: 800px) {
  .demo-button-group {
    grid-template-columns: 1fr;
  }
}
