:root {
  --bg: #f4f5f8;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --border: #e3e6ec;
  --border-strong: #d2d7e0;
  --text: #1d2433;
  --text-soft: #5a6478;
  --text-faint: #8b94a7;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef0fe;
  --danger: #dc2626;
  --danger-soft: #fde8e8;
  --success: #16a34a;
  --warn: #d97706;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.10);
  --shadow-lg: 0 10px 30px rgba(16,24,40,.12);
  --sidebar-w: 248px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }

/* ---------- Layout ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; background: #1b2030; color: #c7cdda;
  display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0;
}
.sidebar .brand { padding: 20px 20px 14px; font-size: 16px; font-weight: 700; color: #fff; display:flex; align-items:center; gap:10px; }
.sidebar .brand .dot { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg,#6366f1,#a855f7); display:inline-block; }
.sidebar nav { padding: 8px; flex: 1; overflow-y: auto; }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm);
  color: #c7cdda; font-weight: 500; margin-bottom: 2px;
}
.sidebar nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.sidebar nav a.active { background: var(--primary); color: #fff; }
.sidebar nav .nav-section { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #6b7488; padding: 14px 12px 6px; }
.sidebar nav .nav-brand-header { padding: 10px 12px 8px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 4px; }
.sidebar nav .nav-back { display: flex; align-items: center; gap: 6px; color: #8b94a7; font-size: 12px; font-weight: 500; padding: 4px 0; margin-bottom: 4px; }
.sidebar nav .nav-back:hover { color: #c7cdda; background: none; }
.sidebar nav .nav-brand-name { color: #fff; font-weight: 700; font-size: 14px; padding: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .user-box { border-top: 1px solid rgba(255,255,255,.08); padding: 14px; font-size: 13px; }
.sidebar .user-box .name { color:#fff; font-weight:600; }
.main { margin-left: var(--sidebar-w); flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  background: var(--surface); border-bottom: 1px solid var(--border); padding: 16px 28px;
  display: flex; align-items: center; gap: 16px; position: sticky; top: 0; z-index: 20;
}
.topbar .crumbs { font-size: 13px; color: var(--text-faint); margin-bottom: 2px; }
.topbar .crumbs a { color: var(--text-soft); }
.topbar h1 { font-size: 19px; }
.topbar .spacer { flex: 1; }
.page { padding: 24px 28px 60px; max-width: 1200px; width: 100%; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600; cursor: pointer; transition: .12s; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.danger { background: var(--surface); border-color: var(--border-strong); color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.small { padding: 5px 10px; font-size: 12.5px; }
.btn.icon { padding: 6px 9px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.grid { display: grid; gap: 16px; }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat .label { color: var(--text-faint); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat .value { font-size: 26px; font-weight: 700; margin-top: 6px; }

.client-card { cursor: pointer; transition: .12s; }
.client-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.client-card h3 { font-size: 16px; margin-bottom: 4px; }
.client-card .meta { color: var(--text-faint); font-size: 12.5px; }
.client-card .counts { display:flex; gap: 16px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.client-card .counts div span { display:block; font-size: 19px; font-weight: 700; }
.client-card .counts div small { color: var(--text-faint); font-size: 11.5px; }

/* ---------- Tables ---------- */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-faint); font-weight: 700; padding: 11px 16px; background: var(--surface-2);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
thead th.sortable { cursor: pointer; user-select: none; }
thead th.sortable:hover { color: var(--text); }
tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--surface-2); }
.row-title { font-weight: 600; color: var(--text); }
.muted { color: var(--text-faint); }
.nowrap { white-space: nowrap; }
.actions-cell { text-align: right; white-space: nowrap; }
.actions-cell .btn { margin-left: 6px; }

