* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: #0b0b0f;
  color: #e8e8ec;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.oculto { display: none !important; }

.vista {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* --- perfil --- */

#vista-perfil {
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.titulo-perfil {
  font-size: 1.4rem;
  font-weight: 500;
  color: #aaa;
}

.botones-perfil {
  display: flex;
  gap: 20px;
}

.btn-perfil {
  font-size: 1.2rem;
  padding: 20px 32px;
  border-radius: 16px;
  border: 1px solid #333;
  background: #17171d;
  color: #e8e8ec;
  cursor: pointer;
}

.btn-perfil:active {
  background: #23232b;
}

/* --- principal --- */

.cabecera {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  color: #6b6b76;
  font-size: 0.85rem;
}

.perfil-actual { text-transform: capitalize; }

.estado-hoy.grabado { color: #4ade80; }

.banner-pendientes {
  margin: 0 16px 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #3a2a12;
  color: #f0c674;
  font-size: 0.85rem;
  text-align: center;
}

.zona-boton {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.nivel-audio-wrap {
  width: 70%;
  max-width: 320px;
  height: 8px;
  border-radius: 4px;
  background: #17171d;
  overflow: hidden;
}

.nivel-audio {
  height: 100%;
  width: 0%;
  background: #4ade80;
  transition: width 60ms linear;
}

.btn-grabar {
  width: 55vw;
  height: 55vw;
  max-width: 260px;
  max-height: 260px;
  min-width: 180px;
  min-height: 180px;
  border-radius: 50%;
  border: none;
  background: radial-gradient(circle at 35% 30%, #3b3b46, #202027);
  box-shadow: 0 0 0 6px #1a1a20, 0 12px 30px rgba(0,0,0,0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms ease;
}

.btn-grabar.grabando {
  background: radial-gradient(circle at 35% 30%, #c0392b, #7a1f16);
  box-shadow: 0 0 0 6px #2a1210, 0 0 40px rgba(220,60,40,0.5);
  animation: pulso 1.4s ease-in-out infinite;
}

@keyframes pulso {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.icono-mic {
  width: 34%;
  height: 34%;
  border-radius: 40% / 30%;
  background: #e8e8ec;
}

.btn-grabar.grabando .icono-mic {
  border-radius: 6px;
  background: #fff;
}

.contador {
  font-variant-numeric: tabular-nums;
  font-size: 1.4rem;
  color: #ddd;
  letter-spacing: 1px;
}

.mensaje-estado {
  min-height: 1.2em;
  font-size: 0.9rem;
  color: #8a8a94;
  text-align: center;
  padding: 0 24px;
}

.pie {
  text-align: center;
  padding: 20px;
}

.link-historial {
  color: #55555f;
  font-size: 0.8rem;
  text-decoration: none;
}

/* --- historial --- */

.cabecera-historial {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #1c1c22;
  font-weight: 500;
}

.link-volver {
  color: #8a8a94;
  text-decoration: none;
  font-size: 0.9rem;
}

.lista-historial {
  list-style: none;
  margin: 0;
  padding: 8px 16px;
  overflow-y: auto;
}

.item-historial {
  padding: 14px 4px;
  border-bottom: 1px solid #17171d;
}

.item-historial .cabecera-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #6b6b76;
  margin-bottom: 6px;
}

.item-historial .estado-badge {
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.item-historial .estado-badge.pendiente { color: #f0c674; }
.item-historial .estado-badge.transcrito { color: #4ade80; }
.item-historial .estado-badge.error { color: #e05d5d; }

.item-historial .texto {
  font-size: 0.95rem;
  color: #d5d5dc;
  line-height: 1.4;
}
