/* قسم «المحتوى» (assets/content-view.js): المكتبة والأفكار والحملات. القيم من assets/tokens.css. */
.cv-filters {
  margin-bottom: 18px;
}
.cv-count {
  margin-inline-start: 4px;
  color: var(--faint);
  font-size: 12px;
}

/* المكتبة */
.cv-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.cv-post {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
}
.cv-post + .cv-post {
  border-top: 1px solid var(--border);
}
.cv-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--brand-tint);
  color: var(--brand);
  font-size: 22px;
  object-fit: cover;
}
.cv-post-text {
  flex: 1;
  min-width: 0;
}
.cv-post-text h3 {
  overflow: hidden;
  font-size: 15px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.cv-post-text p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}
.cv-post-side {
  display: grid;
  justify-items: end;
  gap: 8px;
}
.cv-post-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

/* الحملات */
.cv-campaigns {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.cv-campaign p {
  min-height: 44px;
  margin: 6px 0 16px;
  color: var(--muted);
  font-size: 14px;
}
.cv-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--surface-2);
}
.cv-progress span {
  display: block;
  height: 100%;
  background: var(--brand);
}
.cv-campaign-foot {
  margin-top: 14px;
}
.cv-campaign-foot small {
  color: var(--muted);
}

@media (max-width: 720px) {
  .cv-post {
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 14px 16px;
  }
  .cv-thumb {
    width: 44px;
    height: 44px;
  }
  .cv-post-side {
    justify-items: start;
    width: 100%;
  }
  .cv-post-actions {
    justify-content: flex-start;
  }
}

/* الأفكار */
.idea-ai {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.idea-ai h2 {
  margin: 0 0 4px;
  color: var(--accent-text);
  font-size: 17px;
}
.idea-ai p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.idea-ai .btn[disabled] {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent-text);
  opacity: 1;
}
.idea-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.idea-col {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}
.idea-col h2 {
  margin: 0;
  font-size: 16px;
}
.idea {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.idea h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}
.idea p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}
.idea-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.idea-tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-hover);
  font-size: 12px;
}
.idea-add {
  min-height: var(--touch);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--brand-hover);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.idea-add:hover {
  border-color: var(--brand);
}
@media (max-width: 900px) {
  .idea-board {
    grid-template-columns: 1fr;
  }
}
