/* TogaBypass — estilo "Tech Innovation": gris profundo, azul eléctrico y cian neón. */

:root {
  --fondo: #0b0c0f;
  --fondo-2: #101116;
  --superficie: #16171c;
  --superficie-2: #1e1e24;
  --superficie-3: #26272e;
  --borde: rgba(255, 255, 255, 0.07);
  --borde-2: rgba(255, 255, 255, 0.13);
  --texto: #f4f6fa;
  --texto-2: #a6adbb;
  --texto-3: #6f7685;
  --azul: #0066ff;
  --azul-2: #2b7fff;
  --cian: #00ffff;
  --cian-suave: rgba(0, 255, 255, 0.1);
  --ambar: #ffb020;
  --ambar-suave: rgba(255, 176, 32, 0.12);
  --rojo: #ff4d5e;
  --rojo-suave: rgba(255, 77, 94, 0.12);
  --verde: #2fe0a5;
  --radio: 16px;
  --radio-chico: 12px;
  --sombra: 0 10px 30px rgba(0, 0, 0, 0.45);
  --arriba: env(safe-area-inset-top, 0px);
  --abajo: env(safe-area-inset-bottom, 0px);
  --tabbar: 64px;
  --fuente: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Roboto Mono', Menlo, Consolas, monospace;
  --curva: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(0, 102, 255, 0.16), transparent 60%),
    radial-gradient(80% 40% at 100% 0%, rgba(0, 255, 255, 0.06), transparent 60%),
    var(--fondo);
  background-attachment: fixed;
  color: var(--texto);
  font: 16px/1.45 var(--fuente);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
body.con-hoja { overflow: hidden; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
a { color: var(--cian); }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; line-height: 1.2; }
p { margin: 0; }
.suave { color: var(--texto-2); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.ico { width: 22px; height: 22px; flex: none; }
:focus-visible { outline: 2px solid var(--cian); outline-offset: 2px; }

/* ---------- Marca ---------- */
.marca { display: flex; align-items: center; gap: 10px; }
.marca-icono {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--azul), #00d8ff);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 102, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.marca-icono .ico { width: 22px; height: 22px; }
.marca-icono.grande { width: 72px; height: 72px; border-radius: 20px; }
.marca-icono.grande .ico { width: 44px; height: 44px; }
.marca-texto { font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.marca-texto b { color: var(--cian); font-weight: 700; }
.marca-grande .marca-icono { width: 48px; height: 48px; border-radius: 14px; }
.marca-grande .marca-icono .ico { width: 30px; height: 30px; }
.marca-grande .marca-texto { font-size: 26px; }

/* ---------- Arranque ---------- */
.arranque { position: fixed; inset: 0; display: grid; place-items: center; z-index: 50; background: var(--fondo); transition: opacity 0.3s ease; }
.arranque .marca-icono { animation: latido 1.4s ease-in-out infinite; }
body:not(.cargando) .arranque { opacity: 0; pointer-events: none; }
@keyframes latido { 50% { transform: scale(0.92); opacity: 0.8; } }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px;
  border: 1px solid var(--borde-2); border-radius: 14px;
  background: var(--superficie-2); color: var(--texto);
  font-weight: 600; font-size: 16px;
  transition: transform 0.12s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; pointer-events: none; }
.btn.primario {
  border-color: transparent;
  background: linear-gradient(180deg, var(--azul-2), var(--azul));
  box-shadow: 0 8px 22px rgba(0, 102, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  color: #fff;
}
.btn.peligro { color: var(--rojo); border-color: rgba(255, 77, 94, 0.3); background: var(--rojo-suave); }
.btn.fantasma { background: transparent; border-color: transparent; color: var(--texto-2); }
.btn.chico { min-height: 38px; padding: 0 14px; border-radius: 12px; font-size: 14px; }
.btn.ancho { width: 100%; }
.btn .ico { width: 20px; height: 20px; }
.btn.cargando { position: relative; color: transparent !important; }
.btn.cargando::after {
  content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.35); border-top-color: #fff;
  animation: girar 0.7s linear infinite;
}
@keyframes girar { to { transform: rotate(360deg); } }

.icono-btn {
  display: grid; place-items: center; width: 42px; height: 42px;
  border: 1px solid var(--borde); border-radius: 12px;
  background: var(--superficie); color: var(--texto-2);
  transition: transform 0.12s ease, color 0.2s ease;
}
.icono-btn:active { transform: scale(0.94); color: var(--texto); }

/* ---------- Campos ---------- */
.campo { display: grid; gap: 6px; margin-bottom: 14px; }
.campo > span { font-size: 13px; font-weight: 600; color: var(--texto-2); }
.campo input, .campo select, .entrada {
  width: 100%; min-height: 50px; padding: 0 14px;
  border: 1px solid var(--borde-2); border-radius: 14px;
  background: var(--fondo-2); color: var(--texto);
  font-size: 16px; outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.campo input:focus, .entrada:focus { border-color: var(--azul-2); box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.18); }
.campo input::placeholder, .entrada::placeholder { color: var(--texto-3); }
.error { min-height: 20px; margin: 2px 0 12px; color: var(--rojo); font-size: 14px; }
.ayuda { font-size: 13px; color: var(--texto-3); margin-top: -6px; margin-bottom: 14px; }

/* ---------- Acceso ---------- */
.acceso { min-height: 100dvh; display: grid; place-items: center; padding: calc(24px + var(--arriba)) 20px calc(24px + var(--abajo)); }
.acceso-caja { width: 100%; max-width: 380px; }
.acceso-caja .marca { margin-bottom: 30px; }
.acceso-caja h1 { font-size: 28px; margin-bottom: 6px; }
.acceso-caja > .suave { margin-bottom: 26px; }

/* ---------- Panel ---------- */
.barra {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + var(--arriba)) 18px 10px;
  background: rgba(11, 12, 15, 0.78);
  -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--borde);
}
.contenido { max-width: 680px; margin: 0 auto; padding: 16px 16px calc(var(--tabbar) + var(--abajo) + 96px); }

