/* ══════════════════════════════════════════════════════════════════════════
 * Voice Studio — vertical-left-sidebar shell (Mother-CRM pattern)
 *
 * Per Rafa 2026-05-11 ~10:00 UTC: "yo te dije que los quería como en un
 * menú a la izquierda, es decir cuando se abra el estudio, en lugar de
 * estar el menú arriba, lo quiero a la izquierda tipo CRM".
 *
 * Layout: 240px sidebar (dark, sticky) + 1fr main (scrollable box).
 * The Test Console sub-tabs become nested sidebar entries (hidden until
 * superadmin applyTierGate runs).
 *
 * This block sits at the TOP of voice-studio.css and overrides the older
 * flex-column .vs-layout below.
 * ══════════════════════════════════════════════════════════════════════════ */

:root {
  --vs-sidebar-w: 240px;
  --vs-sidebar-bg: #1a1410;
  --vs-sidebar-fg: #faf6ee;
  --vs-sidebar-fg-muted: rgba(250, 246, 238, 0.62);
  --vs-sidebar-border: rgba(212, 190, 149, 0.18);
  --vs-sidebar-active-bg: rgba(212, 190, 149, 0.14);
  --vs-sidebar-active-fg: #d4be95;
  --vs-canvas-bg: #ede2ca;
  --vs-gap: 12px;
}

html, body { height: 100%; overflow: hidden; margin: 0; }
body { background: var(--vs-canvas-bg); }

/* ─── Two-column shell ────────────────────────────────────────────────── */
.vs-shell {
  display: grid;
  grid-template-columns: var(--vs-sidebar-w) 1fr;
  gap: var(--vs-gap);
  padding: var(--vs-gap);
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
  background: var(--vs-canvas-bg);
}

/* ─── Sidebar (dark, floating card) ───────────────────────────────────── */
.vs-sidebar {
  background: var(--vs-sidebar-bg);
  color: var(--vs-sidebar-fg);
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  border: 1px solid var(--vs-sidebar-border);
  box-shadow: 0 1px 2px rgba(26, 20, 16, 0.06), 0 8px 24px rgba(26, 20, 16, 0.04);
  position: sticky;
  top: var(--vs-gap);
  height: calc(100vh - 2 * var(--vs-gap));
  overflow-y: auto;
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif);
}

.vs-sidebar-brand {
  padding: 18px 14px 14px;
  border-bottom: 1px solid var(--vs-sidebar-border);
  position: sticky;
  top: 0;
  background: var(--vs-sidebar-bg);
  z-index: 3;
  border-radius: 12px 12px 0 0;
}
.vs-sidebar-logo {
  width: 92%;
  height: auto;
  display: block;
  margin: 0 auto 10px;
  filter: brightness(0) invert(1);
}
.vs-sidebar-back {
  display: block;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--vs-sidebar-fg-muted);
  text-decoration: none;
  padding: 6px 4px;
  border-radius: 6px;
  transition: color 120ms ease, background 120ms ease;
}
.vs-sidebar-back:hover {
  color: var(--vs-sidebar-active-fg);
  background: rgba(255, 255, 255, 0.04);
}

.vs-sidebar-nav { flex: 1; padding: 8px 0; }

.vs-side-section {
  padding: 14px 0;
  border-bottom: 1px solid rgba(212, 190, 149, 0.08);
}
.vs-side-section:last-child { border-bottom: none; }
.vs-side-section[hidden] { display: none; }

.vs-side-label {
  padding: 0 18px 8px;
  font-size: 10px;
  font-weight: 700;
  color: var(--vs-sidebar-fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.10em;
}

.vs-side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  color: var(--vs-sidebar-fg-muted);
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.vs-side-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}
.vs-side-link.is-active {
  background: var(--vs-sidebar-active-bg);
  color: var(--vs-sidebar-active-fg);
  font-weight: 500;
  border-left-color: var(--vs-sidebar-active-fg);
}
.vs-side-link-tc {
  padding-left: 30px;     /* nested under Test Console label */
  font-size: 12.5px;
}

.vs-sidebar-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--vs-sidebar-border);
  background: var(--vs-sidebar-bg);
  border-radius: 0 0 12px 12px;
  font-size: 11px;
  color: var(--vs-sidebar-fg-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.vs-status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #5e8c4f;
  box-shadow: 0 0 8px #5e8c4f;
  display: inline-block;
}

/* ─── Main scroll-box ─────────────────────────────────────────────────── */
.vs-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: calc(100vh - 2 * var(--vs-gap));
  overflow: hidden;
  background: var(--bg-cream, #faf6ee);
  border-radius: 12px;
  border: 1px solid rgba(212, 190, 149, 0.25);
  box-shadow: 0 1px 2px rgba(26, 20, 16, 0.04);
}

.vs-topbar {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  border-bottom: 1px solid var(--neutral-line, rgba(212, 190, 149, 0.35));
  background: var(--bg-cream, #faf6ee);
  border-radius: 12px 12px 0 0;
  gap: 16px;
  flex-wrap: wrap;
}
.vs-topbar-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vs-topbar-title .vs-title {
  font-family: var(--font-serif, Georgia, serif);
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  margin: 0;
  color: var(--fg-charcoal, #1a1410);
  letter-spacing: 0;
}
.vs-topbar-title .vs-subtitle {
  margin: 0;
  font-size: 12px;
  color: var(--neutral-text-mute, rgba(26, 20, 16, 0.55));
}
.vs-topbar-actions { display: flex; gap: 8px; align-items: center; }

/* ─── Content scrolls inside main ─────────────────────────────────────── */
.vs-main .vs-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
  max-width: none;
  margin: 0;
  width: 100%;
}

/* ─── Hide legacy header/tabs from old layout (now in sidebar) ────────── */
.vs-shell .vs-header,
.vs-shell .vs-tabs,
.vs-shell .vs-tc-subnav {
  display: none !important;
}

/* ─── Toast positioning relative to main ──────────────────────────────── */
.vs-shell .vs-toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

/* ─── Mobile responsive: stack sidebar above main (≤ 900px) ───────────── */
@media (max-width: 900px) {
  .vs-shell {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }
  html, body { overflow: auto; }
  .vs-sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: wrap;
  }
  .vs-sidebar-brand { width: 100%; }
  .vs-sidebar-nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; flex: 1; }
  .vs-side-section { padding: 4px; border-bottom: none; display: flex; flex-wrap: wrap; gap: 4px; }
  .vs-side-label { display: none; }
  .vs-side-link { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--vs-sidebar-border); border-left: 1px solid var(--vs-sidebar-border); }
  .vs-side-link.is-active { border-color: var(--vs-sidebar-active-fg); }
  .vs-side-link-tc { padding-left: 12px; }
  .vs-main { height: auto; min-height: 70vh; }
}

