/* ═══════════════════════════════════════════════════════════════
   PersonaGen Agentic Dashboard — Module Styles
   Composer, Calendar, Persona Config, Inbox, Trends
   ═══════════════════════════════════════════════════════════════ */

/* ── Toast Notifications ── */
.pg-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--text-base);
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: var(--z-toast);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s var(--ease-out);
  max-width: 400px;
}
.pg-toast--visible { transform: translateY(0); opacity: 1; }
.pg-toast--success { border-color: var(--success); }
.pg-toast--error   { border-color: #ef4444; }
.pg-toast--warning { border-color: var(--gold); }
.pg-toast--info    { border-color: var(--cyan); }
.pg-toast-icon { font-size: 1.1rem; }

/* ── Spinner ── */
.pg-spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: pgSpin 0.6s linear infinite;
}
.pg-spinner--sm { width: 14px; height: 14px; border-width: 1.5px; }
@keyframes pgSpin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════════
   POST COMPOSER MODAL
   ═══════════════════════════════════════════════════════════════ */

.composer-overlay {
  position: fixed; inset: 0;
  background: rgba(6,6,11,0.85);
  backdrop-filter: blur(12px);
  z-index: var(--z-modal);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.composer-overlay--visible { opacity: 1; pointer-events: all; }

.composer-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 95vw; max-width: 1100px;
  max-height: 92vh;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  transform: scale(0.96) translateY(10px);
  transition: transform 0.3s var(--ease-out);
}
.composer-overlay--visible .composer-container { transform: scale(1) translateY(0); }

.composer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.composer-header-left { display: flex; align-items: baseline; gap: 0.75rem; }
.composer-title { font-size: var(--text-lg); font-weight: 700; }
.composer-subtitle { font-size: var(--text-sm); color: var(--text-dim); }
.composer-close-btn {
  width: 36px; height: 36px; border-radius: var(--radius-xs);
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted); font-size: 1rem; cursor: pointer;
  transition: all var(--ease-fast);
}
.composer-close-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }

.composer-body {
  display: grid; grid-template-columns: 1fr 320px;
  flex: 1; overflow-y: auto;
}
.composer-editor { padding: 1.5rem; display: flex; flex-direction: column; gap: 1.25rem; }
.composer-settings {
  padding: 1.5rem;
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 1.25rem;
  overflow-y: auto;
}

.composer-field {}
.composer-label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: var(--text-sm); font-weight: 600; color: var(--text-muted);
  margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: var(--tracking-wide);
}

/* Persona Chips */
.composer-persona-select { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.composer-persona-chip {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.8rem; border-radius: var(--radius-full);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-muted); font-size: var(--text-sm); font-weight: 500;
  cursor: pointer; transition: all var(--ease-fast);
  font-family: inherit;
}
.composer-persona-chip:hover { border-color: var(--border-hover); color: var(--text); }
.composer-persona-chip.active { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.composer-persona-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; font-weight: 700; color: #fff;
}

