@layer dashboards {
  .dash-main, .analytics-main, .briefs-main, .inquiries-main, .listings-main,
  .inbox-main, .settings-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    padding-block: var(--space-lg);
    min-height: calc(100vh - 68px - 260px);
  }
  .dash-stats, .analytics-stats, .briefs-stats, .inquiries-stats, .listings-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
  }
  /* Sits at the foot of the deep purple banner (.band-deep, system.css), so
     unlike the rest of the app chrome below it, this stays a real white bar
     with a real border and dark labels rather than the white-alpha treatment
     used directly on the purple elsewhere — the selected tab is still the one
     solid brand object in the row. */
  .dash-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 4px;
    box-shadow: 0 1px 3px oklch(0% 0 0 / 0.04);
  }
  .dash-tab-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 11px 18px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--muted);
    transition: background .25s, color .25s, transform .2s;
    cursor: pointer;
    border: none;
    background: none;
    white-space: normal;
    flex: 1 0 auto;
    justify-content: center;
    border-radius: 10px;
    letter-spacing: 0.01em;
  }
  .dash-tab-item:hover {
    background: oklch(53.6% 0.145 276 / 0.08);
    color: var(--accent);
  }
  .dash-tab-item.active {
    background: #5962C0;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px oklch(53.6% 0.145 276 / 0.3);
  }
  .dash-stat-card {
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    position: relative;
    overflow: hidden;
    border-color: oklch(82% 0.012 276);
    box-shadow: 0 2px 8px oklch(30% 0.08 276 / 0.10), 0 1px 3px oklch(0% 0 0 / 0.06);
  }
  .dash-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    border-radius: 3px 3px 0 0;
  }
  /* One accent for every card, deliberately. These bars used to run
     indigo/indigo/green/amber/yellow across the row, and the colours carried no
     information — a response rate isn't "green" and an awaiting-reply count
     isn't "amber", they were just five slots that happened to get five hues. The
     result reads as a rainbow and, because colour normally MEANS something in a
     stat row (good/warning/bad), it actively misleads while it distracts. The
     row's job is to be scannable, so the cards look identical and the numbers do
     the talking. Semantic colour is still available if a card ever earns it. */
  .dash-stat-card::before { background: linear-gradient(90deg, #5962C0, #9A9CE1); }
  .dash-stat-value {
    font-family: var(--font-display);
    font-size: clamp(24px, 2.5vw, 34px);
    font-weight: 700;
    line-height: 1;
    color: #111;
  }
  .dash-stat-label {
    font-size: 12px;
    color: #6b6b6b;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  /* Sign-out and the separator beside it live in the header, which is on the
     DEEP band (.page-band, system.css) — so these keep the white-alpha values,
     unlike the rest of the app chrome below them. Secondary until hover, red on
     approach. */
  .btn-signout {
    border: 1.5px solid oklch(100% 0 0 / 0.25) !important;
    background: oklch(100% 0 0 / 0.06) !important;
    color: oklch(100% 0 0 / 0.75) !important;
    text-decoration: none !important;
  }
  .btn-signout:hover {
    background: #DC2626 !important;
    color: #fff !important;
    border-color: #DC2626 !important;
  }
  .dash-action-sep { width: 1px; height: 28px; background: oklch(100% 0 0 / 0.25); flex-shrink: 0; }

  /* ── Burger menu dashboard extras (mobile only, base rules) ── */
  .btn-signout-burger { display: none; }

  /* ── Pulse animation for "new" activity dots ── */
  @keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 0 0 currentColor; }
    60%       { box-shadow: 0 0 0 5px transparent; }
  }
  .activity-dot.new { animation: dotPulse 2.4s ease-in-out infinite; }

  /* ── Empty state utility ── */
  .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 56px 24px 64px;
    gap: 10px;
    color: oklch(22% 0.015 276);
  }
  .empty-state svg {
    width: 44px; height: 44px;
    color: oklch(70% 0.02 276);
    margin-bottom: 4px;
    opacity: 0.6;
  }
  .empty-state h3 { font-size: 16px; font-weight: 600; }
  .empty-state p  { font-size: 14px; color: #6b6b6b; max-width: 300px; line-height: 1.6; }
  .empty-state .btn { margin-top: 6px; }
}

@media (max-width: 768px) {
  .dash-stats, .analytics-stats, .briefs-stats, .inquiries-stats, .listings-stats {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 1fr;
  }
  /* These page subtitles used to be forced white here to survive the purple
     body. They now inherit the light band's --muted like every other piece of
     secondary copy, so the override is only about the mobile size step. */
  .dash-header-left p, .analytics-header-left p, .inquiries-header-left p,
  .listings-header-left p, .settings-header-left p, .add-header-left p,
  .dash-header p, .inbox-header p {
    opacity: .85;
  }
}
