.dashboard-preview[hidden] {
  display: none;
}

.dashboard-preview {
  position: fixed;
  inset: 0;
  z-index: 9200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(16,44,68,0.62);
  backdrop-filter: blur(8px);
}

body.dashboard-preview-open {
  overflow: hidden;
}

.dashboard-preview__panel {
  position: relative;
  width: min(92vw, 420px);
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.dashboard-preview__phone {
  position: relative;
  width: min(86vw, 360px);
  max-height: calc(100vh - 7rem);
  aspect-ratio: 9 / 19.5;
  padding: 12px;
  border-radius: 38px;
  background: var(--text-primary, #102c44);
  box-shadow:
    0 42px 88px -34px rgba(16,44,68,0.72),
    0 0 0 8px rgba(245,240,235,0.9);
}

.dashboard-preview__notch {
  position: absolute;
  top: 11px;
  left: 50%;
  width: 82px;
  height: 20px;
  border-radius: 11px;
  background: var(--text-primary, #102c44);
  transform: translateX(-50%);
  z-index: 2;
}

.dashboard-preview__screen {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 27px;
  background: var(--bg-elevated, #f5f0eb);
}

.dashboard-preview__screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.dashboard-preview__screen[data-fit="contain"] img {
  object-fit: contain;
  object-position: center;
}

.dashboard-preview__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dashboard-preview__close,
.dashboard-preview__trip,
.dashboard-preview__share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 8px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 700;
  text-decoration: none;
}

.dashboard-preview__close {
  width: 40px;
  border: 1px solid rgba(245,240,235,0.58);
  background: rgba(245,240,235,0.14);
  color: #fff;
  cursor: pointer;
}

.dashboard-preview__trip {
  padding: 0 1rem;
  border: 1px solid rgba(245,240,235,0.72);
  background: var(--brand-cream, #f5f0eb);
  color: var(--brand-navy, #102c44);
  white-space: nowrap;
}

.dashboard-preview__share {
  min-width: 120px;
  padding: 0 0.9rem;
  border: 1px solid rgba(245,240,235,0.58);
  background: rgba(245,240,235,0.14);
  color: #fff;
  cursor: pointer;
  gap: 0.45rem;
  white-space: nowrap;
}

.dashboard-preview__share svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 520px) {
  .dashboard-preview {
    align-items: flex-start;
    padding-top: 1.4rem;
  }

  .dashboard-preview__phone {
    width: min(82vw, 300px);
    max-height: calc(100vh - 6.5rem);
    border-radius: 34px;
  }

  .dashboard-preview__actions {
    gap: 0.55rem;
  }

  .dashboard-preview__trip {
    min-height: 38px;
    padding: 0 0.85rem;
    font-size: 0.9rem;
  }

  .dashboard-preview__share {
    min-height: 38px;
    padding: 0 0.8rem;
    font-size: 0.9rem;
  }
}