/* Platform Chips */
.composer-platforms { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.composer-plat-chip {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.7rem; border-radius: var(--radius-xs);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-muted); font-size: var(--text-sm); font-weight: 500;
  cursor: pointer; transition: all var(--ease-fast);
  font-family: inherit;
}
.composer-plat-chip:hover { border-color: var(--border-hover); }
.composer-plat-chip.active { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.composer-plat-icon {
  width: 20px; height: 20px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 800; color: #fff;
}

/* Textarea */
.composer-textarea {
  width: 100%; min-height: 140px; resize: vertical;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.85rem;
  color: var(--text); font-size: var(--text-base); font-family: var(--font-body);
  line-height: var(--leading-normal); outline: none;
  transition: border-color var(--ease-fast);
}
.composer-textarea:focus { border-color: var(--accent); }
.composer-char-counts { display: flex; gap: 1rem; margin-top: 0.35rem; }
.composer-char-item { font-size: var(--text-xs); color: var(--text-dim); font-family: var(--font-mono); }
.composer-char--over { color: #ef4444; font-weight: 600; }

/* AI Prompt */
.composer-ai-btn {
  font-size: var(--text-xs); background: var(--accent-soft); color: var(--accent);
  padding: 0.2rem 0.5rem; border-radius: var(--radius-xs);
  border: 1px solid var(--accent-mid); cursor: pointer; font-family: inherit;
  transition: all var(--ease-fast);
}
.composer-ai-btn:hover { background: var(--accent); color: #fff; }
.composer-ai-prompt-row { display: flex; gap: 0.5rem; }
.composer-ai-input {
  flex: 1; height: 40px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0 0.85rem;
  color: var(--text); font-size: var(--text-base); font-family: var(--font-body); outline: none;
}
.composer-ai-input:focus { border-color: var(--accent); }
.composer-ai-go {
  height: 40px; padding: 0 1rem; background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-sm); font-weight: 600;
  font-family: inherit; cursor: pointer; font-size: var(--text-sm);
  display: flex; align-items: center; gap: 0.4rem;
  transition: background var(--ease-fast);
}
.composer-ai-go:hover { background: #6b5ace; }

/* Tags */
.composer-tags-container {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.5rem 0.6rem;
  min-height: 40px; cursor: text;
  transition: border-color var(--ease-fast);
}
.composer-tags-container:focus-within { border-color: var(--accent); }
.composer-tag {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: var(--accent); color: #fff;
  padding: 0.15rem 0.5rem; border-radius: var(--radius-full);
  font-size: var(--text-xs); font-weight: 600;
  animation: tagPop 0.2s ease;
}
@keyframes tagPop { from { transform: scale(0.8); opacity: 0; } }
.composer-tag-x { cursor: pointer; opacity: 0.7; font-size: 0.85rem; }
.composer-tag-x:hover { opacity: 1; }
.composer-tag-input {
  border: none; background: transparent; color: var(--text);
  font-size: var(--text-sm); font-family: var(--font-body);
  outline: none; flex: 1; min-width: 80px;
}

/* Upload */
.composer-upload {
  border: 2px dashed var(--border); border-radius: var(--radius-sm);
  padding: 2rem 1rem; text-align: center; cursor: pointer;
  transition: all 0.25s ease;
}
.composer-upload:hover { border-color: var(--accent); background: rgba(124,106,237,0.04); }
.composer-upload--done { border-style: solid; border-color: var(--success); background: var(--success-soft); padding: 0.85rem; cursor: default; }
.composer-upload-icon { font-size: 2rem; margin-bottom: 0.4rem; opacity: 0.6; }
.composer-upload-text { font-size: var(--text-sm); color: var(--text-muted); }
.composer-upload-hint { font-size: var(--text-xs); color: var(--text-dim); }
.composer-upload-loading { display: flex; align-items: center; justify-content: center; gap: 0.6rem; color: var(--text-muted); }
.composer-upload-file { display: flex; align-items: center; gap: 0.75rem; text-align: left; }
.composer-upload-file-icon { font-size: 1.75rem; }
.composer-upload-file-name { font-size: var(--text-base); font-weight: 600; }
.composer-upload-file-meta { font-size: var(--text-xs); color: var(--text-dim); margin-top: 2px; }
.composer-upload-file-check { margin-left: auto; color: var(--success); font-size: 1.25rem; }

/* Schedule */
.composer-schedule-options { display: flex; gap: 0.35rem; margin-bottom: 0.75rem; }
.composer-sched-btn {
  flex: 1; height: 34px; border-radius: var(--radius-xs);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-muted); font-size: var(--text-xs); font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all var(--ease-fast);
}
.composer-sched-btn:hover { border-color: var(--border-hover); }
.composer-sched-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.composer-datetime-wrap { display: flex; flex-direction: column; gap: 0.4rem; }
.composer-date-input, .composer-time-input, .composer-tz-select, .composer-select, .composer-text-input {
  width: 100%; height: 36px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-xs); padding: 0 0.7rem;
  color: var(--text); font-size: var(--text-sm); font-family: var(--font-body);
  outline: none; transition: border-color var(--ease-fast);
}
.composer-date-input:focus, .composer-time-input:focus, .composer-tz-select:focus, .composer-select:focus, .composer-text-input:focus {
  border-color: var(--accent);
}
.composer-select, .composer-tz-select { cursor: pointer; -webkit-appearance: none; appearance: none; }

/* Toggles */
.composer-toggles { display: flex; flex-direction: column; gap: 0; }
.composer-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}
.composer-toggle-row:last-child { border-bottom: none; }
.composer-toggle-label { font-size: var(--text-sm); font-weight: 500; }
.composer-toggle {
  width: 38px; height: 20px; border-radius: 10px;
  background: var(--surface-3); border: 1px solid var(--border);
  cursor: pointer; position: relative; transition: all 0.3s ease;
  flex-shrink: 0;
}
.composer-toggle--on { background: var(--accent); border-color: var(--accent); }
.composer-toggle::after {
  content: ''; position: absolute;
  width: 14px; height: 14px; border-radius: 50%; background: #fff;
  top: 2px; left: 2px; transition: transform 0.3s ease;
}
.composer-toggle--on::after { transform: translateX(18px); }

/* Preview */
.composer-preview { display: flex; flex-direction: column; gap: 0.6rem; }
.composer-preview-empty {
  text-align: center; padding: 1.5rem 0.5rem;
  font-size: var(--text-sm); color: var(--text-dim);
}
.composer-preview-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.75rem;
}
.composer-preview-header { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.5rem; }
.composer-preview-plat-icon {
  width: 18px; height: 18px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.55rem; font-weight: 800; color: #fff;
}
.composer-preview-plat-name { font-size: var(--text-xs); color: var(--text-dim); font-weight: 600; text-transform: uppercase; }
.composer-preview-meta { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.4rem; }
.composer-preview-avatar {
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.5rem; font-weight: 700; color: #fff;
}
.composer-preview-handle { font-size: var(--text-xs); color: var(--text-muted); }
.composer-preview-text { font-size: var(--text-sm); color: var(--text); line-height: var(--leading-snug); word-break: break-word; }
.composer-preview-tags { font-size: var(--text-xs); margin-top: 0.35rem; }

/* Footer */
.composer-footer {
  display: flex; justify-content: flex-end; gap: 0.6rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}
