/* ═══════════════════════════════════════════════════
   REV MAKER PRO / IQ200 — LUXURY DARK STUDIO THEME
   RockRevster Records
   ═══════════════════════════════════════════════════ */

:root {
  --bg:        #0A0A0F;
  --surface:   #111118;
  --card:      #181820;
  --card2:     #1E1E28;
  --border:    #2A2A38;
  --border2:   #363648;
  --gold:      #C8A84B;
  --gold-dim:  #8A6F2A;
  --gold-glow: rgba(200,168,75,.18);
  --blue:      #3B82F6;
  --blue-dim:  rgba(59,130,246,.15);
  --green:     #22C55E;
  --red:       #EF4444;
  --amber:     #F59E0B;
  --txt:       #EDE9E3;
  --txt2:      #8B8898;
  --txt3:      #4A4858;
  --mono:      'DM Mono', monospace;
  --sans:      'DM Sans', sans-serif;
  --display:   'Bebas Neue', sans-serif;
  --sidebar-w: 220px;
  --topbar-h:  56px;
  --radius:    10px;
  --radius-sm: 6px;
  --transition: .18s ease;
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--txt);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  overflow: hidden;
}

/* ── SCROLLBAR ─────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

/* ── SIDEBAR ───────────────────────────────────────── */
#sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 16px;
  border-bottom: 1px solid var(--border);
}

.brand-icon {
  font-size: 24px;
  color: var(--gold);
  line-height: 1;
}

.brand-text { display: flex; flex-direction: column; }
.brand-name {
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: 1.5px;
  color: var(--gold);
  line-height: 1;
}
.brand-sub {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--txt3);
  text-transform: uppercase;
}

.nav-links {
  flex: 1;
  list-style: none;
  padding: 10px 0;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  cursor: pointer;
  color: var(--txt2);
  font-size: 13px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all var(--transition);
  position: relative;
  user-select: none;
}

.nav-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: color var(--transition);
}

.nav-item:hover {
  color: var(--txt);
  background: rgba(255,255,255,.04);
}

.nav-item.active {
  color: var(--gold);
  border-left-color: var(--gold);
  background: var(--gold-glow);
}

.nav-item.active svg { color: var(--gold); }

.nav-badge {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 1px;
  padding: 2px 5px;
  border-radius: 3px;
  background: var(--blue-dim);
  color: var(--blue);
  border: 1px solid rgba(59,130,246,.3);
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.credit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.credit-label { font-size: 11px; color: var(--txt3); }
.credit-dots { display: flex; gap: 5px; }
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--txt3);
  transition: background .3s;
}
.dot.ok { background: var(--green); box-shadow: 0 0 6px var(--green); }
.dot.err { background: var(--red); }

.btn-settings {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--txt2);
  font-family: var(--sans);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-settings svg { width: 14px; height: 14px; }
.btn-settings:hover { color: var(--txt); border-color: var(--border2); }

/* ── MAIN / TOPBAR ─────────────────────────────────── */
#main {
  margin-left: var(--sidebar-w);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
}

.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.btn-menu {
  display: none;
  background: none;
  border: none;
  color: var(--txt2);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}

.page-title {
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--txt);
}

.project-pill {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--txt3);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-pill.active { color: var(--gold); border-color: var(--gold-dim); }

/* ── CONTENT AREA ──────────────────────────────────── */
#content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* ── BUTTONS ───────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, #A88830 100%);
  color: #0A0A0F;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: var(--card);
  color: var(--txt);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-secondary:hover { border-color: var(--gold-dim); color: var(--gold); }
.btn-secondary:disabled { opacity: .4; cursor: not-allowed; }

.btn-ghost {
  background: none;
  color: var(--txt2);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  font-family: var(--sans);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.btn-ghost:hover { color: var(--txt); border-color: var(--border); background: var(--card); }

.btn-new-project {
  background: none;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-new-project:hover { background: var(--gold-glow); }

.btn-icon {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--txt2);
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 14px;
}
.btn-icon:hover { color: var(--txt); border-color: var(--border2); }
.btn-icon svg { width: 14px; height: 14px; }

/* ── CARDS ─────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: .8px;
  color: var(--gold);
}

.card-subtitle { font-size: 12px; color: var(--txt3); margin-top: 2px; }

/* ── FORM ELEMENTS ─────────────────────────────────── */
.form-row {
  margin-bottom: 14px;
}

label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--txt3);
  margin-bottom: 6px;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="url"],
