/* ============================================================
   LAYOUT.CSS — Sidebar, Topbar, Main Content Structure
   ============================================================ */

/* ── App Shell ── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-deep);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  transition: var(--transition-slow);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.sidebar-mode-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-faint);
  padding: 16px 24px 4px;
}

/* ── Sidebar Nav ── */
.sidebar-nav {
  flex: 1;
  padding: 8px 0;
  overflow-y: auto;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 24px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  border-left: 3px solid transparent;
  transition: var(--transition);
}
.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.03);
}
.nav-link.active {
  color: var(--accent);
  background: rgba(249, 115, 22, 0.08);
  border-left-color: var(--accent);
}

/* Mode-specific active colours */
.sidebar.fantasy-mode .nav-link.active {
  color: var(--fantasy-primary);
  background: var(--fantasy-bg);
  border-left-color: var(--fantasy-primary);
}
.sidebar.auction-mode .nav-link.active {
  color: var(--auction-primary);
  background: var(--auction-bg);
  border-left-color: var(--auction-primary);
}
.sidebar.trading-mode .nav-link.active {
  color: var(--trading-primary);
  background: var(--trading-bg);
  border-left-color: var(--trading-primary);
}

.nav-link .nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}
.nav-link.active .nav-icon { opacity: 1; }

/* ── Sidebar Footer ── */
.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: white;
  flex-shrink: 0;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.sidebar-user-role {
  font-size: 10px;
  color: var(--text-faint);
  text-transform: uppercase;
}

/* ── Main Content ── */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  flex: 1;
}

/* ── Top Bar ── */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--topbar-height);
  background: var(--bg-base);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
}

.topbar-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-faint);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-balance {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--auction-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
}

.topbar-icon-btn {
  width: 36px;
  height: 36px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
  cursor: pointer;
}
.topbar-icon-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

/* ── Page Content Area ── */
.page-content {
  padding-top: var(--topbar-height);
  min-height: 100vh;
}

.page-inner {
  padding: 32px;
  max-width: 1400px;
}

/* ── Two Panel (fantasy picker) ── */
.two-panel {
  display: flex;
  height: calc(100vh - var(--topbar-height));
}
.two-panel .left-panel {
  flex: 1;
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
.two-panel .right-panel {
  width: 360px;
  background: var(--bg-surface);
  overflow-y: auto;
  flex-shrink: 0;
}

/* ── Focus Bar (fantasy) ── */
.focus-bar {
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 80px;
  display: flex;
  align-items: center;
  gap: 48px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.focus-metric { display: flex; flex-direction: column; gap: 4px; }
.focus-label  {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
}
.focus-value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--success);
}
.focus-suffix {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  align-self: flex-end;
  margin-bottom: 4px;
}

.roster-dots {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}
.roster-dot {
  width: 14px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--bg-input);
}
.roster-dot.filled { background: var(--fantasy-primary); }

/* ── Market Ticker ── */
.market-ticker {
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: var(--ticker-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 50;
}

.ticker-left  { display: flex; align-items: center; gap: 24px; }
.ticker-right { display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

.ticker-item  { display: flex; align-items: center; gap: 10px; }
.ticker-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.ticker-value { font-family: var(--font-mono); font-size: 13px; font-weight: 700; }
.ticker-value.pos { color: var(--success); }
.ticker-value.neg { color: var(--danger); }
.ticker-badge { font-size: 11px; font-family: var(--font-mono); padding: 2px 6px; border-radius: 2px; }
.ticker-badge.pos { background: var(--success-bg); color: var(--success); }
.ticker-badge.neg { background: var(--danger-bg); color: var(--danger); }
.ticker-divider { width: 1px; height: 16px; background: var(--border); }

/* ── Stats Grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}
.stats-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ── Full-page overlay (landing) ── */
.full-page {
  min-height: 100vh;
  background: var(--bg-base);
}
