/* Cloudflare preview is a data mode, not a separate visual system. */
html.nv-cloudflare-preview-auth .dash-floating-chat {
  display: none !important;
}

html.nv-cloudflare-preview-auth .nv-preview-demo-label {
  margin: 0;
}

/* First-value island = DS Home → Dashboard → Empty (nv-home-empty): icon, title, one line, one action. */
html.nv-cloudflare-preview-auth .dash-first-value {
  min-block-size: 0;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  padding: clamp(56px, 8vw, 80px) 24px;
  border: 0;
  background: var(--nv-surface-solid, var(--dash-card-on-workspace));
  text-align: center;
}

html.nv-cloudflare-preview-auth .dash-first-value[hidden] {
  display: none;
}

html.nv-cloudflare-preview-auth .dash-first-value__copy {
  display: grid;
  max-inline-size: 520px;
  justify-items: center;
  gap: 0;
  text-align: center;
}

html.nv-cloudflare-preview-auth .dash-first-value__copy > * {
  margin: 0;
}

html.nv-cloudflare-preview-auth .dash-first-value .nv-product-empty__icon {
  display: grid;
  inline-size: 48px;
  block-size: 48px;
  place-items: center;
  border-radius: 16px;
  background: var(--dash-surface-hover, color-mix(in srgb, var(--color-text-primary) 6%, transparent));
  color: var(--dash-text-muted, var(--color-text-secondary));
}

html.nv-cloudflare-preview-auth .dash-first-value .nv-product-empty__icon svg {
  inline-size: 22px;
  block-size: 22px;
}

html.nv-cloudflare-preview-auth .dash-first-value h2 {
  margin-block-start: 20px;
  color: var(--dash-text, var(--color-text-primary));
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

html.nv-cloudflare-preview-auth .dash-first-value p {
  max-inline-size: 30rem;
  margin-block-start: 10px;
  color: var(--dash-text-muted, var(--color-text-secondary));
  font-size: var(--nv-type-body-size);
  letter-spacing: var(--nv-type-body-tracking);
  line-height: var(--nv-type-body-line);
}

html.nv-cloudflare-preview-auth .dash-first-value .nv-product-empty__action {
  min-block-size: 44px;
  margin-block-start: 22px;
}

/*
 * Zero state: no workspace yet, or a workspace without accounts.
 * DS Home → Dashboard → Empty replaces every island with one island and one action.
 * Wallet, quick actions, accounts and activity need an account to mean anything, so
 * they are not shown at all rather than shown as inert or dashed placeholders.
 */
html.nv-cloudflare-preview-auth body:is([data-nucleus-dashboard-first-value="workspace"], [data-nucleus-dashboard-first-value="account"], [data-nucleus-dashboard-zero="true"]) .dash-grid {
  grid-template-columns: minmax(0, 1fr);
}

html.nv-cloudflare-preview-auth body:is([data-nucleus-dashboard-first-value="workspace"], [data-nucleus-dashboard-first-value="account"], [data-nucleus-dashboard-zero="true"]) :is(
  .dash-col:has(> .dash-quick--actions),
  .dash-overview,
  .dash-evidence,
  .dash-month-summary,
  .dash-split,
  .dash-upcoming,
  .dash-new-wrap
) {
  display: none !important;
}

html.nv-cloudflare-preview-auth body:is([data-nucleus-dashboard-first-value="workspace"], [data-nucleus-dashboard-first-value="account"], [data-nucleus-dashboard-zero="true"]) .dash-content--flat-workspace > .dash-environment-banner {
  inline-size: 100%;
}

/* Receipts island: forwarded receipts still waiting for a match, shown even before accounts exist. */
html.nv-cloudflare-preview-auth .dash-receipts {
  padding: var(--dash-island-pad);
  background: var(--nv-surface-solid, var(--dash-card-on-workspace));
}

html.nv-cloudflare-preview-auth .dash-receipts[hidden] {
  display: none;
}

html.nv-cloudflare-preview-auth .dash-receipts .dash-card__head {
  margin-block-end: 8px;
}

html.nv-cloudflare-preview-auth .dash-receipts__list {
  display: grid;
}

html.nv-cloudflare-preview-auth .dash-receipts .dash-activity-row__avatar svg {
  inline-size: 20px;
  block-size: 20px;
  color: var(--dash-text-muted, var(--color-text-secondary));
}

html.nv-cloudflare-preview-auth .dash-evidence {
  display: grid;
  gap: var(--spacing-lg);
  padding: var(--dash-island-pad);
  border: 0;
  background: var(--nv-surface-solid, var(--dash-card-on-workspace));
}

html.nv-cloudflare-preview-auth .dash-evidence[hidden],
html.nv-cloudflare-preview-auth .dash-evidence__content[hidden],
html.nv-cloudflare-preview-auth .dash-evidence__loading[hidden] {
  display: none;
}

html.nv-cloudflare-preview-auth .dash-evidence__head,
html.nv-cloudflare-preview-auth .dash-evidence__content {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(16rem, 1fr);
  gap: var(--spacing-lg);
}

html.nv-cloudflare-preview-auth .dash-evidence__head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

html.nv-cloudflare-preview-auth .dash-evidence__head p,
html.nv-cloudflare-preview-auth .dash-evidence__head h2,
html.nv-cloudflare-preview-auth .dash-evidence__insight > * {
  margin: 0;
}

html.nv-cloudflare-preview-auth .dash-evidence__eyebrow,
html.nv-cloudflare-preview-auth .dash-evidence__insight > p,
html.nv-cloudflare-preview-auth .dash-evidence__note,
html.nv-cloudflare-preview-auth .dash-evidence__metric span {
  color: var(--color-text-tertiary);
  font-size: var(--nv-type-caption-size);
  letter-spacing: var(--nv-type-caption-tracking);
}

html.nv-cloudflare-preview-auth .dash-evidence__head h2 {
  margin-block-start: var(--spacing-xs);
  font-size: var(--font-size-xl);
}

html.nv-cloudflare-preview-auth .dash-evidence__currencies {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: var(--spacing-sm);
}

html.nv-cloudflare-preview-auth .dash-evidence__metric,
html.nv-cloudflare-preview-auth .dash-evidence__insight {
  display: grid;
  gap: var(--spacing-xs);
  min-inline-size: 0;
  padding: var(--spacing-md);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--color-text-primary) 4%, transparent);
}

