/* ═══════════════════════════════════════════════
   MAX API GAMES — Layout
   Grid layout, content areas, responsive
   ═══════════════════════════════════════════════ */

/* ─── DASHBOARD LAYOUT (only used on dashboard home with provider sidebar) ─── */
.dashboard-layout {
  display: grid;
  grid-template-columns: 60px 1fr;
  min-height: calc(100vh - 56px);
  position: relative;
  z-index: 1;
}

/* ─── CONTENT ─── */
.content {
  padding: 28px 32px;
  overflow-y: auto;
  max-height: calc(100vh - 56px);
}

/* Pages without sidebar — full width */
.page-content {
  min-height: calc(100vh - 56px);
}

.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.content-header h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.content-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ─── GRID LAYOUTS ─── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 1400px;
}

/* Dashboard-specific 3-column grid (exact dashboard-1) */
.dashboard-grid {
  grid-template-columns: minmax(280px, 1fr) minmax(340px, 1.3fr) 200px;
  max-width: 1380px;
}

.col-left, .col-right { display: flex; flex-direction: column; gap: 16px; }

.col-full { grid-column: 1 / -1; }

/* ─── STAGGER ANIMATION ─── */
.stagger > * {
  opacity: 0;
  animation: fadeInUp 500ms var(--ease-out) forwards;
}

.stagger > *:nth-child(1) { animation-delay: 80ms; }
.stagger > *:nth-child(2) { animation-delay: 160ms; }
.stagger > *:nth-child(3) { animation-delay: 240ms; }
.stagger > *:nth-child(4) { animation-delay: 320ms; }
.stagger > *:nth-child(5) { animation-delay: 400ms; }
.stagger > *:nth-child(6) { animation-delay: 480ms; }
.stagger > *:nth-child(7) { animation-delay: 560ms; }
.stagger > *:nth-child(8) { animation-delay: 640ms; }
.stagger > *:nth-child(9) { animation-delay: 720ms; }
.stagger > *:nth-child(10) { animation-delay: 800ms; }

/* ─── RESPONSIVE ─── */
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .content { padding: 20px 16px; max-height: none; }
  .page-content { padding: 20px 16px; max-height: none; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .content { padding: 16px 12px; max-height: none; }
  .page-content { padding: 16px 12px; max-height: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .content-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .content-header { flex-direction: column; align-items: flex-start; }
}
