/* Grid System - ROA2WEB */

/* Flexbox Grid System */
.flex {
  display: flex;
}
.inline-flex {
  display: inline-flex;
}

/* Flex Direction */
.flex-row {
  flex-direction: row;
}
.flex-col {
  flex-direction: column;
}
.flex-row-reverse {
  flex-direction: row-reverse;
}
.flex-col-reverse {
  flex-direction: column-reverse;
}

/* Flex Wrap */
.flex-wrap {
  flex-wrap: wrap;
}
.flex-nowrap {
  flex-wrap: nowrap;
}

/* Flex Grow/Shrink */
.flex-1 {
  flex: 1 1 0%;
}
.flex-auto {
  flex: 1 1 auto;
}
.flex-none {
  flex: none;
}

/* Justify Content */
.justify-start {
  justify-content: flex-start;
}
.justify-center {
  justify-content: center;
}
.justify-end {
  justify-content: flex-end;
}
.justify-between {
  justify-content: space-between;
}
.justify-around {
  justify-content: space-around;
}
.justify-evenly {
  justify-content: space-evenly;
}

/* Align Items */
.items-start {
  align-items: flex-start;
}
.items-center {
  align-items: center;
}
.items-end {
  align-items: flex-end;
}
.items-stretch {
  align-items: stretch;
}
.items-baseline {
  align-items: baseline;
}

/* CSS Grid */
.grid {
  display: grid;
}
.inline-grid {
  display: inline-grid;
}

/* Grid Template Columns */
.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.grid-cols-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.grid-cols-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.grid-cols-12 {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

/* Grid Column Span */
.col-span-1 {
  grid-column: span 1 / span 1;
}
.col-span-2 {
  grid-column: span 2 / span 2;
}
.col-span-3 {
  grid-column: span 3 / span 3;
}
.col-span-4 {
  grid-column: span 4 / span 4;
}
.col-span-6 {
  grid-column: span 6 / span 6;
}
.col-span-12 {
  grid-column: span 12 / span 12;
}
.col-span-full {
  grid-column: 1 / -1;
}

/* Grid Gap */
.gap-0 {
  gap: 0;
}
.gap-1 {
  gap: var(--space-xs);
}
.gap-2 {
  gap: var(--space-sm);
}
.gap-4 {
  gap: var(--space-md);
}
.gap-6 {
  gap: var(--space-lg);
}
.gap-8 {
  gap: var(--space-xl);
}

.gap-x-0 {
  column-gap: 0;
}
.gap-x-1 {
  column-gap: var(--space-xs);
}
.gap-x-2 {
  column-gap: var(--space-sm);
}
.gap-x-4 {
  column-gap: var(--space-md);
}
.gap-x-6 {
  column-gap: var(--space-lg);
}
.gap-x-8 {
  column-gap: var(--space-xl);
}

.gap-y-0 {
  row-gap: 0;
}
.gap-y-1 {
  row-gap: var(--space-xs);
}
.gap-y-2 {
  row-gap: var(--space-sm);
}
.gap-y-4 {
  row-gap: var(--space-md);
}
.gap-y-6 {
  row-gap: var(--space-lg);
}
.gap-y-8 {
  row-gap: var(--space-xl);
}

/* Dashboard Specific Grids */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.dashboard-v2-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: var(--space-md);
}

.dashboard-v3-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-xl);
}

.dashboard-v4-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

/* Responsive Grid Adjustments */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-v2-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .dashboard-v3-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-v4-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-v2-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(6, 1fr);
  }

  .dashboard-v4-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .dashboard-v2-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(12, auto);
  }
}

/* Auto-fit and Auto-fill Grids */
.grid-auto-fit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
}

.grid-auto-fill {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-md);
}