textarea,
select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--txt);
  font-family: var(--sans);
  font-size: 13px;
  padding: 8px 12px;
  outline: none;
  transition: border-color var(--transition);
  appearance: none;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 2px var(--gold-glow);
}

textarea { resize: vertical; min-height: 100px; line-height: 1.6; }

select option { background: var(--card2); }

input[type="range"] {
  width: 100%;
  accent-color: var(--gold);
  background: none;
  border: none;
  padding: 4px 0;
}

.hint { font-size: 11px; color: var(--txt3); margin-top: 4px; }

/* ── GRID LAYOUTS ──────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }

.module-grid { display: grid; grid-template-columns: 380px 1fr; gap: 20px; align-items: start; }

/* ── AUDIO PLAYER ──────────────────────────────────── */
.audio-player {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 12px;
}

.player-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.player-info { flex: 1; min-width: 0; }
.player-title { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-meta { font-size: 11px; color: var(--txt3); }

.player-controls { display: flex; align-items: center; gap: 8px; }

.btn-play {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--gold);
  border: none;
  color: #0A0A0F;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}
.btn-play:hover { filter: brightness(1.1); transform: scale(1.05); }

.waveform-canvas {
  width: 100%;
  height: 48px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--surface);
}

.player-time {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--txt3);
  margin-top: 4px;
}

/* ── TAGS ──────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 500;
}
.tag-gold { background: var(--gold-glow); color: var(--gold); border: 1px solid var(--gold-dim); }
.tag-blue { background: var(--blue-dim); color: var(--blue); border: 1px solid rgba(59,130,246,.3); }
.tag-green { background: rgba(34,197,94,.1); color: var(--green); border: 1px solid rgba(34,197,94,.2); }
.tag-red { background: rgba(239,68,68,.1); color: var(--red); border: 1px solid rgba(239,68,68,.2); }

/* ── STATUS BADGE ──────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
}
.status-generating { background: var(--blue-dim); color: var(--blue); }
.status-done { background: rgba(34,197,94,.12); color: var(--green); }
.status-error { background: rgba(239,68,68,.1); color: var(--red); }

/* ── GENERATION OVERLAY ────────────────────────────── */
.gen-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.gen-overlay.hidden { display: none; }

.gen-card {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 14px;
  padding: 32px 40px;
  text-align: center;
  min-width: 320px;
  max-width: 480px;
}

.gen-spinner {
  width: 52px; height: 52px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.gen-label {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 1px;
  color: var(--gold);
  margin-bottom: 6px;
}

.gen-sublabel { font-size: 12px; color: var(--txt3); margin-bottom: 16px; }

.gen-log {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--txt3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  min-height: 40px;
  max-height: 80px;
  overflow-y: auto;
  text-align: left;
  margin-bottom: 16px;
  white-space: pre-wrap;
}

.btn-cancel-gen {
  background: none;
  border: 1px solid var(--border2);
  color: var(--txt2);
  border-radius: var(--radius-sm);
  padding: 7px 20px;
  font-family: var(--sans);
  font-size: 12px;
  cursor: pointer;
}
.btn-cancel-gen:hover { color: var(--red); border-color: var(--red); }

/* ── MODAL ─────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center; }
.modal.hidden { display: none; }

.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(3px);
}

.modal-box {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 14px;
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  z-index: 1;
  box-shadow: 0 24px 64px rgba(0,0,0,.6);
}

.modal-sm { max-width: 380px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
  margin-bottom: 16px;
}

.modal-header h2 {
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--gold);
}

.modal-close {
  background: none;
  border: none;
  color: var(--txt3);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}
.modal-close:hover { color: var(--txt); }

.modal-body { padding: 0 24px 24px; }

.settings-section { margin-bottom: 28px; }
.settings-section h3 { font-family: var(--display); font-size: 14px; letter-spacing: 1px; color: var(--txt2); margin-bottom: 14px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.settings-note { font-size: 12px; color: var(--txt3); margin-bottom: 14px; background: var(--blue-dim); border: 1px solid rgba(59,130,246,.2); border-radius: var(--radius-sm); padding: 8px 12px; }
.settings-note code { font-family: var(--mono); color: var(--blue); }

.api-status-list { display: flex; flex-direction: column; gap: 8px; }
.api-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
}
.api-status-name { font-weight: 500; }
.api-status-ok { color: var(--green); font-size: 11px; }
.api-status-err { color: var(--red); font-size: 11px; }

/* ── TOAST ─────────────────────────────────────────── */
#toastContainer {
  position: fixed;
  bottom: 20px; right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--card2);
  border: 1px solid var(--border2);
  color: var(--txt);
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  animation: slideIn .25s ease;
  pointer-events: auto;
  max-width: 320px;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--blue); }
