/* ═══════════════════════════════════════════
   MAJU AI Video Launchpad — v1.1
   Dark theme dashboard
   ═══════════════════════════════════════════ */

/* ── Reset & Variables ── */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  --bg-body:#0f1117;
  --bg-sidebar:#151821;
  --bg-card:#1a1d28;
  --bg-input:#222636;
  --border:#2a2e3d;
  --text:#e2e4ea;
  --text-dim:#8a8fa3;
  --accent:#6c5ce7;
  --accent-glow:#6c5ce740;
  --success:#00b894;
  --danger:#ff6b6b;
  --warning:#fdcb6e;
  --revision:#e17055;
  --radius:10px;
  --sidebar-w:220px;
}
html{font-size:15px}
body{
  font-family:'Inter',system-ui,sans-serif;
  background:var(--bg-body);
  color:var(--text);
  display:flex;
  min-height:100vh;
}

/* ── Sidebar ── */
.sidebar{
  width:var(--sidebar-w);
  background:var(--bg-sidebar);
  border-right:1px solid var(--border);
  display:flex;flex-direction:column;
  padding:1.5rem 1rem;
  position:fixed;top:0;left:0;bottom:0;
  z-index:100;
  transition:transform .25s;
}
.logo{font-size:1.6rem;font-weight:700;color:var(--text)}
.logo-accent{color:var(--accent)}
.logo-sub{font-size:.75rem;color:var(--text-dim);margin-top:2px}
.sidebar-nav{margin-top:1.5rem;display:flex;flex-direction:column;gap:.3rem}
.nav-section-label{font-size:.65rem;text-transform:uppercase;letter-spacing:.08em;color:var(--text-dim);opacity:.5;padding:.6rem .8rem .15rem;margin-top:.4rem}
.nav-btn{
  background:none;border:none;color:var(--text-dim);
  padding:.65rem .8rem;border-radius:var(--radius);
  text-align:left;font:inherit;font-size:.9rem;
  cursor:pointer;display:flex;align-items:center;gap:.55rem;
  transition:all .15s;position:relative;width:100%;
}
.nav-btn:hover{background:var(--bg-input);color:var(--text)}
.nav-btn.active{background:var(--accent);color:#fff}
.nav-icon{font-size:1rem;width:1.2rem;text-align:center}
.badge{
  background:var(--danger);color:#fff;font-size:.7rem;
  padding:2px 8px;border-radius:50px;margin-left:auto;
}
.badge.pulse{animation:badgePulse .5s ease-in-out 3}
@keyframes badgePulse{0%,100%{transform:scale(1)}50%{transform:scale(1.4)}}
.sidebar-footer{margin-top:auto}
.version{font-size:.7rem;color:var(--text-dim)}

/* ── Main ── */
.main{
  flex:1;margin-left:var(--sidebar-w);
  padding:1.5rem 2rem 3rem;
  min-height:100vh;
}
.topbar{
  display:flex;align-items:center;gap:1rem;
  margin-bottom:1.5rem;
}
.menu-toggle{display:none;background:none;border:none;color:var(--text);font-size:1.4rem;cursor:pointer}
.page-title{font-size:1.3rem;font-weight:600}

/* ── Cards ── */
.card{
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:1.5rem;
  margin-bottom:1.25rem;
}
.card-title{font-size:1.05rem;font-weight:600;margin-bottom:1rem}

/* ── Form Grid ── */
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin-bottom:1.25rem}
.form-group label{display:block;font-size:.8rem;color:var(--text-dim);margin-bottom:.3rem}
.form-group.full-width{grid-column:1/-1}
select,input[type="datetime-local"],textarea{
  width:100%;padding:.6rem .8rem;
  background:var(--bg-input);border:1px solid var(--border);
  border-radius:var(--radius);color:var(--text);
  font:inherit;font-size:.9rem;
}
select:focus,input:focus,textarea:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-glow)}
textarea{resize:vertical}
code{background:var(--bg-input);padding:1px 5px;border-radius:4px;font-size:.8rem;color:var(--accent)}