/* ══════════════════════════════════════════════════════════════════════ */
/* End of sidebar shell — pre-existing voice-studio.css follows below.   */
/* ══════════════════════════════════════════════════════════════════════ */

/**
 * voice-studio.css — applies docs/brand/marcus-os-brand-kit-v1.md tokens.
 * "Editorial luxury, not corporate generic." (Rafa 2026-04-30)
 *
 * Per brand kit:
 *   - bg-cream #faf6ee + fg-charcoal #1a1410
 *   - accent-brass #d4be95 ("El Dorado") sparingly + brass-dark #8b6914 for text
 *   - Georgia serif italic for editorial headlines
 *   - Two-weight rule: 400 (regular) + 500 (medium) ONLY
 *   - Sentence case for body UI; ALL CAPS only for eyebrow labels with letter-spacing
 */

:root {
  /* Brand tokens — direct from brand kit v1 */
  --bg-cream: #faf6ee;
  --fg-charcoal: #1a1410;
  --accent-brass: #d4be95;
  --accent-brass-dark: #8b6914;

  /* Semantic state tokens */
  --state-success-fg: #3b6d11;
  --state-success-bg: rgba(59, 109, 17, 0.08);
  --state-warning-fg: #854f0b;
  --state-warning-bg: rgba(133, 79, 11, 0.08);
  --state-danger-fg: #a32d2d;
  --state-danger-bg: rgba(163, 45, 45, 0.08);
  --state-info-fg: #185fa5;
  --state-info-bg: rgba(24, 95, 165, 0.08);

  /* Neutral subtle */
  --neutral-line: rgba(212, 190, 149, 0.35);
  --neutral-line-strong: rgba(212, 190, 149, 0.6);
  --neutral-text-mute: rgba(26, 20, 16, 0.55);
  --neutral-text-faint: rgba(26, 20, 16, 0.35);

  /* Surfaces */
  --paper: #fffefb;
  --shadow-soft: 0 1px 2px rgba(26, 20, 16, 0.04);
  --shadow-card: 0 1px 8px rgba(26, 20, 16, 0.05), 0 0 0 1px var(--neutral-line);

  /* Typography */
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', Menlo, Monaco, 'Courier New', monospace;
}

* { box-sizing: border-box; }

html, body { height: 100%; overflow: hidden; margin: 0; }
.vs-layout {
  background: var(--bg-cream);
  color: var(--fg-charcoal);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ── Header ────────────────────────────────────────────────────────────── */
.vs-header { padding: 28px 40px 24px; flex-shrink: 0; background: var(--bg-cream); }
.vs-header-inner { max-width: 1280px; margin: 0 auto; }
.vs-back-link {
  color: var(--neutral-text-mute);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.04em;
  display: inline-block;
  margin-bottom: 16px;
}
.vs-back-link:hover { color: var(--accent-brass-dark); }

.vs-brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}
.vs-brand-image {
  width: 240px;
  height: auto;
  display: block;
}

.vs-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-top: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--neutral-line);
}
.vs-title-block { flex: 1; }

.vs-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 32px;
  margin: 0 0 6px;
  color: var(--fg-charcoal);
  letter-spacing: 0;
}
.vs-subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--neutral-text-mute);
  font-weight: 400;
}
.vs-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 9px;
  border: 1px solid var(--neutral-line);
  border-radius: 12px;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--accent-brass-dark);
  text-transform: uppercase;
  font-weight: 500;
  background: transparent;
}

.vs-header-actions { display: flex; gap: 8px; }

/* ── Tabs ──────────────────────────────────────────────────────────────── */
.vs-tabs {
  flex-shrink: 0;
  background: var(--bg-cream);
  
  border-bottom: 1px solid var(--neutral-line);
  padding: 0 40px;
  display: flex;
  gap: 0;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}
.vs-tab {
  padding: 16px 22px;
  text-decoration: none;
  color: var(--neutral-text-mute);
  font-size: 13px;
  font-weight: 400;
  border-bottom: 2px solid transparent;
  letter-spacing: 0.02em;
  transition: color 160ms ease;
}
.vs-tab:hover { color: var(--fg-charcoal); }
.vs-tab.active {
  color: var(--accent-brass-dark);
  border-bottom-color: var(--accent-brass);
  font-weight: 500;
}

/* ── Content + view toggling ───────────────────────────────────────────── */
.vs-content { padding: 40px; max-width: 1280px; margin: 0 auto; flex: 1; overflow-y: auto; width: 100%; }
.vs-view { display: none; animation: vsFadeIn 200ms ease; }
.vs-view.active { display: block; }
@keyframes vsFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.vs-view-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}
.vs-view-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 24px;
  margin: 0;
  color: var(--fg-charcoal);
}
.vs-view-actions { display: flex; gap: 8px; align-items: center; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.vs-btn {
  padding: 9px 16px;
  border-radius: 4px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 160ms ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.01em;
}
.vs-btn-primary {
  background: var(--fg-charcoal);
  color: var(--bg-cream);
  border-color: var(--fg-charcoal);
}
.vs-btn-primary:hover {
  background: #2a201a;
  border-color: #2a201a;
}
.vs-btn-ghost {
  background: transparent;
  color: var(--accent-brass-dark);
  border-color: var(--neutral-line);
}
.vs-btn-ghost:hover {
  background: var(--paper);
  border-color: var(--accent-brass);
}
.vs-btn-tiny { padding: 5px 11px; font-size: 12px; }
.vs-btn-large { padding: 12px 22px; font-size: 14px; }

/* ── Inputs ────────────────────────────────────────────────────────────── */
.vs-input {
  padding: 8px 12px;
  border: 1px solid var(--neutral-line);
  border-radius: 4px;
  font-size: 13px;
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--fg-charcoal);
  font-weight: 400;
}
.vs-input:focus {
  outline: none;
  border-color: var(--accent-brass);
  box-shadow: 0 0 0 3px rgba(212, 190, 149, 0.18);
}
.vs-textarea {
  width: 100%;
  resize: vertical;
  min-height: 110px;
  font-family: var(--font-sans);
  line-height: 1.55;
}
.vs-label {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--accent-brass-dark);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 18px 0 6px;
}
.vs-label:first-child { margin-top: 0; }

/* ── Tags ──────────────────────────────────────────────────────────────── */
.vs-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-right: 4px;
  border: 1px solid transparent;
}
.vs-tag-brass {
  background: rgba(212, 190, 149, 0.18);
  color: var(--accent-brass-dark);
  border-color: var(--neutral-line-strong);
}
.vs-tag-sage {
  background: var(--state-success-bg);
  color: var(--state-success-fg);
}
.vs-tag-clay {
  background: var(--state-warning-bg);
  color: var(--state-warning-fg);
}
.vs-tag-mist {
  background: transparent;
  color: var(--neutral-text-mute);
  border-color: var(--neutral-line);
}

