/**
 * Page Layout - Content Area Structure
 *
 * Page container, headers, cards og grid layouts
 */

/* ===========================================
   PAGE CONTAINER
   =========================================== */
swp-page-container {
  display: block;
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: var(--spacing-6);
}

/* ===========================================
   PAGE HEADER
   =========================================== */
swp-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--spacing-6);
}

swp-page-title h1 {
  font-size: 24px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--spacing-1);
}

swp-page-title p {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
}

swp-page-actions {
  display: flex;
  gap: var(--spacing-2);
}

/* ===========================================
   CARDS
   =========================================== */
swp-card {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  margin-bottom: var(--spacing-5);
}

swp-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-4) var(--spacing-5);
  border-bottom: 1px solid var(--color-border);
}

swp-card-title {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-text);
}

swp-card-title i {
  font-size: 20px;
  color: var(--color-text-secondary);
}

swp-card-action {
  font-size: var(--font-size-md);
  color: var(--color-teal);
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

swp-card-action:hover {
  opacity: 0.8;
}

swp-card-content {
  padding: var(--spacing-5);
}

/* ===========================================
   DASHBOARD GRID
   =========================================== */
swp-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: var(--spacing-5);
}

swp-main-column {
  display: flex;
  flex-direction: column;
}

swp-side-column {
  display: flex;
  flex-direction: column;
}

/* ===========================================
   AI INSIGHT
   =========================================== */
swp-ai-insight {
  display: block;
  padding: var(--spacing-4) var(--spacing-5);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--color-purple) 8%, transparent),
    color-mix(in srgb, var(--color-teal) 8%, transparent)
  );
  border-radius: var(--border-radius);
}

swp-ai-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  margin-bottom: var(--spacing-2);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-purple);
}

swp-ai-header i {
  font-size: 16px;
}

swp-ai-text {
  font-size: var(--font-size-base);
  color: var(--color-text);
  line-height: var(--line-height-relaxed);
}

/* ===========================================
   QUICK ACTIONS
   =========================================== */
swp-quick-actions {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2);
}

swp-quick-action-btn {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  padding: var(--spacing-3);
  font-size: var(--font-size-base);
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--transition-fast);
}

swp-quick-action-btn:hover {
  background: var(--color-background-hover);
  border-color: var(--color-teal);
  color: var(--color-teal);
}

swp-quick-action-btn i {
  font-size: 18px;
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 1200px) {
  swp-dashboard-grid {
    grid-template-columns: 1fr;
  }

  swp-side-column {
    order: -1;
  }
}

@media (max-width: 768px) {
  swp-page-container {
    padding: var(--spacing-4);
  }

  swp-page-header {
    flex-direction: column;
    gap: var(--spacing-4);
  }

  swp-page-actions {
    width: 100%;
  }
}