.toast.warn { border-left: 3px solid var(--amber); }
@keyframes slideIn { from { transform: translateX(20px); opacity:0; } to { transform: translateX(0); opacity:1; } }

/* ── DASHBOARD ─────────────────────────────────────── */
.dashboard-header { margin-bottom: 24px; }
.dashboard-header h1 {
  font-family: var(--display);
  font-size: 36px;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--gold), #E8C96A);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.dashboard-header p { color: var(--txt2); font-size: 14px; margin-top: 4px; }

.stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 24px; }

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.stat-value {
  font-family: var(--display);
  font-size: 32px;
  letter-spacing: 1px;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label { font-size: 11px; color: var(--txt3); text-transform: uppercase; letter-spacing: .5px; }

.quick-create {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.qc-btn {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  color: var(--txt2);
}
.qc-btn:hover { border-color: var(--gold-dim); background: var(--gold-glow); color: var(--gold); }
.qc-icon { font-size: 24px; margin-bottom: 8px; display: block; }
.qc-label { font-size: 12px; font-weight: 500; }

.projects-list { display: flex; flex-direction: column; gap: 10px; }

.project-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.project-row:hover { border-color: var(--gold-dim); }
.project-row-icon { font-size: 20px; }
.project-row-info { flex: 1; }
.project-row-name { font-weight: 500; font-size: 13px; }
.project-row-meta { font-size: 11px; color: var(--txt3); }
.project-row-actions { display: flex; gap: 6px; }

/* ── LYRIC EDITOR ──────────────────────────────────── */
.lyric-sections { display: flex; flex-direction: column; gap: 10px; }

.lyric-section {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.lyric-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.lyric-section-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
}

.lyric-section-body {
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--txt);
  white-space: pre-wrap;
  min-height: 60px;
  outline: none;
}

.lyric-section-body[contenteditable="true"]:focus {
  background: rgba(200,168,75,.04);
}

/* ── SCENE PLANNER ─────────────────────────────────── */
.scene-cards { display: flex; flex-direction: column; gap: 10px; }

.scene-card {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  position: relative;
  border-left: 3px solid var(--blue);
}

.scene-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.scene-num {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--txt3);
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 3px;
}

.scene-section-tag { font-size: 11px; color: var(--blue); font-weight: 500; }
.scene-duration { font-family: var(--mono); font-size: 10px; color: var(--txt3); margin-left: auto; }
.scene-label { font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.scene-prompt { font-size: 12px; color: var(--txt2); line-height: 1.6; }
.scene-meta { display: flex; gap: 8px; margin-top: 8px; }

.scene-card .btn-gen-scene {
  position: absolute;
  right: 10px; bottom: 10px;
  font-size: 11px;
  padding: 4px 10px;
}

/* ── VIDEO RESULTS ─────────────────────────────────── */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 14px; }

.video-card {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.video-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--txt3);
  font-size: 28px;
}

.video-thumb video { width: 100%; height: 100%; object-fit: cover; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }

.video-card-info { padding: 10px 12px; }
.video-card-label { font-size: 12px; font-weight: 500; margin-bottom: 4px; }
.video-card-meta { font-size: 10px; color: var(--txt3); }
.video-card-actions { display: flex; gap: 6px; margin-top: 8px; }

/* ── TIMELINE ──────────────────────────────────────── */
.timeline-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  overflow-x: auto;
}

.timeline-ruler {
  display: flex;
  height: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
  position: relative;
  min-width: 600px;
}

.timeline-ruler-mark {
  position: absolute;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--txt3);
  transform: translateX(-50%);
  top: 6px;
}

.timeline-tracks { min-width: 600px; }

.timeline-track {
  display: flex;
  align-items: center;
  height: 48px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.track-label {
  width: 80px;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--txt3);
  padding-right: 10px;
  text-align: right;
}

.track-area {
  flex: 1;
  height: 100%;
  position: relative;
}

