/* ═══════════════════════════════════════════════════════════════════════════
   SHARENOX — Trader Social Platform  v3.0
   Professional, Instagram-grade UI for investors & traders
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --bg:           #f0f2f5;
  --card:         #ffffff;
  --card2:        #f8f9fb;
  --accent:       #0a66c2;
  --accent-2:     #004182;
  --accent-glow:  rgba(10,102,194,0.12);
  --accent-light: #e8f0fe;
  --green:        #00875a;
  --green-light:  #e6f4ef;
  --red:          #c0392b;
  --red-light:    #fdecea;
  --gold:         #f4b400;
  --gold-light:   #fff8e1;
  --text:         #111827;
  --text2:        #374151;
  --text3:        #6b7280;
  --text4:        #9ca3af;
  --border:       #e5e7eb;
  --border2:      #d1d5db;
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow:       0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg:    0 10px 30px rgba(0,0,0,0.14);
  --radius-sm:    8px;
  --radius:       12px;
  --radius-lg:    18px;
  --radius-full:  999px;
  --sans:         "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono:         "SF Mono", "Cascadia Code", monospace;
  --topbar-h:     62px;
  --sidebar-w:    260px;
}

/* ─── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
body { font-family: var(--sans); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: var(--sans); cursor: pointer; border: none; }
img { max-width: 100%; display: block; }
input, textarea, select { font-family: var(--sans); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
.hidden { display: none !important; }

/* ─── TOPBAR ───────────────────────────────────────────────────── */
.vyram-topbar {
  position: sticky; top: 0; z-index: 1000;
  background: #fff; border-bottom: 1px solid var(--border);
  height: var(--topbar-h); display: flex; align-items: center;
  padding: 0 20px; gap: 14px; box-shadow: var(--shadow-sm);
}
.vyram-topbar .left { flex-shrink: 0; display: flex; align-items: center; }
.vyram-topbar .center { flex: 1; max-width: 500px; margin: 0 auto; }
.vyram-topbar .right { flex-shrink: 0; display: flex; align-items: center; gap: 6px; margin-left: auto; }

.topbar-search { position: relative; width: 100%; }
.topbar-search input {
  width: 100%; padding: 9px 16px 9px 40px;
  border: 1.5px solid var(--border); border-radius: var(--radius-full);
  background: var(--bg); font-size: 14px; color: var(--text); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.topbar-search input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--accent-glow); }
.topbar-search input::placeholder { color: var(--text4); }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 16px; cursor: pointer; color: var(--text3); }

