/* Terra Admin: colores del tema Terra de Terra Control (negro, blanco, azul #1677D2 y amarillo #FFD21F). */
:root {
  --bg: #0B0B0C; --surface: #17181B; --raised: #202125; --hover: #2A2C31;
  --border: #2C2D32; --border2: #3E4047;
  --t1: #FFFFFF; --t2: #B9BDC5; --t3: #80848D; --t4: #55585F;
  --accent: #1677D2; --accentS: #0F2640; --brand: #FFD21F;
  --ok: #45C26F; --okS: #132B1C; --warn: #FFD21F; --warnS: #352C06;
  --err: #EF5350; --errS: #3A1717; --neuS: #222328;
  --fixed: #5AA8F5; --fixedS: #0F2640; --acct: #A487E6; --acctS: #251D3A; --maint: #B4386A;
  --z1: #1677D2; --z2: #8457CF; --z3: #B0740F; --z4: #138377; --z5: #BC4677; --z6: #46863A;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--t1); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
#app { max-width: 560px; margin: 0 auto; }
.vista { min-height: 100vh; padding-bottom: 24px; }
.vista.con-barra { padding-bottom: 96px; }
.centro { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.centro-texto { text-align: center; }
.tenue { color: var(--t3); }
.sec { color: var(--t2); }
.nota { color: var(--t3); font-size: 12px; line-height: 1.45; margin-top: 14px; }

.hero { padding: 26px 22px 10px; text-align: center; }
.hero-alto { padding-top: 60px; }
.hero h1 { margin: 12px 0 4px; font-size: 21px; }
.hero p { margin: 0; font-size: 14px; line-height: 1.45; }
.logo-grande { width: 76px; height: 76px; }

.seccion { padding: 0 14px; margin: 14px 0; }
.seccion-borde { margin: 0 14px 14px; }
.seccion h4, .titulo-seccion { margin: 0 0 8px; font-size: 12px; letter-spacing: .6px; text-transform: uppercase; color: var(--t3); }
.caja { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.info { display: flex; gap: 10px; font-size: 13px; color: var(--t2); background: var(--accentS); border: 1px solid #1b3a5e; border-radius: 12px; padding: 11px 12px; line-height: 1.4; }
.info.dorado { background: var(--warnS); border-color: #5a4a0a; color: #ffe27a; }
.caja-roja { background: var(--errS); border: 1px solid #5a2323; border-radius: 12px; padding: 11px 12px; font-size: 13px; color: #ffb3b1; line-height: 1.4; }
.caja-verde { background: var(--okS); border: 1px solid #245a36; border-radius: 12px; padding: 11px 12px; font-size: 13px; color: #b9efc9; line-height: 1.4; }
.caja-roja b, .caja-verde b { color: var(--t1); }

.campo { display: block; margin-bottom: 12px; font-size: 12px; color: var(--t2); }
.campo input, .campo select, .campo textarea { display: block; width: 100%; margin-top: 5px; background: var(--surface); border: 1px solid var(--border2); border-radius: 10px; padding: 13px 12px; font-size: 16px; color: var(--t1); }
.campo textarea { resize: vertical; min-height: 90px; line-height: 1.45; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.boton { display: block; width: 100%; text-align: center; padding: 15px; border-radius: 12px; background: var(--accent); font-weight: 600; font-size: 15px; border: 0; color: #fff; cursor: pointer; }
.boton:disabled { opacity: .55; }
.boton.gris { background: var(--raised); border: 1px solid var(--border2); }
.boton.verde { background: var(--ok); color: #000; }
.boton.chico { display: inline-block; width: auto; padding: 10px 14px; font-size: 14px; }
.fila-botones { display: flex; gap: 8px; }
.fila-botones .boton { flex: 1; }
.aviso-linea { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--warnS); color: #ffe27a; font-size: 13px; line-height: 1.4; }
.aviso-linea.rojo { background: var(--errS); color: #ffb3b1; }

/* Encabezado */
.arriba { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); background: rgba(11, 11, 12, .94); backdrop-filter: blur(6px); }
.arriba img { width: 30px; height: 30px; }
.marca { font-weight: 800; letter-spacing: .5px; font-size: 15px; line-height: 1; }
.marca small { display: block; font-weight: 600; letter-spacing: 0; color: var(--brand); font-size: 11px; margin-top: 3px; }
.atras { background: none; border: 0; font-size: 28px; color: var(--t2); padding: 0 6px 0 0; cursor: pointer; line-height: 1; }
.pastilla { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; padding: 4px 9px; border-radius: 999px; background: var(--neuS); color: var(--t2); white-space: nowrap; }
.pastilla.ok { background: var(--okS); color: var(--ok); }
.pastilla.mal { background: var(--errS); color: var(--err); }
.pastilla.amarilla { background: var(--warnS); color: var(--warn); }
.punto { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }

/* Ahora mismo */
.fila { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grande { font-size: 30px; font-weight: 700; line-height: 1.1; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.kv div { background: var(--raised); border-radius: 10px; padding: 9px 10px; }
.kv small { display: block; color: var(--t3); font-size: 11px; margin-bottom: 2px; }
.kv strong { font-size: 16px; }
.sube { color: var(--ok); font-size: 12px; } .baja { color: var(--err); font-size: 12px; }
.barras { display: flex; align-items: flex-end; gap: 2px; height: 58px; margin-top: 12px; }
.barras i { flex: 1; display: block; border-radius: 2px 2px 0 0; min-height: 1px; }
.barras i.hoy { background: var(--accent); }
.barras i.ayer { background: var(--border2); }
.leyenda { display: flex; gap: 14px; font-size: 11px; color: var(--t3); margin-top: 6px; }
.leyenda span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; background: var(--accent); }
.leyenda span.y::before { background: var(--border2); }
.mini4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mini4 div { background: var(--raised); border-radius: 10px; padding: 8px 6px; text-align: center; }
.mini4 strong { display: block; font-size: 18px; }
.mini4 small { font-size: 10px; color: var(--t3); line-height: 1.1; display: block; }
.rojo { color: var(--err); } .amarillo { color: var(--warn); } .verde { color: var(--ok); }
.opaco { opacity: .5; filter: grayscale(.6); }
.nota-trabajo { display: block; width: 100%; background: var(--surface); border: 1px solid var(--border2); border-radius: 10px; padding: 12px; font-size: 15px; line-height: 1.45; resize: vertical; margin-bottom: 4px; }
.seccion > .boton.chico { margin-top: 10px; }
.linea { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--t2); margin-top: 8px; background: var(--raised); border-radius: 10px; padding: 8px 10px; }
.aviso { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.aviso:last-child { border-bottom: 0; padding-bottom: 0; }
.aviso:first-child { padding-top: 0; }
.aviso .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; font-size: 15px; background: var(--warnS); color: var(--warn); }
.aviso .ic.rojo { background: var(--errS); color: var(--err); }
.aviso p { margin: 0; font-size: 14px; }
.aviso small { color: var(--t3); font-size: 12px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; font-size: 12px; padding: 7px 11px; border-radius: 999px; background: var(--raised); border: 1px solid var(--border); color: var(--t2); cursor: pointer; }
.chip.si { background: var(--accentS); border-color: var(--accent); color: var(--t1); }
.chip.rojo-chip { color: var(--err); }
.chip.rojo-chip.si { background: var(--errS); border-color: var(--err); }
.chip.amarillo-chip.si { background: var(--warnS); border-color: var(--warn); color: var(--warn); }
.zona { font-size: 11px; color: var(--t3); margin: 12px 0 6px; display: flex; align-items: center; gap: 6px; }
.zona i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.rejilla { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.pc { aspect-ratio: 1 / 1.05; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); padding: 6px 7px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; position: relative; overflow: hidden; text-align: left; }
.pc .n { font-weight: 700; font-size: 15px; }
.pc .t { font-size: 13px; font-weight: 600; }
.pc .s { font-size: 10px; color: var(--t3); line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc.libre .t { color: var(--ok); }
.pc.fijo { background: var(--fixedS); border-color: var(--fixed); } .pc.fijo .t { color: var(--fixed); }
.pc.libre_tiempo { background: var(--warnS); border-color: var(--warn); } .pc.libre_tiempo .t { color: var(--warn); }
.pc.cuenta { background: var(--acctS); border-color: var(--acct); } .pc.cuenta .t { color: var(--acct); }
.pc.mantenimiento { background: var(--maint); border-color: var(--maint); } .pc.mantenimiento .s { color: #fff; }
.pc.por_cobrar { background: var(--brand); border-color: var(--brand); color: #000; } .pc.por_cobrar .s { color: #000; }
.pc.sin_senal { border: 2px solid var(--err); background: repeating-linear-gradient(135deg, #1b0f0f 0 6px, #2a1414 6px 12px); } .pc.sin_senal .t { color: var(--err); font-size: 11px; }
.pc.fuera { background: var(--errS); border-color: var(--err); } .pc.fuera .t { color: var(--err); font-size: 11px; }
.pc.en_mantenimiento, .pc.revision { border-color: var(--warn); } .pc.en_mantenimiento .t, .pc.revision .t { color: var(--warn); font-size: 11px; }
.pc.deshabilitada { opacity: .45; }
.pc .marcas { position: absolute; top: 5px; right: 5px; display: flex; gap: 3px; }
.pc .marcas b { width: 16px; height: 16px; border-radius: 4px; font-size: 10px; display: grid; place-items: center; }
.pc .marcas b.falla { background: var(--errS); border: 1px solid var(--err); color: var(--err); }
.pc .marcas b.candado { background: var(--warnS); border: 1px solid var(--warn); font-size: 9px; }
.pc .marcas b.aviso-pc { background: var(--warnS); border: 1px solid var(--warn); font-size: 9px; }
.vacio { color: var(--t3); font-size: 13px; padding: 4px 0; }

/* Hoja de detalle */
.sombra { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 20; }
.hoja { position: fixed; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; z-index: 21; background: var(--raised); border-radius: 22px 22px 0 0; border-top: 1px solid var(--border2); padding: 10px 16px calc(22px + env(safe-area-inset-bottom)); max-height: 86vh; overflow-y: auto; }
.agarre { width: 40px; height: 4px; border-radius: 2px; background: var(--border2); margin: 0 auto 12px; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 14px; margin: 12px 0 0; }
.dl dt { color: var(--t3); } .dl dd { margin: 0; text-align: right; }
.energia { height: 8px; border-radius: 4px; background: var(--hover); overflow: hidden; margin-top: 6px; }
.energia i { display: block; height: 100%; }
.caja-falla { margin-top: 12px; background: var(--errS); border: 1px solid #5a2323; border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.45; white-space: pre-line; }

/* Trabajos */
.trabajo { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--border); padding: 12px 0; cursor: pointer; }
.trabajo:last-child { border-bottom: 0; padding-bottom: 0; }
.trabajo:first-child { padding-top: 0; }
.trabajo small { color: var(--t3); font-size: 12px; }
.progreso { height: 6px; border-radius: 3px; background: var(--hover); overflow: hidden; margin-top: 8px; }
.progreso i { display: block; height: 100%; background: var(--ok); transition: width .2s; }
.punto-check { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--border); padding: 12px 0; font-size: 14px; cursor: pointer; }
.punto-check:last-child { border-bottom: 0; }
.punto-check .bx { width: 26px; height: 26px; border-radius: 7px; border: 2px solid var(--border2); flex: none; display: grid; place-items: center; font-size: 15px; font-weight: 700; color: #000; }
.punto-check.si .bx { background: var(--ok); border-color: var(--ok); }
.punto-check.si .tx { color: var(--t3); text-decoration: line-through; }
.punto-check small { display: block; color: var(--t3); font-size: 11px; text-decoration: none; }
.agregar { display: flex; gap: 8px; margin-top: 10px; }
.agregar input { flex: 1; background: var(--surface); border: 1px solid var(--border2); border-radius: 10px; padding: 11px 12px; font-size: 15px; }
.fotos { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.fotos .foto, .fotos .mas { width: 72px; height: 72px; border-radius: 10px; overflow: hidden; position: relative; background: var(--raised); border: 1px solid var(--border2); display: grid; place-items: center; cursor: pointer; padding: 0; }
.fotos .foto img { width: 100%; height: 100%; object-fit: cover; }
.fotos .foto .quitar { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .7); border: 0; color: #fff; font-size: 13px; line-height: 22px; cursor: pointer; }
.fotos .mas { border-style: dashed; font-size: 12px; color: var(--t2); text-align: center; line-height: 1.2; }
.fotos .sube { font-size: 11px; color: var(--t3); }
.segmento { display: flex; background: var(--raised); border-radius: 10px; padding: 3px; gap: 3px; margin-top: 5px; }
.segmento button { flex: 1; text-align: center; font-size: 12px; padding: 9px 4px; border-radius: 8px; color: var(--t2); background: none; border: 0; cursor: pointer; }
.segmento button.si { background: var(--accent); color: #fff; font-weight: 600; }
.flotante { position: fixed; right: max(16px, calc(50% - 264px)); bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 5; background: var(--brand); color: #000; font-weight: 700; border-radius: 999px; padding: 13px 18px; font-size: 14px; border: 0; box-shadow: 0 6px 18px rgba(0, 0, 0, .5); cursor: pointer; }

/* Barra de abajo */
.barra { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; height: calc(66px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #0d0d0f; border-top: 1px solid var(--border); display: flex; max-width: 560px; margin: 0 auto; }
.barra button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--t3); background: none; border: 0; position: relative; cursor: pointer; }
.barra button.si { color: var(--t1); }
.barra svg { width: 22px; height: 22px; stroke: var(--t3); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.barra button.si svg { stroke: var(--brand); }
.burbuja { position: absolute; top: 8px; left: calc(50% + 6px); background: var(--brand); color: #000; font-size: 10px; font-weight: 700; border-radius: 8px; padding: 1px 5px; }
/* Escanear: el botón amarillo del centro (etapa 2) */
.barra button.escanear svg { width: 26px; height: 26px; padding: 7px; box-sizing: content-box; background: var(--brand); stroke: #000; border-radius: 50%; margin-top: -26px; box-shadow: 0 0 0 5px #0d0d0f; }
.barra button.escanear.si svg { stroke: #000; }

/* ===== Reportes (etapa 2) ===== */
.pestanas { display: flex; gap: 2px; overflow-x: auto; padding: 0 10px; border-bottom: 1px solid var(--border); scrollbar-width: none; position: sticky; top: calc(54px + env(safe-area-inset-top)); z-index: 2; background: rgba(11, 11, 12, .96); }
.pestanas::-webkit-scrollbar { display: none; }
.pestanas button { flex: none; font-size: 13px; padding: 10px 9px; color: var(--t3); background: none; border: 0; cursor: pointer; }
.pestanas button.si { color: var(--t1); box-shadow: inset 0 -3px 0 var(--brand); }
.filtros { padding: 0 14px; margin: 12px 0; display: grid; gap: 8px; }
.filtros .chips { padding-bottom: 2px; }
.filtros select, .filtros input { width: 100%; background: var(--surface); border: 1px solid var(--border2); border-radius: 10px; padding: 10px 12px; font-size: 15px; color: var(--t1); }
.filtros .dos { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; }
.filtros .dos .boton { padding: 10px 14px; }
.periodo-texto { font-size: 12px; color: var(--t3); }
.cargando { color: var(--t3); font-size: 14px; padding: 30px 0; text-align: center; }
.comparar { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.tarjetas { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tarjeta { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 11px; text-align: left; min-width: 0; }
button.tarjeta { cursor: pointer; }
.tarjeta small { display: block; color: var(--t3); font-size: 11px; margin-bottom: 3px; }
.tarjeta strong { display: block; font-size: 17px; overflow-wrap: anywhere; }
.tarjeta em { display: block; font-style: normal; color: var(--t3); font-size: 11px; margin-top: 3px; line-height: 1.3; }
button.tarjeta strong::after { content: " ›"; color: var(--accent); font-weight: 400; }
.columnas { display: flex; align-items: flex-end; gap: 2px; height: 90px; margin-top: 10px; }
.columnas button { flex: 1; min-width: 0; border: 0; padding: 0; border-radius: 2px 2px 0 0; background: var(--accent); cursor: pointer; min-height: 2px; }
.columnas button.neg { background: var(--err); }
.columnas button.marcada { background: var(--brand); }
.etiquetas { display: flex; gap: 2px; font-size: 9px; color: var(--t4); margin-top: 3px; }
.etiquetas span { flex: 1; min-width: 0; text-align: center; white-space: nowrap; overflow: visible; }
.grafica-texto { font-size: 12px; color: var(--t2); margin-top: 8px; min-height: 16px; }
.barra-h { display: grid; grid-template-columns: minmax(0, 38%) 1fr auto; gap: 8px; align-items: center; font-size: 12px; padding: 5px 0; }
.barra-h span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--t2); }
.barra-h i { display: block; height: 10px; border-radius: 3px; background: var(--accent); min-width: 2px; }
.barra-h i.neg { background: var(--err); }
.barra-h b { font-weight: 600; white-space: nowrap; }
.fila-tabla { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--border); padding: 10px 0; font-size: 14px; cursor: pointer; }
.fila-tabla:last-child { border-bottom: 0; padding-bottom: 0; }
.fila-tabla:first-child { padding-top: 0; }
.fila-tabla > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.fila-tabla small { display: block; color: var(--t3); font-size: 11px; margin-top: 2px; }
.fila-tabla .v { text-align: right; white-space: nowrap; font-weight: 600; }
.fila-tabla .v small { font-weight: 400; }
.fila-tabla.total { font-weight: 700; }
.fila-tabla.total > span:first-child { color: var(--brand); }
.mas-filas { display: block; width: 100%; margin-top: 10px; padding: 10px 0 0; border: 0; border-top: 1px solid var(--border); background: none; color: var(--accent); font-size: 13px; cursor: pointer; }
.cuadro { border-left: 4px solid var(--accent); }
.cuadro.estrella { border-left-color: var(--brand); } .cuadro.pilar { border-left-color: var(--ok); }
.cuadro.promesa { border-left-color: var(--accent); } .cuadro.rezagado { border-left-color: var(--err); }
.calor { display: grid; gap: 2px; font-size: 9px; color: var(--t3); }
.calor span { text-align: center; white-space: nowrap; overflow: visible; }
.calor button { aspect-ratio: 1; border: 0; padding: 0; border-radius: 2px; background: var(--raised); cursor: pointer; min-width: 0; }
.notas { margin: 0; padding-left: 18px; font-size: 12px; color: var(--t3); line-height: 1.45; }
.tabla-op { font-size: 13px; }
.paginas { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; font-size: 12px; color: var(--t3); }

/* Bitácora */
.buscar { display: flex; gap: 8px; }
.buscar input { flex: 1; }
.sobre { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--accentS); border: 1px solid #1b3a5e; border-radius: 10px; padding: 9px 12px; font-size: 13px; }
.dia { font-size: 11px; color: var(--t3); text-transform: uppercase; letter-spacing: .6px; margin: 14px 0 8px; }
.dia:first-child { margin-top: 0; }
.linea-b { display: flex; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--border); padding: 10px 0; cursor: pointer; }
.linea-b:last-child { border-bottom: 0; }
.linea-b .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; font-size: 14px; background: var(--raised); }
.linea-b .ic.dinero { color: var(--ok); } .linea-b .ic.devolucion, .linea-b .ic.rechazada { color: var(--err); background: var(--errS); }
.linea-b .ic.descuento { color: var(--warn); background: var(--warnS); }
.linea-b p { margin: 0; font-size: 13.5px; line-height: 1.35; overflow-wrap: anywhere; }
.linea-b small { color: var(--t3); font-size: 11px; }
.linea-b small.rojo { color: var(--err); }
.linea-b .t { margin-left: auto; font-size: 11px; color: var(--t3); white-space: nowrap; }
.cambios { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 12px; }
.cambios td { padding: 7px 4px; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
.cambios td:first-child { color: var(--t3); width: 34%; }
.cambios s { color: var(--err); }
.cambios ins { color: var(--ok); text-decoration: none; }
.enlace { display: block; width: 100%; margin-top: 14px; background: none; border: 0; color: var(--accent); font-size: 13px; text-align: left; padding: 0; cursor: pointer; }

/* Escanear y ficha del equipo */
.camara { position: relative; margin: 6px 14px 0; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 3 / 4; max-height: 56vh; }
.camara video { width: 100%; height: 100%; object-fit: cover; display: block; }
.mira { position: absolute; left: 50%; top: 50%; width: 62%; aspect-ratio: 1; transform: translate(-50%, -50%); }
.mira i { position: absolute; width: 22%; height: 22%; border: 4px solid var(--brand); }
.mira i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; }
.mira i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-radius: 0 10px 0 0; }
.mira i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 10px; }
.mira i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-radius: 0 0 10px 0; }
.mira .escaneo { position: absolute; left: 8%; right: 8%; height: 2px; background: var(--brand); box-shadow: 0 0 12px var(--brand); animation: escaneo 2.2s ease-in-out infinite; }
@keyframes escaneo { 0%, 100% { top: 12%; } 50% { top: 88%; } }
.camara-texto { text-align: center; font-size: 14px; color: var(--t2); margin: 12px 16px 0; line-height: 1.4; }
.foto-equipo { height: 170px; border-radius: 14px; background: var(--raised); border: 1px solid var(--border); display: grid; place-items: center; overflow: hidden; font-size: 36px; color: var(--t3); cursor: pointer; padding: 0; width: 100%; margin-bottom: 10px; }
.foto-equipo img { width: 100%; height: 100%; object-fit: cover; }
.historia { font-size: 13px; }
.historia div { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.historia div:last-child { border-bottom: 0; padding-bottom: 0; }
.historia div:first-child { padding-top: 0; }
.historia i { font-style: normal; width: 22px; flex: none; text-align: center; }
.historia small { color: var(--t3); display: block; font-size: 11px; }
.lista-simple { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.lista-simple li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.lista-simple li:last-child { border-bottom: 0; }
.tocable { cursor: pointer; }
.ir { display: block; margin-top: 10px; font-size: 12px; color: var(--accent); }

/* Confirmar, foto en grande y avisos cortos */
.confirmar { position: fixed; left: 16px; right: 16px; top: 30%; max-width: 420px; margin: 0 auto; z-index: 31; background: var(--raised); border: 1px solid var(--border2); border-radius: 16px; padding: 18px; }
#sombraConfirmar { z-index: 30; }
.confirmar p { margin: 0 0 16px; font-size: 15px; line-height: 1.45; }
.foto-grande { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .92); display: grid; place-items: center; }
.foto-grande img { max-width: 100%; max-height: 100%; }
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(92px + env(safe-area-inset-bottom)); max-width: 520px; margin: 0 auto; z-index: 35; background: #111; border: 1px solid var(--border2); border-radius: 12px; padding: 12px 14px; font-size: 14px; text-align: center; }