/* ── Voice Catalog grid ─────────────────────────────────────────────────── */
.vs-cat-summary {
  font-size: 11px;
  color: var(--neutral-text-mute);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 500;
}
.vs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.vs-card {
  background: var(--paper);
  border-radius: 6px;
  padding: 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 160ms ease;
}
.vs-card:hover {
  box-shadow: 0 4px 16px rgba(26, 20, 16, 0.08), 0 0 0 1px var(--neutral-line-strong);
}
.vs-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.vs-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--fg-charcoal);
  color: var(--accent-brass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 18px;
  flex-shrink: 0;
}
.vs-avatar-small {
  width: 30px;
  height: 30px;
  font-size: 13px;
}
.vs-card-name {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 17px;
  color: var(--fg-charcoal);
}
.vs-card-meta {
  font-size: 10px;
  color: var(--neutral-text-mute);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 2px;
  font-weight: 500;
}
.vs-card-tones { display: flex; flex-wrap: wrap; gap: 4px; }
.vs-card-summary {
  font-size: 12.5px;
  color: var(--neutral-text-mute);
  line-height: 1.5;
  flex: 1;
}
.vs-card-stats {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--neutral-text-mute);
  padding-top: 12px;
  border-top: 1px solid var(--neutral-line);
}
.vs-card-stats strong {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--fg-charcoal);
  font-size: 13px;
}
.vs-card-actions { display: flex; gap: 6px; padding-top: 4px; }

/* ── Clone Lab ─────────────────────────────────────────────────────────── */
.vs-clone-jobs { margin-bottom: 24px; }
.vs-empty {
  background: var(--paper);
  border: 1px dashed var(--neutral-line-strong);
  border-radius: 6px;
  padding: 32px;
  text-align: center;
  color: var(--neutral-text-mute);
  font-size: 13px;
}
.vs-job-card {
  background: var(--paper);
  border-radius: 6px;
  padding: 18px 22px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-card);
}
.vs-job-head {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 13px;
}
.vs-job-status { font-size: 12px; color: var(--neutral-text-mute); margin-bottom: 10px; }
.vs-progress {
  background: var(--neutral-line);
  height: 4px;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 10px;
}
.vs-progress-bar {
  background: var(--accent-brass);
  height: 100%;
  transition: width 200ms linear;
}
.vs-new-clone-btn { margin-top: 18px; }

.vs-wizard {
  background: var(--paper);
  border-radius: 6px;
  padding: 30px;
  box-shadow: var(--shadow-card);
  margin-bottom: 18px;
}
.vs-wizard-steps {
  display: flex;
  gap: 0;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--neutral-line);
  padding-bottom: 18px;
}
.vs-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--neutral-text-faint);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}
.vs-step.active {
  color: var(--accent-brass-dark);
}
.vs-step-num {
  width: 24px;
  height: 24px;
  background: transparent;
  border: 1px solid var(--neutral-line-strong);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: 500;
  color: var(--neutral-text-faint);
}
.vs-step.active .vs-step-num {
  background: var(--fg-charcoal);
  color: var(--accent-brass);
  border-color: var(--fg-charcoal);
}
.vs-wizard-step { display: none; }
.vs-wizard-step.active { display: block; }
.vs-wizard-step h3 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 18px;
  margin: 0 0 18px;
  color: var(--fg-charcoal);
}
.vs-radio {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--neutral-line);
  border-radius: 4px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 160ms ease;
}
.vs-radio:has(input:checked), .vs-radio:hover {
  border-color: var(--accent-brass);
  background: rgba(212, 190, 149, 0.05);
}
.vs-radio input[type=radio] { margin-top: 2px; accent-color: var(--accent-brass-dark); }
.vs-radio span strong {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  display: block;
  margin-bottom: 3px;
}
.vs-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  color: var(--fg-charcoal);
}
.vs-checkbox input[type=checkbox] { accent-color: var(--accent-brass-dark); }

.vs-tenant-select { margin-top: 18px; }
.vs-tenant-select label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-brass-dark);
  font-weight: 500;
  display: block;
  margin-bottom: 4px;
}

.vs-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.vs-form-row label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-brass-dark);
  font-weight: 500;
}
.vs-form-row .vs-input { width: 100%; margin-top: 5px; }

.vs-dropzone {
  border: 1.5px dashed var(--neutral-line-strong);
  border-radius: 6px;
  padding: 36px;
  text-align: center;
  transition: all 160ms ease;
  cursor: pointer;
}
.vs-dropzone.drag-over {
  border-color: var(--accent-brass);
  background: rgba(212, 190, 149, 0.08);
}
.vs-dropzone-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 10px;
  opacity: 0.5;
}
.vs-dropzone-inner p {
  margin: 0 0 12px;
  color: var(--neutral-text-mute);
  font-size: 13px;
}

.vs-file-list { margin-top: 14px; }
.vs-file-summary {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-brass-dark);
  font-weight: 500;
  margin-bottom: 8px;
}
.vs-file-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-cream);
  border: 1px solid var(--neutral-line);
  border-radius: 4px;
  margin-bottom: 4px;
  font-size: 12px;
}
.vs-engine-row { margin-top: 18px; }
.vs-engine-row label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-brass-dark);
  font-weight: 500;
  margin-bottom: 5px;
}
.vs-engine-row .vs-input { width: 100%; }

.vs-summary {
  background: var(--bg-cream);
  border: 1px solid var(--neutral-line);
  padding: 18px;
  border-radius: 4px;
  margin-bottom: 14px;
}
.vs-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 13px;
}
.vs-summary-row span:first-child {
  color: var(--neutral-text-mute);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.vs-summary-row strong {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
}

.vs-cost-estimate {
  font-size: 12px;
  color: var(--neutral-text-mute);
}
.vs-cost-estimate strong {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--fg-charcoal);
}

.vs-wizard-nav {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--neutral-line);
  margin-top: 18px;
}

.vs-hint {
  font-size: 12px;
  color: var(--neutral-text-mute);
  margin: 0 0 10px;
  line-height: 1.5;
}

