/* ══════════════════════════════════════════════════════════════════
   Cine App — Design System
   Dark purple cinema theme matching Flutter/Admin Panel aesthetic
   ══════════════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────────── */
:root {
  --bg:          #0A0A0F;
  --surface:     #13131A;
  --card:        #1C1C28;
  --card-alt:    #22222F;
  --border:      #2D2D3F;
  --border-light:#38385A;

  --purple:      #7C3AED;
  --purple-soft: #9B5EF5;
  --pink:        #EC4899;
  --cyan:        #06B6D4;
  --amber:       #F59E0B;
  --emerald:     #10B981;
  --rose:        #EF4444;

  --text-primary:   #F0F0FF;
  --text-secondary: #B0B0C8;
  --text-muted:     #6A6A8A;

  --gradient:    linear-gradient(135deg, #7C3AED, #EC4899);
  --gradient-h:  linear-gradient(135deg, #9B5EF5, #F472B6);
  --radius:      16px;
  --radius-sm:   10px;
  --radius-xs:   6px;
  --shadow:      0 4px 24px rgba(0,0,0,.45);
  --shadow-sm:   0 2px 10px rgba(0,0,0,.3);
  --transition:  all .2s ease;
}

/* ── Light theme overrides ─────────────────────────────────────── */
body.cine-page.light-theme {
  --bg:             #F4F4F8;
  --surface:        #FFFFFF;
  --card:           #FFFFFF;
  --card-alt:       #F0F0F5;
  --border:         #E0E0EC;
  --border-light:   #D0D0E0;
  --text-primary:   #0A0A1A;
  --text-secondary: #3A3A5A;
  --text-muted:     #7A7A9A;
  --shadow:         0 4px 24px rgba(0,0,0,.08);
  --shadow-sm:      0 2px 10px rgba(0,0,0,.06);
}

/* ── Theme toggle button ───────────────────────────────────────── */
#cine-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: var(--transition);
  flex-shrink: 0;
}
#cine-theme-toggle:hover { color: var(--text-primary); background: var(--card-alt); }

/* ── Personality chip grid ─────────────────────────────────────── */
.personality-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding: 4px 2px;
}

.personality-chip {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.personality-chip:hover {
  border-color: var(--purple-soft);
  color: var(--text-primary);
}

.personality-chip.selected {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
}

.hidden { display: none !important; }

/* ── Sign-up step header ───────────────────────────────────────── */
.reg-step-header { margin-bottom: 4px; }

.reg-step-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--purple-soft);
  background: rgba(124,58,237,.12);
  border: 1px solid rgba(124,58,237,.25);
  border-radius: 20px;
  padding: 2px 10px;
  margin-bottom: 8px;
  letter-spacing: .3px;
}

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.cine-page {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body.cine-page a { text-decoration: none; color: inherit; }
body.cine-page img { display: block; max-width: 100%; }
body.cine-page button { cursor: pointer; font-family: inherit; border: none; background: none; }
body.cine-page input, body.cine-page textarea, body.cine-page select { font-family: inherit; }

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

/* ── Sidebar nav (desktop) ─────────────────────────────────────── */
.cine-sidebar {
  position: fixed;
  top: 0; left: 0;
  width: 260px;
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.cine-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}

.cine-logo-icon {
  width: 36px; height: 36px;
  background: var(--gradient);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}

.cine-logo-text {
  font-size: 22px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cine-nav {
  flex: none;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Sidebar bottom ad — fills all remaining vertical space between nav and user footer */
.sidebar-bottom-ad-slot {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  flex-direction: column;
  margin: 0 8px 8px;
  /* default hidden; JS removes the display:none inline style → browser shows as flex */
}
.sidebar-bottom-ad-slot .gz-vertical-ad {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.sidebar-bottom-ad-slot .gz-vertical-ad-media {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.sidebar-bottom-ad-slot .gz-vertical-ad-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cine-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.cine-nav-link:hover {
  background: rgba(124, 58, 237, .1);
  color: var(--text-primary);
}

.cine-nav-link.active {
  background: rgba(124, 58, 237, .15);
  color: var(--purple-soft);
}

.cine-nav-link svg { width: 20px; height: 20px; flex-shrink: 0; }

.cine-sidebar-user {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.cine-sidebar-user img {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
}

.cine-sidebar-user-info { flex: 1; min-width: 0; }
.cine-sidebar-user-info .name {
  font-size: 13px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cine-sidebar-user-info .handle { font-size: 11px; color: var(--text-muted); }

/* ── Main content area ─────────────────────────────────────────── */
.cine-main {
  margin-left: 260px;
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.cine-content {
  flex: 1;
  padding: 24px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* Feed gets its own centered narrow layout */
.cine-feed-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

/* Right sidebar sticks while the feed scrolls */
.feed-right-sidebar {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
}
.feed-right-sidebar::-webkit-scrollbar { display: none; } /* Chrome/Safari */

/* Ad slot inside the sticky sidebar fills remaining space */
#gz-ad-slot-feed-right {
  margin-top: 16px;
}

/* ── Page header ───────────────────────────────────────────────── */
.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 26px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-header p { font-size: 14px; color: var(--text-muted); margin-top: 4px; }

/* ── Search bar ────────────────────────────────────────────────── */
.search-bar {
  position: relative;
  margin-bottom: 20px;
}

.search-bar svg {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-bar input {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 40px;
  padding: 11px 16px 11px 42px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}

.search-bar input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}

.search-bar input::placeholder { color: var(--text-muted); }

/* ── Category tabs ─────────────────────────────────────────────── */
.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 20px;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 40px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.cat-tab:hover { border-color: var(--purple); color: var(--text-primary); }
.cat-tab.active {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
}

/* ── Post cards ────────────────────────────────────────────────── */
#feed-container { display: flex; flex-direction: column; gap: 16px; }

.post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

.post-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 10px;
}

.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.avatar.sm { width: 32px; height: 32px; }

.post-author-link {
  display: flex; align-items: center; gap: 10px;
  flex: 1; min-width: 0; text-decoration: none; color: inherit;
}
.post-author-info { flex: 1; min-width: 0; }

.post-author {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.post-time {
  font-size: 11px;
  color: var(--text-muted);
}

.post-body { padding: 0 16px 12px; }

.post-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.4;
}

.post-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-media img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

/* Video / YouTube embed in feed card */
.post-media-video {
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
  aspect-ratio: 16 / 9;
}

.post-media-video iframe,
.post-media-video video {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
}

/* ── Post action buttons ───────────────────────────────────────── */
.post-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  border: 1px solid transparent;
}

.action-btn:hover { background: rgba(255,255,255,.05); color: var(--text-primary); }

.action-btn.liked { color: var(--pink); }
.action-btn.liked:hover { background: rgba(236,72,153,.1); }

.action-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
}

/* ── Utility tags / badges ─────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 40px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(124,58,237,.15);
  color: var(--purple-soft);
  border: 1px solid rgba(124,58,237,.25);
  white-space: nowrap;
}

.tag-green  { background: rgba(16,185,129,.12); color: var(--emerald); border-color: rgba(16,185,129,.25); }
.tag-amber  { background: rgba(245,158,11,.12);  color: var(--amber);   border-color: rgba(245,158,11,.25); }
.tag-pink   { background: rgba(236,72,153,.12);  color: var(--pink);    border-color: rgba(236,72,153,.25); }
.tag-muted  { background: rgba(106,106,138,.12); color: var(--text-muted); border-color: var(--border); }

/* ── Post owner menu (edit/delete/status/visibility) ───────────────────── */
.post-owner-menu-wrap { position: relative; margin-left: auto; flex-shrink: 0; }
.post-owner-menu-btn {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); background: none; border: none; cursor: pointer;
}
.post-owner-menu-btn:hover { background: rgba(255,255,255,.06); color: var(--text-primary); }
.post-owner-menu-btn svg { width: 18px; height: 18px; }
.post-owner-menu {
  position: absolute; top: 34px; right: 0; z-index: 20;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); min-width: 200px; padding: 6px; display: none;
}
.post-owner-menu.active { display: block; }
.post-owner-menu-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 9px 10px; border-radius: 8px; font-size: 13px; font-weight: 500;
  color: var(--text-primary); text-align: left; background: none; border: none; cursor: pointer;
}
.post-owner-menu-item:hover { background: rgba(255,255,255,.06); }
.post-owner-menu-item.danger { color: var(--rose); }
.post-owner-menu-item svg { width: 15px; height: 15px; flex-shrink: 0; }
.post-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.post-title-row .post-title { margin-bottom: 0; }

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 16px rgba(124,58,237,.35);
}

.btn-primary:hover:not(:disabled) {
  background: var(--gradient-h);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124,58,237,.45);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--purple);
  color: var(--text-primary);
  background: rgba(124,58,237,.08);
}

.btn-ghost {
  background: rgba(255,255,255,.05);
  color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255,255,255,.1);
  color: var(--text-primary);
}

.btn-danger {
  background: rgba(239,68,68,.15);
  border: 1px solid rgba(239,68,68,.3);
  color: var(--rose);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(239,68,68,.25);
}

.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-full { width: 100%; }

/* ── Form inputs ───────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.input {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}

.input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}

.input::placeholder { color: var(--text-muted); }

textarea.input {
  resize: vertical;
  min-height: 100px;
}

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236A6A8A' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.input-password-wrap {
  position: relative;
}

.input-password-wrap .input { padding-right: 44px; }

.password-toggle {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}

.form-error {
  font-size: 12px;
  color: var(--rose);
  margin-top: 6px;
}

/* ── Modals ────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

@media (min-width: 640px) {
  .modal-overlay { align-items: center; }
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform .25s ease;
  overflow: hidden;
}

@media (min-width: 640px) {
  .modal-box { border-radius: var(--radius); }
}

.modal-overlay.active .modal-box { transform: translateY(0); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
}

.modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 18px;
  transition: var(--transition);
}

.modal-close:hover { background: rgba(255,255,255,.1); color: var(--text-primary); }

.modal-back-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
  flex-shrink: 0;
}
.modal-back-btn:hover { background: rgba(255,255,255,.1); color: var(--text-primary); }
.modal-title { flex: 1; text-align: center; }

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* ── Comments modal ────────────────────────────────────────────── */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 80px;
}

.comment-item {
  display: flex;
  gap: 10px;
}

.comment-item.new { animation: slideIn .25s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.comment-content { flex: 1; }

.comment-author {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-right: 6px;
  text-decoration: none;
  cursor: pointer;
}
.comment-author:hover { text-decoration: underline; }

.comment-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 2px 0;
}

.comment-time { font-size: 11px; color: var(--text-muted); }