.uso {
  padding: 14px 16px; margin-bottom: 14px;
  border: 1px solid var(--borde); border-radius: var(--radio);
  background: linear-gradient(180deg, rgba(0, 102, 255, 0.09), rgba(0, 102, 255, 0.02)), var(--superficie);
}
.uso-fila { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 14px; color: var(--texto-2); margin-bottom: 10px; }
.uso-fila b { color: var(--texto); font-weight: 600; font-variant-numeric: tabular-nums; }
.medidor { height: 8px; border-radius: 99px; background: var(--superficie-3); overflow: hidden; }
.medidor i { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--azul), var(--cian)); transition: width 0.6s var(--curva); }
.medidor.lleno i { background: linear-gradient(90deg, var(--ambar), var(--rojo)); }

.buscador {
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px; margin-bottom: 12px; min-height: 48px;
  border: 1px solid var(--borde); border-radius: 14px; background: var(--superficie);
  color: var(--texto-3);
}
.buscador:focus-within { border-color: var(--azul-2); }
.buscador input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--texto); min-height: 46px; }
.buscador input::-webkit-search-cancel-button { filter: invert(0.6); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 14px;
  border: 1px solid var(--borde-2); border-radius: 99px;
  background: var(--superficie); color: var(--texto-2);
  font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
}
.chip:active { transform: scale(0.96); }
.chip .ico { width: 16px; height: 16px; }
.chip.activo { background: rgba(0, 102, 255, 0.16); border-color: rgba(43, 127, 255, 0.55); color: #fff; }
.chip .num { color: var(--texto-3); font-weight: 500; }
.chip.activo .num { color: var(--cian); }

/* ---------- Listas ---------- */
.lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fila {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px; text-align: left;
  border: 1px solid var(--borde); border-radius: var(--radio);
  background: var(--superficie);
  transition: transform 0.12s ease, background 0.2s ease, border-color 0.2s ease;
}
.fila:active { transform: scale(0.985); background: var(--superficie-2); }
.fila-texto { flex: 1; min-width: 0; }
.fila-titulo { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.fila-meta { margin-top: 2px; font-size: 13px; color: var(--texto-3); display: flex; flex-wrap: wrap; gap: 4px 10px; font-variant-numeric: tabular-nums; }
.fila-meta span { display: inline-flex; align-items: center; gap: 4px; }
.fila .flecha { width: 18px; height: 18px; color: var(--texto-3); }

.tipo {
  flex: none; display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 13px;
  font: 700 11px/1 var(--mono); letter-spacing: 0.02em;
  color: #fff; background: #3a3d48;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.tipo.t-exe { background: linear-gradient(135deg, #0066ff, #2b9bff); }
.tipo.t-zip { background: linear-gradient(135deg, #d98a00, #ffb020); }
.tipo.t-apk { background: linear-gradient(135deg, #0fa36b, #2fe0a5); }
.tipo.t-img { background: linear-gradient(135deg, #6b3fe0, #a46bff); }
.tipo.t-doc { background: linear-gradient(135deg, #d63a4a, #ff6b7a); }
.tipo.t-media { background: linear-gradient(135deg, #0aa5b8, #00e5ff); color: #062a30; }

/* ---------- Estado de links ---------- */
.estado {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 99px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.01em; white-space: nowrap;
}
.estado::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.e-sin_usar { color: var(--cian); background: var(--cian-suave); }
.e-activo { color: var(--ambar); background: var(--ambar-suave); }
.e-activo::before { animation: pulso 1.6s ease-in-out infinite; box-shadow: 0 0 0 0 rgba(255, 176, 32, 0.6); }
.e-usado, .e-vencido { color: var(--texto-2); background: rgba(255, 255, 255, 0.06); }
.e-cancelado { color: var(--rojo); background: var(--rojo-suave); }
@keyframes pulso { 50% { box-shadow: 0 0 0 5px rgba(255, 176, 32, 0); opacity: 0.7; } }

.link-icono { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--superficie-3); color: var(--texto-2); }
.link-icono.activo { color: var(--ambar); background: var(--ambar-suave); }
.link-icono.sin_usar { color: var(--cian); background: var(--cian-suave); }

.contadores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.contador { padding: 12px; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--superficie); }
.contador b { display: block; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.contador span { font-size: 12px; color: var(--texto-3); font-weight: 600; }
.contador.c-sin_usar b { color: var(--cian); }
.contador.c-activo b { color: var(--ambar); }

/* ---------- Vacío ---------- */
.vacio { text-align: center; padding: 48px 24px; }
.vacio-icono { display: inline-grid; place-items: center; width: 64px; height: 64px; margin-bottom: 14px; border-radius: 20px; background: var(--cian-suave); color: var(--cian); }
.vacio-icono .ico { width: 30px; height: 30px; }
.vacio h3 { font-size: 18px; margin-bottom: 6px; }

/* ---------- Barra de pestañas y botón flotante ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr 1fr;
  height: calc(var(--tabbar) + var(--abajo)); padding-bottom: var(--abajo);
  background: rgba(13, 14, 18, 0.86);
  -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px);
  border-top: 1px solid var(--borde);
}
.tabbar button {
  position: relative; display: grid; place-items: center; align-content: center; gap: 3px;
  border: 0; background: none; color: var(--texto-3); font-size: 12px; font-weight: 600;
  transition: color 0.2s ease;
}
.tabbar button.activo { color: var(--texto); }
.tabbar button.activo .ico { color: var(--cian); }
.burbuja {
  position: absolute; top: 8px; left: calc(50% + 8px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: var(--ambar); color: #1a1200; font-size: 11px; line-height: 18px; text-align: center;
}

.fab {
  position: fixed; z-index: 21; right: max(16px, calc(50% - 324px));
  bottom: calc(var(--tabbar) + var(--abajo) + 16px);
  display: inline-flex; align-items: center; gap: 8px;
  height: 54px; padding: 0 22px 0 18px; border: 0; border-radius: 18px;
  background: linear-gradient(180deg, var(--azul-2), var(--azul)); color: #fff;
  font-weight: 700; font-size: 16px;
  box-shadow: 0 12px 30px rgba(0, 102, 255, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  transition: transform 0.15s var(--curva);
}
.fab:active { transform: scale(0.95); }

.pildora-subida {
  position: fixed; z-index: 21; left: max(16px, calc(50% - 324px));
  bottom: calc(var(--tabbar) + var(--abajo) + 22px);
  display: inline-flex; align-items: center; gap: 10px;
  height: 42px; padding: 0 16px 0 10px; border: 1px solid var(--borde-2); border-radius: 99px;
  background: rgba(30, 30, 36, 0.92); color: var(--texto); font-size: 14px; font-weight: 600;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: var(--sombra);
  max-width: calc(100% - 190px);
}
.pildora-subida span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pildora-anillo {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: conic-gradient(var(--cian) var(--p, 0%), var(--superficie-3) 0);
  -webkit-mask: radial-gradient(circle, transparent 7px, #000 7.5px); mask: radial-gradient(circle, transparent 7px, #000 7.5px);
}

/* ---------- Hojas (paneles que suben desde abajo) ---------- */
.hoja-fondo {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0, 0, 0, 0); transition: background 0.28s ease;
}
.hoja-fondo.abierta { background: rgba(0, 0, 0, 0.6); }
.hoja {
  position: relative; width: 100%; max-width: 680px; max-height: calc(100dvh - var(--arriba) - 24px);
  display: flex; flex-direction: column;
  border: 1px solid var(--borde-2); border-bottom: 0; border-radius: 24px 24px 0 0;
  background: var(--superficie); box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
  transform: translateY(100%); transition: transform 0.34s var(--curva);
}
.hoja-fondo.abierta .hoja { transform: none; }
.hoja-cabeza { display: flex; align-items: center; gap: 12px; padding: 18px 16px 10px 20px; }
.hoja-cabeza h2 { flex: 1; font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agarradera { position: absolute; top: 7px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 99px; background: var(--borde-2); }
.hoja-cuerpo { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 6px 20px 20px; -webkit-overflow-scrolling: touch; }
.hoja-pie { display: grid; gap: 10px; padding: 12px 20px calc(14px + var(--abajo)); border-top: 1px solid var(--borde); background: var(--superficie); }
.hoja-pie.doble { grid-template-columns: 1fr 1fr; }

.seccion-titulo { margin: 18px 0 10px; font-size: 13px; font-weight: 700; color: var(--texto-3); text-transform: uppercase; letter-spacing: 0.06em; }
.seccion-titulo:first-child { margin-top: 4px; }

.acciones { display: grid; gap: 2px; margin: 0 -8px; }
.accion {
  display: flex; align-items: center; gap: 14px; width: 100%;
  min-height: 54px; padding: 0 12px; border: 0; border-radius: 14px;
  background: none; color: var(--texto); font-size: 16px; font-weight: 500; text-align: left;
}
.accion:active { background: var(--superficie-2); }
.accion .ico { color: var(--texto-2); }
.accion.peligro, .accion.peligro .ico { color: var(--rojo); }
.accion small { display: block; color: var(--texto-3); font-size: 13px; }

.cabecera-archivo { display: flex; gap: 14px; align-items: center; margin: 2px 0 10px; }
.cabecera-archivo .fila-titulo { -webkit-line-clamp: 3; font-size: 16px; }

/* Opciones en botones (segmentos y chips de opción) */
.segmentos { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 16px; background: var(--fondo-2); border: 1px solid var(--borde); }
.segmento { min-height: 44px; border: 0; border-radius: 12px; background: none; color: var(--texto-2); font-weight: 600; font-size: 15px; transition: background 0.2s ease, color 0.2s ease; }
.segmento.activo { background: var(--superficie-3); color: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); }
.opciones { display: flex; flex-wrap: wrap; gap: 8px; }
.opciones .chip { min-height: 40px; }

.paso { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--fondo-2); border: 1px solid var(--borde); }
.paso-control { display: flex; align-items: center; gap: 10px; }
.paso-control b { min-width: 26px; text-align: center; font-size: 18px; font-variant-numeric: tabular-nums; }
.paso-control .icono-btn { width: 38px; height: 38px; font-size: 20px; font-weight: 700; color: var(--texto); }

/* Selección de archivos para el link */
.eleccion { margin-top: 12px; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo-2); overflow: hidden; }
.eleccion-grupo { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; background: var(--superficie-2); font-size: 13px; font-weight: 700; color: var(--texto-2); }
.eleccion-grupo button { border: 0; background: none; color: var(--cian); font-size: 13px; font-weight: 700; padding: 6px 0; }
.casilla { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--borde); cursor: pointer; }
.casilla input { position: absolute; opacity: 0; pointer-events: none; }
.casilla .caja { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--borde-2); color: transparent; transition: background 0.15s ease, border-color 0.15s ease; }
.casilla .caja .ico { width: 16px; height: 16px; }
.casilla input:checked + .caja { background: var(--azul); border-color: var(--azul); color: #fff; }
.casilla input:focus-visible + .caja { outline: 2px solid var(--cian); outline-offset: 2px; }
.casilla-texto { flex: 1; min-width: 0; }
.casilla-texto b { display: block; font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.casilla-texto span { font-size: 12px; color: var(--texto-3); }
.resumen-eleccion { margin-top: 10px; font-size: 14px; color: var(--texto-2); }
.resumen-eleccion b { color: var(--cian); }

/* Tarjeta de link listo */
.tarjeta-link { padding: 14px; border: 1px solid var(--borde-2); border-radius: var(--radio); background: var(--fondo-2); margin-bottom: 10px; }
.tarjeta-link h4 { margin: 0 0 8px; font-size: 15px; }
.url {
  display: block; padding: 11px 12px; margin-bottom: 10px; border-radius: 12px;
  background: var(--superficie-2); border: 1px dashed rgba(0, 255, 255, 0.3);
  font: 13px/1.35 var(--mono); color: var(--cian); word-break: break-all;
  -webkit-user-select: all; user-select: all;
}
.botones-link { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.nota-link { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--cian-suave); color: #bdfcff; font-size: 14px; margin-bottom: 14px; }
.nota-link .ico { width: 20px; height: 20px; color: var(--cian); }

/* Detalles en lista (clave: valor) */
.detalles { margin: 0; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo-2); }
.detalles div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 14px; border-top: 1px solid var(--borde); font-size: 14px; }
.detalles div:first-child { border-top: 0; }
.detalles dt { color: var(--texto-3); }
.detalles dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.historial { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.historial li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--fondo-2); border: 1px solid var(--borde); font-size: 14px; }
.historial li .ico { color: var(--verde); width: 20px; height: 20px; }
.historial small { display: block; color: var(--texto-3); font-size: 12px; }

/* Subidas */
.zona-subir {
  display: grid; justify-items: center; gap: 6px; width: 100%;
  padding: 26px 16px; border: 1.5px dashed rgba(0, 255, 255, 0.35); border-radius: var(--radio);
  background: linear-gradient(180deg, rgba(0, 255, 255, 0.06), transparent); color: var(--texto); text-align: center;
}
.zona-subir:active { background: rgba(0, 255, 255, 0.1); }
.zona-subir .ico { width: 36px; height: 36px; color: var(--cian); }
.zona-subir b { font-size: 17px; }
.zona-subir span { font-size: 13px; color: var(--texto-3); }
.subida { padding: 12px 14px; border: 1px solid var(--borde); border-radius: 14px; background: var(--fondo-2); }
.subida-fila { display: flex; align-items: center; gap: 10px; }
.subida-fila b { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subida-fila small { color: var(--texto-3); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.subida .medidor { margin-top: 10px; height: 6px; }
.subida.listo .medidor i { background: var(--verde); }
.subida.error small { color: var(--rojo); }
.subida .icono-btn { width: 32px; height: 32px; border-radius: 10px; }
.subida .icono-btn .ico { width: 16px; height: 16px; }

/* ---------- Avisos ---------- */
.aviso {
  position: fixed; left: 50%; z-index: 60; bottom: calc(var(--tabbar) + var(--abajo) + 84px);
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 14px;
  background: #f4f6fa; color: #0b0c0f; font-weight: 600; font-size: 14px; box-shadow: var(--sombra);
  transition: opacity 0.25s ease, transform 0.25s var(--curva);
}
.aviso.visible { opacity: 1; transform: translate(-50%, 0); }
.aviso.malo { background: var(--rojo); color: #fff; }
body.con-hoja .aviso { bottom: calc(var(--abajo) + 96px); }

/* ---------- Página de descarga (cliente) ---------- */
.publico { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: calc(28px + var(--arriba)) 18px calc(24px + var(--abajo)); }
.publico .marca { margin-bottom: 26px; }
.tarjeta {
  width: 100%; max-width: 440px; padding: 26px 22px 22px;
  border: 1px solid var(--borde-2); border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%), var(--superficie);
  box-shadow: var(--sombra); text-align: center;
  animation: entrar 0.45s var(--curva) both;
}
@keyframes entrar { from { opacity: 0; transform: translateY(12px); } }
.sello {
  display: inline-grid; place-items: center; width: 76px; height: 76px; margin-bottom: 16px; border-radius: 24px;
  background: var(--cian-suave); color: var(--cian);
  box-shadow: 0 0 0 8px rgba(0, 255, 255, 0.04);
}
.sello .ico { width: 38px; height: 38px; }
.sello.ambar { background: var(--ambar-suave); color: var(--ambar); box-shadow: 0 0 0 8px rgba(255, 176, 32, 0.04); }
.sello.gris { background: rgba(255, 255, 255, 0.06); color: var(--texto-2); box-shadow: none; }
.sello.rojo { background: var(--rojo-suave); color: var(--rojo); box-shadow: none; }
.tarjeta h1 { font-size: 24px; margin-bottom: 8px; }
.tarjeta > p.suave { margin-bottom: 18px; }
.cifras { display: flex; justify-content: center; gap: 10px; margin-bottom: 18px; }
.cifras span { padding: 8px 12px; border-radius: 12px; background: var(--fondo-2); border: 1px solid var(--borde); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.advertencia { display: flex; gap: 12px; text-align: left; padding: 14px; margin-bottom: 18px; border-radius: 16px; background: var(--fondo-2); border: 1px solid var(--borde); font-size: 14px; color: var(--texto-2); }
.advertencia .ico { color: var(--cian); width: 22px; height: 22px; margin-top: 1px; }
.advertencia b { color: var(--texto); }
.temporizador { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 8px 14px; border-radius: 99px; background: var(--ambar-suave); color: var(--ambar); font-weight: 700; font-variant-numeric: tabular-nums; }
.temporizador .ico { width: 18px; height: 18px; }
.descargables { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; text-align: left; }
.descargable { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--fondo-2); border: 1px solid var(--borde); }
.descargable .btn { flex: none; }
.descargable .btn.hecho { color: var(--verde); border-color: rgba(47, 224, 165, 0.35); background: rgba(47, 224, 165, 0.1); }
.pie-publico { margin-top: 22px; font-size: 12px; color: var(--texto-3); display: flex; align-items: center; gap: 6px; }
.pie-publico .ico { width: 14px; height: 14px; }
.enlace-boton { border: 0; background: none; color: var(--texto-3); font-size: 14px; text-decoration: underline; margin-top: 12px; padding: 8px; }
.pasos-app { text-align: left; margin: 0 0 18px; padding-left: 20px; color: var(--texto-2); font-size: 14px; display: grid; gap: 6px; }

@media (min-width: 720px) {
  .hoja-fondo { align-items: center; }
  .hoja { border-radius: 24px; border-bottom: 1px solid var(--borde-2); max-height: 86dvh; }
  .hoja-pie { border-radius: 0 0 24px 24px; padding-bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

.fila-meta .ico { width: 14px; height: 14px; }
.fuera { position: fixed; top: -1000px; left: 0; opacity: 0; pointer-events: none; }
.cabecera-archivo .estado { margin-right: auto; }
.subida-fila .fila-texto b, .subida-fila .fila-texto small { display: block; }
