/* Workspace page — consolidated per-client view (competitor intel, content
   ideas, script review, production board) replacing the old four-page
   split. Built from the reviewed mockup; uses only tokens.css semantics,
   same rule as style.css. */
@import url("tokens.css");

.topbar {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 20px; margin-bottom: 24px;
}
.switcher-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
select.client-select {
  background: var(--surface-2); color: var(--text-bright); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 14px; font: inherit; font-weight: 700; font-size: 15px;
  cursor: pointer; min-width: 220px;
}
.niche-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.niche-tab {
  padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
  color: var(--text-muted); border: 1px solid transparent; white-space: nowrap;
}
.niche-tab.active { background: var(--accent-wash); color: var(--accent-on); border-color: var(--accent-wash); }
.niche-tab:not(.active):hover { background: var(--surface-2); color: var(--text); }

.stats { display: flex; gap: 28px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; padding: 18px 20px; }
.stat-num { font-size: 26px; font-weight: 800; color: var(--text-bright); line-height: 1; }
.stat-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--text-faint); margin-top: 4px; }
.stat-pill { margin-left: auto; display: flex; gap: 8px; }

.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.block-sub { font-size: 13px; color: var(--text-muted); margin: 2px 0 16px; max-width: 70ch; }
.see-all { font-size: 12px; font-weight: 700; text-decoration: none; }

.intel-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .intel-grid { grid-template-columns: 1fr; } }

.media-row { display: flex; gap: 16px; }
.top-post { padding: 16px 0; border-top: 1px solid var(--line); display: flex; gap: 16px; }
.top-post:first-child { border-top: none; padding-top: 0; }
/* Base rule works standalone (idea-card, script-card — plain block, sized
   by width+aspect-ratio) — the flex-basis override only applies inside a
   row layout like .top-post, via the nested selector below. */
.top-post-video { width: 128px; flex-shrink: 0; aspect-ratio: 9/16; border-radius: 10px; overflow: hidden; background: var(--surface-3); }
.top-post-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.top-post > .top-post-video { flex: 0 0 128px; }
.top-post-content { flex: 1; min-width: 0; }
/* Stay 9:16 even at full width — these are vertical Instagram reels, and
   forcing a landscape box here would crop the top/bottom off via
   object-fit: cover instead of just taking more vertical space. */
@media (max-width: 560px) { .top-post, .media-row { flex-direction: column; } .top-post-video { width: 100%; max-width: 280px; flex: none; margin: 0 auto; } }
.top-post-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.top-post-handle { font-weight: 700; color: var(--text-bright); font-size: 14px; }
.top-post-meta { font-size: 11px; color: var(--text-faint); white-space: nowrap; }
.top-post-caption { font-size: 13px; color: var(--text-muted); margin: 6px 0 0; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.analytics-row { display: flex; gap: 18px; margin-top: 10px; flex-wrap: wrap; }
.analytics-item { display: flex; flex-direction: column; }
.analytics-val { font-size: 15px; font-weight: 800; color: var(--text-bright); line-height: 1.2; }
.analytics-label { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); }

.tag-row { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 5px; background: var(--status-info-wash); color: var(--status-info); }
.tag.score { background: var(--accent-wash); color: var(--accent-on); }

.idea-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 14px; }
.idea-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.idea-score { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 6px; background: var(--accent-wash); color: var(--accent-on); }
.idea-title { font-size: 13px; font-weight: 700; color: var(--text-bright); line-height: 1.35; margin: 0; }
.idea-source { font-size: 11px; color: var(--text-faint); }

.script-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin-bottom: 12px; }
.script-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.script-title { font-size: 15px; font-weight: 700; color: var(--text-bright); margin: 0; }
.script-source { font-size: 11px; color: var(--text-faint); margin-top: 2px; }
.script-body { font-size: 13px; line-height: 1.6; color: var(--text); white-space: pre-wrap; margin: 12px 0; padding: 12px 14px; background: var(--surface-3); border-radius: 8px; max-height: 160px; overflow-y: auto; }

.board-cols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .board-cols { grid-template-columns: 1fr; } }
.col-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.col-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); }
.col-count { font-size: 11px; font-weight: 700; color: var(--text-faint); background: var(--surface-2); border-radius: 100px; padding: 2px 8px; }
.task-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px; margin-bottom: 10px; }
.task-title { font-size: 13px; font-weight: 700; color: var(--text-bright); margin: 0 0 8px; line-height: 1.35; }
.task-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.task-actions button { padding: 6px 10px; font-size: 11.5px; }
.col-empty { font-size: 12px; color: var(--text-faint); padding: 8px 2px; }

.collapsible-head { display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.collapsible-head .chev { transition: transform .15s; color: var(--text-faint); }
.collapsible-head.open .chev { transform: rotate(90deg); }

#teleprompter-overlay {
  position: fixed; inset: 0; background: #000; color: #fff; z-index: 1000;
  display: none; flex-direction: column;
}
#teleprompter-overlay.open { display: flex; }
#teleprompter-text {
  flex: 1; overflow-y: auto; padding: 8vh 6vw; font-size: clamp(28px, 6vw, 64px); line-height: 1.5;
  font-weight: 700; text-align: center; scroll-behavior: smooth;
}
#teleprompter-controls {
  display: flex; gap: 10px; align-items: center; justify-content: center;
  padding: 16px; border-top: 1px solid #333; background: #111;
}
