:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --surface-hover: #243044;
  --border: #2d3a4f;
  --text: #e7ecf3;
  --muted: #8b9cb3;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --ok: #8dcf9c;
  --warn: #81730f;
  --pending: #64748b;
}


* {
  box-sizing: border-box;
  font-family: "Arimo", sans-serif, sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
}

.header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.header h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
}

.subtitle {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.form-subida {
  display: inline;
  margin: 0;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

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

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

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--surface-hover);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-warning {
  background: var(--warn);
  color: #fef3c7;
  border: 1px solid #b45309;
}

.btn-warning:hover:not(:disabled) {
  background: #92400e;
}

.progreso {
  padding: 0.75rem 1.5rem;
  background: #172554;
  border-bottom: 1px solid var(--border);
}

.progreso.oculto {
  display: none;
}

.progreso-texto {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.barra {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.barra-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.3s ease;
}

.layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  min-height: 0;
}

@media (max-width: 768px) {
  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
}

.lista-panel {
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 1rem;
}

.lista-panel h2 {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.lista-audios {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lista-audios li button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.35rem;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.lista-audios li button:hover {
  background: var(--surface-hover);
}

.lista-audios li button.activo {
  background: var(--surface-hover);
  border-color: var(--accent);
}

.item-nombre {
  display: block;
  font-size: 0.8rem;
  word-break: break-all;
  line-height: 1.3;
}

.item-estado {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.item-estado.ok {
  background: #14532d;
  color: #e1f4e8;
}

.item-estado.pendiente {
  background: #1e293b;
  color: white;
}

.lista-vacia {
  color: var(--muted);
  font-size: 0.875rem;
}

.detalle-panel {
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
}

.placeholder {
  color: var(--muted);
  padding: 2rem 0;
}

.detalle.oculto,
.oculto {
  display: none !important;
}

.detalle h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  word-break: break-all;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.badge.ok {
  background: #14532d;
  color: #86efac;
}

.badge.pendiente {
  background: #334155;
  color: #cbd5e1;
}

#reproductor {
  width: 100%;
  margin-bottom: 0.5rem;
}

.aviso-audio {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: #fca5a5;
}

.detalle h3 {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.transcripcion-texto {
  line-height: 1.65;
  font-size: 0.95rem;
  white-space: pre-wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.15rem;
}

.footer {
  padding: 0.6rem 1.5rem;
  font-size: 0.75rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

#detalle-texto p{
  font-size: 1.3rem;
  text-align: justify;
}