/* ==========================================================================
   LA VITROLA — ESTACIÓN OFIMÁTICA AUDIÓFILA (WORKSTATION FULL-VIEWPORT)
   Sistema de Color CSS Level 4 (OKLCH)
   Por defecto: Blanco Técnico Ofimático con Acentos Vino Tinto y 5% Dorado
   Tipografía: Montserrat estricta | 100% SVG Monocromático (Cero iconos color)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* ========================================================================
     SISTEMA DE COLOR BASE: BLANCO OFIMÁTICO TÉCNICO
     ======================================================================== */
  --bg-app: oklch(0.995 0.002 95);          /* Blanco papel técnico puro */
  --bg-canvas: oklch(1.0 0 0);              /* Lienzo de lectura */
  --bg-panel: oklch(0.975 0.004 95);        /* Paneles y barras laterales */
  --bg-panel-hover: oklch(0.95 0.008 95);   /* Hover sutil */
  --bg-input: oklch(0.99 0.002 95);         /* Entradas de formulario */
  
  --border-subtle: oklch(0.90 0.008 95);    /* Filete técnico milimetrado */
  --border-strong: oklch(0.82 0.012 95);    /* Bordes de división */
  
  --text-main: oklch(0.18 0.02 260);        /* Obsidiana / grafito profundo */
  --text-muted: oklch(0.48 0.02 260);       /* Gris técnico neutro */
  --text-subtle: oklch(0.65 0.015 260);     /* Leyendas y metadatos */

  /* ========================================================================
     ACENTO PRINCIPAL: VINO TINTO LA VITROLA (~20%)
     ======================================================================== */
  --vinotinto: oklch(0.44 0.19 25);         /* Vino tinto noble emblemático */
  --vinotinto-hover: oklch(0.38 0.19 25);   /* Vino tinto oscuro al presionar */
  --vinotinto-soft: oklch(0.94 0.03 25);    /* Fondo tenue vino tinto */
  --vinotinto-border: oklch(0.85 0.06 25);  /* Borde vino tinto sutil */
  --chord-color: oklch(0.44 0.19 25);       /* Color de notas y acordes */

  /* ========================================================================
     DETALLES DORADOS AUDIÓFILOS AL 5% (ORO NOBLE / LATÓN DE VITROLA)
     ======================================================================== */
  --gold-accent: oklch(0.76 0.12 85);       /* Dorado audiófilo noble */
  --gold-glow: oklch(0.82 0.14 85 / 0.18);  /* Resplandor áureo muy sutil */
  --gold-border: oklch(0.82 0.10 85 / 0.45);/* Filete dorado milimétrico */
  --gold-bg-badge: oklch(0.96 0.03 85);     /* Fondo chip de alta resolución */

  /* Tipografía y Geometría */
  --font-main: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;

  --topbar-h: 48px;
  --sidebar-l-w: 290px;
  --sidebar-r-w: 320px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  
  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-panel: 0 4px 12px rgba(0, 0, 0, 0.04);
  --transition-smooth: 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   TEMA SECUNDARIO NOCTURNO: VINO TINTO PROFUNDO
   ========================================================================== */
[data-theme="vinotinto-dark"] {
  --bg-app: oklch(0.15 0.045 25);
  --bg-canvas: oklch(0.13 0.04 25);
  --bg-panel: oklch(0.18 0.055 25);
  --bg-panel-hover: oklch(0.22 0.065 25);
  --bg-input: oklch(0.16 0.05 25);
  
  --border-subtle: oklch(0.26 0.07 25);
  --border-strong: oklch(0.34 0.09 25);
  
  --text-main: oklch(0.96 0.01 25);
  --text-muted: oklch(0.74 0.03 25);
  --text-subtle: oklch(0.55 0.04 25);

  --vinotinto: oklch(0.68 0.22 25);
  --vinotinto-hover: oklch(0.74 0.22 25);
  --vinotinto-soft: oklch(0.24 0.08 25);
  --vinotinto-border: oklch(0.38 0.12 25);
  --chord-color: oklch(0.78 0.19 35);

  --gold-accent: oklch(0.82 0.14 85);
  --gold-glow: oklch(0.82 0.14 85 / 0.22);
  --gold-border: oklch(0.82 0.14 85 / 0.5);
  --gold-bg-badge: oklch(0.22 0.05 85);
}

