:root {
  color-scheme: dark;
  --bg-color: #08080a;
  --card-bg: #141418;
  --card-border: #24242c;
  --text-main: #f5f5f7;
  --text-muted: #8e8e9a;
  --primary-red: #ff3b30;
  --primary-red-hover: #e03126;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-green: #10b981;
  --accent-yellow: #eab308;
  --border-color: #24242c;
  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow: 0 12px 35px rgba(0, 0, 0, 0.75);
}

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

body.rec-theme {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  padding-bottom: 80px; /* Espacio para mini player flotante */
}

/* 📌 TOP NAVBAR ESTILO GRABADORA */
.rec-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0d0d10;
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 1.75rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.rec-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rec-logo-icon {
  font-size: 1.6rem;
  background: rgba(255, 59, 48, 0.15);
  border: 1px solid rgba(255, 59, 48, 0.3);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rec-brand-titles {
  display: flex;
  flex-direction: column;
}

.rec-logo-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.rec-live-dot {
  color: #ff4d4d;
  font-size: 0.85rem;
  animation: pulse 1.8s infinite;
  display: inline-block;
  vertical-align: middle;
  text-shadow: 0 0 10px rgba(255, 77, 77, 0.7);
}

.rec-subtitle-count {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.rec-top-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rec-search-box {
  display: flex;
  align-items: center;
  background: #1a1a22;
  border: 1px solid #2e2e38;
  border-radius: 20px;
  padding: 0.4rem 0.9rem;
  width: 280px;
}

.rec-search-box .search-icon {
  font-size: 0.85rem;
  margin-right: 0.5rem;
  opacity: 0.6;
}

.rec-search-input {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.88rem;
  width: 100%;
}

.rec-search-input:focus {
  outline: none;
}

.rec-icon-btn {
  background: #1a1a22;
  border: 1px solid #2e2e38;
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.rec-icon-btn:hover {
  background: #2a2a36;
  border-color: #444456;
}

/* ─── PANEL DE CONFIGURACIÓN ─────────────────────────────────────────────── */

.rec-options-wrapper {
  position: relative;
}

.settings-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 300px;
  background: #1e1e2a;
  border: 1px solid #3a3a4e;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
  z-index: 1000;
  overflow: hidden;
  animation: settingsFadeIn 0.15s ease;
}

@keyframes settingsFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.settings-panel-header {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted, #888);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid #2e2e3e;
}

.settings-group {
  padding: 0.85rem 1rem;
}

.settings-label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #e0e0ee;
  margin-bottom: 0.5rem;
  cursor: default;
}

.settings-label small {
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--text-muted, #777);
}

.settings-select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  background: #14141c;
  border: 1px solid #3a3a4e;
  border-radius: 7px;
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
  appearance: auto;
}

.settings-select:focus,
.settings-select:hover {
  border-color: var(--primary, #e03126);
}

.settings-hint {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  color: var(--text-muted, #777);
  min-height: 1em;
}

.settings-divider {
  height: 1px;
  background: #2e2e3e;
  margin: 0;
}

.settings-action-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: 1px solid #2e2e3e;
  border-radius: 7px;
  color: #bbb;
  font-size: 0.82rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.settings-action-btn:hover {
  background: #2a2a38;
  color: #fff;
}


/* 📐 LAYOUT PRINCIPAL GRID */
.rec-app-container {
  max-width: 1520px;
  margin: 1.25rem auto;
  padding: 0 0.75rem;
}

.rec-main-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
  justify-content: flex-start;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
}

.rec-sidebar,
.rec-detail-column {
  width: 100%;
  max-width: none;
  margin: 0;
  justify-self: stretch;
}

@media (min-width: 1024px) {
  .rec-main-grid {
    display: flex;
    flex-direction: column;
  }
}

@media (min-width: 1400px) {
  .rec-main-grid {
    max-width: 1180px;
  }
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow);
}


/* ⬅️ SIDEBAR: HISTORIAL Y LISTA DE GRABACIONES (SCREENSHOT 1) */
.rec-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  max-height: none;
  position: static;
  top: auto;
  overflow: visible;
  margin-right: 0;
  width: 100%;
  max-width: none;
  justify-self: stretch;
}

.rec-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rec-sidebar-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

.rec-category-pills {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.rec-pill {
  background: #202028;
  border: 1px solid #323240;
  color: var(--text-muted);
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.rec-pill:hover {
  background: #2a2a36;
  color: #fff;
}

.rec-pill.active {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.history-table-container {
  overflow-y: auto;
  flex: 1;
  max-height: calc(100vh - 270px);
  padding-right: 0.25rem;
}

.rec-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* TARJETA INDIVIDUAL DE GRABACIÓN EN LA LISTA (SCREENSHOT 1) */
.rec-item-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1c1c24;
  border: 1px solid #2d2d38;
  border-radius: var(--radius-md);
  padding: 0.72rem 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 82px;
}

.rec-item-card:hover {
  background: #252532;
  border-color: #3f3f50;
  transform: translateY(-1px);
}

.rec-item-card.active-rec-card {
  border-color: var(--primary-red);
  background: rgba(255, 59, 48, 0.1);
}

.rec-card-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow: hidden;
  flex: 1;
}

.rec-card-title-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0; /* permite que el título se trunque correctamente */
}

