/* ============================================================
   VELORA — DASHBOARD CSS
   ============================================================ */

/* LAYOUT */
.dash-body {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: 260px;
  min-height: 100vh;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  transition: transform .3s ease;
}

.sidebar-header {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.sidebar-close { display: none; font-size: 1.2rem; color: var(--text2); }

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1.5rem;
  color: var(--text2);
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all .2s;
  position: relative;
}
.nav-item:hover { color: var(--text); background: var(--card); opacity: 1; }
.nav-item.active {
  color: var(--text);
  background: rgba(147,51,234,.12);
  border-right: 3px solid var(--primary);
}
.nav-item.active svg { stroke: var(--primary); }
.nav-badge {
  background: var(--grad);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: .15rem .45rem;
  border-radius: 50px;
  margin-left: auto;
}

.nav-divider {
  height: 1px;
  background: var(--border);
  margin: .75rem 1.5rem;
}

.sidebar-user {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .75rem;
}
.sidebar-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--grad);
  flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-username { font-size: .875rem; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-role { font-size: .75rem; color: var(--text3); }
.sidebar-logout { color: var(--text3); padding: .25rem; transition: color .2s; }
.sidebar-logout:hover { color: var(--error); }

/* ============================================================
   MAIN AREA
   ============================================================ */
.dash-main {
  flex: 1;
  margin-left: 260px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  background: rgba(7,7,15,.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: .875rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 100;
}
.topbar-menu { display: none; font-size: 1.25rem; color: var(--text2); }
.topbar-back {
  display: flex;
  align-items: center;
  gap: .4rem;
  color: var(--text2);
  font-size: .875rem;
  font-weight: 500;
}
.topbar-search {
  flex: 1;
  max-width: 500px;
  display: flex;
  align-items: center;
  gap: .6rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: .5rem 1rem;
}
.topbar-search svg { color: var(--text3); flex-shrink: 0; }
.topbar-search input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: .875rem;
  width: 100%;
  font-family: inherit;
}
.topbar-search input::placeholder { color: var(--text3); }
.topbar-actions { display: flex; align-items: center; gap: .75rem; margin-left: auto; }
.topbar-icon-btn { position: relative; color: var(--text2); padding: .4rem; }
.icon-badge {
  position: absolute;
  top: 0; right: 0;
  background: var(--error);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.topbar-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
  outline: none;
  overflow: hidden;
  cursor: pointer;
}

/* ============================================================
   CONTENT AREA
   ============================================================ */
.dash-content {
  flex: 1;
  padding: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

/* ============================================================
   STORIES
   ============================================================ */
.stories-section { margin-bottom: 1.5rem; }
.stories-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: .5rem;
  scrollbar-width: none;
}
.stories-scroll::-webkit-scrollbar { display: none; }

.story-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  cursor: pointer;
  flex-shrink: 0;
}
.story-add-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--card);
  border: 2px dashed var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text3);
}
.story-add span { font-size: .75rem; color: var(--text3); }

