/* Dashboard responsiveness, compatible with the currently deployed markup. */
.dashboard-page { container: dashboard / inline-size; }
main:has(> header) { container: app-shell / inline-size; }
.dashboard-page section[class*="snap-mandatory"][class*="xl:grid-cols-4"] > * {
  min-width: 0;
  max-width: none;
  flex-basis: min(85vw, 360px);
  flex-shrink: 0;
}
.dashboard-page section[class*="snap-mandatory"][class*="xl:grid-cols-4"] > .bg-card { aspect-ratio: auto; }
.dashboard-page section[class*="snap-mandatory"][class*="xl:grid-cols-4"] > :first-child > [class*="flex-row"] {
  flex-wrap: wrap;
  gap: 12px;
}
.dashboard-page section[class*="snap-mandatory"][class*="xl:grid-cols-4"] > :first-child > [class*="flex-row"] > .flex-1 { flex-basis: 180px; }
.dashboard-page section[class*="snap-mandatory"][class*="xl:grid-cols-4"] [class*="h-20"][class*="rounded-full"] { width: 80px; height: 80px; }
.dashboard-page section[class*="snap-mandatory"][class*="xl:grid-cols-4"] [class*="h-[60px]"][class*="rounded-full"] { width: 60px; height: 60px; }
.dashboard-page section[class*="snap-mandatory"][class*="xl:grid-cols-4"] a[class*="h-8"] {
  height: auto;
  min-height: 36px;
  max-width: 100%;
  white-space: normal;
  padding-block: 6px;
}
.dashboard-page section[class*="snap-mandatory"][class*="xl:grid-cols-4"] > :nth-child(2) .flex-1 { min-width: 0; }
.dashboard-page section[class*="snap-mandatory"][class*="xl:grid-cols-4"] > :nth-child(2) .flex > svg { flex-shrink: 0; }
.dashboard-page section[class*="snap-mandatory"][class*="xl:grid-cols-4"] > :nth-child(2) .flex > span:last-child { flex-shrink: 0; white-space: nowrap; }
.dashboard-page [class*="min-w-[calc(100vw-2rem)]"] { min-width: 0; width: 100%; }
.dashboard-page .dashboard-tools-grid,
.dashboard-page .grid[class*="md:grid-cols-3"] { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
main:has(> header) > header [data-intro="search"] { min-width: 0; }
main:has(> header) > header [data-intro="search"] > [class*="absolute left-0 top-11"] { max-width: calc(100cqw - 7rem); }
main:has(> header) > header > .ml-auto { flex-shrink: 0; }
@media (min-width: 640px) {
  .dashboard-page section[class*="snap-mandatory"][class*="xl:grid-cols-4"] > :first-child > [class*="flex-row"] { padding: 0 20px 20px; }
}
@media (min-width: 768px) {
  .dashboard-page section[class*="snap-mandatory"][class*="xl:grid-cols-4"] { grid-template-columns: minmax(0, 1fr); }
  .dashboard-page section[class*="snap-mandatory"][class*="xl:grid-cols-4"] > * { flex-basis: auto; }
  .dashboard-page div[class*="snap-x"][class*="md:grid-cols-4"] { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
  .dashboard-page section[class*="xl:grid-cols-[minmax(0,1fr)_320px]"],
  .dashboard-page section[class*="xl:grid-cols-[1.25fr_.9fr]"] { grid-template-columns: minmax(0, 1fr); }
  .dashboard-page div[class*="lg:grid-cols-6"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  @container dashboard (min-width: 540px) {
    .dashboard-page div[class*="lg:grid-cols-6"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  }
  @container dashboard (min-width: 640px) {
    .dashboard-page section[class*="snap-mandatory"][class*="xl:grid-cols-4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @container dashboard (min-width: 1080px) {
    .dashboard-page section[class*="xl:grid-cols-[minmax(0,1fr)_320px]"] { grid-template-columns: minmax(0, 1fr) 320px; }
    .dashboard-page section[class*="xl:grid-cols-[1.25fr_.9fr]"] { grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); }
    .dashboard-page div[class*="lg:grid-cols-6"] { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  }
  @container dashboard (min-width: 1280px) {
    .dashboard-page section[class*="snap-mandatory"][class*="xl:grid-cols-4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  }
  @container dashboard (min-width: 1320px) {
    .dashboard-page section[class*="xl:grid-cols-[minmax(0,1fr)_320px]"] { grid-template-columns: minmax(0, 1fr) 360px; }
  }
}
@container app-shell (max-width: 1000px) {
  main:has(> header) > header > .ml-auto > div[class*="lg:flex"] { display: none; }
  main:has(> header) > header > .ml-auto > button[class*="hidden h-9 text-muted-foreground"] { width: 36px; padding: 0; }
  main:has(> header) > header > .ml-auto > button[class*="hidden h-9 text-muted-foreground"] > span { display: none; }
  main:has(> header) > header > .ml-auto > button[class*="hidden h-9 text-muted-foreground"] > svg { margin: 0; }
}
@container app-shell (max-width: 639px) {
  main:has(> header) > header [data-intro="search"],
  main:has(> header) > header > .ml-auto > div[class*="hidden md:block"] { display: none; }
}