.rec-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.btn-rename-item {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0.1rem 0.25rem;
  cursor: pointer;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.15s;
  line-height: 1;
  border-radius: 4px;
}

.rec-item-card:hover .btn-rename-item {
  opacity: 0.6;
}

.btn-rename-item:hover {
  opacity: 1 !important;
  background: rgba(255, 255, 255, 0.08);
}

.rec-rename-input {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--primary, #e03126);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  width: 100%;
  min-width: 0;
  outline: none;
  box-sizing: border-box;
}

.rec-card-sub {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.74rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.rec-status-badge {
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
}

.rec-status-badge.completed { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.rec-status-badge.processing { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.rec-status-badge.failed { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.rec-token-badge {
  font-size: 0.68rem;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
  font-weight: 500;
  white-space: nowrap;
}

.rec-card-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 0.5rem;
}

.rec-play-btn {
  background: #2b2b38;
  border: 1px solid #3d3d50;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  padding-left: 2px;
}

.rec-play-btn:hover {
  background: var(--primary-red);
  border-color: var(--primary-red);
  transform: scale(1.08);
}

.rec-delete-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.3rem;
  font-size: 0.9rem;
  border-radius: 4px;
}

.rec-delete-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.rec-fab-container {
  padding-top: 0.5rem;
}

.rec-create-panel {
  padding: 0.85rem;
}

.rec-create-panel .rec-fab-btn {
  max-width: 520px;
  margin: 0 auto;
}

.history-list-hint {
  display: block;
  margin-top: 0.22rem;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 400;
}

.history-table-container {
  flex: none;
  max-height: 354px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.history-collapsed .rec-category-pills,
.history-collapsed #historyLoading,
.history-collapsed #emptyHistoryState,
.history-collapsed .history-table-container {
  display: none !important;
}

.history-collapsed { padding-bottom: 1rem; }

.rec-artifact-status {
  display: flex;
  align-items: center;
  gap: 0.32rem;
  margin-top: 0.5rem;
}

.artifact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border: 1px solid transparent;
  border-radius: 50%;
  font-size: 0.78rem;
}

.artifact-icon.is-ready {
  background: rgba(16, 185, 129, 0.13);
  border-color: rgba(16, 185, 129, 0.32);
  filter: none;
}

.artifact-icon.is-pending {
  background: rgba(148, 163, 184, 0.07);
  border-color: rgba(148, 163, 184, 0.16);
  filter: grayscale(1);
  opacity: 0.38;
}

.rec-fab-btn {
  width: 100%;
  background: var(--primary-red);
  color: #fff;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: 25px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 6px 20px rgba(255, 59, 48, 0.4);
  transition: all 0.2s ease;
}

.rec-fab-btn:hover {
  background: var(--primary-red-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 59, 48, 0.6);
}


/* ⏺️ COLUMNA DETALLE Y REPRODUCTOR DETALLADO (SCREENSHOT 2 & 3) */
.rec-detail-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: none;
  margin: 0;
  justify-self: stretch;
}

.rec-player-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.rec-player-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rec-back-btn {
  background: #202028;
  border: 1px solid #323240;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
}

.rec-back-btn:hover {
  background: #2a2a38;
}

.rec-title-box {
  flex: 1;
  overflow: hidden;
}

.rec-active-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rec-active-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.rec-player-top-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}


/* RELOJ DIGITAL GIGANTE */
.rec-big-timer-container {
  text-align: center;
  padding: 0.5rem 0;
}

.rec-big-timer {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.8rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 2px;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}


/* ONDA WAVESURFER Y SCRUBBER */
.rec-waveform-wrapper {
  background: #0d0d12;
  border: 1px solid #242430;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  position: relative;
}

.waveform-container {
  height: 75px !important;
  background: transparent !important;
}


/* BARRA DE ACCIONES INFORMATIVAS (BOTONES DE ACCIÓN) */
.rec-action-pills-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.rec-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.primary-pill { background: rgba(59, 130, 246, 0.18); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); }
.primary-pill:hover { background: rgba(59, 130, 246, 0.3); }