.top-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 13px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; color: var(--text2);
  background: transparent; transition: background 0.18s, color 0.18s; white-space: nowrap; position: relative;
}
.top-btn:hover { background: var(--bg); color: var(--accent); }
.top-btn.ai-btn {
  background: linear-gradient(135deg, #0a66c2, #6c3fc5);
  color: #fff; border-radius: var(--radius-full); padding: 7px 15px;
}
.top-btn.ai-btn:hover { opacity: 0.9; background: linear-gradient(135deg, #0a66c2, #6c3fc5); }

.avatar-small {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--border); cursor: pointer; transition: border-color 0.2s;
}
.avatar-small:hover { border-color: var(--accent); }

/* ─── PAGE LAYOUT ──────────────────────────────────────────────── */
.pageLayout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr 300px;
  gap: 20px; max-width: 1180px; margin: 20px auto; padding: 0 16px; align-items: start;
}

/* ─── LEFT SIDEBAR ─────────────────────────────────────────────── */
.leftSidebar { position: sticky; top: calc(var(--topbar-h) + 16px); }
.leftProfile {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden; border: 1px solid var(--border);
}
.leftProfile-cover { height: 60px; background: linear-gradient(135deg, #0a66c2, #6c3fc5); }
.leftProfile-body { padding: 0 16px 16px; text-align: center; margin-top: -28px; }
.leftAvatar {
  width: 56px; height: 56px; border-radius: 50%; border: 3px solid #fff;
  object-fit: cover; background: var(--accent); display: block; margin: 0 auto 10px;
}
.leftProfile #leftName { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.leftProfile #leftEmail { font-size: 12px; color: var(--text3); margin-bottom: 12px; display: block; }
.leftProfile-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: var(--border); margin: 0 -16px 12px;
}
.leftProfile-stat { background: var(--card); padding: 10px 8px; text-align: center; }
.leftProfile-stat .n { font-size: 16px; font-weight: 700; color: var(--accent); display: block; }
.leftProfile-stat .l { font-size: 11px; color: var(--text3); }
.editProfileBtn {
  width: 100%; padding: 8px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; background: var(--accent-light); color: var(--accent); transition: background 0.2s;
}
.editProfileBtn:hover { background: var(--accent); color: #fff; }

.left-nav {
  margin-top: 12px; background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); border: 1px solid var(--border); overflow: hidden;
}
.left-nav-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px;
  font-size: 14px; font-weight: 500; color: var(--text2); cursor: pointer;
  transition: background 0.15s, color 0.15s; border-bottom: 1px solid var(--border);
}
.left-nav-item:last-child { border-bottom: none; }
.left-nav-item:hover { background: var(--bg); color: var(--accent); }
.left-nav-item.active { color: var(--accent); background: var(--accent-light); font-weight: 600; }
.left-nav-icon { font-size: 18px; width: 24px; text-align: center; }

/* ─── MAIN FEED ────────────────────────────────────────────────── */
.mainFeed { min-width: 0; display: flex; flex-direction: column; gap: 12px; }

/* ─── STORIES ──────────────────────────────────────────────────── */
.stories-wrapper {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); border: 1px solid var(--border); padding: 14px 16px;
}
.stories-scroll {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none;
}
.stories-scroll::-webkit-scrollbar { display: none; }
.story-bubble { display: flex; flex-direction: column; align-items: center; gap: 5px; flex-shrink: 0; cursor: pointer; }
.story-ring { width: 60px; height: 60px; border-radius: 50%; padding: 2.5px; background: linear-gradient(135deg, #f9a825, #e91e8c, #0a66c2); }
.story-ring.seen { background: var(--border2); }
.story-ring-inner {
  width: 100%; height: 100%; border-radius: 50%; border: 2.5px solid #fff;
  overflow: hidden; background: var(--accent); display: flex; align-items: center;
  justify-content: center; color: #fff; font-weight: 700; font-size: 18px;
}
.story-ring-inner img { width: 100%; height: 100%; object-fit: cover; }
.story-name { font-size: 11px; color: var(--text3); max-width: 64px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story-add-btn { display: flex; flex-direction: column; align-items: center; gap: 5px; flex-shrink: 0; cursor: pointer; }
.story-add-circle {
  width: 60px; height: 60px; border-radius: 50%; border: 2px dashed var(--border2);
  display: flex; align-items: center; justify-content: center; font-size: 26px;
  color: var(--accent); transition: border-color 0.2s, background 0.2s;
}
.story-add-btn:hover .story-add-circle { border-color: var(--accent); background: var(--accent-light); }

/* ─── COMPOSE CARD ─────────────────────────────────────────────── */
.compose-card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); border: 1px solid var(--border); padding: 16px;
}
.compose-head { display: flex; gap: 10px; align-items: flex-start; }
.compose-avatar {
  width: 42px; height: 42px; border-radius: 50%; background: var(--accent);
  color: #fff; font-size: 17px; font-weight: 700; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden;
}
.compose-avatar img { width: 100%; height: 100%; object-fit: cover; }
.compose-area { flex: 1; }
.compose-text {
  width: 100%; min-height: 70px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px;
  resize: vertical; outline: none; transition: border-color 0.2s, box-shadow 0.2s; background: var(--bg);
}
.compose-text:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--accent-glow); }
.compose-text::placeholder { color: var(--text4); }
.compose-url {
  width: 100%; margin-top: 8px; padding: 8px 12px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 13px; outline: none; color: var(--text2); background: var(--bg); transition: border-color 0.2s;
}
.compose-url:focus { border-color: var(--accent); }
.compose-url::placeholder { color: var(--text4); }
.compose-actions { display: flex; align-items: center; justify-content: flex-end; margin-top: 10px; gap: 8px; flex-wrap: wrap; }
.compose-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.feed-filter-select {
  padding: 6px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  font-size: 13px; background: var(--bg); color: var(--text2); outline: none; cursor: pointer;
}
.feed-filter-input {
  padding: 6px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  font-size: 13px; background: var(--bg); color: var(--text2); outline: none;
}
.feed-filter-input:focus { border-color: var(--accent); }

/* ─── TOOLS BAR ────────────────────────────────────────────────── */
.composer-tools {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 0 0; border-top: 1px solid var(--border); margin-top: 10px;
}
.tool-btn {
  display: flex; align-items: center; gap: 5px; padding: 6px 10px;
  border-radius: var(--radius-sm); font-size: 12.5px; font-weight: 500;
  color: var(--text3); background: none; transition: background 0.15s, color 0.15s;
}
.tool-btn:hover { background: var(--bg); color: var(--accent); }
.tool-icon { width: 16px; height: 16px; }