.comment-meta-row { display: flex; align-items: center; gap: 12px; margin-top: 1px; }

.comment-reply-btn {
  font-size: 11px; font-weight: 700; color: var(--purple-soft);
  background: none; border: none; cursor: pointer; padding: 0;
}
.comment-reply-btn:hover { text-decoration: underline; }

.comment-item.reply { margin-left: 42px; }

.comment-replying-banner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 20px; font-size: 12px; color: var(--text-secondary);
  background: var(--card-alt); border-top: 1px solid var(--border);
}
.comment-replying-banner strong { color: var(--purple-soft); }
.comment-replying-banner button {
  color: var(--text-muted); background: none; border: none; cursor: pointer; font-size: 15px; line-height: 1;
}

.comment-input-row {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--surface);
}

.comment-input-row .input {
  flex: 1;
  border-radius: 40px;
  padding: 9px 16px;
}

/* ── Project detail modal ──────────────────────────────────────── */
#project-modal .modal-box { max-width: 640px; }

.detail-cover {
  height: 200px;
  overflow: hidden;
  flex-shrink: 0;
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-body { padding: 20px; }

.detail-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.detail-title-row h2 { font-size: 20px; font-weight: 800; line-height: 1.3; }

.detail-owner { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.project-code-chip { display: inline-block; font-size: 10px; font-family: monospace; font-weight: 700; letter-spacing: .06em; color: #7C3AED; background: #ede9fe; border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }

.detail-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.detail-progress-section { margin-bottom: 24px; }

.detail-amounts {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.detail-raised { font-size: 24px; font-weight: 800; }
.detail-target  { font-size: 14px; color: var(--text-muted); }

.progress-track {
  height: 7px;
  background: var(--surface);
  border-radius: 99px;
  overflow: hidden;
}

.progress-track.thick { height: 10px; }

.progress-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .4s ease;
}

.detail-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

.invest-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.invest-box h4 { font-size: 15px; font-weight: 700; margin-bottom: 10px; }

.already-invested {
  font-size: 13px;
  color: var(--emerald);
  margin-bottom: 10px;
}

.invest-form {
  display: flex;
  gap: 10px;
}

.invest-form .input { flex: 1; }

.invest-msg {
  font-size: 13px;
  margin-top: 8px;
  min-height: 20px;
}

.invest-msg.success { color: var(--emerald); }
.invest-msg.error   { color: var(--rose); }

/* ── Project detail — minimum info chips ──────────────────────── */
.detail-min-info {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 16px;
}
.detail-min-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(124,58,237,.08);
  border: 1px solid rgba(124,58,237,.2);
  border-radius: 10px;
  padding: 8px 14px;
  min-width: 110px;
}
.detail-min-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.detail-min-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--purple-soft);
}

/* ── Funding section (inside proj-funding-panel) ─────────────── */
.funding-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.funding-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.funding-methods-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.funding-method-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: all .18s;
  text-align: left;
  width: 100%;
}
.funding-method-chip:hover { border-color: rgba(124,58,237,.4); background: rgba(124,58,237,.05); }
.funding-method-chip.selected {
  border-color: var(--purple);
  background: rgba(124,58,237,.1);
}

.funding-method-icon { font-size: 22px; flex-shrink: 0; }

.funding-method-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.funding-method-name  { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.funding-method-badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}
.funding-method-chip.selected .funding-method-badge { color: var(--purple-soft); }

.funding-method-arrow { color: var(--text-muted); flex-shrink: 0; }
.funding-method-chip.selected .funding-method-arrow { color: var(--purple); }

.funding-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.funding-amount-section { display: flex; flex-direction: column; gap: 12px; }

.funding-selected-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: rgba(124,58,237,.1);
  border: 1px solid rgba(124,58,237,.25);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--purple-soft);
  align-self: flex-start;
}

.funding-type-pill {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(124,58,237,.15);
  color: var(--purple-soft);
}

.funding-inputs { display: flex; flex-direction: column; gap: 12px; }
.funding-label  { font-size: 13px; font-weight: 600; color: var(--text-secondary); display: block; margin-bottom: 6px; }

/* ── Single / Monthly toggle ──────────────────────────────────── */
.funding-mode-toggle {
  display: flex;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
}

.funding-mode-btn {
  flex: 1;
  padding: 9px 10px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
  text-align: center;
}
.funding-mode-btn:hover { color: var(--text-primary); }
.funding-mode-btn.active {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 2px 10px rgba(124,58,237,.35);
}

/* monthly fields slide-in area */
#funding-monthly-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Payment schedule table ───────────────────────────────────── */
.schedule-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 4px;
}

.schedule-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border);
}

.schedule-table { font-size: 13px; }

.schedule-header {
  display: grid;
  grid-template-columns: 36px 1fr 1fr;
  padding: 8px 14px;
  background: var(--card-alt);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--border);
}

.schedule-row {
  display: grid;
  grid-template-columns: 36px 1fr 1fr;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  transition: background .1s;
}
.schedule-row:hover { background: rgba(255,255,255,.03); }

.schedule-num { color: var(--text-muted); font-size: 11px; }

.schedule-total-row {
  display: grid;
  grid-template-columns: 36px 1fr 1fr;
  padding: 10px 14px;
  background: rgba(124,58,237,.08);
  font-weight: 700;
  color: var(--purple-soft);
  font-size: 13px;
}

/* ── Funding split hint ────────────────────────────────────────── */
.funding-split-hint {
  display: none;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  line-height: 1.5;
}
.funding-split-hint.ok {
  background: rgba(16,185,129,.1);
  border: 1px solid rgba(16,185,129,.25);
  color: #6ee7b7;
}
.funding-split-hint.error {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.25);
  color: #fca5a5;
}
.funding-split-per {
  font-weight: 700;
  color: #34d399;
}

/* ── EMI options grid ──────────────────────────────────────────── */
.emi-section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
}
.emi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 4px;
}
.emi-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 10px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--bg-secondary);
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .12s;
  text-align: center;
  user-select: none;
}
.emi-card:hover {
  border-color: rgba(124,58,237,.45);
  background: rgba(124,58,237,.04);
  transform: translateY(-1px);
}
.emi-card.selected {
  border-color: var(--purple);
  background: rgba(124,58,237,.10);
  box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}