.timeline-clip {
  position: absolute;
  height: 36px;
  top: 6px;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(59,130,246,.3), rgba(59,130,246,.15));
  border: 1px solid rgba(59,130,246,.4);
  cursor: grab;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0 8px;
  min-width: 40px;
}

.timeline-clip:active { cursor: grabbing; }
.clip-label { font-size: 10px; color: #93C5FD; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── IMAGE RESULTS ─────────────────────────────────── */
.image-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap: 12px; }
.image-result {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  position: relative;
  cursor: pointer;
}
.image-result img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-result:hover .image-overlay { opacity: 1; }
.image-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: opacity var(--transition);
}

/* ── EXPORT HUB ────────────────────────────────────── */
.platform-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }

.platform-card {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.platform-name { font-weight: 600; font-size: 13px; }
.platform-spec { font-size: 11px; color: var(--txt3); }
.platform-format {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--blue);
  background: var(--blue-dim);
  padding: 2px 6px;
  border-radius: 3px;
  display: inline-block;
}

/* ── MINISTRY SUITE ────────────────────────────────── */
.ministry-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.ministry-tool {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  border-top: 2px solid var(--gold);
}

.ministry-tool-icon { font-size: 32px; margin-bottom: 12px; }
.ministry-tool-title {
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: .8px;
  color: var(--gold);
  margin-bottom: 6px;
}
.ministry-tool-desc { font-size: 12px; color: var(--txt2); margin-bottom: 16px; line-height: 1.6; }

/* ── VOICE STUDIO ──────────────────────────────────── */
.voice-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-height: 300px; overflow-y: auto; }

.voice-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.voice-option:hover, .voice-option.selected {
  border-color: var(--gold-dim);
  background: var(--gold-glow);
}
.voice-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.voice-name { font-size: 12px; font-weight: 500; }
.voice-desc { font-size: 10px; color: var(--txt3); }

/* ── RESULT PANELS ─────────────────────────────────── */
.result-panel {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.result-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--txt3);
}
.empty-state-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state h3 { font-size: 14px; color: var(--txt2); margin-bottom: 6px; }
.empty-state p { font-size: 12px; }

/* ── PROGRESS BAR ──────────────────────────────────── */
.progress-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin: 8px 0;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), #E8C96A);
  border-radius: 2px;
  transition: width .5s ease;
  animation: pulse-progress 2s ease-in-out infinite;
}
@keyframes pulse-progress { 0%,100% { opacity:1; } 50% { opacity:.7; } }

/* ── TABS ──────────────────────────────────────────── */
.tabs { display: flex; gap: 2px; background: var(--surface); border-radius: var(--radius-sm); padding: 3px; margin-bottom: 18px; border: 1px solid var(--border); }
.tab-btn {
  flex: 1;
  padding: 7px 12px;
  background: none;
  border: none;
  border-radius: 6px;
  color: var(--txt3);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.tab-btn.active { background: var(--card2); color: var(--gold); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── MISC ──────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.flex-row { display: flex; align-items: center; gap: 10px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.w-full { width: 100%; }
.text-gold { color: var(--gold); }
.text-dim { color: var(--txt3); font-size: 12px; }
.mono { font-family: var(--mono); }
code { font-family: var(--mono); font-size: 12px; color: var(--blue); background: var(--blue-dim); padding: 1px 5px; border-radius: 3px; }

/* ── RESPONSIVE ────────────────────────────────────── */
@media (max-width: 900px) {
  #sidebar { transform: translateX(-100%); }
  #sidebar.open { transform: translateX(0); }
  #main { margin-left: 0; }
  .btn-menu { display: block; }
  .grid-4, .stats-row { grid-template-columns: 1fr 1fr; }
  .quick-create { grid-template-columns: 1fr 1fr; }
  .module-grid { grid-template-columns: 1fr; }
  .grid-3, .platform-grid { grid-template-columns: 1fr 1fr; }
  .ministry-tools { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  #content { padding: 16px; }
  .stats-row, .quick-create, .grid-2, .grid-3, .grid-4, .platform-grid { grid-template-columns: 1fr; }
}

/* ── LYRIC VIDEO BUILDER ────────────────────────────────────── */
#lvb_canvas {
  image-rendering: crisp-edges;
  border-radius: 6px;
}

.lvb-section-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--gold-glow);
  border: 1px solid var(--gold-dim);
  font-size: 11px;
  color: var(--gold);
  font-family: var(--mono);
  letter-spacing: 1px;
}

#lvb_singer_preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