/* ─── BUTTONS ──────────────────────────────────────────────────── */
.button {
  padding: 7px 16px; border-radius: var(--radius-sm); font-size: 13px;
  font-weight: 500; color: var(--text2); background: var(--bg);
  border: 1px solid var(--border); transition: all 0.15s; cursor: pointer;
}
.button:hover { background: var(--border); }
.button:disabled { opacity: 0.5; cursor: not-allowed; }
.button-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.button-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.coauthor { background: linear-gradient(135deg, #6c3fc5, #0a66c2); color: #fff; border: none; }
.coauthor:hover { opacity: 0.9; }

/* ─── POST CARD ────────────────────────────────────────────────── */
.postCard {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  overflow: hidden; transition: box-shadow 0.2s;
}
.postCard:hover { box-shadow: var(--shadow); }

.postHeader { display: flex; align-items: flex-start; padding: 14px 16px 0; gap: 10px; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; background: var(--accent);
  color: #fff; font-size: 17px; font-weight: 700; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; cursor: pointer;
}
.avatar:hover { opacity: 0.85; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.meta { flex: 1; min-width: 0; }
.username { font-size: 14.5px; font-weight: 600; color: var(--text); cursor: pointer; }
.username:hover { color: var(--accent); }
.user-sub { font-size: 12px; color: var(--text3); display: block; margin-top: 1px; }
.meta-line { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.timestamp { font-size: 12px; color: var(--text4); }

/* Post menu */
.post-menu-wrap { margin-left: auto; position: relative; }
.post-menu-btn { padding: 4px 8px; border-radius: 6px; background: none; color: var(--text3); font-size: 18px; line-height: 1; transition: background 0.15s; }
.post-menu-btn:hover { background: var(--bg); }
.post-dropdown {
  position: absolute; right: 0; top: calc(100% + 4px); background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); min-width: 160px; z-index: 100; overflow: hidden;
}
.post-dropdown-item {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  font-size: 13.5px; color: var(--text2); cursor: pointer; transition: background 0.12s;
}
.post-dropdown-item:hover { background: var(--bg); }
.post-dropdown-item.danger { color: var(--red); }
.post-dropdown-item.danger:hover { background: var(--red-light); }

.postText {
  padding: 10px 16px 12px; font-size: 14.5px; line-height: 1.6;
  color: var(--text); white-space: pre-wrap; word-break: break-word;
}
.postText .hashtag { color: var(--accent); font-weight: 500; cursor: pointer; }
.postText .mention { color: var(--accent); font-weight: 500; cursor: pointer; }
.postImage { width: 100%; max-height: 560px; object-fit: cover; cursor: pointer; }
.postVideo { width: 100%; max-height: 480px; background: #000; display: block; }

/* Article preview */
.article-preview {
  margin: 8px 16px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden; cursor: pointer; transition: box-shadow 0.2s;
}
.article-preview:hover { box-shadow: var(--shadow); }
.article-preview-body { padding: 12px 14px; }
.article-preview-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.article-preview-text { font-size: 13px; color: var(--text3); }

/* Reactions summary */
.reactions-summary {
  display: flex; align-items: center; gap: 4px; padding: 8px 16px;
  border-top: 1px solid var(--border); font-size: 13px; color: var(--text3);
}
.reaction-chip {
  display: inline-flex; align-items: center; gap: 3px; font-size: 12px;
  padding: 2px 6px; border-radius: var(--radius-full);
  background: var(--bg); border: 1px solid var(--border);
}

/* Action row */
.action-row {
  display: flex; align-items: center; padding: 4px 8px;
  border-top: 1px solid var(--border); gap: 2px;
}
.action-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 8px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500;
  color: var(--text3); background: none; transition: background 0.15s, color 0.15s;
}
.action-btn:hover { background: var(--bg); color: var(--accent); }
.action-btn.liked { color: var(--accent); }
.action-btn.saved { color: var(--gold); }

/* Reaction picker */
.reaction-picker-wrap { position: relative; }
.reaction-picker {
  position: absolute; bottom: calc(100% + 6px); left: 0; display: flex; gap: 4px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-full);
  padding: 6px 10px; box-shadow: var(--shadow); z-index: 50; white-space: nowrap;
}
.reaction-option { font-size: 22px; cursor: pointer; line-height: 1; padding: 2px; border-radius: 50%; transition: transform 0.15s; }
.reaction-option:hover { transform: scale(1.35); }

/* Comments */
.comments-section {
  border-top: 1px solid var(--border); padding: 0 16px 12px; background: var(--card2);
}
.comment-input-row { display: flex; gap: 8px; align-items: center; padding-top: 10px; }
.comment-input {
  flex: 1; padding: 8px 14px; border-radius: var(--radius-full); border: 1.5px solid var(--border);
  font-size: 13.5px; outline: none; background: #fff; transition: border-color 0.2s;
}
.comment-input:focus { border-color: var(--accent); }
.comment-submit {
  padding: 7px 14px; border-radius: var(--radius-full); background: var(--accent);
  color: #fff; font-size: 13px; font-weight: 600;
}
.comment-submit:hover { background: var(--accent-2); }
.comment-item { display: flex; gap: 9px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.comment-item:last-child { border-bottom: none; }
.comment-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent);
  color: #fff; font-size: 13px; font-weight: 700; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden;
}
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-body { flex: 1; min-width: 0; }
.comment-username { font-size: 13px; font-weight: 600; color: var(--text); }
.comment-text { font-size: 13.5px; color: var(--text2); margin-top: 2px; line-height: 1.45; }
.comment-time { font-size: 11.5px; color: var(--text4); margin-top: 3px; }
.comment-actions { display: flex; gap: 10px; margin-top: 4px; }
.comment-action-btn { font-size: 12px; color: var(--text3); background: none; padding: 0; transition: color 0.15s; }
.comment-action-btn:hover { color: var(--accent); }

/* AI Output */
#coauthorOutput { background: #eef6ff; border-left: 4px solid var(--accent); padding: 14px; border-radius: var(--radius-sm); margin-top: 14px; font-size: 14px; line-height: 1.6; color: var(--text); }
#aiAgentOutput { background: #eaf7ea; border-left: 4px solid var(--green); padding: 14px; border-radius: var(--radius-sm); margin-top: 14px; font-size: 14px; line-height: 1.6; }
.agent-box { background: #eaf7ea; border-left: 4px solid var(--green); padding: 14px; border-radius: var(--radius-sm); margin-top: 12px; font-size: 14px; line-height: 1.6; }

/* Feed container */
.feed-list { display: flex; flex-direction: column; gap: 12px; }
#feedContainer { display: flex; flex-direction: column; gap: 12px; }
#feedContainer > .postCard, .feed-list > .postCard { width: 100%; }

/* ─── RIGHT SIDEBAR ────────────────────────────────────────────── */
.layout-right { position: sticky; top: calc(var(--topbar-h) + 16px); display: flex; flex-direction: column; gap: 14px; }
.side-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--border); padding: 16px; }
.side-card-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }

.trending-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--border); cursor: pointer;
}
.trending-item:last-child { border-bottom: none; }
.trending-item:hover .trending-tag { color: var(--accent); }
.trending-tag { font-size: 14px; font-weight: 600; color: var(--text); }
.trending-count { font-size: 12px; color: var(--text3); }

.suggestion-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.suggestion-item:last-child { border-bottom: none; }
.suggestion-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--accent);
  color: #fff; font-weight: 700; font-size: 15px; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden;
}
.suggestion-avatar img { width: 100%; height: 100%; object-fit: cover; }
.suggestion-info { flex: 1; min-width: 0; }
.suggestion-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.suggestion-bio { font-size: 12px; color: var(--text3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.follow-btn-sm {
  padding: 5px 12px; border-radius: var(--radius-full); font-size: 12.5px; font-weight: 600;
  background: var(--accent); color: #fff; transition: background 0.15s; flex-shrink: 0;
}
.follow-btn-sm:hover { background: var(--accent-2); }
.follow-btn-sm.following { background: var(--bg); color: var(--text2); border: 1px solid var(--border); }

/* ─── MARKET STRIP ─────────────────────────────────────────────── */
.market-strip {
  background: #0d1117; color: #e2e8f0; font-size: 12.5px; font-family: var(--mono);
  padding: 6px 16px; overflow: hidden; white-space: nowrap; display: flex; gap: 20px; border-bottom: 1px solid #1e2d3d;
}
.market-strip::-webkit-scrollbar { display: none; }
.market-item { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.market-name { color: #94a3b8; font-size: 11.5px; }
.market-val { color: #e2e8f0; font-weight: 600; }
.market-green { color: #22c55e; }
.market-red { color: #ef4444; }

/* ─── POLL ─────────────────────────────────────────────────────── */
.poll-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--border); padding: 18px; }
.poll-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
#pollCounts { font-size: 13px; color: var(--text3); margin-bottom: 10px; }
.poll-btn { width: calc(50% - 5px); padding: 10px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 600; border: none; cursor: pointer; transition: opacity 0.2s; }
.poll-btn:hover { opacity: 0.87; }
.up-btn { background: var(--green); color: #fff; margin-right: 10px; }
.down-btn { background: var(--red); color: #fff; }
.poll-bars { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.poll-bar-row { display: flex; flex-direction: column; gap: 3px; }
.poll-bar-label { font-size: 12px; color: var(--text3); display: flex; justify-content: space-between; }
.poll-bar-track { height: 8px; background: var(--border); border-radius: var(--radius-full); overflow: hidden; }
.poll-bar-fill { height: 100%; border-radius: var(--radius-full); transition: width 0.5s ease; }
.poll-bar-fill.up { background: var(--green); }
.poll-bar-fill.dn { background: var(--red); }
#pollAverages { font-size: 12px; color: var(--text3); margin-top: 8px; }

.poll-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; z-index: 9000; }
.poll-modal-content { background: #fff; padding: 24px; border-radius: var(--radius); width: 320px; box-shadow: var(--shadow-lg); }
.poll-modal-content h3 { font-size: 17px; margin-bottom: 14px; }
.poll-modal-content input { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 12px; outline: none; }
.poll-submit-btn { width: 100%; padding: 10px; background: var(--accent); color: #fff; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.poll-cancel-btn { width: 100%; padding: 10px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13.5px; }

/* ─── NOTIFICATIONS ────────────────────────────────────────────── */
.notif-wrapper { position: relative; }
#notifBadge {
  position: absolute; top: -2px; right: -2px; background: var(--red); color: #fff;
  font-size: 10px; min-width: 16px; height: 16px; line-height: 16px;
  text-align: center; border-radius: var(--radius-full); padding: 0 4px; pointer-events: none;
}
.notif-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); width: 340px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); z-index: 2000; overflow: hidden;
  max-height: 440px; display: flex; flex-direction: column;
}
.notif-dropdown.hidden { display: none; }
.notif-title { padding: 12px 16px; font-size: 15px; font-weight: 700; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.notif-mark-all { font-size: 12px; color: var(--accent); background: none; padding: 0; font-weight: 500; cursor: pointer; }
.notif-list { overflow-y: auto; flex: 1; }
.notif-item { display: flex; align-items: flex-start; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.15s; }
.notif-item:hover { background: var(--bg); }
.notif-item.unread { background: var(--accent-light); }
.notif-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-body { flex: 1; min-width: 0; }
.notif-text { font-size: 13px; color: var(--text); line-height: 1.4; }
.notif-time { font-size: 11.5px; color: var(--text4); margin-top: 3px; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; margin-top: 4px; }
.notif-empty { padding: 24px; text-align: center; color: var(--text3); font-size: 13.5px; }

/* ─── DM PANEL ─────────────────────────────────────────────────── */
.dm-panel {
  position: fixed; right: 0; bottom: 0; width: 340px; height: 480px;
  background: #fff; border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border); border-bottom: none;
  display: flex; flex-direction: column; z-index: 1500;
  transform: translateY(100%); transition: transform 0.3s ease;
}
.dm-panel.open { transform: translateY(0); }
.dm-header {
  display: flex; align-items: center; padding: 12px 16px;
  border-bottom: 1px solid var(--border); gap: 10px; cursor: pointer;
  background: var(--card); border-radius: var(--radius) var(--radius) 0 0;
}
.dm-header-title { flex: 1; font-size: 15px; font-weight: 700; color: var(--text); }
.dm-header-actions { display: flex; gap: 4px; }
.dm-contacts { flex: 1; overflow-y: auto; }
.dm-contact {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  cursor: pointer; border-bottom: 1px solid var(--border); transition: background 0.15s;
}
.dm-contact:hover { background: var(--bg); }
.dm-contact-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #fff;
  font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0;
}
.dm-contact-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dm-contact-info { flex: 1; min-width: 0; }
.dm-contact-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.dm-contact-preview { font-size: 12px; color: var(--text3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-unread-badge { background: var(--accent); color: #fff; font-size: 10px; min-width: 16px; height: 16px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.dm-chat-view { flex: 1; display: flex; flex-direction: column; display: none; }
.dm-chat-view.active { display: flex; }
.dm-chat-header { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.dm-back-btn { padding: 4px 8px; background: none; color: var(--text3); font-size: 18px; }
.dm-back-btn:hover { color: var(--accent); }
.dm-messages { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.dm-msg { max-width: 75%; padding: 8px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; word-break: break-word; }
.dm-msg.mine { background: var(--accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.dm-msg.theirs { background: var(--bg); color: var(--text); align-self: flex-start; border-bottom-left-radius: 4px; border: 1px solid var(--border); }
.dm-msg-time { font-size: 10.5px; opacity: 0.65; margin-top: 3px; text-align: right; }
.dm-input-row { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); }
.dm-input { flex: 1; padding: 8px 14px; border-radius: var(--radius-full); border: 1.5px solid var(--border); font-size: 13.5px; outline: none; }
.dm-input:focus { border-color: var(--accent); }
.dm-send-btn { padding: 8px 14px; border-radius: var(--radius-full); background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; }
.dm-send-btn:hover { background: var(--accent-2); }
.dm-toggle-btn {
  position: fixed; right: 20px; bottom: 20px; width: 50px; height: 50px;
  border-radius: 50%; background: var(--accent); color: #fff; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow); z-index: 1490; transition: transform 0.2s, background 0.2s;
}
.dm-toggle-btn:hover { transform: scale(1.08); background: var(--accent-2); }
.dm-unread-dot {
  position: absolute; top: -2px; right: -2px; width: 14px; height: 14px;
  background: var(--red); border-radius: 50%; border: 2px solid #fff; display: none;
}

/* ─── STORY VIEWER ─────────────────────────────────────────────── */
.story-viewer {
  position: fixed; inset: 0; background: rgba(0,0,0,0.9);
  z-index: 9999; display: flex; align-items: center; justify-content: center;
}
.story-content {
  position: relative; max-width: 400px; width: 100%; min-height: 300px;
  max-height: 85vh; background: #111; border-radius: var(--radius);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.story-content img, .story-content video { width: 100%; max-height: 85vh; object-fit: contain; }
.story-text-content {
  display: flex; align-items: center; justify-content: center; min-height: 400px;
  padding: 30px; font-size: 22px; font-weight: 600; color: #fff; text-align: center;
  background: linear-gradient(135deg, #0a66c2, #6c3fc5);
}
.story-progress { position: absolute; top: 0; left: 0; right: 0; display: flex; gap: 4px; padding: 8px; z-index: 2; }
.story-prog-bar { flex: 1; height: 3px; background: rgba(255,255,255,0.35); border-radius: 2px; overflow: hidden; }
.story-prog-fill { height: 100%; background: #fff; border-radius: 2px; }
.tap-left, .tap-right { position: absolute; top: 0; bottom: 0; width: 40%; cursor: pointer; z-index: 3; }
.tap-left { left: 0; }
.tap-right { right: 0; }
.story-close {
  position: absolute; top: 14px; right: 14px; background: rgba(0,0,0,0.5);
  color: #fff; border-radius: 50%; width: 30px; height: 30px;
  font-size: 18px; display: flex; align-items: center; justify-content: center; z-index: 4; cursor: pointer;
}
#storyUploadModal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9000; display: flex; align-items: center; justify-content: center; }
#storyUploadModal .story-content { padding: 28px; text-align: center; background: #fff; color: var(--text); gap: 12px; flex-direction: column; border-radius: var(--radius-lg); max-width: 360px; background: #fff; color: #111; }
#storyUploadModal h3 { font-size: 18px; font-weight: 700; margin-bottom: 14px; }

/* ─── ARTICLE MODAL ────────────────────────────────────────────── */
.ai-modal { position: fixed; inset: 0; z-index: 9000; }
.ai-modal.hidden { display: none; }
.ai-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.ai-modal-panel { position: relative; z-index: 1; background: #fff; max-width: 640px; margin: 60px auto; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-lg); max-height: 85vh; overflow-y: auto; }
.ai-modal-panel h2 { font-size: 20px; font-weight: 700; margin-bottom: 16px; }
.article-title { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 16px; font-weight: 600; margin-bottom: 12px; outline: none; }
.article-title:focus { border-color: var(--accent); }
.article-body { width: 100%; min-height: 300px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 14.5px; resize: vertical; outline: none; line-height: 1.6; margin-bottom: 12px; }
.article-body:focus { border-color: var(--accent); }
.ai-controls { display: flex; justify-content: flex-end; gap: 8px; }

/* ─── MARKET MODAL ─────────────────────────────────────────────── */
#marketModal { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; z-index: 9999; }
#marketModal > div { background: #fff; width: 380px; padding: 24px; border-radius: var(--radius); max-height: 85vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
#marketModal h2 { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
#marketList { display: flex; flex-direction: column; gap: 8px; }
.market-watch-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--border); }
.mw-name { font-size: 14px; font-weight: 600; color: var(--text); }
.mw-price { font-family: var(--mono); font-size: 14px; font-weight: 700; }
.mw-change { font-family: var(--mono); font-size: 13px; }

/* ─── IMAGE MODAL ──────────────────────────────────────────────── */
.image-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.9); display: flex; align-items: center; justify-content: center; z-index: 10000; }
.image-modal.hidden { display: none; }
.image-modal .modal-content { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: var(--radius-sm); }
.closeModal { position: absolute; top: 18px; right: 20px; color: #fff; font-size: 32px; cursor: pointer; line-height: 1; opacity: 0.8; }
.closeModal:hover { opacity: 1; }

/* ─── SEARCH RESULTS ───────────────────────────────────────────── */
.search-results-overlay {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); z-index: 3000; max-height: 380px; overflow-y: auto;
}
.search-result-item { display: flex; align-items: center; gap: 10px; padding: 11px 16px; cursor: pointer; border-bottom: 1px solid var(--border); transition: background 0.12s; }
.search-result-item:hover { background: var(--bg); }
.search-result-item:last-child { border-bottom: none; }
.search-result-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.search-result-avatar img { width: 100%; height: 100%; object-fit: cover; }
.search-result-info { flex: 1; min-width: 0; }
.search-result-name { font-size: 14px; font-weight: 600; color: var(--text); }
.search-result-sub { font-size: 12px; color: var(--text3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result-type { font-size: 10.5px; padding: 2px 7px; border-radius: var(--radius-full); background: var(--accent-light); color: var(--accent); font-weight: 600; }

/* ─── DROPDOWN ─────────────────────────────────────────────────── */
.dropdown { position: relative; }
.dropdown-content { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 180px; overflow: hidden; z-index: 2000; display: none; }
.dropdown:hover .dropdown-content { display: block; }
.profile-menu a { display: flex; align-items: center; padding: 11px 16px; font-size: 13.5px; color: var(--text2); border-bottom: 1px solid var(--border); transition: background 0.12s; cursor: pointer; }
.profile-menu a:last-child { border-bottom: none; }
.profile-menu a:hover { background: var(--bg); color: var(--accent); text-decoration: none; }

/* ─── PROFILE EDIT PAGE ────────────────────────────────────────── */
.profile-page { max-width: 680px; margin: 32px auto; padding: 28px; background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid var(--border); }
.profile-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.profile-page h2 { font-size: 22px; font-weight: 700; }
.close-profile-btn { width: 34px; height: 34px; border-radius: 50%; background: var(--bg); border: 1px solid var(--border); font-size: 16px; display: flex; align-items: center; justify-content: center; }
.close-profile-btn:hover { background: var(--red-light); color: var(--red); }

.profile-avatar-upload { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; padding: 16px; background: var(--bg); border-radius: var(--radius); border: 1px dashed var(--border2); }
.profile-avatar-preview { width: 68px; height: 68px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 26px; font-weight: 700; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.profile-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-upload-info h4 { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.profile-avatar-upload-info p { font-size: 12px; color: var(--text3); margin-bottom: 8px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 5px; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; color: var(--text); background: var(--bg); outline: none; transition: border-color 0.2s; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--accent-glow); }
.form-group input:disabled { opacity: 0.6; cursor: not-allowed; }
.form-group textarea { min-height: 80px; resize: vertical; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text3); margin: 20px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.kite-note { font-size: 12px; color: var(--text3); background: var(--gold-light); border-radius: var(--radius-sm); padding: 8px 12px; margin-bottom: 12px; border-left: 3px solid var(--gold); }
.kite-note code { font-family: var(--mono); font-size: 11px; color: var(--accent-2); }
.saveBtn { width: 100%; padding: 13px; background: var(--accent); color: #fff; border-radius: var(--radius); font-size: 16px; font-weight: 600; margin-top: 8px; transition: background 0.2s; }
.saveBtn:hover { background: var(--accent-2); }

/* ─── USER PROFILE PAGE ────────────────────────────────────────── */
.up-container { max-width: 960px; margin: 24px auto; padding: 0 16px; }
.up-header-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--border); overflow: hidden; margin-bottom: 16px; }
.up-cover { height: 150px; background: linear-gradient(135deg, #0a66c2, #6c3fc5, #e91e8c); }
.up-header-body { padding: 0 22px 22px; display: flex; gap: 18px; align-items: flex-end; }
.up-avatar-wrap { margin-top: -42px; flex-shrink: 0; }
.up-avatar { width: 84px; height: 84px; border-radius: 50%; border: 4px solid #fff; background: var(--accent); color: #fff; font-size: 32px; font-weight: 700; display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: var(--shadow); }
.up-avatar img { width: 100%; height: 100%; object-fit: cover; }
.up-info { flex: 1; min-width: 0; padding-top: 14px; }
.up-name { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.up-bio { font-size: 13.5px; color: var(--text3); margin-bottom: 10px; max-width: 500px; }
.up-stats { display: flex; gap: 24px; margin-bottom: 12px; }
.up-stat { text-align: center; cursor: pointer; }
.up-stat .n { font-size: 17px; font-weight: 700; color: var(--text); display: block; }
.up-stat .l { font-size: 12px; color: var(--text3); }
.up-actions { display: flex; gap: 8px; }
.up-tabs { display: flex; border-bottom: 2px solid var(--border); background: var(--card); overflow: hidden; }
.up-tab { padding: 12px 20px; font-size: 14px; font-weight: 600; color: var(--text3); background: none; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color 0.15s, border-color 0.15s; cursor: pointer; }
.up-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.up-tab:hover { color: var(--text); }
.up-tab-panel { display: none; padding: 14px 0; }
.up-tab-panel.active { display: block; }

/* Post grid */
.postGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.postThumb { border-radius: var(--radius-sm); overflow: hidden; background: var(--card); border: 1px solid var(--border); cursor: pointer; display: flex; flex-direction: column; min-height: 140px; transition: box-shadow 0.2s; }
.postThumb:hover { box-shadow: var(--shadow); }
.postThumb img { width: 100%; height: 160px; object-fit: cover; display: block; }
.postCardBody { padding: 10px; }
.loadMore { display: block; width: 100%; padding: 10px; margin-top: 12px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--border); font-size: 13.5px; font-weight: 600; color: var(--accent); transition: background 0.15s; }
.loadMore:hover { background: var(--accent-light); }

/* ─── MODALS ───────────────────────────────────────────────────── */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.modal { width: 420px; max-height: 72vh; overflow-y: auto; background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-lg); }
.modal h3 { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.userRow { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.12s; }
.userRow:hover { background: var(--bg); padding-left: 8px; padding-right: 8px; margin: 0 -8px; }
.userRow:last-child { border-bottom: none; }
.userAvatarSmall { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.userAvatarSmall img { width: 100%; height: 100%; object-fit: cover; }
.emptyState { text-align: center; color: var(--text3); padding: 28px 14px; font-size: 14px; }

/* ─── ANIMATIONS ───────────────────────────────────────────────── */
@keyframes fadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }
@keyframes spin { from { transform:rotate(0deg); } to { transform:rotate(360deg); } }
.animate-in { animation: fadeIn 0.22s ease both; }
.spinning { animation: spin 0.7s linear infinite; }
.skeleton { background: linear-gradient(90deg, var(--border) 25%, #f3f4f6 50%, var(--border) 75%); background-size: 200% 100%; animation: skeleton-shimmer 1.4s infinite; border-radius: var(--radius-sm); }
@keyframes skeleton-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ─── RESPONSIVE ───────────────────────────────────────────────── */
@media (max-width: 1100px) { .pageLayout { grid-template-columns: var(--sidebar-w) 1fr; } .layout-right { display: none; } }
@media (max-width: 780px) {
  .pageLayout { grid-template-columns: 1fr; padding: 0 8px; }
  .leftSidebar { display: none; }
  .vyram-topbar { padding: 0 12px; }
  .postGrid { grid-template-columns: repeat(2, 1fr); }
  .up-header-body { flex-direction: column; align-items: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
  .dm-panel { width: 100%; }
  .modal { width: 95vw; }
}
@media (max-width: 480px) { .postGrid { grid-template-columns: 1fr; } .dm-panel { height: 420px; } }
.mobile-hide {}
@media (max-width: 780px) { .mobile-hide { display: none !important; } }

/* ─── MISC ─────────────────────────────────────────────────────── */
.text-accent { color: var(--accent); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-gold { color: var(--gold); }
.trader-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; padding: 2px 8px; border-radius: var(--radius-full); font-weight: 600; }
.tag-bull { background: var(--green-light); color: var(--green); }
.tag-bear { background: var(--red-light); color: var(--red); }
.tag-analyst { background: var(--accent-light); color: var(--accent); }
.tag-swing { background: var(--gold-light); color: #b45309; }