.composer-footer-btn {
  height: 40px; padding: 0 1.25rem; border-radius: var(--radius-sm);
  font-family: inherit; font-size: var(--text-sm); font-weight: 600;
  cursor: pointer; transition: all var(--ease-fast);
  display: flex; align-items: center; gap: 0.4rem;
}
.composer-btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.composer-btn-ghost:hover { border-color: var(--border-strong); color: var(--text); background: var(--surface-2); }
.composer-btn-draft { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.composer-btn-draft:hover { border-color: var(--accent-mid); }
.composer-btn-primary { background: var(--accent); border: none; color: #fff; }
.composer-btn-primary:hover { background: #6b5ace; box-shadow: var(--shadow-accent); }


/* ═══════════════════════════════════════════════════════════════
   DYNAMIC CALENDAR
   ═══════════════════════════════════════════════════════════════ */

.dcal-wrapper { display: flex; flex-direction: column; gap: 1rem; }

.dcal-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.dcal-toolbar-left { display: flex; align-items: center; gap: 0.5rem; }
.dcal-toolbar-right { display: flex; align-items: center; gap: 0.5rem; }
.dcal-month-label { font-size: var(--text-lg); font-weight: 700; min-width: 180px; text-align: center; }
.dcal-nav-btn {
  width: 32px; height: 32px; border-radius: var(--radius-xs);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--ease-fast);
}
.dcal-nav-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.dcal-today-btn {
  height: 32px; padding: 0 0.75rem; border-radius: var(--radius-xs);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-muted); font-size: var(--text-xs); font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all var(--ease-fast);
}
.dcal-today-btn:hover { border-color: var(--accent); color: var(--text); }

.dcal-filter-select {
  height: 32px; padding: 0 0.7rem; border-radius: var(--radius-xs);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); font-size: var(--text-xs); font-family: var(--font-body);
  outline: none; cursor: pointer;
}
.dcal-view-toggle { display: flex; border: 1px solid var(--border); border-radius: var(--radius-xs); overflow: hidden; }
.dcal-view-btn {
  height: 32px; padding: 0 0.75rem;
  background: var(--surface-2); border: none;
  color: var(--text-muted); font-size: var(--text-xs); font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all var(--ease-fast);
}
.dcal-view-btn.active { background: var(--accent); color: #fff; }
.dcal-new-btn {
  height: 32px; padding: 0 0.85rem; border-radius: var(--radius-xs);
  background: var(--accent); border: none; color: #fff;
  font-size: var(--text-xs); font-weight: 700; cursor: pointer;
  font-family: inherit; transition: all var(--ease-fast);
}
.dcal-new-btn:hover { background: #6b5ace; }

/* Stats */
.dcal-stats {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 0.5rem 0.75rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.dcal-stat { display: flex; align-items: center; gap: 0.35rem; font-size: var(--text-xs); color: var(--text-muted); }
.dcal-stat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* Month Grid */
.dcal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.dcal-day-header {
  background: var(--surface-2); padding: 0.5rem;
  font-size: var(--text-xs); font-weight: 700; color: var(--text-dim);
  text-align: center; text-transform: uppercase; letter-spacing: var(--tracking-wide);
}
.dcal-cell {
  background: var(--surface); padding: 0.4rem;
  min-height: 100px; cursor: pointer;
  transition: background var(--ease-fast);
}
.dcal-cell:hover { background: var(--surface-2); }
.dcal-cell--empty { background: var(--bg); cursor: default; }
.dcal-cell--empty:hover { background: var(--bg); }
.dcal-cell--today { background: rgba(124,106,237,0.06); }
.dcal-cell-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.3rem; }
.dcal-cell-day { font-size: var(--text-sm); font-weight: 600; color: var(--text-muted); }
.dcal-cell-day--today {
  background: var(--accent); color: #fff;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xs);
}
.dcal-cell-count {
  font-size: var(--text-xs); font-weight: 700; color: var(--accent);
  background: var(--accent-soft); padding: 0 0.3rem; border-radius: 3px;
}
.dcal-cell-posts { display: flex; flex-direction: column; gap: 2px; }
.dcal-cell-more { font-size: var(--text-xs); color: var(--text-dim); padding: 2px 0; }

/* Post Chip */
.dcal-post-chip {
  padding: 3px 5px; border-radius: 4px;
  cursor: pointer; transition: all var(--ease-fast);
}
.dcal-post-chip:hover { filter: brightness(1.2); }
.dcal-post-chip-top { display: flex; align-items: center; gap: 3px; }
.dcal-post-chip-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.dcal-post-chip-plats { font-size: 0.55rem; }
.dcal-post-chip-persona {
  width: 14px; height: 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.45rem; font-weight: 700; color: #fff; margin-left: auto;
}
.dcal-post-chip-text { font-size: 0.55rem; color: var(--text-muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Week Grid */
.dcal-week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.5rem; }
.dcal-week-day {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  min-height: 200px; padding: 0.6rem; cursor: pointer;
  transition: border-color var(--ease-fast);
}
.dcal-week-day:hover { border-color: var(--accent-mid); }
.dcal-week-day--today { border-color: var(--accent); background: rgba(124,106,237,0.04); }
.dcal-week-day-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.dcal-week-day-name { font-size: var(--text-xs); font-weight: 700; color: var(--text-dim); text-transform: uppercase; }
.dcal-week-day-num { font-size: var(--text-base); font-weight: 600; }
.dcal-week-day-posts { display: flex; flex-direction: column; gap: 4px; }
.dcal-week-empty { font-size: var(--text-xs); color: var(--text-dim); text-align: center; padding: 1rem 0; }


/* ═══════════════════════════════════════════════════════════════
   PERSONA CONFIG EDITOR
   ═══════════════════════════════════════════════════════════════ */

.pce-layout { display: grid; grid-template-columns: 240px 1fr; gap: 0; min-height: 600px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }

/* Sidebar */
.pce-sidebar {
  border-right: 1px solid var(--border); padding: 1rem;
  display: flex; flex-direction: column; gap: 0.35rem;
  background: var(--bg);
}
.pce-sidebar-label {
  font-size: var(--text-xs); text-transform: uppercase; font-weight: 700;
  color: var(--text-dim); padding: 0.5rem 0.5rem 0.25rem;
  letter-spacing: var(--tracking-wide);
}
.pce-persona-item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0.6rem; border-radius: var(--radius-xs);
  background: transparent; border: 1px solid transparent;
  cursor: pointer; transition: all var(--ease-fast);
  font-family: inherit; text-align: left; color: var(--text-muted);
}
.pce-persona-item:hover { background: var(--surface); border-color: var(--border); }
.pce-persona-item.active { background: var(--accent-soft); border-color: var(--accent-mid); color: var(--text); }
.pce-persona-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.pce-persona-info { display: flex; flex-direction: column; }
.pce-persona-name { font-size: var(--text-sm); font-weight: 600; }
.pce-persona-niche { font-size: var(--text-xs); color: var(--text-dim); }

/* Accounts */
.pce-accounts { display: flex; flex-direction: column; gap: 0.25rem; }
.pce-account-row {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  font-size: var(--text-xs);
}
.pce-account-icon {
  width: 18px; height: 18px; border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.5rem; font-weight: 800; color: #fff;
}
.pce-account-label { flex: 1; color: var(--text-muted); }
.pce-account-status { color: var(--text-dim); font-family: var(--font-mono); font-size: 0.6rem; }
.pce-account-status--on { color: var(--success); }

/* Editor */
.pce-editor { display: flex; flex-direction: column; }
.pce-editor-header {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.pce-editor-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.pce-editor-meta { flex: 1; }
.pce-editor-meta h3 { font-size: var(--text-lg); font-weight: 700; }
.pce-editor-handle { font-size: var(--text-sm); color: var(--cyan); font-weight: 500; }
.pce-editor-niche { font-size: var(--text-xs); color: var(--text-dim); margin-left: 0.5rem; }
.pce-editor-actions { display: flex; gap: 0.5rem; }
.pce-save-btn {
  height: 34px; padding: 0 1rem; border-radius: var(--radius-xs);
  background: var(--success); border: none; color: #000;
  font-size: var(--text-sm); font-weight: 700; cursor: pointer;
  font-family: inherit; transition: all var(--ease-fast);
  display: inline-flex; align-items: center; gap: 0.3rem;
}
.pce-save-btn:hover { filter: brightness(1.1); }

/* Tabs */
.pce-tabs {
  display: flex; gap: 0; border-bottom: 1px solid var(--border);
}
.pce-tab {
  padding: 0.65rem 1rem;
  background: transparent; border: none; border-bottom: 2px solid transparent;
  color: var(--text-dim); font-size: var(--text-sm); font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all var(--ease-fast);
}
.pce-tab:hover { color: var(--text); background: var(--surface-2); }
.pce-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.pce-tab-desc { padding: 0.5rem 1.25rem; font-size: var(--text-xs); color: var(--text-dim); background: var(--surface-2); }
.pce-unsaved-badge {
  font-size: var(--text-xs); background: var(--gold); color: #000;
  padding: 0.1rem 0.4rem; border-radius: 3px; font-weight: 700;
}

/* Split Editor */
.pce-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.pce-editor-split { display: grid; grid-template-columns: 1fr 1fr; flex: 1; min-height: 0; }
.pce-editor-col { display: flex; flex-direction: column; overflow: hidden; }
.pce-editor-col:first-child { border-right: 1px solid var(--border); }
.pce-editor-col-header {
  padding: 0.5rem 0.85rem;
  font-size: var(--text-xs); font-weight: 700; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: var(--tracking-wide);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.pce-textarea {
  flex: 1; width: 100%; resize: none;
  background: var(--bg); border: none; padding: 0.85rem;
  color: var(--text); font-size: var(--text-sm);
  font-family: var(--font-mono); line-height: var(--leading-relaxed);
  outline: none; min-height: 300px;
}
.pce-preview {
  flex: 1; padding: 0.85rem; overflow-y: auto;
  font-size: var(--text-sm); line-height: var(--leading-relaxed);
}
.pce-md-h2 { font-size: var(--text-lg); font-weight: 700; color: var(--text); margin: 0.5rem 0 0.3rem; }
.pce-md-h3 { font-size: var(--text-base); font-weight: 600; color: var(--accent); margin: 0.4rem 0 0.2rem; }
.pce-md-h4 { font-size: var(--text-sm); font-weight: 600; color: var(--cyan); margin: 0.3rem 0 0.15rem; }
.pce-md-li { padding-left: 0.75rem; color: var(--text-muted); }
.pce-md-arrow { padding-left: 0.75rem; color: var(--success); font-family: var(--font-mono); font-size: var(--text-xs); }


/* ═══════════════════════════════════════════════════════════════
   INBOX HUB
   ═══════════════════════════════════════════════════════════════ */

.inbox-wrapper { display: flex; flex-direction: column; gap: 1rem; }
.inbox-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.75rem;
}
.inbox-toolbar-left { display: flex; }
.inbox-toolbar-right { display: flex; align-items: center; gap: 0.75rem; }
.inbox-filter-tabs { display: flex; border: 1px solid var(--border); border-radius: var(--radius-xs); overflow: hidden; }
.inbox-filter-tab {
  height: 34px; padding: 0 0.75rem;
  background: var(--surface); border: none;
  color: var(--text-dim); font-size: var(--text-xs); font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all var(--ease-fast);
  border-right: 1px solid var(--border);
}
.inbox-filter-tab:last-child { border-right: none; }
.inbox-filter-tab:hover { background: var(--surface-2); color: var(--text); }
.inbox-filter-tab.active { background: var(--accent); color: #fff; }
.inbox-persona-select {
  height: 34px; padding: 0 0.7rem; border-radius: var(--radius-xs);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); font-size: var(--text-xs); font-family: var(--font-body); outline: none;
}
.inbox-counter {
  font-size: var(--text-xs); color: var(--text-dim); font-family: var(--font-mono);
  padding: 0 0.5rem;
}

.inbox-list { display: flex; flex-direction: column; gap: 0.6rem; }
.inbox-empty {
  text-align: center; padding: 3rem 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.inbox-empty-icon { font-size: 2.5rem; display: block; margin-bottom: 0.5rem; }
.inbox-empty h4 { font-size: var(--text-lg); margin-bottom: 0.25rem; }
.inbox-empty p { color: var(--text-dim); font-size: var(--text-sm); max-width: 360px; margin: 0 auto; }

.inbox-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 1rem; transition: border-color var(--ease-fast);
}
.inbox-item:hover { border-color: var(--border-hover); }
.inbox-item--new { border-left: 3px solid var(--cyan); }
.inbox-item-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.6rem;
}
.inbox-item-left { display: flex; align-items: center; gap: 0.6rem; }
.inbox-item-right { display: flex; align-items: center; gap: 0.5rem; }
.inbox-item-plat {
  width: 24px; height: 24px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 800; color: #fff;
}
.inbox-item-username { font-size: var(--text-base); font-weight: 600; }
.inbox-item-type { font-size: var(--text-xs); color: var(--text-dim); margin-left: 0.4rem; }
.inbox-item-persona-badge {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.55rem; font-weight: 700; color: #fff;
}
.inbox-item-time { font-size: var(--text-xs); color: var(--text-dim); font-family: var(--font-mono); }
.inbox-item-new-badge {
  font-size: var(--text-xs); background: var(--cyan); color: #000;
  padding: 0.1rem 0.35rem; border-radius: 3px; font-weight: 700;
}
.inbox-item-content {
  font-size: var(--text-base); color: var(--text);
  line-height: var(--leading-normal);
  padding: 0.5rem 0.75rem;
  background: var(--surface-2); border-radius: var(--radius-xs);
  margin-bottom: 0.6rem;
}

.inbox-item-reply-section {
  border-top: 1px solid var(--border); padding-top: 0.6rem;
}
.inbox-item-reply-label {
  font-size: var(--text-xs); font-weight: 600; color: var(--accent);
  margin-bottom: 0.35rem;
}
.inbox-item-reply-text {
  width: 100%; resize: vertical;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-xs); padding: 0.6rem;
  color: var(--text); font-size: var(--text-sm); font-family: var(--font-body);
  line-height: var(--leading-normal); outline: none;
  margin-bottom: 0.5rem;
}
.inbox-item-reply-text:focus { border-color: var(--accent); }
.inbox-item-reply-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.inbox-reply-btn {
  height: 30px; padding: 0 0.7rem; border-radius: var(--radius-xs);
  font-size: var(--text-xs); font-weight: 600; cursor: pointer;
  font-family: inherit; border: 1px solid var(--border);
  transition: all var(--ease-fast);
}
.inbox-reply-btn--approve { background: var(--success); color: #000; border-color: var(--success); }
.inbox-reply-btn--approve:hover { filter: brightness(1.1); }
.inbox-reply-btn--edit { background: var(--surface-2); color: var(--text-muted); }
.inbox-reply-btn--edit:hover { border-color: var(--accent); color: var(--text); }
.inbox-reply-btn--ignore { background: transparent; color: var(--text-dim); }
.inbox-reply-btn--ignore:hover { color: #ef4444; border-color: #ef4444; }

.inbox-item-status-badge {
  font-size: var(--text-xs); font-weight: 600; padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs); display: inline-block;
}
.inbox-item-status--replied { background: var(--success-soft); color: var(--success); }
.inbox-item-status--ignored { background: rgba(239,68,68,0.1); color: #ef4444; }


/* ═══════════════════════════════════════════════════════════════
   TREND MONITOR
   ═══════════════════════════════════════════════════════════════ */

.trends-wrapper { display: flex; flex-direction: column; gap: 1rem; }
.trends-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.75rem;
}
.trends-toolbar-left { display: flex; flex-direction: column; }
.trends-toolbar-right { display: flex; align-items: center; gap: 0.5rem; }
.trends-title { font-size: var(--text-lg); font-weight: 700; }
.trends-subtitle { font-size: var(--text-xs); color: var(--text-dim); }
.trends-persona-select {
  height: 34px; padding: 0 0.7rem; border-radius: var(--radius-xs);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); font-size: var(--text-xs); font-family: var(--font-body); outline: none;
}
.trends-refresh-btn {
  height: 34px; padding: 0 0.75rem; border-radius: var(--radius-xs);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-muted); font-size: var(--text-xs); font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all var(--ease-fast);
}
.trends-refresh-btn:hover { border-color: var(--accent); color: var(--text); }

