/* ══════════════════════════════════════════════════
   BINGO STUDIO — Global Brand Styles
   Brand: #FF6B00 orange | BG: #FFFFFF light | Text: #0A0A0A
   Font: System — -apple-system, Segoe UI, Roboto
══════════════════════════════════════════════════ */

:root {
  --accent:      #FF6B00;
  --accent-dim:  #E05A00;
  --accent-bg:   rgba(255,107,0,0.10);
  --bg:          #FFFFFF;
  --bg-soft:     #F5F5F5;
  --bg-card:     #FFFFFF;
  --text:        #0A0A0A;
  --text-mid:    #555555;
  --text-light:  #999999;
  --border:      #E5E5E5;
  --sidebar-w:   240px;
  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-hover:0 4px 12px rgba(0,0,0,0.10), 0 8px 24px rgba(0,0,0,0.08);
}

* { margin:0; padding:0; box-sizing:border-box; }

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-soft);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ──────────────────────────────────── */
body { display: flex; }

.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  height: 100vh;
  background: #F5F5F5;
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0;
  z-index: 100;
  border-right: 1px solid #E5E5E5;
}

.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  padding: 0;
}

/* ── Sidebar Brand ───────────────────────────── */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.brand-name {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: #0A0A0A;
  letter-spacing: -0.2px;
}
.brand-tagline {
  display: block;
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 1px;
}

/* ── Sidebar Nav ─────────────────────────────── */
.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  cursor: pointer;
  color: rgba(10,10,10,0.55);
  font-size: 13.5px;
  font-weight: 500;
  width: 100%;
  text-align: left;
  transition: all 0.15s ease;
  position: relative;
}
.nav-item:hover {
  background: rgba(0,0,0,0.05);
  color: rgba(10,10,10,0.85);
}
.nav-item.active {
  background: var(--accent);
  color: #FFFFFF;
  font-weight: 600;
}
.nav-item.active .nav-icon { color: #FFFFFF; }
.nav-icon { display: flex; align-items: center; flex-shrink: 0; }
.nav-label { flex: 1; }

.nav-badge {
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}
.nav-badge.red { background: #E53935; }
.nav-item.active .nav-badge { background: rgba(255,255,255,0.3); }

/* ── Sidebar Footer ──────────────────────────── */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.user-avatar {
  width: 34px; height: 34px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}
.user-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #0A0A0A;
}
.user-role {
  display: block;
  font-size: 11px;
  color: rgba(0,0,0,0.45);
}
.sidebar-tagline {
  font-size: 10px;
  color: rgba(0,0,0,0.28);
  line-height: 1.5;
  font-style: italic;
}

/* ── Tab Panels ──────────────────────────────── */
.tab-panel { display: none; min-height: 100vh; }
.tab-panel.active { display: block; }

/* ── Panel Header ────────────────────────────── */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 32px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.panel-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}
.panel-sub {
  font-size: 13px;
  color: var(--text-mid);
  margin-top: 2px;
}
.header-actions { display: flex; gap: 8px; align-items: center; }

/* ── Buttons ─────────────────────────────────── */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--accent-dim); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 9px 16px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-ghost {
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  padding: 4px 0;
}
.btn-ghost:hover { text-decoration: underline; }

/* ── Zone 1 — Stat Cards ─────────────────────── */
.zone { padding: 24px 32px; }
.zone-1 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  padding-bottom: 8px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat-value {
  font-size: 32px;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  margin: 4px 0;
}
.stat-value.accent { color: var(--accent); }
.stat-meta { font-size: 11px; color: var(--text-light); }

/* ── Zone 2+3 ────────────────────────────────── */
.zone-23 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding-top: 4px;
}

.zone-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.zone-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.zone-card-header h3 {
  font-size: 15px;
  font-weight: 800;
}

/* ── Mini Calendar ───────────────────────────── */
.mini-calendar { width: 100%; }

/* ── Live Feed ───────────────────────────────── */
.feed-list { display: flex; flex-direction: column; gap: 12px; }
.feed-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  transition: border-color 0.15s;
}
.feed-item.lead { border-color: rgba(229,57,53,0.25); background: rgba(229,57,53,0.03); }
.feed-item:hover { border-color: var(--accent); }

.feed-platform {
  width: 32px; height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}