/* ── Tables ───────────────────────────────────────────────────────────── */
.vs-table-wrapper {
  background: var(--paper);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.vs-table { width: 100%; border-collapse: collapse; }
.vs-table thead { background: var(--bg-cream); }
.vs-table th, .vs-table td {
  padding: 12px 18px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid var(--neutral-line);
}
.vs-table th {
  font-weight: 500;
  font-size: 10px;
  color: var(--accent-brass-dark);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.vs-table tbody tr:hover { background: rgba(212, 190, 149, 0.04); }
.vs-table tbody tr:last-child td { border-bottom: none; }
.vs-owner-name {
  display: flex;
  align-items: center;
  gap: 12px;
}
.vs-owner-name .vs-meta {
  font-size: 10px;
  color: var(--neutral-text-mute);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  margin-top: 1px;
}

/* ── Royalty summary cards ─────────────────────────────────────────────── */
.vs-roy-summary { display: flex; gap: 14px; margin-bottom: 20px; }
.vs-summary-card {
  flex: 1;
  background: var(--paper);
  border-radius: 6px;
  padding: 18px 22px;
  box-shadow: var(--shadow-card);
}
.vs-summary-card span {
  display: block;
  font-size: 10px;
  color: var(--accent-brass-dark);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
}
.vs-summary-card strong {
  display: block;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 28px;
  margin-top: 6px;
  color: var(--fg-charcoal);
}

/* ── Test Console ─────────────────────────────────────────────────────── */
.vs-test-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.vs-test-input, .vs-test-output {
  background: var(--paper);
  border-radius: 6px;
  padding: 28px;
  box-shadow: var(--shadow-card);
}
.vs-test-meta {
  font-size: 10px;
  color: var(--neutral-text-mute);
  letter-spacing: 0.06em;
  margin: 6px 0 4px;
}

.vs-emotion-control, .vs-nonverbal-control { margin-top: 16px; }
.vs-slider {
  width: 100%;
  margin: 6px 0;
  accent-color: var(--accent-brass);
}
.vs-slider-anchors {
  display: flex;
  justify-content: space-between;
  font-size: 9.5px;
  color: var(--neutral-text-mute);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.vs-nonverbal-buttons { display: flex; gap: 6px; }

.vs-test-cost-estimate {
  font-size: 11px;
  color: var(--neutral-text-mute);
  margin-top: 10px;
  text-align: center;
}
.vs-test-cost-estimate strong {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--fg-charcoal);
}

.vs-test-output h3 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 15px;
  margin: 0 0 14px;
  color: var(--fg-charcoal);
}
.vs-test-output h3:not(:first-child) { margin-top: 24px; }
.vs-test-empty {
  font-size: 13px;
  color: var(--neutral-text-mute);
}
.vs-test-audio-card {
  background: var(--bg-cream);
  border: 1px solid var(--neutral-line);
  border-radius: 4px;
  padding: 16px;
  margin-bottom: 16px;
}
.vs-test-audio-meta {
  font-size: 11px;
  color: var(--neutral-text-mute);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.vs-test-audio-meta strong {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--fg-charcoal);
}
.vs-test-audio-status {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  margin-bottom: 12px;
  color: var(--accent-brass-dark);
  font-weight: 500;
}

.vs-saved-card {
  background: var(--bg-cream);
  border: 1px solid var(--neutral-line);
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 8px;
  font-size: 12px;
}
.vs-saved-text {
  font-family: var(--font-serif);
  font-style: italic;
  margin-bottom: 6px;
  color: var(--fg-charcoal);
}
.vs-saved-meta {
  font-size: 10px;
  color: var(--neutral-text-mute);
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  text-transform: uppercase;
  font-weight: 500;
}

/* ── Modal ─────────────────────────────────────────────────────────────── */
.vs-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vs-modal[hidden] { display: none; }
.vs-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 20, 16, 0.5);
}
.vs-modal-content {
  position: relative;
  background: var(--paper);
  padding: 30px;
  border-radius: 6px;
  width: min(540px, 92vw);
  box-shadow: 0 20px 50px rgba(26, 20, 16, 0.18);
}
.vs-modal-content h3 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  margin: 0 0 22px;
  color: var(--fg-charcoal);
}
.vs-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}

/* ── Toast ─────────────────────────────────────────────────────────────── */
.vs-toasts {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.vs-toast {
  background: var(--fg-charcoal);
  color: var(--bg-cream);
  padding: 12px 18px;
  border-radius: 4px;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(26, 20, 16, 0.2);
  opacity: 0;
  transform: translateY(8px);
  transition: all 200ms ease;
  border-left: 3px solid var(--accent-brass);
}
.vs-toast.show { opacity: 1; transform: translateY(0); }
.vs-toast.success { border-left-color: var(--state-success-fg); }
.vs-toast.error { border-left-color: var(--state-danger-fg); }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .vs-test-grid { grid-template-columns: 1fr; }
  .vs-form-row { grid-template-columns: 1fr; }
  .vs-roy-summary { flex-direction: column; }
  .vs-content { padding: 24px; }
  .vs-header { padding: 20px 24px 18px; }
  .vs-tabs {
  flex-shrink: 0;
  background: var(--bg-cream);
   padding: 0 24px; }
}

/* ══════════════════════════════════════════════════════════════════════════
 * Premium two-column structure (2026-05-11 ~11:40 UTC)
 *   - Flat sidebar: single list with divider between Tools and Test Console
 *   - Right Settings panel with tabs (Configuración / Historial)
 *   - "Coming soon" tags on disabled premium controls
 * Same Marcus OS dark brand colors — only structure changes.
 * ══════════════════════════════════════════════════════════════════════════ */

/* ─── Sidebar flat list refinements ─────────────────────────────────── */
.vs-side-section-flat { padding: 10px 0 6px; border-bottom: none; }
.vs-side-divider {
  height: 1px;
  background: rgba(212, 190, 149, 0.18);
  margin: 6px 14px 10px;
}
.vs-side-section-flat .vs-side-link-tc {
  /* No deep indent in flat mode — same level as operational tools */
  padding-left: 18px;
}