/* ==========================================================================
   RESET & LAYOUT DE PANTALLA COMPLETA (FULL VIEWPORT)
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  font-family: var(--font-main);
  background-color: var(--bg-app);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Iconos SVG monocromáticos a un solo color */
.icon-mono {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
  fill: currentColor;
  flex-shrink: 0;
}

.icon-mono-lg {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  fill: currentColor;
  flex-shrink: 0;
}

/* ==========================================================================
   ESTRUCTURA WORKSTATION (GRID DE 3 PANELES)
   ========================================================================== */
.workstation-container {
  display: grid;
  grid-template-rows: var(--topbar-h) 1fr;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
}

/* ==========================================================================
   BARRA SUPERIOR OFIMÁTICA (TOPBAR)
   ========================================================================== */
.topbar {
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background-color: var(--bg-panel);
  border-bottom: 1px solid var(--border-subtle);
  user-select: none;
  z-index: 100;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--vinotinto);
  text-decoration: none;
  font-size: 15px;
}

.brand-badge .gold-chip {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  padding: 2px 6px;
  background-color: var(--gold-bg-badge);
  color: var(--gold-accent);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-sm);
}

.module-switcher {
  display: flex;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2px;
}

.module-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.module-btn:hover {
  color: var(--text-main);
  background: var(--bg-panel-hover);
}

.module-btn.active {
  background: var(--vinotinto);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Ficha del tema en vivo en el centro de la barra */
.topbar-center {
  display: flex;
  align-items: center;
  gap: 12px;
}

.track-live-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--gold-accent);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-main);
}

.track-live-chip .track-title {
  font-weight: 700;
}

.track-live-chip .track-meta {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.tool-toggle-btn:hover {
  border-color: var(--vinotinto-border);
  color: var(--vinotinto);
}

.tool-toggle-btn.active {
  border-color: var(--vinotinto);
  background: var(--vinotinto-soft);
  color: var(--vinotinto);
}

/* ==========================================================================
   CUERPO PRINCIPAL DEL ESPACIO DE TRABAJO
   ========================================================================== */
.workspace-body {
  grid-row: 2;
  display: grid;
  grid-template-columns: var(--sidebar-l-w) 1fr var(--sidebar-r-w);
  height: calc(100dvh - var(--topbar-h));
  overflow: hidden;
  position: relative;
  transition: grid-template-columns var(--transition-smooth);
}

.workspace-body.hide-left {
  --sidebar-l-w: 0px;
}

.workspace-body.hide-right {
  --sidebar-r-w: 0px;
}

/* ==========================================================================
   BARRA IZQUIERDA: HERRAMIENTAS & FUNCIONES DEL MÚSICO
   ========================================================================== */
.sidebar-left {
  background-color: var(--bg-panel);
  border-right: 1px solid var(--border-subtle);
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transition: opacity var(--transition-smooth);
}

.workspace-body.hide-left .sidebar-left {
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.panel-section {
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.panel-header-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Bloque Avance Lento (Auto-Scroll) */
.autoscroll-control-card {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
}

.autoscroll-main-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.btn-play-scroll {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  background-color: var(--vinotinto);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background-color var(--transition-smooth);
}

.btn-play-scroll:hover {
  background-color: var(--vinotinto-hover);
}

.btn-play-scroll.playing {
  background-color: oklch(0.35 0.15 140); /* Verde técnico de reproducción */
}

.btn-reset-scroll {
  padding: 8px 10px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
}

.btn-reset-scroll:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
}

.speed-slider-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.speed-slider-wrap input[type="range"] {
  flex: 1;
  accent-color: var(--vinotinto);
}

/* Transpositor Armónico */
.transposer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}

.btn-transpose {
  padding: 6px 8px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
  color: var(--text-main);
  cursor: pointer;
  text-align: center;
}

.btn-transpose:hover {
  border-color: var(--vinotinto);
  color: var(--vinotinto);
}

.notation-selector {
  display: flex;
  gap: 4px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
  margin-bottom: 10px;
}

.notation-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.notation-btn.active {
  background: var(--vinotinto-soft);
  color: var(--vinotinto);
}

/* Capas de Visualización */
.layers-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.layer-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-main);
  cursor: pointer;
}

