// Layout - Grid, row, col, sidebar, responsive

.app-container {
  flex: 1;
  display: flex;
  width: 100%;
}

.main-content {
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: 2rem 2.5rem;
  overflow-y: auto;
  background: var(--bg-primary);
}

.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  padding: 1.5rem;
  overflow-y: auto;
}

// Flex Layout Components
.c-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100%;

  &.justify-between {
    justify-content: space-between;
  }
}

.c-col {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.c-grid {
  display: grid !important;
  width: 100%;
}

// Column spans
.col-span-3 { flex: 0 0 calc(25% - 12px); min-width: 180px; }
.col-span-4 { flex: 0 0 calc(33.333% - 12px); min-width: 220px; }
.col-span-6 { flex: 0 0 calc(50% - 10px); min-width: 280px; }
.col-span-8 { flex: 0 0 calc(66.666% - 8px); min-width: 360px; }
.col-span-12 { flex: 0 0 100%; }

// Responsive
@media (max-width: 1024px) {
  .main-content { padding: 1.5rem; }
  .col-span-3, .col-span-4 { flex: 0 0 calc(50% - 10px); min-width: 180px; }
  .col-span-8 { flex: 0 0 100%; min-width: unset; }
}

@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { padding: 1rem; }
  .col-span-3, .col-span-4, .col-span-6, .col-span-8 { flex: 0 0 100%; min-width: unset; }
  .c-row { flex-direction: column !important; }
}