.feed-platform.ig     { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.feed-platform.fb     { background: #1877F2; }
.feed-platform.tiktok { background: #010101; }
.feed-platform.yt     { background: #FF0000; }

.feed-body { flex: 1; min-width: 0; }
.feed-name { display: block; font-size: 12px; font-weight: 700; color: var(--text); }
.feed-text { display: block; font-size: 12px; color: var(--text-mid); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-time { display: block; font-size: 10px; color: var(--text-light); margin-top: 2px; }

.feed-tag { font-size: 10px; font-weight: 600; white-space: nowrap; }
.feed-tag.red    { color: #E53935; }
.feed-tag.green  { color: #43A047; }
.feed-tag.yellow { color: #F9A825; }

/* ── Zone 4 — Performance ────────────────────── */
.zone-4 {
  background: var(--bg-card);
  margin: 0 32px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.perf-period { font-size: 12px; color: var(--text-light); }
.perf-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.perf-block { display: flex; flex-direction: column; gap: 10px; }
.perf-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.perf-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-mid);
}
.perf-row span:last-child { margin-left: auto; font-weight: 700; color: var(--text); }
.perf-num { font-weight: 700; color: var(--text); }

.plat-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.ig-c  { background: #E1306C; }
.fb-c  { background: #1877F2; }
.tt-c  { background: #010101; }
.yt-c  { background: #FF0000; }

.perf-posts { display: flex; flex-direction: column; gap: 8px; }
.perf-post {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.post-rank {
  width: 20px; height: 20px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}
.post-title { flex: 1; color: var(--text-mid); }
.post-reach { font-weight: 700; color: var(--text); white-space: nowrap; font-size: 11px; }

.leads-big {
  font-size: 36px;
  font-weight: 900;
  color: var(--accent);
}
.leads-big span { font-size: 13px; font-weight: 500; color: var(--text-light); }

/* Content balance bars */
.content-bars { display: flex; flex-direction: column; gap: 8px; }
.cbar { display: flex; flex-direction: column; gap: 3px; }
.cbar > span { font-size: 11px; color: var(--text-mid); }
.bar-track {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--text);
  border-radius: 3px;
  font-size: 0;
  transition: width 0.6s ease;
}
.bar-fill.accent-bar { background: var(--accent); }
.bar-fill.warn-bar   { background: #E53935; }

/* ── Calendar Tab ────────────────────────────── */
.coming-soon-shell { padding: 32px; }
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* ── Ideas Tab ───────────────────────────────── */
.ideas-grid {
  padding: 24px 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.idea-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.2s;
}
.idea-card:hover { box-shadow: var(--shadow-hover); }
.idea-meta { display: flex; gap: 8px; align-items: center; }
.plat-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}
.ig-tag  { background: rgba(225,48,108,0.15); color: #F06292; }
.tt-tag  { background: rgba(0,0,0,0.07); color: #555555; }
.yt-tag  { background: rgba(255,0,0,0.15); color: #EF5350; }
.fb-tag  { background: rgba(24,119,242,0.15); color: #64B5F6; }
.li-tag  { background: rgba(0,119,181,0.15); color: #4FC3F7; }

.source-tag {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--accent-bg);
  color: var(--accent);
  font-weight: 600;
}
.idea-hook {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text);
}
.idea-angle { font-size: 12px; color: var(--text-mid); line-height: 1.5; }
.idea-est {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-light);
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.idea-type {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-mid);
}
.idea-actions { display: flex; gap: 8px; }
.btn-approve, .btn-edit, .btn-reject {
  flex: 1;
  padding: 8px 4px;
  border-radius: 4px;
  border: none;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.btn-approve { background: rgba(46,125,50,0.12); color: #2E7D32; }
.btn-approve:hover { background: rgba(46,125,50,0.20); transform: translateY(-1px); }
.btn-edit    { background: var(--accent-bg); color: var(--accent); }
.btn-edit:hover    { background: rgba(255,107,0,0.18); transform: translateY(-1px); }
.btn-reject  { background: rgba(198,40,40,0.10); color: #C62828; }
.btn-reject:hover  { background: rgba(198,40,40,0.18); transform: translateY(-1px); }

/* ── Ideas loading state ─────────────────────── */
.idea-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
  color: var(--text-light);
  font-size: 14px;
}

/* ── Fuel Tab ────────────────────────────────── */
.fuel-grid {
  padding: 24px 32px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}
.fuel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fuel-source-badge {
  display: inline-block;
  background: #0A0A0A;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  width: fit-content;
}
.codie-badge { background: #7B1FA2; }
.log-badge   { background: var(--accent); }
.fuel-card h3 {
  font-size: 17px;
  font-weight: 800;
}
.fuel-card p { font-size: 13px; color: var(--text-mid); line-height: 1.6; }
.fuel-status {
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  color: var(--text-light);
  margin-top: auto;
}
.log-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text-light);
  margin-top: auto;
}

/* ── Inbox Tab ───────────────────────────────── */
.filter-group { display: flex; gap: 6px; }
.filter-btn {
  padding: 6px 14px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-mid);
  transition: all 0.15s;
  white-space: nowrap;
}
.filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.filter-btn:hover:not(.active) { border-color: var(--accent); color: var(--accent); }

.inbox-list { padding: 24px 32px; display: flex; flex-direction: column; gap: 12px; }
.inbox-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s;
}
.inbox-item:hover { border-color: var(--accent); }
.inbox-item.lead-item { border-left: 3px solid #E53935; }

.inbox-platform {
  width: 40px; height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
}

.inbox-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.inbox-top { display: flex; align-items: center; gap: 8px; }
.inbox-name { font-weight: 700; font-size: 14px; }
.inbox-time { font-size: 11px; color: var(--text-light); margin-left: auto; }
.inbox-post { font-size: 11px; color: var(--text-light); }
.inbox-text { font-size: 13px; color: var(--text); margin: 2px 0; }
.inbox-suggest {
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  padding: 8px 10px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 6px;
}
.suggest-label { font-size: 10px; font-weight: 700; color: var(--accent); display: block; margin-bottom: 3px; }
.suggest-text  { font-size: 12px; color: var(--text-mid); line-height: 1.5; }

.inbox-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.inbox-tag { font-size: 11px; font-weight: 600; }
.inbox-tag.red    { color: #E53935; }
.inbox-tag.green  { color: #43A047; }
.inbox-tag.yellow { color: #F9A825; }

.btn-reply, .btn-crm {
  padding: 7px 14px;
  border-radius: 4px;
  border: none;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.btn-reply { background: var(--accent); color: #fff; }
.btn-reply:hover { background: #e55f00; }
.btn-crm   { background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-mid); }
.btn-crm:hover { border-color: var(--accent); color: var(--accent); }

/* ── Editing Tab ─────────────────────────────── */
.upload-zone {
  margin: 24px 32px 0;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--bg-soft);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-bg);
}
.upload-zone.has-file {
  border-color: #43A047;
  background: rgba(46,125,50,0.05);
}

.editing-grid {
  padding: 16px 32px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.tool-form label { font-size: 11px; font-weight: 700; color: var(--text-light); display: block; margin-bottom: 4px; }
.tool-form input, .tool-form select {
  width: 100%; padding: 7px 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 12px; background: var(--bg);
}
.tool-btn { transition: opacity 0.15s; }

/* Queue section */
.queue-section {
  margin: 24px 32px 32px;
  padding: 20px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.queue-section h3 { font-size: 15px; font-weight: 800; }
.queue-empty { padding: 20px; text-align: center; color: var(--text-light); font-size: 13px; }
.queue-job {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 6px;
  font-size: 12px; background: var(--bg);
}
.queue-job-icon { font-size: 18px; flex-shrink: 0; }
.queue-job-info { flex: 1; min-width: 0; }
.queue-job-label { font-weight: 700; color: var(--text); }
.queue-job-sub { color: var(--text-light); font-size: 11px; margin-top: 2px; }
.queue-progress {
  height: 4px; background: var(--border); border-radius: 2px; margin-top: 5px;
}
.queue-progress-fill {
  height: 100%; border-radius: 2px; background: var(--accent);
  transition: width 0.5s ease;
}
.queue-status {
  padding: 3px 8px; border-radius: 10px; font-size: 10px; font-weight: 700;
  white-space: nowrap;
}
.qs-pending    { background: #F5F5F5; color: #999999; }
.qs-processing { background: var(--accent-bg); color: var(--accent); }
.qs-done       { background: rgba(46,125,50,0.10); color: #2E7D32; }
.qs-failed     { background: rgba(198,40,40,0.10); color: #C62828; }

.editing-tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.editing-tool-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.editing-tool-card.ujenzi { border-top: 3px solid var(--accent); }
.tool-icon { font-size: 32px; }
.editing-tool-card h4 {
  font-size: 16px;
  font-weight: 800;
}
.editing-tool-card p { font-size: 13px; color: var(--text-mid); line-height: 1.55; flex: 1; }

.queue-section {
  margin: 24px 32px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.queue-section h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 12px;
}
.queue-empty {
  font-size: 13px;
  color: var(--text-light);
  padding: 24px 0;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
}

/* ── Calendar Tab ────────────────────────────── */
.balance-bar {
  padding: 10px 32px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  min-height: 44px;
}
.balance-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text-mid);
}
.balance-chip .chip-bar {
  width: 40px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.balance-chip .chip-fill { height: 100%; background: var(--accent); border-radius: 2px; }
.balance-warn {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(255,107,0,0.1);
  border: 1px solid rgba(255,107,0,0.25);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  max-width: 320px;
}

.cal-wrap { padding: 0 32px 32px; }
.cal-headers {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  margin-bottom: 1px;
}
.cal-headers div {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  padding: 10px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.cal-loading {
  grid-column: 1 / -1;
  padding: 60px;
  text-align: center;
  color: var(--text-light);
  font-size: 13px;
  background: var(--bg);
}
.cal-cell {
  background: var(--bg);
  min-height: 110px;
  padding: 8px;
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cal-cell:hover { background: rgba(255,107,0,0.06); }
.cal-cell.today-cell { background: rgba(255,107,0,0.1); }
.cal-cell.empty { background: var(--bg-soft); cursor: default; }
.cal-cell.other-month { opacity: 0.4; }
.cal-date {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-mid);
  margin-bottom: 2px;
}
.cal-date.today-num {
  background: var(--accent);
  color: #fff;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.cal-pill {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Status colors */
.s-idea        { background: #F9A825; }
.s-script_ready{ background: #FF6B00; }
.s-filming     { background: #42A5F5; }
.s-editing     { background: #7E57C2; }
.s-scheduled   { background: #66BB6A; }
.s-posted      { background: #2E7D32; }
.s-missed      { background: #E53935; }

/* Day detail panel */
.day-panel {
  position: fixed;
  right: -400px;
  top: 0; bottom: 0;
  width: 380px;
  background: var(--bg);
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
  z-index: 300;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(.4,0,.2,1);
}
.day-panel.open { right: 0; }
.day-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.day-panel-header h3 { font-size: 17px; font-weight: 800; }
.day-panel-close {
  background: none; border: none;
  font-size: 18px; cursor: pointer;
  color: var(--text-light);
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.15s;
}
.day-panel-close:hover { background: var(--bg-soft); }
.day-panel-body { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.day-panel-footer { padding: 16px 20px; border-top: 1px solid var(--border); }

.day-item {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.day-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.day-item-title { font-size: 13px; font-weight: 700; color: var(--text); flex: 1; }
.day-item-plat  { font-size: 10px; color: var(--text-light); }
.day-item-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.status-select {
  font-size: 11px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  color: var(--text-mid);
}
.btn-script-write {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.btn-del {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: #C62828;
  cursor: pointer;
}

.day-empty {
  text-align: center;
  padding: 40px 0;
  color: var(--text-light);
  font-size: 13px;
}

.day-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.2);
  z-index: 299;
}
.day-overlay.show { display: block; }

/* Add item modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-box {
  background: var(--bg);
  border-radius: var(--radius);
  width: 500px;
  max-width: 94vw;
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 17px; font-weight: 800; }
.modal-header button {
  background: none; border: none;
  font-size: 18px; cursor: pointer;
  color: var(--text-light);
}
.modal-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}
.form-group { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.form-row { display: flex; gap: 12px; }
.form-group label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.form-group input, .form-group select {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text);
  background: var(--bg-soft);
  outline: none;
  transition: border-color 0.15s;
}
.form-group input:focus, .form-group select:focus { border-color: var(--accent); }

/* Script drawer */
.script-drawer {
  position: fixed;
  right: -640px;
  top: 0; bottom: 0;
  width: 620px;
  background: var(--bg);
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 32px rgba(0,0,0,0.14);
  z-index: 300;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(.4,0,.2,1);
}
.script-drawer.open { right: 0; }
.script-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 24px 14px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.script-drawer-header h3 { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.script-drawer-header > button {
  background: none; border: none;
  font-size: 20px; cursor: pointer;
  color: var(--text-light); flex-shrink: 0;
  padding: 2px 6px; border-radius: 4px;
}
.script-drawer-header > button:hover { background: var(--bg-soft); }
.script-drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.script-drawer-footer {
  display: flex;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

.script-format-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.fmt-tab {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.15s;
}
.fmt-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.script-generating {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 0;
  color: var(--text-light);
  font-size: 13px;
}
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Script content blocks */
.script-block { margin-bottom: 20px; }
.script-block-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-light);
  margin-bottom: 6px;
}
.script-block-content {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}
.script-block-content.hook-block {
  border-left: 3px solid var(--accent);
  background: var(--accent-bg);
  font-weight: 600;
  font-size: 15px;
}
.script-tag {
  display: inline-block;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  margin: 2px 3px 2px 0;
}

/* ── Analytics Coming Soon ────────────────────── */
.coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 80px 32px;
  text-align: center;
}
.cs-icon { font-size: 56px; }
.coming-soon h3 {
  font-size: 22px;
  font-weight: 800;
}
.coming-soon p { font-size: 14px; color: var(--text-mid); max-width: 400px; }

/* ── Connections Tab ─────────────────────────── */
.connections-grid {
  padding: 24px 32px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.conn-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
}
.conn-logo {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.ig-logo { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.fb-logo { background: #1877F2; }
.tt-logo { background: #010101; }
.yt-logo { background: #FF0000; }
.li-logo { background: #0077B5; }
.mc-logo { background: #00B2FF; }

.conn-info { flex: 1; }
.conn-info h4 { font-size: 15px; font-weight: 800; }
.conn-info p  { font-size: 11px; color: var(--text-light); margin-top: 2px; }

.conn-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-light);
  white-space: nowrap;
}
.status-dot { width: 6px; height: 6px; border-radius: 50%; }
.red-dot    { background: #E53935; }
.green-dot  { background: #43A047; }
.yellow-dot { background: #F9A825; }

.btn-connect {
  padding: 8px 14px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-mid);
  white-space: nowrap;
  transition: all 0.15s;
}
.btn-connect:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Settings Tab ────────────────────────────── */
.settings-wrap {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 860px;
}

.engine-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid;
}
.engine-banner.loading  { background: var(--bg-soft); border-color: var(--border); color: var(--text-light); }
.engine-banner.ready    { background: rgba(46,125,50,0.08); border-color: rgba(46,125,50,0.25); color: #2E7D32; }
.engine-banner.missing  { background: rgba(255,107,0,0.08); border-color: rgba(255,107,0,0.25); color: var(--accent); }

.settings-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}
.settings-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.settings-section-header h3 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 3px;
}
.settings-section-header p { font-size: 12px; color: var(--text-mid); max-width: 520px; }

.key-status {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.key-status.set      { background: rgba(46,125,50,0.10); color: #2E7D32; }
.key-status.not-set  { background: rgba(198,40,40,0.10); color: #C62828; }

.key-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.key-input-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 220px;
}
.key-input-group label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.key-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  overflow: hidden;
  transition: border-color 0.15s;
}
.key-input-wrap:focus-within { border-color: var(--accent); }
.key-input-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 9px 12px;
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 13px;
  color: var(--text);
  outline: none;
}
.btn-show-hide {
  background: none;
  border: none;
  padding: 0 10px;
  cursor: pointer;
  font-size: 14px;
  opacity: 0.5;
  transition: opacity 0.15s;
}
.btn-show-hide:hover { opacity: 1; }

.key-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.key-feedback {
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
  min-height: 18px;
  transition: color 0.2s;
}
.key-feedback.ok    { color: #66BB6A; }
.key-feedback.error { color: #EF5350; }
.key-feedback.info  { color: var(--accent); }

.service-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-soft);
}
.service-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #ccc;
}
.service-dot.online  { background: #43A047; box-shadow: 0 0 0 3px rgba(67,160,71,0.2); }
.service-dot.offline { background: #E53935; }

/* ── Connections Tab ─────────────────────────────────────── */
.conn-note {
  margin: 20px 32px 32px;
  padding: 14px 18px;
  background: var(--accent-bg);
  border: 1px solid rgba(255,107,0,0.2);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-mid);
}
.conn-note strong { color: var(--accent); }

/* ── Inbox platform dots (meta/youtube shared) ─────────────── */
.inbox-platform.meta    { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.inbox-platform.youtube { background: #FF0000; }
.inbox-platform.tiktok  { background: #010101; }
.inbox-platform.linkedin{ background: #0077B5; }
.inbox-item.read        { opacity: 0.65; }
.crm-done {
  font-size: 11px; font-weight: 700; color: #2E7D32;
  background: rgba(46,125,50,0.10); padding: 3px 8px; border-radius: 10px;
}

/* ── ManyChat section ──────────────────────────────────────── */
.manychat-section {
  margin: 0 32px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.manychat-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.manychat-section-header h3 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 2px;
}
.mc-status-text { font-size: 12px; color: var(--text-light); }
.mc-status-text.connected   { color: #43A047; font-weight: 600; }
.mc-status-text.disconnected{ color: #E53935; }

.mc-flows-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  padding: 18px 22px;
}
.mc-flow-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.mc-flow-card:hover { border-color: var(--accent); box-shadow: var(--shadow-hover); }
.mc-flow-card.live  { border-left: 3px solid #43A047; }
.mc-flow-card.setup { border-left: 3px solid var(--accent); }
.mc-flow-emoji  { font-size: 24px; margin-bottom: 8px; }
.mc-flow-name   { font-size: 13px; font-weight: 800; margin-bottom: 4px; }
.mc-flow-trigger{ font-size: 11px; color: var(--accent); font-weight: 600; margin-bottom: 6px;
  background: var(--accent-bg); padding: 2px 7px; border-radius: 10px; display: inline-block; }
.mc-flow-desc   { font-size: 12px; color: var(--text-mid); line-height: 1.5; margin-bottom: 10px; }
.mc-flow-footer { display: flex; align-items: center; justify-content: space-between; }
.mc-badge-live  { font-size: 10px; font-weight: 700; color: #2E7D32; background: rgba(46,125,50,0.10); padding: 2px 7px; border-radius: 10px; }
.mc-badge-setup { font-size: 10px; font-weight: 700; color: var(--accent); background: var(--accent-bg); padding: 2px 7px; border-radius: 10px; }

/* ── Radar Trends grid ─────────────────────────────────────── */
.radar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.radar-article {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: border-color 0.15s;
}
.radar-article:hover { border-color: var(--accent); }
.radar-cat {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: #7c83d1;
}
.radar-title {
  font-size: 13px; font-weight: 600; color: var(--text);
  line-height: 1.4; text-decoration: none;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.radar-title:hover { color: var(--accent); }
.radar-meta { font-size: 11px; color: var(--text-light); }

/* ── Analytics Tab ─────────────────────────────────────────── */
#analytics-cards .stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.an-bar-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}
.an-bar-label span:first-child { font-size: 12px; color: var(--text-mid); }
.an-bar-label span:last-child  { font-size: 11px; font-weight: 700; color: var(--text); }

/* ── Weekly Briefing Card ──────────────────────────────────── */
.briefing-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-mid);
  white-space: pre-wrap;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
}
.briefing-text strong {
  color: var(--text);
  font-weight: 800;
  display: block;
  margin-top: 12px;
  margin-bottom: 4px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.briefing-text strong:first-child { margin-top: 0; }

/* ── Form inputs ───────────────────────────────────────────── */
input, select, textarea {
  color-scheme: light;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  outline: none;
}

/* ── Bar chart with count labels ───────────────────────────── */
.cbar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.cbar-name {
  font-size: 12px;
  color: var(--text-mid);
  min-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cbar-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  margin-left: auto;
  min-width: 20px;
  text-align: right;
}

/* ── Proposals Tab ─────────────────────────────────────────── */
.proposal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.proposal-card:hover {
  border-color: var(--accent);
  transform: translateX(2px);
}
.proposal-card-left  { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.proposal-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }

.proposal-client {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}
.proposal-meta {
  font-size: 12px;
  color: var(--text-light);
}
.proposal-services {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.proposal-budget {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}
.proposal-date {
  font-size: 11px;
  color: var(--text-light);
}

/* Proposal status badges */
.proposal-status {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.ps-draft { background: #F5F5F5; color: #999999; }
.ps-sent  { background: rgba(255,107,0,0.10); color: var(--accent); }
.ps-won   { background: rgba(46,125,50,0.10); color: #2E7D32; }
.ps-lost  { background: rgba(198,40,40,0.10); color: #C62828; }

/* Proposal drawer content */
.proposal-content {
  font-size: 14px;
  line-height: 1.85;
  color: var(--text-mid);
}
.proposal-content strong {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  display: block;
  margin-top: 20px;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.proposal-content strong:first-child { margin-top: 0; }

/* ══════════════════════════════════════════════════
   UJENZI KIDIGITALI — Production Hub
════════════════════════════════════════════════════ */

.uk-section {
  margin: 0 32px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.uk-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}
.uk-section-header h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}
.uk-ep-count {
  font-size: 12px;
  color: var(--text-light);
}

/* New Episode Form */
.uk-new-form {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 20px;
}
.uk-form-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.uk-form-grid .form-group { margin-bottom: 0; }
.uk-new-form .form-group { margin-bottom: 12px; }
.uk-new-form textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.uk-new-form textarea:focus { border-color: var(--accent); }

/* Episodes Table */
.uk-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.uk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.uk-table th {
  background: var(--bg-soft);
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.uk-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.uk-table tbody tr:last-child td { border-bottom: none; }
.uk-table tbody tr:hover { background: var(--bg-soft); }
.uk-empty {
  text-align: center;
  color: var(--text-light);
  font-size: 13px;
  padding: 24px !important;
}
.uk-status-select {
  border: none;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

/* Idea Cards Grid */
.uk-ideas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.uk-ideas-placeholder {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-light);
  font-size: 13px;
  padding: 32px 0;
}
.uk-idea-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s;
}
.uk-idea-card:hover { box-shadow: var(--shadow-hover); }
.uk-idea-num {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}
.uk-idea-source {
  font-size: 11px;
  color: var(--text-light);
  margin-bottom: 8px;
  line-height: 1.4;
}
.uk-idea-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 6px;
}
.uk-idea-topic {
  font-size: 12px;
  color: var(--text-mid);
  margin-bottom: 10px;
}
.uk-idea-points {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.7;
  flex: 1;
}

/* Stories Feed */
.uk-stories-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.uk-story-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  transition: box-shadow 0.15s;
}
.uk-story-card:hover { box-shadow: var(--shadow-hover); }
.uk-story-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.uk-story-source {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.uk-story-date {
  font-size: 11px;
  color: var(--text-light);
}
.uk-story-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 4px;
}
.uk-story-summary {
  font-size: 12px;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 10px;
}
.uk-story-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Script Template */
.uk-script-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 900px) {
  .uk-script-grid { grid-template-columns: 1fr; }
}
.uk-seg-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.uk-seg-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.uk-seg-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.uk-seg-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}
.uk-seg-dur {
  font-size: 11px;
  color: var(--text-light);
  background: var(--accent-bg);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}
.uk-seg-area {
  width: 100%;
  min-height: 160px;
  padding: 12px 14px;
  border: none;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg-soft);
  resize: vertical;
  outline: none;
}
.uk-seg-area:focus { background: #FFFDF8; }

/* ── Research & Ideas ──────────────────────────── */
.uk-research-form {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

/* Keyword picker */
.uk-kw-picker {
  position: relative;
  flex: 1;
  min-width: 260px;
}
.uk-kw-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  overflow: hidden;
  transition: border-color 0.15s;
}
.uk-kw-picker:focus-within .uk-kw-control { border-color: var(--accent); }
.uk-kw-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: transparent;
}
.uk-kw-arrow {
  padding: 0 12px;
  color: var(--text-light);
  cursor: pointer;
  font-size: 12px;
  user-select: none;
}
.uk-kw-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hover);
  z-index: 200;
  max-height: 320px;
  overflow-y: auto;
}
.uk-kw-group {
  padding: 8px 12px 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
}
.uk-kw-item {
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.1s;
}
.uk-kw-item:hover { background: var(--accent-bg); color: var(--accent); }
.uk-kw-no-match {
  padding: 16px 14px;
  font-size: 12px;
  color: var(--text-light);
  text-align: center;
}

/* Research result cards */
.uk-research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.uk-research-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow 0.15s;
}
.uk-research-card:hover { box-shadow: var(--shadow-hover); }
.uk-res-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.uk-res-num {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.uk-res-format {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 0.4px;
}
.uk-res-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
}
.uk-res-summary {
  font-size: 12px;
  color: var(--text-mid);
  line-height: 1.6;
}
.uk-res-why {
  font-size: 12px;
  color: var(--text-mid);
  font-style: italic;
  line-height: 1.5;
  padding: 6px 10px;
  background: var(--accent-bg);
  border-radius: 6px;
}
.uk-res-points {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.8;
  flex: 1;
}
.uk-res-sources {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}
.uk-res-source-link {
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.uk-res-source-link:hover { text-decoration: underline; }

/* ── Real Brand Story Cards ──────────────────────── */
.uk-brand-story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.uk-brand-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s;
}
.uk-brand-card:hover { box-shadow: var(--shadow-hover); }
.uk-brand-card-new { animation: uk-slide-in 0.4s ease; }
@keyframes uk-slide-in { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }

.uk-brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.uk-brand-logo {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 800;
  flex-shrink: 0;
}
.uk-brand-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.uk-brand-industry {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 2px 7px;
  border-radius: 20px;
  margin-top: 3px;
  letter-spacing: 0.4px;
}
.uk-brand-src-link {
  font-size: 16px;
  color: var(--text-light);
  text-decoration: none;
  flex-shrink: 0;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.1s;
}
.uk-brand-src-link:hover { color: var(--accent); }
.uk-brand-body {
  padding: 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.uk-brand-label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 3px;
}
.uk-brand-text {
  font-size: 12px;
  color: var(--text-mid);
  line-height: 1.65;
}
.uk-brand-result {
  background: var(--accent);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.uk-brand-result .uk-brand-label { color: rgba(255,255,255,0.75); }
.uk-brand-result .uk-brand-text  { color: #fff; font-weight: 600; font-size: 13px; }
.uk-brand-lesson {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.uk-brand-script {
  font-size: 12px;
  color: var(--text-mid);
  font-style: italic;
  line-height: 1.6;
  padding: 8px 12px;
  background: var(--bg-soft);
  border-radius: 6px;
  border-left: 3px solid var(--accent);
}
.uk-brand-footer {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}

/* Library rows */
.uk-lib-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.uk-lib-row:last-child { border-bottom: none; }
.uk-lib-logo {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
  flex-shrink: 0;
}
.uk-lib-info  { flex: 1; min-width: 0; }
.uk-lib-brand { font-size: 13px; font-weight: 700; color: var(--text); }
.uk-lib-point { font-size: 11px; color: var(--text-light); margin-top: 3px; font-style: italic; }
.uk-lib-date  { font-size: 10px; color: var(--text-light); margin-top: 2px; }
.uk-lib-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════
   UJENZI — Inner Tab Bar
════════════════════════════════════════════════════ */
.uk-tab-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 32px;
  border-bottom: 2px solid var(--border);
  background: var(--bg);
  overflow-x: auto;
  scrollbar-width: none;
}
.uk-tab-bar::-webkit-scrollbar { display: none; }

.uk-inner-tab {
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mid);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.uk-inner-tab:hover { color: var(--text); }
.uk-inner-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 700;
}

.uk-inner-panel { display: none; }
.uk-inner-panel.active { display: block; }

/* ══════════════════════════════════════════════════
   UJENZI — Script Writer (split view)
════════════════════════════════════════════════════ */
.uk-sw-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  height: calc(100vh - 140px);
  min-height: 500px;
}
@media (max-width: 900px) {
  .uk-sw-split { grid-template-columns: 1fr; height: auto; }
}
.uk-sw-pane {
  display: flex;
  flex-direction: column;
  padding: 24px 28px;
  overflow-y: auto;
  background: var(--bg);
}
.uk-sw-right {
  border-left: 1px solid var(--border);
  background: var(--bg-soft);
}
.uk-sw-textarea {
  flex: 1;
  min-height: 300px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
}
.uk-sw-textarea:focus { border-color: var(--accent); }

.uk-sw-output {
  flex: 1;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  min-height: 300px;
}
.uk-sw-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 240px;
  color: var(--text-light);
  font-size: 13px;
  text-align: center;
  padding: 32px;
}
.uk-sw-body {
  padding: 20px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text);
}
.uk-sw-section-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 14px 0 6px;
}
.uk-sw-meta-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 16px 0 4px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

/* Script Writer — input controls */
.uk-sw-field { margin-bottom: 12px; }
.uk-sw-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}
.uk-sw-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}
.uk-sw-select:focus { border-color: var(--accent); }
.uk-sw-row {
  display: flex;
  gap: 10px;
}
.uk-sw-hook-tip {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-mid);
  font-style: italic;
  padding: 8px 12px;
  background: var(--accent-bg);
  border-radius: 6px;
  border-left: 3px solid var(--accent);
  line-height: 1.5;
}
/* Editable refined textarea */
.uk-sw-refined-edit {
  flex: 1;
  min-height: 380px;
  font-size: 13px;
  line-height: 1.8;
  resize: vertical;
}
/* Meta bar below editable textarea */
.uk-sw-meta-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.uk-sw-meta-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-light);
}

/* ══════════════════════════════════════════════════
   EDITING — Inner Tab Panel System
════════════════════════════════════════════════════ */
.editing-inner-panel { display: block; }

/* ══════════════════════════════════════════════════
   REELS EDITOR (Educational)
════════════════════════════════════════════════════ */

.re-container {
  padding: 24px 32px 48px;
  max-width: 1200px;
}

/* Step Indicator Bar */
.re-steps-bar {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.re-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.45;
  transition: opacity 0.2s;
}
.re-step.active, .re-step.done { opacity: 1; }
.re-step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-mid);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  transition: background 0.2s, color 0.2s;
}
.re-step.active .re-step-num {
  background: var(--accent);
  color: #fff;
}
.re-step.done .re-step-num {
  background: #43A047;
  color: #fff;
}
.re-step-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  white-space: nowrap;
}
.re-step.active .re-step-label { color: var(--accent); font-weight: 700; }
.re-step-line {
  flex: 1;
  min-width: 24px;
  height: 2px;
  background: var(--border);
  margin: 0 4px;
  margin-bottom: 18px;
  flex-shrink: 0;
}

/* Step panels */
.re-step-panel { display: none; }
.re-step-panel.active { display: block; }

.re-step-header { margin-bottom: 24px; }
.re-step-header h2 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.re-step-header p  { font-size: 13px; color: var(--text-mid); }

.re-step-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* Upload Zone */
.re-upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--bg-soft);
  margin-bottom: 16px;
}
.re-upload-zone:hover { border-color: var(--accent); background: var(--accent-bg); }
.re-upload-zone.has-file { border-color: #43A047; background: rgba(46,125,50,0.04); }
.re-upload-icon { font-size: 40px; margin-bottom: 10px; }
.re-upload-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.re-upload-sub   { font-size: 12px; color: var(--text-light); }

/* Status bar */
.re-status-bar {
  font-size: 13px;
  font-weight: 600;
  min-height: 24px;
  padding: 4px 0;
  color: var(--text-mid);
}
.re-status-bar.ok    { color: #43A047; }
.re-status-bar.error { color: #C62828; }

/* Loading block */
.re-loading-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  font-size: 13px;
  color: var(--text-mid);
}

/* Section label */
.re-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* Transcript lines */
.re-transcript-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
  cursor: pointer;
  font-size: 13px;
  margin-bottom: 4px;
}
.re-transcript-line:hover { background: var(--bg-soft); border-color: var(--border); }
.re-transcript-line.editing { background: var(--accent-bg); border-color: var(--accent); }
.re-ts { font-size: 10px; font-weight: 700; color: var(--accent); white-space: nowrap; min-width: 64px; }
.re-line-text { flex: 1; color: var(--text); line-height: 1.5; }
.re-line-edit-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--text);
  font-family: inherit;
  border-bottom: 1px solid var(--accent);
}

/* Mode Legend */
.re-mode-legend {
  font-size: 12px;
  color: var(--text-mid);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
/* Mode chips */
.re-mode-chip {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  letter-spacing: 0.4px;
  transition: opacity 0.15s, transform 0.1s;
}
.re-mode-chip:hover { opacity: 0.85; transform: translateY(-1px); }
.re-mode-chip.split        { background: rgba(79,70,229,0.12); color: #4F46E5; }
.re-mode-chip.full-kelvin  { background: rgba(255,107,0,0.12);  color: var(--accent); }
.re-mode-chip.full-ai      { background: rgba(15,118,110,0.12); color: #0F766E; }
.re-mode-chip.active.split       { background: #4F46E5; color: #fff; }
.re-mode-chip.active.full-kelvin { background: var(--accent);  color: #fff; }
.re-mode-chip.active.full-ai     { background: #0F766E; color: #fff; }

/* Scene table */
.re-scene-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.re-scene-row:first-child { border-top: 1px solid var(--border); }
.re-scene-ts   { font-size: 10px; font-weight: 700; color: var(--accent); white-space: nowrap; min-width: 80px; }
.re-scene-text { flex: 1; color: var(--text); line-height: 1.4; }
.re-scene-modes { display: flex; gap: 5px; flex-shrink: 0; }

/* AI video generation list */
.re-gen-item {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.re-gen-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-light);
}
.re-gen-item-text { font-size: 13px; color: var(--text); }
.re-prompt-edit {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
  min-height: 60px;
}
.re-prompt-edit:focus { border-color: var(--accent); }
.re-gen-item-actions { display: flex; gap: 8px; align-items: center; }
.re-gen-status {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}
.re-gen-status.idle       { background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-light); }
.re-gen-status.generating { background: var(--accent-bg); color: var(--accent); }
.re-gen-status.done       { background: rgba(46,125,50,0.10); color: #2E7D32; }
.re-gen-status.failed     { background: rgba(198,40,40,0.10); color: #C62828; }
.re-clip-thumb {
  width: 54px; height: 96px;
  border-radius: var(--radius-sm);
  background: #1a1a1a;
  object-fit: cover;
  flex-shrink: 0;
}

/* Timeline */
.re-timeline-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}
@media (max-width: 900px) { .re-timeline-layout { grid-template-columns: 1fr; } }

/* Preview panel */
.re-preview-panel {
  background: #111;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.re-preview-title {
  font-size: 10px;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.re-preview-window {
  width: 108px;
  height: 192px;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.re-preview-inner {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
}
.re-preview-top, .re-preview-bottom {
  flex: 1;
  background: #222;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; color: #555; text-transform: uppercase;
}
.re-preview-controls {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
}
.re-ctrl-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #ccc;
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
}
.re-ctrl-btn:hover { background: rgba(255,107,0,0.2); color: var(--accent); border-color: var(--accent); }

/* Timeline tracks area */
.re-timeline-panel {
  background: #1a1a1a;
  display: flex;
  overflow-x: auto;
  min-height: 224px;
}
.re-track-labels {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: 72px;
  border-right: 1px solid #333;
}
.re-track-label {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #222;
}
.re-tracks-area {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 400px;
}
.re-track {
  flex: 1;
  position: relative;
  border-bottom: 1px solid #222;
  min-height: 56px;
}
.re-playhead {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
  left: 0;
  z-index: 10;
  pointer-events: none;
}
/* Clip blocks on timeline */
.re-clip-block {
  position: absolute;
  top: 4px; bottom: 4px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0 6px;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: opacity 0.15s;
  user-select: none;
}
.re-clip-block:hover { opacity: 0.85; }
.re-clip-block.selected { outline: 2px solid #fff; }
.re-clip-block.kelvin { background: linear-gradient(135deg, var(--accent), #E05A00); }
.re-clip-block.ai     { background: linear-gradient(135deg, #4F46E5, #7C3AED); }
.re-clip-block.music  { background: linear-gradient(135deg, #0F766E, #0891B2); }
.re-clip-block.caption{ background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25); }

/* Clip editor panel */
.re-clip-editor-panel {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
}

/* Music / Volume controls */
.re-vol-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.re-vol-row label { min-width: 140px; font-weight: 600; }
.re-vol-row input  { flex: 1; }
.re-vol-row span   { min-width: 36px; text-align: right; font-size: 12px; color: var(--text-light); font-weight: 700; }

/* Captions / Overlays */
.re-toggle-row { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; padding: 6px 0; }
.re-toggle-label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.re-overlay-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.re-overlay-item input, .re-overlay-item select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  outline: none;
}
.re-overlay-item input[type="text"] { flex: 1; min-width: 120px; }
.re-overlay-item input[type="number"] { width: 72px; }

/* Export summary */
.re-export-summary {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.re-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.re-summary-row:last-child { border-bottom: none; }
.re-summary-row span:first-child { font-weight: 700; color: var(--text-light); }
.re-summary-row span:last-child  { font-weight: 600; color: var(--text); }

/* Progress bar */
.re-progress-bar-wrap {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}
/* ── Trim Panel ──────────────────────────────────────────────── */
.re-trim-layout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 4px;
}
@media (max-width: 700px) { .re-trim-layout { grid-template-columns: 1fr; } }
.re-trim-video {
  width: 240px;
  max-width: 100%;
  border-radius: var(--radius-sm);
  background: #000;
  outline: none;
}
.re-trim-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.re-trim-point-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.re-trim-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-light);
  min-width: 70px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.re-trim-unit {
  font-size: 11px;
  color: var(--text-light);
}

/* ── Upload progress bar (inline in upload zone) ────────────── */
.re-upload-mb-bar-wrap {
  width: 100%;
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 10px;
}
.re-upload-mb-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.2s linear;
  width: 0%;
}

.re-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.4s ease;
}

/* ── Motion Graphics gen status ─────────────────────────────── */
.re-gen-status {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.re-gen-status.idle       { background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-light); }
.re-gen-status.generating { background: rgba(255,107,0,0.12); color: var(--accent); }
.re-gen-status.done       { background: rgba(46,125,50,0.10); color: #2E7D32; }
.re-gen-status.failed     { background: rgba(198,40,40,0.10); color: #C62828; }

/* ── 6-mode clip blocks in timeline ─────────────────────────── */
.re-clip-block.selected   { outline: 2px solid #fff; outline-offset: -1px; }

/* ── Dual engine gen item overrides ─────────────────────────── */
.re-gen-item-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ── Subtitle "Step A/B" label ───────────────────────────────── */
#re-preview-player { max-width: 100%; }