.layer-toggle input[type="checkbox"] {
  accent-color: var(--vinotinto);
}

/* Biblioteca Rápida de Canciones */
.song-quick-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.song-quick-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.song-quick-item:hover, .song-quick-item.active {
  border-color: var(--vinotinto);
  background: var(--vinotinto-soft);
}

.song-quick-item .song-name {
  font-weight: 600;
  font-size: 12px;
}

.song-quick-item .song-artist {
  font-size: 11px;
  color: var(--text-muted);
}

.song-quick-item .key-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  background: var(--gold-bg-badge);
  color: var(--gold-accent);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   ÁREA CENTRAL: EL ATRIL DIGITAL & LIENZO DE PARTITURA
   ========================================================================== */
.workspace-center {
  background-color: var(--bg-canvas);
  height: 100%;
  overflow-y: auto;
  position: relative;
  display: flex;
  justify-content: center;
  scroll-behavior: smooth;
}

.music-stand-sheet {
  width: 100%;
  max-width: 900px;
  padding: 40px 32px 120px 32px;
  box-sizing: border-box;
}

/* Ficha encabezado de partitura */
.score-header {
  border-bottom: 2px solid var(--vinotinto);
  padding-bottom: 20px;
  margin-bottom: 28px;
  position: relative;
}

.score-header::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--gold-accent); /* Detalle 5% dorado */
}

.score-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}

.score-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.score-artist {
  font-size: 16px;
  font-weight: 600;
  color: var(--vinotinto);
  margin-bottom: 12px;
}

.score-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.meta-pill strong {
  color: var(--text-main);
  font-family: var(--font-mono);
}

.meta-pill.audiophile-badge {
  background: var(--gold-bg-badge);
  color: var(--gold-accent);
  border: 1px solid var(--gold-border);
  font-weight: 700;
}

/* Diagramas de Acordes para Guitarra */
.chord-diagrams-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 32px;
}

.chord-diagram-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.chord-diagram-name {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--chord-color);
}

.chord-diagram-frets {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* Bloque Tablatura / Partitura Técnica */
.tab-block {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--vinotinto);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 32px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  overflow-x: auto;
  color: var(--text-main);
  white-space: pre;
}

.tab-block .tab-label {
  display: block;
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--vinotinto);
  margin-bottom: 8px;
}

/* Sección de Letra Armónica con Traducción */
.lyrics-section {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 4px;
  margin-bottom: 12px;
}

.lyric-stanza {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Cada compás / verso armónico */
.verse-unit {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* 1. Línea de Acordes / Notas (Color Vino Tinto) */
.chord-line {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--chord-color);
  letter-spacing: 0.02em;
  white-space: pre;
  user-select: text;
}

/* 2. Línea de Letra Original (Inglés) */
.text-original-line {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.01em;
  user-select: text;
}

/* 3. Línea de Traducción al Castellano */
.text-trans-line {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  font-style: italic;
  letter-spacing: 0.01em;
  user-select: text;
  margin-bottom: 4px;
}

/* ==========================================================================
   BARRA DERECHA: SUSCRIPCIÓN, COMUNIDAD & SYNC SOFTWARE
   ========================================================================== */
.sidebar-right {
  background-color: var(--bg-panel);
  border-left: 1px solid var(--border-subtle);
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transition: opacity var(--transition-smooth);
}

.workspace-body.hide-right .sidebar-right {
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================================
   SOLAPAS DEL PANEL DERECHO (ACORDES, DICCIONARIO, ESCALAS & SINCRO)
   ========================================================================== */
.sidebar-right-tabs {
  display: flex;
  background: var(--bg-canvas);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 20;
}

.right-tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 4px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.right-tab-btn:hover {
  color: var(--text-main);
  background: rgba(179,0,45,0.04);
}

.right-tab-btn.active {
  color: var(--vinotinto);
  border-bottom-color: var(--vinotinto);
  background: var(--bg-panel);
}

.right-tab-pane {
  display: none;
  flex-direction: column;
  flex: 1;
}

.right-tab-pane.active {
  display: flex;
}

.panel-section-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-panel);
}

/* Grilla de Acordes del Tema */
.song-chords-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 14px;
  overflow-y: auto;
}

