/* Pantalla de ingreso: /ingresar y la carga de la app (index.html, #login-overlay). Una sola pantalla partida:
   a la izquierda la red de avisos reales (web/ingreso-red.js) sobre azul marino, a la derecha el ingreso en una
   columna blanca del 22 % del ancho (mínimo 360 px). "Verificando sesión" pasa en esa misma columna.
   Todo va dentro de .ig para no chocar con style.css (index) ni cuenta.css.
   Pantallas grandes: el texto y la columna crecen juntos (--ig-z = ancho de la columna / 360, lo fija el script
   chico de cada página); el celular apila la red arriba y el ingreso abajo, con el mismo contenido. */
:root { --ig-z: 1; }
.ig {
  --ig-azul: #1652F0; --ig-azul-h: #0F43D1; --ig-lima: #A3E635;
  --slate-600: #475569; --text-light: #627187;   /* copia de style.css (/ingresar no lo carga): 4,5:1 (antes 2,56:1) */
  --ig-tinta: #0F172A; --ig-tinta-2: var(--slate-600); --ig-tinta-3: var(--text-light);
  --ig-borde: #E2E8F0; --ig-campo: #F8FAFC;
  --ig-navy-0: #030B1F; --ig-navy-1: #061A42;
  --ig-azul-claro: #5B8CFF; --ig-azul-fondo: #F5F8FF; --ig-azul-borde: #E3EAFB; --ig-azul-aro: #DBE5FD; --ig-riel: #EEF2F7;
  display: grid; grid-template-columns: minmax(0, 1fr) max(360px, 22vw); min-height: 100vh; min-height: 100dvh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; color: var(--ig-tinta); background: #fff;
  font-size: 16px; line-height: normal;   /* fijos: adentro de la app (style.css: 17 px y 1,5) se ve igual que en /ingresar */
  -webkit-font-smoothing: antialiased; text-align: left;
}
.ig *, .ig *::before, .ig *::after { box-sizing: border-box; }
.ig [hidden] { display: none !important; }