/* ─── Generate pane: 2-column main + right settings ─────────────────── */
.vs-tc-gen-shell {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  min-height: 100%;
  align-items: stretch;
}
.vs-tc-gen-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.vs-tc-gen-textarea {
  width: 100%;
  min-height: 220px;
  font-size: 14px;
  line-height: 1.5;
  padding: 16px 18px;
  border-radius: 10px;
  background: var(--paper, #fffefb);
  border: 1px solid var(--neutral-line, rgba(212, 190, 149, 0.35));
  resize: vertical;
}
.vs-tc-gen-textarea:focus {
  outline: none;
  border-color: var(--accent-brass, #d4be95);
  box-shadow: 0 0 0 3px rgba(212, 190, 149, 0.20);
}
.vs-tc-gen-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 4px 2px;
}
.vs-tc-gen-footer .vs-test-meta {
  font-size: 11px;
  color: var(--neutral-text-mute, rgba(26, 20, 16, 0.55));
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.vs-tc-gen-cost {
  font-size: 11px;
  color: var(--neutral-text-mute, rgba(26, 20, 16, 0.55));
  margin-left: auto;
  margin-right: 8px;
}
.vs-tc-gen-cost strong { color: var(--fg-charcoal, #1a1410); font-weight: 500; }

.vs-tc-gen-result {
  background: var(--paper, #fffefb);
  border: 1px solid var(--neutral-line, rgba(212, 190, 149, 0.35));
  border-radius: 10px;
  padding: 18px 20px;
  min-height: 140px;
}
.vs-tc-gen-result-label {
  font-family: var(--font-serif, Georgia, serif);
  font-style: italic;
  font-weight: 500;
  font-size: 15px;
  margin: 0 0 12px;
  color: var(--fg-charcoal, #1a1410);
}
.vs-test-empty {
  font-size: 13px;
  color: var(--neutral-text-mute, rgba(26, 20, 16, 0.55));
  margin: 0;
}

/* ─── Right Settings panel ──────────────────────────────────────────── */
.vs-tc-settings {
  background: var(--paper, #fffefb);
  border: 1px solid var(--neutral-line, rgba(212, 190, 149, 0.35));
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  align-self: stretch;
  position: sticky;
  top: 0;
  max-height: calc(100vh - 180px);
}
.vs-tc-settings-tabs {
  display: flex;
  border-bottom: 1px solid var(--neutral-line, rgba(212, 190, 149, 0.35));
  background: var(--bg-cream, #faf6ee);
  flex-shrink: 0;
}
.vs-tc-settings-tab {
  flex: 1;
  padding: 12px 8px;
  background: transparent;
  border: none;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--neutral-text-mute, rgba(26, 20, 16, 0.55));
  cursor: pointer;
  font-family: inherit;
  border-bottom: 2px solid transparent;
  transition: color 120ms ease, border-color 120ms ease;
}
.vs-tc-settings-tab:hover { color: var(--fg-charcoal, #1a1410); }
.vs-tc-settings-tab.is-active {
  color: var(--accent-brass-dark, #8b6914);
  border-bottom-color: var(--accent-brass, #d4be95);
}
.vs-tc-settings-pane {
  padding: 18px 18px 22px;
  overflow-y: auto;
  flex: 1;
}
.vs-tc-settings-pane[hidden] { display: none; }
.vs-tc-settings-pane .vs-label { margin: 14px 0 6px; }
.vs-tc-settings-pane .vs-label:first-child { margin-top: 0; }
.vs-tc-settings-pane .vs-input,
.vs-tc-settings-pane .vs-slider { width: 100%; }

/* Disabled + "Coming soon" affordances */
.vs-label-disabled { opacity: 0.55; }
.vs-tag-soon {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  background: rgba(212, 190, 149, 0.16);
  border: 1px solid rgba(212, 190, 149, 0.45);
  border-radius: 999px;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--accent-brass-dark, #8b6914);
  text-transform: uppercase;
  font-weight: 500;
}
.vs-tc-settings-pane .vs-slider:disabled,
.vs-tc-settings-pane .vs-input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.vs-tc-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
  font-size: 12px;
  color: var(--fg-charcoal, #1a1410);
}
.vs-tc-toggle-disabled { opacity: 0.55; cursor: not-allowed; }

/* Historial pane variant (reuses .vs-tc-history child markup) */
.vs-tc-settings-pane.vs-tc-history { padding-top: 14px; }
.vs-tc-settings-pane.vs-tc-history .vs-tc-history-head {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}
.vs-tc-settings-pane.vs-tc-history .vs-tc-history-hint {
  font-size: 10px;
  color: var(--neutral-text-mute, rgba(26, 20, 16, 0.55));
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.vs-tc-settings-pane.vs-tc-history .vs-tc-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ─── Mobile collapse ───────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .vs-tc-gen-shell {
    grid-template-columns: 1fr;
  }
  .vs-tc-settings {
    position: static;
    max-height: none;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
 * Voice Studio — polish pass (2026-05-11 ~11:50 UTC)
 *
 * Per Rafa: "dale un detallado bonito, mira están como muy cuadrados los
 * botones, tiene que ser algo ergonómico... más bonito más agradable a la
 * vista". Applied across ALL Voice Studio sub-views (Generate, A/B Compare,
 * Sample Library, Pronunciation, Dialogue Builder, Cost Dashboard, Catalog,
 * Clone Lab, Owners, Royalty Ledger).
 *
 * Strategy: keep Marcus OS brand colors intact; only refine shape, spacing,
 * elevation, and affordance. More rounded corners (14px on cards, pill on
 * transport / chips / tabs), softer shadows, more breathing room, brass-tint
 * hover states.
 * ══════════════════════════════════════════════════════════════════════════ */

:root {
  --vs-radius-card: 14px;
  --vs-radius-input: 10px;
  --vs-radius-btn: 10px;
  --vs-radius-pill: 999px;
  --vs-shadow-soft: 0 1px 2px rgba(26, 20, 16, 0.04), 0 6px 18px rgba(26, 20, 16, 0.05);
  --vs-shadow-card-hover: 0 2px 4px rgba(26, 20, 16, 0.06), 0 14px 32px rgba(26, 20, 16, 0.08);
  --vs-shadow-cta: 0 1px 2px rgba(26, 20, 16, 0.10), 0 8px 20px rgba(139, 105, 20, 0.18);
}

/* ─── Buttons: softer corners, comfier padding, gold-tint hovers ────── */
.vs-btn {
  border-radius: var(--vs-radius-btn);
  padding: 10px 18px;
  letter-spacing: 0.01em;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 80ms ease;
}
.vs-btn:active { transform: translateY(1px); }
.vs-btn-tiny  { padding: 6px 12px; font-size: 12px; border-radius: var(--vs-radius-pill); }
.vs-btn-large { padding: 14px 28px; font-size: 15px; border-radius: var(--vs-radius-pill); }

.vs-btn-primary {
  background: linear-gradient(180deg, #2a201a 0%, #1a1410 100%);
  border-color: #1a1410;
  box-shadow: var(--vs-shadow-cta);
}
.vs-btn-primary:hover {
  background: linear-gradient(180deg, #3a2d24 0%, #25190f 100%);
  box-shadow: 0 2px 4px rgba(26, 20, 16, 0.12), 0 12px 28px rgba(139, 105, 20, 0.26);
  transform: translateY(-1px);
}

.vs-btn-ghost {
  border-radius: var(--vs-radius-btn);
  background: transparent;
}
.vs-btn-ghost:hover {
  background: rgba(212, 190, 149, 0.10);
  border-color: var(--accent-brass);
}

/* ─── Inputs / Selects / Textarea: rounder, softer focus ────────────── */
.vs-input, .vs-textarea {
  border-radius: var(--vs-radius-input);
  padding: 10px 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.vs-input:hover { border-color: rgba(212, 190, 149, 0.7); }
.vs-input:focus, .vs-textarea:focus {
  border-color: var(--accent-brass);
  box-shadow: 0 0 0 4px rgba(212, 190, 149, 0.18);
}

.vs-tc-gen-textarea {
  border-radius: var(--vs-radius-card);
  padding: 18px 22px;
  background: #fffefb;
  box-shadow: inset 0 1px 2px rgba(26, 20, 16, 0.03);
}

/* ─── Cards everywhere ──────────────────────────────────────────────── */
.vs-card,
.vs-job-card,
.vs-empty,
.vs-test-result,
.vs-tc-gen-result,
.vs-tc-settings,
.vs-tc-card {
  border-radius: var(--vs-radius-card);
  box-shadow: var(--vs-shadow-soft);
  transition: box-shadow 200ms ease, transform 200ms ease;
}
.vs-card:hover,
.vs-job-card:hover {
  box-shadow: var(--vs-shadow-card-hover);
  transform: translateY(-2px);
}

.vs-tc-gen-result { padding: 22px 26px; }
.vs-tc-gen-result-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-brass-dark);
  font-style: normal;
  font-family: var(--font-sans);
  font-weight: 500;
  margin: 0 0 14px;
}

/* ─── Generate footer: pill button gets the spotlight ───────────────── */
.vs-tc-gen-footer {
  background: var(--paper, #fffefb);
  border-radius: var(--vs-radius-card);
  padding: 12px 18px;
  box-shadow: var(--vs-shadow-soft);
  border: 1px solid var(--neutral-line);
}
.vs-tc-gen-footer #vs-test-generate { min-width: 220px; }

/* ─── Settings panel: tabs as pills, breathy padding ────────────────── */
.vs-tc-settings {
  padding: 0;
  background: var(--paper, #fffefb);
}
.vs-tc-settings-tabs {
  padding: 8px;
  gap: 6px;
  background: var(--bg-cream, #faf6ee);
  border-bottom: 1px solid var(--neutral-line);
  border-radius: var(--vs-radius-card) var(--vs-radius-card) 0 0;
}
.vs-tc-settings-tab {
  border-radius: var(--vs-radius-pill);
  padding: 9px 14px;
  border-bottom: none;
  transition: background 160ms ease, color 160ms ease;
}
.vs-tc-settings-tab:hover { background: rgba(212, 190, 149, 0.12); }
.vs-tc-settings-tab.is-active {
  background: var(--fg-charcoal);
  color: var(--bg-cream);
  border-bottom: none;
}
.vs-tc-settings-pane { padding: 22px 22px 26px; }

/* ─── Sliders: brass thumb, softer track ────────────────────────────── */
.vs-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: var(--vs-radius-pill);
  background: rgba(212, 190, 149, 0.30);
  outline: none;
  margin: 8px 0 4px;
}
.vs-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-brass);
  border: 2px solid var(--fg-charcoal);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(26, 20, 16, 0.16);
  transition: transform 120ms ease;
}
.vs-slider::-webkit-slider-thumb:hover { transform: scale(1.12); }
.vs-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-brass);
  border: 2px solid var(--fg-charcoal);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(26, 20, 16, 0.16);
}
.vs-slider:disabled::-webkit-slider-thumb { opacity: 0.4; }
.vs-slider:disabled { opacity: 0.55; }

/* ─── History rows: card style with avatar + transport pill row ─────── */
.vs-tc-history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 4px;
}
.vs-tc-history-item {
  background: var(--paper, #fffefb);
  border: 1px solid var(--neutral-line);
  border-radius: var(--vs-radius-card);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  box-shadow: 0 1px 2px rgba(26, 20, 16, 0.03);
  transition: box-shadow 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.vs-tc-history-item:hover {
  box-shadow: 0 1px 2px rgba(26, 20, 16, 0.06), 0 10px 24px rgba(26, 20, 16, 0.06);
  border-color: rgba(212, 190, 149, 0.6);
  transform: translateY(-1px);
}
.vs-tc-history-item::before {
  content: attr(data-event-id);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--fg-charcoal);
  color: var(--accent-brass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  font-weight: 500;
  /* Show first character of name via JS-rendered first letter when available */
  /* Fallback: avatar empty if data-event-id missing initial */
  text-transform: uppercase;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: clip;
  letter-spacing: 0;
  max-width: 36px;
}
.vs-tc-history-row1 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
}
.vs-tc-history-row1 strong {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 14px;
  color: var(--fg-charcoal);
}
.vs-tc-history-time {
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--neutral-text-mute);
  text-transform: uppercase;
}
.vs-tc-history-text {
  font-size: 12.5px;
  color: var(--neutral-text-mute);
  margin: 4px 0 6px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vs-tc-history-meta {
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--neutral-text-mute);
  margin-bottom: 10px;
}
.vs-tc-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(212, 190, 149, 0.22);
}
.vs-tc-history-actions .vs-btn-tiny {
  padding: 6px 11px;
  font-size: 11.5px;
}
.vs-tc-history-actions [data-tc-play] { min-width: 76px; }
.vs-tc-history-hint {
  font-size: 9.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--accent-brass-dark);
  background: rgba(212, 190, 149, 0.12);
  border: 1px solid rgba(212, 190, 149, 0.40);
  padding: 4px 10px;
  border-radius: var(--vs-radius-pill);
  font-weight: 500;
}

/* ─── Result audio card (main column) ───────────────────────────────── */
.vs-tc-card {
  background: var(--paper, #fffefb);
  border: 1px solid var(--neutral-line);
  border-radius: var(--vs-radius-card);
  padding: 18px 20px;
  box-shadow: var(--vs-shadow-soft);
}
.vs-tc-card-meta {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--neutral-text-mute);
  margin-bottom: 8px;
}
.vs-tc-card-meta strong {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--fg-charcoal);
  font-size: 14px;
  margin-right: 6px;
}
.vs-tc-card-text {
  background: rgba(212, 190, 149, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--fg-charcoal);
  line-height: 1.5;
  margin-bottom: 12px;
}
.vs-tc-audio {
  width: 100%;
  border-radius: var(--vs-radius-pill);
  margin-bottom: 12px;
  filter: invert(8%) hue-rotate(0deg);
}
.vs-tc-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(212, 190, 149, 0.22);
}

/* ─── Topbar polish ─────────────────────────────────────────────────── */
.vs-topbar {
  position: relative;
}
.vs-topbar::after {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-brass) 0%, transparent 60%);
  opacity: 0.5;
}

/* ─── Sidebar links: smoother active, breathy spacing ───────────────── */
.vs-side-link {
  margin: 1px 8px;
  padding: 9px 14px;
  border-radius: 8px;
  border-left: 3px solid transparent;
}
.vs-side-link:hover {
  background: rgba(212, 190, 149, 0.08);
}
.vs-side-link.is-active {
  background: rgba(212, 190, 149, 0.18);
  border-left-color: var(--accent-brass);
  padding-left: 14px;
}

/* ─── Catalog grid voice cards ──────────────────────────────────────── */
.vs-grid { gap: 20px; }
.vs-card { padding: 24px; }

/* ─── Tables (Owners + Royalty Ledger) ──────────────────────────────── */
.vs-table-wrapper {
  background: var(--paper, #fffefb);
  border-radius: var(--vs-radius-card);
  box-shadow: var(--vs-shadow-soft);
  overflow: hidden;
}
.vs-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
.vs-table thead {
  background: var(--bg-cream, #faf6ee);
}
.vs-table th {
  padding: 14px 18px;
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--accent-brass-dark);
  font-weight: 500;
  text-align: left;
  border-bottom: 1px solid var(--neutral-line);
}
.vs-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(212, 190, 149, 0.18);
}
.vs-table tbody tr {
  transition: background 120ms ease;
}
.vs-table tbody tr:hover { background: rgba(212, 190, 149, 0.06); }
.vs-table tbody tr:last-child td { border-bottom: none; }

/* ─── Sample Library tiles ──────────────────────────────────────────── */
.vs-tc-sl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding: 6px 0;
}
.vs-tc-sl-grid .vs-tc-sl-card,
.vs-tc-sl-grid > * {
  background: var(--paper, #fffefb);
  border: 1px solid var(--neutral-line);
  border-radius: var(--vs-radius-card);
  padding: 18px;
  box-shadow: var(--vs-shadow-soft);
  transition: box-shadow 160ms ease, transform 160ms ease;
}
.vs-tc-sl-grid > *:hover {
  box-shadow: var(--vs-shadow-card-hover);
  transform: translateY(-2px);
}

/* ─── Pronunciation Dict table ──────────────────────────────────────── */
.vs-tc-pd-form {
  display: grid;
  grid-template-columns: 1fr 1fr 160px 160px auto;
  gap: 10px;
  background: var(--paper, #fffefb);
  border: 1px solid var(--neutral-line);
  border-radius: var(--vs-radius-card);
  padding: 16px;
  box-shadow: var(--vs-shadow-soft);
  margin-bottom: 16px;
}
.vs-tc-pd-table {
  background: var(--paper, #fffefb);
  border-radius: var(--vs-radius-card);
  box-shadow: var(--vs-shadow-soft);
  overflow: hidden;
}
.vs-tc-pd-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.vs-tc-pd-table th,
.vs-tc-pd-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(212, 190, 149, 0.18);
}
.vs-tc-pd-table th {
  background: var(--bg-cream, #faf6ee);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.10em;
  color: var(--accent-brass-dark);
}
.vs-tc-pd-table tr:last-child td { border-bottom: none; }

/* ─── Dialogue Builder turns ────────────────────────────────────────── */
.vs-tc-db-head {
  background: var(--paper, #fffefb);
  border: 1px solid var(--neutral-line);
  border-radius: var(--vs-radius-card);
  padding: 16px 18px;
  box-shadow: var(--vs-shadow-soft);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.vs-tc-db-turns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.vs-tc-db-turns > * {
  background: var(--paper, #fffefb);
  border: 1px solid var(--neutral-line);
  border-radius: var(--vs-radius-card);
  padding: 14px 16px;
  box-shadow: var(--vs-shadow-soft);
}
.vs-tc-db-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.vs-tc-db-result {
  background: var(--paper, #fffefb);
  border: 1px solid var(--neutral-line);
  border-radius: var(--vs-radius-card);
  padding: 18px 20px;
  box-shadow: var(--vs-shadow-soft);
  min-height: 80px;
  margin-bottom: 18px;
}

/* ─── Cost Dashboard tiles ──────────────────────────────────────────── */
.vs-tc-cost-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.vs-tc-cost-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.vs-tc-cost-kpis > * {
  background: var(--paper, #fffefb);
  border: 1px solid var(--neutral-line);
  border-radius: var(--vs-radius-card);
  padding: 16px 18px;
  box-shadow: var(--vs-shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.vs-tc-cost-tops {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 22px;
}
.vs-tc-cost-tops .vs-tc-cost-top {
  background: var(--paper, #fffefb);
  border: 1px solid var(--neutral-line);
  border-radius: var(--vs-radius-card);
  padding: 18px 20px;
  box-shadow: var(--vs-shadow-soft);
}
.vs-tc-cost-trend {
  background: var(--paper, #fffefb);
  border: 1px solid var(--neutral-line);
  border-radius: var(--vs-radius-card);
  padding: 18px 20px;
  box-shadow: var(--vs-shadow-soft);
}

/* ─── A/B Compare results grid ──────────────────────────────────────── */
.vs-tc-ab-input {
  background: var(--paper, #fffefb);
  border: 1px solid var(--neutral-line);
  border-radius: var(--vs-radius-card);
  padding: 20px 22px;
  box-shadow: var(--vs-shadow-soft);
  margin-bottom: 18px;
}
.vs-tc-ab-voices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 16px;
}
.vs-tc-ab-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

/* ─── Modals: softer corners + drop-shadow ──────────────────────────── */
.vs-modal-content {
  border-radius: 18px;
  padding: 28px 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.vs-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid var(--neutral-line);
}

/* ─── "Coming soon" tag polish ──────────────────────────────────────── */
.vs-tag-soon {
  background: linear-gradient(180deg, rgba(212,190,149,0.20) 0%, rgba(212,190,149,0.12) 100%);
  border: 1px solid rgba(212, 190, 149, 0.45);
  padding: 2px 8px;
  font-size: 9px;
  font-weight: 600;
}

/* ─── Reset demo data + topbar buttons → pill style ─────────────────── */
.vs-topbar-actions .vs-btn { border-radius: var(--vs-radius-pill); padding: 8px 16px; font-size: 12px; }

/* ─── Loading dots animation polish ─────────────────────────────────── */
.vs-tc-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  background: var(--paper, #fffefb);
  border-radius: var(--vs-radius-card);
  border: 1px solid var(--neutral-line);
}
.vs-tc-dots {
  display: inline-flex;
  gap: 5px;
}
.vs-tc-dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-brass-dark);
  animation: vsDot 1.2s infinite ease-in-out;
}
.vs-tc-dots span:nth-child(2) { animation-delay: 0.18s; }
.vs-tc-dots span:nth-child(3) { animation-delay: 0.36s; }
@keyframes vsDot {
  0%, 60%, 100% { opacity: 0.30; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}
.vs-tc-loading-label {
  font-style: italic;
  font-family: var(--font-serif);
  color: var(--fg-charcoal);
  font-size: 14px;
}

/* ─── Spaced view headers ───────────────────────────────────────────── */
.vs-view-header { margin-bottom: 24px; }
.vs-view-title { letter-spacing: 0; }

/* ─── Generic ergonomic: focus-visible on every interactive ─────────── */
.vs-btn:focus-visible,
.vs-side-link:focus-visible,
.vs-tc-settings-tab:focus-visible,
.vs-input:focus-visible,
.vs-tc-tab:focus-visible,
[data-tc-action]:focus-visible {
  outline: 2px solid var(--accent-brass);
  outline-offset: 3px;
}

/* ─── Fix: History row avatar via dedicated child div ─────────────────── */
.vs-tc-history-item::before { content: none !important; display: none !important; }
.vs-tc-history-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--fg-charcoal, #1a1410);
  color: var(--accent-brass, #d4be95);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif, Georgia, serif);
  font-style: italic;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(212, 190, 149, 0.30);
}
.vs-tc-history-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ══════════════════════════════════════════════════════════════════════════
 * Radius dial-back (2026-05-11 ~12:05 UTC)
 * Per Rafa: "no tan redondos pero no tan cuadrados".
 *
 * Pulls all the previous pill (999px) and 14px corners down to a moderate
 * 8-10px range. Keeps round only on circular controls (avatar, slider thumb)
 * and on legitimate badges (Coming soon, Monthly purge hint chip).
 * ══════════════════════════════════════════════════════════════════════════ */

:root {
  --vs-radius-card: 10px;     /* was 14px */
  --vs-radius-input: 8px;     /* was 10px */
  --vs-radius-btn: 8px;       /* was 10px */
  --vs-radius-pill: 16px;     /* was 999px — only used where moderate-rounded fits */
}

/* Buttons: ditch the pill on tiny + large; keep moderate corner */
.vs-btn-tiny  { border-radius: 8px;  padding: 6px 11px; font-size: 12px; }
.vs-btn-large { border-radius: 10px; padding: 14px 28px; font-size: 15px; }

/* Settings tabs (Configuración / Historial): pill → 8px */
.vs-tc-settings-tab { border-radius: 8px; }

/* Transport buttons inside history + audio cards: pill → 8px,
   keep min-width on Play so it doesn't dance */
.vs-tc-history-actions .vs-btn-tiny,
.vs-tc-card-actions   .vs-btn-tiny { border-radius: 8px; }

/* Reset demo data + topbar buttons: pill → 8px */
.vs-topbar-actions .vs-btn { border-radius: 8px; padding: 8px 16px; font-size: 12px; }

/* Sidebar active link: keep moderate pill-ish but tighter */
.vs-side-link { border-radius: 6px; }

/* Cards keep 10px now (already overridden via :root) */
.vs-card, .vs-job-card, .vs-empty,
.vs-test-result, .vs-tc-gen-result,
.vs-tc-settings, .vs-tc-card,
.vs-tc-history-item,
.vs-tc-gen-footer,
.vs-tc-pd-form, .vs-tc-pd-table,
.vs-tc-db-head, .vs-tc-db-result,
.vs-tc-db-turns > *,
.vs-tc-cost-kpis > *,
.vs-tc-cost-tops .vs-tc-cost-top,
.vs-tc-cost-trend,
.vs-tc-ab-input,
.vs-tc-sl-grid > *,
.vs-table-wrapper,
.vs-tc-loading {
  border-radius: 10px;
}

/* Generate textarea — slightly more rounded than inputs to feel calm */
.vs-tc-gen-textarea { border-radius: 10px; }

/* Inputs / selects */
.vs-input, .vs-textarea { border-radius: 8px; }

/* Settings tabs strip top corners follow the panel */
.vs-tc-settings-tabs { border-radius: 10px 10px 0 0; }

/* Modal: 18px → 12px */
.vs-modal-content { border-radius: 12px; }

/* Native audio element inside the result card — moderate pill is fine for media */
.vs-tc-audio { border-radius: 999px; }   /* the <audio> element looks best fully pill */

/* Badge-like elements stay pill (they're chips, not buttons) */
.vs-tc-history-hint,
.vs-tag-soon,
.vs-tag { border-radius: 999px; }

/* Avatar + slider thumb keep their circle (round is correct for circular controls) */
.vs-tc-history-avatar { border-radius: 50%; }
.vs-avatar { border-radius: 50%; }
.vs-slider::-webkit-slider-thumb { border-radius: 50%; }
.vs-slider::-moz-range-thumb { border-radius: 50%; }
.vs-slider { border-radius: 999px; }   /* track stays pill, it's a 6px sliver */
.vs-status-dot { border-radius: 50%; }

/* ── Auto-injected Stop button next to plain <audio controls> ── */
.vs-audio-stop {
  margin-left: 8px;
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
}
.vs-audio-stop[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Floating global mini-player (Pause/Stop for any audio) ─────────── */
#vs-floating-player {
  position: fixed;
  right: 24px;
  bottom: 92px;          /* sits above Ask Marcus widget */
  z-index: 9000;
  background: linear-gradient(180deg, #2a201a 0%, #1a1410 100%);
  color: var(--bg-cream, #faf6ee);
  border: 1px solid rgba(212, 190, 149, 0.30);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
  max-width: 360px;
  box-shadow: 0 12px 36px rgba(26, 20, 16, 0.32), 0 2px 4px rgba(26, 20, 16, 0.18);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif);
}
#vs-floating-player.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#vs-floating-player[hidden] { display: none !important; }

.vs-fp-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(212, 190, 149, 0.18);
  color: var(--accent-brass, #d4be95);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.vs-fp-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.vs-fp-title {
  font-family: var(--font-serif, Georgia, serif);
  font-style: italic;
  font-size: 14px;
  font-weight: 500;
  color: var(--bg-cream, #faf6ee);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vs-fp-sub {
  font-size: 10px;
  letter-spacing: 0.10em;
  color: rgba(212, 190, 149, 0.75);
  text-transform: uppercase;
  margin-top: 2px;
}
.vs-fp-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(212, 190, 149, 0.10);
  color: var(--bg-cream, #faf6ee);
  border: 1px solid rgba(212, 190, 149, 0.28);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 140ms ease, transform 80ms ease;
}
.vs-fp-btn:hover { background: rgba(212, 190, 149, 0.20); }
.vs-fp-btn:active { transform: scale(0.96); }
.vs-fp-btn-stop {
  background: rgba(212, 190, 149, 0.22);
  border-color: rgba(212, 190, 149, 0.45);
  color: var(--accent-brass, #d4be95);
}
.vs-fp-btn-stop:hover { background: rgba(212, 190, 149, 0.32); }
@media (max-width: 600px) {
  #vs-floating-player {
    right: 12px;
    left: 12px;
    bottom: 76px;
    max-width: none;
    min-width: 0;
  }
}