.accent-pill { background: rgba(139, 92, 246, 0.18); color: #c084fc; border: 1px solid rgba(139, 92, 246, 0.4); }
.accent-pill:hover:not(:disabled) { background: rgba(139, 92, 246, 0.3); }

.secondary-pill { background: #20202a; color: #a1a1aa; border: 1px solid #333342; }
.secondary-pill:hover { background: #2a2a38; color: #fff; }

.rec-action-pill:disabled { opacity: 0.4; cursor: not-allowed; }

.rec-model-inline {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}


/* CONTROLES DE REPRODUCCIÓN PRINCIPALES (BOTÓN ROJO GIGANTE + SKIPS) */
.rec-playback-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  background: #111116;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  border: 1px solid #22222d;
}

.rec-controls-main {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.rec-circle-btn {
  background: #20202a;
  border: 1px solid #333342;
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.rec-circle-btn:hover {
  background: #2e2e3d;
  border-color: #4a4a5f;
}

.rec-big-red-play {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-red);
  color: #fff;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 3px;
  box-shadow: 0 8px 25px rgba(255, 59, 48, 0.5);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rec-big-red-play:hover {
  transform: scale(1.08);
  background: var(--primary-red-hover);
  box-shadow: 0 10px 30px rgba(255, 59, 48, 0.7);
}

.rec-speed-select {
  background: #20202a;
  border: 1px solid #333342;
  color: #fff;
  padding: 0.35rem 0.6rem;
  border-radius: 16px;
  font-size: 0.8rem;
  cursor: pointer;
}

.rec-time-row {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
}


/* 📝 PESTAÑAS PRINCIPALES: TRANSCRIPCIÓN | RESUMEN (SCREENSHOT 3 & 4) */
.rec-content-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rec-view-tabs {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  border-bottom: 2px solid #20202a;
  padding-bottom: 0.5rem;
}

.rec-main-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.4rem 0.2rem;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}

.rec-main-tab:hover {
  color: #fff;
}

.rec-main-tab.active {
  color: #fff;
}

.rec-main-tab.active::after {
  content: '';
  position: absolute;
  bottom: -0.6rem;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-red);
  border-radius: 3px;
}


/* 💬 CHAT DIALOGUE BUBBLES (SCREENSHOT 3) */
.rec-chat-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 650px;
  overflow-y: auto;
  padding-right: 0.4rem;
}

.chat-bubble-card {
  background: #181820;
  border: 1px solid #2a2a36;
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  transition: all 0.25 ease;
  cursor: pointer;
}

.chat-bubble-card:hover {
  background: #20202c;
  border-color: #3e3e50;
}

/* RESALTADO ACTIVO BURGUNDY / ROJO OSCURO (SCREENSHOT 3) */
.chat-bubble-card.active-segment {
  background: #4a151b !important; /* Rojo oscuro tenue como en screenshot 3 */
  border: 1px solid #e53935 !important;
  box-shadow: 0 4px 18px rgba(229, 57, 53, 0.25);
  transform: scale(1.01);
}

.segment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.speaker-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 14px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.timestamp-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.segment-text {
  font-size: 0.95rem;
  color: #f1f1f5;
  line-height: 1.5;
}


/* 💬 FLOATING MINI PLAYER (SCREENSHOT 3 & 4 BOTTOM BAR) */
.rec-mini-player {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 600px;
  background: rgba(22, 22, 28, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 59, 48, 0.4);
  border-radius: 30px;
  padding: 0.5rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 999;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85);
}

.mini-player-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
}

.mini-waveform-icon {
  background: var(--primary-red);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.mini-player-text {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mini-player-text strong {
  font-size: 0.85rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-player-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.mini-player-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rec-mini-play-btn {
  background: var(--primary-red);
  border: none;
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  padding-left: 2px;
}

.rec-mini-expand-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
}


/* 🔗 MODALES (SCREENSHOT 5 & 6) */
.rec-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.rec-modal-content {
  width: 100%;
  max-width: 580px;
  background: #181820;
  border-radius: var(--radius-xl);
  max-height: 90vh;
  overflow-y: auto;
}

.rec-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.rec-modal-close {
  background: #252532;
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 700;
}

.share-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.share-option-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #20202c;
  border: 1px solid #323242;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.share-option-item:hover {
  background: #2a2a3b;
  border-color: var(--primary-red);
}

.share-icon {
  font-size: 1.5rem;
}

.share-text strong {
  display: block;
  font-size: 0.95rem;
  color: #fff;
}

.share-text small {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* UTILITY CLASSES */
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.82rem; }
.btn-outline { background: #20202a; border: 1px solid #333342; color: #fff; }
.btn-outline:hover { background: #2d2d3a; }
.btn-accent { background: var(--accent-purple); color: #fff; border: none; }
.btn-danger-text { color: #ef4444 !important; }

/* SPINNER */
.loading-state {
  text-align: center;
  padding: 2rem 1rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 59, 48, 0.2);
  border-top-color: var(--primary-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem auto;
}

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

.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
}

.empty-icon, .empty-summary-illustration {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

/* MODES AND DROPZONE */
.mode-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tab-btn {
  flex: 1;
  background: #20202a;
  border: 1px solid #333342;
  color: var(--text-muted);
  padding: 0.6rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
}

.tab-btn.active {
  background: var(--primary-red);
  color: #fff;
  border-color: var(--primary-red);
}

.dropzone {
  border: 2px dashed #3a3a4c;
  background: #111116;
  border-radius: var(--radius-lg);
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  position: relative;
}

.hidden-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}


/* YOUTUBE TOP NAVBAR */
.yt-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0f0f0f;
  border-bottom: 1px solid #272727;
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.yt-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.yt-logo-icon {
  background: #ff0000;
  color: #fff;
  width: 32px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  box-shadow: 0 2px 8px rgba(255, 0, 0, 0.4);
}

.yt-logo-text {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
  font-family: 'Inter', sans-serif;
}

.yt-logo-sub {
  font-size: 0.8rem;
  font-weight: 600;
  color: #ff3333;
  margin-left: 0.3rem;
  background: rgba(255, 0, 0, 0.15);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.yt-search-container {
  display: flex;
  align-items: center;
  width: 40%;
  max-width: 500px;
}

.yt-search-input {
  flex: 1;
  background: #121212;
  border: 1px solid #303030;
  border-radius: 20px 0 0 20px;
  padding: 0.5rem 1rem;
  color: #fff;
  font-size: 0.9rem;
}

.yt-search-input:focus {
  outline: none;
  border-color: #1c62b9;
}

.yt-search-btn {
  background: #222222;
  border: 1px solid #303030;
  border-left: none;
  border-radius: 0 20px 20px 0;
  padding: 0.5rem 1.1rem;
  color: #fff;
  cursor: pointer;
}

.yt-search-btn:hover {
  background: #303030;
}

/* APP CONTAINER LAYOUT */
.yt-app-container {
  max-width: 1600px;
  margin: 1.25rem auto;
  padding: 0 1rem;
}

.yt-layout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .yt-layout-grid {
    grid-template-columns: 1fr 380px;
    align-items: start;
  }
}

@media (min-width: 1400px) {
  .yt-layout-grid {
    grid-template-columns: 1fr 440px;
  }
}

.yt-main-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.yt-sidebar-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 75px;
}

/* 📺 PANTALLA CINEMÁTICA DE AUDIO TIPO YOUTUBE */
.yt-player-card {
  padding: 0 !important;
  background: #0f0f0f !important;
  border: 1px solid #272727 !important;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.9);
}

.yt-screen-container {
  display: flex;
  flex-direction: column;
  background: #000;
}

.yt-cinema-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8;
  min-height: 260px;
  background: #050505;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid #222;
}

.yt-screen-ambient {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 0, 0, 0.12) 0%, rgba(5, 5, 5, 0.95) 75%);
  transition: all 0.5s ease;
}