.song-chord-card {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.song-chord-card:hover {
  border-color: var(--vinotinto);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.song-chord-name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  color: var(--chord-color);
  margin-bottom: 2px;
}

.song-chord-sub {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.song-chord-notes {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Diccionario de Acordes */
.chord-root-selector, .scale-root-selector {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  padding: 10px 14px 6px 14px;
}

.root-pill-btn {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 5px 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
}

.root-pill-btn:hover {
  border-color: var(--vinotinto);
  color: var(--vinotinto);
}

.root-pill-btn.active {
  background: var(--vinotinto);
  color: #FFFFFF !important;
  border-color: var(--vinotinto);
}

.chord-type-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 6px 14px 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.type-pill-btn {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.type-pill-btn:hover {
  border-color: var(--vinotinto);
}

.type-pill-btn.active {
  background: var(--vinotinto);
  color: #FFFFFF !important;
  border-color: var(--vinotinto);
}

.chord-dict-viewer {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  text-align: center;
}

/* Escalas & Mástil */
.scale-type-dropdown {
  width: 100%;
  padding: 7px 10px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
}

/* Tarjeta Club de Suscriptores con Acento Dorado 5% */
.subscriber-club-card {
  background: var(--bg-canvas);
  border: 1px solid var(--gold-border);
  border-top: 3px solid var(--gold-accent);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: 0 4px 14px var(--gold-glow);
  margin-bottom: 16px;
}

.club-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-accent);
  margin-bottom: 8px;
}

.club-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.club-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.club-perks-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 12px;
}

.club-perks-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-main);
}

.club-perks-list li .gold-bullet {
  color: var(--gold-accent);
  font-weight: 900;
}

.btn-join-club {
  width: 100%;
  padding: 10px;
  background: var(--vinotinto);
  color: #ffffff;
  border: 1px solid var(--vinotinto-hover);
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: background-color var(--transition-smooth);
}

.btn-join-club:hover {
  background: var(--vinotinto-hover);
}

/* Sincronización con el Software de Escritorio */
.software-sync-card {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.btn-sync-desktop {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 12px;
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition-smooth);
  margin-bottom: 8px;
}

.btn-sync-desktop:hover {
  border-color: var(--vinotinto);
  color: var(--vinotinto);
}

.btn-export-lrc {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  background: transparent;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-export-lrc:hover {
  color: var(--text-main);
  border-color: var(--text-main);
}

/* Formulario de Aporte Comunitario */
.community-contribution-box {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
}

.form-group-compact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.form-group-compact label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group-compact input, 
.form-group-compact textarea {
  width: 100%;
  padding: 6px 8px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 12px;
  color: var(--text-main);
}

.form-group-compact textarea {
  resize: vertical;
  min-height: 50px;
}

.btn-submit-contrib {
  width: 100%;
  padding: 8px;
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 12px;
  color: var(--text-main);
  cursor: pointer;
}

.btn-submit-contrib:hover {
  border-color: var(--vinotinto);
  color: var(--vinotinto);
}

/* ==========================================================================
   VISTA REVISTA AUDIÓFILA & ESTUDIO SUPERADOR (MODAL / OVERLAY INTEGRADO)
   ========================================================================== */
.magazine-overlay-view {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-canvas);
  z-index: 50;
  overflow-y: auto;
  padding: 40px 32px;
}

.magazine-overlay-view.active {
  display: block;
}

.magazine-container {
  max-width: 1080px;
  margin: 0 auto;
}

.magazine-hero {
  border-bottom: 2px solid var(--vinotinto);
  padding-bottom: 24px;
  margin-bottom: 32px;
}

.magazine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.magazine-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-smooth), border-color var(--transition-smooth);
}

.magazine-card:hover {
  border-color: var(--vinotinto-border);
  transform: translateY(-2px);
}

.magazine-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-subtle);
  background: #000;
}

.magazine-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.magazine-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--vinotinto);
  margin-bottom: 6px;
}

.magazine-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.magazine-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
  flex: 1;
}

/* ==========================================================================
   RESPONSIVIDAD & ADAPTACIÓN A PANTALLA
   ========================================================================== */
@media (max-width: 1024px) {
  :root {
    --sidebar-l-w: 260px;
    --sidebar-r-w: 280px;
  }
}