/* Hot Cloud */
.trends-cloud-section {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 1rem;
}
.trends-cloud-label { font-size: var(--text-sm); font-weight: 700; margin-bottom: 0.6rem; }
.trends-cloud { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.trends-cloud-tag {
  padding: 0.35rem 0.7rem; border-radius: var(--radius-full);
  background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3);
  color: #ef8888; font-size: var(--text-sm); font-weight: 500;
  cursor: pointer; font-family: inherit; transition: all var(--ease-fast);
}
.trends-cloud-tag:hover { background: rgba(239,68,68,0.2); border-color: #ef4444; }
.trends-cloud-delta { font-size: var(--text-xs); color: var(--success); font-weight: 700; margin-left: 0.3rem; }

/* Platform Grid */
.trends-platform-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0.75rem; }
.trends-platform-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden;
}
.trends-platform-header {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.trends-platform-icon {
  width: 22px; height: 22px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; font-weight: 800; color: #fff;
}
.trends-platform-name { font-size: var(--text-sm); font-weight: 600; }
.trends-platform-list { padding: 0.4rem 0; }
.trends-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.4rem 0.85rem;
  transition: background var(--ease-fast);
}
.trends-item:hover { background: var(--surface-2); }
.trends-item--hot { border-left: 2px solid #ef4444; }
.trends-item-main { display: flex; flex-direction: column; }
.trends-item-topic { font-size: var(--text-sm); font-weight: 500; }
.trends-item-vol { font-size: var(--text-xs); color: var(--text-dim); }
.trends-item-meta { display: flex; align-items: center; gap: 0.35rem; }
.trends-item-delta { font-size: var(--text-xs); color: var(--text-dim); font-family: var(--font-mono); }
.trends-item-delta--up { color: var(--success); font-weight: 600; }
.trends-item-fire { font-size: 0.7rem; }
.trends-item-gen-btn {
  width: 24px; height: 24px; border-radius: 4px;
  background: transparent; border: 1px solid var(--border);
  font-size: 0.65rem; cursor: pointer; opacity: 0;
  transition: all var(--ease-fast);
}
.trends-item:hover .trends-item-gen-btn { opacity: 1; }
.trends-item-gen-btn:hover { background: var(--accent-soft); border-color: var(--accent); }

.trends-empty {
  text-align: center; padding: 3rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.trends-empty-icon { font-size: 2.5rem; display: block; margin-bottom: 0.5rem; }
.trends-empty h4 { font-size: var(--text-lg); margin-bottom: 0.25rem; }
.trends-empty p { color: var(--text-dim); font-size: var(--text-sm); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .composer-body { grid-template-columns: 1fr; }
  .composer-settings { border-left: none; border-top: 1px solid var(--border); }
  .pce-layout { grid-template-columns: 1fr; }
  .pce-sidebar { border-right: none; border-bottom: 1px solid var(--border); flex-direction: row; flex-wrap: wrap; padding: 0.5rem; }
  .pce-editor-split { grid-template-columns: 1fr; }
  .dcal-grid { font-size: 0.75rem; }
  .dcal-cell { min-height: 60px; }
  .dcal-week-grid { grid-template-columns: 1fr; }
  .trends-platform-grid { grid-template-columns: 1fr; }

  /* Toolbar stacking */
  .dcal-toolbar,
  .inbox-toolbar,
  .trends-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .dcal-toolbar-left,
  .dcal-toolbar-right,
  .inbox-toolbar-left,
  .inbox-toolbar-right,
  .trends-toolbar-right {
    justify-content: center;
    flex-wrap: wrap;
  }

  /* Touch targets for toolbar buttons */
  .dcal-nav-btn,
  .dcal-today-btn,
  .dcal-view-btn,
  .dcal-new-btn,
  .inbox-filter-tab,
  .trends-refresh-btn {
    min-height: 44px;
  }

  /* Composer container full width */
  .composer-container {
    width: 100vw;
    max-width: 100vw;
    border-radius: 0;
    max-height: 100vh;
  }

  /* Inbox reply actions wrap */
  .inbox-item-reply-actions {
    flex-direction: column;
  }
  .inbox-reply-btn {
    width: 100%;
    justify-content: center;
  }

  /* Calendar month grid → 2 cols for readability */
  .dcal-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dcal-day-header {
    display: none;
  }

  /* Brand Brief mobile */
  .bb-crawl-row { flex-direction: column; }
  .bb-field-row { grid-template-columns: 1fr; }
  .bb-color-editor { grid-template-columns: repeat(2, 1fr); }
  .bb-platform-grid { grid-template-columns: 1fr 1fr; }
  .bb-checkbox-grid { grid-template-columns: 1fr 1fr; }
  .bb-viability-breakdown { grid-template-columns: 1fr; }
  .bb-nav { flex-direction: column; gap: 0.5rem; }
  .bb-btn { width: 100%; justify-content: center; }
  .bb-progress { gap: 0.15rem; }
  .bb-step-dot { width: 28px; height: 28px; font-size: 0.6rem; }
  .bb-step-line { min-width: 8px; }
}


/* ═══════════════════════════════════════════════════════════════
   BRAND BRIEF INTERVIEW
   ═══════════════════════════════════════════════════════════════ */

.bb-container {
  max-width: 720px;
  margin: 0 auto;
  display: flex; flex-direction: column; gap: 1.5rem;
}

/* Progress Stepper */
.bb-progress {
  display: flex; align-items: center; justify-content: center;
  gap: 0.25rem; padding: 0.5rem 0;
}
.bb-step-dot {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; cursor: pointer;
  background: var(--surface-2); border: 2px solid var(--border);
  color: var(--text-dim); transition: all 0.25s ease;
  flex-shrink: 0;
}
.bb-step-dot.active {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 0 12px rgba(124,106,237,0.4);
}
.bb-step-dot.done {
  background: var(--success); border-color: var(--success); color: #000;
}
.bb-step-dot:hover:not(.active) { border-color: var(--accent-mid); }
.bb-step-line {
  flex: 1; height: 2px; min-width: 12px;
  background: var(--border); border-radius: 1px;
}
.bb-step-line.done { background: var(--success); }

/* Header */
.bb-header { text-align: center; }
.bb-title { font-size: var(--text-lg); font-weight: 700; margin-bottom: 0.25rem; }
.bb-desc { font-size: var(--text-sm); color: var(--text-muted); }
.bb-step-label {
  font-size: var(--text-xs); color: var(--text-dim);
  font-family: var(--font-mono); margin-top: 0.25rem; display: inline-block;
}

/* Card */
.bb-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 1.5rem;
  display: flex; flex-direction: column; gap: 1.25rem;
}

/* Fields */
.bb-field { display: flex; flex-direction: column; gap: 0.4rem; }
.bb-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.bb-label {
  font-size: var(--text-sm); font-weight: 600; color: var(--text-muted);
  display: flex; align-items: center; gap: 0.4rem;
}
.bb-auto {
  font-size: var(--text-xs); color: var(--accent); font-weight: 500;
  background: var(--accent-soft); padding: 0.1rem 0.4rem; border-radius: 3px;
}
.bb-input {
  width: 100%; height: 42px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-xs); padding: 0 0.85rem;
  color: var(--text); font-size: var(--text-base); font-family: var(--font-body);
  outline: none; transition: border-color var(--ease-fast);
}
.bb-input:focus { border-color: var(--accent); }
.bb-textarea {
  width: 100%; min-height: 100px; resize: vertical;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-xs); padding: 0.75rem 0.85rem;
  color: var(--text); font-size: var(--text-base); font-family: var(--font-body);
  line-height: var(--leading-normal); outline: none;
  transition: border-color var(--ease-fast);
}
.bb-textarea:focus { border-color: var(--accent); }
.bb-textarea-sm { min-height: 60px; }
.bb-select {
  width: 100%; height: 42px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-xs); padding: 0 0.85rem;
  color: var(--text); font-size: var(--text-base); font-family: var(--font-body);
  outline: none; cursor: pointer; appearance: none;
}
.bb-select:focus { border-color: var(--accent); }