.yt-cinema-screen.playing .yt-screen-ambient {
  background: radial-gradient(circle, rgba(255, 0, 0, 0.22) 0%, rgba(10, 10, 10, 0.98) 70%);
  animation: ytPulseGlow 3s infinite alternate;
}

@keyframes ytPulseGlow {
  0% { opacity: 0.7; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05); }
}

.yt-screen-top-bar {
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.yt-status-tag {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  color: #ff3333;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 0, 0, 0.3);
  letter-spacing: 0.5px;
}

.yt-model-tag {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  color: #3ea6ff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  border: 1px solid rgba(62, 166, 255, 0.3);
}

.yt-overlay-play-btn {
  position: relative;
  z-index: 15;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255, 0, 0, 0.85);
  color: #fff;
  font-size: 1.8rem;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 8px 25px rgba(255, 0, 0, 0.5);
  padding-left: 4px;
}

.yt-overlay-play-btn:hover {
  transform: scale(1.12);
  background: #ff0000;
  box-shadow: 0 10px 30px rgba(255, 0, 0, 0.8);
}

/* 💬 SUBTÍTULOS EN PANTALLA TIPO YOUTUBE (CC OVERLAY) */
.yt-cc-overlay {
  position: absolute;
  bottom: 15px;
  left: 20px;
  right: 20px;
  z-index: 20;
  display: flex;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.yt-cc-overlay.hidden-cc {
  opacity: 0;
  visibility: hidden;
}

.yt-cc-box {
  background: rgba(8, 8, 8, 0.88);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.6rem 1.2rem;
  max-width: 90%;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.8);
}

.yt-cc-speaker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #ffeb3b;
  background: rgba(255, 235, 59, 0.15);
  border: 1px solid rgba(255, 235, 59, 0.4);
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.3rem;
  letter-spacing: 0.5px;
}

.yt-cc-text {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.4;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
  font-family: 'Inter', sans-serif;
}

/* INFORMACIÓN DEL VIDEO Y CONTROLES */
.yt-video-info {
  padding: 1.25rem 1.5rem 0.5rem 1.5rem;
  background: #0f0f0f;
}

.yt-video-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #f1f1f1;
  margin-bottom: 0.4rem;
}

.yt-video-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #aaa;
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.yt-model-select-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.yt-scrubber-box {
  padding: 0.5rem 1.5rem;
  background: #0f0f0f;
}

.waveform-container {
  height: 60px !important;
  background: #181818 !important;
  border-radius: 6px !important;
}

.yt-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem 1.25rem 1.5rem;
  background: #0f0f0f;
  border-top: 1px solid #222;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.yt-left-controls, .yt-right-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.yt-ctrl-btn {
  background: #222;
  border: 1px solid #333;
  color: #fff;
  padding: 0.4rem 0.75rem;
  border-radius: 18px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.yt-ctrl-btn:hover {
  background: #3f3f3f;
}

.yt-play-btn {
  background: #ff0000 !important;
  border-color: #ff0000 !important;
  padding: 0.45rem 1rem !important;
}

.yt-play-btn:hover {
  background: #cc0000 !important;
}

.yt-time-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: #aaa;
  margin-left: 0.4rem;
}

.yt-speed-select {
  background: #222;
  border: 1px solid #333;
  color: #fff;
  padding: 0.38rem 0.6rem;
  border-radius: 18px;
  font-size: 0.82rem;
}

.yt-cc-btn.active {
  background: #3ea6ff;
  color: #000;
  border-color: #3ea6ff;
  font-weight: 800;
}

/* PESTAÑAS SECCIONES INFERIORES */
.yt-tabs-container {
  background: #181818;
  border: 1px solid #272727;
  border-radius: var(--radius-lg);
  padding: 1.25rem !important;
}

