/* SONARA — Feed (shared across roles) */

.feed-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 20px 80px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feed-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }
.feed-h1 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 4px;
  color: var(--foreground);
}
.feed-sub { font-size: 13.5px; color: var(--muted-foreground); }

/* Tabs */
.feed-tabs {
  display: flex; align-items: center; gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--muted);
  border: 1px solid var(--border);
  width: fit-content;
}
.feed-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--muted-foreground);
  font-family: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all 140ms;
}
.feed-tab:hover { color: var(--foreground); }
.feed-tab.active {
  background: var(--card);
  color: var(--foreground);
  box-shadow: var(--shadow-sm);
}
.feed-algo {
  width: 26px; height: 26px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted-foreground);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: help;
  margin-left: 4px;
}
.feed-algo:hover { background: rgba(123,85,208,0.10); color: var(--violet-bright, #7b55d0); }

/* Composer (sticky pill) */
.feed-composer-pill {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px 12px 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  width: 100%;
  transition: all 160ms cubic-bezier(0.4, 0.0, 0.2, 1);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 4px 14px -8px rgba(46,24,102,0.10);
}
.feed-composer-pill:hover {
  border-color: rgba(123,85,208,0.40);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 8px 22px -10px rgba(46,24,102,0.22);
  transform: translateY(-1px);
}
.feed-composer-av {
  width: 36px; height: 36px;
  border-radius: 999px;
  background: linear-gradient(135deg, #6b4bb8, #2e1866);
  color: white;
  font-family: var(--font-display); font-weight: 700;
  font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.feed-composer-prompt {
  flex: 1;
  font-size: 13.5px;
  color: var(--muted-foreground);
}
.feed-composer-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--violet, #7b55d0);
  color: white;
  font-size: 12.5px; font-weight: 600;
  box-shadow: 0 4px 12px -4px rgba(123,85,208,0.5);
  flex-shrink: 0;
}

/* Filter chips above feed */
.feed-filter-chips {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: -4px;
}
.feed-chip {
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  font: 500 12.5px var(--font-sans);
  cursor: pointer;
  transition: all 140ms;
}
.feed-chip:hover { background: var(--muted); }
.feed-chip.active {
  background: var(--violet, #7b55d0);
  color: white;
  border-color: var(--violet, #7b55d0);
}

/* Stream */
.feed-stream { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }

/* Card */
.feed-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 160ms;
}
.feed-card:hover { border-color: color-mix(in oklab, var(--border) 60%, var(--muted-foreground) 40%); }

/* Author header */
.feed-author {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 14px 16px 0;
}
.feed-av {
  width: 40px; height: 40px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  color: white;
  font-family: var(--font-display); font-weight: 700;
  font-size: 13.5px;
}
.feed-av.art-0 { background: linear-gradient(135deg, #41228e, #6b4bb8); }
.feed-av.art-1 { background: linear-gradient(135deg, #2e1866, #16a34a); }
.feed-av.art-2 { background: linear-gradient(135deg, #6b4bb8, #ec4899); }
.feed-av.art-3 { background: linear-gradient(135deg, #f59e0b, #41228e); }
.feed-av.art-4 { background: linear-gradient(135deg, #16a34a, #41228e); }
.feed-av.art-5 { background: linear-gradient(135deg, #0ea5e9, #6b4bb8); }

.feed-author-meta { min-width: 0; }
.feed-author-meta .row1 {
  display: flex; align-items: center; gap: 6px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--foreground);
  letter-spacing: -0.005em;
}
.feed-author-meta .ver { color: var(--violet-bright, #7b55d0); display: inline-flex; }
.feed-author-meta .row2 {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 1px;
}
.feed-author-meta .row2 .sep { color: color-mix(in oklab, var(--muted-foreground) 50%, transparent); }

.role-tag {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 999px;
}
.role-tag.producer { background: rgba(123,85,208,0.14); color: var(--violet-bright, #7b55d0); }
.role-tag.artista { background: rgba(245,158,11,0.14); color: #d97757; }
.role-tag.manager { background: rgba(22,163,74,0.14); color: #16a34a; }
.role-tag.studio { background: rgba(14,165,233,0.14); color: #0ea5e9; }

.feed-more {
  width: 30px; height: 30px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.feed-more:hover { background: var(--muted); color: var(--foreground); }

/* Body */
.feed-body { padding: 12px 16px 14px; }
.feed-tag-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.feed-tag {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--muted);
  color: var(--muted-foreground);
  border: 1px solid var(--border);
  font-weight: 500;
}

/* Beat card */
.feed-beat-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  border-radius: 12px;
  background: var(--background);
  border: 1px solid var(--border);
  overflow: hidden;
}
.feed-beat-cover {
  position: relative;
  height: 120px;
  display: flex; align-items: flex-end;
  padding: 8px;
}
.feed-beat-cover.g1 { background: linear-gradient(135deg, #41228e, #6b4bb8 60%, #d97757); }
.feed-beat-cover.g2 { background: linear-gradient(135deg, #2e1866, #16a34a); }
.feed-beat-cover.g3 { background: linear-gradient(135deg, #6b4bb8, #ec4899); }
.feed-beat-cover::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 70% at 70% 20%, rgba(255,255,255,0.16), transparent 60%);
}
.feed-beat-play {
  position: relative; z-index: 2;
  width: 36px; height: 36px;
  border-radius: 999px;
  background: rgba(255,255,255,0.95);
  color: #1a0e3e;
  border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}
.feed-wave {
  position: absolute; inset: auto 8px 8px 52px;
  display: flex; align-items: flex-end; gap: 1px;
  height: 30px;
  z-index: 2;
}
.feed-wave > span {
  flex: 1;
  background: rgba(255,255,255,0.7);
  border-radius: 1px;
  animation: feed-wave 1.4s ease-in-out infinite;
}
@keyframes feed-wave {
  0%, 100% { transform: scaleY(0.45); }
  50% { transform: scaleY(1); }
}
.feed-beat-body { padding: 10px 12px 10px 0; display: flex; flex-direction: column; gap: 4px; }
.feed-beat-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.feed-beat-title { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--foreground); letter-spacing: -0.01em; }
.feed-beat-price { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--foreground); letter-spacing: -0.01em; }
.feed-beat-price .excl { font-size: 11px; color: var(--muted-foreground); font-weight: 500; margin-left: 4px; }
.feed-beat-sub { font-size: 12px; color: var(--muted-foreground); }

/* Servizio card */
.feed-serv-card {
  border-radius: 12px;
  background: var(--background);
  border: 1px solid var(--border);
  padding: 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.feed-serv-cat {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--violet-bright, #7b55d0);
  font-weight: 700;
}
.feed-serv-title { font-family: var(--font-display); font-weight: 600; font-size: 17px; color: var(--foreground); letter-spacing: -0.01em; }
.feed-serv-teaser { margin: 0; font-size: 13px; color: var(--muted-foreground); line-height: 1.5; }
.feed-serv-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 4px;
}
.feed-serv-meta strong { color: var(--foreground); font-weight: 700; }
.feed-serv-meta .sep { color: color-mix(in oklab, var(--muted-foreground) 50%, transparent); }

/* Open call card */
.feed-call-card {
  border-left: 3px solid var(--violet-bright, #7b55d0);
  background: rgba(123,85,208,0.05);
  padding: 12px 14px;
  border-radius: 0 12px 12px 0;
  display: flex; flex-direction: column; gap: 8px;
}
.feed-call-eyebrow {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--violet-bright, #7b55d0);
}
.feed-call-brief { margin: 0; font-size: 14px; line-height: 1.55; color: var(--foreground); }
.feed-call-meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted-foreground); }
.feed-call-meta strong { color: var(--foreground); font-weight: 700; }
.feed-call-meta .sep { color: color-mix(in oklab, var(--muted-foreground) 50%, transparent); }

/* Status */
.feed-status-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--foreground);
}

/* Milestone */
.feed-milestone {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(245,158,11,0.06), rgba(217,119,87,0.04));
  border: 1px solid rgba(245,158,11,0.20);
}
.feed-milestone-ic {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(245,158,11,0.20), rgba(217,119,87,0.20));
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.feed-milestone-body p { margin: 0 0 6px; font-size: 14px; line-height: 1.5; color: var(--foreground); }
.feed-milestone-stat { font-size: 12px; color: var(--muted-foreground); font-weight: 600; }

/* Engagement footer */
.feed-actions {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 8px 10px;
  border-top: 1px solid var(--border);
}
.feed-act {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--muted-foreground);
  font: 500 12.5px var(--font-sans);
  cursor: pointer;
  transition: all 140ms;
}
.feed-act:hover { background: var(--muted); color: var(--foreground); }
.feed-act.active.heart { color: #ec4899; }
.feed-act.active.bookmark { color: var(--violet-bright, #7b55d0); }
.feed-act.dm { color: var(--violet-bright, #7b55d0); }
.feed-act.dm:hover { background: rgba(123,85,208,0.10); }
.feed-act-spacer { flex: 1; }

/* End-of-feed */
.feed-end {
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 24px;
  color: var(--muted-foreground);
  font-size: 13px;
}

/* ─────────── Composer modal ─────────── */
.feed-modal-backdrop {
  position: fixed; inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 80px 20px 20px;
}
.feed-modal {
  width: 100%;
  max-width: 560px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 24px 60px -16px rgba(0,0,0,0.40);
  overflow: hidden;
  display: flex; flex-direction: column;
  animation: feed-modal-in 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes feed-modal-in {
  from { opacity: 0; transform: translateY(-12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.feed-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.feed-modal-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--foreground); letter-spacing: -0.01em; }
.feed-modal-close {
  width: 30px; height: 30px;
  border-radius: 999px;
  border: 0;
  background: var(--muted);
  color: var(--muted-foreground);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.feed-modal-close:hover { background: var(--border); }

.feed-type-list { display: flex; flex-direction: column; gap: 2px; padding: 10px; }
.feed-type-opt {
  display: grid;
  grid-template-columns: 36px 1fr 14px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 120ms;
}
.feed-type-opt:hover { background: var(--muted); }
.feed-type-ic {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(123,85,208,0.12);
  color: var(--violet-bright, #7b55d0);
  border: 1px solid rgba(123,85,208,0.20);
  display: inline-flex; align-items: center; justify-content: center;
}
.feed-type-meta .t { font-size: 14px; font-weight: 600; color: var(--foreground); }
.feed-type-meta .s { font-size: 12px; color: var(--muted-foreground); margin-top: 1px; }

.feed-compose-form { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.feed-input, .feed-textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--background);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--foreground);
  outline: 0;
  transition: border-color 140ms, box-shadow 140ms;
}
.feed-input:focus, .feed-textarea:focus {
  border-color: var(--violet-bright, #7b55d0);
  box-shadow: 0 0 0 4px rgba(123,85,208,0.10);
}
.feed-textarea { resize: vertical; line-height: 1.5; min-height: 100px; }

.feed-compose-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.feed-counter { font-size: 11.5px; color: var(--muted-foreground); }
.feed-publish {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 16px;
  border-radius: 10px;
  border: 0;
  background: var(--violet, #7b55d0);
  color: white;
  font: 600 13px var(--font-sans);
  cursor: pointer;
  box-shadow: 0 4px 12px -4px rgba(123,85,208,0.5);
  transition: all 140ms;
}
.feed-publish:hover { background: var(--violet-light, #6b4bb8); transform: translateY(-1px); }
.feed-publish:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.feed-modal-back {
  background: transparent; border: 0;
  color: var(--muted-foreground);
  font: 500 12.5px var(--font-sans);
  cursor: pointer;
  padding: 10px 18px;
  text-align: left;
}
.feed-modal-back:hover { color: var(--foreground); }

.feed-pick-from-catalog {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.feed-catalog-list { display: flex; flex-direction: column; gap: 6px; }
.feed-catalog-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--background);
  cursor: pointer;
  text-align: left;
  transition: all 140ms;
}
.feed-catalog-item:hover { border-color: var(--violet-bright, #7b55d0); }
.feed-cat-cover {
  width: 48px; height: 48px;
  border-radius: 8px;
}
.feed-cat-cover.g1 { background: linear-gradient(135deg, #41228e, #6b4bb8 60%, #d97757); }
.feed-cat-cover.g2 { background: linear-gradient(135deg, #2e1866, #16a34a); }
.feed-cat-cover.g3 { background: linear-gradient(135deg, #6b4bb8, #ec4899); }
.feed-cat-meta .t { font-size: 13px; font-weight: 600; color: var(--foreground); }
.feed-cat-meta .s { font-size: 11.5px; color: var(--muted-foreground); margin-top: 1px; }

/* ─────────── Feed pill in topbar (replaces KYC / availability) ─────────── */
.feed-pill {
  display: inline-flex !important; align-items: center !important; gap: 8px !important;
  height: 36px !important;
  padding: 0 14px 0 12px !important;
  border-radius: 999px !important;
  border: 1px solid var(--border) !important;
  background: var(--card) !important;
  color: var(--foreground) !important;
  font: 500 13px var(--font-sans) !important;
  text-decoration: none !important;
  transition: all 150ms !important;
  position: relative !important;
}
.feed-pill:hover {
  background: rgba(123,85,208,0.08);
  border-color: rgba(123,85,208,0.30);
  color: var(--violet-bright, #7b55d0);
}
.feed-pill .ic {
  width: 22px; height: 22px;
  border-radius: 7px;
  background: rgba(123,85,208,0.14);
  color: var(--violet-bright, #7b55d0);
  display: inline-flex; align-items: center; justify-content: center;
}
.feed-pill.has-new {
  border-color: rgba(217,119,87,0.55);
  background: linear-gradient(135deg, rgba(217,119,87,0.10), rgba(245,158,11,0.05));
  color: #d97757;
  font-weight: 600;
  box-shadow: 0 0 0 4px rgba(217,119,87,0.10);
  animation: feed-pill-pulse 2.4s ease-in-out infinite;
}
.feed-pill.has-new .ic {
  background: linear-gradient(135deg, #d97757, #f59e0b);
  color: white;
}
@keyframes feed-pill-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(217,119,87,0.10); }
  50%      { box-shadow: 0 0 0 6px rgba(217,119,87,0.18); }
}
.feed-pill .new-dot {
  min-width: 20px; height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #d97757, #f59e0b);
  color: white;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(217,119,87,0.4);
  margin-left: 2px;
}