/* Crawl Step */
.bb-crawl-row { display: flex; gap: 0.5rem; }
.bb-crawl-row .bb-input { flex: 1; }
.bb-btn-analyze {
  white-space: nowrap; height: 42px; padding: 0 1.25rem;
  background: var(--accent); border: none; color: #fff;
  border-radius: var(--radius-xs); font-weight: 600;
  cursor: pointer; font-family: inherit; font-size: var(--text-sm);
  display: flex; align-items: center; gap: 0.4rem;
  transition: background 0.2s ease;
}
.bb-btn-analyze:hover { background: #6b5ace; }
.bb-btn-analyze:disabled { opacity: 0.6; cursor: not-allowed; }
.bb-detected-badge {
  background: rgba(124,106,237,0.08); border: 1px solid rgba(124,106,237,0.2);
  border-radius: var(--radius-xs); padding: 0.75rem 1rem;
  font-size: var(--text-sm); color: var(--accent);
  display: flex; align-items: center; gap: 0.5rem;
}
.bb-crawl-preview {
  display: flex; flex-direction: column; gap: 0.75rem;
  padding-top: 0.5rem;
}
.bb-preview-section h4 {
  font-size: var(--text-xs); text-transform: uppercase;
  color: var(--text-dim); font-weight: 700; letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}
.bb-preview-section span { font-size: var(--text-sm); color: var(--text-muted); }

/* Color UI */
.bb-color-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.bb-color-chip { display: flex; align-items: center; gap: 0.4rem; }
.bb-color-swatch {
  width: 24px; height: 24px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
}
.bb-color-chip span { font-size: var(--text-xs); color: var(--text-muted); text-transform: capitalize; }
.bb-color-editor { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
.bb-color-edit-item {
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
}
.bb-color-edit-item span {
  font-size: var(--text-xs); color: var(--text-muted); text-transform: capitalize;
}
.bb-color-input {
  width: 56px; height: 40px; border: 1px solid var(--border);
  border-radius: var(--radius-xs); cursor: pointer;
  background: transparent; padding: 2px;
}

/* Logo */
.bb-logo-preview {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-xs); padding: 1rem;
  display: flex; align-items: center; justify-content: center;
}

/* Hint */
.bb-hint {
  background: rgba(124,106,237,0.06); border: 1px solid rgba(124,106,237,0.12);
  border-radius: var(--radius-xs); padding: 0.75rem 1rem;
  font-size: var(--text-sm); color: var(--text-muted);
  display: flex; align-items: flex-start; gap: 0.5rem;
}

/* Tags */
.bb-tag-row { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.bb-tag {
  padding: 0.25rem 0.6rem; border-radius: var(--radius-full);
  background: var(--accent-soft); border: 1px solid var(--accent-mid);
  color: var(--accent); font-size: var(--text-xs); font-weight: 500;
}

/* Checkboxes / Grid */
.bb-checkbox-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.bb-check-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 0.75rem; border-radius: var(--radius-xs);
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: var(--text-sm); cursor: pointer; transition: all 0.15s ease;
}
.bb-check-item:hover { border-color: var(--accent-mid); }
.bb-check-item input[type="checkbox"] { accent-color: var(--accent); }

/* Platforms */
.bb-platform-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.bb-platform-btn {
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  padding: 1rem 0.5rem; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 2px solid var(--border);
  color: var(--text-muted); font-size: var(--text-sm); font-weight: 500;
  cursor: pointer; font-family: inherit; transition: all 0.2s ease;
  position: relative;
}
.bb-platform-btn:hover { border-color: var(--accent-mid); color: var(--text); }
.bb-platform-btn.selected {
  border-color: var(--accent); color: var(--text);
  background: var(--accent-soft);
}
.bb-platform-icon { font-size: 1.5rem; }
.bb-platform-check {
  position: absolute; top: 6px; right: 8px;
  font-size: 0.7rem; color: var(--accent); font-weight: 700;
}

/* Navigation */
.bb-nav {
  display: flex; justify-content: space-between;
  padding-top: 0.5rem;
}
.bb-btn {
  height: 44px; padding: 0 1.5rem;
  border-radius: var(--radius-xs); font-family: inherit;
  font-size: var(--text-sm); font-weight: 600;
  cursor: pointer; transition: all 0.2s ease;
  display: flex; align-items: center; gap: 0.4rem;
  border: none;
}
.bb-btn-back {
  background: var(--surface-2); color: var(--text-muted);
  border: 1px solid var(--border);
}
.bb-btn-back:hover { border-color: var(--border-strong); color: var(--text); }
.bb-btn-next { background: var(--accent); color: #fff; }
.bb-btn-next:hover { background: #6b5ace; }
.bb-btn-submit {
  background: var(--success); color: #000; font-weight: 700;
}
.bb-btn-submit:hover { filter: brightness(1.1); }

/* Spinner */
.bb-spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff; border-radius: 50%;
  animation: pgSpin 0.6s linear infinite;
}

/* Muted text */
.bb-muted { color: var(--text-dim); font-style: italic; }

/* Review */
.bb-review { display: flex; flex-direction: column; gap: 1rem; }
.bb-review-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xs); padding: 1rem;
}
.bb-review-section h4 {
  font-size: var(--text-sm); font-weight: 700; color: var(--accent);
  margin-bottom: 0.6rem; text-transform: uppercase; letter-spacing: 0.04em;
}
.bb-review-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 0.35rem 0; border-bottom: 1px solid var(--border);
  gap: 1rem;
}
.bb-review-row:last-child { border-bottom: none; }
.bb-review-label { font-size: var(--text-sm); color: var(--text-dim); min-width: 100px; flex-shrink: 0; }
.bb-review-value { font-size: var(--text-sm); color: var(--text); text-align: right; word-break: break-word; }

