/* Base BIX · Index Technologies — tema oscuro con el azul corporativo #0057FF */
:root {
  --bg: #060b18; --panel: #0c1427; --panel2: #111c36; --linea: rgba(140, 170, 255, .13); --linea2: rgba(140, 170, 255, .24);
  --tx: #eaf0ff; --tx2: #a9b6d3; --mut: #6f7d9c; --az: #0057FF; --az2: #3d83ff; --cel: #8db8ff; --ok: #2fd28a; --amb: #ffb547; --rojo: #ff6b6b;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif; --r: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--tx); font: 15px/1.5 var(--sans); min-height: 100vh; overflow-x: hidden;
  background-image: radial-gradient(900px 500px at 12% -10%, rgba(0, 87, 255, .22), transparent 60%), radial-gradient(700px 500px at 100% 0%, rgba(61, 131, 255, .10), transparent 60%); background-attachment: fixed; }
a { color: var(--cel); text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
::selection { background: var(--az); color: #fff; }

/* ── ingreso ── */
.login { display: grid; place-items: center; padding: 24px 16px; }
.login__box { width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--linea2); border-radius: 22px; padding: 34px 28px; text-align: center; box-shadow: 0 40px 90px rgba(0, 40, 140, .35); animation: sube .6s cubic-bezier(.2, .8, .2, 1); }
.login__logo { width: 150px; margin: 0 auto 18px; display: block; }
.login__k { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--cel); font-weight: 700; }
.login h1 { font-size: 30px; margin: 6px 0 8px; font-weight: 800; letter-spacing: -.02em; }
.login__p { color: var(--tx2); font-size: 14px; margin: 0 0 20px; }
.login form { display: grid; gap: 12px; }
.login__pie { margin-top: 18px; font-size: 12px; color: var(--mut); }
.campo { width: 100%; padding: 13px 14px; border: 1.5px solid var(--linea2); border-radius: 12px; background: #070d1d; color: var(--tx); font-size: 15px; }
.campo:focus { outline: none; border-color: var(--az2); box-shadow: 0 0 0 4px rgba(0, 87, 255, .25); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 12px; border: 0; background: var(--az); color: #fff; font-weight: 600; font-size: 14.5px; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(0, 87, 255, .45); background: #1466ff; }
.btn:disabled { opacity: .6; cursor: default; transform: none; box-shadow: none; }
.btn--ghost { background: transparent; border: 1.5px solid var(--linea2); color: var(--tx); }
.btn--ghost:hover { background: rgba(0, 87, 255, .16); box-shadow: none; }
.btn--sm { padding: 7px 13px; font-size: 13px; border-radius: 10px; }
.cajas { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.cajas input { width: 100%; aspect-ratio: 1 / 1.15; text-align: center; font-weight: 700; font-size: 24px; border: 1.5px solid var(--linea2); border-radius: 12px; background: #070d1d; color: #fff; }
.cajas input:focus { outline: none; border-color: var(--az2); box-shadow: 0 0 0 4px rgba(0, 87, 255, .25); }
.link { background: none; border: 0; color: var(--mut); font-size: 13px; text-decoration: underline; cursor: pointer; }
.err { min-height: 20px; margin-top: 10px; color: var(--rojo); font-size: 13.5px; font-weight: 600; }

/* el logo horizontal de Index es muy ancho: en la portada se ajusta por ancho, no por alto */
#portada-index .portada-logo { height: auto; width: min(72vw, 360px); max-width: none; }
#portada-index .portada-logo svg { width: 100%; height: auto; display: block; }

/* ── barra superior ── */
.top { position: sticky; top: 0; z-index: 20; background: rgba(6, 11, 24, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--linea); }
.top__in { max-width: 1240px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 18px; }
.marca { display: flex; align-items: center; gap: 10px; color: var(--tx); font-weight: 700; flex: none; }
.marca img { height: 17px; display: block; }
.marca span { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--cel); border-left: 1px solid var(--linea2); padding-left: 10px; }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.nav::-webkit-scrollbar { display: none; }
.nav a { flex: none; padding: 8px 12px; border-radius: 10px; color: var(--tx2); font-size: 14px; font-weight: 500; transition: background .15s, color .15s; }
.nav a:hover { color: #fff; background: rgba(140, 170, 255, .1); }
.nav a.on { color: #fff; background: var(--az); box-shadow: 0 6px 18px rgba(0, 87, 255, .4); }
.yo { display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--tx2); flex: none; }
.yo a { color: var(--mut); }
.yo a:hover { color: #fff; }

/* ── lienzo ── */
.v { max-width: 1240px; margin: 0 auto; padding: 28px 20px 110px; min-height: 70vh; }
.pie { max-width: 1240px; margin: 0 auto; padding: 22px 20px 36px; color: var(--mut); font-size: 12px; border-top: 1px solid var(--linea); }
.cargando { display: grid; place-items: center; gap: 0; padding: 120px 0; color: var(--tx2); grid-auto-flow: row; }
.cargando i { display: inline-block; width: 46px; height: 8px; border-radius: 4px; background: var(--az); margin: 3px; animation: late 1s infinite ease-in-out; transform: skewX(-30deg); }
.cargando i:nth-child(2) { animation-delay: .12s; width: 60px; }
.cargando i:nth-child(3) { animation-delay: .24s; }
.cargando p { margin-top: 18px; }
@keyframes late { 0%, 100% { opacity: .25; transform: skewX(-30deg) scaleX(.7); } 50% { opacity: 1; transform: skewX(-30deg) scaleX(1); } }
@keyframes sube { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.entra > * { animation: sube .55s cubic-bezier(.2, .8, .2, 1) both; }
.entra > *:nth-child(2) { animation-delay: .05s; } .entra > *:nth-child(3) { animation-delay: .1s; } .entra > *:nth-child(4) { animation-delay: .15s; }
.entra > *:nth-child(5) { animation-delay: .2s; } .entra > *:nth-child(6) { animation-delay: .25s; } .entra > *:nth-child(n+7) { animation-delay: .3s; }

.cab { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.cab h1 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.cab p { color: var(--tx2); max-width: 720px; margin-top: 8px; }
.k { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--cel); font-weight: 700; }
.sec { margin-top: 34px; }
.sec > h2 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 4px; }
.sec > .sub { color: var(--tx2); font-size: 14px; margin-bottom: 14px; }
.panel { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--linea); border-radius: var(--r); padding: 20px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.gauto { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.aviso { display: flex; gap: 12px; align-items: flex-start; border: 1px solid rgba(255, 181, 71, .35); background: rgba(255, 181, 71, .08); color: #ffd9a0; border-radius: 14px; padding: 12px 16px; font-size: 13.5px; }
.aviso b { color: #ffe9c7; }
.nota { color: var(--mut); font-size: 12.5px; margin-top: 10px; }

/* ── portada de inicio ── */
.hero { position: relative; overflow: hidden; border-radius: 24px; padding: clamp(24px, 5vw, 46px); border: 1px solid var(--linea2);
  background: radial-gradient(600px 300px at 85% 0%, rgba(61, 131, 255, .45), transparent 65%), linear-gradient(135deg, #0a1a44 0%, #071027 60%); }
.hero::after { content: ''; position: absolute; right: -60px; bottom: -70px; width: 380px; height: 310px; opacity: .07; background: url(/assets/isotipo-blanco.svg) no-repeat center / contain; animation: flota 9s ease-in-out infinite; pointer-events: none; }
@keyframes flota { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-16px) rotate(1deg); } }
.hero h1 { font-size: clamp(30px, 5.4vw, 54px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; max-width: 820px; position: relative; z-index: 1; }
.hero h1 em { font-style: normal; color: var(--cel); }
.hero p { color: #c5d2ee; max-width: 660px; margin-top: 14px; font-size: 16px; position: relative; z-index: 1; }
.hero__acc { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; position: relative; z-index: 1; }
.tile { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--linea); border-radius: var(--r); padding: 16px 16px 14px; cursor: default; transition: transform .2s, border-color .2s, box-shadow .2s; }
a.tile, .tile[data-ir] { cursor: pointer; color: inherit; }
a.tile:hover, .tile[data-ir]:hover { transform: translateY(-3px); border-color: var(--az2); box-shadow: 0 16px 34px rgba(0, 60, 200, .3); }
.tile::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--az); }
.tile b { display: block; font-size: clamp(24px, 3vw, 34px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile span { display: block; color: var(--tx2); font-size: 13px; margin-top: 4px; }
.tile small { display: block; color: var(--mut); font-size: 12px; margin-top: 2px; }

/* ── gráficos ── */
.barras { display: flex; align-items: flex-end; gap: 10px; height: 210px; padding-top: 22px; }
.barras__c { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; cursor: pointer; }
.barras__n { font-size: 12.5px; font-weight: 700; color: var(--tx); margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.barras__b { width: 100%; max-width: 62px; border-radius: 9px 9px 3px 3px; background: linear-gradient(180deg, var(--az2), var(--az)); height: 0; transition: height 1s cubic-bezier(.2, .8, .2, 1), filter .2s; box-shadow: 0 0 22px rgba(0, 87, 255, .35); }
.barras__c:hover .barras__b { filter: brightness(1.35); }
.barras__a { font-size: 12px; color: var(--mut); margin-top: 8px; }
.fila { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 8px; border-radius: 10px; cursor: pointer; transition: background .15s; }
.fila:hover { background: rgba(140, 170, 255, .08); }
.fila__n { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fila__v { font-size: 13px; color: var(--tx2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pista { height: 10px; border-radius: 6px; background: rgba(140, 170, 255, .1); overflow: hidden; position: relative; }
.pista i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--az), var(--cel)); transition: width 1.1s cubic-bezier(.2, .8, .2, 1); }
.rango { height: 14px; border-radius: 7px; background: rgba(140, 170, 255, .08); position: relative; }
.rango i { position: absolute; top: 0; bottom: 0; border-radius: 7px; background: linear-gradient(90deg, rgba(0, 87, 255, .55), rgba(141, 184, 255, .75)); left: 0; width: 0; transition: left 1s cubic-bezier(.2, .8, .2, 1), width 1s cubic-bezier(.2, .8, .2, 1); }
.rango u { position: absolute; top: -4px; bottom: -4px; width: 3px; border-radius: 2px; background: #fff; left: 0; transition: left 1s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 0 10px #fff; }
.linea svg { width: 100%; height: 190px; display: block; overflow: visible; }
.linea path.l { fill: none; stroke: var(--az2); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: traza 1.6s .2s cubic-bezier(.2, .8, .2, 1) forwards; filter: drop-shadow(0 0 8px rgba(61, 131, 255, .8)); }
.linea path.a { fill: url(#gr); opacity: 0; animation: aparece .9s 1s forwards; }
.linea circle { fill: #fff; stroke: var(--az); stroke-width: 3; opacity: 0; animation: aparece .4s forwards; }
.linea text { fill: var(--tx2); font-size: 11.5px; font-family: var(--sans); }
.linea text.v { fill: #fff; font-weight: 700; font-size: 12.5px; opacity: 0; animation: aparece .4s forwards; }
@keyframes traza { to { stroke-dashoffset: 0; } }
@keyframes aparece { to { opacity: 1; } }
.chispa { display: flex; align-items: flex-end; gap: 3px; height: 26px; }
.chispa i { flex: 1; min-height: 2px; border-radius: 2px; background: rgba(141, 184, 255, .25); }
.chispa i.s { background: var(--az2); }

/* ── fichas ── */
.ficha { position: relative; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--linea); border-radius: var(--r); padding: 16px; cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s; color: inherit; min-width: 0; }
.ficha:hover { transform: translateY(-3px); border-color: var(--az2); box-shadow: 0 16px 34px rgba(0, 60, 200, .3); }
.ficha h3 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; overflow-wrap: anywhere; }
.ficha__m { color: var(--tx2); font-size: 13px; }
.ficha__p { font-size: 18px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ficha__p.no { font-size: 13px; font-weight: 500; color: var(--mut); }
.ficha__pie { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(140, 170, 255, .1); color: var(--tx2); border: 1px solid transparent; white-space: nowrap; }
.chip--az { background: rgba(0, 87, 255, .22); color: #cfe0ff; }
.chip--ok { background: rgba(47, 210, 138, .14); color: #8be9bf; }
.chip--amb { background: rgba(255, 181, 71, .14); color: #ffd18a; }
button.chip { cursor: pointer; transition: background .15s, border-color .15s; }
button.chip:hover { border-color: var(--linea2); color: #fff; }
button.chip.on { background: var(--az); color: #fff; }
.marcar { position: absolute; top: 12px; right: 12px; width: 26px; height: 26px; border-radius: 8px; border: 1.5px solid var(--linea2); background: rgba(6, 11, 24, .6); display: grid; place-items: center; cursor: pointer; color: transparent; font-size: 15px; font-weight: 800; transition: all .15s; }
.marcar:hover { border-color: var(--az2); color: var(--mut); }
.marcar.on { background: var(--az); border-color: var(--az); color: #fff; }
.ficha--prop h3 { padding-right: 34px; }

.filtros { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filtros .campo, .filtros select { width: auto; padding: 10px 12px; font-size: 14px; }
.filtros .busca { flex: 1; min-width: 200px; }
.filtros select { border: 1.5px solid var(--linea2); border-radius: 12px; background: #070d1d; color: var(--tx); cursor: pointer; }
.cuenta { color: var(--tx2); font-size: 13.5px; margin-bottom: 12px; }
.cuenta b { color: #fff; font-variant-numeric: tabular-nums; }
.vacio { text-align: center; color: var(--tx2); padding: 60px 20px; border: 1px dashed var(--linea2); border-radius: var(--r); }
.mas { display: grid; place-items: center; margin-top: 18px; }

/* ── línea de tiempo de una empresa ── */
.tiempo { position: relative; padding-left: 22px; display: grid; gap: 12px; }
.tiempo::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--az), transparent); }
.tiempo__i { position: relative; }
.tiempo__i::before { content: ''; position: absolute; left: -21px; top: 20px; width: 12px; height: 12px; border-radius: 50%; background: var(--az); box-shadow: 0 0 0 4px rgba(0, 87, 255, .25); }
.lista { display: grid; gap: 6px; }
.lista__i { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 10px; background: rgba(140, 170, 255, .05); font-size: 13.5px; min-width: 0; }
.lista__i span:first-child { overflow-wrap: anywhere; min-width: 0; }
.lista__i span:last-child { color: var(--mut); white-space: nowrap; }

/* ── cajón de detalle ── */
.cajon { position: fixed; inset: 0; z-index: 40; }
.cajon__fondo { position: absolute; inset: 0; background: rgba(2, 5, 14, .7); backdrop-filter: blur(3px); animation: aparece .25s both; }
.cajon__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--panel); border-left: 1px solid var(--linea2); padding: 22px 22px 40px; overflow-y: auto; animation: desliza .32s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes desliza { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.cajon__x { position: sticky; top: 0; float: right; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--linea2); background: var(--panel2); cursor: pointer; font-size: 18px; line-height: 1; z-index: 2; }
.cajon h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin: 6px 0 8px; overflow-wrap: anywhere; }
.cajon h4 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--cel); margin: 22px 0 8px; }
.precio { padding: 9px 12px; border-left: 3px solid var(--az); background: rgba(0, 87, 255, .09); border-radius: 0 10px 10px 0; font-size: 13.5px; overflow-wrap: anywhere; }
.ruta { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--tx2); background: #070d1d; border: 1px solid var(--linea); border-radius: 10px; padding: 10px 12px; overflow-wrap: anywhere; }

/* ── bandeja de comparación ── */
.bandeja { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 30; display: flex; gap: 12px; align-items: center; background: #0a1a44; border: 1px solid var(--az2); border-radius: 999px; padding: 8px 8px 8px 18px; box-shadow: 0 18px 50px rgba(0, 40, 160, .6); font-size: 14px; animation: sube .3s both; white-space: nowrap; max-width: calc(100% - 24px); }
.comparar { display: grid; gap: 12px; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); overflow-x: auto; padding-bottom: 8px; }
.comparar .panel { display: grid; gap: 14px; align-content: start; }
.comparar dt { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--mut); }
.comparar dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }

.paso { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; align-items: center; }
.paso__n { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(0, 87, 255, .2); color: #cfe0ff; font-weight: 800; }
.clau { display: grid; gap: 10px; }
.clau__t { font-size: 14.5px; line-height: 1.45; }
.tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla th { text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--mut); padding: 8px 10px; border-bottom: 1px solid var(--linea2); }
.tabla td { padding: 10px; border-bottom: 1px solid var(--linea); overflow-wrap: anywhere; }
.form { display: flex; gap: 10px; flex-wrap: wrap; }
.form .campo { flex: 1; min-width: 180px; width: auto; }
.toast { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); background: var(--ok); color: #04321f; font-weight: 700; padding: 9px 18px; border-radius: 999px; z-index: 60; animation: sube .25s both; font-size: 14px; }

@media (max-width: 900px) {
  .g4, .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: minmax(0, 1fr); } .g2 { grid-template-columns: minmax(0, 1fr); }
  .yo span { display: none; } .hero::after { display: none; }
  .top__in { padding: 8px 14px; gap: 10px; } .marca span { display: none; }
  .v { padding: 18px 14px 110px; }
  .fila { grid-template-columns: minmax(0, 120px) minmax(0, 1fr) auto; gap: 8px; }
  .barras { gap: 5px; height: 170px; } .barras__n { font-size: 11px; } .barras__a { font-size: 10.5px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