/* ── La red ─────────────────────────────────── */
.ig-red {
  position: relative; overflow: hidden; color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(40px * var(--ig-z)) calc(48px * var(--ig-z));
  background:
    radial-gradient(1200px 700px at 85% 0%, rgba(22,82,240,.38), transparent 60%),
    radial-gradient(900px 600px at 0% 100%, rgba(11,45,107,.9), transparent 70%),
    linear-gradient(160deg, var(--ig-navy-1) 0%, var(--ig-navy-0) 100%);
}
.ig-red canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: none; }
.ig-velo { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(20deg, rgba(3,11,31,.92) 0%, rgba(3,11,31,.55) 38%, rgba(3,11,31,0) 65%); }
.ig-red > *:not(canvas):not(.ig-velo) { position: relative; z-index: 1; pointer-events: none; zoom: var(--ig-z); }
.ig-red > div.ig-arriba { pointer-events: auto; }   /* le gana al :not() de arriba (los links a la landing) */
/* Logo + «Volver al inicio» (como registro y recuperar, cuenta.css .ct-volver), arriba a la izquierda */
.ig-arriba { display: flex; align-items: center; gap: 14px; align-self: flex-start; }
.ig-volver { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px 6px 9px; border-radius: 999px; font-size: 13px; font-weight: 500;
  color: #D7E0F0; text-decoration: none; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); transition: background .15s, color .15s; }
.ig-volver svg { width: 15px; height: 15px; flex-shrink: 0; transition: transform .15s; }
.ig-volver:hover { background: rgba(255,255,255,.12); color: #fff; }
.ig-volver:hover svg { transform: translateX(-2px); }
.ig-volver:focus-visible, .ig-marca:focus-visible { outline: 2px solid var(--ig-lima); outline-offset: 3px; }
.ig-marca { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; font-family: 'Geist', 'Inter', sans-serif;
  font-weight: 700; font-size: 20px; letter-spacing: -.04em; color: #fff; text-decoration: none; }
.ig-marca svg { width: 34px; height: 34px; }
.ig-cat { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 14px; font-weight: 500; color: #E2E8F0; }
.ig-cat i, .ig-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--ig-lima); box-shadow: 0 0 8px var(--ig-lima); flex-shrink: 0; }
.ig-claim h2 { font-family: 'Geist', 'Inter', sans-serif; font-size: clamp(34px, 4vw, 60px); line-height: 1.04;
  letter-spacing: -.035em; margin: 0 0 14px; font-weight: 700; color: #fff; }
.ig-claim h2 span { white-space: nowrap; }
.ig-claim p { margin: 0; color: #B6C3DA; font-size: 15px; line-height: 1.55; max-width: 42ch; }
.ig-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.ig-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: #D7E0F0; padding: 7px 11px; border-radius: 999px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); white-space: nowrap; }
.ig-chip b { color: #fff; font-weight: 700; }
.ig-pista { font-size: 12px; color: #7F90B0; display: flex; gap: 6px 16px; flex-wrap: wrap; align-items: center; }
.ig-pista b { color: #B6C3DA; font-weight: 500; }
.ig-pista .ig-dato { display: inline-flex; align-items: center; gap: 7px; }
.ig-pista .ig-dato i { width: 7px; height: 7px; border-radius: 50%; background: #EAF1FF; box-shadow: 0 0 6px #8FB3FF; }

/* ── La columna del ingreso ─────────────────── */
.ig-lado { display: flex; flex-direction: column; background: #fff; box-shadow: -1px 0 0 var(--ig-borde);
  padding: calc(28px * var(--ig-z)) calc(36px * var(--ig-z)); min-width: 0; }
.ig-lado > * { zoom: var(--ig-z); }
.ig-top { display: flex; justify-content: flex-end; align-items: center; gap: 10px; font-size: 13px; color: var(--ig-tinta-2); white-space: nowrap;
  min-height: 34px; }   /* vacía en la app (index.html): mismo alto que con «Probá 14 días», el título no salta al pasar */
/* Pasando a la app (/ingresar → index.html, que no los tiene): «Volver al inicio» y «Probá 14 días» se apagan, así el
   cambio de página no se nota */
.ig--sigue .ig-volver, .ig--sigue .ig-top > * { opacity: 0; pointer-events: none; transition: opacity .2s; }
.ig-cta { background: #fff; border: 1px solid var(--ig-borde); border-radius: 999px; padding: 8px 13px; color: var(--ig-tinta);
  font-weight: 600; text-decoration: none; font-size: 13px; transition: border-color .15s, color .15s; }
.ig-cta:hover { border-color: var(--ig-azul); color: var(--ig-azul); }
.ig-centro { flex: 1; display: flex; align-items: center; }
.ig-form { width: 100%; }
.ig h1 { font-family: 'Geist', 'Inter', sans-serif; font-size: 27px; letter-spacing: -.03em; line-height: 1.2; margin: 0 0 8px; font-weight: 700; color: var(--ig-tinta); }
.ig-sub { color: var(--ig-tinta-2); margin: 0 0 32px; line-height: 1.5; font-size: 15px; }
.ig-btn { width: 100%; height: 48px; border-radius: 10px; font: 600 15px 'Inter', sans-serif; cursor: pointer; display: flex;
  align-items: center; justify-content: center; gap: 10px; transition: background .15s, border-color .15s, transform .05s; }
.ig-btn:active { transform: translateY(1px); }
.ig-btn:disabled { opacity: .6; cursor: default; }
.ig-btn--o { background: #fff; border: 1px solid var(--ig-borde); color: var(--ig-tinta); }
.ig-btn--o:hover:not(:disabled) { border-color: #CBD5E1; background: var(--ig-campo); }
.ig-btn--o svg { width: 18px; height: 18px; }
.ig-btn--p { background: var(--ig-azul); border: 0; color: #fff; }
.ig-btn--p:hover:not(:disabled) { background: var(--ig-azul-h); }
.ig-o { display: flex; align-items: center; gap: 12px; color: var(--ig-tinta-3); font-size: 12.5px; margin: 26px 0; }
.ig-o::before, .ig-o::after { content: ""; flex: 1; height: 1px; background: var(--ig-borde); }
.ig label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 6px; color: var(--ig-tinta); }
.ig-campo { margin-bottom: 20px; position: relative; }
.ig-campo input { width: 100%; height: 48px; border: 1px solid var(--ig-borde); background: var(--ig-campo); border-radius: 10px;
  padding: 0 14px; font: 15px 'Inter', sans-serif; color: var(--ig-tinta); outline: none; transition: border-color .15s, box-shadow .15s, background .15s; }
.ig-campo input:focus { border-color: var(--ig-azul); background: #fff; box-shadow: 0 0 0 4px rgba(22,82,240,.12); }
.ig-campo--pass input { padding-right: 46px; }
.ig-ojo { position: absolute; right: 8px; bottom: 9px; width: 30px; height: 30px; display: grid; place-items: center; background: none;
  border: 0; border-radius: 6px; color: var(--ig-tinta-3); cursor: pointer; }
.ig-ojo:hover { background: var(--ig-campo); color: var(--ig-tinta); }
.ig-entre { display: flex; justify-content: flex-end; margin: -8px 0 24px; }
.ig-entre a, .ig-pie a { color: var(--ig-azul); text-decoration: none; font-size: 13.5px; font-weight: 500; }
.ig-entre a:hover, .ig-pie a:hover { text-decoration: underline; }
.ig-pie { text-align: center; color: var(--ig-tinta-2); font-size: 13.5px; margin: 28px 0 0; }
.ig-pie a { display: block; margin-top: 4px; }
.ig-pie--ayuda { margin-top: 16px; }
.ig-pie--ayuda a { display: inline; margin: 0; }
.ig-legal { font-size: 12px; line-height: 1.5; color: var(--ig-tinta-3); text-align: center; margin: 0; }
.ig a:focus-visible, .ig button:focus-visible { outline: 2px solid var(--ig-azul); outline-offset: 2px; }

/* Mensajes (web/auth.js → mensaje() pone .ct-msg y .ct-msg--error/ok/info) */
.ig .ct-msg { display: none; margin: 0 0 16px; padding: 10px 12px; border-radius: 8px; font-size: 13.5px; line-height: 1.45; }
.ig .ct-msg--error, .ig .ig-error { display: block; background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.ig .ct-msg--ok { display: block; background: #DCFCE7; color: #166534; border: 1px solid #BBF7D0; }
.ig .ct-msg--info { display: block; background: #EEF2FF; color: #1E3A8A; border: 1px solid #C7D2FE; }
.ig .ig-error { margin: 0 0 16px; padding: 10px 12px; border-radius: 8px; font-size: 13.5px; }
.ig .ct-btn--link { background: none; border: 0; padding: 0; color: var(--ig-azul); font: 500 14px 'Inter', sans-serif; cursor: pointer; }
.ig .ct-btn--link:hover { text-decoration: underline; }

/* ── Entrando: pasos reales de la carga (como Zillow / Compass: qué está pasando, sin esqueletos de campos) ──
   La página marca cada paso con window.mmCarga('avisos' | 'mapa'); la barra avanza con los pasos y, dentro de cada
   uno, se mueve despacio para que nunca parezca trabada. */
.ig-carga { font-size: 16px; line-height: 1.5; }   /* fijo: la app (style.css, 17 px) y /ingresar la ven igual y no salta al pasar */
.ig-carga .ig-sub { margin-bottom: 28px; }
.ig-pasos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.ig-pasos li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--ig-tinta-3); transition: color .3s; }
.ig-pasos li b { font-weight: 600; font-variant-numeric: tabular-nums; }
.ig-tip { margin-top: 28px; padding: 16px 18px; border-radius: 14px; background: var(--ig-azul-fondo); border: 1px solid var(--ig-azul-borde); }
.ig-tip-cat { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ig-azul); }
.ig-tip-cat i { width: 6px; height: 6px; border-radius: 50%; background: var(--ig-lima); box-shadow: 0 0 0 3px rgba(163,230,53,.25); }
.ig-tip-txt { margin: 8px 0 0; font-size: 14.5px; line-height: 1.45; color: var(--ig-tinta); min-height: 2.9em; transition: opacity .35s, transform .35s; }
.ig-tip-txt b { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ig-tip-txt.sale { opacity: 0; transform: translateY(4px); }
.ig-progreso-pie { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12.5px; color: var(--ig-tinta-3); }
.ig-pct { font-style: normal; font-weight: 600; color: var(--ig-azul); font-variant-numeric: tabular-nums; }
.ig-pasos li i { position: relative; flex: 0 0 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--ig-borde); transition: background .3s, border-color .3s; }
.ig-pasos li.activo { color: var(--ig-tinta); font-weight: 500; }
.ig-pasos li.activo i { border-color: var(--ig-azul-aro); border-top-color: var(--ig-azul); animation: ig-gira .8s linear infinite; }
.ig-pasos li.hecho { color: var(--ig-tinta-2); }
.ig-pasos li.hecho i { background: var(--ig-azul); border-color: var(--ig-azul); animation: ig-aparece .3s ease; }
.ig-pasos li.hecho i::after { content: ""; position: absolute; left: 7px; top: 3.5px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
@keyframes ig-gira { to { transform: rotate(360deg); } }
@keyframes ig-aparece { from { transform: scale(.6); } to { transform: scale(1); } }
.ig-progreso { margin-top: 40px; height: 4px; border-radius: 4px; background: var(--ig-riel); }
/* en la punta, el pin del mapa (el mismo del cursor de la red), parado sobre la barra */
.ig-progreso i { position: relative; display: block; height: 100%; width: 8%; border-radius: 4px; background: linear-gradient(90deg, var(--ig-azul), var(--ig-azul-claro));
  transition: width 6s cubic-bezier(.1,.6,.3,1); }
.ig-progreso i::after { content: ""; position: absolute; right: -8px; bottom: 2px; width: 16px; height: 21px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-11 -31 22 32'%3E%3Cpath d='M0 0C-4-8-10-12-10-19A10 10 0 0 1 10-19C10-12 4-8 0 0Z' fill='%23A3E635'/%3E%3Ccircle cy='-19' r='3.6' fill='%23061A42'/%3E%3C/svg%3E") no-repeat center / contain;
  filter: drop-shadow(0 2px 4px rgba(22,82,240,.35)); animation: ig-pin 1.6s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes ig-pin { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
.ig-carga[data-paso="sesion"] .ig-progreso i { width: 30%; }
.ig-carga[data-paso="avisos"] .ig-progreso i { width: 85%; transition-duration: 12s; }
.ig-carga[data-paso="mapa"] .ig-progreso i { width: 100%; transition-duration: .4s; }
.ig-entra { animation: ig-entra .35s ease both; }
@keyframes ig-entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── Celular: hay poco lugar. La red queda de fondo en toda la pantalla (se mueve, pero no se toca) y encima va solo
   el logo y la tarjeta de ingreso (pedido de Manu, 11/10: sin el titular ni las píldoras) ── */
@media (max-width: 860px) {
  .ig { display: block; position: relative; min-height: 100vh; min-height: 100dvh; background: var(--ig-navy-0); }
  .ig-red { position: fixed; inset: 0; padding: 20px 20px; justify-content: flex-start; }
  .ig-red canvas { pointer-events: none; cursor: auto; }
  .ig-velo { background: linear-gradient(180deg, rgba(3,11,31,.2) 0%, rgba(3,11,31,.55) 100%); }
  .ig-claim, .ig-pista { display: none; }
  .ig-lado { pointer-events: none; }   /* deja tocar el logo de abajo; la tarjeta sí recibe toques */
  .ig-lado > * { pointer-events: auto; }
  .ig-lado { position: relative; z-index: 1; background: transparent; box-shadow: none; min-height: 100vh; min-height: 100dvh;
    padding: 72px 16px 16px; justify-content: center; gap: 12px; }
  .ig-centro { flex: 0 0 auto; display: block; }
  .ig-form { background: #fff; border-radius: 18px; padding: 26px 20px 24px; box-shadow: 0 20px 50px -12px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.06); }
  .ig h1 { font-size: 25px; }
  .ig-sub { margin-bottom: 22px; }
  .ig-o { margin: 20px 0; }
  .ig-campo { margin-bottom: 16px; }
  .ig-pie { margin-top: 22px; }
  .ig-top { display: none; }   /* la tarjeta ya invita a probar 14 días: abajo era repetido y no entraba en la pantalla */
  .ig-centro { order: 1; }
  .ig-legal { order: 3; color: #7F90B0; }
}
/* iPhone: con letra de menos de 16 px Safari agranda la página al tocar un campo (R3-1, como cuenta.css y style.css) */
@media (max-width: 899px), (pointer: coarse) { .ig input:not([type=checkbox]):not([type=radio]) { font-size: 16px !important; } }
@media (prefers-reduced-motion: reduce) { .ig-entra, .ig-pasos li i, .ig-progreso i::after { animation: none !important; } .ig-progreso i { transition: none; } }

/* Encima de la app (index.html #login-overlay): tapa todo y en el celular se puede bajar hasta el formulario */
.ig--capa { position: fixed; inset: 0; z-index: 9999; overflow-y: auto; overscroll-behavior: contain; }
.ig-link { color: var(--ig-azul); font-weight: 500; text-decoration: none; }
.ig-link:hover { text-decoration: underline; }
/* Celular: blancos de toque de 44 px (R3-30, QA 20/10; R3a-6, QA 27/10): «Volver al inicio», mostrar la contraseña
   (el ojo crece hacia la esquina del campo) y los links de texto (zona invisible, sin cambiar cómo se ven) */
@media (pointer: coarse) {
  .ig-volver { min-height: 44px; box-sizing: border-box; }
  .ig-ojo { width: 44px; height: 44px; right: 1px; bottom: 2px; }
  .ig .ct-btn--link, .ig-entre a { position: relative; }
  .ig .ct-btn--link::after, .ig-entre a::after { content: ''; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%); }
}
/* Pantalla de carga: el dato de hoy (/publico.json) llega después; su lugar queda reservado (invisible) para que el bloque
   centrado no suba de golpe cuando aparece (séptima/octava auditoría: salto de 0,12 en la primera carga del celular) */
.ig-carga .ig-tip[hidden] { display: block; visibility: hidden; }