/* Viability */
.bb-viability {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 1.5rem;
  display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
}
.bb-viability-score { text-align: center; }
.bb-score-circle {
  width: 100px; height: 100px; border-radius: 50%;
  border: 4px solid var(--accent);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  margin: 0 auto 0.5rem;
}
.bb-score-num { font-size: 2rem; font-weight: 800; color: var(--accent); }
.bb-score-label { font-size: var(--text-xs); color: var(--text-dim); }
.bb-viability-breakdown {
  width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
.bb-viability-item { }
.bb-viability-item-header {
  display: flex; justify-content: space-between;
  font-size: var(--text-xs); color: var(--text-muted); margin-bottom: 0.3rem;
}
.bb-viability-bar {
  height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden;
}
.bb-viability-fill {
  height: 100%; background: var(--accent); border-radius: 3px;
  transition: width 0.5s ease;
}

/* Persona Drafts */
.bb-persona-drafts { display: flex; flex-direction: column; gap: 0.75rem; }
.bb-persona-draft {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-xs); padding: 1rem;
  transition: opacity 0.3s ease;
}
.bb-persona-draft-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.bb-persona-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.bb-persona-bio { font-size: var(--text-sm); color: var(--text-muted); line-height: var(--leading-normal); margin-bottom: 0.5rem; }
.bb-persona-draft-actions { display: flex; gap: 0.5rem; }
.bb-btn-approve {
  height: 34px; padding: 0 1rem; border-radius: var(--radius-xs);
  background: var(--success); border: none; color: #000;
  font-size: var(--text-sm); font-weight: 600; cursor: pointer;
  font-family: inherit;
}
.bb-btn-approve:hover { filter: brightness(1.1); }