/* ── Posting Toggle ── */
.posting-toggle{display:flex;gap:1rem;margin-bottom:.5rem}
.toggle-option{display:flex;align-items:center;gap:.4rem;cursor:pointer;font-size:.9rem}
.toggle-option input[type="radio"]{accent-color:var(--accent)}
.toggle-label{color:var(--text)}
.schedule-field{margin-top:.5rem}

/* ── Buttons ── */
.btn{border:none;border-radius:var(--radius);font:inherit;cursor:pointer;transition:all .15s}
.btn-primary{
  display:block;width:100%;padding:.75rem;
  background:var(--accent);color:#fff;
  font-weight:600;font-size:.95rem;
}
.btn-primary:hover{filter:brightness(1.15)}
.btn-secondary{padding:.55rem 1.2rem;background:var(--bg-input);color:var(--text)}
.btn-secondary:hover{background:var(--border)}
.btn-danger{padding:.55rem 1.2rem;background:var(--danger);color:#fff}
.btn-danger:hover{filter:brightness(1.15)}
.btn-sm{padding:.35rem .7rem;font-size:.8rem;background:var(--bg-input);color:var(--text-dim)}
.btn-sm:hover{background:var(--border);color:var(--text)}
.btn-approve{padding:.4rem .9rem;background:var(--success);color:#fff;font-size:.8rem;border:none;border-radius:var(--radius);cursor:pointer}
.btn-reject{padding:.4rem .9rem;background:var(--danger);color:#fff;font-size:.8rem;border:none;border-radius:var(--radius);cursor:pointer}
.btn-approve:hover,.btn-reject:hover{filter:brightness(1.15)}

/* ── Pipeline ── */
.pipeline{display:flex;gap:0;margin-bottom:.75rem}
.pipeline-step{
  flex:1;text-align:center;padding:.6rem .4rem;
  background:var(--bg-input);border:1px solid var(--border);
  font-size:.78rem;color:var(--text-dim);
  position:relative;
}
.pipeline-step:first-child{border-radius:var(--radius) 0 0 var(--radius)}
.pipeline-step:last-child{border-radius:0 var(--radius) var(--radius) 0}
.pipeline-step.active{background:var(--accent);color:#fff;border-color:var(--accent)}
.pipeline-step.done{background:var(--success);color:#fff;border-color:var(--success)}
.step-num{font-weight:700;margin-right:.3rem}
.pipeline-msg{font-size:.82rem;color:var(--text-dim);font-style:italic}

/* ── Queue ── */
.queue-filters{display:flex;gap:.5rem;margin-bottom:1rem;flex-wrap:wrap}
.filter-btn{
  padding:.4rem .9rem;border-radius:50px;
  background:var(--bg-input);border:1px solid var(--border);
  color:var(--text-dim);font:inherit;font-size:.8rem;cursor:pointer;
}
.filter-btn:hover{border-color:var(--accent);color:var(--text)}
.filter-btn.active{background:var(--accent);border-color:var(--accent);color:#fff}
.queue-item{
  padding:1rem;margin-bottom:.6rem;
  background:var(--bg-input);border-radius:var(--radius);
  border-left:4px solid var(--text-dim);
  display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;
}
.queue-item.status-pending{border-left-color:var(--warning)}
.queue-item.status-approved{border-left-color:var(--success)}
.queue-item.status-rejected{border-left-color:var(--danger)}
.queue-item.status-revision{border-left-color:var(--revision)}
.queue-video{flex-shrink:0;width:180px;border-radius:var(--radius);overflow:hidden;background:#000}
.queue-video video{width:100%;aspect-ratio:9/16;object-fit:cover;display:block;border-radius:var(--radius)}
.queue-video-placeholder{width:180px;aspect-ratio:9/16;display:flex;align-items:center;justify-content:center;background:var(--bg-card);border:1px dashed var(--text-dim);font-size:.72rem;color:var(--text-dim)}
.queue-video-error{width:180px;aspect-ratio:9/16;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;background:var(--bg-card);border:1px dashed #e74c3c;font-size:.72rem;color:var(--text-dim);padding:8px;text-align:center}
.queue-video-error span{color:#e74c3c;font-weight:600;font-size:.8rem}
.queue-video-error small{color:var(--text-dim);font-size:.65rem;line-height:1.3}
.btn-restitch{margin-top:4px;padding:4px 10px;background:#3498db;color:#fff;border:none;border-radius:4px;font-size:.7rem;cursor:pointer;transition:background .2s}
.btn-restitch:hover{background:#2980b9}
.queue-info{flex:1}
.queue-info h4{font-size:.9rem;font-weight:600;margin-bottom:.25rem}
.queue-info p{font-size:.78rem;color:var(--text-dim)}
.queue-meta{font-size:.72rem;color:var(--text-dim);margin-top:.35rem}
.queue-actions{display:flex;gap:.4rem;flex-shrink:0;align-items:center}
.revision-count{font-size:.72rem;color:var(--revision);margin-top:.2rem}
.rejection-notes{font-size:.78rem;color:var(--revision);margin-top:.3rem;font-style:italic;border-left:2px solid var(--revision);padding-left:.5rem}
.approval-notes{font-size:.78rem;color:var(--accent);margin-top:.3rem;font-style:italic;border-left:2px solid var(--accent);padding-left:.5rem}
.ai-prompt{font-size:.78rem;color:#4ade80;margin-top:.4rem;border-left:2px solid #4ade80;padding-left:.5rem;background:rgba(74,222,128,.05);padding:.4rem .5rem;border-radius:0 4px 4px 0}

/* ── Scheduled Posts ── */
.api-status{
  display:flex;align-items:center;gap:.5rem;
  padding:.6rem .8rem;border-radius:var(--radius);
  background:var(--bg-input);font-size:.82rem;
  margin-bottom:1rem;
}
.status-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}
.status-dot.connected{background:var(--success)}
.status-dot.disconnected{background:var(--danger)}
.link-settings{color:var(--accent);text-decoration:none;margin-left:auto;font-size:.8rem}
.link-settings:hover{text-decoration:underline}
.scheduled-item{
  padding:.8rem;margin-bottom:.5rem;
  background:var(--bg-input);border-radius:var(--radius);
  display:flex;justify-content:space-between;align-items:center;
}
.scheduled-item .sch-title{font-size:.88rem;font-weight:500}
.scheduled-item .sch-meta{font-size:.75rem;color:var(--text-dim);margin-top:.2rem}
.scheduled-item .sch-platform{
  font-size:.72rem;padding:2px 8px;border-radius:50px;
  background:var(--accent);color:#fff;
}

/* ── SOP Wiki ── */
.sop-container{display:flex;gap:1.5rem}
.sop-sidebar{flex:0 0 180px;display:flex;flex-direction:column;gap:.3rem}
.sop-link{
  padding:.5rem .7rem;border-radius:var(--radius);
  background:none;border:none;color:var(--text-dim);
  font:inherit;font-size:.85rem;text-align:left;cursor:pointer;
}
.sop-link:hover{background:var(--bg-input);color:var(--text)}
.sop-link.active{background:var(--accent);color:#fff}
.sop-content{flex:1;font-size:.9rem;line-height:1.65}
.sop-content h1,.sop-content h2,.sop-content h3{margin:1rem 0 .4rem;font-weight:600}
.sop-content h1{font-size:1.3rem}
.sop-content h2{font-size:1.1rem;color:var(--accent)}
.sop-content h3{font-size:.95rem}
.sop-content ul,.sop-content ol{margin:.4rem 0 .4rem 1.5rem}
.sop-content li{margin-bottom:.25rem}
.sop-content p{margin-bottom:.5rem}
.sop-content strong{color:var(--accent)}

/* ── API Settings ── */
.settings-note{font-size:.82rem;color:var(--text-dim);margin-bottom:1.25rem}
.api-group{display:flex;flex-direction:column;gap:1.1rem;margin-bottom:1.25rem}
.api-field label{display:block;font-size:.85rem;font-weight:500;margin-bottom:.3rem}
.api-input-row{display:flex;gap:.5rem}
.api-input-row input{flex:1}
.api-hint{font-size:.75rem;color:var(--text-dim);margin-top:.2rem;display:block}
.save-msg{font-size:.85rem;color:var(--success);margin-top:.6rem}

/* ── Modal ── */
.modal-overlay{
  position:fixed;inset:0;
  background:rgba(0,0,0,.65);
  display:flex;align-items:center;justify-content:center;
  z-index:200;
}
.modal{
  background:var(--bg-card);border:1px solid var(--border);
  border-radius:var(--radius);padding:1.5rem;
  width:min(480px,90vw);
}
.modal h3{font-size:1.05rem;margin-bottom:.6rem}
.modal p{font-size:.88rem;color:var(--text-dim);margin-bottom:.8rem}
.modal textarea{margin-bottom:1rem}
.modal-actions{display:flex;gap:.6rem;justify-content:flex-end}

/* ── Activity ── */
.activity-item{
  padding:.6rem 0;border-bottom:1px solid var(--border);
  font-size:.85rem;
}
.activity-item:last-child{border-bottom:none}
.activity-time{font-size:.72rem;color:var(--text-dim)}

/* ── Analytics ── */
.analytics-section{margin-top:1.25rem}
.section-title{font-size:.95rem;font-weight:600;margin-bottom:.75rem;color:var(--accent)}
.accounts-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:.75rem}
.account-card{
  background:var(--bg-input);border:1px solid var(--border);border-radius:var(--radius);
  padding:1rem;
}
.account-card .acct-platform{
  font-size:.72rem;padding:2px 8px;border-radius:50px;
  background:var(--accent);color:#fff;display:inline-block;margin-bottom:.5rem;
}
.account-card .acct-name{font-size:.9rem;font-weight:600;margin-bottom:.5rem}
.account-card .acct-stats{display:flex;flex-direction:column;gap:.25rem}
.account-card .acct-stat{
  display:flex;justify-content:space-between;font-size:.8rem;
}
.account-card .acct-stat .stat-label{color:var(--text-dim)}
.account-card .acct-stat .stat-value{font-weight:600}
.top-posts-list{display:flex;flex-direction:column;gap:.6rem}
.top-post{
  background:var(--bg-input);border:1px solid var(--border);border-radius:var(--radius);
  padding:.8rem 1rem;display:flex;justify-content:space-between;align-items:center;gap:1rem;
}
.top-post .post-info{flex:1;min-width:0}
.top-post .post-text{font-size:.85rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.top-post .post-meta{font-size:.72rem;color:var(--text-dim);margin-top:.2rem}
.top-post .post-stats{display:flex;gap:.8rem;flex-shrink:0}
.top-post .post-stat{text-align:center}
.top-post .post-stat .stat-num{font-size:1rem;font-weight:700;display:block}
.top-post .post-stat .stat-label{font-size:.65rem;color:var(--text-dim);text-transform:uppercase}
.stats-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:.6rem}
.stat-box{
  background:var(--bg-input);border:1px solid var(--border);border-radius:var(--radius);
  padding:.8rem;text-align:center;
}
.stat-box .stat-number{font-size:1.4rem;font-weight:700;color:var(--accent)}
.stat-box .stat-desc{font-size:.72rem;color:var(--text-dim);margin-top:.2rem}

/* ── Stitch Panel ── */
.backend-status{
  display:flex;align-items:center;gap:.5rem;
  padding:.5rem .8rem;border-radius:var(--radius);
  background:var(--bg-input);font-size:.82rem;margin-bottom:1rem;
}
.stitch-segments{display:flex;flex-direction:column;gap:.6rem;margin-bottom:1rem}
.stitch-segment{
  display:flex;align-items:center;gap:.8rem;
  padding:.6rem .8rem;border-radius:var(--radius);
  background:var(--bg-input);border:1px solid var(--border);
}
.stitch-segment label{font-size:.82rem;font-weight:500;min-width:160px;flex-shrink:0}
.stitch-segment input[type="file"]{
  flex:1;font-size:.8rem;color:var(--text-dim);
  background:none;border:none;padding:0;
}
.stitch-segment input[type="file"]::file-selector-button{
  background:var(--accent);color:#fff;border:none;
  padding:.3rem .7rem;border-radius:6px;font-size:.78rem;cursor:pointer;
  margin-right:.5rem;
}
.stitch-segment .file-status{font-size:.72rem;color:var(--text-dim);min-width:60px;text-align:right}
.stitch-segment .file-status.ready{color:var(--success)}
.stitch-options{margin-bottom:1rem}
.stitch-options .form-group{margin-bottom:.5rem}
.stitch-options input[type="text"]{
  width:100%;padding:.5rem .8rem;
  background:var(--bg-input);border:1px solid var(--border);
  border-radius:var(--radius);color:var(--text);font:inherit;font-size:.85rem;
}
.stitch-progress{margin-top:1rem}
.progress-bar{
  height:8px;background:var(--bg-input);border-radius:50px;overflow:hidden;margin-bottom:.5rem;
}
.progress-fill{
  height:100%;background:var(--accent);border-radius:50px;
  transition:width .3s ease;width:0%;
}
.stitch-status{font-size:.82rem;color:var(--text-dim);font-style:italic}
.stitch-result{margin-top:1rem;text-align:center}
.stitch-result p{font-size:.88rem;margin-bottom:.6rem;color:var(--success)}
.stitch-result video{
  border-radius:var(--radius);border:1px solid var(--border);
  max-height:400px;margin-bottom:.6rem;display:block;margin:0 auto .6rem;
}
.stitch-result .btn-secondary{display:inline-block;text-decoration:none}
#btn-stitch:disabled{opacity:.5;cursor:not-allowed}

/* ── Utilities ── */
.hidden{display:none!important}
.empty-state{color:var(--text-dim);text-align:center;padding:2rem;font-size:.9rem}
.view{display:none}
.view.active{display:block}

/* ── Responsive ── */
@media(max-width:768px){
  .sidebar{transform:translateX(-100%)}
  .sidebar.open{transform:translateX(0)}
  .main{margin-left:0;padding:1rem}
  .menu-toggle{display:block}
  .form-grid{grid-template-columns:1fr}
  .sop-container{flex-direction:column}
  .sop-sidebar{flex:none;flex-direction:row;overflow-x:auto}
  .pipeline{flex-direction:column}
  .pipeline-step{border-radius:var(--radius)!important}
  .queue-item{flex-direction:column}
}

/* Queue social-content display */
.queue-social-content{margin:.6rem 0;display:flex;flex-direction:column;gap:.4rem}
.queue-social-content label{font-size:.72rem;color:var(--text-dim);font-weight:500}
.queue-social-content label small{font-weight:400;opacity:.7}
.queue-social-content textarea{
  width:100%;padding:.45rem .6rem;
  background:var(--bg-card);border:1px solid var(--border);
  border-radius:6px;color:var(--text);font:inherit;font-size:.82rem;
  resize:vertical;line-height:1.4;
}
.queue-social-content textarea:focus{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-glow)}
.queue-social-content input[type="text"]{
  width:100%;padding:.4rem .6rem;
  background:var(--bg-card);border:1px solid var(--border);
  border-radius:6px;color:var(--text);font:inherit;font-size:.8rem;
}
.queue-social-content input[type="text"]:focus{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-glow)}
.queue-segments-preview{font-size:.72rem;color:var(--text-dim);margin-top:.3rem;line-height:1.5}
.queue-segments-preview strong{color:var(--text-dim);font-weight:600}
.queue-segments-preview span{display:inline}
.queue-hook-label{
  display:inline-block;font-size:.68rem;
  padding:2px 8px;border-radius:50px;
  background:var(--accent);color:#fff;
  margin-bottom:.3rem;font-weight:500;
}

/* ── JWT Status Widget ── */
.jwt-status{
  margin-left:auto;display:flex;align-items:center;gap:8px;
  padding:4px 14px;border-radius:50px;
  background:var(--bg-input);border:1px solid var(--border);
  font-size:.78rem;color:var(--text-dim);
  cursor:default;
}
.jwt-dot{
  width:9px;height:9px;border-radius:50%;
  background:#666;transition:background .3s;
  flex-shrink:0;
}
.jwt-dot.connected{background:var(--success)}
.jwt-dot.disconnected{background:var(--danger);animation:jwtPulse 2s infinite}
.jwt-dot.checking{background:var(--warning)}
@keyframes jwtPulse{0%,100%{opacity:1}50%{opacity:.4}}
.jwt-label{white-space:nowrap}
.jwt-connect-btn{
  padding:2px 10px!important;font-size:.72rem!important;
  background:var(--accent)!important;color:#fff!important;
  border-radius:50px!important;cursor:pointer!important;
}
.jwt-connect-btn:hover{filter:brightness(1.15)}
.btn-xs{padding:2px 8px;font-size:.72rem}

/* ── Connect Modal ── */
.modal-overlay{
  position:fixed;inset:0;z-index:9999;
  background:rgba(0,0,0,0.65);
  display:flex;align-items:center;justify-content:center;
  backdrop-filter:blur(4px);
}
.modal-overlay.hidden{display:none}
.modal-card{
  background:var(--bg-card);border:1px solid var(--border);
  border-radius:14px;padding:2rem;max-width:520px;width:90%;
  position:relative;
}
.modal-close{
  position:absolute;top:12px;right:16px;
  background:none;border:none;color:var(--text-dim);
  font-size:1.4rem;cursor:pointer;line-height:1;
}
.modal-close:hover{color:var(--text)}
.connect-steps{display:flex;flex-direction:column;gap:14px}
.connect-step{
  display:flex;align-items:flex-start;gap:12px;
  padding:10px 12px;border-radius:8px;
  background:var(--bg-input);
}
.step-badge{
  width:24px;height:24px;border-radius:50%;flex-shrink:0;
  background:var(--accent);color:#fff;
  display:flex;align-items:center;justify-content:center;
  font-size:.75rem;font-weight:700;
}
.connect-step a{text-decoration:underline}
.connect-step a:hover{opacity:.8}

/* Animal Stash Pipeline Stages */
.as-stage{display:flex;align-items:center;gap:10px;padding:8px 12px;border-radius:8px;background:var(--bg-input);border:1px solid var(--border);font-size:.85rem}
.as-stage-icon{font-size:1rem;width:18px;text-align:center;flex-shrink:0}
.as-stage-name{font-weight:500;color:var(--text)}
.as-stage[data-status="running"]{border-color:rgba(108,92,231,.4);background:rgba(108,92,231,.06)}
.as-stage[data-status="running"] .as-stage-icon::before{content:"⟳"}
.as-stage[data-status="passed"]{border-color:rgba(16,185,129,.35);background:rgba(16,185,129,.06)}
.as-stage[data-status="passed"] .as-stage-icon::before{content:"✓";color:#34d399}
.as-stage[data-status="failed"]{border-color:rgba(239,68,68,.35);background:rgba(239,68,68,.06)}
.as-stage[data-status="failed"] .as-stage-icon::before{content:"✕";color:#f87171}
.as-stage[data-status="pending"] .as-stage-icon::before{content:"○";color:#8a8fa3}

/* ─── Intelligence Tab ─── */
.trend-card{overflow:hidden;padding:0}
.trend-preview{display:block;width:100%;aspect-ratio:9/16;position:relative;text-decoration:none;overflow:hidden;background:#111}
.trend-video{width:100%;height:100%;object-fit:cover}
.trend-thumb-img{width:100%;height:100%;background-size:cover;background-position:center}
.trend-preview .badge{position:absolute;font-size:.75em;padding:2px 8px;border-radius:4px;z-index:2}
.platform-badge{top:8px;left:8px;background:rgba(99,102,241,.9);color:#fff}
.duration-badge{top:8px;right:8px;background:rgba(0,0,0,.7);color:#fff}
.score-badge{bottom:8px;right:8px;font-weight:700;font-size:.85em!important}
.score-high{background:rgba(16,185,129,.9);color:#fff}
.score-mid{background:rgba(251,191,36,.9);color:#111}
.score-low{background:rgba(239,68,68,.9);color:#fff}
.trend-body{padding:10px 14px 14px}
.trend-audio{font-size:.82em;color:#a78bfa;margin-bottom:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.trend-meta{font-size:.78em;color:#8a8fa3;display:flex;justify-content:space-between;margin-bottom:6px}
.trend-badges{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:6px}
.trend-rationale{font-size:.82em;color:#ccc;line-height:1.35;margin:6px 0;white-space:pre-line}
.trend-user-notes{font-size:.78em;color:#8a8fa3;font-style:italic;margin:4px 0 6px}
.trend-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}
.difficulty-easy{background:rgba(16,185,129,.2);color:#34d399;font-size:.72em;padding:2px 7px;border-radius:4px}
.difficulty-medium{background:rgba(251,191,36,.2);color:#fbbf24;font-size:.72em;padding:2px 7px;border-radius:4px}
.difficulty-hard{background:rgba(239,68,68,.2);color:#f87171;font-size:.72em;padding:2px 7px;border-radius:4px}
.credits-badge{background:rgba(99,102,241,.2);color:#a78bfa;font-size:.72em;padding:2px 7px;border-radius:4px}
.badge-approved{background:rgba(16,185,129,.2);color:#34d399;font-size:.72em;padding:2px 7px;border-radius:4px}
.badge-dismissed{background:rgba(107,114,128,.2);color:#9ca3af;font-size:.72em;padding:2px 7px;border-radius:4px}
.btn-approve-reel{background:rgba(16,185,129,.15);color:#34d399;border:1px solid rgba(16,185,129,.3)}
.btn-approve-reel:hover{background:rgba(16,185,129,.25)}
.btn-dismiss-reel{background:rgba(107,114,128,.15);color:#9ca3af;border:1px solid rgba(107,114,128,.3)}
.btn-dismiss-reel:hover{background:rgba(107,114,128,.25)}
.intel-stat{text-align:center;min-width:60px}
.intel-stat strong{display:block;font-size:1.3em;color:#f0f0f0}
.intel-stat span{font-size:.75em;color:#8a8fa3;text-transform:uppercase}
.intel-filter{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1);color:#ccc}
.intel-filter.active{background:rgba(99,102,241,.2);border-color:rgba(99,102,241,.4);color:#a78bfa}

/* Projects */
.project-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}
.project-card.status-generating{border-color:var(--accent);box-shadow:0 0 12px var(--accent-glow)}
.project-card.status-done{border-color:var(--success)}
.project-card.status-failed{border-color:var(--danger)}
.project-header{display:flex;gap:16px;padding:16px;align-items:flex-start}
.project-source{width:120px;height:213px;border-radius:8px;overflow:hidden;flex-shrink:0;background:rgba(255,255,255,.06);position:relative}
.project-source video,.project-source img{width:100%;height:100%;object-fit:cover}
.project-source .platform-tag{position:absolute;top:6px;left:6px;background:rgba(0,0,0,.6);color:#fff;font-size:.65em;padding:2px 6px;border-radius:4px}
.project-meta{flex:1;min-width:0}
.project-meta h4{font-size:1em;margin-bottom:4px;color:#f0f0f0}
.project-meta .meta-row{font-size:.82em;color:#8a8fa3;margin-bottom:3px;display:flex;gap:8px;flex-wrap:wrap}
.project-brief{padding:0 16px 12px;font-size:.88em;color:#ccc;line-height:1.4}
.project-brief strong{color:#a78bfa}
.project-frames{padding:0 16px 16px}
.project-frames h5{font-size:.8em;text-transform:uppercase;letter-spacing:.05em;color:#8a8fa3;margin-bottom:8px}
.frame-row{display:flex;gap:8px;margin-bottom:8px;align-items:flex-start}
.frame-num{width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:.7em;font-weight:700;flex-shrink:0;margin-top:4px}
.frame-num.type-static{background:rgba(34,197,94,.2);color:#4ade80}
.frame-num.type-video{background:rgba(99,102,241,.2);color:#a78bfa}
.frame-type-select{background:var(--bg-input);border:1px solid var(--border);color:var(--text);border-radius:6px;padding:3px 6px;font-size:.78em;flex-shrink:0;margin-top:2px}
.frame-textarea{background:var(--bg-input);border:1px solid var(--border);color:var(--text);border-radius:6px;padding:6px 8px;font-size:.82em;width:100%;resize:vertical;min-height:32px;line-height:1.3;font-family:inherit}
.project-actions{padding:12px 16px;border-top:1px solid var(--border);display:flex;gap:8px;justify-content:flex-end}
.btn-generate{background:var(--accent);color:#fff;border:none;padding:8px 20px;border-radius:var(--radius);font:inherit;font-size:.9em;cursor:pointer;font-weight:600}
.btn-generate:hover{filter:brightness(1.15)}
.btn-generate:disabled{opacity:.5;cursor:not-allowed}
.btn-delete-project{background:rgba(255,107,107,.1);color:var(--danger);border:1px solid rgba(255,107,107,.2);padding:8px 14px;border-radius:var(--radius);font:inherit;font-size:.85em;cursor:pointer}

/* Scheduled Posts */
.scheduled-post{display:flex;gap:12px;padding:12px;border:1px solid var(--border);border-radius:8px;margin-bottom:8px;background:rgba(255,255,255,.03)}
.scheduled-thumb{width:64px;height:64px;border-radius:6px;object-fit:cover;flex-shrink:0;background:rgba(255,255,255,.06)}
.scheduled-thumb.placeholder{width:64px;height:64px}
.scheduled-info{flex:1;min-width:0}
.scheduled-text{font-size:.9em;color:var(--text);margin-bottom:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.scheduled-meta{font-size:.78em;color:#8a8fa3;display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.scheduled-platform{background:rgba(99,102,241,.15);color:#a78bfa;padding:1px 6px;border-radius:4px;font-size:.85em}
.scheduled-status{padding:1px 6px;border-radius:4px;font-size:.85em}
.scheduled-status.status-scheduled{background:rgba(251,191,36,.15);color:#fbbf24}
.scheduled-status.status-published{background:rgba(16,185,129,.15);color:#34d399}
.scheduled-status.status-error{background:rgba(239,68,68,.15);color:#f87171}

/* Multi-version scheduling */
.spacing-options{margin-top:8px;padding:10px;border:1px solid var(--border);border-radius:8px;background:rgba(255,255,255,.03)}
.spacing-options label{font-size:.85em;color:#8a8fa3}
.spacing-options select,.spacing-options input{padding:6px 8px;border-radius:6px;border:1px solid var(--border);background:var(--bg-card);color:var(--text);font-size:.85em}