.emi-card-months {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.emi-card-months-lbl {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}
.emi-card-divider {
  width: 28px;
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.emi-card.selected .emi-card-divider { background: rgba(124,58,237,.4); }
.emi-card-per {
  font-size: 13px;
  font-weight: 700;
  color: #34d399;
}
.emi-card-per-lbl {
  font-size: 10px;
  color: var(--text-muted);
}
.emi-card.selected .emi-card-months { color: var(--purple); }
.emi-notice {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

/* ── Investment project grid ───────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  border-color: color-mix(in srgb, var(--accent, #7C3AED) 20%, var(--border));
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,.4);
  border-color: color-mix(in srgb, var(--accent, #7C3AED) 40%, transparent);
}

.project-cover {
  position: relative;
  height: 160px;
  overflow: hidden;
}

.project-cover img { width: 100%; height: 100%; object-fit: cover; }

.project-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,.6));
}

.funded-badge {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--emerald);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 40px;
  box-shadow: 0 2px 8px rgba(16,185,129,.5);
}

.funded-badge.inline { position: static; }

.progress-badge {
  position: absolute;
  top: 10px; right: 10px;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 40px;
  border: 1px solid;
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(4px);
}

.progress-badge.sm { position: static; }

.project-body { padding: 14px; }

.project-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.project-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.project-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-amounts {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 8px 0 12px;
}

.project-amounts span:first-child { font-size: 16px; font-weight: 700; }

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Trending sidebar ──────────────────────────────────────────── */
.sidebar-widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.widget-header {
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

.trending-list { padding: 8px 0; }

.trending-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: var(--transition);
}

.trending-item:hover { background: rgba(255,255,255,.04); }

.trending-rank {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--gradient);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.trending-info { flex: 1; min-width: 0; }

.trending-title {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.trending-amount { font-size: 11px; color: var(--emerald); font-weight: 600; }

/* ── Profile Share Modal ────────────────────────────────────────── */
.profile-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.profile-share-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.profile-share-overlay.active { opacity: 1; }
.profile-share-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
  transform: translateY(20px);
  transition: transform 0.28s ease;
}
.profile-share-overlay.active .profile-share-card { transform: translateY(0); }
.profile-share-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.profile-share-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.profile-share-close {
  background: var(--surface-2, #1e1e2e);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.profile-share-close:hover { background: var(--border); color: var(--text-primary); }
.profile-share-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--surface-2, #1e1e2e);
  border-radius: 12px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
}
.profile-share-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.profile-share-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 2px;
}
.profile-share-handle {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}
.profile-share-url-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2, #1e1e2e);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.profile-share-url-text {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: monospace;
}
.profile-share-copy-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--purple, #7C3AED);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, opacity .15s;
  white-space: nowrap;
}
.profile-share-copy-btn:hover { opacity: .88; }
.profile-share-copied {
  font-size: 12px;
  color: var(--green, #22c55e);
  font-weight: 600;
  text-align: center;
  margin: 0 0 12px;
}
.profile-share-options {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.profile-share-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--surface-2, #1e1e2e);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 8px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  transition: border-color .15s, color .15s;
}
.profile-share-option:hover { border-color: var(--purple, #7C3AED); color: var(--text-primary); }
.profile-share-option-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}
.profile-share-option-icon--wa { background: #25D366; color: #fff; }
.profile-share-option-icon--tw { background: #000; color: #fff; }

/* ── Profile page ──────────────────────────────────────────────── */
.profile-shell {
  max-width: 760px;
  margin: 0 auto;
}

#profile-header {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.profile-avatar {
  width: 100px; height: 100px;
  border-radius: 50%;
  border: 3px solid transparent;
  background: var(--gradient) border-box;
  object-fit: cover;
  flex-shrink: 0;
}

/* ── Edit Profile modal ────────────────────────────────────────── */
.edit-profile-photo-wrap {
  position: relative; width: 88px; height: 88px; margin: 0 auto 20px;
}
.edit-profile-photo-btn {
  position: absolute; bottom: -2px; right: -2px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--purple); border: 2px solid var(--surface);
  color: #fff; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.edit-profile-photo-btn:hover { opacity: .9; }

.profile-name {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 2px;
}

.profile-username { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; }

.profile-bio {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.profile-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* ── Profile mobile number row ──────────────────────────────────── */
.profile-mobile-row {
    display: flex; align-items: center; gap: 7px;
    margin-top: 8px; flex-wrap: wrap;
    font-size: 12px; color: var(--text-secondary);
}
.profile-mobile-label { color: var(--text-muted); }
.profile-mobile-val   { font-weight: 600; color: var(--text-primary); }
.profile-mobile-edit-btn {
    font-size: 11px; padding: 2px 8px;
    background: rgba(124,58,237,.1); border: 1px solid rgba(124,58,237,.3);
    color: var(--purple-soft); border-radius: 6px; cursor: pointer;
}
.profile-mobile-edit-row {
    display: flex; align-items: center; gap: 7px;
    margin-top: 6px; flex-wrap: wrap;
}
.profile-mobile-input { width: 180px !important; padding: 5px 10px !important; font-size: 13px !important; }

.profile-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 18px;
}

.stat-item { text-align: center; }
.stat-item--clickable { cursor: pointer; border-radius: 8px; padding: 4px 8px; transition: var(--transition); }
.stat-item--clickable:hover { background: rgba(124,58,237,.08); }

/* ── Followers / Following list modal ─────────────────────────────────────── */
.follow-list { display: flex; flex-direction: column; gap: 4px; }
.follow-list-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 4px;
}
.follow-list-user { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; flex: 1; }
.follow-list-names { display: flex; flex-direction: column; min-width: 0; }
.follow-list-name { font-size: 13.5px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.follow-list-username { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.follow-list-btn { flex-shrink: 0; padding: 6px 14px; }
.stat-value { display: block; font-size: 18px; font-weight: 800; }
.stat-label { font-size: 12px; color: var(--text-muted); }

/* Profile tabs */
.profile-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.profile-tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: var(--transition);
}

.profile-tab:hover { color: var(--text-primary); }
.profile-tab.active { color: var(--purple-soft); border-color: var(--purple); }

.profile-tab-panel { display: none; }
.profile-tab-panel.active { display: block; }

/* ── Search results ─────────────────────────────────────────────── */
#search-posts-results, #search-users-results, #search-projects-results {
  display: flex; flex-direction: column; gap: 10px;
}
.search-result-tile {
  display: flex; align-items: center; gap: 14px;
  padding: 14px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); text-decoration: none; transition: var(--transition);
}
.search-result-tile:hover { border-color: var(--border-light); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.search-result-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.search-accent-cyan    .search-result-icon { background: rgba(6,182,212,.12); }
.search-accent-purple  .search-result-icon { background: rgba(124,58,237,.12); }
.search-accent-emerald .search-result-icon { background: rgba(16,185,129,.12); }
.search-result-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.search-result-title {
  font-size: 14px; font-weight: 700; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-result-sub {
  font-size: 12px; color: var(--text-muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-result-chevron { color: var(--text-muted); font-size: 20px; flex-shrink: 0; }

/* Posts grid */
#profile-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

.profile-post-thumb {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--card);
  cursor: pointer;
}

.profile-post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.profile-post-thumb:hover img { transform: scale(1.05); }

.thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient);
  font-size: 28px;
  font-weight: 800;
  color: rgba(255,255,255,.7);
}

.thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  transition: opacity .2s ease;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.profile-post-thumb:hover .thumb-overlay { opacity: 1; }

/* ── Post edit button (own profile) ─────────────────────────────── */
.post-edit-btn {
    position: absolute;
    top: 6px; right: 6px;
    background: rgba(0,0,0,.65);
    border: none; border-radius: 6px;
    color: #fff; font-size: 13px;
    padding: 3px 7px;
    cursor: pointer;
    opacity: 0;
    transition: opacity .2s;
    z-index: 3;
    line-height: 1.4;
}
.profile-post-thumb:hover .post-edit-btn { opacity: 1; }

/* Portfolio cards */
.portfolio-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.portfolio-card:last-child { border-bottom: none; }
.portfolio-title { font-size: 14px; font-weight: 600; }
.portfolio-amount { font-size: 12px; color: var(--emerald); margin-top: 2px; }

/* ── Auth page ─────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo-icon {
  width: 56px; height: 56px;
  background: var(--gradient);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin: 0 auto 12px;
  box-shadow: 0 8px 24px rgba(124,58,237,.35);
}

.auth-logo h1 {
  font-size: 26px;
  font-weight: 900;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-logo p { font-size: 14px; color: var(--text-muted); margin-top: 4px; }

.auth-tabs {
  display: flex;
  gap: 0;
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 8px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  transition: var(--transition);
}

.auth-tab.active {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 2px 8px rgba(124,58,237,.3);
}

.auth-panel { display: none; }
.auth-panel.active { display: block; }
.auth-forgot-link {
  display: block; margin-top: 8px; font-size: 12.5px; font-weight: 600;
  color: var(--purple-soft); background: none; border: none; cursor: pointer; padding: 0;
}
.auth-forgot-link:hover { text-decoration: underline; }

/* ── Create post page ──────────────────────────────────────────── */
.create-post-shell { max-width: 620px; margin: 0 auto; }

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--card);
  position: relative;
}

.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--purple);
  background: rgba(124,58,237,.05);
}

.drop-zone.has-file { padding: 0; overflow: hidden; }

.drop-zone-icon { font-size: 36px; margin-bottom: 10px; }
.drop-zone-text { font-size: 14px; color: var(--text-muted); }
.drop-zone-text strong { color: var(--purple-soft); }

#media-preview,
#proj-cover-preview {
  display: none;
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  border-radius: var(--radius);
}

.drop-zone-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.drop-zone.has-file .drop-zone-placeholder { display: none; }

.success-banner {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(16,185,129,.1);
  border: 1px solid rgba(16,185,129,.3);
  border-radius: var(--radius-sm);
  color: var(--emerald);
  font-weight: 600;
  margin-bottom: 20px;
}

/* ── Create Post — media type & video source tabs ─────────────── */
.media-type-tabs,
.video-source-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.media-type-tab,
.video-source-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.media-type-tab:hover,
.video-source-tab:hover {
  border-color: var(--purple-soft);
  color: var(--text-primary);
}

.media-type-tab.active,
.video-source-tab.active {
  background: rgba(124,58,237,.12);
  border-color: var(--purple-soft);
  color: var(--purple-soft);
}

.media-section { margin-top: 4px; }

/* YouTube URL input wrapper */
.youtube-input-wrap { position: relative; }
.youtube-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  pointer-events: none;
}

.youtube-preview {
  margin-top: 12px;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
}
.youtube-preview iframe { width: 100%; height: 100%; display: block; border: none; }

/* ── Loader / spinner ──────────────────────────────────────────── */
.feed-loader, .invest-loader {
  display: none;
  justify-content: center;
  align-items: center;
  padding: 32px;
}

.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.spinner-sm {
  width: 24px; height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 20px auto;
}

.spinner-center {
  display: flex; align-items: center; justify-content: center;
  padding: 48px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty / error states ──────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-icon { font-size: 48px; margin-bottom: 12px; opacity: .5; }
.empty-state p { font-size: 15px; margin-bottom: 16px; }

.error-state {
  text-align: center;
  padding: 40px;
}

.error-text { color: var(--rose); font-size: 13px; }

.no-content {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ── Investment tabs ───────────────────────────────────────────── */
.invest-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 3px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.invest-tab {
  flex: 1;
  min-width: 0;
  padding: 9px 6px;
  border-radius: calc(var(--radius) - 3px);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.invest-tab.active {
  background: var(--purple);
  color: #fff;
}

.invest-tab-panel { display: none; }
.invest-tab-panel.active { display: block; }

/* ── Invest explore layout ─────────────────────────────────────── */
.invest-explore-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: start;
}

.invest-sidebar { position: sticky; top: 24px; }

/* ── Tab panel header ──────────────────────────────────────────── */
.tab-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.tab-panel-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.btn-sm { padding: 7px 14px; font-size: 13px; }

/* ── Summary cards (My Projects) ───────────────────────────────── */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.summary-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.summary-card .summary-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--purple-soft);
  line-height: 1;
  margin-bottom: 6px;
}

.summary-card .summary-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── My Projects summary stat cards ───────────────────────────── */
#my-projects-summary {
  display: flex !important;
  flex-wrap: nowrap;
  gap: 10px;
  margin-bottom: 20px;
}

.my-proj-stat-card {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 14px;
}

.my-proj-stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.my-proj-stat-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.my-proj-stat-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.my-proj-stat-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
}

@media (max-width: 400px) {
  .my-proj-stat-icon { display: none; }
  .my-proj-stat-val  { font-size: 16px; }
}

/* ── Portfolio overview card ───────────────────────────────────── */
.pf-overview-card {
  background: linear-gradient(135deg, rgba(245,158,11,.18) 0%, rgba(109,40,217,.10) 100%);
  border: 1px solid rgba(245,158,11,.30);
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 0 22px rgba(245,158,11,.15);
}

.pf-ov-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.pf-ov-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: rgba(245,158,11,.14);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: #F59E0B;
}

.pf-ov-hero { flex: 1; }

.pf-ov-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 2px;
}

.pf-ov-value {
  font-size: 28px;
  font-weight: 900;
  background: linear-gradient(90deg, #F59E0B, #7C3AED);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.pf-ov-divider {
  height: 1px;
  background: rgba(255,255,255,.08);
  margin: 0 0 14px;
}

.pf-ov-stats {
  display: flex;
  align-items: center;
}

.pf-ov-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.pf-ov-stat-icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 2px;
}

.pf-ov-stat-val {
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

.pf-ov-stat-lbl {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.pf-ov-divider-v {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,.10);
  flex-shrink: 0;
}

/* ── Portfolio list header ─────────────────────────────────────── */
.pf-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 2px;
}

.pf-list-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.pf-count-pill {
  font-size: 11px;
  font-weight: 600;
  color: #F59E0B;
  background: rgba(245,158,11,.10);
  border: 1px solid rgba(245,158,11,.25);
  border-radius: 20px;
  padding: 2px 10px;
}

/* ── Portfolio investment card ─────────────────────────────────── */
.pf-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  margin-bottom: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
}

.pf-card:hover {
  border-color: var(--pf-accent, var(--purple));
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  transform: translateY(-1px);
}

.pf-cover {
  width: 100%;
  height: 110px;
  overflow: hidden;
  background: var(--surface);
}

.pf-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pf-body { padding: 16px; }

.pf-funded-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--emerald);
  background: rgba(16,185,129,.10);
  border: 1px solid rgba(16,185,129,.25);
  border-radius: 6px;
  padding: 2px 7px;
  margin-bottom: 6px;
}

