:root {
  --fondo: #f5f6f8; --tarjeta: #fff; --texto: #1d2430; --suave: #667085; --borde: #e3e6ea;
  --primario: #1f3a5f; --acento: #e4572e; --ok: #1a7f4b; --alerta: #b54708; --error: #b42318;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --fondo: #12161c; --tarjeta: #1b2129; --texto: #e7eaee; --suave: #98a2b3; --borde: #2b333d; --primario: #7aa7e0; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--fondo); color: var(--texto); }
a { color: var(--primario); }
h1 { font-size: 1.5rem; margin: 0 0 .25rem; } h2 { font-size: 1.15rem; margin: 1.5rem 0 .5rem; } h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
.suave { color: var(--suave); } .pequeno { font-size: .85rem; } .oculto { display: none !important; }

.barra { display: flex; justify-content: space-between; align-items: center; padding: .7rem 1.2rem; background: var(--tarjeta); border-bottom: 1px solid var(--borde); position: sticky; top: 0; z-index: 2; }
.marca { display: flex; gap: .5rem; align-items: center; font-weight: 600; color: var(--texto); text-decoration: none; }
.marca img { width: 28px; height: 28px; }
.usuario { font-size: .9rem; color: var(--suave); }
.contenido { max-width: 920px; margin: 0 auto; padding: 1.2rem; }

.tarjeta { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 12px; padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.boton { display: inline-block; border: 1px solid var(--borde); background: var(--tarjeta); color: var(--texto); padding: .55rem 1rem; border-radius: 8px; font: inherit; cursor: pointer; text-decoration: none; }
.boton:hover { filter: brightness(.97); } .boton:disabled { opacity: .5; cursor: default; }
.boton.primario { background: var(--primario); border-color: var(--primario); color: #fff; }
.boton.grabar { background: var(--acento); border-color: var(--acento); color: #fff; font-weight: 600; }
.boton.texto { border: 0; background: none; color: var(--primario); padding: .2rem .4rem; }
input[type=text] { width: 100%; padding: .6rem .7rem; border: 1px solid var(--borde); border-radius: 8px; font: inherit; background: var(--fondo); color: var(--texto); }
label.check { display: flex; gap: .5rem; align-items: center; margin: .7rem 0; }
.fila { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }

.lista { list-style: none; padding: 0; margin: 0; }
.lista li { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-top: 1px solid var(--borde); }
.lista li:first-child { border-top: 0; }
.lista a.titulo { font-weight: 600; text-decoration: none; color: var(--texto); }
.estado { font-size: .8rem; padding: .1rem .5rem; border-radius: 99px; background: var(--fondo); border: 1px solid var(--borde); white-space: nowrap; }
.estado.lista { color: var(--ok); } .estado.error { color: var(--error); } .estado.grabando { color: var(--acento); }

.pasos { margin: .5rem 0 0 1.1rem; padding: 0; color: var(--suave); }
.aviso { background: #fff4e5; color: #7a3e00; border: 1px solid #f5c88a; padding: .6rem .8rem; border-radius: 8px; }
.aviso.error { background: #fde8e7; color: var(--error); border-color: #f4b4ae; }
@media (prefers-color-scheme: dark) { .aviso { background: #3a2a12; color: #f5c88a; border-color: #6b4a1a; } .aviso.error { background: #3a1614; color: #f4b4ae; border-color: #6b2622; } }

.grabacion { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; }
.reloj { font-size: 2rem; font-variant-numeric: tabular-nums; font-weight: 600; }
.punto { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; background: var(--acento); margin-right: .4rem; animation: latido 1.2s infinite; }
@keyframes latido { 50% { opacity: .3; } }
.medidor { display: grid; grid-template-columns: 7.5rem 1fr; gap: .5rem; align-items: center; margin: .3rem 0; font-size: .85rem; color: var(--suave); }
.medidor .barra-nivel { height: 8px; background: var(--fondo); border-radius: 99px; overflow: hidden; border: 1px solid var(--borde); }
.medidor .nivel { height: 100%; width: 0; background: var(--ok); transition: width .1s; }
.envivo { max-height: 320px; overflow-y: auto; white-space: pre-wrap; background: var(--fondo); border-radius: 8px; padding: .7rem; font-size: .92rem; }

.tareas { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tareas th, .tareas td { text-align: left; padding: .45rem; border-bottom: 1px solid var(--borde); vertical-align: top; }
.transcripcion p { margin: .35rem 0; } .transcripcion b { color: var(--primario); }
.capturas { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .6rem; }
.capturas a { display: block; } .capturas img { width: 100%; border-radius: 6px; border: 1px solid var(--borde); }
.capturas span { font-size: .8rem; color: var(--suave); }

.entrar { display: grid; place-items: center; min-height: 100vh; }
.tarjeta-entrar { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 16px; padding: 2.2rem 2.5rem; text-align: center; max-width: 360px; }
.logo-grande { width: 64px; height: 64px; }
.tarjeta-entrar .boton { margin: 1rem 0 .5rem; }
.video-oculto { position: fixed; left: 0; bottom: 0; width: 2px; height: 2px; opacity: 0; pointer-events: none; }