html.nv-cloudflare-preview-auth .dash-evidence__metric strong {
  font-size: var(--font-size-lg);
  font-variant-numeric: tabular-nums;
}

html.nv-cloudflare-preview-auth .dash-evidence__metric small,
html.nv-cloudflare-preview-auth .dash-evidence__insight > span {
  color: var(--color-text-secondary);
  line-height: 1.5;
}

html.nv-cloudflare-preview-auth .dash-evidence__insight h3 {
  font-size: var(--nv-type-body-size);
  letter-spacing: var(--nv-type-body-tracking);
  line-height: var(--nv-type-body-line);
}

html.nv-cloudflare-preview-auth .dash-evidence__action {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-block-size: 40px;
  color: var(--color-accent-primary, var(--dash-purple));
  font-size: var(--nv-type-footnote-size);
  letter-spacing: var(--nv-type-footnote-tracking);
  font-weight: var(--nv-type-weight-semibold);
  text-decoration: none;
}

html.nv-cloudflare-preview-auth .dash-evidence__action:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

html.nv-cloudflare-preview-auth .dash-evidence__action:focus-visible {
  border-radius: var(--radius-sm);
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

html.nv-cloudflare-preview-auth .dash-evidence__loading {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--spacing-sm);
}

html.nv-cloudflare-preview-auth .dash-evidence__loading span {
  min-block-size: 5.5rem;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--color-text-primary) 6%, transparent);
}

html.nv-cloudflare-preview-auth:not(.nv-dash-data-pending) .dash-accounts.is-preview-loading .dash-account-row {
  color: transparent;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--color-text-primary) 5%, transparent) 50%,
    transparent 100%
  );
  background-size: 220% 100%;
  animation: cf-preview-dashboard-loading 1.35s ease-in-out infinite;
}

html.nv-cloudflare-preview-auth:not(.nv-dash-data-pending) .dash-accounts.is-preview-loading img,
html.nv-cloudflare-preview-auth:not(.nv-dash-data-pending) .dash-accounts.is-preview-loading svg {
  opacity: 0;
}

html.nv-cloudflare-preview-auth:not(.nv-dash-data-pending) body[data-nucleus-dashboard-state="loading"] .dash-activity-list {
  opacity: 0;
}

html.nv-cloudflare-preview-auth body[data-preview-dataset="owner"] .dash-month-summary,
html.nv-cloudflare-preview-auth body[data-preview-dataset="owner"] .dash-cashflow,
html.nv-cloudflare-preview-auth body[data-preview-dataset="owner"] .dash-spending,
html.nv-cloudflare-preview-auth body[data-preview-dataset="owner"] .dash-upcoming {
  display: none;
}

html.nv-cloudflare-preview-auth body[data-nucleus-dashboard-first-value="account"] .dash-activity__filters,
html.nv-cloudflare-preview-auth body[data-nucleus-dashboard-first-value="account"] [data-activity-view-all],
html.nv-cloudflare-preview-auth body[data-nucleus-dashboard-first-value="import"] .dash-activity__filters,
html.nv-cloudflare-preview-auth body[data-nucleus-dashboard-first-value="import"] [data-activity-view-all],
html.nv-cloudflare-preview-auth body[data-nucleus-dashboard-zero="true"] .dash-activity__filters,
html.nv-cloudflare-preview-auth body[data-nucleus-dashboard-zero="true"] [data-activity-view-all] {
  display: none;
}

/* The section the onboarding job points to gets a quiet dot until its first value step is done. */
html.nv-cloudflare-preview-auth .dash-nav__link[data-nv-focus="true"] .dash-nav__icon {
  position: relative;
}

html.nv-cloudflare-preview-auth .dash-nav__link[data-nv-focus="true"] .dash-nav__icon::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nv-badge-accent, #8fa8ff);
  box-shadow: 0 0 0 2px var(--nv-sidebar-bg, #020203);
}

@keyframes cf-preview-dashboard-loading {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
  html.nv-cloudflare-preview-auth .dash-accounts.is-preview-loading .dash-account-row {
    animation: none;
  }
}

@media (max-width: 640px) {
  html.nv-cloudflare-preview-auth .dash-first-value {
    padding-block: 48px;
  }

  html.nv-cloudflare-preview-auth .dash-evidence__head,
  html.nv-cloudflare-preview-auth .dash-evidence__content,
  html.nv-cloudflare-preview-auth .dash-evidence__loading {
    grid-template-columns: minmax(0, 1fr);
  }
}