@media (max-width: 768px) {
  .workstation-container {
    grid-template-rows: auto 1fr;
  }
  .workspace-body {
    grid-template-columns: 1fr;
  }
  .sidebar-left, .sidebar-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 290px;
    z-index: 90;
    box-shadow: var(--shadow-panel);
  }
  .sidebar-left { left: 0; }
  .sidebar-right { right: 0; }
}


/* ==========================================================================
   MÓDULO DE COLABORADORES & ESTUDIO DE TRANSCRIPCIÓN CON TELEMETRÍA
   ========================================================================== */

/* Tarjeta de Estado del Colaborador en la Barra Derecha */
.collaborator-profile-box {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 16px;
}

.collab-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.collab-avatar-monogram {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--vinotinto);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  border: 2px solid var(--gold-accent);
}

.collab-meta-info {
  flex: 1;
}

.collab-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.collab-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--gold-accent);
}

.btn-open-studio {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: var(--vinotinto);
  color: #ffffff;
  border: 1px solid var(--vinotinto-hover);
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition-smooth);
  margin-top: 8px;
}

.btn-open-studio:hover {
  background: var(--vinotinto-hover);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Badge de Autoría Soberana en la Partitura Central */
.authorship-credit-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-panel);
  border: 1px solid var(--gold-border);
  border-left: 4px solid var(--gold-accent);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 12px;
}

.authorship-credit-banner .author-name {
  font-weight: 700;
  color: var(--text-main);
}

.authorship-credit-banner .license-tag {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--gold-accent);
  font-weight: 700;
  text-transform: uppercase;
}

/* Modal de Pantalla Completa: Estudio de Transcripción & Telemetría */
.studio-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.studio-modal-overlay.active {
  display: flex;
}

.studio-modal-card {
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  background: var(--bg-canvas);
  border: 1px solid var(--border-strong);
  border-top: 4px solid var(--vinotinto);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.studio-modal-header {
  padding: 16px 24px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.studio-modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.studio-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Herramienta de Telemetría (Cronómetro) */
.telemetry-timer-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 18px;
}

.timer-digits-display {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 800;
  color: var(--vinotinto);
  letter-spacing: 0.05em;
}

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

.btn-timer-action {
  padding: 6px 12px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 11px;
  color: var(--text-main);
  cursor: pointer;
}

.btn-timer-action:hover {
  border-color: var(--vinotinto);
  color: var(--vinotinto);
}

.btn-timer-stamp {
  background: var(--vinotinto);
  color: #ffffff;
  border-color: var(--vinotinto);
}

.btn-timer-stamp:hover {
  background: var(--vinotinto-hover);
  color: #ffffff;
}

/* Paleta de Inserción Rápida de Acordes */
.chord-quick-palette {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.btn-insert-chord {
  padding: 4px 8px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--chord-color);
  cursor: pointer;
}

.btn-insert-chord:hover {
  background: var(--vinotinto-soft);
  border-color: var(--vinotinto);
}

/* Filas del Editor de Versos */
.verse-editor-table {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.verse-editor-row {
  display: grid;
  grid-template-columns: 90px 1fr 1fr 1fr 36px;
  gap: 8px;
  align-items: center;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  padding: 10px;
  border-radius: var(--radius-sm);
}

.verse-editor-row input {
  width: 100%;
  padding: 6px 8px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 12px;
  color: var(--text-main);
}

.verse-editor-row input.time-input {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--vinotinto);
  text-align: center;
}

.verse-editor-row input.chord-input {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--chord-color);
}

.btn-remove-row {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-remove-row:hover {
  color: oklch(0.45 0.22 25);
}

.studio-modal-footer {
  padding: 14px 24px;
  background: var(--bg-panel);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* =========================================================================
   TARJETA EDITORIAL DE LA REVISTA EN ATRIL (HISTORIA Y CONTEXTO)
   ========================================================================= */
.magazine-article-footer-card {
  margin-top: 40px;
  margin-bottom: 28px;
  padding: 22px 24px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-left: 5px solid var(--vinotinto);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.magazine-article-footer-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border-color: var(--vinotinto);
}

.magazine-footer-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  color: var(--vinotinto);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.magazine-footer-title {
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
  line-height: 1.3;
}

.magazine-footer-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.magazine-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--vinotinto);
  color: #ffffff !important;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.magazine-footer-link:hover {
  opacity: 0.92;
  background: var(--vinotinto-hover);
}

