/* frontend/css/layout.css */

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top Navigation */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .1rem 2rem;
  background-color: rgba(15, 23, 42, 0.95); 
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
}

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  height: 80px;
  width: 80px;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.2s;
}

.brand a:hover img {
  transform: scale(1.05);
}

.user-menu {
  cursor: pointer;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- DROPDOWN MENU STYLES --- */
.user-menu.dropdown {
  position: relative;
  display: inline-block;
}

.btn-text {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem;
  transition: color 0.2s;
}

.btn-text:hover {
  color: var(--primary);
}

.caret {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 5px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  min-width: 200px;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  z-index: 1000;
  transform-origin: top right;
  animation: scaleIn 0.1s ease-out;
}

.dropdown-menu a {
  display: block;
  padding: 12px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.1s;
}

.dropdown-menu a:hover {
  background-color: var(--bg-alt);
  color: var(--primary);
}

.menu-divider {
  height: 1px;
  background-color: var(--border);
  margin: 4px 0;
}

@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Dashboard Content */
.dashboard-content {
  max-width: 1400px; /* Wider to accommodate the 3-column layouts */
  margin: 0 auto;
  width: 100%;
  padding: 2rem;
  flex: 1;
}

.hero-text {
  text-align: center;
  margin-bottom: 3rem;
  margin-top: 1rem;
}

.hero-text h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

/* =========================
   12-COLUMN GRID SYSTEM
========================= */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr; /* Mobile default */
  gap: 1.5rem;
  margin-bottom: 3rem;
}

/* Section Headers (e.g., "Find Media", "Bot Network") */
.section-title {
  grid-column: 1 / -1;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

@media (min-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: repeat(12, 1fr);
  }

  /* Span Utilities */
  .span-3 { grid-column: span 3; } /* 4 items per row */
  .span-4 { grid-column: span 4; } /* 3 items per row */
  .span-6 { grid-column: span 6; } /* 2 items per row */
  .span-8 { grid-column: span 8; } /* 2/3rds width */
}

.footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  background-color: var(--bg-alt);
}