/* dashboard.css — Member portal sidebar + sections + glass cards */

:root {
  --dash-sidebar-w: 240px;
  --dash-topbar-h: 72px;
}

/* ─── LAYOUT ───────────────────────────────────────────── */

.dash-layout {
  min-height: 100vh;
  padding-top: 72px;
  background: #000;
}

.dash-container {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - 72px);
}

/* ─── SIDEBAR ──────────────────────────────────────────── */

.dash-sidebar {
  width: var(--dash-sidebar-w);
  flex-shrink: 0;
  background: #0a0a0a;
  border-right: 1px solid #1e1e28;
  padding: 28px 0;
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow-y: auto;
}

.sidebar-section {
  padding: 0 20px 24px;
  border-bottom: 1px solid #1e1e28;
  margin-bottom: 8px;
}

.sidebar-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(139,92,246,0.4), rgba(139,92,246,0.15));
  border: 2px solid rgba(139,92,246,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: #8B5CF6;
  margin: 0 auto 10px;
  overflow: hidden;
}
.sidebar-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-avatar.fan { background: linear-gradient(135deg, rgba(192,192,192,0.3), rgba(192,192,192,0.1)); border-color: rgba(192,192,192,0.3); color: #C0C0C0; }

.sidebar-name { font-weight: 700; font-size: 1rem; text-align: center; color: #fff; }
.sidebar-role { font-size: 0.75rem; color: #55556a; text-align: center; margin-top: 2px; }

.sidebar-nav { padding: 8px 0; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #b8b8c8;
  text-decoration: none;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}
.sidebar-link:hover {
  color: #fff;
  background: rgba(139,92,246,0.08);
}
.sidebar-link.active {
  color: #8B5CF6;
  border-left-color: #8B5CF6;
  background: rgba(139,92,246,0.1);
}

/* ─── MAIN CONTENT ─────────────────────────────────────── */

.dash-main {
  flex: 1;
  min-width: 0;
  padding: 0 40px 60px;
}

/* Top bar */
.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 0 20px;
  gap: 20px;
}

.dash-welcome h1 { font-size: 1.6rem; font-weight: 800; color: #fff; }
.dash-welcome p { margin-top: 4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dash-top-actions { display: flex; gap: 10px; align-items: center; }

/* Stats bar */
.stats-bar {
  display: flex;
  border: 1px solid #1e1e28;
  border-radius: 12px;
  background: #111115;
  overflow: hidden;
  margin-bottom: 8px;
}

.stat-item {
  flex: 1;
  text-align: center;
  padding: 18px 8px;
}

.stat-value { font-size: 1.6rem; font-weight: 800; color: #fff; }
.stat-label { font-size: 0.7rem; color: #55556a; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; }
.stat-divider { width: 1px; background: #1e1e28; }

/* Sections */
.dash-section { padding: 32px 0; border-bottom: 1px solid #1e1e28; }
.dash-section:last-child { border-bottom: none; }

.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-title { font-size: 1.1rem; font-weight: 700; }
.section-count { font-size: 0.8rem; color: #55556a; }

/* ─── GLASS CARDS ──────────────────────────────────────── */

.glass-card {
  background: #111115;
  border: 1px solid #1e1e28;
  border-radius: 12px;
  overflow: hidden;
}

.glass-card-header {
  padding: 14px 20px;
  border-bottom: 1px solid #1e1e28;
  font-size: 0.85rem;
  font-weight: 600;
  color: #b8b8c8;
}

/* ─── ANALYTICS ────────────────────────────────────────── */

.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 16px;
}

.analytics-chart-card { padding: 20px; }

.analytics-stats-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stat-card { padding: 16px; }
.stat-card-label { font-size: 0.75rem; color: #55556a; text-transform: uppercase; letter-spacing: 0.06em; }
.stat-card-value { font-size: 1.5rem; font-weight: 800; color: #fff; margin-top: 4px; }

/* ─── POSTS ────────────────────────────────────────────── */

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.post-card { display: flex; flex-direction: column; }
.post-video { background: #18181f; min-height: 160px; display: flex; align-items: center; justify-content: center; }
.post-video iframe { width: 100%; height: 160px; border: none; }
.post-placeholder { font-size: 2rem; }
.post-info { padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.post-title { font-weight: 700; font-size: 0.9rem; }
.post-meta { font-size: 0.8rem; color: #55556a; }
.post-delete-btn {
  font-size: 0.75rem;
  color: #55556a;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  padding: 0;
  margin-top: 4px;
}
.post-delete-btn:hover { color: #ef4444; }

/* ─── FOLLOWERS ─────────────────────────────────────────── */

.followers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.follower-card {
  padding: 20px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.follower-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(139,92,246,0.3), rgba(139,92,246,0.1));
  border: 2px solid rgba(139,92,246,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: #8B5CF6;
  overflow: hidden;
}
.follower-avatar img { width: 100%; height: 100%; object-fit: cover; }

.follower-name { font-weight: 700; font-size: 0.875rem; }
.follower-meta { font-size: 0.75rem; color: #55556a; }

/* ─── EVENTS ───────────────────────────────────────────── */

.events-list { display: flex; flex-direction: column; gap: 10px; }

.event-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
}

.event-date-badge {
  width: 52px;
  height: 52px;
  background: #18181f;
  border: 1px solid #1e1e28;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.event-row-title { font-weight: 700; font-size: 0.95rem; }
.event-row-meta { font-size: 0.8rem; color: #55556a; margin-top: 2px; }

.event-status-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(139,92,246,0.1);
  color: #8B5CF6;
  border: 1px solid rgba(139,92,246,0.2);
  white-space: nowrap;
}
.event-status-badge.open { background: rgba(34,197,94,0.1); color: #22c55e; border-color: rgba(34,197,94,0.2); }
.event-status-badge.closed { background: rgba(255,255,255,0.04); color: #55556a; border-color: #1e1e28; }

.rsvp-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(34,197,94,0.15);
  color: #22c55e;
  border: 1px solid rgba(34,197,94,0.3);
  white-space: nowrap;
}

/* ─── INCOME ───────────────────────────────────────────── */

.income-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.income-card {
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.income-icon { font-size: 2rem; }
.income-value { font-size: 1.6rem; font-weight: 800; color: #fff; }
.income-label { font-size: 0.85rem; font-weight: 600; color: #b8b8c8; }
.income-sub { font-size: 0.75rem; color: #55556a; }

/* ─── MERCH INVENTORY ──────────────────────────────────── */

.merch-inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.merch-item-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.merch-item-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  background: #18181f;
}

.merch-item-placeholder {
  width: 100%;
  height: 120px;
  border-radius: 8px;
  background: #18181f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.merch-item-info { width: 100%; }
.merch-item-name { font-weight: 700; font-size: 0.875rem; }
.merch-item-price { font-size: 1rem; font-weight: 800; color: #8B5CF6; }
.merch-item-category { font-size: 0.7rem; color: #55556a; text-transform: uppercase; letter-spacing: 0.06em; }

/* ─── STREAMS ──────────────────────────────────────────── */

.streams-list { display: flex; flex-direction: column; gap: 10px; }

.stream-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
}

.stream-row-title { font-weight: 700; font-size: 0.95rem; }
.stream-row-meta { font-size: 0.8rem; color: #55556a; margin-top: 2px; }

/* ─── LIVE BADGES ──────────────────────────────────────── */

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(239,68,68,0.15);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,0.3);
  animation: pulse-red 1.5s infinite;
}

.live-badge-sm {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(239,68,68,0.15);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,0.3);
}

.stage-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(139,92,246,0.15);
  color: #8B5CF6;
  border: 1px solid rgba(139,92,246,0.2);
}

/* ─── FEED ─────────────────────────────────────────────── */

.feed-list { display: flex; flex-direction: column; gap: 16px; }

.feed-card { padding: 20px; }

.feed-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.feed-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(139,92,246,0.3), rgba(139,92,246,0.1));
  border: 1px solid rgba(139,92,246,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: #8B5CF6;
  overflow: hidden;
  flex-shrink: 0;
}
.feed-avatar img { width: 100%; height: 100%; object-fit: cover; }

.feed-name { font-weight: 700; font-size: 0.9rem; color: #fff; text-decoration: none; }
.feed-name:hover { color: #8B5CF6; }
.feed-date { font-size: 0.75rem; color: #55556a; margin-top: 2px; }

.feed-video { margin: 12px 0; border-radius: 8px; overflow: hidden; }
.feed-video iframe { width: 100%; height: 200px; border: none; }

.feed-content { margin-bottom: 12px; }
.feed-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; }
.feed-description { font-size: 0.85rem; color: #b8b8c8; line-height: 1.5; }

.feed-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #1e1e28;
  padding-top: 12px;
}

.feed-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #55556a;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s;
}
.feed-action-btn:hover { color: #fff; background: rgba(255,255,255,0.05); }
.feed-action-btn.liked { color: #ef4444; }

/* ─── BUTTONS ──────────────────────────────────────────── */

.btn-primary {
  background: #8B5CF6;
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
  text-decoration: none;
}
.btn-primary:hover { background: #6d42d9; }

.btn-secondary {
  background: rgba(139,92,246,0.15);
  color: #8B5CF6;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid rgba(139,92,246,0.3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-secondary:hover { background: rgba(139,92,246,0.25); }

.btn-ghost {
  background: transparent;
  color: #b8b8c8;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid #1e1e28;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.2); color: #fff; }

.btn-ghost-sm {
  background: rgba(255,255,255,0.04);
  color: #b8b8c8;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid #1e1e28;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-ghost-sm:hover { border-color: rgba(255,255,255,0.15); color: #fff; }

.btn-danger {
  background: rgba(239,68,68,0.15);
  color: #ef4444;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid rgba(239,68,68,0.3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }

.btn-live {
  background: #ef4444;
  color: white;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}
.btn-live:hover { background: #dc2626; }

/* ─── EMPTY STATE ──────────────────────────────────────── */

.empty-state {
  padding: 60px 40px;
  text-align: center;
}
.empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 1.1rem; font-weight: 700; color: #b8b8c8; margin-bottom: 8px; }
.empty-state p { font-size: 0.875rem; color: #55556a; }

/* ─── FORM ─────────────────────────────────────────────── */

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.8rem; font-weight: 600; color: #b8b8c8; }
.form-group input,
.form-group select,
.form-group textarea {
  background: #18181f;
  border: 1px solid #1e1e28;
  border-radius: 8px;
  color: #fff;
  font-size: 0.875rem;
  padding: 10px 12px;
  width: 100%;
  transition: border-color 0.2s;
  font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(139,92,246,0.5);
}
.form-group textarea { resize: vertical; }

.form-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 8px;
  color: #ef4444;
  font-size: 0.85rem;
  padding: 10px 14px;
  margin: 10px 0;
}

.form-success {
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  color: #22c55e;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

/* ─── GO LIVE MODAL ────────────────────────────────────── */

.go-live-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.go-live-modal-overlay.open { display: flex; }

.go-live-modal {
  background: #111115;
  border: 1px solid #1e1e28;
  border-radius: 16px;
  padding: 32px;
  width: 460px;
  max-width: 90vw;
  position: relative;
}
.go-live-modal h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: 8px; }
.go-live-modal p { font-size: 0.875rem; color: #b8b8c8; margin-bottom: 20px; line-height: 1.5; }
.go-live-form { display: flex; flex-direction: column; gap: 14px; }
.go-live-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: #55556a;
  font-size: 1.5rem;
  cursor: pointer;
}
.go-live-modal-close:hover { color: #fff; }

.go-live-error {
  display: none;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 8px;
  color: #ef4444;
  font-size: 0.85rem;
  padding: 10px 14px;
}
.go-live-error.show { display: block; }

.go-live-btn {
  background: #ef4444;
  color: white;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s;
}
.go-live-btn:hover { background: #dc2626; }
.go-live-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ─── ANIMATIONS ──────────────────────────────────────── */

@keyframes pulse-red {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ─── RESPONSIVE ───────────────────────────────────────── */

@media (max-width: 900px) {
  .dash-sidebar {
    width: 200px;
  }
  .analytics-grid {
    grid-template-columns: 1fr;
  }
  .income-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .dash-container {
    flex-direction: column;
  }

  .dash-sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid #1e1e28;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 16px;
  }

  .sidebar-section {
    border-bottom: none;
    margin-right: 16px;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .sidebar-avatar { width: 40px; height: 40px; font-size: 1rem; margin: 0; }
  .sidebar-name, .sidebar-role { display: none; }

  .sidebar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0;
  }

  .sidebar-link {
    padding: 6px 12px;
    font-size: 0.75rem;
    border-left: none;
    border-radius: 6px;
  }

  .dash-main {
    padding: 0 20px 40px;
  }

  .stats-bar {
    flex-wrap: wrap;
    border-radius: 8px;
  }

  .stat-item {
    min-width: 50%;
    border-bottom: 1px solid #1e1e28;
  }

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

  .followers-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .dash-topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ─── AVATAR UPLOAD ──────────────────────────────────────── */

.avatar-upload-btn {
  font-size: 0.7rem;
  color: #b8b8c8;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #1e1e28;
  transition: all 0.2s;
  text-align: center;
  margin-top: 2px;
  display: inline-block;
  width: fit-content;
}
.avatar-upload-btn:hover {
  background: rgba(139,92,246,0.15);
  color: #8B5CF6;
  border-color: rgba(139,92,246,0.3);
}

/* ─── POST TYPE TABS ─────────────────────────────────────── */

.post-type-tabs { margin-bottom: 8px; }
.post-type-tab {
  background: transparent;
  border: 1px solid #1e1e28;
  color: #b8b8c8;
  padding: 6px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}
.post-type-tab.active {
  background: rgba(139,92,246,0.2);
  color: #8B5CF6;
  border-color: rgba(139,92,246,0.4);
}
.post-type-tab:hover:not(.active) {
  background: rgba(255,255,255,0.05);
}

.sidebar-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: rgba(139, 92, 246, 0.25);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: var(--purple);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 10px;
  min-width: 22px;
  text-align: center;
}