.pf-title-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.pf-title {
  flex: 1;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.pf-my-badge {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  border: 1px solid;
  border-radius: 10px;
  padding: 5px 10px;
}

.pf-my-amt {
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.pf-my-lbl {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.pf-progress-wrap { margin-bottom: 8px; }

.pf-progress-track {
  height: 6px;
  background: var(--surface);
  border-radius: 6px;
  overflow: hidden;
}

.pf-progress-fill {
  height: 100%;
  border-radius: 6px;
  transition: width .5s ease;
}

.pf-stats-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.pf-stat {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 500;
}

.pf-stat-right { margin-left: auto; }

.pf-stmt-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(245,158,11,.25);
  background: rgba(245,158,11,.08);
  color: #F59E0B;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.pf-stmt-btn:hover {
  background: rgba(245,158,11,.15);
  border-color: rgba(245,158,11,.45);
}

/* ── Profile Portfolio Tab (ppf-*) ──────────────────────────────── */
.ppf-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, rgba(245,158,11,.16), rgba(139,92,246,.08));
  border: 1px solid rgba(245,158,11,.30);
  border-radius: 18px;
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: 0 0 18px rgba(245,158,11,.12);
}
.ppf-ov-left { display: flex; align-items: center; gap: 12px; }
.ppf-ov-icon {
  font-size: 22px;
  background: rgba(245,158,11,.14);
  border-radius: 12px;
  padding: 10px;
  line-height: 1;
}
.ppf-ov-label { font-size: 11px; color: var(--text-muted); }
.ppf-ov-value {
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, #F59E0B, #7C3AED);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ppf-ov-pills { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.ppf-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.ppf-pill-amber { background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.28); color: #F59E0B; }
.ppf-pill-green { background: rgba(16,185,129,.10); border: 1px solid rgba(16,185,129,.25); color: #10B981; }

.ppf-list { display: flex; flex-direction: column; gap: 12px; }

.ppf-card {
  background: var(--card);
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--card-accent, #7C3AED) 22%, transparent);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--card-accent, #7C3AED) 10%, transparent);
  overflow: hidden;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s;
}
.ppf-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px color-mix(in srgb, var(--card-accent, #7C3AED) 20%, transparent); }

.ppf-card-cover { position: relative; height: 110px; overflow: hidden; }
.ppf-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ppf-card-cover-fade {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,.55));
}

.ppf-card-body { padding: 14px; }

.ppf-card-top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.ppf-card-left { flex: 1; min-width: 0; }
.ppf-funded-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 700; color: #10B981;
  background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.30);
  border-radius: 6px; padding: 2px 7px; margin-bottom: 4px;
}
.ppf-card-title {
  font-size: 15px; font-weight: 700; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ppf-card-desc {
  font-size: 12px; color: var(--text-muted); margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}

.ppf-my-invest-box {
  flex-shrink: 0;
  border: 1px solid;
  border-radius: 10px;
  padding: 6px 10px;
  text-align: right;
}
.ppf-my-invest-amt { font-size: 14px; font-weight: 800; }
.ppf-my-invest-lbl { font-size: 10px; color: var(--text-muted); }

.ppf-prog-track {
  height: 5px;
  background: var(--surface);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
}
.ppf-prog-fill { height: 100%; border-radius: 6px; transition: width .4s; }

.ppf-meta-row {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.ppf-chip {
  display: flex; align-items: center; gap: 3px;
  font-size: 12px; font-weight: 500;
}
.ppf-action-row {
  display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap;
}
.ppf-stmt-btn, .ppf-sched-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.ppf-stmt-btn {
  background: rgba(245,158,11,.08);
  border: 1px solid rgba(245,158,11,.22);
  color: #F59E0B;
}
.ppf-stmt-btn:hover { background: rgba(245,158,11,.18); }
.ppf-sched-btn {
  background: rgba(124,58,237,.1);
  border: 1px solid rgba(124,58,237,.3);
  color: var(--purple-soft);
}
.ppf-sched-btn:hover { background: rgba(124,58,237,.22); }

.ppf-amt-row {
  margin-top: 8px;
  display: flex; align-items: center; gap: 5px;
  font-size: 12px;
}
.ppf-amt-raised { font-weight: 700; }
.ppf-amt-sep { color: var(--text-muted); }
.ppf-amt-target { color: var(--text-muted); }

.ppf-empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 48px 24px; text-align: center;
}
.ppf-empty-icon { font-size: 44px; margin-bottom: 14px; }
.ppf-empty-title { font-size: 16px; font-weight: 700; color: #F59E0B; margin-bottom: 6px; }
.ppf-empty-sub { font-size: 13px; color: var(--text-muted); }

/* stmt-summary bar used in profile statement modal */
.stmt-summary-bar {
  display: flex; gap: 12px; flex-wrap: wrap;
  background: rgba(124,58,237,.08);
  border: 1px solid rgba(124,58,237,.20);
  border-radius: 12px; padding: 12px 16px;
}
.stmt-summary-item { display: flex; flex-direction: column; gap: 2px; }
.stmt-summary-label { font-size: 11px; color: var(--text-muted); }
.stmt-summary-value { font-size: 15px; font-weight: 800; color: var(--text-primary); }

/* Legacy aliases */
.portfolio-list { display: flex; flex-direction: column; gap: 0; }
.po-stat, .ov-stat { text-align: center; }
.po-stat span, .ov-stat span { display:block; font-size:16px; font-weight:800; }
.po-stat small, .ov-stat small { font-size:10px; color:var(--text-muted); }

/* ── Statement of Account modal ─────────────────────────────────── */
.statement-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.stmt-project-banner {
  background: linear-gradient(135deg, rgba(124,58,237,.18), rgba(109,40,217,.1));
  border: 1px solid rgba(124,58,237,.25);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.stmt-project-name { flex: 1; }

.stmt-user-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--purple-soft);
  background: rgba(124,58,237,.15);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(124,58,237,.25);
}

.stmt-summary-row {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}

.stmt-kpi {
  flex: 1;
  padding: 14px 12px;
  text-align: center;
  border-right: 1px solid var(--border);
}

.stmt-kpi:last-child { border-right: none; }

.stmt-kpi-val {
  display: block;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 3px;
}

.stmt-kpi-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.stmt-timeline { display: flex; flex-direction: column; gap: 4px; }

.stmt-date-group { margin-bottom: 6px; }

.stmt-date-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
  margin-bottom: 10px;
}

.stmt-tx-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid rgba(255,255,255,.04);
}

.stmt-tx-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--purple);
  border: 2px solid rgba(124,58,237,.35);
  flex-shrink: 0;
  margin-top: 5px;
}

.stmt-tx-body { flex: 1; min-width: 0; }

.stmt-tx-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}

.stmt-tx-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.stmt-tx-amount {
  font-size: 14px;
  font-weight: 800;
  color: var(--rose);
  white-space: nowrap;
}

.stmt-tx-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stmt-tx-meta { font-size: 11px; color: var(--text-muted); }

.stmt-tx-running {
  font-size: 11px;
  font-weight: 600;
  color: var(--cyan);
}

/* ── Portfolio card button row ──────────────────────────────────── */
.pf-btn-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.pf-stmt-btn, .pf-sched-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid;
    transition: background .15s;
    min-width: 0;
}
.pf-stmt-btn {
    background: rgba(255,255,255,.05);
    border-color: var(--border);
    color: var(--text-secondary);
}
.pf-stmt-btn:hover { background: rgba(255,255,255,.1); }
.pf-sched-btn {
    background: rgba(124,58,237,.12);
    border-color: rgba(124,58,237,.35);
    color: var(--purple-soft);
}
.pf-sched-btn:hover { background: rgba(124,58,237,.22); }

/* ── Schedule modal project title ───────────────────────────────── */
.sched-project-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

/* ── Schedule section label ─────────────────────────────────────── */
.sched-section-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.sched-section-count {
    background: rgba(255,255,255,.08);
    border-radius: 20px;
    padding: 1px 7px;
    font-size: 10px;
    color: var(--text-secondary);
}