.yt-section-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid #272727;
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
}

.yt-sec-tab {
  background: #222222;
  border: 1px solid #333;
  color: #aaa;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.yt-sec-tab:hover {
  background: #303030;
  color: #fff;
}

.yt-sec-tab.active {
  background: #fff;
  color: #000;
  border-color: #fff;
}

/* SIDEBAR YOUTUBE TRANSCRIPT & PLAYLIST */
.yt-sidebar-card {
  background: #181818 !important;
  border: 1px solid #272727 !important;
  border-radius: var(--radius-lg);
  padding: 1.25rem !important;
}

.transcript-card {
  max-height: 700px;
  display: flex;
  flex-direction: column;
}

.transcript-results {
  overflow-y: auto;
  max-height: 520px;
  padding-right: 0.3rem;
}

.segment-card {
  background: #222222 !important;
  border: 1px solid #333 !important;
  border-left: 4px solid #555 !important;
  border-radius: 8px !important;
  padding: 0.75rem 0.9rem !important;
  margin-bottom: 0.6rem;
  transition: all 0.2s ease;
}

.segment-card:hover {
  background: #2a2a2a !important;
  border-left-color: #3ea6ff !important;
}

.segment-card.active-segment {
  background: rgba(62, 166, 255, 0.15) !important;
  border-left: 5px solid #3ea6ff !important;
  box-shadow: 0 4px 15px rgba(62, 166, 255, 0.2);
}

.history-card {
  max-height: none;
  overflow: visible;
}

code {
  background: #1e293b;
  color: #38bdf8;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
}

option {
  background-color: #0f172a;
  color: #f8fafc;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  padding: 2rem 1rem;
}

.app-container {
  max-width: 98%;
  margin: 0 auto;
}

.app-header {
  text-align: center;
  margin-bottom: 2rem;
}

.header-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #a78bfa;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}

.app-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #60a5fa, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 680px;
  margin: 0 auto;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}


.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--card-border);
}

.card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

/* Pestañas de Modo (Grabar vs Subir) */
.mode-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border: none;
  background: transparent;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  background: #1e293b;
  color: var(--text-main);
}

.tab-btn.active {
  background: var(--accent-light);
  color: #38bdf8;
  border: 1px solid var(--accent-border);
}

.mode-container {
  display: flex;
  flex-direction: column;
}

/* Zona de Carga de Archivos (Dropzone) */
.dropzone {
  position: relative;
  border: 2px dashed #334155;
  background: #090e1a;
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropzone:hover, .dropzone.dragover {
  background: rgba(59, 130, 246, 0.08);
  border-color: var(--primary);
}

.hidden-file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 5;
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.dropzone-icon {
  font-size: 2.75rem;
  margin-bottom: 0.2rem;
}

.dropzone-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-main);
}

.dropzone-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.file-types-badge {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #94a3b8;
  background: #1e293b;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
}

/* Caja de Info de Archivo Seleccionado */
.file-info-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #090e1a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.2rem;
  margin-top: 1rem;
}

.file-icon {
  font-size: 2rem;
}

.file-details {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.file-details strong {
  font-size: 0.95rem;
  color: var(--text-main);
  word-break: break-all;
}

.file-details small {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.btn-remove-file {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
}

.btn-remove-file:hover {
  background: #1e293b;
  color: var(--danger);
}

/* Estado y Timer */
.recording-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #090e1a;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-color);
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #94a3b8;
}

.status-idle .status-dot { background: #94a3b8; }

.status-recording {
  color: var(--danger);
}
.status-recording .status-dot {
  background: var(--danger);
  animation: pulse 1.2s infinite;
}

.status-paused {
  color: #f59e0b;
}
.status-paused .status-dot {
  background: #f59e0b;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.timer-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 1px;
}

/* Selector de Perfil de Micrófono */
.mic-profile-selector {
  margin-bottom: 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid #272738;
  border-radius: 12px;
  padding: 0.85rem 1rem;
}

/* Selector de Fuente de Audio (Micrófono, Mixto, Computadora) */
.audio-source-selector {
  margin-bottom: 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid #272738;
  border-radius: 12px;
  padding: 0.85rem 1rem;
}

.audio-source-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.65rem;
}

.audio-source-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  background: #181824;
  border: 1.5px solid #2e2e42;
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-main);
  position: relative;
}

.audio-source-card .prof-icon {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.audio-source-card .prof-text strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.2;
}

.audio-source-card .prof-text small {
  display: block;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.25rem;
  line-height: 1.25;
}

.audio-source-card:hover {
  background: #222232;
  border-color: #475569;
  transform: translateY(-1px);
}

.audio-source-card.active {
  background: linear-gradient(135deg, rgba(224, 49, 38, 0.15), rgba(56, 189, 248, 0.08));
  border-color: #e03126;
  box-shadow: 0 0 14px rgba(224, 49, 38, 0.25);
}

.audio-source-card.active .prof-text strong {
  color: #ff6b6b;
}

.mic-profile-title {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.mic-profile-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
}

.mic-profile-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  background: #181824;
  border: 1.5px solid #2e2e42;
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-main);
  position: relative;
}

.mic-profile-card .prof-icon {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.mic-profile-card .prof-text strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.2;
}

