/* Apex Send — Dashboard mock (scroll-built) */

.dashboard-story__intro {
  padding-block: var(--spacing-80) var(--spacing-40);
}

.dashboard-story__intro .section__header {
  margin-bottom: 0;
}

.dashboard-story__track {
  height: 420vh;
  position: relative;
}

.dashboard-story__pin {
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  padding-block: var(--spacing-24);
}

.dashboard-story__layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  width: 100%;
}

.dashboard-story__caption-eyebrow {
  margin: 0 0 var(--spacing-16);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-specify-violet);
}

.dashboard-story__caption-title {
  margin: 0 0 var(--spacing-16);
  font-size: clamp(26px, 2.8vw, 38px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--color-charcoal-text);
}

.dashboard-story__caption-desc {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-graphite);
  max-width: 34ch;
}

/* App shell */

.dash-app {
  width: 100%;
  perspective: 1200px;
}

.dash-app__frame {
  border-radius: 14px;
  overflow: hidden;
  background: #0c0d0f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  color: #fff;
  font-size: 12px;
}

.dash-app__titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dash-app__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dash-app__dot--red { background: #ff5f57; }
.dash-app__dot--yellow { background: #febc2e; }
.dash-app__dot--green { background: #28c840; }

.dash-app__url {
  margin-left: 6px;
  padding: 4px 12px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
}

.dash-app__layout {
  display: flex;
  min-height: 480px;
}

.dash-app__sidebar {
  width: 188px;
  flex-shrink: 0;
  padding: 16px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dash-app__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
}

.dash-app__brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
  flex-shrink: 0;
}

.dash-app__brand span {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.dash-app__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-app__nav-item {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  transition: background 200ms ease, color 200ms ease;
}

.dash-app__nav-item.is-active {
  background: rgba(124, 58, 237, 0.22);
  color: #fff;
}

.dash-app__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  background: #101214;
}

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

.dash-app__search {
  flex: 1;
  max-width: 320px;
  padding: 9px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.35);
  font-size: 12px;
}

.dash-app__user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
}

.dash-app__user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
}

.dash-app__metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.dash-app__metric {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.dash-app__metric-label {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dash-app__metric-value {
  display: block;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1;
  color: #fff;
}

.dash-app__metric-delta {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 500;
  color: #4ade80;
}

.dash-app__panels {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1.25fr 0.95fr;
  gap: 10px;
  min-height: 240px;
}

.dash-panel {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.dash-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.dash-panel__badge {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  background: rgba(124, 58, 237, 0.25);
  color: #ddd6fe;
}

.dash-panel__badge--green {
  background: rgba(74, 222, 128, 0.15);
  color: #86efac;
}

.dash-panel__badge--online {
  background: transparent;
  color: #4ade80;
  font-weight: 500;
}

/* Inbox */

.dash-inbox__list {
  list-style: none;
  padding: 6px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-inbox__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
}

.dash-inbox__item.is-active {
  background: rgba(124, 58, 237, 0.14);
}

.dash-inbox__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
}

.dash-inbox__meta strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.dash-inbox__meta span {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

/* Chat */

.dash-chat__thread {
  flex: 1;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.dash-chat__bubble {
  max-width: 88%;
  padding: 8px 11px;
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.45;
}

.dash-chat__bubble--in {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
  border-bottom-left-radius: 4px;
}

.dash-chat__bubble--out {
  align-self: flex-end;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.dash-chat__composer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
}

.dash-chat__send {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
}

/* Analytics */

.dash-analytics__chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 96px;
  padding: 12px;
}

.dash-analytics__bar {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(to top, #2563eb, #7c3aed);
  min-height: 8px;
}

.dash-analytics__template {
  margin: 0 10px 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.dash-analytics__template-label {
  display: block;
  margin-bottom: 4px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.dash-analytics__template p {
  margin: 0 0 2px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.88);
}

.dash-analytics__template strong {
  color: #86efac;
}

.dash-analytics__template small {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
}

/* Scroll build — JS sets opacity/transform inline */

[data-build-part] {
  will-change: transform, opacity;
}

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

  .dashboard-story__caption {
    text-align: center;
  }

  .dashboard-story__caption-desc {
    margin-inline: auto;
  }

  .dash-app__metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .dash-app__panels {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
}

@media (max-width: 768px) {
  .dashboard-story__track {
    height: 360vh;
  }

  .dash-app__layout {
    flex-direction: column;
  }

  .dash-app__sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }

  .dash-app__nav {
    flex-direction: row;
    flex-wrap: wrap;
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-build-part] {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}