/* ── Single payment card ────────────────────────────────────────── */
.sc-single-card {
    background: rgba(6,182,212,.05);
    border: 1px solid rgba(6,182,212,.25);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 8px;
}
.sc-single-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.sc-single-type {
    font-size: 13px;
    font-weight: 700;
    color: #06B6D4;
    margin-bottom: 3px;
}
.sc-single-ref { font-size: 11px; color: var(--text-muted); }
.sc-single-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.sc-single-amount { font-size: 18px; font-weight: 800; color: var(--text-primary); }
.sc-single-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Monthly installment plan card ─────────────────────────────── */
.sc-monthly-card {
    background: rgba(124,58,237,.05);
    border: 1px solid rgba(124,58,237,.25);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 10px;
}
.sc-monthly-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.sc-monthly-label { display: flex; align-items: flex-start; gap: 10px; }
.sc-monthly-icon  { font-size: 20px; line-height: 1.2; }
.sc-monthly-title { font-size: 13px; font-weight: 700; color: var(--purple-soft); }
.sc-monthly-ref   { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.sc-monthly-total { font-size: 20px; font-weight: 800; color: var(--text-primary); }

/* Amount boxes */
.sc-monthly-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
@media (max-width: 480px) { .sc-monthly-amounts { grid-template-columns: repeat(2, 1fr); } }
.sc-amt-box {
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    display: flex; flex-direction: column; gap: 2px;
}
.sc-amt-paid   { border-color: rgba(16,185,129,.2); background: rgba(16,185,129,.06); }
.sc-amt-pending { border-color: rgba(245,158,11,.2); background: rgba(245,158,11,.06); }
.sc-amt-val  { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.sc-amt-paid .sc-amt-val   { color: #10B981; }
.sc-amt-pending .sc-amt-val { color: #F59E0B; }
.sc-amt-lbl  { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }

/* Progress */
.sc-progress-wrap  { margin-bottom: 10px; }
.sc-progress-track { height: 8px; background: rgba(255,255,255,.08); border-radius: 99px; overflow: hidden; margin-bottom: 6px; }
.sc-progress-fill  { height: 100%; border-radius: 99px; transition: width .4s ease; }
.sc-progress-meta  { display: flex; justify-content: space-between; align-items: center; font-size: 11px; flex-wrap: wrap; gap: 4px; }

/* Action buttons */
.sc-monthly-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.sc-action-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 12px; border-radius: 7px;
    font-size: 12px; font-weight: 600; cursor: pointer;
    border: 1px solid; transition: opacity .15s;
}
.sc-action-btn:disabled { opacity: .5; cursor: default; }
.sc-btn-agr {
    background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.35); color: #F59E0B;
}
.sc-btn-toggle {
    background: rgba(124,58,237,.1); border-color: rgba(124,58,237,.35); color: var(--purple-soft);
    flex: 1; justify-content: center;
}
.sc-btn-toggle:hover { background: rgba(124,58,237,.2); }
.sc-btn-invoice {
    background: rgba(6,182,212,.1); border-color: rgba(6,182,212,.3); color: #06B6D4;
}

/* Collapsible schedule list */
.sc-schedule-list {
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.sc-schedule-thead {
    display: grid;
    grid-template-columns: 36px 1fr 110px 120px 110px;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255,255,255,.05);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
}
@media (max-width: 600px) {
    .sc-schedule-thead { grid-template-columns: 26px 1fr 80px 90px 80px; font-size: 9px; padding: 7px 10px; }
}
.sc-inst-row {
    display: grid;
    grid-template-columns: 36px 1fr 110px 120px 110px;
    gap: 8px;
    align-items: center;
    padding: 10px 14px;
    border-top: 1px solid rgba(255,255,255,.04);
    transition: background .1s;
}
@media (max-width: 600px) {
    .sc-inst-row { grid-template-columns: 26px 1fr 80px 90px 80px; font-size: 11px; padding: 9px 10px; }
}
.sc-inst-row--paid    { background: rgba(16,185,129,.03); }
.sc-inst-row--overdue { background: rgba(220,38,38,.05); }
.sc-inst-row--pending {}

.sc-inst-num    { font-size: 12px; font-weight: 700; color: var(--text-muted); text-align: center; }
.sc-inst-info   { display: flex; flex-direction: column; gap: 1px; }
.sc-inst-due    { font-size: 12px; color: var(--text-secondary); }
.sc-inst-paid   { font-size: 10px; color: #34D399; }
.sc-inst-amount { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.sc-inst-status {}
.sc-inst-btns   { display: flex; gap: 4px; align-items: center; justify-content: flex-end; }
.sc-btn-invoice-sm {
    background: rgba(6,182,212,.1); border: 1px solid rgba(6,182,212,.25);
    color: #06B6D4; border-radius: 5px;
    padding: 3px 6px; font-size: 12px; cursor: pointer;
}
.sc-btn-pay {
    background: rgba(124,58,237,.12); border: 1px solid rgba(124,58,237,.3);
    color: var(--purple-soft); border-radius: 5px;
    padding: 3px 8px; font-size: 11px; font-weight: 600; cursor: pointer;
}
.sc-btn-pay:hover:not(:disabled)  { background: rgba(124,58,237,.25); }

/* ── Schedule modal summary ─────────────────────────────────────── */
.sched-summary {
    display: flex;
    gap: 0;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}
.sched-kpi {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 10px;
    border-right: 1px solid var(--border);
}
.sched-kpi:last-child { border-right: none; }
.sched-kpi-val {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}
.sched-kpi-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    margin-top: 3px;
}

/* ── Schedule card ──────────────────────────────────────────────── */
.sched-card {
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
}
.sched-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

/* ── Contribution card ──────────────────────────────────────────── */
.contrib-card {
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
}
.contrib-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.contrib-card-meta { display: flex; flex-direction: column; gap: 2px; }
.contrib-ref { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.contrib-date { font-size: 11px; color: var(--text-muted); }
.contrib-card-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.contrib-type-badge {
    font-size: 11px; font-weight: 600; padding: 3px 9px;
    border-radius: 20px; border: 1px solid;
}
.badge-monthly { color: #7C3AED; background: rgba(124,58,237,.12); border-color: rgba(124,58,237,.3); }
.badge-single  { color: #06B6D4; background: rgba(6,182,212,.12);  border-color: rgba(6,182,212,.3); }

.contrib-amounts {
    display: flex; gap: 16px; flex-wrap: wrap;
    padding: 10px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}
.contrib-amt-item { display: flex; flex-direction: column; gap: 2px; }
.contrib-amt-label { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.contrib-amt-val { font-size: 14px; font-weight: 700; color: var(--text-primary); }

.contrib-progress-wrap { margin-bottom: 12px; }
.contrib-progress-track {
    height: 6px; background: rgba(255,255,255,.08);
    border-radius: 99px; overflow: hidden; margin-bottom: 4px;
}
.contrib-progress-fill {
    height: 100%; border-radius: 99px;
    background: linear-gradient(90deg, #7C3AED, #06B6D4);
    transition: width .4s ease;
}
.contrib-progress-pct { font-size: 11px; color: var(--text-muted); }

.contrib-overdue-warn {
    background: rgba(220,38,38,.1);
    border: 1px solid rgba(220,38,38,.3);
    color: #FCA5A5;
    font-size: 12px; padding: 8px 12px;
    border-radius: 8px; margin-bottom: 12px;
}

/* ── Installment schedule ────────────────────────────────────────── */
.inst-schedule { margin-top: 4px; }
.inst-schedule-header {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 12px; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .06em;
    margin-bottom: 8px; flex-wrap: wrap; gap: 6px;
}
.inst-summary-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.inst-chip {
    font-size: 10px; font-weight: 600; padding: 2px 7px;
    border-radius: 20px;
}
.inst-chip-paid    { background: rgba(16,185,129,.15); color: #34D399; }
.inst-chip-pending { background: rgba(59,130,246,.15); color: #60A5FA; }
.inst-chip-overdue { background: rgba(220,38,38,.15);  color: #F87171; }

.inst-rows { display: flex; flex-direction: column; gap: 1px; }

.inst-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 9px 10px; border-radius: 8px; gap: 10px;
    background: rgba(255,255,255,.02);
    border: 1px solid transparent;
    flex-wrap: wrap;
}
.inst-row.paid    { border-color: rgba(16,185,129,.15); }
.inst-row.pending { border-color: rgba(59,130,246,.1); }
.inst-row.overdue { border-color: rgba(220,38,38,.25); background: rgba(220,38,38,.04); }

.inst-row-left  { display: flex; align-items: center; gap: 10px; }
.inst-row-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.inst-no {
    font-size: 12px; font-weight: 700;
    color: var(--text-muted); min-width: 24px;
}
.inst-dates { display: flex; flex-direction: column; gap: 1px; }
.inst-due      { font-size: 12px; color: var(--text-secondary); }
.inst-paid-on  { font-size: 11px; color: #34D399; }
.inst-amount   { font-size: 13px; font-weight: 700; color: var(--text-primary); }

.inst-status-chip {
    font-size: 10px; font-weight: 700;
    padding: 2px 8px; border-radius: 20px;
    white-space: nowrap;
}

.inst-actions { display: flex; gap: 5px; align-items: center; }
.inst-btn {
    font-size: 11px; font-weight: 600; padding: 3px 9px;
    border-radius: 6px; border: 1px solid; cursor: pointer;
    transition: opacity .15s;
}
.inst-btn:disabled { opacity: .5; cursor: default; }
.inst-btn-pay {
    background: rgba(124,58,237,.15);
    border-color: rgba(124,58,237,.4);
    color: var(--purple-soft);
}
.inst-btn-pay:hover:not(:disabled) { background: rgba(124,58,237,.28); }
.inst-btn-invoice {
    background: rgba(6,182,212,.1);
    border-color: rgba(6,182,212,.3);
    color: #06B6D4; font-size: 13px; padding: 2px 7px;
}
.inst-btn-agr {
    background: rgba(245,158,11,.1);
    border-color: rgba(245,158,11,.3);
    color: #F59E0B; font-size: 11px;
}

/* ── Statement agreement download button ───────────────────────── */
.stmt-agr-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    padding: 4px 10px;
    background: rgba(124,58,237,.12);
    border: 1px solid rgba(124,58,237,.3);
    border-radius: 6px;
    color: var(--purple-soft);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.stmt-agr-btn:hover:not(:disabled) { background: rgba(124,58,237,.22); }
.stmt-agr-btn:disabled { opacity: .55; cursor: default; }

/* ── Contributors modal ─────────────────────────────────────────── */
/* ── Contributors modal — new advanced card layout ──────────────── */
.ctb-header { margin-bottom: 14px; }
.ctb-summary {
    display: flex;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}
.ctb-kpi {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    padding: 12px 8px; border-right: 1px solid var(--border);
}
.ctb-kpi:last-child { border-right: none; }
.ctb-kpi-val { font-size: 17px; font-weight: 800; color: var(--text-primary); }
.ctb-kpi-lbl { font-size: 10px; text-transform: uppercase; letter-spacing:.06em; color: var(--text-muted); margin-top: 2px; }

.ctb-list { display: flex; flex-direction: column; gap: 8px; }

/* Contributor card */
.ctb-card {
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color .15s;
}
.ctb-card:hover { border-color: rgba(124,58,237,.35); }

/* Summary row (always visible, click to expand) */
.ctb-row {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; cursor: pointer;
    flex-wrap: wrap;
}
.ctb-medal { font-size: 18px; width: 26px; text-align: center; flex-shrink: 0; }
.ctb-avatar {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg,#7C3AED,#9333EA);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: #fff;
    overflow: hidden;
}
.ctb-avatar img {
    width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
}
.ctb-info { flex: 1; min-width: 0; }
.ctb-name { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.ctb-handle { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.ctb-chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.ctb-type-chip {
    font-size: 10px; font-weight: 600; padding: 2px 7px;
    border-radius: 20px; border: 1px solid;
}
.ctb-chip-single  { color:#06B6D4; background:rgba(6,182,212,.1);  border-color:rgba(6,182,212,.3); }
.ctb-chip-monthly { color:#7C3AED; background:rgba(124,58,237,.1); border-color:rgba(124,58,237,.3); }
.ctb-chip-agr     { color:#F59E0B; background:rgba(245,158,11,.1); border-color:rgba(245,158,11,.3); }

.ctb-amounts { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }
.ctb-committed  { font-size: 15px; font-weight: 800; color: var(--text-primary); }
.ctb-paid-lbl   { font-size: 10px; color: #10B981; }
.ctb-pending-lbl{ font-size: 10px; color: #F59E0B; }
.ctb-expand-icon { flex-shrink: 0; color: var(--text-muted); transition: transform .2s; }

/* Progress bar (always visible below summary row) */
.ctb-prog-wrap {
    display: flex; align-items: center; gap: 8px;
    padding: 0 14px 10px;
}
.ctb-prog-track {
    flex: 1; height: 5px;
    background: rgba(255,255,255,.07); border-radius: 99px; overflow: hidden;
}
.ctb-prog-fill {
    height: 100%; border-radius: 99px;
    background: linear-gradient(90deg,#7C3AED,#06B6D4);
    transition: width .4s;
}
.ctb-prog-pct { font-size: 10px; color: var(--text-muted); flex-shrink: 0; }

/* Collapsible detail panel */
.ctb-detail { border-top: 1px solid var(--border); padding: 12px 14px; }
.ctb-detail-actions {
    display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px;
}
.ctb-action-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 12px; border-radius: 7px;
    font-size: 12px; font-weight: 600; cursor: pointer;
    border: 1px solid; transition: opacity .15s;
}
.ctb-btn-stmt {
    background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.3); color: #F59E0B;
}
.ctb-btn-stmt:hover  { background: rgba(245,158,11,.18); }
.ctb-btn-sched {
    background: rgba(124,58,237,.1); border-color: rgba(124,58,237,.3); color: var(--purple-soft);
}
.ctb-btn-sched:hover { background: rgba(124,58,237,.2); }

/* Keep old class names working (used in avatarInitials calls elsewhere) */
.contrib-list-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; padding:0 4px; }
.contrib-count  { font-size:13px; font-weight:700; color:var(--text); }
.contrib-hint   { font-size:11px; color:var(--text-muted); }
.contrib-rows   { display:flex; flex-direction:column; gap:2px; }
.contrib-avatar-circle { width:38px;height:38px;border-radius:50%;background:linear-gradient(135deg,var(--purple),#9333EA);display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700;color:#fff;flex-shrink:0; }

/* ── Misc utilities ────────────────────────────────────────────── */
.text-muted { color: var(--text-muted); font-size: 13px; }

/* ── Bottom nav (mobile) ───────────────────────────────────────── */
.cine-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 260px; right: 0;
  height: 60px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 100;
}
@media (max-width: 768px) {
  .cine-bottom-nav {
    left: 0;
  }
}

.cine-bottom-nav ul {
  display: flex;
  height: 100%;
  list-style: none;
}

.cine-bottom-nav li { flex: 1; }

.cine-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  gap: 3px;
  transition: var(--transition);
}

.cine-bottom-nav a svg { width: 22px; height: 22px; }
.cine-bottom-nav a.active, .cine-bottom-nav a:hover { color: var(--purple-soft); }

/* ── Notification badge ────────────────────────────────────────── */
.notif-badge-wrap { position: relative; }

.notif-badge {
  position: absolute;
  top: -4px; right: -6px;
  width: 18px; height: 18px;
  background: var(--pink);
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--surface);
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .cine-feed-layout { grid-template-columns: 1fr; }
  .feed-right-sidebar { display: none; }
  .invest-explore-layout { grid-template-columns: 1fr; }
  .invest-sidebar { display: none; }
  .portfolio-overview-card { grid-template-columns: 1fr; }
  .portfolio-overview-stats { justify-content: flex-start; }
}

@media (max-width: 768px) {
  .cine-sidebar { display: none; }
  .cine-main   { margin-left: 0; padding-bottom: 60px; }
  .cine-bottom-nav { display: block; }
  .cine-content { padding: 16px; }

  .projects-grid { grid-template-columns: 1fr; }
  #profile-posts-grid { grid-template-columns: repeat(3, 1fr); }

  .auth-card { padding: 24px 20px; }
  .detail-title-row h2 { font-size: 18px; }
  .invest-form { flex-direction: column; }

  .profile-stats { gap: 20px; }
  .summary-cards { grid-template-columns: 1fr; }
  .portfolio-investment-card { grid-template-columns: 1fr; }
  .pi-actions { flex-direction: row; }
}

@media (max-width: 480px) {
  .post-title  { font-size: 15px; }
  .action-btn  { padding: 6px 10px; font-size: 12px; }
  .modal-box   { max-height: 95vh; }
}

/* ── Create-Project Stepper ──────────────────────────────────────────────── */
.proj-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
  padding: 20px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.proj-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.proj-step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  background: var(--surface);
  border: 2px solid var(--border);
  color: var(--text-muted);
  transition: all .25s;
}

.proj-step-item.active .proj-step-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 12px rgba(124,58,237,.4);
}

.proj-step-item.completed .proj-step-circle {
  background: #10B981;
  border-color: #10B981;
  color: #fff;
}

.proj-step-item.completed .proj-step-circle::before {
  content: '✓';
}

.proj-step-item.completed .proj-step-circle { font-size: 0; }
.proj-step-item.completed .proj-step-circle::before { font-size: 14px; }

.proj-step-label {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 500;
  transition: color .25s;
}

.proj-step-item.active .proj-step-label {
  color: var(--primary);
  font-weight: 600;
}

.proj-step-item.completed .proj-step-label {
  color: #10B981;
}

.proj-step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 8px;
  margin-bottom: 22px;
  transition: background .25s;
}

/* ── Create-Project Section ──────────────────────────────────────────────── */
.proj-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}

.proj-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.proj-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.proj-section-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(124,58,237,.12);
  color: var(--primary);
  border: 1px solid rgba(124,58,237,.25);
}

/* ── Step navigation row ─────────────────────────────────────────────────── */
.proj-step-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ── Form hint text ──────────────────────────────────────────────────────── */
.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 5px;
  margin-bottom: 0;
}

/* ── Draft Cards ─────────────────────────────────────────────────────────── */
.drafts-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.draft-card {
  background: var(--card);
  border: 1px solid rgba(245,158,11,.3);
  border-radius: 14px;
  overflow: hidden;
}

.draft-card-media {
  max-height: 180px;
  overflow: hidden;
}

.draft-card-media .post-media-video {
  border-radius: 0;
  max-height: 180px;
}

.draft-card-body {
  padding: 16px;
}

.draft-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.draft-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.draft-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.draft-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(245,158,11,.15);
  color: #F59E0B;
  border: 1px solid rgba(245,158,11,.35);
}

.draft-card-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.draft-card-meta strong {
  color: var(--text-secondary);
}

.draft-card-actions {
  display: flex;
  gap: 10px;
}

.draft-card-actions .btn {
  flex: 1;
}

/* ── E-Signature field ───────────────────────────────────────────────────── */
.esign-field {
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--surface);
  min-height: 64px;
  display: flex;
  align-items: center;
}

.esign-trigger-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  color: var(--purple);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  transition: opacity .15s;
}
.esign-trigger-btn:hover { opacity: .75; }

.esign-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.esign-preview img {
  height: 48px;
  max-width: 220px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  padding: 4px 8px;
  border: 1px solid var(--border);
}
.esign-clear-btn {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.3);
  color: #ef4444;
  border-radius: 6px;
  width: 28px; height: 28px;
  font-size: 13px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
}
.esign-clear-btn:hover { background: rgba(239,68,68,.2); }

/* ── E-Sign canvas modal ─────────────────────────────────────────────────── */
.esign-canvas-wrap {
  position: relative;
  border: 2px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  cursor: crosshair;
  touch-action: none;
}
#esign-canvas {
  display: block;
  width: 100%;
  height: 200px;
}
.esign-canvas-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #aaa;
  pointer-events: none;
  margin: 0;
}
.esign-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}
.btn-sm {
  padding: 8px 18px;
  font-size: 13px;
}

/* ── Two-column form row ─────────────────────────────────────────────────── */
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 480px) {
  .form-row-2 { grid-template-columns: 1fr; }
}

/* ── Investment Method Chips (Create Project Step 2) ─────────────────────── */
.method-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.method-chips-loading {
  font-size: 12px;
  color: var(--text-muted);
}
.method-chip {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1.4;
}
.method-chip:hover {
  border-color: var(--purple);
  color: var(--text-primary);
}
.method-chip.active {
  background: rgba(139,92,246,0.15);
  border-color: rgba(139,92,246,0.5);
  color: var(--purple);
  font-weight: 500;
}

/* ── Agreement / Documentation Panel ──────────────────────────── */
.agr-doc {
  background: #fff;
  color: #111;
  border-radius: 10px;
  padding: 24px 20px 16px;
  border: 1px solid #e0e0e0;
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 13px;
  line-height: 1.6;
}

.agr-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.agr-logo { height: 44px; width: 44px; object-fit: cover; border-radius: 8px; display: block; }

.agr-logo-text {
  font-size: 22px;
  font-weight: 900;
  color: #7C3AED;
  letter-spacing: -.5px;
}

.agr-header-titles { flex: 1; }

.agr-title {
  font-size: 17px;
  font-weight: 800;
  color: #111;
  margin: 0;
}

.agr-subtitle {
  font-size: 11px;
  color: #888;
  margin: 2px 0 0;
}

.agr-divider {
  border: none;
  border-top: 2px solid #7C3AED;
  margin: 14px 0;
  opacity: .4;
}

.agr-section { margin-bottom: 20px; }

.agr-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #7C3AED;
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid #ede9ff;
}