.mic-profile-card .prof-text small {
  display: block;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.25rem;
  line-height: 1.25;
}

.mic-profile-card:hover {
  background: #222232;
  border-color: #475569;
  transform: translateY(-1px);
}

.mic-profile-card.active {
  background: linear-gradient(135deg, rgba(224, 49, 38, 0.15), rgba(239, 68, 68, 0.06));
  border-color: #e03126;
  box-shadow: 0 0 14px rgba(224, 49, 38, 0.25);
}

.mic-profile-card.active .prof-text strong {
  color: #ff6b6b;
}

/* Tabs inline para el panel de filtros */
.mic-profile-inline-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.mic-inline-pill {
  background: #181824;
  border: 1px solid #334155;
  color: #cbd5e1;
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mic-inline-pill:hover {
  background: #242436;
  color: #fff;
}

.mic-inline-pill.active {
  background: #e03126;
  color: #fff;
  border-color: #e03126;
  box-shadow: 0 0 10px rgba(224, 49, 38, 0.35);
}

/* Panel de Audio Listo & Pregunta de Acción */
.audio-ready-panel {
  background: linear-gradient(145deg, #141420, #0d0d16);
  border: 1.5px solid #22c55e;
  border-radius: 14px;
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(34, 197, 94, 0.15);
  animation: fadeInDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.audio-ready-banner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ready-icon-pulse {
  font-size: 2rem;
  line-height: 1;
}

.ready-info h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #4ade80;
  margin-bottom: 0.2rem;
}

.ready-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.modal-preview-player-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1e1e2d;
  border: 1px solid #333348;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.modal-listen-btn {
  background: #28283c;
  color: #f1f5f9;
  border: 1px solid #474760;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
}

.modal-listen-btn:hover {
  background: #363652;
  color: #fff;
  border-color: #6366f1;
}

.modal-audio-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: #94a3b8;
}

.ready-prompt-question {
  font-size: 0.95rem;
  color: #f1f5f9;
  margin-bottom: 0.85rem;
  text-align: center;
}

.ready-action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.btn-action-transcribe {
  grid-column: 1 / -1;
  background: #e03126 !important;
  color: #fff !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  padding: 0.75rem 1rem !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 15px rgba(224, 49, 38, 0.4) !important;
  cursor: pointer;
}

.btn-action-transcribe:hover {
  background: #ff4d4d !important;
  transform: translateY(-1px);
}

/* Filtros Web Audio API */
.audio-filters-panel {
  background: #090e1a;
  border: 1px dashed var(--border-color);
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
}

.audio-filters-panel h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.filter-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
}