/* ---------- Badges & tags ---------- */
.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge.s-Draft { background: #eef0f4; color: #5a6478; }
.badge.s-Ready-to-Publish { background: #e7f0fe; color: #2563eb; }
.badge.s-Queued { background: #fef3c7; color: #92400e; }
.badge.s-Posted { background: #e7f7ee; color: var(--success); }
.badge.s-Failed { background: var(--danger-soft); color: var(--danger); }
.badge.s-Removed { background: #f0f0f2; color: #8b94a7; }
.badge.s-Done---Expired { background: #f0f0f2; color: #8b94a7; }
.tag { display: inline-flex; align-items:center; background: var(--primary-soft); color: var(--primary-hover); border-radius: 6px; padding: 2px 8px; font-size: 12px; font-weight: 600; margin: 2px 4px 2px 0; }
.badge-clone { display: inline-flex; align-items: center; background: #fff3e0; color: #b45309; border-radius: 6px; padding: 2px 7px; font-size: 11px; font-weight: 700; letter-spacing: .03em; margin-left: 6px; }
.badge-original { display: inline-flex; align-items: center; background: #e7f7ee; color: var(--success); border-radius: 6px; padding: 2px 7px; font-size: 11px; font-weight: 700; letter-spacing: .03em; margin-left: 6px; }
.row-title-wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 0; }
.body-preview { color: var(--text-faint); font-size: 12.5px; margin-top: 4px; line-height: 1.4; }

/* ---------- Filter bar ---------- */
.filterbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; align-items: center; }
.filterbar input[type=search], .filterbar select { min-width: 140px; }
.search-grow { flex: 1; min-width: 200px; }
.filter-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--text-soft); cursor: pointer; white-space: nowrap; }
.filter-toggle input[type=checkbox] { width: auto; cursor: pointer; }
.date-range { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.date-range input[type=date] { width: auto; min-width: 0; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.field .hint { color: var(--text-faint); font-weight: 400; font-size: 12px; }
input[type=text], input[type=search], input[type=password], input[type=url],
input[type=datetime-local], input[type=date], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; background: var(--surface); color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.field.inline { display:flex; gap: 10px; align-items: flex-end; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.checkbox-list { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 10px 12px; max-height: 160px; overflow-y: auto; }
.checkbox-list label { display: flex; align-items: center; gap: 8px; font-weight: 500; margin-bottom: 6px; }
.checkbox-list input { width: auto; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(20,24,33,.45); display: flex;
  align-items: flex-start; justify-content: center; padding: 48px 16px; z-index: 100; overflow-y: auto;
}
.modal { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; animation: pop .14s ease; }
.modal.wide { max-width: 820px; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal header { padding: 18px 22px; border-bottom: 1px solid var(--border); display:flex; align-items:center; }
.modal header h2 { font-size: 17px; }
.modal header .close { margin-left: auto; cursor: pointer; color: var(--text-faint); font-size: 22px; line-height: 1; background:none;border:none; }
.modal .body { padding: 22px; }
.modal footer { padding: 16px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- Editor ---------- */
.editor-grid { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
#quill-editor { background: var(--surface); min-height: 320px; }
/* Content Item body + Content Framework positioning/outline — larger editing surface */
#ci-text-quill { background: var(--surface); min-height: 360px; }
#fw-positioning-quill, #fw-outline-quill { background: var(--surface); min-height: 300px; }
/* Keep framework rich-text editors from growing indefinitely — scroll instead. */
#fw-positioning-quill .ql-editor, #fw-outline-quill .ql-editor { max-height: 420px; overflow-y: auto; }
.ql-toolbar.ql-snow, .ql-container.ql-snow { border-color: var(--border-strong); }
.ql-toolbar.ql-snow { border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.ql-container.ql-snow { border-radius: 0 0 var(--radius-sm) var(--radius-sm); font-size: 15px; }
.side-panel { position: sticky; top: 90px; }
.rich-render { line-height: 1.6; }
.rich-render h1,.rich-render h2,.rich-render h3 { margin: .6em 0 .3em; }
.rich-render ul,.rich-render ol { padding-left: 1.4em; }

/* Paragraph/heading/list spacing inside Quill editors — Quill's default CSS zeroes
   this out, which loses the blank-line-style gap Google Docs (and most word
   processors) put between paragraphs. Restoring it keeps pasted content visually
   consistent with its source instead of collapsing onto tightly-packed lines. */
.ql-editor p, .ql-editor ol, .ql-editor ul, .ql-editor h1, .ql-editor h2,
.ql-editor h3, .ql-editor h4, .ql-editor h5, .ql-editor h6 { margin-bottom: 1em; }
.ql-editor > :last-child { margin-bottom: 0; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg,#1b2030,#312a5e); }
.login-card { background: var(--surface); padding: 34px; border-radius: 14px; box-shadow: var(--shadow-lg); width: 100%; max-width: 380px; }
.login-card .brand { font-size: 20px; font-weight: 700; margin-bottom: 4px; display:flex; align-items:center; gap:10px; }
.login-card .sub { color: var(--text-faint); margin-bottom: 22px; font-size: 13px; }

/* ---------- Toast ---------- */
#toasts { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { background: #1b2030; color: #fff; padding: 12px 16px; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); font-size: 13.5px; max-width: 360px; animation: pop .14s ease; }
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }

/* ---------- Misc ---------- */
.empty { text-align: center; padding: 50px 20px; color: var(--text-faint); }
.empty .big { font-size: 15px; color: var(--text-soft); font-weight: 600; margin-bottom: 6px; }
.section-head { display: flex; align-items: center; margin-bottom: 14px; gap: 12px; }
.section-head h2 { font-size: 16px; }
.section-head .spacer { flex: 1; }
.inline-add { display: flex; gap: 8px; margin-bottom: 16px; }
.inline-add input { flex: 1; }
.utm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.spinner { display:inline-block; width:18px;height:18px;border:2px solid var(--border);border-top-color:var(--primary);border-radius:50%;animation:spin .7s linear infinite;}
@keyframes spin { to { transform: rotate(360deg); } }
.import-progress-wrap { margin-top: 16px; }
.import-progress-wrap p { display: flex; align-items: center; gap: 10px; font-size: 14px; margin-bottom: 10px; }
.import-progress { background: var(--border); border-radius: 4px; height: 8px; overflow: hidden; }
.import-progress-fill { background: var(--primary); height: 100%; border-radius: 4px; transition: width .15s ease; width: 0; }
.center-load { display:flex; justify-content:center; padding: 60px; }

/* ---------- Badge: Published (Newsroom) ---------- */
.badge.s-Published { background: #e7f7ee; color: var(--success); }

/* ---------- Newsroom list ---------- */
.news-type-heading {
  display: flex; align-items: center; gap: 10px;
  margin: 24px 0 10px; padding-bottom: 8px; border-bottom: 2px solid var(--border);
}
.news-type-heading:first-child { margin-top: 0; }
.news-type-badge {
  display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 20px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
}
.news-type-badge.nf { background: #e0edff; color: #1d4ed8; }
.news-type-badge.ed { background: #f3e8ff; color: #7c3aed; }
.news-week-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-faint); margin: 14px 0 6px;
}
.news-item-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.news-item-row {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 16px; display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow); transition: .1s;
}
.news-item-row:hover { border-color: var(--border-strong); }
.news-item-main { flex: 1; min-width: 0; }
.news-companies { margin-bottom: 4px; }
.news-item-headline { font-weight: 600; font-size: 14px; }
.news-item-date { font-size: 12.5px; margin-top: 3px; }
.news-item-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ---------- Media Assets — document-style list ---------- */
.media-assets .news-type-heading {
  border-bottom: 2px solid var(--border-strong);
  margin: 32px 0 10px;
  padding-bottom: 6px;
  width: fit-content;
}
.media-assets .news-type-heading:first-child { margin-top: 0; }
.media-assets .news-type-heading h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--text);
}
.media-assets .news-item-list { gap: 0; margin-bottom: 0; }
.media-assets .news-item-row {
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  padding: 20px 4px;
}
.media-assets .news-item-row:hover { background: var(--surface-2); }
.media-assets .news-item-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.media-assets .news-item-headline {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.media-assets .media-date { font-size: 12.5px; }
.media-assets .media-topics-label { font-size: 12.5px; font-weight: 600; margin-right: 6px; }
.media-assets .media-topics { display: inline; }
.media-assets .media-view-text { font-size: 12.5px; color: var(--text-soft); margin-top: 2px; }
.media-assets .tag {
  background: none;
  border: none;
  padding: 0;
  margin: 0 12px 0 0;
  color: var(--text-soft);
  font-weight: 500;
  font-size: 12.5px;
}
.media-assets .news-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  text-align: right;
  flex-shrink: 0;
  padding-top: 2px;
}
.media-assets .news-item-actions a { font-size: 13px; font-weight: 500; }
.media-assets .media-public-links { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.media-assets .media-more-links { font-size: 12px; color: var(--text-faint); }

/* ---------- Newsroom editor ---------- */
.news-type-row { margin-bottom: 16px; display: flex; align-items: center; gap: 16px; }
.news-type-sel { width: auto; min-width: 160px; font-weight: 600; font-size: 14px; }
.news-fields-section { margin-top: 4px; }

/* ---------- Word counter ---------- */
.field-label-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.field-label-row label { font-weight: 600; font-size: 13px; margin: 0; }
.word-count { font-size: 11.5px; color: var(--text-faint); font-weight: 500; white-space: nowrap; margin-left: 8px; }
.quill-wc { display: block; text-align: right; margin-top: 5px; }

/* ---------- News image ---------- */
.news-image-wrap { margin-top: 4px; }
.news-image-preview {
  max-width: 100%; max-height: 280px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); margin-bottom: 10px; display: block;
}
.news-image-btns { display: flex; gap: 8px; }

/* Batch associated-asset thumbnails */
.asset-thumb {
  width: 56px; height: 56px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface-2); flex-shrink: 0;
}


/* ---------- Company logos ---------- */
.company-name-cell { display: flex; align-items: center; gap: 10px; }
.company-logo {
  width: 30px; height: 30px; object-fit: cover; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface-2); flex-shrink: 0;
}

/* ---------- Newsroom editor: Quill ---------- */
#news-quill-editor { background: var(--surface); min-height: 280px; }
#news-numbers-quill-editor,
#news-summary-quill-editor,
#news-why-quill-editor,
#news-coherence-quill-editor,
#news-watch-quill-editor,
#news-bottomline-quill-editor,
#news-related-quill-editor,
#news-sources-quill-editor { background: var(--surface); min-height: 140px; }

/* ---------- Fields editor (per-brand news field config) ---------- */
.fields-editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.fields-editor-list { display: flex; flex-direction: column; }
.field-row {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); margin-bottom: 8px;
}
.field-row .fld-grip { color: var(--text-faint); font-size: 14px; cursor: grab; }
.field-row .fld-label { flex: 1; min-width: 140px; }
.field-row .fld-type { width: auto; min-width: 130px; }
.field-row .fld-arrows { display: flex; gap: 4px; }
.field-row .btn.small.icon { padding: 4px 8px; }

@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: .2s; z-index: 50; }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .editor-grid { grid-template-columns: 1fr; }
  .fields-editor-grid { grid-template-columns: 1fr; }
  .row-2, .row-3, .utm-grid { grid-template-columns: 1fr; }
  .menu-toggle { display: inline-flex !important; }
}
.menu-toggle { display: none; }

/* ---------- Star rating ---------- */
.stars { display: flex; gap: 4px; align-items: center; }
.star { font-size: 22px; cursor: pointer; color: #d1d5db; line-height: 1; transition: color .1s; user-select: none; }
.star.active { color: #f59e0b; }
.star:hover { color: #fbbf24; }

/* ---------- Tabs ---------- */
.tabbar { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.tab {
  background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer;
  padding: 9px 4px; margin-right: 18px; font-size: 13.5px; font-weight: 600; color: var(--text-faint);
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------- Task section ---------- */
.task-list { display: flex; flex-direction: column; gap: 10px; }
.task-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; box-shadow: var(--shadow);
}
.task-card.resolved { opacity: .7; }
.task-meta { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-faint); margin-bottom: 6px; flex-wrap: wrap; }
.task-desc { font-size: 14px; font-weight: 500; margin-bottom: 10px; white-space: pre-wrap; }
.task-responses { border-top: 1px solid var(--border); margin-top: 10px; padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.task-response { background: #f8f9fb; border-radius: 6px; padding: 8px 12px; font-size: 13px; }
.task-response-author { font-weight: 600; font-size: 12px; color: var(--text-faint); margin-bottom: 3px; }
.task-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Global tasks view ---------- */
.tasks-section-head { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); margin: 20px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.tasks-section-head:first-child { margin-top: 0; }
.task-content-link { font-size: 12px; color: var(--primary); font-weight: 500; }

/* ---------- Prompt Library ---------- */
.prompt-list { display: flex; flex-direction: column; gap: 10px; }
.prompt-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; box-shadow: var(--shadow);
}
.prompt-meta { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-faint); margin-bottom: 6px; flex-wrap: wrap; }
.prompt-use-case { color: var(--text-soft); font-weight: 600; font-size: 12.5px; }
.prompt-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.prompt-body { color: var(--text-soft); font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; max-height: 96px; overflow: hidden; }
.prompt-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* ---------- Status badges ---------- */
.badge.s-Open { background: #fef3c7; color: #92400e; }
.badge.s-Resolved { background: #e7f7ee; color: var(--success); }
.badge.s-Archive { background: #f0f0f2; color: #6b7280; }

/* ---------- Theme search ---------- */
.topic-search { width: 100%; margin-bottom: 6px; font-size: 12px; padding: 5px 8px; }