.agr-kv-grid {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 5px 10px;
}

.agr-kv-label { color: #555; font-weight: 600; font-size: 12px; }
.agr-kv-val   { color: #111; font-size: 12px; }

.agr-terms-body {
  font-size: 12px;
  line-height: 1.75;
  color: #333;
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 12px 14px;
  max-height: 160px;
  overflow-y: auto;
}

.agr-schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 4px;
}
.agr-schedule-table th,
.agr-schedule-table td {
  border: 1px solid #e0e0e0;
  padding: 6px 10px;
  text-align: left;
}
.agr-schedule-table thead th {
  background: #f3eeff;
  font-weight: 700;
  color: #7C3AED;
}
.agr-schedule-total td {
  font-weight: 700;
  background: #f3eeff;
  color: #7C3AED;
}

/* Signatures row */
.agr-signatures {
  display: flex;
  gap: 20px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px dashed #ccc;
}

.agr-sig-block {
  flex: 1;
  text-align: center;
}

.agr-sig-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #555;
  margin-bottom: 8px;
}

.agr-sig-box {
  border: 1px solid #ccc;
  border-radius: 6px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fafafa;
  margin-bottom: 6px;
  position: relative;
}

.agr-sig-img {
  max-height: 86px;
  max-width: 100%;
  object-fit: contain;
}

.agr-sig-empty {
  font-size: 11px;
  color: #bbb;
  font-style: italic;
}

.agr-sig-canvas-wrap { cursor: crosshair; background: #fff; }

.agr-sig-hint {
  position: absolute;
  font-size: 11px;
  color: #bbb;
  pointer-events: none;
}

#agr-esign-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.agr-sig-actions {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

.agr-sig-name {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
}

/* Footer actions */
.agr-footer-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.agr-footer-actions .btn { width: 100%; justify-content: center; }

.btn-xs { font-size: 11px; padding: 4px 10px; border-radius: 6px; }


/* ── Investor e-sign popup (agreement panel) ───────────────────── */
.agr-esign-canvas-wrap {
  position: relative;
  background: #fff;
  border: 1.5px dashed #ccc;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
  cursor: crosshair;
}

#agr-esign-canvas {
  display: block;
  width: 100%;
  height: 200px;
}

.agr-esign-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 13px;
  color: #bbb;
  pointer-events: none;
  user-select: none;
}

.agr-esign-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.agr-logo-wrap {
  display: flex;
  align-items: center;
}