.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  cursor: pointer;
  flex-shrink: 0;
}
.story-avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  padding: 2px;
  background: var(--grad);
}
.story-a1 { background: linear-gradient(135deg,#9333ea,#ec4899); }
.story-a2 { background: linear-gradient(135deg,#2563eb,#9333ea); }
.story-a3 { background: linear-gradient(135deg,#ec4899,#f59e0b); }
.story-a4 { background: linear-gradient(135deg,#22c55e,#2563eb); }
.story-a5 { background: linear-gradient(135deg,#f59e0b,#ef4444); }
.story-item span { font-size: .75rem; color: var(--text2); }

/* ============================================================
   FEED
   ============================================================ */
.feed-section {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
}
.feed-col { display: flex; flex-direction: column; gap: 1.25rem; }

/* POST CARD */
.post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .3s;
}
.post-card:hover { border-color: var(--border2); }

.post-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.25rem;
}
.post-avatar { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; }
.post-av1 { background: linear-gradient(135deg,#9333ea,#ec4899); }
.post-av2 { background: linear-gradient(135deg,#2563eb,#9333ea); }
.post-meta { flex: 1; }
.post-author { font-weight: 700; font-size: .9rem; color: var(--text); display: block; }
.post-time { font-size: .775rem; color: var(--text3); }
.post-menu { color: var(--text3); font-size: 1.2rem; padding: .25rem; }
.post-text { padding: 0 1.25rem .75rem; font-size: .9rem; color: var(--text2); line-height: 1.6; }

.post-media { position: relative; }
.post-media.locked { height: 280px; overflow: hidden; }
.post-blur {
  position: absolute; inset: 0;
  background: linear-gradient(135deg,rgba(147,51,234,.3),rgba(236,72,153,.3));
  backdrop-filter: blur(20px);
}
.post-lock-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: .75rem; text-align: center; padding: 1.5rem;
}
.post-lock-icon { font-size: 2.5rem; }
.post-lock-overlay p { color: var(--text2); font-size: .9rem; }

.post-img-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.post-img { height: 200px; }
.pi1 { background: linear-gradient(135deg,#3b0764,#9333ea); }
.pi2 { background: linear-gradient(135deg,#831843,#ec4899); }

.post-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.25rem;
  border-top: 1px solid var(--border);
}
.post-action {
  display: flex; align-items: center; gap: .4rem;
  color: var(--text3);
  font-size: .85rem;
  padding: .4rem .75rem;
  border-radius: 50px;
  transition: all .2s;
}
.post-action:hover { background: var(--card); color: var(--text); }
.post-action.liked svg { fill: var(--secondary); stroke: var(--secondary); }
.post-action.liked span { color: var(--secondary); }
.post-tip { margin-left: auto; color: var(--primary); border: 1px solid rgba(147,51,234,.3); }
.post-tip:hover { background: rgba(147,51,234,.1); color: var(--primary); }

/* ============================================================
   FEED SIDEBAR (widgets)
   ============================================================ */
.feed-sidebar { display: flex; flex-direction: column; gap: 1.25rem; }

.widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.widget-title { font-size: .875rem; font-weight: 700; margin-bottom: 1rem; color: var(--text2); text-transform: uppercase; letter-spacing: .05em; }

.creator-suggestion { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.cs-avatar { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; }
.csa1 { background: linear-gradient(135deg,#22c55e,#2563eb); }
.csa2 { background: linear-gradient(135deg,#f59e0b,#ef4444); }
.csa3 { background: linear-gradient(135deg,#ec4899,#9333ea); }
.cs-info { flex: 1; }
.cs-name { font-size: .875rem; font-weight: 600; display: block; }
.cs-subs { font-size: .75rem; color: var(--text3); }

.trend-list { display: flex; flex-direction: column; gap: .4rem; }
.trend-item { font-size: .875rem; color: var(--primary); padding: .3rem 0; }

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.profile-content { padding: 0; max-width: 100%; }

.profile-cover { position: relative; }
.cover-img {
  height: 220px;
  background: linear-gradient(135deg,#1a0533,#3b0764,#4a1259);
}
.profile-avatar-wrap {
  position: absolute;
  bottom: -50px;
  left: 2rem;
  position: relative;
  margin-top: -50px;
  margin-left: 2rem;
  display: inline-block;
}
.profile-avatar {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: var(--grad);
  border: 4px solid var(--bg);
}
.pa-large { width: 100px; height: 100px; }
.profile-verified {
  position: absolute;
  bottom: 4px; right: 4px;
  background: var(--success);
  color: #fff;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 800;
  border: 2px solid var(--bg);
}

.profile-info-section {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  padding: 1.5rem 1.5rem 0;
}
.profile-name { font-size: 1.5rem; font-weight: 800; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.profile-badge {
  font-size: .7rem;
  background: rgba(147,51,234,.15);
  color: var(--primary);
  border: 1px solid rgba(147,51,234,.3);
  padding: .2rem .6rem;
  border-radius: 50px;
  font-weight: 600;
}
.profile-username { color: var(--text3); font-size: .9rem; margin-bottom: .75rem; }
.profile-bio { color: var(--text2); font-size: .9rem; line-height: 1.7; margin-bottom: 1rem; }
.profile-stats-row { display: flex; gap: 2rem; }
.profile-stat { display: flex; flex-direction: column; }
.profile-stat-val { font-size: 1.1rem; font-weight: 800; }
.profile-stat-lbl { font-size: .75rem; color: var(--text3); }

.subscribe-box {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .9rem;
}
.subscribe-price { display: flex; align-items: baseline; gap: .25rem; }
.price-val { font-size: 2rem; font-weight: 900; background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.price-period { color: var(--text3); font-size: .85rem; }
.subscribe-benefits { list-style: none; display: flex; flex-direction: column; gap: .4rem; }
.subscribe-benefits li { font-size: .85rem; color: var(--text2); }

.profile-tabs {
  display: flex;
  gap: 0;
  padding: 1.5rem 1.5rem 0;
  border-bottom: 1px solid var(--border);
}
.ptab {
  padding: .75rem 1.5rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text3);
  border-bottom: 2px solid transparent;
  transition: all .2s;
  margin-bottom: -1px;
}
.ptab:hover { color: var(--text); }
.ptab.active { color: var(--text); border-color: var(--primary); }

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 3px;
  padding: .75rem 1.5rem 1.5rem;
}
.pgrid-item { aspect-ratio: 1; border-radius: 4px; position: relative; overflow: hidden; cursor: pointer; }
.pgrid-item.locked-item { background: var(--bg3); }
.pgrid-blur { position: absolute; inset: 0; background: rgba(147,51,234,.1); backdrop-filter: blur(8px); }
.pgrid-lock {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}
.pg-free { transition: transform .2s; }
.pg-free:hover { transform: scale(1.02); }
.pg1 { background: linear-gradient(135deg,#3b0764,#9333ea); }
.pg2 { background: linear-gradient(135deg,#831843,#ec4899); }

/* ============================================================
   RESPONSIVE DASHBOARD
   ============================================================ */
@media (max-width: 1024px) {
  .feed-section { grid-template-columns: 1fr; }
  .feed-sidebar { display: none; }
  .profile-info-section { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: block; }
  .dash-main { margin-left: 0; }
  .topbar-menu { display: block; }
  .topbar-search { display: none; }
  .profile-grid { grid-template-columns: repeat(2,1fr); }
}