.filter-toggle input[type="checkbox"] {
  margin-top: 0.2rem;
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

.toggle-label strong {
  display: block;
  font-size: 0.85rem;
}

.toggle-label small {
  display: block;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.filter-gain {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.filter-gain label {
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
}

.filter-gain input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

/* Botones */
.controls-group {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }

.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover:not(:disabled) { background: var(--secondary-hover); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: var(--danger-hover); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover:not(:disabled) { background: var(--success-hover); }

.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover:not(:disabled) { background: var(--accent-hover); }

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
}

.btn-outline {
  background: #1e293b;
  border: 1px solid #334155;
  color: var(--text-main);
}
.btn-outline:hover:not(:disabled) {
  background: #334155;
  color: #fff;
}

/* Vista Previa Audio (Reproductor Flotante Fase 2) */
.audio-output-section {
  position: sticky;
  top: 15px; /* Distancia del borde superior de la ventana */
  z-index: 100;
  background: var(--bg-card);
  padding: 15px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 1.25rem 0;
}

/* WaveSurfer (Mapa de Audio) */
.waveform-container {
  width: 100%;
  height: 80px;
  background: #090e1a;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border: 1px solid var(--border-color);
  border-bottom: none;
  overflow: hidden;
  position: relative;
}

#waveform-timeline {
  width: 100%;
  height: 20px;
  background: #050810;
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  margin-bottom: 1rem;
}

.waveform-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.model-selection-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #090e1a;
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.model-selection-bar label {
  font-size: 0.9rem;
  color: var(--text-main);
}

.model-select, .custom-model-input {
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid #334155;
  font-size: 0.88rem;
  background: #1e293b;
  color: #f8fafc;
}

.model-select:focus, .custom-model-input:focus {
  outline: 2px solid var(--primary);
  border-color: transparent;
}

.custom-model-input {
  flex: 1;
  min-width: 180px;
}

.audio-output-section h3 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.audio-output-section audio {
  width: 100%;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  filter: invert(0.9) hue-rotate(180deg);
}

.action-bar {
  display: flex;
  justify-content: flex-end;
}

/* Visualizador de Audio (Canvas & dB Meter) */
.visualizer-container {
  background: #090e1a;
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--card-border);
}

.visualizer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.visualizer-title {
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.db-value-badge {
  background: #1e293b;
  color: #38bdf8;
  font-family: monospace;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
}

.visualizer-canvas {
  width: 100%;
  height: 120px;
  display: block;
  border-radius: var(--radius-sm);
  background: #090e1a;
}

.db-meter-bar-container {
  width: 100%;
  height: 8px;
  background: #1e293b;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.db-meter-fill {
  height: 100%;
  width: 0%;
  background: #10b981;
  transition: width 0.08s ease, background-color 0.15s ease;
}

/* Barra de Progreso de Transcripción */
.progress-bar-box {
  background: #090e1a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  font-size: 0.88rem;
}

.progress-step-text {
  font-weight: 600;
  color: #60a5fa;
}

.progress-percent-text {
  font-family: monospace;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-main);
}

.progress-track {
  width: 100%;
  height: 10px;
  background: #1e293b;
  border-radius: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 6px;
  transition: width 0.3s ease;
}

/* Transcripción Header & Acciones */
.transcript-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.transcript-header h2 {
  margin-bottom: 0;
}

.transcript-actions {
  display: flex;
  gap: 0.5rem;
}

/* Dropdown de Exportación */
.export-dropdown {
  position: relative;
  display: inline-block;
}

.export-menu-options {
  position: absolute;
  right: 0;
  top: 110%;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.7);
  z-index: 50;
  min-width: 260px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.export-item {
  background: transparent;
  border: none;
  text-align: left;
  padding: 0.75rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.15s ease;
}

.export-item:hover {
  background: #334155;
  color: #60a5fa;
}

/* Tabs de Vista de Transcripción */
.view-tabs {
  display: flex;
  gap: 0.5rem;
  background: #090e1a;
  padding: 0.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
}

.view-tab {
  flex: 1;
  padding: 0.55rem 0.8rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.view-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.view-tab.active {
  background: #1e293b;
  color: #38bdf8;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Efecto Karaoke en el panel de Segmentos */
.segment-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.9rem;
  background: #111827;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--border-dark);
  transition: all 0.3s ease;
}

.segment-card:hover {
  background: #1f2937;
  transform: translateX(4px);
}

.segment-card.active-segment {
  background: rgba(59, 130, 246, 0.15); /* Fondo azul tenue */
  border-left: 5px solid var(--primary);
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

/* Efecto visual al filtrar hablantes en panel lateral */
.active-speaker-filter {
  background: rgba(59, 130, 246, 0.2) !important;
  border-color: var(--primary) !important;
}

/* Panel de Filtro por Hablante */
.speaker-filter-panel {
  background: #090e1a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.25rem;
}

.speaker-filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.speaker-filter-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
}

.speaker-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.speaker-filter-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #131c31;
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.speaker-filter-item:hover {
  border-color: #475569;
}

.speaker-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.speaker-color-dot-lg {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.speaker-filter-label {
  display: flex;
  flex-direction: column;
}

.speaker-rename-input {
  background: transparent;
  border: none;
  border-bottom: 1px dashed #475569;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.85rem;
  width: 100px;
  outline: none;
}

.speaker-rename-input:focus {
  border-bottom-color: var(--primary);
}

.speaker-filter-label small {
  color: var(--text-muted);
  font-size: 0.7rem;
}

/* Transcripción Metadata */
.transcript-meta {
  display: flex;
  gap: 1rem;
  background: #090e1a;
  border: 1px solid var(--accent-border);
  padding: 0.75rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  color: #93c5fd;
  flex-wrap: wrap;
}

/* VISTA 1: Timeline Minuto a Minuto */
.segments-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.minute-group {
  border-left: 2px solid #1e293b;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  position: relative;
  transition: border-color 0.2s ease;
}

.minute-group.active-minute {
  border-left-color: var(--primary);
}

.minute-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.minute-jump-btn {
  background: #1e293b;
  color: #38bdf8;
  border: 1px solid #334155;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-sm);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.minute-jump-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.minute-segment-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.segment-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  border-left-width: 4px;
  background: #090e1a;
  transition: all 0.2s ease;
}

.segment-card:hover {
  background: #111a2e;
  border-color: #334155;
}

.segment-card.active-segment {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.segment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.speaker-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid;
  letter-spacing: 0.3px;
}

.timestamp-btn {
  background: #1e293b;
  color: #94a3b8;
  border: 1px solid #334155;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.timestamp-btn:hover {
  background: var(--primary);
  color: #fff;
}

.segment-text {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.6;
}

/* VISTA 2: Por Hablante */
.by-speaker-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.speaker-section {
  background: #090e1a;
  border: 1px solid var(--border-color);
  border-left-width: 4px;
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.speaker-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.speaker-section-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.1rem;
}

.speaker-description {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-style: italic;
}

.speaker-stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.speaker-participation-bar {
  width: 80px;
  height: 6px;
  background: #1e293b;
  border-radius: 3px;
  overflow: hidden;
}

.speaker-participation-fill {
  height: 100%;
}

.speaker-segments-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.speaker-segment-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.speaker-segment-item:last-child {
  border-bottom: none;
}

.timestamp-btn-small {
  background: #1e293b;
  color: #38bdf8;
  border: 1px solid #334155;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.72rem;
  cursor: pointer;
  white-space: nowrap;
}

.timestamp-btn-small:hover {
  background: var(--primary);
  color: #fff;
}

.speaker-segment-item p {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-main);
}

/* VISTA 3: Texto Completo */
.full-text-container {
  background: #090e1a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  line-height: 1.8;
}

.full-text-speaker-line {
  margin-top: 1rem;
  margin-bottom: 0.25rem;
}

.speaker-badge-inline {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid;
}

.full-text-segment {
  font-size: 0.95rem;
  color: var(--text-main);
}

.full-text-plain {
  font-size: 0.95rem;
  white-space: pre-wrap;
}

/* PANEL 3: Resumen Inteligente con IA */
.summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.summary-header h2 {
  margin-bottom: 0;
}

.summary-results {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.summary-listen-panel { background: linear-gradient(135deg, rgba(99,102,241,.14), rgba(14,165,233,.08)); border: 1px solid rgba(129,140,248,.38); border-radius: var(--radius-md); padding: 1rem; }
.summary-listen-heading { display: flex; align-items: center; gap: .65rem; margin-bottom: .8rem; }
.summary-listen-heading > span { font-size: 1.4rem; }
.summary-listen-heading strong, .summary-listen-heading small { display: block; }
.summary-listen-heading small, .summary-voice-status { color: var(--text-muted); font-size: .82rem; }
.summary-listen-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.summary-listen-controls label { font-size: .84rem; color: var(--text-muted); }
.summary-voice-select { min-height: 2.35rem; background: #151a29; border: 1px solid var(--border-color); border-radius: var(--radius-sm); color: var(--text-main); padding: .35rem .55rem; }
.summary-voice-status { min-height: 1.2rem; margin: .65rem 0 0; }
.summary-audio-player { width: 100%; margin-top: .45rem; }
@media (max-width: 640px) { .summary-listen-controls { align-items: stretch; } .summary-listen-controls label { display: none; } .summary-voice-select, .summary-listen-controls button { width: 100%; } }

.summary-section {
  background: #090e1a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.summary-section h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #60a5fa;
  margin-bottom: 0.85rem;
}

.summary-executive-text p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}
.summary-executive-text p:last-child {
  margin-bottom: 0;
}

.summary-key-points {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.summary-key-points li {
  font-size: 0.92rem;
  color: var(--text-main);
  line-height: 1.5;
}

.summary-topics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
}

.summary-topic-card {
  background: #131c31;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  transition: all 0.15s ease;
}

.summary-topic-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.topic-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.topic-header strong {
  font-size: 0.9rem;
  color: var(--text-main);
}

.topic-minute-badge {
  background: #1e293b;
  color: #38bdf8;
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-family: monospace;
}

.topic-description {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.summary-actions-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.summary-action-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: #131c31;
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
}

.action-checkbox {
  color: var(--success);
  font-weight: 800;
  font-size: 1rem;
  margin-top: 0.1rem;
}

.action-desc {
  font-size: 0.9rem;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.action-assignee {
  font-size: 0.78rem;
  color: #a78bfa;
}

.participants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.participant-card {
  background: #131c31;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.participant-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.participant-header strong {
  font-size: 0.9rem;
}

.participant-role-badge {
  font-size: 0.7rem;
  background: rgba(139, 92, 246, 0.2);
  color: #c084fc;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
}

.participant-summary {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* HISTORIAL Y LOGS */
.empty-state, .loading-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 2.75rem;
  display: block;
  margin-bottom: 0.5rem;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

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

.history-header, .logs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.history-header h2, .logs-header h2 {
  margin-bottom: 0;
}

.history-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-danger-text:hover {
  color: var(--danger);
  border-color: var(--danger);
}

.history-table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.history-table th, .history-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.history-table th {
  background: #090e1a;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.history-table tr:hover {
  background: #090e1a;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-failed {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-processing {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Logs */
.logs-body {
  margin-top: 1rem;
}

.logs-pre {
  background: #090e1a;
  color: #38bdf8;
  padding: 1rem;
  border-radius: var(--radius-md);
  font-family: monospace;
  font-size: 0.8rem;
  max-height: 300px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.logs-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.hidden {
  display: none !important;
}

/* LOGIN SCREEN */
.login-screen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--rec-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.login-box {
  max-width: 400px;
  width: 90%;
  padding: 3rem 2rem;
  background-color: var(--rec-surface);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border-radius: 12px;
}

/* 📄 ESTILOS PARA CARGA Y VISUALIZACIÓN DE DOCUMENTOS */
.doc-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 0.5rem;
}

@media (max-width: 768px) {
  .doc-upload-grid {
    grid-template-columns: 1fr;
  }
}

.doc-upload-box {
  background: #15151e;
  border: 1px solid #2e2e3e;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.gdoc-box {
  background: linear-gradient(145deg, #15151e, #111a2e);
  border-color: rgba(66, 133, 244, 0.35);
}

.doc-dropzone {
  padding: 1.75rem 1rem !important;
  border-color: #3b3b4f !important;
}

.doc-dropzone:hover {
  border-color: #60a5fa !important;
  background: rgba(96, 165, 250, 0.08) !important;
}

.gdoc-input:focus {
  border-color: #4285f4 !important;
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.25);
}

.document-reader-view {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 0.5rem;
}

.document-text-paragraph {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #e2e8f0;
  margin-bottom: 1.25rem;
  text-align: justify;
}

.document-text-paragraph:last-child {
  margin-bottom: 0;
}

.is-document-card {
  border-left: 3px solid #38bdf8 !important;
}

.is-document-card:hover {
  border-left-color: #60a5fa !important;
}