/* ── Plans & Subscriptions page ────────────────────────────────── */
.plans-loader { display:flex; justify-content:center; padding:48px; }

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 8px;
}

.plan-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 24px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  transition: border-color .2s, box-shadow .2s;
}

.plan-card--active {
  border-color: rgba(124,58,237,.6);
  box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}

.plan-active-ribbon {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(124,58,237,.18);
  color: #a78bfa;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(124,58,237,.35);
}

.plan-card-header { display: flex; flex-direction: column; gap: 4px; }

.plan-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.plan-cost-free  { font-size: 22px; font-weight: 900; color: #10b981; }
.plan-cost-price { font-size: 22px; font-weight: 900; color: var(--purple-soft, #a78bfa); }

.plan-duration {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.plan-description {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.plan-feat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.plan-feat-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.plan-feat > span:nth-child(2) { flex: 1; }

.plan-feat-val {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 12px;
}

.plan-feat-unlimited { color: #7c3aed; }

.plan-apply-btn { margin-top: auto; }

.btn-success {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  border: none;
}
.btn-success:disabled { opacity: .75; cursor: default; }

.plan-btn--applied { cursor: default !important; }
.plan-btn--paid { background: linear-gradient(135deg,#7C3AED,#5B21B6); font-weight:600; letter-spacing:.02em; }
.plan-btn--paid:hover { background: linear-gradient(135deg,#6D28D9,#4C1D95); }

.plan-msg {
  font-size: 12px;
  text-align: center;
  margin: 0;
  min-height: 16px;
}
.plan-msg.success { color: #10b981; }
.plan-msg.error   { color: #f87171; }

/* ── Subscription history ─────────────────────────────────────────────────── */
.section-divider { border-top: 1px solid var(--border); padding-top: 8px; }
.section-title   { font-size: 18px; font-weight: 700; color: var(--text-primary, #111); margin-bottom: 4px; }
.section-subtitle { font-size: 13px; color: var(--text-muted, #6b7280); }

.sub-hist-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 14px;
  transition: box-shadow .2s;
}
.sub-hist-card:hover { box-shadow: 0 4px 16px rgba(124,58,237,.08); }
.sub-hist-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.sub-hist-plan { font-size: 16px; font-weight: 700; color: var(--text-primary, #111); margin-bottom: 6px; }
.sub-hist-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.sub-hist-chip { font-size: 11px; font-weight: 600; border-radius: 20px; padding: 3px 10px; }
.sub-hist-chip--active   { background: #D1FAE5; color: #065F46; }
.sub-hist-chip--expired  { background: #FEE2E2; color: #991B1B; }
.sub-hist-chip--inactive { background: #F3F4F6; color: #6B7280; }
.sub-hist-chip--paid     { background: #EDE9FE; color: #5B21B6; }
.sub-hist-chip--free     { background: #E0F2FE; color: #0369A1; }
.sub-hist-right { text-align: right; }
.sub-hist-cost  { font-size: 18px; font-weight: 800; color: #7C3AED; }
.sub-hist-valid { font-size: 12px; color: var(--text-muted, #6b7280); margin-top: 2px; }
.sub-hist-meta  { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--text-muted, #6b7280); margin-bottom: 14px; }
.sub-hist-txn   { font-family: monospace; font-size: 11px; color: #7C3AED; background: #f5f3ff; border-radius: 6px; padding: 2px 7px; }
.sub-hist-actions { display: flex; gap: 10px; }
.sub-hist-invoice-btn { font-size: 13px; padding: 7px 16px; border-radius: 8px; }

/* Current plan banner */
.current-plan-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(124,58,237,.1);
  border: 1px solid rgba(124,58,237,.3);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
}

.current-plan-badge {
  background: rgba(124,58,237,.2);
  color: #a78bfa;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  border: 1px solid rgba(124,58,237,.35);
}

.current-plan-info { display: flex; flex-direction: column; gap: 2px; }

.current-plan-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.current-plan-meta {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── No-plan gate (create-post / create-project pages) ─────────── */
.no-plan-gate {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
    padding: 48px 24px;
    background: var(--card);
    border: 1.5px dashed var(--border);
    border-radius: var(--radius);
    margin: 16px 0;
}
.no-plan-gate-icon { font-size: 40px; line-height: 1; }
.no-plan-gate-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}
.no-plan-gate-msg {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 320px;
    margin: 0;
    line-height: 1.5;
}

/* ── No-plan toast (feed contact block) ─────────────────────────── */
.no-plan-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1E1B4B;
    border: 1px solid rgba(124,58,237,.5);
    border-radius: 12px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-primary);
    box-shadow: 0 8px 32px rgba(0,0,0,.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s, transform .25s;
    z-index: 9999;
    white-space: nowrap;
}
.no-plan-toast.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.no-plan-toast-link {
    color: var(--purple-soft);
    font-weight: 600;
    text-decoration: none;
    flex-shrink: 0;
}
.no-plan-toast-link:hover { text-decoration: underline; }

/* ── Usage card ──────────────────────────────────────────────────── */
.usage-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}

.usage-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 12px;
}

.usage-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.usage-plan-badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--purple-soft);
    background: rgba(124,58,237,.15);
    border: 1px solid rgba(124,58,237,.3);
    border-radius: 20px;
    padding: 2px 10px;
    white-space: nowrap;
}
.usage-plan-badge.usage-no-plan {
    color: var(--text-muted);
    background: rgba(255,255,255,.05);
    border-color: var(--border);
}

.usage-period-row { margin-bottom: 14px; }
.usage-period {
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(255,255,255,.05);
    border-radius: 6px;
    padding: 3px 8px;
}
.usage-no-plan-msg {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 14px;
    line-height: 1.5;
}
.usage-rows { display: flex; flex-direction: column; gap: 14px; }

.usage-row {}

.usage-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.usage-label {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}
.usage-icon { font-size: 14px; }

.usage-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}
.usage-count.usage-danger { color: var(--rose); }

.usage-unlimited {
    font-size: 12px;
    color: #10B981;
    font-weight: 600;
}

.usage-track {
    height: 7px;
    background: rgba(255,255,255,.08);
    border-radius: 99px;
    overflow: hidden;
}

.usage-fill {
    height: 100%;
    border-radius: 99px;
    transition: width .4s ease;
    min-width: 0;
}

.usage-pct {
    font-size: 11px;
    margin-top: 3px;
    text-align: right;
}

/* ── Contact Details — create-post form ───────────────────────── */
.form-section-divider {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  padding: 10px 0 6px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

/* ── Contact reveal — feed post ───────────────────────────────── */
.post-contact-reveal {
  padding: 0 16px 12px;
}

.contact-reveal-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  background: rgba(124,58,237,.07);
  border: 1px solid rgba(124,58,237,.2);
  border-radius: 10px;
  padding: 10px 14px;
}

.contact-reveal-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  width: 100%;
}

.contact-reveal-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #a78bfa;
  text-decoration: none;
  background: rgba(124,58,237,.12);
  border: 1px solid rgba(124,58,237,.25);
  border-radius: 8px;
  padding: 5px 12px;
  transition: background .15s;
}

.contact-reveal-item:hover {
  background: rgba(124,58,237,.22);
  color: #c4b5fd;
}

.contact-reveal-item svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.action-btn.contact-btn { color: #a78bfa; }
.action-btn.contact-btn:hover { color: #c4b5fd; background: rgba(124,58,237,.12); }

/* ── Notification Panel ──────────────────────────────────────────────────── */
.notif-badge-wrap { position: relative; }

.notif-badge {
  position: absolute;
  top: 6px; right: 6px;
  min-width: 18px; height: 18px;
  background: #ef4444;
  color: #fff;
  font-size: 10px; font-weight: 700;
  border-radius: 99px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--surface);
  pointer-events: none;
  line-height: 1;
}

.notif-panel {
  position: fixed;
  bottom: 80px; left: 220px;
  width: 340px;
  max-height: 480px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,.35);
  z-index: 1000;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: notifFadeIn .18s ease;
}

@keyframes notifFadeIn {
  from { opacity: 0; transform: translateY(8px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.notif-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.notif-panel-title {
  font-size: 14px; font-weight: 700; color: var(--text-primary);
}
.notif-panel-actions {
  display: flex; align-items: center; gap: 8px;
}
.notif-mark-all-btn {
  font-size: 11px; color: var(--accent-purple);
  background: none; border: none; cursor: pointer; padding: 2px 6px;
  border-radius: 6px;
}
.notif-mark-all-btn:hover { background: rgba(124,58,237,.12); }
.notif-panel-close {
  width: 26px; height: 26px;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 14px;
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
}
.notif-panel-close:hover { background: var(--surface); color: var(--text-primary); }

.notif-list {
  flex: 1; overflow-y: auto;
  padding: 6px 0;
}

.notif-item {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 11px 16px;
  cursor: pointer;
  transition: background .12s;
  position: relative;
}
.notif-item:hover { background: rgba(255,255,255,.04); }
.notif-item.unread { background: rgba(124,58,237,.06); }
.notif-item.unread:hover { background: rgba(124,58,237,.1); }

.notif-item-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.notif-icon-invest  { background: rgba(16,185,129,.15);  color: #10b981; }
.notif-icon-follow  { background: rgba(124,58,237,.15);  color: #8b5cf6; }
.notif-icon-like    { background: rgba(239,68,68,.15);   color: #ef4444; }
.notif-icon-comment { background: rgba(14,165,233,.15);  color: #0ea5e9; }
.notif-icon-default { background: rgba(156,163,175,.15); color: #9ca3af; }

.notif-item-body { flex: 1; min-width: 0; }
.notif-item-msg {
  font-size: 13px; color: var(--text-primary); line-height: 1.4;
  word-break: break-word;
}
.notif-item.unread .notif-item-msg { font-weight: 600; }
.notif-item-time {
  font-size: 11px; color: var(--text-muted); margin-top: 3px;
}

.notif-unread-dot {
  width: 7px; height: 7px;
  background: var(--accent-purple);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.notif-empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.notif-backdrop {
  position: fixed; inset: 0;
  z-index: 999;
}

@media (max-width: 768px) {
  .notif-panel {
    left: 12px; right: 12px; width: auto;
    bottom: 70px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════════
   GEMZOOM AD ENGINE — Component Styles
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Common ─────────────────────────────────────────────────────────────────── */
.gz-ad-slot { width: 100%; }

.gz-ad {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  transition: box-shadow .2s;
}
.gz-ad:hover { box-shadow: 0 6px 30px rgba(0,0,0,.28); }

.gz-ad-label {
  position: absolute;
  top: 8px; left: 10px;
  font-size: 9px; font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(124,58,237,.75);
  padding: 2px 7px;
  border-radius: 99px;
  pointer-events: none;
  z-index: 1;
}

/* ── Banner Ad — full-width image/video with overlay ────────────────────────── */
.gz-banner-ad {
  position: relative;
  width: 100%;
  min-height: 180px;
  margin-bottom: 14px;
  overflow: hidden;
  border-radius: 14px;
  cursor: default;
  background: var(--surface);
}

/* Full-bleed media fills the entire card */
.gz-banner-media {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center;
}

/* Gradient overlay sits on top of the image */
.gz-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 35%,
    rgba(0,0,0,0.45) 60%,
    rgba(0,0,0,0.82) 100%
  );
  display: flex;
  align-items: flex-end;
}

.gz-banner-overlay-content {
  padding: 16px 18px 18px;
  width: 100%;
}

.gz-banner-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
  line-height: 1.3;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.gz-banner-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.82);
  margin: 0 0 10px;
  line-height: 1.4;
}

.gz-banner-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--accent-purple, #7C3AED);
  border: none;
  border-radius: 8px;
  padding: 7px 16px;
  cursor: pointer;
  letter-spacing: .02em;
  transition: opacity .15s, transform .15s;
}
.gz-banner-cta-btn:hover { opacity: .88; transform: translateY(-1px); }

/* Text-only fallback (no image) */
.gz-banner-text-only {
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gz-banner-text-only .gz-banner-title { color: var(--text-primary); text-shadow: none; }
.gz-banner-text-only .gz-banner-desc  { color: var(--text-muted); }

/* Sponsored label stays on top of everything */
.gz-banner-ad > .gz-ad-label { z-index: 2; }

/* Legacy alias kept for backward compat */
.gz-ad-cta {
  font-size: 12px; font-weight: 600;
  color: var(--accent-purple);
  cursor: pointer;
}

/* ── Feed Ad Card ───────────────────────────────────────────────────────────── */
.gz-feed-ad {
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}
.gz-feed-ad-media { width: 100%; }
.gz-feed-ad-img   { width: 100%; max-height: 280px; object-fit: cover; display: block; }
.gz-feed-ad-video { width: 100%; max-height: 280px; display: block; }
.gz-feed-ad-body  { padding: 14px 16px; }
.gz-feed-ad-title {
  font-size: 15px; font-weight: 700; color: var(--text-primary); margin: 0 0 5px;
}
.gz-feed-ad-desc {
  font-size: 13px; color: var(--text-muted); margin: 0 0 10px;
}
.gz-feed-ad-btn {
  font-size: 12px; font-weight: 600;
  color: #fff;
  background: var(--accent-purple);
  border: none; border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  transition: opacity .15s;
}
.gz-feed-ad-btn:hover { opacity: .85; }

/* ── Popup Ad ───────────────────────────────────────────────────────────────── */
.gz-popup-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: notifFadeIn .25s ease;
}
.gz-popup-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.gz-popup-close {
  position: absolute; top: 10px; right: 12px;
  width: 28px; height: 28px;
  border: none; background: rgba(0,0,0,.4);
  color: #fff; border-radius: 50%;
  cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  line-height: 1;
}
.gz-popup-media { width: 100%; }
.gz-popup-img   { width: 100%; max-height: 260px; object-fit: cover; display: block; }
.gz-popup-video { width: 100%; max-height: 260px; display: block; }
.gz-popup-body  { padding: 16px 18px 20px; }
.gz-popup-title {
  font-size: 16px; font-weight: 700; color: var(--text-primary); margin: 0 0 6px;
}
.gz-popup-desc  {
  font-size: 13px; color: var(--text-muted); margin: 0 0 14px;
}
.gz-popup-cta {
  width: 100%;
  font-size: 14px; font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #7C3AED 0%, #ec4899 100%);
  border: none; border-radius: 10px;
  padding: 10px 0;
  cursor: pointer;
  transition: opacity .15s;
}
.gz-popup-cta:hover { opacity: .88; }

/* ── Sidebar Ad ─────────────────────────────────────────────────────────────── */
.gz-sidebar-ad {
  margin-bottom: 14px;
  padding: 14px;
}
.gz-sidebar-ad-img {
  width: 100%; border-radius: 8px;
  object-fit: cover; max-height: 140px;
  display: block; margin-bottom: 10px;
}
.gz-sidebar-ad-title {
  font-size: 13px; font-weight: 700;
  color: var(--text-primary); margin: 0 0 4px;
}
.gz-sidebar-ad-desc {
  font-size: 11px; color: var(--text-muted); margin: 0 0 10px;
}
.gz-sidebar-ad-btn {
  font-size: 11px; font-weight: 600;
  color: var(--accent-purple);
  background: rgba(124,58,237,.1);
  border: 1px solid rgba(124,58,237,.25);
  border-radius: 7px;
  padding: 5px 12px;
  cursor: pointer;
  transition: background .15s;
}
.gz-sidebar-ad-btn:hover { background: rgba(124,58,237,.18); }

/* ── Compact ad (feed-right / sidebar-top) ────────────────────────── */
.gz-compact-ad {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  width: 100%;
}
.gz-compact-ad-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}
.gz-compact-ad-body {
  padding: 10px 12px 12px;
}
.gz-compact-ad-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #e2e8f0);
  margin: 0 0 8px;
  line-height: 1.3;
}

/* ── Vertical banner (right sidebar, sidebar-top) ──────────────────── */
.gz-vertical-ad {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  width: 100%;
}
.gz-vertical-ad-media {
  width: 100%;
  flex-shrink: 0;
}
.gz-vertical-ad-img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}
.gz-vertical-ad-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gz-vertical-ad-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.35;
}
.gz-vertical-ad-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}
.gz-vertical-ad-btn {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--accent-purple, #7C3AED);
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  margin-top: 2px;
  transition: opacity .15s;
}
.gz-vertical-ad-btn:hover { opacity: .85; }

/* ── Ad slot rotation wrapper — ensures correct height during swap ─── */
.gz-ad-slot { overflow: hidden; }

/* ── Feed bottom strip (full-width below cine-feed-layout) ─────────── */
.gz-feed-bottom-slot {
  grid-column: 1 / -1;  /* span all grid columns */
  margin-top: 16px;
  width: 100%;
}

/* ── Global fixed bottom bar ──────────────────────────────────────── */
.gz-global-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 260px;
  right: 0;
  z-index: 1200;
  height: 110px;
  overflow: hidden;
  background: #000;
}
.gz-global-bottom-ad {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.gz-bottom-bar-media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
/* Overlay: flex column — top row has close btn, bottom row has content */
.gz-bottom-bar-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.70) 0%,
    rgba(0,0,0,0.20) 40%,
    rgba(0,0,0,0.65) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: visible;
}
/* Top row: Ad label on left, Close button on right */
.gz-bottom-bar-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 4px;
  flex-shrink: 0;
}
.gz-ad-label-inline {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.65);
  letter-spacing: .06em;
  text-transform: uppercase;
  background: none;
  padding: 0;
}
.gz-bottom-bar-close-btn {
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  cursor: pointer;
  line-height: 1.5;
  transition: background .15s;
}
.gz-bottom-bar-close-btn:hover { background: rgba(200,30,30,0.85); }
/* Bottom row: title, desc, CTA */
.gz-bottom-bar-content-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 4px 12px 10px;
  flex-shrink: 0;
}
/* text-only overlay */
.gz-bottom-bar-overlay--text {
  position: relative;
  inset: unset;
  background: var(--surface, #13131A);
  border-top: 1px solid var(--border, #2D2D3F);
  height: 100%;
}
.gz-bottom-bar-body {
  flex: 1;
  min-width: 0;
}
.gz-bottom-bar-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.gz-bottom-bar-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.80);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gz-bottom-bar-cta {
  flex-shrink: 0;
  background: var(--purple, #7C3AED);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s;
}
.gz-bottom-bar-cta:hover { opacity: .85; }

@media (max-width: 768px) {
  .gz-banner-media { height: 160px; }
  .gz-global-bottom-bar {
    left: 0; /* full width on mobile — sidebar is hidden */
    bottom: 56px; /* above mobile bottom-nav */
  }
}

/* ══════════════════════════════════════════════════════════════════
   KYC Verification page
   ══════════════════════════════════════════════════════════════════ */

/* ── Rejection banner (shown above the resubmission form) ─────────── */
.kyc-rejection-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  margin-bottom: 20px;
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.3);
  border-radius: var(--radius-sm);
}
.kyc-rejection-icon { font-size: 20px; line-height: 1; flex-shrink: 0; }
.kyc-rejection-title { font-size: 14px; font-weight: 700; color: var(--rose); margin-bottom: 4px; }
.kyc-rejection-reason { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin: 0; }

/* ── Document upload grid (front / back / selfie) ──────────────────── */
.kyc-doc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 560px) {
  .kyc-doc-grid { grid-template-columns: 1fr; }
}

.kyc-doc-field { display: flex; flex-direction: column; gap: 6px; }
.kyc-doc-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); }

.kyc-doc-zone {
  padding: 20px 10px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kyc-doc-zone .drop-zone-icon { font-size: 26px; margin-bottom: 6px; }
.kyc-doc-zone .drop-zone-text { font-size: 12px; }

.kyc-doc-preview {
  display: none;
  width: 100%;
  max-height: 120px;
  object-fit: cover;
  border-radius: var(--radius);
}

/* ── Status card (approved / pending) ──────────────────────────────── */
.kyc-status-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 48px 24px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  margin: 16px 0;
}
.kyc-status-icon { font-size: 44px; line-height: 1; }
.kyc-status-title { font-size: 19px; font-weight: 700; color: var(--text-primary); }
.kyc-status-msg { font-size: 14px; color: var(--text-muted); max-width: 380px; margin: 0; line-height: 1.6; }
.kyc-status-meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.kyc-status-approved { border-color: rgba(16,185,129,.35); background: rgba(16,185,129,.06); }
.kyc-status-approved .kyc-status-title { color: var(--emerald); }

.kyc-status-pending { border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.06); }
.kyc-status-pending .kyc-status-title { color: var(--amber); }

/* ── Inline KYC gate (reused by investment.js / create-project.js) ─── */
.kyc-gate-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 28px 20px;
  background: rgba(245,158,11,.08);
  border: 1.5px dashed rgba(245,158,11,.4);
  border-radius: var(--radius);
  margin: 12px 0;
}
.kyc-gate-icon { font-size: 32px; line-height: 1; }
.kyc-gate-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.kyc-gate-msg { font-size: 13px; color: var(--text-muted); max-width: 340px; margin: 0; line-height: 1.5; }
